@wix/auto_sdk_benefit-programs_program-definitions 1.0.0

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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.context.d.ts +10 -0
  11. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.context.js +16 -0
  12. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.context.js.map +1 -0
  13. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.http.d.ts +35 -0
  14. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.http.js +283 -0
  15. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.http.js.map +1 -0
  16. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.meta.d.ts +24 -0
  17. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.meta.js +142 -0
  18. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.meta.js.map +1 -0
  19. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.public.d.ts +72 -0
  20. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.public.js +46 -0
  21. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.public.js.map +1 -0
  22. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.types.d.ts +319 -0
  23. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.types.js +42 -0
  24. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.types.js.map +1 -0
  25. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.universal.d.ts +528 -0
  26. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.universal.js +323 -0
  27. package/build/cjs/src/benefit-programs-v1-program-definition-program-definitions.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.context.d.ts +10 -0
  39. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.context.js +10 -0
  40. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.context.js.map +1 -0
  41. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.http.d.ts +35 -0
  42. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.http.js +274 -0
  43. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.http.js.map +1 -0
  44. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.meta.d.ts +24 -0
  45. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.meta.js +110 -0
  46. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.meta.js.map +1 -0
  47. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.public.d.ts +72 -0
  48. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.public.js +34 -0
  49. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.public.js.map +1 -0
  50. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.types.d.ts +319 -0
  51. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.types.js +39 -0
  52. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.types.js.map +1 -0
  53. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.universal.d.ts +528 -0
  54. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.universal.js +291 -0
  55. package/build/es/src/benefit-programs-v1-program-definition-program-definitions.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.context.d.ts +10 -0
  66. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.context.js +16 -0
  67. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.context.js.map +1 -0
  68. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.http.d.ts +35 -0
  69. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.http.js +283 -0
  70. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.http.js.map +1 -0
  71. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.meta.d.ts +24 -0
  72. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.meta.js +142 -0
  73. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.meta.js.map +1 -0
  74. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.public.d.ts +72 -0
  75. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.public.js +46 -0
  76. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.public.js.map +1 -0
  77. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.types.d.ts +319 -0
  78. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.types.js +42 -0
  79. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.types.js.map +1 -0
  80. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.universal.d.ts +528 -0
  81. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.universal.js +323 -0
  82. package/build/internal/cjs/src/benefit-programs-v1-program-definition-program-definitions.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.context.d.ts +10 -0
  93. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.context.js +10 -0
  94. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.context.js.map +1 -0
  95. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.http.d.ts +35 -0
  96. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.http.js +274 -0
  97. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.http.js.map +1 -0
  98. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.meta.d.ts +24 -0
  99. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.meta.js +110 -0
  100. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.meta.js.map +1 -0
  101. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.public.d.ts +72 -0
  102. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.public.js +34 -0
  103. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.public.js.map +1 -0
  104. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.types.d.ts +319 -0
  105. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.types.js +39 -0
  106. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.types.js.map +1 -0
  107. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.universal.d.ts +528 -0
  108. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.universal.js +291 -0
  109. package/build/internal/es/src/benefit-programs-v1-program-definition-program-definitions.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,72 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { DeleteProgramDefinitionOptions, GetProgramDefinitionByExternalIdAndNamespaceOptions, GetProgramDefinitionByExternalIdAndNamespaceResponse, ProgramDefinition, ProgramDefinitionsQueryBuilder, UpdateProgramDefinition } from './benefit-programs-v1-program-definition-program-definitions.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function createProgramDefinition(httpClient: HttpClient): CreateProgramDefinitionSignature;
