@powerhousedao/contributor-billing 0.1.41 → 0.1.42
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/document-models.d.ts.map +1 -1
- package/dist/document-models/document-models.js +2 -0
- package/dist/document-models/resource-template/gen/document-model.js +25 -25
- package/dist/document-models/resource-template/gen/reducer.d.ts +1 -1
- package/dist/document-models/resource-template/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/resource-template/hooks.d.ts +1 -1
- package/dist/document-models/resource-template/hooks.d.ts.map +1 -1
- package/dist/document-models/resource-template/module.d.ts +1 -1
- package/dist/document-models/resource-template/module.d.ts.map +1 -1
- package/dist/document-models/resource-template/reducers/audience-management.d.ts +3 -0
- package/dist/document-models/resource-template/reducers/audience-management.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/audience-management.js +17 -0
- package/dist/document-models/resource-template/reducers/facet-preset-management.d.ts +59 -0
- package/dist/document-models/resource-template/reducers/facet-preset-management.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/facet-preset-management.js +52 -0
- package/dist/document-models/resource-template/reducers/facet-targeting.d.ts +3 -0
- package/dist/document-models/resource-template/reducers/facet-targeting.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/facet-targeting.js +47 -0
- package/dist/document-models/resource-template/reducers/option-group-management.d.ts +3 -0
- package/dist/document-models/resource-template/reducers/option-group-management.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/option-group-management.js +44 -0
- package/dist/document-models/resource-template/reducers/service-category-management.d.ts +3 -0
- package/dist/document-models/resource-template/reducers/service-category-management.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/service-category-management.js +10 -0
- package/dist/document-models/resource-template/reducers/service-management.d.ts +3 -0
- package/dist/document-models/resource-template/reducers/service-management.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/service-management.js +71 -0
- package/dist/document-models/resource-template/reducers/template-management.d.ts +3 -0
- package/dist/document-models/resource-template/reducers/template-management.d.ts.map +1 -0
- package/dist/document-models/resource-template/reducers/template-management.js +32 -0
- package/dist/document-models/resource-template/src/reducers/audience-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/src/reducers/audience-management.js +1 -1
- package/dist/document-models/resource-template/src/reducers/facet-targeting.d.ts.map +1 -1
- package/dist/document-models/resource-template/src/reducers/facet-targeting.js +1 -1
- package/dist/document-models/resource-template/src/reducers/option-group-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/src/reducers/option-group-management.js +1 -1
- package/dist/document-models/resource-template/src/reducers/service-category-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/src/reducers/service-category-management.js +1 -1
- package/dist/document-models/resource-template/src/reducers/service-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/src/reducers/service-management.js +1 -1
- package/dist/document-models/resource-template/src/reducers/template-management.d.ts.map +1 -1
- package/dist/document-models/resource-template/src/reducers/template-management.js +1 -1
- package/dist/document-models/service-offering/gen/document-model.js +5 -5
- package/dist/document-models/service-offering/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/service-offering/gen/reducer.d.ts +1 -1
- package/dist/document-models/service-offering/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/service-offering/gen/schema/types.d.ts +3 -0
- package/dist/document-models/service-offering/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/service-offering/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/service-offering/gen/schema/zod.js +3 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.d.ts.map +1 -1
- package/dist/document-models/service-offering/src/reducers/option-group-management.js +11 -8
- package/dist/document-models/service-offering/src/reducers/service-management.d.ts.map +1 -1
- package/dist/document-models/service-offering/src/reducers/service-management.js +20 -12
- package/dist/document-models/service-offering/src/reducers/tier-management.d.ts.map +1 -1
- package/dist/document-models/service-offering/src/reducers/tier-management.js +21 -19
- package/dist/editors/resource-template-editor/components/FacetTargeting.d.ts +1 -1
- package/dist/editors/resource-template-editor/components/FacetTargeting.d.ts.map +1 -1
- package/dist/editors/resource-template-editor/components/FacetTargeting.js +526 -19
- package/dist/editors/resource-template-editor/components/TemplateInfo.d.ts +1 -1
- package/dist/editors/resource-template-editor/components/TemplateInfo.d.ts.map +1 -1
- package/dist/editors/resource-template-editor/components/TemplateInfo.js +302 -2
- package/dist/editors/resource-template-editor/editor.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/EditName.js +1 -1
- package/dist/editors/service-offering-editor/components/OfferingInfo.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/OfferingInfo.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/OfferingProgress.d.ts +10 -0
- package/dist/editors/service-offering-editor/components/OfferingProgress.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/OfferingProgress.js +240 -0
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ResourceTemplateSelector.js +111 -4
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ServiceCatalog.js +318 -1
- package/dist/editors/service-offering-editor/components/ServicesList.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/ServicesList.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/ServicesList.js +1 -1
- 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 +548 -13
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/components/TierDefinition.js +406 -4
- package/dist/editors/service-offering-editor/components/TiersList.d.ts +1 -1
- package/dist/editors/service-offering-editor/components/TiersList.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/editor.d.ts.map +1 -1
- package/dist/editors/service-offering-editor/editor.js +2 -2
- package/dist/powerhouse.manifest.json +18 -0
- package/dist/subgraphs/index.d.ts +1 -0
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/resource-template/index.d.ts +11 -0
- package/dist/subgraphs/resource-template/index.d.ts.map +1 -0
- package/dist/subgraphs/resource-template/index.js +11 -0
- package/dist/subgraphs/resource-template/resolvers.d.ts +3 -0
- package/dist/subgraphs/resource-template/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/resource-template/resolvers.js +312 -0
- package/dist/subgraphs/resource-template/schema.d.ts +3 -0
- package/dist/subgraphs/resource-template/schema.d.ts.map +1 -0
- package/dist/subgraphs/resource-template/schema.js +262 -0
- package/dist/subgraphs/service-offering/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/service-offering/resolvers.js +24 -0
- package/dist/subgraphs/service-offering/schema.d.ts.map +1 -1
- package/dist/subgraphs/service-offering/schema.js +21 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-models.d.ts","sourceRoot":"","sources":["../../document-models/document-models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"document-models.d.ts","sourceRoot":"","sources":["../../document-models/document-models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAW1D,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAUpD,CAAC"}
|
|
@@ -6,12 +6,14 @@ import { Invoice } from "./invoice/module.js";
|
|
|
6
6
|
import { SnapshotReport } from "./snapshot-report/module.js";
|
|
7
7
|
import { ServiceSubscriptions } from "./service-subscriptions/module.js";
|
|
8
8
|
import { ServiceOffering } from "./service-offering/module.js";
|
|
9
|
+
import { ResourceTemplate } from "./resource-template/module.js";
|
|
9
10
|
export const documentModels = [
|
|
10
11
|
AccountTransactions,
|
|
11
12
|
Accounts,
|
|
12
13
|
BillingStatement,
|
|
13
14
|
ExpenseReport,
|
|
14
15
|
Invoice,
|
|
16
|
+
ResourceTemplate,
|
|
15
17
|
ServiceOffering,
|
|
16
18
|
ServiceSubscriptions,
|
|
17
19
|
SnapshotReport,
|
|
@@ -303,17 +303,17 @@ export const documentModel = {
|
|
|
303
303
|
description: "Removes a facet binding from a service",
|
|
304
304
|
errors: [
|
|
305
305
|
{
|
|
306
|
-
code: "REMOVE_FACET_SERVICE_NOT_FOUND",
|
|
307
|
-
description: "Service with the specified ID does not exist",
|
|
308
306
|
id: "service-not-found-remove-binding",
|
|
309
307
|
name: "RemoveFacetServiceNotFoundError",
|
|
308
|
+
code: "REMOVE_FACET_SERVICE_NOT_FOUND",
|
|
309
|
+
description: "Service with the specified ID does not exist",
|
|
310
310
|
template: "",
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
|
-
code: "BINDING_NOT_FOUND",
|
|
314
|
-
description: "Facet binding with the specified ID does not exist",
|
|
315
313
|
id: "binding-not-found",
|
|
316
314
|
name: "BindingNotFoundError",
|
|
315
|
+
code: "BINDING_NOT_FOUND",
|
|
316
|
+
description: "Facet binding with the specified ID does not exist",
|
|
317
317
|
template: "",
|
|
318
318
|
},
|
|
319
319
|
],
|
|
@@ -333,61 +333,61 @@ export const documentModel = {
|
|
|
333
333
|
name: "Option Group Management",
|
|
334
334
|
operations: [
|
|
335
335
|
{
|
|
336
|
+
id: "add-option-group",
|
|
337
|
+
name: "ADD_OPTION_GROUP",
|
|
336
338
|
description: "Adds a new option group",
|
|
339
|
+
schema: "input AddOptionGroupInput {\n id: OID!\n name: String!\n description: String\n isAddOn: Boolean!\n defaultSelected: Boolean!\n lastModified: DateTime!\n}",
|
|
340
|
+
template: "Adds a new option group",
|
|
341
|
+
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;",
|
|
337
342
|
errors: [
|
|
338
343
|
{
|
|
339
|
-
code: "DUPLICATE_OPTION_GROUP_ID",
|
|
340
|
-
description: "An option group with this ID already exists",
|
|
341
344
|
id: "duplicate-option-group-id",
|
|
342
345
|
name: "DuplicateOptionGroupIdError",
|
|
346
|
+
code: "DUPLICATE_OPTION_GROUP_ID",
|
|
347
|
+
description: "An option group with this ID already exists",
|
|
343
348
|
template: "",
|
|
344
349
|
},
|
|
345
350
|
],
|
|
346
351
|
examples: [],
|
|
347
|
-
id: "add-option-group",
|
|
348
|
-
name: "ADD_OPTION_GROUP",
|
|
349
|
-
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;",
|
|
350
|
-
schema: "input AddOptionGroupInput {\n id: OID!\n name: String!\n description: String\n isAddOn: Boolean!\n defaultSelected: Boolean!\n lastModified: DateTime!\n}",
|
|
351
352
|
scope: "global",
|
|
352
|
-
template: "Adds a new option group",
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
|
+
id: "update-option-group",
|
|
356
|
+
name: "UPDATE_OPTION_GROUP",
|
|
355
357
|
description: "Updates an existing option group",
|
|
358
|
+
schema: "input UpdateOptionGroupInput {\n id: OID!\n name: String\n description: String\n isAddOn: Boolean\n defaultSelected: Boolean\n lastModified: DateTime!\n}",
|
|
359
|
+
template: "Updates an existing option group",
|
|
360
|
+
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;",
|
|
356
361
|
errors: [
|
|
357
362
|
{
|
|
358
|
-
code: "UPDATE_OPTION_GROUP_NOT_FOUND",
|
|
359
|
-
description: "Option group with the specified ID does not exist",
|
|
360
363
|
id: "option-group-not-found",
|
|
361
364
|
name: "UpdateOptionGroupNotFoundError",
|
|
365
|
+
code: "UPDATE_OPTION_GROUP_NOT_FOUND",
|
|
366
|
+
description: "Option group with the specified ID does not exist",
|
|
362
367
|
template: "",
|
|
363
368
|
},
|
|
364
369
|
],
|
|
365
370
|
examples: [],
|
|
366
|
-
id: "update-option-group",
|
|
367
|
-
name: "UPDATE_OPTION_GROUP",
|
|
368
|
-
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;",
|
|
369
|
-
schema: "input UpdateOptionGroupInput {\n id: OID!\n name: String\n description: String\n isAddOn: Boolean\n defaultSelected: Boolean\n lastModified: DateTime!\n}",
|
|
370
371
|
scope: "global",
|
|
371
|
-
template: "Updates an existing option group",
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
|
+
id: "delete-option-group",
|
|
375
|
+
name: "DELETE_OPTION_GROUP",
|
|
374
376
|
description: "Removes an option group from the template",
|
|
377
|
+
schema: "input DeleteOptionGroupInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
378
|
+
template: "Removes an option group from the template",
|
|
379
|
+
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;",
|
|
375
380
|
errors: [
|
|
376
381
|
{
|
|
377
|
-
code: "DELETE_OPTION_GROUP_NOT_FOUND",
|
|
378
|
-
description: "Option group with the specified ID does not exist",
|
|
379
382
|
id: "option-group-not-found-delete",
|
|
380
383
|
name: "DeleteOptionGroupNotFoundError",
|
|
384
|
+
code: "DELETE_OPTION_GROUP_NOT_FOUND",
|
|
385
|
+
description: "Option group with the specified ID does not exist",
|
|
381
386
|
template: "",
|
|
382
387
|
},
|
|
383
388
|
],
|
|
384
389
|
examples: [],
|
|
385
|
-
id: "delete-option-group",
|
|
386
|
-
name: "DELETE_OPTION_GROUP",
|
|
387
|
-
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;",
|
|
388
|
-
schema: "input DeleteOptionGroupInput {\n id: OID!\n lastModified: DateTime!\n}",
|
|
389
390
|
scope: "global",
|
|
390
|
-
template: "Removes an option group from the template",
|
|
391
391
|
},
|
|
392
392
|
],
|
|
393
393
|
},
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ResourceTemplatePHState } from "
|
|
1
|
+
import type { ResourceTemplatePHState } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
2
|
export declare const reducer: import("document-model").Reducer<ResourceTemplatePHState>;
|
|
3
3
|
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAmOpH,eAAO,MAAM,OAAO,2DAAuD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentDispatch } from "@powerhousedao/reactor-browser";
|
|
2
|
-
import type { ResourceTemplateDocument, ResourceTemplateAction } from "
|
|
2
|
+
import type { ResourceTemplateDocument, ResourceTemplateAction } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
3
3
|
/** Hook to get a ResourceTemplate document by its id */
|
|
4
4
|
export declare function useResourceTemplateDocumentById(documentId: string | null | undefined): [ResourceTemplateDocument, DocumentDispatch<ResourceTemplateAction>] | [undefined, undefined];
|
|
5
5
|
/** Hook to get the selected ResourceTemplate document */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../document-models/resource-template/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAOvE,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../document-models/resource-template/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAOvE,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,sEAAsE,CAAC;AAG9E,wDAAwD;AACxD,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAEnC,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC,GACpE,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,yDAAyD;AACzD,wBAAgB,mCAAmC,IAC/C,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAC,GACpE,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,uEAAuE;AACvE,wBAAgB,2CAA2C,2CAG1D;AAED,wEAAwE;AACxE,wBAAgB,4CAA4C,2CAG3D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentModelModule } from "document-model";
|
|
2
|
-
import type { ResourceTemplatePHState } from "
|
|
2
|
+
import type { ResourceTemplatePHState } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
3
3
|
/** Document model module for the Todo List document type */
|
|
4
4
|
export declare const ResourceTemplate: DocumentModelModule<ResourceTemplatePHState>;
|
|
5
5
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/resource-template/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/resource-template/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAQpH,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,CAAC,uBAAuB,CAKzE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResourceTemplateAudienceManagementOperations } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
|
+
export declare const resourceTemplateAudienceManagementOperations: ResourceTemplateAudienceManagementOperations;
|
|
3
|
+
//# sourceMappingURL=audience-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audience-management.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/audience-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,sEAAsE,CAAC;AAEzI,eAAO,MAAM,4CAA4C,EAAE,4CAmBxD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const resourceTemplateAudienceManagementOperations = {
|
|
2
|
+
addTargetAudienceOperation(state, action) {
|
|
3
|
+
state.targetAudiences.push({
|
|
4
|
+
id: action.input.id,
|
|
5
|
+
label: action.input.label,
|
|
6
|
+
color: action.input.color || null,
|
|
7
|
+
});
|
|
8
|
+
state.lastModified = action.input.lastModified;
|
|
9
|
+
},
|
|
10
|
+
removeTargetAudienceOperation(state, action) {
|
|
11
|
+
const audienceIndex = state.targetAudiences.findIndex((a) => a.id === action.input.id);
|
|
12
|
+
if (audienceIndex !== -1) {
|
|
13
|
+
state.targetAudiences.splice(audienceIndex, 1);
|
|
14
|
+
}
|
|
15
|
+
state.lastModified = action.input.lastModified;
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { SignalDispatch, Action } from "document-model";
|
|
2
|
+
interface FacetPreset {
|
|
3
|
+
id: string;
|
|
4
|
+
categoryKey: string;
|
|
5
|
+
categoryLabel: string;
|
|
6
|
+
description: string | null;
|
|
7
|
+
icon: string | null;
|
|
8
|
+
isRecommended: boolean;
|
|
9
|
+
suggestedOptions: string[];
|
|
10
|
+
}
|
|
11
|
+
interface ResourceTemplateStateWithPresets {
|
|
12
|
+
facetPresets: FacetPreset[];
|
|
13
|
+
lastModified: string;
|
|
14
|
+
}
|
|
15
|
+
interface SetFacetPresetInput {
|
|
16
|
+
id: string;
|
|
17
|
+
categoryKey: string;
|
|
18
|
+
categoryLabel: string;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
icon?: string | null;
|
|
21
|
+
isRecommended?: boolean;
|
|
22
|
+
suggestedOptions: string[];
|
|
23
|
+
lastModified: string;
|
|
24
|
+
}
|
|
25
|
+
interface RemoveFacetPresetInput {
|
|
26
|
+
id: string;
|
|
27
|
+
lastModified: string;
|
|
28
|
+
}
|
|
29
|
+
interface AddPresetOptionInput {
|
|
30
|
+
presetId: string;
|
|
31
|
+
option: string;
|
|
32
|
+
lastModified: string;
|
|
33
|
+
}
|
|
34
|
+
interface RemovePresetOptionInput {
|
|
35
|
+
presetId: string;
|
|
36
|
+
option: string;
|
|
37
|
+
lastModified: string;
|
|
38
|
+
}
|
|
39
|
+
type SetFacetPresetAction = Action & {
|
|
40
|
+
input: SetFacetPresetInput;
|
|
41
|
+
};
|
|
42
|
+
type RemoveFacetPresetAction = Action & {
|
|
43
|
+
input: RemoveFacetPresetInput;
|
|
44
|
+
};
|
|
45
|
+
type AddPresetOptionAction = Action & {
|
|
46
|
+
input: AddPresetOptionInput;
|
|
47
|
+
};
|
|
48
|
+
type RemovePresetOptionAction = Action & {
|
|
49
|
+
input: RemovePresetOptionInput;
|
|
50
|
+
};
|
|
51
|
+
export interface ResourceTemplateFacetPresetManagementOperations {
|
|
52
|
+
setFacetPresetOperation: (state: ResourceTemplateStateWithPresets, action: SetFacetPresetAction, dispatch?: SignalDispatch) => void;
|
|
53
|
+
removeFacetPresetOperation: (state: ResourceTemplateStateWithPresets, action: RemoveFacetPresetAction, dispatch?: SignalDispatch) => void;
|
|
54
|
+
addPresetOptionOperation: (state: ResourceTemplateStateWithPresets, action: AddPresetOptionAction, dispatch?: SignalDispatch) => void;
|
|
55
|
+
removePresetOptionOperation: (state: ResourceTemplateStateWithPresets, action: RemovePresetOptionAction, dispatch?: SignalDispatch) => void;
|
|
56
|
+
}
|
|
57
|
+
export declare const resourceTemplateFacetPresetManagementOperations: ResourceTemplateFacetPresetManagementOperations;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=facet-preset-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet-preset-management.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/facet-preset-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI7D,UAAU,WAAW;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,UAAU,gCAAgC;IACxC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,sBAAsB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,oBAAoB,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,CAAC;AACpE,KAAK,uBAAuB,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,sBAAsB,CAAA;CAAE,CAAC;AAC1E,KAAK,qBAAqB,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,oBAAoB,CAAA;CAAE,CAAC;AACtE,KAAK,wBAAwB,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAE5E,MAAM,WAAW,+CAA+C;IAC9D,uBAAuB,EAAE,CACvB,KAAK,EAAE,gCAAgC,EACvC,MAAM,EAAE,oBAAoB,EAC5B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,0BAA0B,EAAE,CAC1B,KAAK,EAAE,gCAAgC,EACvC,MAAM,EAAE,uBAAuB,EAC/B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,wBAAwB,EAAE,CACxB,KAAK,EAAE,gCAAgC,EACvC,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,2BAA2B,EAAE,CAC3B,KAAK,EAAE,gCAAgC,EACvC,MAAM,EAAE,wBAAwB,EAChC,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX;AAED,eAAO,MAAM,+CAA+C,EAAE,+CA6D3D,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const resourceTemplateFacetPresetManagementOperations = {
|
|
2
|
+
setFacetPresetOperation(state, action) {
|
|
3
|
+
const existingIndex = state.facetPresets.findIndex((fp) => fp.id === action.input.id);
|
|
4
|
+
if (existingIndex !== -1) {
|
|
5
|
+
state.facetPresets[existingIndex] = {
|
|
6
|
+
id: action.input.id,
|
|
7
|
+
categoryKey: action.input.categoryKey,
|
|
8
|
+
categoryLabel: action.input.categoryLabel,
|
|
9
|
+
description: action.input.description || null,
|
|
10
|
+
icon: action.input.icon || null,
|
|
11
|
+
isRecommended: action.input.isRecommended || false,
|
|
12
|
+
suggestedOptions: action.input.suggestedOptions,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
state.facetPresets.push({
|
|
17
|
+
id: action.input.id,
|
|
18
|
+
categoryKey: action.input.categoryKey,
|
|
19
|
+
categoryLabel: action.input.categoryLabel,
|
|
20
|
+
description: action.input.description || null,
|
|
21
|
+
icon: action.input.icon || null,
|
|
22
|
+
isRecommended: action.input.isRecommended || false,
|
|
23
|
+
suggestedOptions: action.input.suggestedOptions,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
state.lastModified = action.input.lastModified;
|
|
27
|
+
},
|
|
28
|
+
removeFacetPresetOperation(state, action) {
|
|
29
|
+
const presetIndex = state.facetPresets.findIndex((fp) => fp.id === action.input.id);
|
|
30
|
+
if (presetIndex !== -1) {
|
|
31
|
+
state.facetPresets.splice(presetIndex, 1);
|
|
32
|
+
}
|
|
33
|
+
state.lastModified = action.input.lastModified;
|
|
34
|
+
},
|
|
35
|
+
addPresetOptionOperation(state, action) {
|
|
36
|
+
const preset = state.facetPresets.find((fp) => fp.id === action.input.presetId);
|
|
37
|
+
if (preset && !preset.suggestedOptions.includes(action.input.option)) {
|
|
38
|
+
preset.suggestedOptions.push(action.input.option);
|
|
39
|
+
}
|
|
40
|
+
state.lastModified = action.input.lastModified;
|
|
41
|
+
},
|
|
42
|
+
removePresetOptionOperation(state, action) {
|
|
43
|
+
const preset = state.facetPresets.find((fp) => fp.id === action.input.presetId);
|
|
44
|
+
if (preset) {
|
|
45
|
+
const optionIndex = preset.suggestedOptions.indexOf(action.input.option);
|
|
46
|
+
if (optionIndex !== -1) {
|
|
47
|
+
preset.suggestedOptions.splice(optionIndex, 1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
state.lastModified = action.input.lastModified;
|
|
51
|
+
},
|
|
52
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResourceTemplateFacetTargetingOperations } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
|
+
export declare const resourceTemplateFacetTargetingOperations: ResourceTemplateFacetTargetingOperations;
|
|
3
|
+
//# sourceMappingURL=facet-targeting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet-targeting.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/facet-targeting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAErI,eAAO,MAAM,wCAAwC,EAAE,wCA0DpD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export const resourceTemplateFacetTargetingOperations = {
|
|
2
|
+
setFacetTargetOperation(state, action) {
|
|
3
|
+
const existingIndex = state.facetTargets.findIndex((ft) => ft.categoryKey === action.input.categoryKey);
|
|
4
|
+
if (existingIndex !== -1) {
|
|
5
|
+
state.facetTargets[existingIndex] = {
|
|
6
|
+
id: action.input.id,
|
|
7
|
+
categoryKey: action.input.categoryKey,
|
|
8
|
+
categoryLabel: action.input.categoryLabel,
|
|
9
|
+
selectedOptions: action.input.selectedOptions,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
state.facetTargets.push({
|
|
14
|
+
id: action.input.id,
|
|
15
|
+
categoryKey: action.input.categoryKey,
|
|
16
|
+
categoryLabel: action.input.categoryLabel,
|
|
17
|
+
selectedOptions: action.input.selectedOptions,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
state.lastModified = action.input.lastModified;
|
|
21
|
+
},
|
|
22
|
+
removeFacetTargetOperation(state, action) {
|
|
23
|
+
const facetIndex = state.facetTargets.findIndex((ft) => ft.categoryKey === action.input.categoryKey);
|
|
24
|
+
if (facetIndex !== -1) {
|
|
25
|
+
state.facetTargets.splice(facetIndex, 1);
|
|
26
|
+
}
|
|
27
|
+
state.lastModified = action.input.lastModified;
|
|
28
|
+
},
|
|
29
|
+
addFacetOptionOperation(state, action) {
|
|
30
|
+
const facetTarget = state.facetTargets.find((ft) => ft.categoryKey === action.input.categoryKey);
|
|
31
|
+
if (facetTarget &&
|
|
32
|
+
!facetTarget.selectedOptions.includes(action.input.optionId)) {
|
|
33
|
+
facetTarget.selectedOptions.push(action.input.optionId);
|
|
34
|
+
}
|
|
35
|
+
state.lastModified = action.input.lastModified;
|
|
36
|
+
},
|
|
37
|
+
removeFacetOptionOperation(state, action) {
|
|
38
|
+
const facetTarget = state.facetTargets.find((ft) => ft.categoryKey === action.input.categoryKey);
|
|
39
|
+
if (facetTarget) {
|
|
40
|
+
const optionIndex = facetTarget.selectedOptions.indexOf(action.input.optionId);
|
|
41
|
+
if (optionIndex !== -1) {
|
|
42
|
+
facetTarget.selectedOptions.splice(optionIndex, 1);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
state.lastModified = action.input.lastModified;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResourceTemplateOptionGroupManagementOperations } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
|
+
export declare const resourceTemplateOptionGroupManagementOperations: ResourceTemplateOptionGroupManagementOperations;
|
|
3
|
+
//# sourceMappingURL=option-group-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-group-management.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/option-group-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+CAA+C,EAAE,MAAM,sEAAsE,CAAC;AAE5I,eAAO,MAAM,+CAA+C,EAAE,+CAoD3D,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export const resourceTemplateOptionGroupManagementOperations = {
|
|
2
|
+
addOptionGroupOperation(state, action) {
|
|
3
|
+
state.optionGroups.push({
|
|
4
|
+
id: action.input.id,
|
|
5
|
+
name: action.input.name,
|
|
6
|
+
description: action.input.description || null,
|
|
7
|
+
isAddOn: action.input.isAddOn,
|
|
8
|
+
defaultSelected: action.input.defaultSelected,
|
|
9
|
+
});
|
|
10
|
+
state.lastModified = action.input.lastModified;
|
|
11
|
+
},
|
|
12
|
+
updateOptionGroupOperation(state, action) {
|
|
13
|
+
const optionGroup = state.optionGroups.find((og) => og.id === action.input.id);
|
|
14
|
+
if (optionGroup) {
|
|
15
|
+
if (action.input.name) {
|
|
16
|
+
optionGroup.name = action.input.name;
|
|
17
|
+
}
|
|
18
|
+
if (action.input.description !== undefined) {
|
|
19
|
+
optionGroup.description = action.input.description || null;
|
|
20
|
+
}
|
|
21
|
+
if (action.input.isAddOn !== undefined &&
|
|
22
|
+
action.input.isAddOn !== null) {
|
|
23
|
+
optionGroup.isAddOn = action.input.isAddOn;
|
|
24
|
+
}
|
|
25
|
+
if (action.input.defaultSelected !== undefined &&
|
|
26
|
+
action.input.defaultSelected !== null) {
|
|
27
|
+
optionGroup.defaultSelected = action.input.defaultSelected;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
state.lastModified = action.input.lastModified;
|
|
31
|
+
},
|
|
32
|
+
deleteOptionGroupOperation(state, action) {
|
|
33
|
+
const optionGroupIndex = state.optionGroups.findIndex((og) => og.id === action.input.id);
|
|
34
|
+
if (optionGroupIndex !== -1) {
|
|
35
|
+
state.services.forEach((service) => {
|
|
36
|
+
if (service.optionGroupId === action.input.id) {
|
|
37
|
+
service.optionGroupId = null;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
state.optionGroups.splice(optionGroupIndex, 1);
|
|
41
|
+
}
|
|
42
|
+
state.lastModified = action.input.lastModified;
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResourceTemplateServiceCategoryManagementOperations } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
|
+
export declare const resourceTemplateServiceCategoryManagementOperations: ResourceTemplateServiceCategoryManagementOperations;
|
|
3
|
+
//# sourceMappingURL=service-category-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-category-management.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/service-category-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mDAAmD,EAAE,MAAM,sEAAsE,CAAC;AAEhJ,eAAO,MAAM,mDAAmD,EAAE,mDAU/D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const resourceTemplateServiceCategoryManagementOperations = {
|
|
2
|
+
setSetupServicesOperation(state, action) {
|
|
3
|
+
state.setupServices = action.input.services;
|
|
4
|
+
state.lastModified = action.input.lastModified;
|
|
5
|
+
},
|
|
6
|
+
setRecurringServicesOperation(state, action) {
|
|
7
|
+
state.recurringServices = action.input.services;
|
|
8
|
+
state.lastModified = action.input.lastModified;
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResourceTemplateServiceManagementOperations } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
|
+
export declare const resourceTemplateServiceManagementOperations: ResourceTemplateServiceManagementOperations;
|
|
3
|
+
//# sourceMappingURL=service-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-management.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/service-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,sEAAsE,CAAC;AAExI,eAAO,MAAM,2CAA2C,EAAE,2CAqFvD,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const resourceTemplateServiceManagementOperations = {
|
|
2
|
+
addServiceOperation(state, action) {
|
|
3
|
+
state.services.push({
|
|
4
|
+
id: action.input.id,
|
|
5
|
+
title: action.input.title,
|
|
6
|
+
description: action.input.description || null,
|
|
7
|
+
parentServiceId: action.input.parentServiceId || null,
|
|
8
|
+
displayOrder: action.input.displayOrder || null,
|
|
9
|
+
isSetupFormation: action.input.isSetupFormation || false,
|
|
10
|
+
optionGroupId: action.input.optionGroupId || null,
|
|
11
|
+
facetBindings: [],
|
|
12
|
+
});
|
|
13
|
+
state.lastModified = action.input.lastModified;
|
|
14
|
+
},
|
|
15
|
+
updateServiceOperation(state, action) {
|
|
16
|
+
const service = state.services.find((s) => s.id === action.input.id);
|
|
17
|
+
if (service) {
|
|
18
|
+
if (action.input.title) {
|
|
19
|
+
service.title = action.input.title;
|
|
20
|
+
}
|
|
21
|
+
if (action.input.description !== undefined &&
|
|
22
|
+
action.input.description !== null) {
|
|
23
|
+
service.description = action.input.description;
|
|
24
|
+
}
|
|
25
|
+
if (action.input.parentServiceId !== undefined) {
|
|
26
|
+
service.parentServiceId = action.input.parentServiceId || null;
|
|
27
|
+
}
|
|
28
|
+
if (action.input.displayOrder !== undefined &&
|
|
29
|
+
action.input.displayOrder !== null) {
|
|
30
|
+
service.displayOrder = action.input.displayOrder;
|
|
31
|
+
}
|
|
32
|
+
if (action.input.isSetupFormation !== undefined &&
|
|
33
|
+
action.input.isSetupFormation !== null) {
|
|
34
|
+
service.isSetupFormation = action.input.isSetupFormation;
|
|
35
|
+
}
|
|
36
|
+
if (action.input.optionGroupId !== undefined) {
|
|
37
|
+
service.optionGroupId = action.input.optionGroupId || null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
state.lastModified = action.input.lastModified;
|
|
41
|
+
},
|
|
42
|
+
deleteServiceOperation(state, action) {
|
|
43
|
+
const serviceIndex = state.services.findIndex((s) => s.id === action.input.id);
|
|
44
|
+
if (serviceIndex !== -1) {
|
|
45
|
+
state.services.splice(serviceIndex, 1);
|
|
46
|
+
}
|
|
47
|
+
state.lastModified = action.input.lastModified;
|
|
48
|
+
},
|
|
49
|
+
addFacetBindingOperation(state, action) {
|
|
50
|
+
const service = state.services.find((s) => s.id === action.input.serviceId);
|
|
51
|
+
if (service) {
|
|
52
|
+
service.facetBindings.push({
|
|
53
|
+
id: action.input.bindingId,
|
|
54
|
+
facetName: action.input.facetName,
|
|
55
|
+
facetType: action.input.facetType,
|
|
56
|
+
supportedOptions: action.input.supportedOptions,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
state.lastModified = action.input.lastModified;
|
|
60
|
+
},
|
|
61
|
+
removeFacetBindingOperation(state, action) {
|
|
62
|
+
const service = state.services.find((s) => s.id === action.input.serviceId);
|
|
63
|
+
if (service) {
|
|
64
|
+
const bindingIndex = service.facetBindings.findIndex((fb) => fb.id === action.input.bindingId);
|
|
65
|
+
if (bindingIndex !== -1) {
|
|
66
|
+
service.facetBindings.splice(bindingIndex, 1);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
state.lastModified = action.input.lastModified;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResourceTemplateTemplateManagementOperations } from "@powerhousedao/contributor-billing/document-models/resource-template";
|
|
2
|
+
export declare const resourceTemplateTemplateManagementOperations: ResourceTemplateTemplateManagementOperations;
|
|
3
|
+
//# sourceMappingURL=template-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-management.d.ts","sourceRoot":"","sources":["../../../../document-models/resource-template/reducers/template-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,sEAAsE,CAAC;AAEzI,eAAO,MAAM,4CAA4C,EAAE,4CAgCxD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const resourceTemplateTemplateManagementOperations = {
|
|
2
|
+
updateTemplateInfoOperation(state, action) {
|
|
3
|
+
if (action.input.title) {
|
|
4
|
+
state.title = action.input.title;
|
|
5
|
+
}
|
|
6
|
+
if (action.input.summary) {
|
|
7
|
+
state.summary = action.input.summary;
|
|
8
|
+
}
|
|
9
|
+
if (action.input.description !== undefined) {
|
|
10
|
+
state.description = action.input.description || null;
|
|
11
|
+
}
|
|
12
|
+
if (action.input.thumbnailUrl !== undefined) {
|
|
13
|
+
state.thumbnailUrl = action.input.thumbnailUrl || null;
|
|
14
|
+
}
|
|
15
|
+
if (action.input.infoLink !== undefined) {
|
|
16
|
+
state.infoLink = action.input.infoLink || null;
|
|
17
|
+
}
|
|
18
|
+
state.lastModified = action.input.lastModified;
|
|
19
|
+
},
|
|
20
|
+
updateTemplateStatusOperation(state, action) {
|
|
21
|
+
state.status = action.input.status;
|
|
22
|
+
state.lastModified = action.input.lastModified;
|
|
23
|
+
},
|
|
24
|
+
setOperatorOperation(state, action) {
|
|
25
|
+
state.operatorId = action.input.operatorId;
|
|
26
|
+
state.lastModified = action.input.lastModified;
|
|
27
|
+
},
|
|
28
|
+
setTemplateIdOperation(state, action) {
|
|
29
|
+
state.id = action.input.id;
|
|
30
|
+
state.lastModified = action.input.lastModified;
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience-management.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/audience-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,sEAAsE,CAAC;AAEzI,eAAO,MAAM,4CAA4C,EAAE,
|
|
1
|
+
{"version":3,"file":"audience-management.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/audience-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,sEAAsE,CAAC;AAEzI,eAAO,MAAM,4CAA4C,EAAE,4CAgB1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet-targeting.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/facet-targeting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAErI,eAAO,MAAM,wCAAwC,EAAE,
|
|
1
|
+
{"version":3,"file":"facet-targeting.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/facet-targeting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAErI,eAAO,MAAM,wCAAwC,EAAE,wCA4CtD,CAAC"}
|
package/dist/document-models/resource-template/src/reducers/option-group-management.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-group-management.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/option-group-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+CAA+C,EAAE,MAAM,sEAAsE,CAAC;AAE5I,eAAO,MAAM,+CAA+C,EAAE,+
|
|
1
|
+
{"version":3,"file":"option-group-management.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/option-group-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+CAA+C,EAAE,MAAM,sEAAsE,CAAC;AAE5I,eAAO,MAAM,+CAA+C,EAAE,+CAyC7D,CAAC"}
|
package/dist/document-models/resource-template/src/reducers/service-category-management.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-category-management.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/service-category-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mDAAmD,EAAE,MAAM,sEAAsE,CAAC;AAEhJ,eAAO,MAAM,mDAAmD,EAAE,
|
|
1
|
+
{"version":3,"file":"service-category-management.d.ts","sourceRoot":"","sources":["../../../../../document-models/resource-template/src/reducers/service-category-management.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mDAAmD,EAAE,MAAM,sEAAsE,CAAC;AAEhJ,eAAO,MAAM,mDAAmD,EAAE,mDASjE,CAAC"}
|