@powerhousedao/service-offering 1.0.0-dev.1 → 1.0.0-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-models/facet/v1/actions.d.ts +3 -1
- package/dist/document-models/facet/v1/actions.d.ts.map +1 -1
- package/dist/document-models/facet/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/facet/v1/gen/document-model.js +31 -7
- package/dist/document-models/facet/v1/gen/document-schema.d.ts +6 -6
- package/dist/document-models/facet/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/facet/v1/gen/index.js +2 -0
- package/dist/document-models/facet/v1/gen/option-management/error.d.ts +27 -1
- package/dist/document-models/facet/v1/gen/option-management/error.d.ts.map +1 -1
- package/dist/document-models/facet/v1/gen/option-management/error.js +23 -1
- package/dist/document-models/facet/v1/gen/ph-factories.js +2 -2
- package/dist/document-models/facet/v1/gen/schema/types.d.ts +2 -2
- package/dist/document-models/facet/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/facet/v1/gen/schema/zod.js +2 -2
- package/dist/document-models/facet/v1/gen/utils.js +2 -2
- package/dist/document-models/facet/v1/module.d.ts +1 -1
- package/dist/document-models/facet/v1/module.d.ts.map +1 -1
- package/dist/document-models/facet/v1/module.js +4 -1
- package/dist/document-models/resource-instance/v1/actions.d.ts +4 -1
- package/dist/document-models/resource-instance/v1/actions.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/configuration-management/error.d.ts +34 -1
- package/dist/document-models/resource-instance/v1/gen/configuration-management/error.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/configuration-management/error.js +32 -1
- package/dist/document-models/resource-instance/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/document-model.js +222 -70
- package/dist/document-models/resource-instance/v1/gen/document-schema.d.ts +0 -6
- package/dist/document-models/resource-instance/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/index.js +2 -0
- package/dist/document-models/resource-instance/v1/gen/instance-management/actions.d.ts +6 -2
- package/dist/document-models/resource-instance/v1/gen/instance-management/actions.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/creators.d.ts +3 -2
- package/dist/document-models/resource-instance/v1/gen/instance-management/creators.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/creators.js +2 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/error.d.ts +98 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/error.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/error.js +112 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/operations.d.ts +2 -1
- package/dist/document-models/resource-instance/v1/gen/instance-management/operations.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/ph-factories.js +0 -2
- package/dist/document-models/resource-instance/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/reducer.js +6 -1
- package/dist/document-models/resource-instance/v1/gen/schema/types.d.ts +3 -3
- package/dist/document-models/resource-instance/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/schema/zod.d.ts +2 -1
- package/dist/document-models/resource-instance/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/schema/zod.js +5 -3
- package/dist/document-models/resource-instance/v1/gen/utils.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/gen/utils.js +0 -2
- package/dist/document-models/resource-instance/v1/module.d.ts +1 -1
- package/dist/document-models/resource-instance/v1/module.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/module.js +4 -1
- package/dist/document-models/resource-instance/v1/src/reducers/configuration-management.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/src/reducers/configuration-management.js +57 -53
- package/dist/document-models/resource-instance/v1/src/reducers/instance-management.d.ts.map +1 -1
- package/dist/document-models/resource-instance/v1/src/reducers/instance-management.js +57 -21
- package/dist/document-models/resource-instance/v1/tests/instance-management.test.js +11 -1
- package/dist/document-models/resource-template/v1/actions.d.ts +3 -1
- package/dist/document-models/resource-template/v1/actions.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/audience-management/error.d.ts +20 -1
- package/dist/document-models/resource-template/v1/gen/audience-management/error.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/audience-management/error.js +16 -1
- package/dist/document-models/resource-template/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/document-model.js +207 -89
- package/dist/document-models/resource-template/v1/gen/document-schema.d.ts +12 -12
- package/dist/document-models/resource-template/v1/gen/facet-targeting/error.d.ts +27 -1
- package/dist/document-models/resource-template/v1/gen/facet-targeting/error.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/facet-targeting/error.js +23 -1
- package/dist/document-models/resource-template/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/index.js +2 -0
- package/dist/document-models/resource-template/v1/gen/option-group-management/error.d.ts +27 -1
- package/dist/document-models/resource-template/v1/gen/option-group-management/error.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/option-group-management/error.js +23 -1
- package/dist/document-models/resource-template/v1/gen/ph-factories.js +3 -3
- package/dist/document-models/resource-template/v1/gen/schema/types.d.ts +4 -4
- package/dist/document-models/resource-template/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/schema/zod.js +4 -4
- package/dist/document-models/resource-template/v1/gen/service-management/error.d.ts +51 -1
- package/dist/document-models/resource-template/v1/gen/service-management/error.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/service-management/error.js +49 -1
- package/dist/document-models/resource-template/v1/gen/utils.js +3 -3
- package/dist/document-models/resource-template/v1/module.d.ts +1 -1
- package/dist/document-models/resource-template/v1/module.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/module.js +4 -1
- package/dist/document-models/resource-template/v1/src/reducers/option-group-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/src/reducers/option-group-management.js +2 -21
- package/dist/document-models/service-offering/v1/actions.d.ts +3 -1
- package/dist/document-models/service-offering/v1/actions.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/document-model.js +421 -199
- package/dist/document-models/service-offering/v1/gen/document-schema.d.ts +9 -9
- package/dist/document-models/service-offering/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/index.js +2 -0
- package/dist/document-models/service-offering/v1/gen/offering/error.d.ts +41 -1
- package/dist/document-models/service-offering/v1/gen/offering/error.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/offering/error.js +37 -1
- package/dist/document-models/service-offering/v1/gen/option-groups/error.d.ts +55 -1
- package/dist/document-models/service-offering/v1/gen/option-groups/error.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/option-groups/error.js +53 -1
- package/dist/document-models/service-offering/v1/gen/ph-factories.js +3 -3
- package/dist/document-models/service-offering/v1/gen/schema/types.d.ts +134 -61
- package/dist/document-models/service-offering/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/schema/zod.d.ts +35 -10
- package/dist/document-models/service-offering/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/schema/zod.js +182 -64
- package/dist/document-models/service-offering/v1/gen/services/error.d.ts +20 -1
- package/dist/document-models/service-offering/v1/gen/services/error.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/services/error.js +16 -1
- package/dist/document-models/service-offering/v1/gen/tiers/error.d.ts +100 -1
- package/dist/document-models/service-offering/v1/gen/tiers/error.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/tiers/error.js +106 -1
- package/dist/document-models/service-offering/v1/gen/utils.js +4 -4
- package/dist/document-models/service-offering/v1/module.d.ts +1 -1
- package/dist/document-models/service-offering/v1/module.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/module.js +4 -1
- package/dist/document-models/service-offering/v1/src/reducers/offering.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/src/reducers/offering.js +20 -12
- package/dist/document-models/service-offering/v1/src/reducers/option-groups.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/src/reducers/option-groups.js +157 -39
- package/dist/document-models/service-offering/v1/src/reducers/services.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/src/reducers/services.js +17 -14
- package/dist/document-models/service-offering/v1/src/reducers/tiers.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/src/reducers/tiers.js +111 -78
- package/dist/document-models/service-offering/v1/src/utils.d.ts +60 -1
- package/dist/document-models/service-offering/v1/src/utils.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/src/utils.js +173 -1
- package/dist/document-models/service-offering/v1/tests/option-groups.test.js +1 -1
- package/dist/document-models/service-offering/v1/utils.d.ts +3 -0
- package/dist/document-models/service-offering/v1/utils.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/actions.d.ts +3 -1
- package/dist/document-models/subscription-instance/v1/actions.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/document-model.js +488 -246
- package/dist/document-models/subscription-instance/v1/gen/document-schema.d.ts +3 -3
- package/dist/document-models/subscription-instance/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/index.js +2 -0
- package/dist/document-models/subscription-instance/v1/gen/metrics/error.d.ts +73 -1
- package/dist/document-models/subscription-instance/v1/gen/metrics/error.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/metrics/error.js +86 -1
- package/dist/document-models/subscription-instance/v1/gen/ph-factories.js +1 -1
- package/dist/document-models/subscription-instance/v1/gen/schema/types.d.ts +199 -82
- package/dist/document-models/subscription-instance/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/schema/zod.d.ts +22 -12
- package/dist/document-models/subscription-instance/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/schema/zod.js +230 -84
- package/dist/document-models/subscription-instance/v1/gen/service/error.d.ts +62 -1
- package/dist/document-models/subscription-instance/v1/gen/service/error.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/service/error.js +60 -1
- package/dist/document-models/subscription-instance/v1/gen/service-group/error.d.ts +39 -1
- package/dist/document-models/subscription-instance/v1/gen/service-group/error.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/service-group/error.js +39 -1
- package/dist/document-models/subscription-instance/v1/gen/subscription/error.d.ts +55 -1
- package/dist/document-models/subscription-instance/v1/gen/subscription/error.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/gen/subscription/error.js +51 -1
- package/dist/document-models/subscription-instance/v1/gen/utils.js +2 -2
- package/dist/document-models/subscription-instance/v1/module.d.ts +1 -1
- package/dist/document-models/subscription-instance/v1/module.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/module.js +4 -1
- package/dist/document-models/subscription-instance/v1/src/reducers/customer.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/src/reducers/customer.js +1 -0
- package/dist/document-models/subscription-instance/v1/src/reducers/metrics.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/src/reducers/metrics.js +70 -45
- package/dist/document-models/subscription-instance/v1/src/reducers/service-group.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/src/reducers/service-group.js +108 -30
- package/dist/document-models/subscription-instance/v1/src/reducers/service.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/src/reducers/service.js +108 -39
- package/dist/document-models/subscription-instance/v1/src/reducers/subscription.d.ts.map +1 -1
- package/dist/document-models/subscription-instance/v1/src/reducers/subscription.js +193 -35
- package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
- package/dist/document-models/upgrade-manifests.js +0 -2
- package/dist/editors/resource-instance-editor/editor.d.ts.map +1 -1
- package/dist/editors/resource-instance-editor/editor.js +13 -3
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.js +4 -2
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ServiceCatalog.js +189 -32
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/TheMatrix.js +295 -140
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/TierDefinition.js +2 -0
- package/dist/editors/service-offering-editor/components/TierPricingOptionsPanel.js +3 -3
- package/dist/editors/service-offering-editor/components/pricing-utils.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/pricing-utils.js +26 -7
- package/dist/editors/service-offering-editor/editor.css +119 -0
- package/dist/editors/subscription-instance-editor/components/BillingPanel.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/BillingPanel.js +4 -4
- package/dist/editors/subscription-instance-editor/components/CustomerInfo.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/CustomerInfo.js +3 -2
- package/dist/editors/subscription-instance-editor/components/ImportServiceConfigButton.d.ts +3 -0
- package/dist/editors/subscription-instance-editor/components/ImportServiceConfigButton.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/ImportServiceConfigButton.js +12 -0
- package/dist/editors/subscription-instance-editor/components/MetricActions.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/MetricActions.js +4 -2
- package/dist/editors/subscription-instance-editor/components/MockDataButton.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/MockDataButton.js +214 -2
- package/dist/editors/subscription-instance-editor/components/OperatorNotes.js +1 -1
- package/dist/editors/subscription-instance-editor/components/ServicesPanel.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/ServicesPanel.js +9 -20
- package/dist/editors/subscription-instance-editor/components/SubscriptionActions.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/SubscriptionActions.js +8 -9
- package/dist/editors/subscription-instance-editor/components/SubscriptionHeader.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/SubscriptionHeader.js +1 -1
- package/dist/editors/subscription-instance-editor/components/billing-utils.d.ts +14 -6
- package/dist/editors/subscription-instance-editor/components/billing-utils.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/billing-utils.js +19 -23
- package/dist/editors/subscription-instance-editor/components/mapOfferingToSubscription.d.ts +16 -2
- package/dist/editors/subscription-instance-editor/components/mapOfferingToSubscription.d.ts.map +1 -1
- package/dist/editors/subscription-instance-editor/components/mapOfferingToSubscription.js +155 -6
- package/dist/powerhouse.manifest.json +29 -3
- package/dist/style.css +14 -0
- package/dist/subgraphs/resources-services/resolvers.d.ts +2 -2
- package/dist/subgraphs/resources-services/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/resources-services/resolvers.js +301 -215
- package/package.json +24 -19
- package/dist/document-models/facet/gen/schema/types.d.ts +0 -195
- package/dist/document-models/facet/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/facet/gen/schema/types.js +0 -1
- package/dist/document-models/facet/gen/schema/zod.d.ts +0 -18
- package/dist/document-models/facet/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/facet/gen/schema/zod.js +0 -69
- package/dist/document-models/resource-instance/gen/schema/types.d.ts +0 -272
- package/dist/document-models/resource-instance/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/resource-instance/gen/schema/types.js +0 -1
- package/dist/document-models/resource-instance/gen/schema/zod.d.ts +0 -43
- package/dist/document-models/resource-instance/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/resource-instance/gen/schema/zod.js +0 -185
- package/dist/document-models/resource-template/gen/schema/types.d.ts +0 -371
- package/dist/document-models/resource-template/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/resource-template/gen/schema/types.js +0 -1
- package/dist/document-models/resource-template/gen/schema/zod.d.ts +0 -52
- package/dist/document-models/resource-template/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/resource-template/gen/schema/zod.js +0 -312
- package/dist/document-models/service-offering/gen/schema/types.d.ts +0 -451
- package/dist/document-models/service-offering/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/service-offering/gen/schema/types.js +0 -1
- package/dist/document-models/service-offering/gen/schema/zod.d.ts +0 -89
- package/dist/document-models/service-offering/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/service-offering/gen/schema/zod.js +0 -419
- package/dist/document-models/subscription-instance/gen/schema/types.d.ts +0 -435
- package/dist/document-models/subscription-instance/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/subscription-instance/gen/schema/types.js +0 -1
- package/dist/document-models/subscription-instance/gen/schema/zod.d.ts +0 -99
- package/dist/document-models/subscription-instance/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/subscription-instance/gen/schema/zod.js +0 -410
|
@@ -6,7 +6,7 @@ export const documentModel = {
|
|
|
6
6
|
website: "https://www.powerhouse.inc/",
|
|
7
7
|
},
|
|
8
8
|
extension: "",
|
|
9
|
-
description: "Document model for resource templates
|
|
9
|
+
description: "Document model for defining resource templates - the product-level configuration for service offerings. Contains core product information, target audiences, facet configurations, and service definitions that can be commercialized via Service Offerings.",
|
|
10
10
|
specifications: [
|
|
11
11
|
{
|
|
12
12
|
state: {
|
|
@@ -16,24 +16,24 @@ export const documentModel = {
|
|
|
16
16
|
initialValue: "",
|
|
17
17
|
},
|
|
18
18
|
global: {
|
|
19
|
-
schema: "type ResourceTemplateState {\n id: PHID
|
|
19
|
+
schema: "type ResourceTemplateState {\n id: PHID\n operatorId: PHID\n title: String!\n summary: String!\n description: String\n thumbnailUrl: URL\n infoLink: URL\n status: TemplateStatus!\n lastModified: DateTime\n targetAudiences: [TargetAudience!]!\n setupServices: [String!]!\n recurringServices: [String!]!\n facetTargets: [FacetTarget!]!\n services: [Service!]!\n optionGroups: [OptionGroup!]!\n faqFields: [FaqField!]\n contentSections: [ContentSection!]!\n}\n\nenum TemplateStatus {\n DRAFT\n COMING_SOON\n ACTIVE\n DEPRECATED\n}\n\ntype TargetAudience {\n id: OID!\n label: String!\n color: String\n}\n\ntype FacetTarget {\n id: OID!\n categoryKey: String!\n categoryLabel: String!\n selectedOptions: [String!]!\n}\n\ntype Service {\n id: OID!\n title: String!\n description: String\n displayOrder: Int\n parentServiceId: OID\n isSetupFormation: Boolean!\n optionGroupId: OID\n facetBindings: [ResourceFacetBinding!]!\n}\n\ntype ResourceFacetBinding {\n id: OID!\n facetName: String!\n facetType: PHID!\n supportedOptions: [OID!]!\n}\n\ntype OptionGroup {\n id: OID!\n name: String!\n description: String\n isAddOn: Boolean!\n defaultSelected: Boolean!\n}\n\ntype FaqField {\n id: OID!\n question: String\n answer: String\n displayOrder: Int!\n}\n\ntype ContentSection {\n id: OID!\n title: String!\n content: String!\n displayOrder: Int!\n}",
|
|
20
20
|
examples: [],
|
|
21
|
-
initialValue: '{"id": "
|
|
21
|
+
initialValue: '{\n "id": null,\n "operatorId": null,\n "title": "",\n "summary": "",\n "description": null,\n "thumbnailUrl": null,\n "infoLink": null,\n "status": "DRAFT",\n "lastModified": null,\n "targetAudiences": [],\n "setupServices": [],\n "recurringServices": [],\n "facetTargets": [],\n "services": [],\n "optionGroups": [],\n "faqFields": [],\n "contentSections": []\n}',
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
modules: [
|
|
25
25
|
{
|
|
26
26
|
id: "template-management",
|
|
27
27
|
name: "Template Management",
|
|
28
|
-
description: "Operations for managing template metadata",
|
|
28
|
+
description: "Operations for managing resource template metadata",
|
|
29
29
|
operations: [
|
|
30
30
|
{
|
|
31
31
|
id: "update-template-info",
|
|
32
32
|
name: "UPDATE_TEMPLATE_INFO",
|
|
33
|
-
description: "Updates template
|
|
33
|
+
description: "Updates template title, summary, description and links",
|
|
34
34
|
schema: "input UpdateTemplateInfoInput {\n title: String\n summary: String\n description: String\n thumbnailUrl: URL\n infoLink: URL\n lastModified: DateTime!\n}",
|
|
35
35
|
template: "Updates template info",
|
|
36
|
-
reducer: "if (action.input.title) state.title = action.input.title;\nif (action.input.summary) state.summary = action.input.summary;\nif (action.input.description !== undefined) state.description = action.input.description || null;\nif (action.input.thumbnailUrl !== undefined) state.thumbnailUrl = action.input.thumbnailUrl || null;\nif (action.input.infoLink !== undefined) state.infoLink = action.input.infoLink || null;\nstate.lastModified = action.input.lastModified;",
|
|
36
|
+
reducer: "if (action.input.title) {\n state.title = action.input.title;\n}\nif (action.input.summary) {\n state.summary = action.input.summary;\n}\nif (action.input.description !== undefined) {\n state.description = action.input.description || null;\n}\nif (action.input.thumbnailUrl !== undefined) {\n state.thumbnailUrl = action.input.thumbnailUrl || null;\n}\nif (action.input.infoLink !== undefined) {\n state.infoLink = action.input.infoLink || null;\n}\nstate.lastModified = action.input.lastModified;",
|
|
37
37
|
errors: [],
|
|
38
38
|
examples: [],
|
|
39
39
|
scope: "global",
|
|
@@ -41,9 +41,9 @@ export const documentModel = {
|
|
|
41
41
|
{
|
|
42
42
|
id: "update-template-status",
|
|
43
43
|
name: "UPDATE_TEMPLATE_STATUS",
|
|
44
|
-
description: "Updates template status",
|
|
44
|
+
description: "Updates the template status",
|
|
45
45
|
schema: "input UpdateTemplateStatusInput {\n status: TemplateStatus!\n lastModified: DateTime!\n}",
|
|
46
|
-
template: "Updates template status",
|
|
46
|
+
template: "Updates the template status",
|
|
47
47
|
reducer: "state.status = action.input.status;\nstate.lastModified = action.input.lastModified;",
|
|
48
48
|
errors: [],
|
|
49
49
|
examples: [],
|
|
@@ -52,9 +52,9 @@ export const documentModel = {
|
|
|
52
52
|
{
|
|
53
53
|
id: "set-operator",
|
|
54
54
|
name: "SET_OPERATOR",
|
|
55
|
-
description: "Sets the operator",
|
|
55
|
+
description: "Sets the operator for this template",
|
|
56
56
|
schema: "input SetOperatorInput {\n operatorId: PHID!\n lastModified: DateTime!\n}",
|
|
57
|
-
template: "Sets the operator",
|
|
57
|
+
template: "Sets the operator for this template",
|
|
58
58
|
reducer: "state.operatorId = action.input.operatorId;\nstate.lastModified = action.input.lastModified;",
|
|
59
59
|
errors: [],
|
|
60
60
|
examples: [],
|
|
@@ -63,7 +63,7 @@ export const documentModel = {
|
|
|
63
63
|
{
|
|
64
64
|
id: "set-template-id",
|
|
65
65
|
name: "SET_TEMPLATE_ID",
|
|
66
|
-
description: "Sets the template
|
|
66
|
+
description: "Sets the template identifier",
|
|
67
67
|
schema: "input SetTemplateIdInput {\n id: PHID!\n lastModified: DateTime!\n}",
|
|
68
68
|
template: "Sets the template ID",
|
|
69
69
|
reducer: "state.id = action.input.id;\nstate.lastModified = action.input.lastModified;",
|
|
@@ -84,8 +84,16 @@ export const documentModel = {
|
|
|
84
84
|
description: "Adds a target audience",
|
|
85
85
|
schema: "input AddTargetAudienceInput {\n id: OID!\n label: String!\n color: String\n lastModified: DateTime!\n}",
|
|
86
86
|
template: "Adds a target audience",
|
|
87
|
-
reducer: "state.targetAudiences.push({
|
|
88
|
-
errors: [
|
|
87
|
+
reducer: "state.targetAudiences.push({\n id: action.input.id,\n label: action.input.label,\n color: action.input.color || null\n});\nstate.lastModified = action.input.lastModified;",
|
|
88
|
+
errors: [
|
|
89
|
+
{
|
|
90
|
+
id: "duplicate-audience-id",
|
|
91
|
+
name: "DuplicateAudienceIdError",
|
|
92
|
+
code: "DUPLICATE_AUDIENCE_ID",
|
|
93
|
+
description: "An audience with this ID already exists",
|
|
94
|
+
template: "",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
89
97
|
examples: [],
|
|
90
98
|
scope: "global",
|
|
91
99
|
},
|
|
@@ -95,8 +103,16 @@ export const documentModel = {
|
|
|
95
103
|
description: "Removes a target audience",
|
|
96
104
|
schema: "input RemoveTargetAudienceInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
97
105
|
template: "Removes a target audience",
|
|
98
|
-
reducer: "const audienceIndex = state.targetAudiences.findIndex(a => a.id === action.input.id);\nif (audienceIndex !== -1) {
|
|
99
|
-
errors: [
|
|
106
|
+
reducer: "const audienceIndex = state.targetAudiences.findIndex(a => a.id === action.input.id);\nif (audienceIndex !== -1) {\n state.targetAudiences.splice(audienceIndex, 1);\n}\nstate.lastModified = action.input.lastModified;",
|
|
107
|
+
errors: [
|
|
108
|
+
{
|
|
109
|
+
id: "audience-not-found",
|
|
110
|
+
name: "AudienceNotFoundError",
|
|
111
|
+
code: "AUDIENCE_NOT_FOUND",
|
|
112
|
+
description: "Audience with the specified ID does not exist",
|
|
113
|
+
template: "",
|
|
114
|
+
},
|
|
115
|
+
],
|
|
100
116
|
examples: [],
|
|
101
117
|
scope: "global",
|
|
102
118
|
},
|
|
@@ -105,15 +121,15 @@ export const documentModel = {
|
|
|
105
121
|
{
|
|
106
122
|
id: "facet-targeting",
|
|
107
123
|
name: "Facet Targeting",
|
|
108
|
-
description: "Operations for managing facet
|
|
124
|
+
description: "Operations for managing facet targeting",
|
|
109
125
|
operations: [
|
|
110
126
|
{
|
|
111
127
|
id: "set-facet-target",
|
|
112
128
|
name: "SET_FACET_TARGET",
|
|
113
|
-
description: "Sets a facet target",
|
|
129
|
+
description: "Sets or updates a facet target configuration",
|
|
114
130
|
schema: "input SetFacetTargetInput {\n id: OID!\n categoryKey: String!\n categoryLabel: String!\n selectedOptions: [String!]!\n lastModified: DateTime!\n}",
|
|
115
131
|
template: "Sets a facet target",
|
|
116
|
-
reducer: "const existingIndex = state.facetTargets.findIndex(ft => ft.categoryKey === action.input.categoryKey);\nif (existingIndex !== -1) {\n state.facetTargets[existingIndex] = {
|
|
132
|
+
reducer: "const existingIndex = state.facetTargets.findIndex(ft => ft.categoryKey === action.input.categoryKey);\nif (existingIndex !== -1) {\n state.facetTargets[existingIndex] = {\n id: action.input.id,\n categoryKey: action.input.categoryKey,\n categoryLabel: action.input.categoryLabel,\n selectedOptions: action.input.selectedOptions\n };\n} else {\n state.facetTargets.push({\n id: action.input.id,\n categoryKey: action.input.categoryKey,\n categoryLabel: action.input.categoryLabel,\n selectedOptions: action.input.selectedOptions\n });\n}\nstate.lastModified = action.input.lastModified;",
|
|
117
133
|
errors: [],
|
|
118
134
|
examples: [],
|
|
119
135
|
scope: "global",
|
|
@@ -121,11 +137,19 @@ export const documentModel = {
|
|
|
121
137
|
{
|
|
122
138
|
id: "remove-facet-target",
|
|
123
139
|
name: "REMOVE_FACET_TARGET",
|
|
124
|
-
description: "Removes a facet target",
|
|
140
|
+
description: "Removes a facet target configuration",
|
|
125
141
|
schema: "input RemoveFacetTargetInput {\n categoryKey: String!\n lastModified: DateTime!\n}",
|
|
126
142
|
template: "Removes a facet target",
|
|
127
|
-
reducer: "const facetIndex = state.facetTargets.findIndex(ft => ft.categoryKey === action.input.categoryKey);\nif (facetIndex !== -1) {
|
|
128
|
-
errors: [
|
|
143
|
+
reducer: "const facetIndex = state.facetTargets.findIndex(ft => ft.categoryKey === action.input.categoryKey);\nif (facetIndex !== -1) {\n state.facetTargets.splice(facetIndex, 1);\n}\nstate.lastModified = action.input.lastModified;",
|
|
144
|
+
errors: [
|
|
145
|
+
{
|
|
146
|
+
id: "facet-target-not-found",
|
|
147
|
+
name: "FacetTargetNotFoundError",
|
|
148
|
+
code: "FACET_TARGET_NOT_FOUND",
|
|
149
|
+
description: "Facet target with the specified category key does not exist",
|
|
150
|
+
template: "",
|
|
151
|
+
},
|
|
152
|
+
],
|
|
129
153
|
examples: [],
|
|
130
154
|
scope: "global",
|
|
131
155
|
},
|
|
@@ -136,7 +160,15 @@ export const documentModel = {
|
|
|
136
160
|
schema: "input AddFacetOptionInput {\n categoryKey: String!\n optionId: String!\n lastModified: DateTime!\n}",
|
|
137
161
|
template: "Adds an option to a facet target",
|
|
138
162
|
reducer: "const facetTarget = state.facetTargets.find(ft => ft.categoryKey === action.input.categoryKey);\nif (facetTarget && !facetTarget.selectedOptions.includes(action.input.optionId)) {\n facetTarget.selectedOptions.push(action.input.optionId);\n}\nstate.lastModified = action.input.lastModified;",
|
|
139
|
-
errors: [
|
|
163
|
+
errors: [
|
|
164
|
+
{
|
|
165
|
+
id: "facet-target-not-found-add",
|
|
166
|
+
name: "AddFacetOptionTargetNotFoundError",
|
|
167
|
+
code: "ADD_FACET_OPTION_TARGET_NOT_FOUND",
|
|
168
|
+
description: "Facet target with the specified category key does not exist",
|
|
169
|
+
template: "",
|
|
170
|
+
},
|
|
171
|
+
],
|
|
140
172
|
examples: [],
|
|
141
173
|
scope: "global",
|
|
142
174
|
},
|
|
@@ -146,8 +178,16 @@ export const documentModel = {
|
|
|
146
178
|
description: "Removes an option from a facet target",
|
|
147
179
|
schema: "input RemoveFacetOptionInput {\n categoryKey: String!\n optionId: String!\n lastModified: DateTime!\n}",
|
|
148
180
|
template: "Removes an option from a facet target",
|
|
149
|
-
reducer: "const facetTarget = state.facetTargets.find(ft => ft.categoryKey === action.input.categoryKey);\nif (facetTarget) {\n const optionIndex = facetTarget.selectedOptions.indexOf(action.input.optionId);\n if (optionIndex !== -1) {
|
|
150
|
-
errors: [
|
|
181
|
+
reducer: "const facetTarget = state.facetTargets.find(ft => ft.categoryKey === action.input.categoryKey);\nif (facetTarget) {\n const optionIndex = facetTarget.selectedOptions.indexOf(action.input.optionId);\n if (optionIndex !== -1) {\n facetTarget.selectedOptions.splice(optionIndex, 1);\n }\n}\nstate.lastModified = action.input.lastModified;",
|
|
182
|
+
errors: [
|
|
183
|
+
{
|
|
184
|
+
id: "facet-target-not-found-remove",
|
|
185
|
+
name: "RemoveFacetOptionTargetNotFoundError",
|
|
186
|
+
code: "REMOVE_FACET_OPTION_TARGET_NOT_FOUND",
|
|
187
|
+
description: "Facet target with the specified category key does not exist",
|
|
188
|
+
template: "",
|
|
189
|
+
},
|
|
190
|
+
],
|
|
151
191
|
examples: [],
|
|
152
192
|
scope: "global",
|
|
153
193
|
},
|
|
@@ -156,14 +196,14 @@ export const documentModel = {
|
|
|
156
196
|
{
|
|
157
197
|
id: "service-category-management",
|
|
158
198
|
name: "Service Category Management",
|
|
159
|
-
description: "Operations for managing
|
|
199
|
+
description: "Operations for managing service categories",
|
|
160
200
|
operations: [
|
|
161
201
|
{
|
|
162
202
|
id: "set-setup-services",
|
|
163
203
|
name: "SET_SETUP_SERVICES",
|
|
164
|
-
description: "Sets setup service labels",
|
|
204
|
+
description: "Sets the setup service category labels",
|
|
165
205
|
schema: "input SetSetupServicesInput {\n services: [String!]!\n lastModified: DateTime!\n}",
|
|
166
|
-
template: "Sets setup
|
|
206
|
+
template: "Sets the setup services",
|
|
167
207
|
reducer: "state.setupServices = action.input.services;\nstate.lastModified = action.input.lastModified;",
|
|
168
208
|
errors: [],
|
|
169
209
|
examples: [],
|
|
@@ -172,9 +212,9 @@ export const documentModel = {
|
|
|
172
212
|
{
|
|
173
213
|
id: "set-recurring-services",
|
|
174
214
|
name: "SET_RECURRING_SERVICES",
|
|
175
|
-
description: "Sets recurring service labels",
|
|
215
|
+
description: "Sets the recurring service category labels",
|
|
176
216
|
schema: "input SetRecurringServicesInput {\n services: [String!]!\n lastModified: DateTime!\n}",
|
|
177
|
-
template: "Sets recurring
|
|
217
|
+
template: "Sets the recurring services",
|
|
178
218
|
reducer: "state.recurringServices = action.input.services;\nstate.lastModified = action.input.lastModified;",
|
|
179
219
|
errors: [],
|
|
180
220
|
examples: [],
|
|
@@ -185,38 +225,62 @@ export const documentModel = {
|
|
|
185
225
|
{
|
|
186
226
|
id: "service-management",
|
|
187
227
|
name: "Service Management",
|
|
188
|
-
description: "Operations for managing services
|
|
228
|
+
description: "Operations for managing services in the template",
|
|
189
229
|
operations: [
|
|
190
230
|
{
|
|
191
231
|
id: "add-service",
|
|
192
232
|
name: "ADD_SERVICE",
|
|
193
|
-
description: "Adds a service",
|
|
233
|
+
description: "Adds a new service to the template",
|
|
194
234
|
schema: "input AddServiceInput {\n id: OID!\n title: String!\n description: String\n parentServiceId: OID\n displayOrder: Int\n isSetupFormation: Boolean\n optionGroupId: OID\n lastModified: DateTime!\n}",
|
|
195
|
-
template: "Adds a service",
|
|
196
|
-
reducer: "state.services.push({
|
|
197
|
-
errors: [
|
|
235
|
+
template: "Adds a new service to the template",
|
|
236
|
+
reducer: "state.services.push({\n id: action.input.id,\n title: action.input.title,\n description: action.input.description || null,\n parentServiceId: action.input.parentServiceId || null,\n displayOrder: action.input.displayOrder || null,\n isSetupFormation: action.input.isSetupFormation || false,\n optionGroupId: action.input.optionGroupId || null,\n facetBindings: []\n});\nstate.lastModified = action.input.lastModified;",
|
|
237
|
+
errors: [
|
|
238
|
+
{
|
|
239
|
+
id: "duplicate-service-id",
|
|
240
|
+
name: "DuplicateServiceIdError",
|
|
241
|
+
code: "DUPLICATE_SERVICE_ID",
|
|
242
|
+
description: "A service with this ID already exists",
|
|
243
|
+
template: "",
|
|
244
|
+
},
|
|
245
|
+
],
|
|
198
246
|
examples: [],
|
|
199
247
|
scope: "global",
|
|
200
248
|
},
|
|
201
249
|
{
|
|
202
250
|
id: "update-service",
|
|
203
251
|
name: "UPDATE_SERVICE",
|
|
204
|
-
description: "Updates
|
|
252
|
+
description: "Updates an existing service",
|
|
205
253
|
schema: "input UpdateServiceInput {\n id: OID!\n title: String\n description: String\n parentServiceId: OID\n displayOrder: Int\n isSetupFormation: Boolean\n optionGroupId: OID\n lastModified: DateTime!\n}",
|
|
206
|
-
template: "Updates
|
|
207
|
-
reducer: "const service = state.services.find(s => s.id === action.input.id);\nif (service) {\n if (action.input.title) service.title = action.input.title;\n if (action.input.description !== undefined && action.input.description !== null) service.description = action.input.description;\n if (action.input.parentServiceId !== undefined) service.parentServiceId = action.input.parentServiceId || null;\n if (action.input.displayOrder !== undefined && action.input.displayOrder !== null) service.displayOrder = action.input.displayOrder;\n if (action.input.isSetupFormation !== undefined && action.input.isSetupFormation !== null) service.isSetupFormation = action.input.isSetupFormation;\n if (action.input.optionGroupId !== undefined) service.optionGroupId = action.input.optionGroupId || null;\n}\nstate.lastModified = action.input.lastModified;",
|
|
208
|
-
errors: [
|
|
254
|
+
template: "Updates an existing service",
|
|
255
|
+
reducer: "const service = state.services.find(s => s.id === action.input.id);\nif (service) {\n if (action.input.title) {\n service.title = action.input.title;\n }\n if (action.input.description !== undefined && action.input.description !== null) {\n service.description = action.input.description;\n }\n if (action.input.parentServiceId !== undefined) {\n service.parentServiceId = action.input.parentServiceId || null;\n }\n if (action.input.displayOrder !== undefined && action.input.displayOrder !== null) {\n service.displayOrder = action.input.displayOrder;\n }\n if (action.input.isSetupFormation !== undefined && action.input.isSetupFormation !== null) {\n service.isSetupFormation = action.input.isSetupFormation;\n }\n if (action.input.optionGroupId !== undefined) {\n service.optionGroupId = action.input.optionGroupId || null;\n }\n}\nstate.lastModified = action.input.lastModified;",
|
|
256
|
+
errors: [
|
|
257
|
+
{
|
|
258
|
+
id: "service-not-found",
|
|
259
|
+
name: "UpdateServiceNotFoundError",
|
|
260
|
+
code: "UPDATE_SERVICE_NOT_FOUND",
|
|
261
|
+
description: "Service with the specified ID does not exist",
|
|
262
|
+
template: "",
|
|
263
|
+
},
|
|
264
|
+
],
|
|
209
265
|
examples: [],
|
|
210
266
|
scope: "global",
|
|
211
267
|
},
|
|
212
268
|
{
|
|
213
269
|
id: "delete-service",
|
|
214
270
|
name: "DELETE_SERVICE",
|
|
215
|
-
description: "
|
|
271
|
+
description: "Removes a service from the template",
|
|
216
272
|
schema: "input DeleteServiceInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
217
|
-
template: "
|
|
218
|
-
reducer: "const serviceIndex = state.services.findIndex(s => s.id === action.input.id);\nif (serviceIndex !== -1) {
|
|
219
|
-
errors: [
|
|
273
|
+
template: "Removes a service from the template",
|
|
274
|
+
reducer: "const serviceIndex = state.services.findIndex(s => s.id === action.input.id);\nif (serviceIndex !== -1) {\n state.services.splice(serviceIndex, 1);\n}\nstate.lastModified = action.input.lastModified;",
|
|
275
|
+
errors: [
|
|
276
|
+
{
|
|
277
|
+
id: "service-not-found-delete",
|
|
278
|
+
name: "DeleteServiceNotFoundError",
|
|
279
|
+
code: "DELETE_SERVICE_NOT_FOUND",
|
|
280
|
+
description: "Service with the specified ID does not exist",
|
|
281
|
+
template: "",
|
|
282
|
+
},
|
|
283
|
+
],
|
|
220
284
|
examples: [],
|
|
221
285
|
scope: "global",
|
|
222
286
|
},
|
|
@@ -226,8 +290,23 @@ export const documentModel = {
|
|
|
226
290
|
description: "Adds a facet binding to a service",
|
|
227
291
|
schema: "input AddFacetBindingInput {\n serviceId: OID!\n bindingId: OID!\n facetName: String!\n facetType: PHID!\n supportedOptions: [OID!]!\n lastModified: DateTime!\n}",
|
|
228
292
|
template: "Adds a facet binding to a service",
|
|
229
|
-
reducer: "const service = state.services.find(s => s.id === action.input.serviceId);\nif (service) {\n service.facetBindings.push({
|
|
230
|
-
errors: [
|
|
293
|
+
reducer: "const service = state.services.find(s => s.id === action.input.serviceId);\nif (service) {\n service.facetBindings.push({\n id: action.input.bindingId,\n facetName: action.input.facetName,\n facetType: action.input.facetType,\n supportedOptions: action.input.supportedOptions\n });\n}\nstate.lastModified = action.input.lastModified;",
|
|
294
|
+
errors: [
|
|
295
|
+
{
|
|
296
|
+
id: "service-not-found-facet",
|
|
297
|
+
name: "AddFacetServiceNotFoundError",
|
|
298
|
+
code: "ADD_FACET_SERVICE_NOT_FOUND",
|
|
299
|
+
description: "Service with the specified ID does not exist",
|
|
300
|
+
template: "",
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
id: "duplicate-binding-id",
|
|
304
|
+
name: "DuplicateBindingIdError",
|
|
305
|
+
code: "DUPLICATE_BINDING_ID",
|
|
306
|
+
description: "A facet binding with this ID already exists",
|
|
307
|
+
template: "",
|
|
308
|
+
},
|
|
309
|
+
],
|
|
231
310
|
examples: [],
|
|
232
311
|
scope: "global",
|
|
233
312
|
},
|
|
@@ -237,8 +316,23 @@ export const documentModel = {
|
|
|
237
316
|
description: "Removes a facet binding from a service",
|
|
238
317
|
schema: "input RemoveFacetBindingInput {\n serviceId: OID!\n bindingId: OID!\n lastModified: DateTime!\n}",
|
|
239
318
|
template: "Removes a facet binding from a service",
|
|
240
|
-
reducer: "const service = state.services.find(s => s.id === action.input.serviceId);\nif (service) {\n const bindingIndex = service.facetBindings.findIndex(fb => fb.id === action.input.bindingId);\n if (bindingIndex !== -1) {
|
|
241
|
-
errors: [
|
|
319
|
+
reducer: "const service = state.services.find(s => s.id === action.input.serviceId);\nif (service) {\n const bindingIndex = service.facetBindings.findIndex(fb => fb.id === action.input.bindingId);\n if (bindingIndex !== -1) {\n service.facetBindings.splice(bindingIndex, 1);\n }\n}\nstate.lastModified = action.input.lastModified;",
|
|
320
|
+
errors: [
|
|
321
|
+
{
|
|
322
|
+
id: "service-not-found-remove-binding",
|
|
323
|
+
name: "RemoveFacetServiceNotFoundError",
|
|
324
|
+
code: "REMOVE_FACET_SERVICE_NOT_FOUND",
|
|
325
|
+
description: "Service with the specified ID does not exist",
|
|
326
|
+
template: "",
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "binding-not-found",
|
|
330
|
+
name: "BindingNotFoundError",
|
|
331
|
+
code: "BINDING_NOT_FOUND",
|
|
332
|
+
description: "Facet binding with the specified ID does not exist",
|
|
333
|
+
template: "",
|
|
334
|
+
},
|
|
335
|
+
],
|
|
242
336
|
examples: [],
|
|
243
337
|
scope: "global",
|
|
244
338
|
},
|
|
@@ -247,70 +341,94 @@ export const documentModel = {
|
|
|
247
341
|
{
|
|
248
342
|
id: "option-group-management",
|
|
249
343
|
name: "Option Group Management",
|
|
250
|
-
description: "Operations for managing option groups
|
|
344
|
+
description: "Operations for managing option groups",
|
|
251
345
|
operations: [
|
|
252
346
|
{
|
|
253
347
|
id: "add-option-group",
|
|
254
348
|
name: "ADD_OPTION_GROUP",
|
|
255
|
-
description: "Adds
|
|
349
|
+
description: "Adds a new option group",
|
|
256
350
|
schema: "input AddOptionGroupInput {\n id: OID!\n name: String!\n description: String\n isAddOn: Boolean!\n defaultSelected: Boolean!\n lastModified: DateTime!\n}",
|
|
257
|
-
template: "Adds
|
|
258
|
-
reducer: "state.optionGroups.push({
|
|
259
|
-
errors: [
|
|
351
|
+
template: "Adds a new option group",
|
|
352
|
+
reducer: "state.optionGroups.push({\n id: action.input.id,\n name: action.input.name,\n description: action.input.description || null,\n isAddOn: action.input.isAddOn,\n defaultSelected: action.input.defaultSelected\n});\nstate.lastModified = action.input.lastModified;",
|
|
353
|
+
errors: [
|
|
354
|
+
{
|
|
355
|
+
id: "duplicate-option-group-id",
|
|
356
|
+
name: "DuplicateOptionGroupIdError",
|
|
357
|
+
code: "DUPLICATE_OPTION_GROUP_ID",
|
|
358
|
+
description: "An option group with this ID already exists",
|
|
359
|
+
template: "",
|
|
360
|
+
},
|
|
361
|
+
],
|
|
260
362
|
examples: [],
|
|
261
363
|
scope: "global",
|
|
262
364
|
},
|
|
263
365
|
{
|
|
264
366
|
id: "update-option-group",
|
|
265
367
|
name: "UPDATE_OPTION_GROUP",
|
|
266
|
-
description: "Updates an option group",
|
|
368
|
+
description: "Updates an existing option group",
|
|
267
369
|
schema: "input UpdateOptionGroupInput {\n id: OID!\n name: String\n description: String\n isAddOn: Boolean\n defaultSelected: Boolean\n lastModified: DateTime!\n}",
|
|
268
|
-
template: "Updates an option group",
|
|
269
|
-
reducer: "const optionGroup = state.optionGroups.find(og => og.id === action.input.id);\nif (optionGroup) {\n if (action.input.name) optionGroup.name = action.input.name;\n if (action.input.description !== undefined) optionGroup.description = action.input.description || null;\n if (action.input.isAddOn !== undefined && action.input.isAddOn !== null) optionGroup.isAddOn = action.input.isAddOn;\n if (action.input.defaultSelected !== undefined && action.input.defaultSelected !== null) optionGroup.defaultSelected = action.input.defaultSelected;\n}\nstate.lastModified = action.input.lastModified;",
|
|
270
|
-
errors: [
|
|
370
|
+
template: "Updates an existing option group",
|
|
371
|
+
reducer: "const optionGroup = state.optionGroups.find(og => og.id === action.input.id);\nif (optionGroup) {\n if (action.input.name) {\n optionGroup.name = action.input.name;\n }\n if (action.input.description !== undefined) {\n optionGroup.description = action.input.description || null;\n }\n if (action.input.isAddOn !== undefined && action.input.isAddOn !== null) {\n optionGroup.isAddOn = action.input.isAddOn;\n }\n if (action.input.defaultSelected !== undefined && action.input.defaultSelected !== null) {\n optionGroup.defaultSelected = action.input.defaultSelected;\n }\n}\nstate.lastModified = action.input.lastModified;",
|
|
372
|
+
errors: [
|
|
373
|
+
{
|
|
374
|
+
id: "option-group-not-found",
|
|
375
|
+
name: "UpdateOptionGroupNotFoundError",
|
|
376
|
+
code: "UPDATE_OPTION_GROUP_NOT_FOUND",
|
|
377
|
+
description: "Option group with the specified ID does not exist",
|
|
378
|
+
template: "",
|
|
379
|
+
},
|
|
380
|
+
],
|
|
271
381
|
examples: [],
|
|
272
382
|
scope: "global",
|
|
273
383
|
},
|
|
274
384
|
{
|
|
275
385
|
id: "delete-option-group",
|
|
276
386
|
name: "DELETE_OPTION_GROUP",
|
|
277
|
-
description: "
|
|
387
|
+
description: "Removes an option group from the template",
|
|
278
388
|
schema: "input DeleteOptionGroupInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
279
|
-
template: "
|
|
280
|
-
reducer: "const optionGroupIndex = state.optionGroups.findIndex(og => og.id === action.input.id);\nif (optionGroupIndex !== -1) {\n state.services.forEach(service => {
|
|
281
|
-
errors: [
|
|
389
|
+
template: "Removes an option group from the template",
|
|
390
|
+
reducer: "const optionGroupIndex = state.optionGroups.findIndex(og => og.id === action.input.id);\nif (optionGroupIndex !== -1) {\n state.services.forEach(service => {\n if (service.optionGroupId === action.input.id) {\n service.optionGroupId = null;\n }\n });\n state.optionGroups.splice(optionGroupIndex, 1);\n}\nstate.lastModified = action.input.lastModified;",
|
|
391
|
+
errors: [
|
|
392
|
+
{
|
|
393
|
+
id: "option-group-not-found-delete",
|
|
394
|
+
name: "DeleteOptionGroupNotFoundError",
|
|
395
|
+
code: "DELETE_OPTION_GROUP_NOT_FOUND",
|
|
396
|
+
description: "Option group with the specified ID does not exist",
|
|
397
|
+
template: "",
|
|
398
|
+
},
|
|
399
|
+
],
|
|
282
400
|
examples: [],
|
|
283
401
|
scope: "global",
|
|
284
402
|
},
|
|
285
403
|
{
|
|
286
|
-
id: "
|
|
404
|
+
id: "5383b824-c864-4062-a90e-f892d292a658",
|
|
287
405
|
name: "ADD_FAQ",
|
|
288
|
-
description: "
|
|
406
|
+
description: "",
|
|
289
407
|
schema: "input AddFaqInput {\n id: OID!\n question: String\n answer: String\n displayOrder: Int!\n}",
|
|
290
|
-
template: "
|
|
291
|
-
reducer: "state.faqFields.push({
|
|
408
|
+
template: "",
|
|
409
|
+
reducer: "if (!state.faqFields) {\n state.faqFields = [];\n}\nstate.faqFields.push({\n id: action.input.id,\n question: action.input.question || null,\n answer: action.input.answer || null,\n displayOrder: action.input.displayOrder\n});",
|
|
292
410
|
errors: [],
|
|
293
411
|
examples: [],
|
|
294
412
|
scope: "global",
|
|
295
413
|
},
|
|
296
414
|
{
|
|
297
|
-
id: "
|
|
415
|
+
id: "67866c99-6f74-49fa-a1df-0edcf6671baf",
|
|
298
416
|
name: "UPDATE_FAQ",
|
|
299
|
-
description: "
|
|
300
|
-
schema: "input UpdateFaqInput {\n
|
|
301
|
-
template: "
|
|
302
|
-
reducer: "
|
|
417
|
+
description: "",
|
|
418
|
+
schema: "input UpdateFaqInput {\n id: OID!\n question: String\n answer: String\n}",
|
|
419
|
+
template: "",
|
|
420
|
+
reducer: "",
|
|
303
421
|
errors: [],
|
|
304
422
|
examples: [],
|
|
305
423
|
scope: "global",
|
|
306
424
|
},
|
|
307
425
|
{
|
|
308
|
-
id: "
|
|
426
|
+
id: "aa7b2729-22b8-41f7-bc45-3825c1857668",
|
|
309
427
|
name: "DELETE_FAQ",
|
|
310
|
-
description: "
|
|
311
|
-
schema: "input DeleteFaqInput {\n
|
|
312
|
-
template: "
|
|
313
|
-
reducer: "
|
|
428
|
+
description: "",
|
|
429
|
+
schema: "input DeleteFaqInput {\n id:OID!\n}",
|
|
430
|
+
template: "",
|
|
431
|
+
reducer: "",
|
|
314
432
|
errors: [],
|
|
315
433
|
examples: [],
|
|
316
434
|
scope: "global",
|
|
@@ -318,10 +436,10 @@ export const documentModel = {
|
|
|
318
436
|
{
|
|
319
437
|
id: "reorder-faqs",
|
|
320
438
|
name: "REORDER_FAQS",
|
|
321
|
-
description: "Reorders FAQ
|
|
439
|
+
description: "Reorders FAQ items by updating their display order",
|
|
322
440
|
schema: "input ReorderFaqsInput {\n faqIds: [OID!]!\n lastModified: DateTime!\n}",
|
|
323
|
-
template: "Reorders FAQ
|
|
324
|
-
reducer: "action.input.faqIds.forEach((id, index) => {\n const faq = state.faqFields
|
|
441
|
+
template: "Reorders FAQ items by updating their display order",
|
|
442
|
+
reducer: "action.input.faqIds.forEach((id, index) => {\n const faq = state.faqFields?.find(f => f.id === id);\n if (faq) {\n faq.displayOrder = index;\n }\n});\nstate.lastModified = action.input.lastModified;",
|
|
325
443
|
errors: [],
|
|
326
444
|
examples: [],
|
|
327
445
|
scope: "global",
|
|
@@ -331,15 +449,15 @@ export const documentModel = {
|
|
|
331
449
|
{
|
|
332
450
|
id: "content-section-management",
|
|
333
451
|
name: "Content Section Management",
|
|
334
|
-
description: "Operations for managing expandable content sections",
|
|
452
|
+
description: "Operations for managing expandable content sections for long-form article content",
|
|
335
453
|
operations: [
|
|
336
454
|
{
|
|
337
455
|
id: "add-content-section",
|
|
338
456
|
name: "ADD_CONTENT_SECTION",
|
|
339
|
-
description: "Adds a content section",
|
|
457
|
+
description: "Adds a new expandable content section",
|
|
340
458
|
schema: "input AddContentSectionInput {\n id: OID!\n title: String!\n content: String!\n displayOrder: Int!\n lastModified: DateTime!\n}",
|
|
341
|
-
template: "Adds a content section",
|
|
342
|
-
reducer: "state.contentSections.push({
|
|
459
|
+
template: "Adds a new expandable content section",
|
|
460
|
+
reducer: "state.contentSections.push({\n id: action.input.id,\n title: action.input.title,\n content: action.input.content,\n displayOrder: action.input.displayOrder\n});\nstate.lastModified = action.input.lastModified;",
|
|
343
461
|
errors: [],
|
|
344
462
|
examples: [],
|
|
345
463
|
scope: "global",
|
|
@@ -347,10 +465,10 @@ export const documentModel = {
|
|
|
347
465
|
{
|
|
348
466
|
id: "update-content-section",
|
|
349
467
|
name: "UPDATE_CONTENT_SECTION",
|
|
350
|
-
description: "Updates
|
|
468
|
+
description: "Updates an existing content section",
|
|
351
469
|
schema: "input UpdateContentSectionInput {\n id: OID!\n title: String\n content: String\n displayOrder: Int\n lastModified: DateTime!\n}",
|
|
352
|
-
template: "Updates
|
|
353
|
-
reducer: "const section = state.contentSections.find(s => s.id === action.input.id);\nif (section) {\n if (action.input.title) section.title = action.input.title;\n if (action.input.content !== undefined && action.input.content !== null) section.content = action.input.content;\n if (action.input.displayOrder !== undefined && action.input.displayOrder !== null) section.displayOrder = action.input.displayOrder;\n}\nstate.lastModified = action.input.lastModified;",
|
|
470
|
+
template: "Updates an existing content section",
|
|
471
|
+
reducer: "const section = state.contentSections.find(s => s.id === action.input.id);\nif (section) {\n if (action.input.title) {\n section.title = action.input.title;\n }\n if (action.input.content !== undefined && action.input.content !== null) {\n section.content = action.input.content;\n }\n if (action.input.displayOrder !== undefined && action.input.displayOrder !== null) {\n section.displayOrder = action.input.displayOrder;\n }\n}\nstate.lastModified = action.input.lastModified;",
|
|
354
472
|
errors: [],
|
|
355
473
|
examples: [],
|
|
356
474
|
scope: "global",
|
|
@@ -358,10 +476,10 @@ export const documentModel = {
|
|
|
358
476
|
{
|
|
359
477
|
id: "delete-content-section",
|
|
360
478
|
name: "DELETE_CONTENT_SECTION",
|
|
361
|
-
description: "
|
|
479
|
+
description: "Removes a content section",
|
|
362
480
|
schema: "input DeleteContentSectionInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
363
|
-
template: "
|
|
364
|
-
reducer: "const sectionIndex = state.contentSections.findIndex(s => s.id === action.input.id);\nif (sectionIndex !== -1) {
|
|
481
|
+
template: "Removes a content section",
|
|
482
|
+
reducer: "const sectionIndex = state.contentSections.findIndex(s => s.id === action.input.id);\nif (sectionIndex !== -1) {\n state.contentSections.splice(sectionIndex, 1);\n}\nstate.lastModified = action.input.lastModified;",
|
|
365
483
|
errors: [],
|
|
366
484
|
examples: [],
|
|
367
485
|
scope: "global",
|
|
@@ -369,10 +487,10 @@ export const documentModel = {
|
|
|
369
487
|
{
|
|
370
488
|
id: "reorder-content-sections",
|
|
371
489
|
name: "REORDER_CONTENT_SECTIONS",
|
|
372
|
-
description: "Reorders content sections",
|
|
490
|
+
description: "Reorders content sections by updating their display order",
|
|
373
491
|
schema: "input ReorderContentSectionsInput {\n sectionIds: [OID!]!\n lastModified: DateTime!\n}",
|
|
374
|
-
template: "Reorders content sections",
|
|
375
|
-
reducer: "action.input.sectionIds.forEach((id, index) => {\n const section = state.contentSections.find(s => s.id === id);\n if (section) {
|
|
492
|
+
template: "Reorders content sections by updating their display order",
|
|
493
|
+
reducer: "action.input.sectionIds.forEach((id, index) => {\n const section = state.contentSections.find(s => s.id === id);\n if (section) {\n section.displayOrder = index;\n }\n});\nstate.lastModified = action.input.lastModified;",
|
|
376
494
|
errors: [],
|
|
377
495
|
examples: [],
|
|
378
496
|
scope: "global",
|