{"version":3,"sources":["src/app/store/statuspages/statuspage.service.ts","src/app/store/statuspages/statuspages.actions.ts","src/app/store/statuspages/statuspage-details.state.ts","src/app/store/statuspages/statuspages.state.ts","src/app/store/statuspages/statuspages.state.module.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { Apollo, gql } from 'apollo-angular';\nimport { Observable, map } from 'rxjs';\nimport {\n mapGQLResponse,\n toIdentifiableEntities,\n} from 'src/app/helpers/graphql';\nimport {\n Statuspage,\n StatuspageComponent,\n StatuspageComponentSpec,\n StatuspageComponentUpdateSpec,\n StatuspageSubscription,\n StatuspageVisibility,\n UpdateStatuspageSpec,\n} from 'src/app/models/statuspage';\nimport {\n OffsetPaginatedRespose,\n OffsetPaginationOptions,\n} from 'src/app/store/common/pagination';\n\nconst GET_STATUSPAGES_QUERY = gql`\n query GetStatuspages($organizationUUID: ID!) {\n statuspages(organizationUUID: $organizationUUID) {\n totalSize\n statuspages {\n id\n name\n slug\n domain\n visibility\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nconst GET_STATUSPAGE_QUERY = gql`\n query GetStatuspage($organizationUUID: ID!, $statuspageId: Int!) {\n statuspage(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n ) {\n id\n name\n slug\n customDomain\n domain\n visibility\n createdAt\n updatedAt\n components {\n id\n description\n health {\n name\n color\n icon\n }\n component {\n ... on StatuspageComponentPayloadService {\n service {\n id\n name\n description\n }\n }\n }\n }\n whitelabelConfig {\n colors {\n siteBackground\n sitePrimary\n siteCard\n siteText\n siteTextOnPrimary\n siteTextSubtle\n }\n logoUrl\n showPoweredBy\n }\n }\n }\n`;\n\nconst CREATE_STATUSPAGE_MUTATION = gql`\n mutation CreateStatuspageMutation(\n $organizationUUID: ID!\n $createSpec: CreateStatuspageSpec!\n ) {\n createStatuspage(\n organizationUUID: $organizationUUID\n createSpec: $createSpec\n ) {\n id\n name\n slug\n domain\n visibility\n createdAt\n updatedAt\n }\n }\n`;\n\nconst UPDATE_STATUSPAGE_MUTATION = gql`\n mutation UpdateStatuspageMutation(\n $organizationUUID: ID!\n $statuspageId: Int!\n $updateSpec: UpdateStatuspageSpec!\n ) {\n updateStatuspage(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n updateSpec: $updateSpec\n ) {\n id\n name\n slug\n customDomain\n domain\n visibility\n createdAt\n updatedAt\n }\n }\n`;\n\nconst DELETE_STATUSPAGE_MUTATION = gql`\n mutation DeleteStatuspageMutation(\n $organizationUUID: ID!\n $statuspageId: Int!\n ) {\n deleteStatuspage(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n )\n }\n`;\n\nconst CREATE_STATUSPAGE_COMPONENT_MUTATION = gql`\n mutation CreateStatuspageComponentMutation(\n $organizationUUID: ID!\n $statuspageId: Int!\n $componentSpec: StatuspageComponentSpec!\n ) {\n createStatuspageComponent(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n componentSpec: $componentSpec\n ) {\n id\n position\n description\n type\n health {\n name\n color\n icon\n }\n component {\n ... on StatuspageComponentPayloadService {\n service {\n id\n name\n description\n }\n }\n }\n }\n }\n`;\n\nconst UPDATE_STATUSPAGE_COMPONENT_MUTATION = gql`\n mutation UpdateStatuspageComponentMutation(\n $organizationUUID: ID!\n $statuspageId: Int!\n $componentId: ID!\n $updateSpec: StatuspageComponentUpdateSpec!\n ) {\n updateStatuspageComponent(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n componentId: $componentId\n updateSpec: $updateSpec\n ) {\n description\n }\n }\n`;\n\nconst REMOVE_STATUSPAGE_COMPONENT_MUTATION = gql`\n mutation RemoveStatuspageComponentMutation(\n $organizationUUID: ID!\n $statuspageId: Int!\n $componentId: ID!\n ) {\n removeStatuspageComponent(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n componentId: $componentId\n )\n }\n`;\n\nconst ORDER_STATUSPAGE_COMPONENTS_MUTATION = gql`\n mutation OrderStatuspageComponentsMutation(\n $organizationUUID: ID!\n $statuspageId: Int!\n $orderedComponentIds: [ID!]!\n ) {\n orderStatuspageComponents(\n organizationUUID: $organizationUUID\n statuspageId: $statuspageId\n orderedComponentIds: $orderedComponentIds\n )\n }\n`;\n\nconst GET_SUBSCRIPTIONS_QUERY = gql`\n query GetSubscriptions(\n $organizationId: ID!\n $statuspageId: Int!\n $options: ListSubscriptionsOptions\n ) {\n statuspageSubscriptions(\n organizationId: $organizationId\n statuspageId: $statuspageId\n options: $options\n ) {\n totalSize\n subscriptions {\n id\n manageToken\n recipient {\n id\n preferredLocale\n endpoints {\n providerType\n doiConfirmed\n doiConfirmedAt\n config {\n ... on ProviderAddressMetadata {\n address\n }\n }\n }\n }\n createdAt\n }\n }\n }\n`;\n\nconst UNSUBSCRIBE_FROM_STATUSPAGE_MUTATION = gql`\n mutation UnsubscribeFromStatuspage(\n $statuspageSlug: String!\n $manageToken: String!\n ) {\n unsubscribeFromStatuspage(\n statuspageSlug: $statuspageSlug\n manageToken: $manageToken\n )\n }\n`;\n\n@Injectable()\nexport class StatuspageService {\n private apollo = inject(Apollo);\n\n loadStatuspages(\n organizationId: string\n ): Observable> {\n return this.apollo\n .query<{ statuspages: { statuspages: Statuspage[]; totalSize: number } }>(\n {\n query: GET_STATUSPAGES_QUERY,\n variables: {\n organizationUUID: organizationId,\n },\n }\n )\n .pipe(\n map(data => {\n return {\n totalSize: data.data.statuspages.totalSize,\n items: toIdentifiableEntities(\n data.data.statuspages.statuspages,\n 'id'\n ),\n };\n })\n );\n }\n\n loadStatuspage(\n organizationId: string,\n statuspageId: number\n ): Observable {\n return this.apollo\n .query<{ statuspage: Statuspage }>({\n query: GET_STATUSPAGE_QUERY,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n },\n })\n .pipe(\n map(data => {\n return data.data.statuspage;\n })\n );\n }\n\n createStatuspage(\n organizationId: string,\n spec: {\n name: string;\n visibility: StatuspageVisibility;\n }\n ): Observable {\n return this.apollo\n .mutate<{ createStatuspage: Statuspage }>({\n mutation: CREATE_STATUSPAGE_MUTATION,\n variables: {\n organizationUUID: organizationId,\n createSpec: {\n name: spec.name,\n visibility: spec.visibility,\n },\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{ createStatuspage: Statuspage }>(\n data,\n 'createStatuspage'\n );\n })\n );\n }\n\n updateStatuspage(\n organizationId: string,\n statuspageId: number,\n spec: UpdateStatuspageSpec\n ): Observable {\n return this.apollo\n .mutate<{ updateStatuspage: Statuspage }>({\n mutation: UPDATE_STATUSPAGE_MUTATION,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n updateSpec: spec,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{ updateStatuspage: Statuspage }>(\n data,\n 'updateStatuspage'\n );\n })\n );\n }\n\n deleteStatuspage(\n organizationId: string,\n statuspageId: number\n ): Observable {\n return this.apollo\n .mutate<{ deleteStatuspage: boolean }>({\n mutation: DELETE_STATUSPAGE_MUTATION,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{ deleteStatuspage: boolean }>(\n data,\n 'deleteStatuspage'\n );\n })\n );\n }\n\n createStatuspageComponent(\n organizationId: string,\n statuspageId: number,\n componentSpec: StatuspageComponentSpec\n ): Observable {\n return this.apollo\n .mutate<{ createStatuspageComponent: StatuspageComponent }>({\n mutation: CREATE_STATUSPAGE_COMPONENT_MUTATION,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n componentSpec: componentSpec,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{\n createStatuspageComponent: StatuspageComponent;\n }>(data, 'createStatuspageComponent');\n })\n );\n }\n\n updateStatuspageComponent(\n organizationId: string,\n statuspageId: number,\n componentId: string,\n updateSpec: StatuspageComponentUpdateSpec\n ): Observable {\n return this.apollo\n .mutate<{ updateStatuspageComponent: StatuspageComponent }>({\n mutation: UPDATE_STATUSPAGE_COMPONENT_MUTATION,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n componentId: componentId,\n updateSpec: updateSpec,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{\n updateStatuspageComponent: StatuspageComponent;\n }>(data, 'updateStatuspageComponent');\n })\n );\n }\n\n deleteStatuspageComponent(\n organizationId: string,\n statuspageId: number,\n componentId: string\n ): Observable {\n return this.apollo\n .mutate<{ removeStatuspageComponent: boolean }>({\n mutation: REMOVE_STATUSPAGE_COMPONENT_MUTATION,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n componentId: componentId,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{\n removeStatuspageComponent: boolean;\n }>(data, 'removeStatuspageComponent');\n })\n );\n }\n\n orderStatuspageComponents(\n organizationId: string,\n statuspageId: number,\n orderedComponentIds: string[]\n ): Observable {\n return this.apollo\n .mutate<{ orderStatuspageComponents: boolean }>({\n mutation: ORDER_STATUSPAGE_COMPONENTS_MUTATION,\n variables: {\n organizationUUID: organizationId,\n statuspageId: statuspageId,\n orderedComponentIds: orderedComponentIds,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{\n orderStatuspageComponents: boolean;\n }>(data, 'orderStatuspageComponents');\n })\n );\n }\n\n loadSubscriptions(\n organizationId: string,\n statuspageId: number,\n pagination: OffsetPaginationOptions\n ): Observable> {\n return this.apollo\n .query<{\n statuspageSubscriptions: {\n subscriptions: StatuspageSubscription[];\n totalSize: number;\n };\n }>({\n query: GET_SUBSCRIPTIONS_QUERY,\n variables: {\n organizationId: organizationId,\n statuspageId: statuspageId,\n options: pagination,\n },\n })\n .pipe(\n map(data => {\n return {\n totalSize: data.data.statuspageSubscriptions.totalSize,\n items: toIdentifiableEntities(\n data.data.statuspageSubscriptions.subscriptions,\n 'id'\n ),\n };\n })\n );\n }\n\n unsubscribeFromStatuspage(\n statuspageSlug: string,\n manageToken: string\n ): Observable {\n return this.apollo\n .mutate<{ unsubscribeFromStatuspage: boolean }>({\n mutation: UNSUBSCRIBE_FROM_STATUSPAGE_MUTATION,\n variables: {\n statuspageSlug: statuspageSlug,\n manageToken: manageToken,\n },\n })\n .pipe(\n map(data => {\n return mapGQLResponse<{\n unsubscribeFromStatuspage: boolean;\n }>(data, 'unsubscribeFromStatuspage');\n })\n );\n }\n}\n","import {\n StatuspageComponentSpec,\n StatuspageComponentUpdateSpec,\n StatuspageVisibility,\n UpdateStatuspageSpec,\n} from 'src/app/models/statuspage';\nimport { OffsetPaginationOptions } from '../common/pagination';\n\nexport class LoadStatuspagesAction {\n static readonly type = '[Statuspages] Load Statuspages';\n}\n\nexport class LoadStatuspageDetailsAction {\n static readonly type = '[Statuspages] Load Statuspage';\n constructor(public statuspageId: number) {}\n}\n\nexport class DeleteStatuspageAction {\n static readonly type = '[Statuspages] Delete Statuspage';\n constructor(public statuspageId: number) {}\n}\n\nexport class CreateStatuspageAction {\n static readonly type = '[Statuspages] Create Statuspage';\n constructor(\n public spec: {\n name: string;\n visibility: StatuspageVisibility;\n }\n ) {}\n}\n\nexport class UpdateStatuspageAction {\n static readonly type = '[Statuspages] Update Statuspage';\n constructor(\n public statuspageId: number,\n public updateSpec: UpdateStatuspageSpec\n ) {}\n}\n\nexport class CreateStatuspageComponentAction {\n static readonly type = '[Statuspages] Create Statuspage Component';\n constructor(\n public statuspageId: number,\n public componentSpec: StatuspageComponentSpec\n ) {}\n}\n\nexport class UpdateStatuspageComponentAction {\n static readonly type = '[Statuspages] Update Statuspage Component';\n constructor(\n public statuspageId: number,\n public componentId: string,\n public updateSpec: StatuspageComponentUpdateSpec\n ) {}\n}\n\nexport class RemoveStatuspageComponentAction {\n static readonly type = '[Statuspages] Remove Statuspage Component';\n constructor(\n public statuspageId: number,\n public componentId: string\n ) {}\n}\n\nexport class OrderStatuspageComponentsAction {\n static readonly type = '[Statuspages] Order Statuspage Components';\n constructor(\n public statuspageId: number,\n public orderedComponentIds: string[]\n ) {}\n}\n\nexport class LoadSubscriptionsAction {\n static readonly type = '[Statuspages] Load Subscriptions';\n constructor(public pagination: OffsetPaginationOptions) {}\n}\n\nexport class UnsubscribeFromStatuspageAction {\n static readonly type = '[Statuspages] Unsubscribe from Statuspage';\n constructor(public manageToken: string) {}\n}\n","import { inject, Injectable } from '@angular/core';\nimport { Action, Selector, State, StateContext, Store } from '@ngxs/store';\nimport { catchError, map, tap } from 'rxjs';\nimport { Statuspage, StatuspageSubscription } from 'src/app/models/statuspage';\nimport { ToastService } from 'src/app/services/toast/toast.service';\nimport {\n Entity,\n loadEntity,\n NewEntity,\n saveEntity,\n} from 'src/app/store/common/entity';\nimport { UserState } from 'src/app/store/user/user.state';\nimport {\n PaginatedListEntities,\n PaginatedListEntitiesState,\n} from '../common/paginated-list-entity';\nimport { OffsetPagination, OffsetPaginationState } from '../common/pagination';\nimport { StatuspageService } from './statuspage.service';\nimport {\n CreateStatuspageComponentAction,\n LoadStatuspageDetailsAction,\n LoadSubscriptionsAction,\n OrderStatuspageComponentsAction,\n RemoveStatuspageComponentAction,\n UnsubscribeFromStatuspageAction,\n UpdateStatuspageAction,\n UpdateStatuspageComponentAction,\n} from './statuspages.actions';\n\nexport interface StatuspageDetailsStateModel {\n statuspage: Entity;\n subscriptions: PaginatedListEntitiesState<\n StatuspageSubscription,\n OffsetPaginationState\n >;\n}\n\n@State({\n name: 'statuspageDetails',\n defaults: {\n statuspage: NewEntity(),\n subscriptions: OffsetPagination.GetDefaultState(),\n },\n})\n@Injectable()\nexport class StatuspageDetailsState {\n store = inject(Store);\n statuspageService = inject(StatuspageService);\n toast = inject(ToastService);\n\n subscriptionPagination = new PaginatedListEntities<\n StatuspageDetailsStateModel,\n OffsetPagination\n >('subscriptions', new OffsetPagination());\n\n @Selector()\n static statuspageDetails(\n state: StatuspageDetailsStateModel\n ): Entity {\n return state.statuspage;\n }\n\n @Selector()\n static subscriptions(state: StatuspageDetailsStateModel) {\n return state.subscriptions;\n }\n\n @Action(LoadStatuspageDetailsAction)\n loadStatuspageDetails(\n ctx: StateContext,\n { statuspageId }: LoadStatuspageDetailsAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n const observable = this.statuspageService.loadStatuspage(\n organizationID,\n statuspageId\n );\n\n return loadEntity(ctx, 'statuspage', observable);\n }\n\n @Action(UpdateStatuspageAction)\n UpdateStatuspage(\n ctx: StateContext,\n { statuspageId, updateSpec }: UpdateStatuspageAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return saveEntity(\n ctx,\n 'statuspage',\n this.statuspageService.updateStatuspage(\n organizationID,\n statuspageId,\n updateSpec\n ),\n true\n ).pipe(\n tap(() => {\n this.toast.showInfo('Success', 'Statuspage updated');\n }),\n catchError(error => {\n this.toast.showError(new Error('Could not update statuspage:' + error));\n return error;\n })\n );\n }\n\n @Action(CreateStatuspageComponentAction)\n CreateStatuspageComponent(\n ctx: StateContext,\n { statuspageId, componentSpec }: CreateStatuspageComponentAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return saveEntity(\n ctx,\n 'statuspage',\n this.statuspageService\n .createStatuspageComponent(organizationID, statuspageId, componentSpec)\n .pipe(\n map(component => {\n const state = ctx.getState();\n\n return {\n components: [state.statuspage.data?.components ?? [], component].flat(),\n };\n })\n ),\n true\n );\n }\n\n @Action(UpdateStatuspageComponentAction)\n UpdateStatuspageComponent(\n ctx: StateContext,\n { statuspageId, componentId, updateSpec }: UpdateStatuspageComponentAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return saveEntity(\n ctx,\n 'statuspage',\n this.statuspageService\n .updateStatuspageComponent(\n organizationID,\n statuspageId,\n componentId,\n updateSpec\n )\n .pipe(\n map(component => {\n const state = ctx.getState();\n\n return {\n components: state.statuspage.data!.components?.map(c => {\n if (c.id === componentId) {\n return {\n ...c,\n ...component,\n };\n }\n return c;\n }),\n };\n })\n ),\n true\n );\n }\n\n @Action(RemoveStatuspageComponentAction)\n RemoveStatuspageComponent(\n ctx: StateContext,\n { statuspageId, componentId }: RemoveStatuspageComponentAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return saveEntity(\n ctx,\n 'statuspage',\n this.statuspageService\n .deleteStatuspageComponent(organizationID, statuspageId, componentId)\n .pipe(\n map(() => {\n const state = ctx.getState();\n\n return {\n components: state.statuspage.data!.components?.filter(\n component => {\n return component.id !== componentId;\n }\n ),\n };\n })\n ),\n true\n );\n }\n\n @Action(OrderStatuspageComponentsAction)\n OrderStatuspageComponents(\n ctx: StateContext,\n { statuspageId, orderedComponentIds }: OrderStatuspageComponentsAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return saveEntity(\n ctx,\n 'statuspage',\n this.statuspageService\n .orderStatuspageComponents(\n organizationID,\n statuspageId,\n orderedComponentIds\n )\n .pipe(\n map(() => {\n const state = ctx.getState();\n\n return {\n components: orderedComponentIds.map(id => {\n const component = state.statuspage.data?.components?.find(\n c => c.id === id\n );\n return component;\n }),\n };\n })\n ),\n true\n ).pipe(\n tap(() => {\n this.toast.showInfo('Success', 'Order updated');\n })\n );\n }\n\n @Action(LoadSubscriptionsAction)\n loadSubscriptions(\n ctx: StateContext,\n { pagination }: LoadSubscriptionsAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n const statuspage = this.store.selectSnapshot(\n StatuspageDetailsState.statuspageDetails\n );\n if (!statuspage.data) throw new Error('No statuspage ID set');\n\n return this.subscriptionPagination.loadEntititesPaginated(\n ctx,\n pagination,\n this.statuspageService.loadSubscriptions(\n organizationID,\n statuspage.data.id,\n pagination\n ),\n true\n );\n }\n\n @Action(UnsubscribeFromStatuspageAction)\n unsubscribeFromStatuspage(\n ctx: StateContext,\n { manageToken }: UnsubscribeFromStatuspageAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n const statuspage = this.store.selectSnapshot(\n StatuspageDetailsState.statuspageDetails\n );\n if (!statuspage.data) throw new Error('No statuspage ID set');\n\n return this.statuspageService\n .unsubscribeFromStatuspage(statuspage.data.slug, manageToken)\n .pipe(\n tap(() => {\n this.toast.showInfo('Success', 'Removed subscription');\n ctx.dispatch(\n new LoadSubscriptionsAction({\n page: ctx.getState().subscriptions.pagination.page,\n pageSize: ctx.getState().subscriptions.pagination.pageSize,\n })\n );\n }),\n catchError(error => {\n this.toast.showError(\n new Error('Could not remove subscription:' + error)\n );\n return error;\n })\n );\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { Action, Selector, State, StateContext, Store } from '@ngxs/store';\nimport { catchError } from 'rxjs';\nimport { Statuspage } from 'src/app/models/statuspage';\nimport { ToastService } from 'src/app/services/toast/toast.service';\nimport {\n addListEntity,\n removeListEntity,\n} from 'src/app/store/common/list-entity';\nimport {\n PaginatedListEntities,\n PaginatedListEntitiesState,\n} from 'src/app/store/common/paginated-list-entity';\nimport {\n OffsetPagination,\n OffsetPaginationState,\n} from 'src/app/store/common/pagination';\nimport { UserState } from 'src/app/store/user/user.state';\nimport { StatuspageDetailsState } from './statuspage-details.state';\nimport { StatuspageService } from './statuspage.service';\nimport {\n CreateStatuspageAction,\n DeleteStatuspageAction,\n LoadStatuspagesAction,\n} from './statuspages.actions';\n\nexport interface StatuspageStateModel {\n statuspages: PaginatedListEntitiesState;\n}\n\n@State({\n name: 'statuspages',\n defaults: {\n statuspages: OffsetPagination.GetDefaultState(),\n },\n children: [StatuspageDetailsState],\n})\n@Injectable()\nexport class StatuspageState {\n store = inject(Store);\n toast = inject(ToastService);\n statuspageService = inject(StatuspageService);\n\n statuspagePagination = new PaginatedListEntities<\n StatuspageStateModel,\n OffsetPagination\n >('statuspages', new OffsetPagination());\n\n @Selector()\n static statuspages(state: StatuspageStateModel) {\n return state.statuspages;\n }\n\n @Selector()\n static lastCreatedStatuspageId(state: StatuspageStateModel) {\n return state.statuspages.latestCreatedId;\n }\n\n @Action(LoadStatuspagesAction)\n loadStatuspages(ctx: StateContext) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return this.statuspagePagination.loadEntititesPaginated(\n ctx,\n { page: 1, pageSize: 10 },\n this.statuspageService.loadStatuspages(organizationID)\n );\n }\n\n @Action(DeleteStatuspageAction)\n deleteStatusPage(\n ctx: StateContext,\n { statuspageId }: DeleteStatuspageAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return removeListEntity(\n ctx,\n 'statuspages',\n statuspageId,\n (sp: Statuspage) => {\n return sp.id !== statuspageId;\n },\n this.statuspageService.deleteStatuspage(organizationID, statuspageId)\n ).pipe(\n catchError(err => {\n this.toast.showError(err);\n throw err;\n })\n );\n }\n\n @Action(CreateStatuspageAction)\n createStatusPage(\n ctx: StateContext,\n { spec }: CreateStatuspageAction\n ) {\n const organizationID = this.store.selectSnapshot(\n UserState.getCurrentOrganizationID\n );\n\n if (!organizationID) throw new Error('No organization ID set');\n\n return addListEntity(\n ctx,\n 'statuspages',\n 'id',\n this.statuspageService.createStatuspage(organizationID, {\n name: spec.name,\n visibility: spec.visibility,\n })\n ).pipe(\n catchError(err => {\n this.toast.showError(err);\n throw err;\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { StatuspageService } from './statuspage.service';\nimport { NgxsModule } from '@ngxs/store';\nimport { StatuspageState } from './statuspages.state';\nimport { StatuspageDetailsState } from './statuspage-details.state';\n\n@NgModule({\n declarations: [],\n imports: [NgxsModule.forFeature([StatuspageState, StatuspageDetailsState])],\n providers: [StatuspageService],\n exports: [],\n})\nexport class StatuspagesStateModule {}\n"],"names":["GET_STATUSPAGES_QUERY","gql","GET_STATUSPAGE_QUERY","CREATE_STATUSPAGE_MUTATION","UPDATE_STATUSPAGE_MUTATION","DELETE_STATUSPAGE_MUTATION","CREATE_STATUSPAGE_COMPONENT_MUTATION","UPDATE_STATUSPAGE_COMPONENT_MUTATION","REMOVE_STATUSPAGE_COMPONENT_MUTATION","ORDER_STATUSPAGE_COMPONENTS_MUTATION","GET_SUBSCRIPTIONS_QUERY","UNSUBSCRIBE_FROM_STATUSPAGE_MUTATION","StatuspageService","constructor","apollo","inject","Apollo","loadStatuspages","organizationId","query","variables","organizationUUID","pipe","map","data","totalSize","statuspages","items","toIdentifiableEntities","loadStatuspage","statuspageId","statuspage","createStatuspage","spec","mutate","mutation","createSpec","name","visibility","mapGQLResponse","updateStatuspage","updateSpec","deleteStatuspage","createStatuspageComponent","componentSpec","updateStatuspageComponent","componentId","deleteStatuspageComponent","orderStatuspageComponents","orderedComponentIds","loadSubscriptions","pagination","options","statuspageSubscriptions","subscriptions","unsubscribeFromStatuspage","statuspageSlug","manageToken","factory","ɵfac","LoadStatuspagesAction","type","LoadStatuspageDetailsAction","constructor","statuspageId","DeleteStatuspageAction","CreateStatuspageAction","spec","UpdateStatuspageAction","updateSpec","CreateStatuspageComponentAction","componentSpec","UpdateStatuspageComponentAction","componentId","RemoveStatuspageComponentAction","OrderStatuspageComponentsAction","orderedComponentIds","LoadSubscriptionsAction","pagination","UnsubscribeFromStatuspageAction","manageToken","StatuspageDetailsState","constructor","store","inject","Store","statuspageService","StatuspageService","toast","ToastService","subscriptionPagination","PaginatedListEntities","OffsetPagination","statuspageDetails","state","statuspage","subscriptions","loadStatuspageDetails","ctx","statuspageId","organizationID","selectSnapshot","UserState","getCurrentOrganizationID","Error","observable","loadStatuspage","loadEntity","UpdateStatuspage","updateSpec","saveEntity","updateStatuspage","pipe","tap","showInfo","catchError","error","showError","CreateStatuspageComponent","componentSpec","createStatuspageComponent","map","component","components","getState","data","flat","UpdateStatuspageComponent","componentId","updateStatuspageComponent","c","id","__spreadValues","RemoveStatuspageComponent","deleteStatuspageComponent","filter","OrderStatuspageComponents","orderedComponentIds","orderStatuspageComponents","find","loadSubscriptions","pagination","StatuspageDetailsState_1","loadEntititesPaginated","unsubscribeFromStatuspage","manageToken","slug","dispatch","LoadSubscriptionsAction","page","pageSize","factory","ɵfac","__decorate","Action","LoadStatuspageDetailsAction","UpdateStatuspageAction","CreateStatuspageComponentAction","UpdateStatuspageComponentAction","RemoveStatuspageComponentAction","OrderStatuspageComponentsAction","UnsubscribeFromStatuspageAction","Selector","State","name","defaults","NewEntity","GetDefaultState","StatuspageState","constructor","store","inject","Store","toast","ToastService","statuspageService","StatuspageService","statuspagePagination","PaginatedListEntities","OffsetPagination","statuspages","state","lastCreatedStatuspageId","latestCreatedId","loadStatuspages","ctx","organizationID","selectSnapshot","UserState","getCurrentOrganizationID","Error","loadEntititesPaginated","page","pageSize","deleteStatusPage","statuspageId","removeListEntity","sp","id","deleteStatuspage","pipe","catchError","err","showError","createStatusPage","spec","addListEntity","createStatuspage","name","visibility","factory","ɵfac","__decorate","Action","LoadStatuspagesAction","DeleteStatuspageAction","CreateStatuspageAction","Selector","State","defaults","GetDefaultState","children","StatuspageDetailsState","StatuspagesStateModule","StatuspageService","imports","NgxsModule","forFeature","StatuspageState","StatuspageDetailsState"],"mappings":";;gTAqBA,IAAMA,GAAwBC;;;;;;;;;;;;;;;EAiBxBC,GAAuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDvBE,GAA6BF;;;;;;;;;;;;;;;;;;EAoB7BG,GAA6BH;;;;;;;;;;;;;;;;;;;;;EAuB7BI,GAA6BJ;;;;;;;;;;EAY7BK,GAAuCL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCvCM,GAAuCN;;;;;;;;;;;;;;;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