7
+ interface CreateProgramDefinitionSignature {
8
+ /**
9
+ * Creates a new program definition.
10
+ * @param - Program definition to create.
11
+ * @returns Created program definition.
12
+ */
13
+ (programDefinition: ProgramDefinition): Promise<ProgramDefinition>;
14
+ }
15
+ export declare function updateProgramDefinition(httpClient: HttpClient): UpdateProgramDefinitionSignature;
16
+ interface UpdateProgramDefinitionSignature {
17
+ /**
18
+ * Updates a program definition.
19
+ *
20
+ * Each time the program definition is updated,
21
+ * `revision` increments by 1.
22
+ * The current `revision` must be passed when updating the program definition.
23
+ * This ensures you're working with the latest program definition
24
+ * and prevents unintended overwrites.
25
+ * @param - Program definition ID.
26
+ * @returns Updated program definition.
27
+ */
28
+ (_id: string | null, programDefinition: UpdateProgramDefinition): Promise<ProgramDefinition>;
29
+ }
30
+ export declare function deleteProgramDefinition(httpClient: HttpClient): DeleteProgramDefinitionSignature;
31
+ interface DeleteProgramDefinitionSignature {
32
+ /**
33
+ * Deletes a program definition.
34
+ * @param - ID of the ProgramDefinition to delete.
35
+ */
36
+ (programDefinitionId: string, options?: DeleteProgramDefinitionOptions | undefined): Promise<void>;
37
+ }
38
+ export declare function getProgramDefinition(httpClient: HttpClient): GetProgramDefinitionSignature;
39
+ interface GetProgramDefinitionSignature {
40
+ /**
41
+ * Retrieves a program definition.
42
+ * @param - ID of the program definition to retrieve.
43
+ * @returns Retrieved program definition.
44
+ */
45
+ (programDefinitionId: string): Promise<ProgramDefinition>;
46
+ }
47
+ export declare function getProgramDefinitionByExternalIdAndNamespace(httpClient: HttpClient): GetProgramDefinitionByExternalIdAndNamespaceSignature;
48
+ interface GetProgramDefinitionByExternalIdAndNamespaceSignature {
49
+ /**
50
+ * Retrieves a program definition by specifying the program definition's external ID and associated namespace.
51
+ *
52
+ * Use this method when you need to retrieve a program definition without its program definition ID.
53
+ * @param - Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs.
54
+ */
55
+ (namespace: string, options: GetProgramDefinitionByExternalIdAndNamespaceOptions): Promise<GetProgramDefinitionByExternalIdAndNamespaceResponse>;
56
+ }
57
+ export declare function queryProgramDefinitions(httpClient: HttpClient): QueryProgramDefinitionsSignature;
58
+ interface QueryProgramDefinitionsSignature {
59
+ /**
60
+ * Creates a query to retrieve a list of program definitions.
61
+ *
62
+ * The `queryProgramDefinitions()` method builds a query to retrieve a list of program definitions and returns a `ProgramDefinitionsQueryBuilder` object.
63
+ *
64
+ * The returned object contains the query definition, which is used to run the query using the [`find()`](/program-definitions/program-definitions-query-builder/find) function.
65
+ *
66
+ * You can refine the query by chaining `ProgramDefinitionsQueryBuilder` methods onto the query. `ProgramDefinitionsQueryBuilder` methods enable you to filter, sort, and control the results that `queryProgramDefinitions()` returns.
67
+ *
68
+ * The following `ProgramDefinitionsQueryBuilder` functions are supported for `queryProgramDefinitions()`. For a full description of the program definition object, see the object returned for the [`items`](/program-definitions/program-definitions-query-result/items) property in `ProgramDefinitionsQueryResult`.
69
+ */
70
+ (): ProgramDefinitionsQueryBuilder;
71
+ }
72
+ export { ActionEvent, Cascade, CreateProgramDefinitionRequest, CreateProgramDefinitionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteProgramDefinitionOptions, DeleteProgramDefinitionRequest, DeleteProgramDefinitionResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, GetOrCreateProgramDefinitionRequest, GetOrCreateProgramDefinitionResponse, GetProgramDefinitionByExternalIdAndNamespaceOptions, GetProgramDefinitionByExternalIdAndNamespaceRequest, GetProgramDefinitionByExternalIdAndNamespaceResponse, GetProgramDefinitionRequest, GetProgramDefinitionResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, ProgramDefinition, ProgramDefinitionsQueryBuilder, ProgramDefinitionsQueryResult, QueryProgramDefinitionsRequest, QueryProgramDefinitionsResponse, RestoreInfo, SortOrder, Sorting, UpdateProgramDefinition, UpdateProgramDefinitionRequest, UpdateProgramDefinitionResponse, UpsertProgramDefinitionRequest, UpsertProgramDefinitionResponse, WebhookIdentityType, } from './benefit-programs-v1-program-definition-program-definitions.universal.js';
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.SortOrder = exports.Cascade = exports.queryProgramDefinitions = exports.getProgramDefinitionByExternalIdAndNamespace = exports.getProgramDefinition = exports.deleteProgramDefinition = exports.updateProgramDefinition = exports.createProgramDefinition = exports.__metadata = void 0;
4
+ const benefit_programs_v1_program_definition_program_definitions_universal_js_1 = require("./benefit-programs-v1-program-definition-program-definitions.universal.js");
5
+ exports.__metadata = { PACKAGE_NAME: '@wix/benefit-programs' };
6
+ function createProgramDefinition(httpClient) {
7
+ return (programDefinition) => (0, benefit_programs_v1_program_definition_program_definitions_universal_js_1.createProgramDefinition)(programDefinition,
8
+ // @ts-ignore
9
+ { httpClient });
10
+ }
11
+ exports.createProgramDefinition = createProgramDefinition;
12
+ function updateProgramDefinition(httpClient) {
13
+ return (_id, programDefinition) => (0, benefit_programs_v1_program_definition_program_definitions_universal_js_1.updateProgramDefinition)(_id, programDefinition,
14
+ // @ts-ignore
15
+ { httpClient });
16
+ }
17
+ exports.updateProgramDefinition = updateProgramDefinition;
18
+ function deleteProgramDefinition(httpClient) {
19
+ return (programDefinitionId, options) => (0, benefit_programs_v1_program_definition_program_definitions_universal_js_1.deleteProgramDefinition)(programDefinitionId, options,
20
+ // @ts-ignore
21
+ { httpClient });
22
+ }
23
+ exports.deleteProgramDefinition = deleteProgramDefinition;
24
+ function getProgramDefinition(httpClient) {
25
+ return (programDefinitionId) => (0, benefit_programs_v1_program_definition_program_definitions_universal_js_1.getProgramDefinition)(programDefinitionId,
26
+ // @ts-ignore
27
+ { httpClient });
28
+ }
29
+ exports.getProgramDefinition = getProgramDefinition;
30
+ function getProgramDefinitionByExternalIdAndNamespace(httpClient) {
31
+ return (namespace, options) => (0, benefit_programs_v1_program_definition_program_definitions_universal_js_1.getProgramDefinitionByExternalIdAndNamespace)(namespace, options,
32
+ // @ts-ignore
33
+ { httpClient });
34
+ }
35
+ exports.getProgramDefinitionByExternalIdAndNamespace = getProgramDefinitionByExternalIdAndNamespace;
36
+ function queryProgramDefinitions(httpClient) {
37
+ return () => (0, benefit_programs_v1_program_definition_program_definitions_universal_js_1.queryProgramDefinitions)(
38
+ // @ts-ignore
39
+ { httpClient });
40
+ }
41
+ exports.queryProgramDefinitions = queryProgramDefinitions;
42
+ var benefit_programs_v1_program_definition_program_definitions_universal_js_2 = require("./benefit-programs-v1-program-definition-program-definitions.universal.js");
43
+ Object.defineProperty(exports, "Cascade", { enumerable: true, get: function () { return benefit_programs_v1_program_definition_program_definitions_universal_js_2.Cascade; } });
44
+ Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return benefit_programs_v1_program_definition_program_definitions_universal_js_2.SortOrder; } });
45
+ Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return benefit_programs_v1_program_definition_program_definitions_universal_js_2.WebhookIdentityType; } });
46
+ //# sourceMappingURL=benefit-programs-v1-program-definition-program-definitions.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benefit-programs-v1-program-definition-program-definitions.public.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-definition-program-definitions.public.ts"],"names":[],"mappings":";;;AACA,uKAamF;AAEtE,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAEpE,SAAgB,uBAAuB,CACrC,UAAsB;IAEtB,OAAO,CAAC,iBAAoC,EAAE,EAAE,CAC9C,IAAA,iGAAgC,EAC9B,iBAAiB;IACjB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,0DASC;AAWD,SAAgB,uBAAuB,CACrC,UAAsB;IAEtB,OAAO,CAAC,GAAkB,EAAE,iBAA0C,EAAE,EAAE,CACxE,IAAA,iGAAgC,EAC9B,GAAG,EACH,iBAAiB;IACjB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAVD,0DAUC;AAoBD,SAAgB,uBAAuB,CACrC,UAAsB;IAEtB,OAAO,CACL,mBAA2B,EAC3B,OAAwC,EACxC,EAAE,CACF,IAAA,iGAAgC,EAC9B,mBAAmB,EACnB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAbD,0DAaC;AAaD,SAAgB,oBAAoB,CAClC,UAAsB;IAEtB,OAAO,CAAC,mBAA2B,EAAE,EAAE,CACrC,IAAA,8FAA6B,EAC3B,mBAAmB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,oDASC;AAWD,SAAgB,4CAA4C,CAC1D,UAAsB;IAEtB,OAAO,CACL,SAAiB,EACjB,OAA4D,EAC5D,EAAE,CACF,IAAA,sHAAqD,EACnD,SAAS,EACT,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAbD,oGAaC;AAeD,SAAgB,uBAAuB,CACrC,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,IAAA,iGAAgC;IAC9B,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,0DAQC;AAiBD,qKA2CmF;AAzCjF,kKAAA,OAAO,OAAA;AAiCP,oKAAA,SAAS,OAAA;AAOT,8KAAA,mBAAmB,OAAA"}
@@ -0,0 +1,319 @@
1
+ export interface ProgramDefinition {
2
+ /**
3
+ * Program definition ID.
4
+ * @readonly
5
+ */
6
+ id?: string | null;
7
+ /**
8
+ * Revision number, which increments by 1 each time the program definition is updated.
9
+ * To prevent conflicting changes, the current revision must be passed when updating the program definition.
10
+ *
11
+ * Ignored when creating a program definition.
12
+ * @readonly
13
+ */
14
+ revision?: string | null;
15
+ /**
16
+ * Date and time the program definition was created.
17
+ * @readonly
18
+ */
19
+ createdDate?: Date | null;
20
+ /**
21
+ * Date and time the program definition was updated.
22
+ * @readonly
23
+ */
24
+ updatedDate?: Date | null;
25
+ /** Name of the program associated with this program definition. This name will be the same for all programs provisioned from this program definition. */
26
+ displayName?: string | null;
27
+ /** Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs. */
28
+ namespace?: string | null;
29
+ /**
30
+ * Custom field data for the program definition object.
31
+ * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.
32
+ */
33
+ extendedFields?: ExtendedFields;
34
+ /** External program definition ID designated by the app owner. */
35
+ externalId?: string | null;
36
+ }
37
+ export interface ExtendedFields {
38
+ /**
39
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
40
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
41
+ *
42
+ * You can only access fields for which you have the appropriate permissions.
43
+ *
44
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
45
+ */
46
+ namespaces?: Record<string, Record<string, any>>;
47
+ }
48
+ export interface CreateProgramDefinitionRequest {
49
+ /** Program definition to create. */
50
+ programDefinition: ProgramDefinition;
51
+ }
52
+ export interface CreateProgramDefinitionResponse {
53
+ /** Created program definition. */
54
+ programDefinition?: ProgramDefinition;
55
+ }
56
+ export interface UpdateProgramDefinitionRequest {
57
+ /** Program definition to updated. */
58
+ programDefinition: ProgramDefinition;
59
+ }
60
+ export interface UpdateProgramDefinitionResponse {
61
+ /** Updated program definition. */
62
+ programDefinition?: ProgramDefinition;
63
+ }
64
+ export interface DeleteProgramDefinitionRequest {
65
+ /** ID of the ProgramDefinition to delete. */
66
+ programDefinitionId: string;
67
+ /**
68
+ * Specifies the timing of ending the active benefit pools associated with this program definition.
69
+ * Determines how and when changes are applied to benefit pools.
70
+ */
71
+ cascadeType?: Cascade;
72
+ }
73
+ export declare enum Cascade {
74
+ /** Unknown cascade. */
75
+ UNKNOWN_CASCADE = "UNKNOWN_CASCADE",
76
+ /**
77
+ * Updates the associated benefit pools to reflect the new or modified pool definition. The benefits will appear in existing programs at the beginning of their next renewal cycle.
78
+ *
79
+ * Existing programs will be updated in their next renewal cycle.
80
+ */
81
+ NEXT_RENEWAL = "NEXT_RENEWAL",
82
+ /**
83
+ * Updates the associated benefit pools to reflect the new or modified pool definition immediately.
84
+ *
85
+ * Existing programs will be updated immediately.
86
+ */
87
+ IMMEDIATELY = "IMMEDIATELY",
88
+ /**
89
+ * Updates the associated benefit pools to reflect the new or modified pool definition the next time the benefit pools are provisioned to a program.
90
+ *
91
+ * Existing programs will remain unaffected. Only newly purchased programs will display the benefits of this pool definition.
92
+ */
93
+ FUTURE_PROVISIONS = "FUTURE_PROVISIONS"
94
+ }
95
+ export interface DeleteProgramDefinitionResponse {
96
+ }
97
+ export interface GetProgramDefinitionRequest {
98
+ /** ID of the program definition to retrieve. */
99
+ programDefinitionId: string;
100
+ }
101
+ export interface GetProgramDefinitionResponse {
102
+ /** Retrieved program definition. */
103
+ programDefinition?: ProgramDefinition;
104
+ }
105
+ export interface GetProgramDefinitionByExternalIdAndNamespaceRequest {
106
+ /** Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs. */
107
+ namespace: string;
108
+ /** External program definition ID. */
109
+ externalId: string;
110
+ }
111
+ export interface GetProgramDefinitionByExternalIdAndNamespaceResponse {
112
+ /** The retrieved program definition. */
113
+ programDefinition?: ProgramDefinition;
114
+ }
115
+ export interface QueryProgramDefinitionsRequest {
116
+ /** Query to select program definitions. */
117
+ query?: CursorQuery;
118
+ }
119
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
120
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
121
+ cursorPaging?: CursorPaging;
122
+ /**
123
+ * Filter object in the following format:
124
+ * `"filter" : {
125
+ * "fieldName1": "value1",
126
+ * "fieldName2":{"$operator":"value2"}
127
+ * }`
128
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
129
+ */
130
+ filter?: Record<string, any> | null;
131
+ /**
132
+ * Sort object in the following format:
133
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
134
+ */
135
+ sort?: Sorting[];
136
+ }
137
+ /** @oneof */
138
+ export interface CursorQueryPagingMethodOneOf {
139
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
140
+ cursorPaging?: CursorPaging;
141
+ }
142
+ export interface Sorting {
143
+ /** Name of the field to sort by. */
144
+ fieldName?: string;
145
+ /** Sort order. */
146
+ order?: SortOrder;
147
+ }
148
+ export declare enum SortOrder {
149
+ /** Ascending sort order. */
150
+ ASC = "ASC",
151
+ /** Descending sort order. */
152
+ DESC = "DESC"
153
+ }
154
+ export interface CursorPaging {
155
+ /** Maximum number of items to return in the results. */
156
+ limit?: number | null;
157
+ /**
158
+ * Pointer to the next or previous page in the list of results.
159
+ *
160
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
161
+ * Not relevant for the first request.
162
+ */
163
+ cursor?: string | null;
164
+ }
165
+ export interface QueryProgramDefinitionsResponse {
166
+ /** List of program definitions. */
167
+ programDefinitions?: ProgramDefinition[];
168
+ /** Metadata for the paginated results. */
169
+ metadata?: CursorPagingMetadata;
170
+ }
171
+ export interface CursorPagingMetadata {
172
+ /** Number of items returned in the response. */
173
+ count?: number | null;
174
+ /** Cursor strings that point to the next page, previous page, or both. */
175
+ cursors?: Cursors;
176
+ /**
177
+ * Whether there are more pages to retrieve following the current page.
178
+ *
179
+ * + `true`: Another page of results can be retrieved.
180
+ * + `false`: This is the last page.
181
+ */
182
+ hasNext?: boolean | null;
183
+ }
184
+ export interface Cursors {
185
+ /** Cursor string pointing to the next page in the list of results. */
186
+ next?: string | null;
187
+ /** Cursor pointing to the previous page in the list of results. */
188
+ prev?: string | null;
189
+ }
190
+ export interface UpsertProgramDefinitionRequest {
191
+ /** Program definition to be created or updated. */
192
+ programDefinition?: ProgramDefinition;
193
+ }
194
+ export interface UpsertProgramDefinitionResponse {
195
+ /** Created or updated program definition. */
196
+ programDefinition?: ProgramDefinition;
197
+ }
198
+ export interface GetOrCreateProgramDefinitionRequest {
199
+ /** Application sub-module that represents the source of the program definition. Specified by the external developer. This namespace is used to handle and retrieve program definition and associated programs. */
200
+ namespace?: string;
201
+ /** External program definition ID. */
202
+ externalId?: string;
203
+ }
204
+ export interface GetOrCreateProgramDefinitionResponse {
205
+ /** The created or updated program definition. */
206
+ programDefinition?: ProgramDefinition;
207
+ }
208
+ export interface DomainEvent extends DomainEventBodyOneOf {
209
+ createdEvent?: EntityCreatedEvent;
210
+ updatedEvent?: EntityUpdatedEvent;
211
+ deletedEvent?: EntityDeletedEvent;
212
+ actionEvent?: ActionEvent;
213
+ /**
214
+ * Unique event ID.
215
+ * Allows clients to ignore duplicate webhooks.
216
+ */
217
+ id?: string;
218
+ /**
219
+ * Assumes actions are also always typed to an entity_type
220
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
221
+ */
222
+ entityFqdn?: string;
223
+ /**
224
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
225
+ * This is although the created/updated/deleted notion is duplication of the oneof types
226
+ * Example: created/updated/deleted/started/completed/email_opened
227
+ */
228
+ slug?: string;
229
+ /** ID of the entity associated with the event. */
230
+ entityId?: string;
231
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
232
+ eventTime?: Date | null;
233
+ /**
234
+ * Whether the event was triggered as a result of a privacy regulation application
235
+ * (for example, GDPR).
236
+ */
237
+ triggeredByAnonymizeRequest?: boolean | null;
238
+ /** If present, indicates the action that triggered the event. */
239
+ originatedFrom?: string | null;
240
+ /**
241
+ * A sequence number defining the order of updates to the underlying entity.
242
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
243
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
244
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
245
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
246
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
247
+ */
248
+ entityEventSequence?: string | null;
249
+ }
250
+ /** @oneof */
251
+ export interface DomainEventBodyOneOf {
252
+ createdEvent?: EntityCreatedEvent;
253
+ updatedEvent?: EntityUpdatedEvent;
254
+ deletedEvent?: EntityDeletedEvent;
255
+ actionEvent?: ActionEvent;
256
+ }
257
+ export interface EntityCreatedEvent {
258
+ entityAsJson?: string;
259
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
260
+ restoreInfo?: RestoreInfo;
261
+ }
262
+ export interface RestoreInfo {
263
+ deletedDate?: Date | null;
264
+ }
265
+ export interface EntityUpdatedEvent {
266
+ /**
267
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
268
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
269
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
270
+ */
271
+ currentEntityAsJson?: string;
272
+ }
273
+ export interface EntityDeletedEvent {
274
+ /** Entity that was deleted */
275
+ deletedEntityAsJson?: string | null;
276
+ }
277
+ export interface ActionEvent {
278
+ bodyAsJson?: string;
279
+ }
280
+ export interface MessageEnvelope {
281
+ /** App instance ID. */
282
+ instanceId?: string | null;
283
+ /** Event type. */
284
+ eventType?: string;
285
+ /** The identification type and identity data. */
286
+ identity?: IdentificationData;
287
+ /** Stringify payload. */
288
+ data?: string;
289
+ }
290
+ export interface IdentificationData extends IdentificationDataIdOneOf {
291
+ /** ID of a site visitor that has not logged in to the site. */
292
+ anonymousVisitorId?: string;
293
+ /** ID of a site visitor that has logged in to the site. */
294
+ memberId?: string;
295
+ /** ID of a Wix user (site owner, contributor, etc.). */
296
+ wixUserId?: string;
297
+ /** ID of an app. */
298
+ appId?: string;
299
+ /** @readonly */
300
+ identityType?: WebhookIdentityType;
301
+ }
302
+ /** @oneof */
303
+ export interface IdentificationDataIdOneOf {
304
+ /** ID of a site visitor that has not logged in to the site. */
305
+ anonymousVisitorId?: string;
306
+ /** ID of a site visitor that has logged in to the site. */
307
+ memberId?: string;
308
+ /** ID of a Wix user (site owner, contributor, etc.). */
309
+ wixUserId?: string;
310
+ /** ID of an app. */
311
+ appId?: string;
312
+ }
313
+ export declare enum WebhookIdentityType {
314
+ UNKNOWN = "UNKNOWN",
315
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
316
+ MEMBER = "MEMBER",
317
+ WIX_USER = "WIX_USER",
318
+ APP = "APP"
319
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.SortOrder = exports.Cascade = void 0;
4
+ var Cascade;
5
+ (function (Cascade) {
6
+ /** Unknown cascade. */
7
+ Cascade["UNKNOWN_CASCADE"] = "UNKNOWN_CASCADE";
8
+ /**
9
+ * Updates the associated benefit pools to reflect the new or modified pool definition. The benefits will appear in existing programs at the beginning of their next renewal cycle.
10
+ *
11
+ * Existing programs will be updated in their next renewal cycle.
12
+ */
13
+ Cascade["NEXT_RENEWAL"] = "NEXT_RENEWAL";
14
+ /**
15
+ * Updates the associated benefit pools to reflect the new or modified pool definition immediately.
16
+ *
17
+ * Existing programs will be updated immediately.
18
+ */
19
+ Cascade["IMMEDIATELY"] = "IMMEDIATELY";
20
+ /**
21
+ * Updates the associated benefit pools to reflect the new or modified pool definition the next time the benefit pools are provisioned to a program.
22
+ *
23
+ * Existing programs will remain unaffected. Only newly purchased programs will display the benefits of this pool definition.
24
+ */
25
+ Cascade["FUTURE_PROVISIONS"] = "FUTURE_PROVISIONS";
26
+ })(Cascade || (exports.Cascade = Cascade = {}));
27
+ var SortOrder;
28
+ (function (SortOrder) {
29
+ /** Ascending sort order. */
30
+ SortOrder["ASC"] = "ASC";
31
+ /** Descending sort order. */
32
+ SortOrder["DESC"] = "DESC";
33
+ })(SortOrder || (exports.SortOrder = SortOrder = {}));
34
+ var WebhookIdentityType;
35
+ (function (WebhookIdentityType) {
36
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
37
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
38
+ WebhookIdentityType["MEMBER"] = "MEMBER";
39
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
40
+ WebhookIdentityType["APP"] = "APP";
41
+ })(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
42
+ //# sourceMappingURL=benefit-programs-v1-program-definition-program-definitions.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"benefit-programs-v1-program-definition-program-definitions.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-definition-program-definitions.types.ts"],"names":[],"mappings":";;;AA+EA,IAAY,OAqBX;AArBD,WAAY,OAAO;IACjB,uBAAuB;IACvB,8CAAmC,CAAA;IACnC;;;;OAIG;IACH,wCAA6B,CAAA;IAC7B;;;;OAIG;IACH,sCAA2B,CAAA;IAC3B;;;;OAIG;IACH,kDAAuC,CAAA;AACzC,CAAC,EArBW,OAAO,uBAAP,OAAO,QAqBlB;AA+DD,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAA4B;IAC5B,wBAAW,CAAA;IACX,6BAA6B;IAC7B,0BAAa,CAAA;AACf,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAmLD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}