@powerhousedao/service-offering 1.0.0-dev.22 → 1.0.0-dev.24
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/resource-template/v1/actions.d.ts +1 -0
- package/dist/document-models/resource-template/v1/actions.d.ts.map +1 -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 +174 -163
- package/dist/document-models/resource-template/v1/gen/document-schema.d.ts +6 -0
- package/dist/document-models/resource-template/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/ph-factories.js +2 -0
- package/dist/document-models/resource-template/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/reducer.js +6 -1
- package/dist/document-models/resource-template/v1/gen/schema/types.d.ts +7 -0
- 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.d.ts +2 -1
- package/dist/document-models/resource-template/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/schema/zod.js +9 -0
- package/dist/document-models/resource-template/v1/gen/template-management/actions.d.ts +6 -2
- package/dist/document-models/resource-template/v1/gen/template-management/actions.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/template-management/creators.d.ts +3 -2
- package/dist/document-models/resource-template/v1/gen/template-management/creators.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/template-management/creators.js +2 -1
- package/dist/document-models/resource-template/v1/gen/template-management/operations.d.ts +2 -1
- package/dist/document-models/resource-template/v1/gen/template-management/operations.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/utils.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/gen/utils.js +2 -0
- package/dist/document-models/resource-template/v1/src/reducers/template-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/v1/src/reducers/template-management.js +7 -0
- package/dist/document-models/resource-template/v1/tests/template-management.test.js +11 -1
- package/dist/document-models/service-offering/v1/actions.d.ts +1 -0
- 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 +31 -5
- package/dist/document-models/service-offering/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/reducer.js +6 -1
- package/dist/document-models/service-offering/v1/gen/schema/types.d.ts +7 -0
- 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 +2 -1
- 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 +9 -0
- package/dist/document-models/service-offering/v1/gen/tiers/actions.d.ts +6 -2
- package/dist/document-models/service-offering/v1/gen/tiers/actions.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/tiers/creators.d.ts +3 -2
- package/dist/document-models/service-offering/v1/gen/tiers/creators.d.ts.map +1 -1
- package/dist/document-models/service-offering/v1/gen/tiers/creators.js +2 -1
- package/dist/document-models/service-offering/v1/gen/tiers/error.d.ts +13 -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 +13 -0
- package/dist/document-models/service-offering/v1/gen/tiers/operations.d.ts +2 -1
- package/dist/document-models/service-offering/v1/gen/tiers/operations.d.ts.map +1 -1
- 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 +24 -1
- package/dist/document-models/service-offering/v1/tests/tiers.test.js +11 -1
- package/dist/editors/resource-template-editor/components/TemplateInfo.d.ts.map +1 -1
- package/dist/editors/resource-template-editor/components/TemplateInfo.js +45 -3
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.js +2 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ServiceCatalog.js +4 -1
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/TheMatrix.js +9 -5
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/TierDefinition.js +25 -5
- package/dist/style.css +25 -0
- package/dist/subgraphs/resources-services/resolvers.js +4 -0
- package/dist/subgraphs/resources-services/schema.d.ts.map +1 -1
- package/dist/subgraphs/resources-services/schema.js +4 -0
- package/package.json +15 -15
|
@@ -16,486 +16,497 @@ export const documentModel = {
|
|
|
16
16
|
initialValue: "",
|
|
17
17
|
},
|
|
18
18
|
global: {
|
|
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}",
|
|
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 weight: Int\n subtitle: String\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: '{\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}',
|
|
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 "weight": null,\n "subtitle": null\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 resource template metadata",
|
|
29
28
|
operations: [
|
|
30
29
|
{
|
|
31
30
|
id: "update-template-info",
|
|
32
31
|
name: "UPDATE_TEMPLATE_INFO",
|
|
33
|
-
|
|
34
|
-
schema: "input UpdateTemplateInfoInput {\n title: String\n summary: String\n description: String\n thumbnailUrl: URL\n infoLink: URL\n lastModified: DateTime!\n}",
|
|
35
|
-
template: "Updates template info",
|
|
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;",
|
|
32
|
+
scope: "global",
|
|
37
33
|
errors: [],
|
|
34
|
+
schema: "input UpdateTemplateInfoInput {\n title: String\n summary: String\n description: String\n thumbnailUrl: URL\n infoLink: URL\n subtitle: String\n lastModified: DateTime!\n}",
|
|
35
|
+
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}\nif (action.input.subtitle !== undefined) {\n state.subtitle = action.input.subtitle || null;\n}\nstate.lastModified = action.input.lastModified;",
|
|
38
36
|
examples: [],
|
|
39
|
-
|
|
37
|
+
template: "Updates template info",
|
|
38
|
+
description: "Updates template title, summary, description and links",
|
|
40
39
|
},
|
|
41
40
|
{
|
|
42
41
|
id: "update-template-status",
|
|
43
42
|
name: "UPDATE_TEMPLATE_STATUS",
|
|
44
|
-
|
|
43
|
+
scope: "global",
|
|
44
|
+
errors: [],
|
|
45
45
|
schema: "input UpdateTemplateStatusInput {\n status: TemplateStatus!\n lastModified: DateTime!\n}",
|
|
46
|
-
template: "Updates the template status",
|
|
47
46
|
reducer: "state.status = action.input.status;\nstate.lastModified = action.input.lastModified;",
|
|
48
|
-
errors: [],
|
|
49
47
|
examples: [],
|
|
50
|
-
|
|
48
|
+
template: "Updates the template status",
|
|
49
|
+
description: "Updates the template status",
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
52
|
id: "set-operator",
|
|
54
53
|
name: "SET_OPERATOR",
|
|
55
|
-
|
|
54
|
+
scope: "global",
|
|
55
|
+
errors: [],
|
|
56
56
|
schema: "input SetOperatorInput {\n operatorId: PHID!\n lastModified: DateTime!\n}",
|
|
57
|
-
template: "Sets the operator for this template",
|
|
58
57
|
reducer: "state.operatorId = action.input.operatorId;\nstate.lastModified = action.input.lastModified;",
|
|
59
|
-
errors: [],
|
|
60
58
|
examples: [],
|
|
61
|
-
|
|
59
|
+
template: "Sets the operator for this template",
|
|
60
|
+
description: "Sets the operator for this template",
|
|
62
61
|
},
|
|
63
62
|
{
|
|
64
63
|
id: "set-template-id",
|
|
65
64
|
name: "SET_TEMPLATE_ID",
|
|
66
|
-
|
|
65
|
+
scope: "global",
|
|
66
|
+
errors: [],
|
|
67
67
|
schema: "input SetTemplateIdInput {\n id: PHID!\n lastModified: DateTime!\n}",
|
|
68
|
-
template: "Sets the template ID",
|
|
69
68
|
reducer: "state.id = action.input.id;\nstate.lastModified = action.input.lastModified;",
|
|
69
|
+
examples: [],
|
|
70
|
+
template: "Sets the template ID",
|
|
71
|
+
description: "Sets the template identifier",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "set-weight",
|
|
75
|
+
name: "SET_WEIGHT",
|
|
76
|
+
description: "Sets the catalog sorting weight for this template",
|
|
77
|
+
schema: "input SetWeightInput {\n weight: Int\n lastModified: DateTime!\n}",
|
|
78
|
+
template: "Set the weight for catalog sorting",
|
|
79
|
+
reducer: "state.weight = action.input.weight || null;\nstate.lastModified = action.input.lastModified;",
|
|
70
80
|
errors: [],
|
|
71
81
|
examples: [],
|
|
72
82
|
scope: "global",
|
|
73
83
|
},
|
|
74
84
|
],
|
|
85
|
+
description: "Operations for managing resource template metadata",
|
|
75
86
|
},
|
|
76
87
|
{
|
|
77
88
|
id: "audience-management",
|
|
78
89
|
name: "Audience Management",
|
|
79
|
-
description: "Operations for managing target audiences",
|
|
80
90
|
operations: [
|
|
81
91
|
{
|
|
82
92
|
id: "add-target-audience",
|
|
83
93
|
name: "ADD_TARGET_AUDIENCE",
|
|
84
|
-
|
|
85
|
-
schema: "input AddTargetAudienceInput {\n id: OID!\n label: String!\n color: String\n lastModified: DateTime!\n}",
|
|
86
|
-
template: "Adds a target audience",
|
|
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;",
|
|
94
|
+
scope: "global",
|
|
88
95
|
errors: [
|
|
89
96
|
{
|
|
90
97
|
id: "duplicate-audience-id",
|
|
91
|
-
name: "DuplicateAudienceIdError",
|
|
92
98
|
code: "DUPLICATE_AUDIENCE_ID",
|
|
93
|
-
|
|
99
|
+
name: "DuplicateAudienceIdError",
|
|
94
100
|
template: "",
|
|
101
|
+
description: "An audience with this ID already exists",
|
|
95
102
|
},
|
|
96
103
|
],
|
|
104
|
+
schema: "input AddTargetAudienceInput {\n id: OID!\n label: String!\n color: String\n lastModified: DateTime!\n}",
|
|
105
|
+
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;",
|
|
97
106
|
examples: [],
|
|
98
|
-
|
|
107
|
+
template: "Adds a target audience",
|
|
108
|
+
description: "Adds a target audience",
|
|
99
109
|
},
|
|
100
110
|
{
|
|
101
111
|
id: "remove-target-audience",
|
|
102
112
|
name: "REMOVE_TARGET_AUDIENCE",
|
|
103
|
-
|
|
104
|
-
schema: "input RemoveTargetAudienceInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
105
|
-
template: "Removes a target audience",
|
|
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;",
|
|
113
|
+
scope: "global",
|
|
107
114
|
errors: [
|
|
108
115
|
{
|
|
109
116
|
id: "audience-not-found",
|
|
110
|
-
name: "AudienceNotFoundError",
|
|
111
117
|
code: "AUDIENCE_NOT_FOUND",
|
|
112
|
-
|
|
118
|
+
name: "AudienceNotFoundError",
|
|
113
119
|
template: "",
|
|
120
|
+
description: "Audience with the specified ID does not exist",
|
|
114
121
|
},
|
|
115
122
|
],
|
|
123
|
+
schema: "input RemoveTargetAudienceInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
124
|
+
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;",
|
|
116
125
|
examples: [],
|
|
117
|
-
|
|
126
|
+
template: "Removes a target audience",
|
|
127
|
+
description: "Removes a target audience",
|
|
118
128
|
},
|
|
119
129
|
],
|
|
130
|
+
description: "Operations for managing target audiences",
|
|
120
131
|
},
|
|
121
132
|
{
|
|
122
133
|
id: "facet-targeting",
|
|
123
134
|
name: "Facet Targeting",
|
|
124
|
-
description: "Operations for managing facet targeting",
|
|
125
135
|
operations: [
|
|
126
136
|
{
|
|
127
137
|
id: "set-facet-target",
|
|
128
138
|
name: "SET_FACET_TARGET",
|
|
129
|
-
|
|
139
|
+
scope: "global",
|
|
140
|
+
errors: [],
|
|
130
141
|
schema: "input SetFacetTargetInput {\n id: OID!\n categoryKey: String!\n categoryLabel: String!\n selectedOptions: [String!]!\n lastModified: DateTime!\n}",
|
|
131
|
-
template: "Sets a facet target",
|
|
132
142
|
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;",
|
|
133
|
-
errors: [],
|
|
134
143
|
examples: [],
|
|
135
|
-
|
|
144
|
+
template: "Sets a facet target",
|
|
145
|
+
description: "Sets or updates a facet target configuration",
|
|
136
146
|
},
|
|
137
147
|
{
|
|
138
148
|
id: "remove-facet-target",
|
|
139
149
|
name: "REMOVE_FACET_TARGET",
|
|
140
|
-
|
|
141
|
-
schema: "input RemoveFacetTargetInput {\n categoryKey: String!\n lastModified: DateTime!\n}",
|
|
142
|
-
template: "Removes a facet target",
|
|
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;",
|
|
150
|
+
scope: "global",
|
|
144
151
|
errors: [
|
|
145
152
|
{
|
|
146
153
|
id: "facet-target-not-found",
|
|
147
|
-
name: "FacetTargetNotFoundError",
|
|
148
154
|
code: "FACET_TARGET_NOT_FOUND",
|
|
149
|
-
|
|
155
|
+
name: "FacetTargetNotFoundError",
|
|
150
156
|
template: "",
|
|
157
|
+
description: "Facet target with the specified category key does not exist",
|
|
151
158
|
},
|
|
152
159
|
],
|
|
160
|
+
schema: "input RemoveFacetTargetInput {\n categoryKey: String!\n lastModified: DateTime!\n}",
|
|
161
|
+
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;",
|
|
153
162
|
examples: [],
|
|
154
|
-
|
|
163
|
+
template: "Removes a facet target",
|
|
164
|
+
description: "Removes a facet target configuration",
|
|
155
165
|
},
|
|
156
166
|
{
|
|
157
167
|
id: "add-facet-option",
|
|
158
168
|
name: "ADD_FACET_OPTION",
|
|
159
|
-
|
|
160
|
-
schema: "input AddFacetOptionInput {\n categoryKey: String!\n optionId: String!\n lastModified: DateTime!\n}",
|
|
161
|
-
template: "Adds an option to a facet target",
|
|
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;",
|
|
169
|
+
scope: "global",
|
|
163
170
|
errors: [
|
|
164
171
|
{
|
|
165
172
|
id: "facet-target-not-found-add",
|
|
166
|
-
name: "AddFacetOptionTargetNotFoundError",
|
|
167
173
|
code: "ADD_FACET_OPTION_TARGET_NOT_FOUND",
|
|
168
|
-
|
|
174
|
+
name: "AddFacetOptionTargetNotFoundError",
|
|
169
175
|
template: "",
|
|
176
|
+
description: "Facet target with the specified category key does not exist",
|
|
170
177
|
},
|
|
171
178
|
],
|
|
179
|
+
schema: "input AddFacetOptionInput {\n categoryKey: String!\n optionId: String!\n lastModified: DateTime!\n}",
|
|
180
|
+
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;",
|
|
172
181
|
examples: [],
|
|
173
|
-
|
|
182
|
+
template: "Adds an option to a facet target",
|
|
183
|
+
description: "Adds an option to a facet target",
|
|
174
184
|
},
|
|
175
185
|
{
|
|
176
186
|
id: "remove-facet-option",
|
|
177
187
|
name: "REMOVE_FACET_OPTION",
|
|
178
|
-
|
|
179
|
-
schema: "input RemoveFacetOptionInput {\n categoryKey: String!\n optionId: String!\n lastModified: DateTime!\n}",
|
|
180
|
-
template: "Removes an option from a facet target",
|
|
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;",
|
|
188
|
+
scope: "global",
|
|
182
189
|
errors: [
|
|
183
190
|
{
|
|
184
191
|
id: "facet-target-not-found-remove",
|
|
185
|
-
name: "RemoveFacetOptionTargetNotFoundError",
|
|
186
192
|
code: "REMOVE_FACET_OPTION_TARGET_NOT_FOUND",
|
|
187
|
-
|
|
193
|
+
name: "RemoveFacetOptionTargetNotFoundError",
|
|
188
194
|
template: "",
|
|
195
|
+
description: "Facet target with the specified category key does not exist",
|
|
189
196
|
},
|
|
190
197
|
],
|
|
198
|
+
schema: "input RemoveFacetOptionInput {\n categoryKey: String!\n optionId: String!\n lastModified: DateTime!\n}",
|
|
199
|
+
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;",
|
|
191
200
|
examples: [],
|
|
192
|
-
|
|
201
|
+
template: "Removes an option from a facet target",
|
|
202
|
+
description: "Removes an option from a facet target",
|
|
193
203
|
},
|
|
194
204
|
],
|
|
205
|
+
description: "Operations for managing facet targeting",
|
|
195
206
|
},
|
|
196
207
|
{
|
|
197
208
|
id: "service-category-management",
|
|
198
209
|
name: "Service Category Management",
|
|
199
|
-
description: "Operations for managing service categories",
|
|
200
210
|
operations: [
|
|
201
211
|
{
|
|
202
212
|
id: "set-setup-services",
|
|
203
213
|
name: "SET_SETUP_SERVICES",
|
|
204
|
-
|
|
214
|
+
scope: "global",
|
|
215
|
+
errors: [],
|
|
205
216
|
schema: "input SetSetupServicesInput {\n services: [String!]!\n lastModified: DateTime!\n}",
|
|
206
|
-
template: "Sets the setup services",
|
|
207
217
|
reducer: "state.setupServices = action.input.services;\nstate.lastModified = action.input.lastModified;",
|
|
208
|
-
errors: [],
|
|
209
218
|
examples: [],
|
|
210
|
-
|
|
219
|
+
template: "Sets the setup services",
|
|
220
|
+
description: "Sets the setup service category labels",
|
|
211
221
|
},
|
|
212
222
|
{
|
|
213
223
|
id: "set-recurring-services",
|
|
214
224
|
name: "SET_RECURRING_SERVICES",
|
|
215
|
-
|
|
225
|
+
scope: "global",
|
|
226
|
+
errors: [],
|
|
216
227
|
schema: "input SetRecurringServicesInput {\n services: [String!]!\n lastModified: DateTime!\n}",
|
|
217
|
-
template: "Sets the recurring services",
|
|
218
228
|
reducer: "state.recurringServices = action.input.services;\nstate.lastModified = action.input.lastModified;",
|
|
219
|
-
errors: [],
|
|
220
229
|
examples: [],
|
|
221
|
-
|
|
230
|
+
template: "Sets the recurring services",
|
|
231
|
+
description: "Sets the recurring service category labels",
|
|
222
232
|
},
|
|
223
233
|
],
|
|
234
|
+
description: "Operations for managing service categories",
|
|
224
235
|
},
|
|
225
236
|
{
|
|
226
237
|
id: "service-management",
|
|
227
238
|
name: "Service Management",
|
|
228
|
-
description: "Operations for managing services in the template",
|
|
229
239
|
operations: [
|
|
230
240
|
{
|
|
231
241
|
id: "add-service",
|
|
232
242
|
name: "ADD_SERVICE",
|
|
233
|
-
|
|
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}",
|
|
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;",
|
|
243
|
+
scope: "global",
|
|
237
244
|
errors: [
|
|
238
245
|
{
|
|
239
246
|
id: "duplicate-service-id",
|
|
240
|
-
name: "DuplicateServiceIdError",
|
|
241
247
|
code: "DUPLICATE_SERVICE_ID",
|
|
242
|
-
|
|
248
|
+
name: "DuplicateServiceIdError",
|
|
243
249
|
template: "",
|
|
250
|
+
description: "A service with this ID already exists",
|
|
244
251
|
},
|
|
245
252
|
],
|
|
253
|
+
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}",
|
|
254
|
+
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;",
|
|
246
255
|
examples: [],
|
|
247
|
-
|
|
256
|
+
template: "Adds a new service to the template",
|
|
257
|
+
description: "Adds a new service to the template",
|
|
248
258
|
},
|
|
249
259
|
{
|
|
250
260
|
id: "update-service",
|
|
251
261
|
name: "UPDATE_SERVICE",
|
|
252
|
-
|
|
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}",
|
|
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;",
|
|
262
|
+
scope: "global",
|
|
256
263
|
errors: [
|
|
257
264
|
{
|
|
258
265
|
id: "service-not-found",
|
|
259
|
-
name: "UpdateServiceNotFoundError",
|
|
260
266
|
code: "UPDATE_SERVICE_NOT_FOUND",
|
|
261
|
-
|
|
267
|
+
name: "UpdateServiceNotFoundError",
|
|
262
268
|
template: "",
|
|
269
|
+
description: "Service with the specified ID does not exist",
|
|
263
270
|
},
|
|
264
271
|
],
|
|
272
|
+
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}",
|
|
273
|
+
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;",
|
|
265
274
|
examples: [],
|
|
266
|
-
|
|
275
|
+
template: "Updates an existing service",
|
|
276
|
+
description: "Updates an existing service",
|
|
267
277
|
},
|
|
268
278
|
{
|
|
269
279
|
id: "delete-service",
|
|
270
280
|
name: "DELETE_SERVICE",
|
|
271
|
-
|
|
272
|
-
schema: "input DeleteServiceInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
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;",
|
|
281
|
+
scope: "global",
|
|
275
282
|
errors: [
|
|
276
283
|
{
|
|
277
284
|
id: "service-not-found-delete",
|
|
278
|
-
name: "DeleteServiceNotFoundError",
|
|
279
285
|
code: "DELETE_SERVICE_NOT_FOUND",
|
|
280
|
-
|
|
286
|
+
name: "DeleteServiceNotFoundError",
|
|
281
287
|
template: "",
|
|
288
|
+
description: "Service with the specified ID does not exist",
|
|
282
289
|
},
|
|
283
290
|
],
|
|
291
|
+
schema: "input DeleteServiceInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
292
|
+
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;",
|
|
284
293
|
examples: [],
|
|
285
|
-
|
|
294
|
+
template: "Removes a service from the template",
|
|
295
|
+
description: "Removes a service from the template",
|
|
286
296
|
},
|
|
287
297
|
{
|
|
288
298
|
id: "add-facet-binding",
|
|
289
299
|
name: "ADD_FACET_BINDING",
|
|
290
|
-
|
|
291
|
-
schema: "input AddFacetBindingInput {\n serviceId: OID!\n bindingId: OID!\n facetName: String!\n facetType: PHID!\n supportedOptions: [OID!]!\n lastModified: DateTime!\n}",
|
|
292
|
-
template: "Adds a facet binding to a service",
|
|
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;",
|
|
300
|
+
scope: "global",
|
|
294
301
|
errors: [
|
|
295
302
|
{
|
|
296
303
|
id: "service-not-found-facet",
|
|
297
|
-
name: "AddFacetServiceNotFoundError",
|
|
298
304
|
code: "ADD_FACET_SERVICE_NOT_FOUND",
|
|
299
|
-
|
|
305
|
+
name: "AddFacetServiceNotFoundError",
|
|
300
306
|
template: "",
|
|
307
|
+
description: "Service with the specified ID does not exist",
|
|
301
308
|
},
|
|
302
309
|
{
|
|
303
310
|
id: "duplicate-binding-id",
|
|
304
|
-
name: "DuplicateBindingIdError",
|
|
305
311
|
code: "DUPLICATE_BINDING_ID",
|
|
306
|
-
|
|
312
|
+
name: "DuplicateBindingIdError",
|
|
307
313
|
template: "",
|
|
314
|
+
description: "A facet binding with this ID already exists",
|
|
308
315
|
},
|
|
309
316
|
],
|
|
317
|
+
schema: "input AddFacetBindingInput {\n serviceId: OID!\n bindingId: OID!\n facetName: String!\n facetType: PHID!\n supportedOptions: [OID!]!\n lastModified: DateTime!\n}",
|
|
318
|
+
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;",
|
|
310
319
|
examples: [],
|
|
311
|
-
|
|
320
|
+
template: "Adds a facet binding to a service",
|
|
321
|
+
description: "Adds a facet binding to a service",
|
|
312
322
|
},
|
|
313
323
|
{
|
|
314
324
|
id: "remove-facet-binding",
|
|
315
325
|
name: "REMOVE_FACET_BINDING",
|
|
316
|
-
|
|
317
|
-
schema: "input RemoveFacetBindingInput {\n serviceId: OID!\n bindingId: OID!\n lastModified: DateTime!\n}",
|
|
318
|
-
template: "Removes a facet binding from a service",
|
|
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;",
|
|
326
|
+
scope: "global",
|
|
320
327
|
errors: [
|
|
321
328
|
{
|
|
322
329
|
id: "service-not-found-remove-binding",
|
|
323
|
-
name: "RemoveFacetServiceNotFoundError",
|
|
324
330
|
code: "REMOVE_FACET_SERVICE_NOT_FOUND",
|
|
325
|
-
|
|
331
|
+
name: "RemoveFacetServiceNotFoundError",
|
|
326
332
|
template: "",
|
|
333
|
+
description: "Service with the specified ID does not exist",
|
|
327
334
|
},
|
|
328
335
|
{
|
|
329
336
|
id: "binding-not-found",
|
|
330
|
-
name: "BindingNotFoundError",
|
|
331
337
|
code: "BINDING_NOT_FOUND",
|
|
332
|
-
|
|
338
|
+
name: "BindingNotFoundError",
|
|
333
339
|
template: "",
|
|
340
|
+
description: "Facet binding with the specified ID does not exist",
|
|
334
341
|
},
|
|
335
342
|
],
|
|
343
|
+
schema: "input RemoveFacetBindingInput {\n serviceId: OID!\n bindingId: OID!\n lastModified: DateTime!\n}",
|
|
344
|
+
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;",
|
|
336
345
|
examples: [],
|
|
337
|
-
|
|
346
|
+
template: "Removes a facet binding from a service",
|
|
347
|
+
description: "Removes a facet binding from a service",
|
|
338
348
|
},
|
|
339
349
|
],
|
|
350
|
+
description: "Operations for managing services in the template",
|
|
340
351
|
},
|
|
341
352
|
{
|
|
342
353
|
id: "option-group-management",
|
|
343
354
|
name: "Option Group Management",
|
|
344
|
-
description: "Operations for managing option groups",
|
|
345
355
|
operations: [
|
|
346
356
|
{
|
|
347
357
|
id: "add-option-group",
|
|
348
358
|
name: "ADD_OPTION_GROUP",
|
|
349
|
-
|
|
350
|
-
schema: "input AddOptionGroupInput {\n id: OID!\n name: String!\n description: String\n isAddOn: Boolean!\n defaultSelected: Boolean!\n lastModified: DateTime!\n}",
|
|
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;",
|
|
359
|
+
scope: "global",
|
|
353
360
|
errors: [
|
|
354
361
|
{
|
|
355
362
|
id: "duplicate-option-group-id",
|
|
356
|
-
name: "DuplicateOptionGroupIdError",
|
|
357
363
|
code: "DUPLICATE_OPTION_GROUP_ID",
|
|
358
|
-
|
|
364
|
+
name: "DuplicateOptionGroupIdError",
|
|
359
365
|
template: "",
|
|
366
|
+
description: "An option group with this ID already exists",
|
|
360
367
|
},
|
|
361
368
|
],
|
|
369
|
+
schema: "input AddOptionGroupInput {\n id: OID!\n name: String!\n description: String\n isAddOn: Boolean!\n defaultSelected: Boolean!\n lastModified: DateTime!\n}",
|
|
370
|
+
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;",
|
|
362
371
|
examples: [],
|
|
363
|
-
|
|
372
|
+
template: "Adds a new option group",
|
|
373
|
+
description: "Adds a new option group",
|
|
364
374
|
},
|
|
365
375
|
{
|
|
366
376
|
id: "update-option-group",
|
|
367
377
|
name: "UPDATE_OPTION_GROUP",
|
|
368
|
-
|
|
369
|
-
schema: "input UpdateOptionGroupInput {\n id: OID!\n name: String\n description: String\n isAddOn: Boolean\n defaultSelected: Boolean\n lastModified: DateTime!\n}",
|
|
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;",
|
|
378
|
+
scope: "global",
|
|
372
379
|
errors: [
|
|
373
380
|
{
|
|
374
381
|
id: "option-group-not-found",
|
|
375
|
-
name: "UpdateOptionGroupNotFoundError",
|
|
376
382
|
code: "UPDATE_OPTION_GROUP_NOT_FOUND",
|
|
377
|
-
|
|
383
|
+
name: "UpdateOptionGroupNotFoundError",
|
|
378
384
|
template: "",
|
|
385
|
+
description: "Option group with the specified ID does not exist",
|
|
379
386
|
},
|
|
380
387
|
],
|
|
388
|
+
schema: "input UpdateOptionGroupInput {\n id: OID!\n name: String\n description: String\n isAddOn: Boolean\n defaultSelected: Boolean\n lastModified: DateTime!\n}",
|
|
389
|
+
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;",
|
|
381
390
|
examples: [],
|
|
382
|
-
|
|
391
|
+
template: "Updates an existing option group",
|
|
392
|
+
description: "Updates an existing option group",
|
|
383
393
|
},
|
|
384
394
|
{
|
|
385
395
|
id: "delete-option-group",
|
|
386
396
|
name: "DELETE_OPTION_GROUP",
|
|
387
|
-
|
|
388
|
-
schema: "input DeleteOptionGroupInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
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;",
|
|
397
|
+
scope: "global",
|
|
391
398
|
errors: [
|
|
392
399
|
{
|
|
393
400
|
id: "option-group-not-found-delete",
|
|
394
|
-
name: "DeleteOptionGroupNotFoundError",
|
|
395
401
|
code: "DELETE_OPTION_GROUP_NOT_FOUND",
|
|
396
|
-
|
|
402
|
+
name: "DeleteOptionGroupNotFoundError",
|
|
397
403
|
template: "",
|
|
404
|
+
description: "Option group with the specified ID does not exist",
|
|
398
405
|
},
|
|
399
406
|
],
|
|
407
|
+
schema: "input DeleteOptionGroupInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
408
|
+
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;",
|
|
400
409
|
examples: [],
|
|
401
|
-
|
|
410
|
+
template: "Removes an option group from the template",
|
|
411
|
+
description: "Removes an option group from the template",
|
|
402
412
|
},
|
|
403
413
|
{
|
|
404
414
|
id: "5383b824-c864-4062-a90e-f892d292a658",
|
|
405
415
|
name: "ADD_FAQ",
|
|
406
|
-
|
|
416
|
+
scope: "global",
|
|
417
|
+
errors: [],
|
|
407
418
|
schema: "input AddFaqInput {\n id: OID!\n question: String\n answer: String\n displayOrder: Int!\n}",
|
|
408
|
-
template: "",
|
|
409
419
|
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});",
|
|
410
|
-
errors: [],
|
|
411
420
|
examples: [],
|
|
412
|
-
|
|
421
|
+
template: "",
|
|
422
|
+
description: "",
|
|
413
423
|
},
|
|
414
424
|
{
|
|
415
425
|
id: "67866c99-6f74-49fa-a1df-0edcf6671baf",
|
|
416
426
|
name: "UPDATE_FAQ",
|
|
417
|
-
|
|
427
|
+
scope: "global",
|
|
428
|
+
errors: [],
|
|
418
429
|
schema: "input UpdateFaqInput {\n id: OID!\n question: String\n answer: String\n}",
|
|
419
|
-
template: "",
|
|
420
430
|
reducer: "",
|
|
421
|
-
errors: [],
|
|
422
431
|
examples: [],
|
|
423
|
-
|
|
432
|
+
template: "",
|
|
433
|
+
description: "",
|
|
424
434
|
},
|
|
425
435
|
{
|
|
426
436
|
id: "aa7b2729-22b8-41f7-bc45-3825c1857668",
|
|
427
437
|
name: "DELETE_FAQ",
|
|
428
|
-
|
|
438
|
+
scope: "global",
|
|
439
|
+
errors: [],
|
|
429
440
|
schema: "input DeleteFaqInput {\n id:OID!\n}",
|
|
430
|
-
template: "",
|
|
431
441
|
reducer: "",
|
|
432
|
-
errors: [],
|
|
433
442
|
examples: [],
|
|
434
|
-
|
|
443
|
+
template: "",
|
|
444
|
+
description: "",
|
|
435
445
|
},
|
|
436
446
|
{
|
|
437
447
|
id: "reorder-faqs",
|
|
438
448
|
name: "REORDER_FAQS",
|
|
439
|
-
|
|
449
|
+
scope: "global",
|
|
450
|
+
errors: [],
|
|
440
451
|
schema: "input ReorderFaqsInput {\n faqIds: [OID!]!\n lastModified: DateTime!\n}",
|
|
441
|
-
template: "Reorders FAQ items by updating their display order",
|
|
442
452
|
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;",
|
|
443
|
-
errors: [],
|
|
444
453
|
examples: [],
|
|
445
|
-
|
|
454
|
+
template: "Reorders FAQ items by updating their display order",
|
|
455
|
+
description: "Reorders FAQ items by updating their display order",
|
|
446
456
|
},
|
|
447
457
|
],
|
|
458
|
+
description: "Operations for managing option groups",
|
|
448
459
|
},
|
|
449
460
|
{
|
|
450
461
|
id: "content-section-management",
|
|
451
462
|
name: "Content Section Management",
|
|
452
|
-
description: "Operations for managing expandable content sections for long-form article content",
|
|
453
463
|
operations: [
|
|
454
464
|
{
|
|
455
465
|
id: "add-content-section",
|
|
456
466
|
name: "ADD_CONTENT_SECTION",
|
|
457
|
-
|
|
467
|
+
scope: "global",
|
|
468
|
+
errors: [],
|
|
458
469
|
schema: "input AddContentSectionInput {\n id: OID!\n title: String!\n content: String!\n displayOrder: Int!\n lastModified: DateTime!\n}",
|
|
459
|
-
template: "Adds a new expandable content section",
|
|
460
470
|
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;",
|
|
461
|
-
errors: [],
|
|
462
471
|
examples: [],
|
|
463
|
-
|
|
472
|
+
template: "Adds a new expandable content section",
|
|
473
|
+
description: "Adds a new expandable content section",
|
|
464
474
|
},
|
|
465
475
|
{
|
|
466
476
|
id: "update-content-section",
|
|
467
477
|
name: "UPDATE_CONTENT_SECTION",
|
|
468
|
-
|
|
478
|
+
scope: "global",
|
|
479
|
+
errors: [],
|
|
469
480
|
schema: "input UpdateContentSectionInput {\n id: OID!\n title: String\n content: String\n displayOrder: Int\n lastModified: DateTime!\n}",
|
|
470
|
-
template: "Updates an existing content section",
|
|
471
481
|
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;",
|
|
472
|
-
errors: [],
|
|
473
482
|
examples: [],
|
|
474
|
-
|
|
483
|
+
template: "Updates an existing content section",
|
|
484
|
+
description: "Updates an existing content section",
|
|
475
485
|
},
|
|
476
486
|
{
|
|
477
487
|
id: "delete-content-section",
|
|
478
488
|
name: "DELETE_CONTENT_SECTION",
|
|
479
|
-
|
|
489
|
+
scope: "global",
|
|
490
|
+
errors: [],
|
|
480
491
|
schema: "input DeleteContentSectionInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
481
|
-
template: "Removes a content section",
|
|
482
492
|
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;",
|
|
483
|
-
errors: [],
|
|
484
493
|
examples: [],
|
|
485
|
-
|
|
494
|
+
template: "Removes a content section",
|
|
495
|
+
description: "Removes a content section",
|
|
486
496
|
},
|
|
487
497
|
{
|
|
488
498
|
id: "reorder-content-sections",
|
|
489
499
|
name: "REORDER_CONTENT_SECTIONS",
|
|
490
|
-
|
|
500
|
+
scope: "global",
|
|
501
|
+
errors: [],
|
|
491
502
|
schema: "input ReorderContentSectionsInput {\n sectionIds: [OID!]!\n lastModified: DateTime!\n}",
|
|
492
|
-
template: "Reorders content sections by updating their display order",
|
|
493
503
|
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;",
|
|
494
|
-
errors: [],
|
|
495
504
|
examples: [],
|
|
496
|
-
|
|
505
|
+
template: "Reorders content sections by updating their display order",
|
|
506
|
+
description: "Reorders content sections by updating their display order",
|
|
497
507
|
},
|
|
498
508
|
],
|
|
509
|
+
description: "Operations for managing expandable content sections for long-form article content",
|
|
499
510
|
},
|
|
500
511
|
],
|
|
501
512
|
version: 1,
|