@wix/auto_sdk_benefit-programs_programs 1.0.1 → 1.0.2
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/build/cjs/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
- package/build/cjs/src/benefit-programs-v1-program-programs.http.js +19 -25
- package/build/cjs/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
- package/build/cjs/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.types.d.ts +39 -66
- package/build/cjs/src/benefit-programs-v1-program-programs.types.js +9 -13
- package/build/cjs/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.universal.d.ts +69 -117
- package/build/cjs/src/benefit-programs-v1-program-programs.universal.js +27 -37
- package/build/cjs/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
- package/build/es/src/benefit-programs-v1-program-programs.http.js +19 -25
- package/build/es/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
- package/build/es/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.types.d.ts +39 -66
- package/build/es/src/benefit-programs-v1-program-programs.types.js +9 -13
- package/build/es/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.universal.d.ts +69 -117
- package/build/es/src/benefit-programs-v1-program-programs.universal.js +27 -37
- package/build/es/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.js +19 -25
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.d.ts +39 -66
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.js +9 -13
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.d.ts +69 -117
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.js +27 -37
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
- package/build/internal/es/src/benefit-programs-v1-program-programs.http.js +19 -25
- package/build/internal/es/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
- package/build/internal/es/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.types.d.ts +39 -66
- package/build/internal/es/src/benefit-programs-v1-program-programs.types.js +9 -13
- package/build/internal/es/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.universal.d.ts +69 -117
- package/build/internal/es/src/benefit-programs-v1-program-programs.universal.js +27 -37
- package/build/internal/es/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benefit-programs-v1-program-programs.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-programs.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"benefit-programs-v1-program-programs.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-programs.types.ts"],"names":[],"mappings":";;;AA6EA,IAAY,aAiBX;AAjBD,WAAY,aAAa;IACvB,gCAAgC;IAChC,wCAAuB,CAAA;IACvB,yBAAyB;IACzB,kCAAiB,CAAA;IACjB,4CAA4C;IAC5C,kCAAiB,CAAA;IACjB,8CAA8C;IAC9C,gCAAe,CAAA;IACf,+GAA+G;IAC/G,8CAA6B,CAAA;IAC7B,yFAAyF;IACzF,oCAAmB,CAAA;IACnB,kHAAkH;IAClH,sCAAqB,CAAA;IACrB,wFAAwF;IACxF,kCAAiB,CAAA;AACnB,CAAC,EAjBW,aAAa,6BAAb,aAAa,QAiBxB;AAwCD,IAAY,YASX;AATD,WAAY,YAAY;IACtB,4CAA4C;IAC5C,mCAAmB,CAAA;IACnB,4CAA4C;IAC5C,uDAAuC,CAAA;IACvC,+BAA+B;IAC/B,iCAAiB,CAAA;IACjB,iEAAiE;IACjE,qCAAqB,CAAA;AACvB,CAAC,EATW,YAAY,4BAAZ,YAAY,QASvB;AAiHD,IAAY,oCAKX;AALD,WAAY,oCAAoC;IAC9C,yBAAyB;IACzB,yDAAiB,CAAA;IACjB,yBAAyB;IACzB,yDAAiB,CAAA;AACnB,CAAC,EALW,oCAAoC,oDAApC,oCAAoC,QAK/C;AA6ID,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;AACjB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAuED,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAA4B;IAC5B,wBAAW,CAAA;IACX,6BAA6B;IAC7B,0BAAa,CAAA;AACf,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AA4ND,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"}
|
|
@@ -25,7 +25,7 @@ export interface Program {
|
|
|
25
25
|
*/
|
|
26
26
|
_updatedDate?: Date | null;
|
|
27
27
|
/**
|
|
28
|
-
* ID of program definition
|
|
28
|
+
* ID of the associated program definition.
|
|
29
29
|
* @format GUID
|
|
30
30
|
* @readonly
|
|
31
31
|
* @immutable
|
|
@@ -37,7 +37,7 @@ export interface Program {
|
|
|
37
37
|
*/
|
|
38
38
|
status?: ProgramStatus;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Program beneficiary.
|
|
41
41
|
* @readonly
|
|
42
42
|
* @immutable
|
|
43
43
|
*/
|
|
@@ -45,12 +45,12 @@ export interface Program {
|
|
|
45
45
|
/**
|
|
46
46
|
* Program name.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
48
|
+
* You may want to use the same name that's used in the associated program definition, if it exists.
|
|
49
49
|
* @maxLength 64
|
|
50
50
|
*/
|
|
51
51
|
displayName?: string | null;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Namespace for your app or site's benefit programs.
|
|
54
54
|
* @minLength 1
|
|
55
55
|
* @maxLength 50
|
|
56
56
|
* @immutable
|
|
@@ -59,63 +59,52 @@ export interface Program {
|
|
|
59
59
|
/**
|
|
60
60
|
* Custom field data for the program object.
|
|
61
61
|
*
|
|
62
|
-
* [Extended fields](https://dev.wix.com/docs/
|
|
62
|
+
* [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.
|
|
63
63
|
*/
|
|
64
64
|
extendedFields?: ExtendedFields;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* Must be unique to every app's namespace.
|
|
66
|
+
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
69
67
|
* @format GUID
|
|
70
68
|
* @immutable
|
|
71
69
|
*/
|
|
72
70
|
externalId?: string | null;
|
|
73
71
|
/**
|
|
74
|
-
*
|
|
72
|
+
* Associated program definition information.
|
|
75
73
|
* @readonly
|
|
76
74
|
*/
|
|
77
75
|
programDefinition?: ProgramDefinitionInfo;
|
|
78
|
-
/**
|
|
79
|
-
* Intended status of a program after the completion of an action.
|
|
80
|
-
* @readonly
|
|
81
|
-
*/
|
|
82
|
-
targetStatus?: ProgramStatus;
|
|
83
76
|
}
|
|
84
77
|
export declare enum ProgramStatus {
|
|
85
78
|
/** Undefined program status. */
|
|
86
79
|
UNDEFINED = "UNDEFINED",
|
|
87
|
-
/**
|
|
80
|
+
/** Program is active. */
|
|
88
81
|
ACTIVE = "ACTIVE",
|
|
89
|
-
/**
|
|
82
|
+
/** Program is paused. It can be resumed. */
|
|
90
83
|
PAUSED = "PAUSED",
|
|
91
|
-
/**
|
|
92
|
-
* Inactive program.
|
|
93
|
-
*
|
|
94
|
-
* Benefits of a program with an `ENDED` status can't be redeemed or reserved.
|
|
95
|
-
*/
|
|
84
|
+
/** Program has ended. It can't be resumed. */
|
|
96
85
|
ENDED = "ENDED",
|
|
97
|
-
/**
|
|
86
|
+
/** Program is being activated for the first time. This status will be true for a negligible amount of time. */
|
|
98
87
|
PROVISIONING = "PROVISIONING",
|
|
99
|
-
/**
|
|
88
|
+
/** Program is being paused. This status will be true for a negligible amount of time. */
|
|
100
89
|
PAUSING = "PAUSING",
|
|
101
|
-
/**
|
|
90
|
+
/** Program is being re-activated after being paused. This status will be true for a negligible amount of time. */
|
|
102
91
|
RESUMING = "RESUMING",
|
|
103
|
-
/**
|
|
92
|
+
/** Program is being ended. This status will be true for a negligible amount of time. */
|
|
104
93
|
ENDING = "ENDING"
|
|
105
94
|
}
|
|
106
95
|
export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
107
96
|
/**
|
|
108
|
-
* ID of a site visitor that
|
|
97
|
+
* ID of a site visitor that hasn't logged in to the site.
|
|
109
98
|
* @format GUID
|
|
110
99
|
*/
|
|
111
100
|
anonymousVisitorId?: string;
|
|
112
101
|
/**
|
|
113
|
-
* ID of a site
|
|
102
|
+
* ID of a site member.
|
|
114
103
|
* @format GUID
|
|
115
104
|
*/
|
|
116
105
|
memberId?: string;
|
|
117
106
|
/**
|
|
118
|
-
* ID of a Wix user
|
|
107
|
+
* ID of a Wix user.
|
|
119
108
|
* @format GUID
|
|
120
109
|
*/
|
|
121
110
|
wixUserId?: string;
|
|
@@ -123,17 +112,17 @@ export interface CommonIdentificationData extends CommonIdentificationDataIdOneO
|
|
|
123
112
|
/** @oneof */
|
|
124
113
|
export interface CommonIdentificationDataIdOneOf {
|
|
125
114
|
/**
|
|
126
|
-
* ID of a site visitor that
|
|
115
|
+
* ID of a site visitor that hasn't logged in to the site.
|
|
127
116
|
* @format GUID
|
|
128
117
|
*/
|
|
129
118
|
anonymousVisitorId?: string;
|
|
130
119
|
/**
|
|
131
|
-
* ID of a site
|
|
120
|
+
* ID of a site member.
|
|
132
121
|
* @format GUID
|
|
133
122
|
*/
|
|
134
123
|
memberId?: string;
|
|
135
124
|
/**
|
|
136
|
-
* ID of a Wix user
|
|
125
|
+
* ID of a Wix user.
|
|
137
126
|
* @format GUID
|
|
138
127
|
*/
|
|
139
128
|
wixUserId?: string;
|
|
@@ -161,15 +150,13 @@ export interface ExtendedFields {
|
|
|
161
150
|
}
|
|
162
151
|
export interface ProgramDefinitionInfo {
|
|
163
152
|
/**
|
|
164
|
-
*
|
|
153
|
+
* Program definition ID.
|
|
165
154
|
* @format GUID
|
|
166
155
|
* @readonly
|
|
167
156
|
*/
|
|
168
157
|
_id?: string;
|
|
169
158
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
* This identifies the source program definition in the external system.
|
|
159
|
+
* Program definition external ID.
|
|
173
160
|
* @format GUID
|
|
174
161
|
* @readonly
|
|
175
162
|
*/
|
|
@@ -197,30 +184,18 @@ export interface ProgramResumed {
|
|
|
197
184
|
}
|
|
198
185
|
/** In case pool_definition_id is provided should test if it's part of a package. If it is, reject the request */
|
|
199
186
|
export interface ProvisionProgramRequest {
|
|
200
|
-
/**
|
|
201
|
-
* Used to locate the pool definition for creating its benefit pools within the program.
|
|
202
|
-
*
|
|
203
|
-
* This object must contain either `programDefinitionId` or `poolDefinitionId`:
|
|
204
|
-
* + Use `programDefinitionId` for programs with multiple benefit pools.
|
|
205
|
-
* + Use `poolDefinitionId` for a program with just 1 benefit pool.
|
|
206
|
-
*/
|
|
187
|
+
/** The program definition or pool definition to use to provision the program. */
|
|
207
188
|
poolDefinitionLookupId: PoolDefinitionLookupId;
|
|
208
|
-
/**
|
|
209
|
-
* Identity of the individual that enrolled in the program, granting access to its associated benefits.
|
|
210
|
-
*
|
|
211
|
-
* The beneficiary's identity information is in their access token. To retrieve their identity, pass the access token from your frontend site to your backend, then call the Token Info ([SDK](https://dev.wix.com/docs/sdk/core-modules/essentials/auth#gettokeninfo)|[REST](https://dev.wix.com/docs/rest/app-management/oauth-2/token-info)) method. The returned `subjectType` and `subjectId` correspond to the identity type and ID of the beneficiary.
|
|
212
|
-
*/
|
|
189
|
+
/** Program beneficiary. */
|
|
213
190
|
beneficiary: CommonIdentificationData;
|
|
214
191
|
/**
|
|
215
|
-
*
|
|
192
|
+
* Initial program status.
|
|
216
193
|
*
|
|
217
194
|
* Default: `ACTIVE`
|
|
218
195
|
*/
|
|
219
196
|
programStatus?: ProvisionProgramRequestProgramStatus;
|
|
220
197
|
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* Use the namespace that was designated to the program definition.
|
|
198
|
+
* Namespace for your app or site's benefit programs.
|
|
224
199
|
* @minLength 1
|
|
225
200
|
* @maxLength 50
|
|
226
201
|
*/
|
|
@@ -228,14 +203,12 @@ export interface ProvisionProgramRequest {
|
|
|
228
203
|
/**
|
|
229
204
|
* Program name.
|
|
230
205
|
*
|
|
231
|
-
*
|
|
206
|
+
* You may want to use the same name that's used in the associated program definition, if it exists.
|
|
232
207
|
* @maxLength 64
|
|
233
208
|
*/
|
|
234
209
|
displayName?: string | null;
|
|
235
210
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* Must be unique to every app owner's namespace.
|
|
211
|
+
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
239
212
|
* @format GUID
|
|
240
213
|
*/
|
|
241
214
|
externalProgramId: string;
|
|
@@ -266,14 +239,14 @@ export interface PoolDefinitionLookupIdIdOneOf {
|
|
|
266
239
|
programDefinitionId?: string;
|
|
267
240
|
}
|
|
268
241
|
export declare enum ProvisionProgramRequestProgramStatus {
|
|
269
|
-
/**
|
|
242
|
+
/** Program is active. */
|
|
270
243
|
ACTIVE = "ACTIVE",
|
|
271
|
-
/**
|
|
244
|
+
/** Program is paused. */
|
|
272
245
|
PAUSED = "PAUSED"
|
|
273
246
|
}
|
|
274
247
|
export interface ProvisionProgramResponse {
|
|
275
248
|
/**
|
|
276
|
-
* Job ID of the
|
|
249
|
+
* Job ID of the provisioning of the program.
|
|
277
250
|
* @format GUID
|
|
278
251
|
*/
|
|
279
252
|
jobId?: string;
|
|
@@ -302,7 +275,7 @@ export interface RenewProgramRequest {
|
|
|
302
275
|
}
|
|
303
276
|
export interface RenewProgramResponse {
|
|
304
277
|
/**
|
|
305
|
-
* Job ID of the
|
|
278
|
+
* Job ID of the program renewal.
|
|
306
279
|
* @format GUID
|
|
307
280
|
*/
|
|
308
281
|
jobId?: string;
|
|
@@ -316,7 +289,7 @@ export interface PauseProgramRequest {
|
|
|
316
289
|
}
|
|
317
290
|
export interface PauseProgramResponse {
|
|
318
291
|
/**
|
|
319
|
-
* Job ID of the
|
|
292
|
+
* Job ID of the pausing of the program.
|
|
320
293
|
* @format GUID
|
|
321
294
|
*/
|
|
322
295
|
jobId?: string;
|
|
@@ -336,21 +309,21 @@ export interface ResumeProgramRequest {
|
|
|
336
309
|
}
|
|
337
310
|
export interface ResumeProgramResponse {
|
|
338
311
|
/**
|
|
339
|
-
* Job ID of the
|
|
312
|
+
* Job ID of the resuming of the program.
|
|
340
313
|
* @format GUID
|
|
341
314
|
*/
|
|
342
315
|
jobId?: string;
|
|
343
316
|
}
|
|
344
317
|
export interface EndProgramRequest {
|
|
345
318
|
/**
|
|
346
|
-
*
|
|
319
|
+
* ID of the program to end.
|
|
347
320
|
* @format GUID
|
|
348
321
|
*/
|
|
349
322
|
programId: string;
|
|
350
323
|
}
|
|
351
324
|
export interface EndProgramResponse {
|
|
352
325
|
/**
|
|
353
|
-
* Job ID of the
|
|
326
|
+
* Job ID of the ending of the program.
|
|
354
327
|
* @format GUID
|
|
355
328
|
*/
|
|
356
329
|
jobId?: string;
|
|
@@ -407,7 +380,7 @@ export interface UpsertMigratedProgramResponse {
|
|
|
407
380
|
program?: Program;
|
|
408
381
|
}
|
|
409
382
|
export interface UpdateProgramRequest {
|
|
410
|
-
/** Program to
|
|
383
|
+
/** Program to update. */
|
|
411
384
|
program: Program;
|
|
412
385
|
}
|
|
413
386
|
export interface UpdateProgramResponse {
|
|
@@ -426,7 +399,7 @@ export interface GetProgramResponse {
|
|
|
426
399
|
program?: Program;
|
|
427
400
|
}
|
|
428
401
|
export interface QueryProgramsRequest {
|
|
429
|
-
/**
|
|
402
|
+
/** Filter, sort, and paging to apply to the query. */
|
|
430
403
|
query?: CursorQuery;
|
|
431
404
|
}
|
|
432
405
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -484,7 +457,7 @@ export interface CursorPaging {
|
|
|
484
457
|
cursor?: string | null;
|
|
485
458
|
}
|
|
486
459
|
export interface QueryProgramsResponse {
|
|
487
|
-
/** List of programs. */
|
|
460
|
+
/** List of retrieved programs. */
|
|
488
461
|
programs?: Program[];
|
|
489
462
|
/** Metadata for the paginated results. */
|
|
490
463
|
metadata?: CursorPagingMetadata;
|
|
@@ -719,12 +692,12 @@ export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
|
|
|
719
692
|
program?: ProgramNonNullableFields;
|
|
720
693
|
}
|
|
721
694
|
/**
|
|
722
|
-
* Creates
|
|
723
|
-
* @param poolDefinitionLookupId - Used to locate the pool definition for creating its benefit pools within the program.
|
|
695
|
+
* Creates a program for the specified beneficiary. Creating a program is also referred to as provisioning a program.
|
|
724
696
|
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
697
|
+
* You can provision a program from a program definition or a pool definition:
|
|
698
|
+
* - **Program definition**: The program has associated pools that are created from the pool definitions associated with the program definition.
|
|
699
|
+
* - **Pool definition**: The program has 1 associated pool that is created from the pool definition.
|
|
700
|
+
* @param poolDefinitionLookupId - The program definition or pool definition to use to provision the program.
|
|
728
701
|
* @public
|
|
729
702
|
* @documentationMaturity preview
|
|
730
703
|
* @requiredField options.beneficiary
|
|
@@ -739,22 +712,16 @@ export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
|
|
|
739
712
|
*/
|
|
740
713
|
export declare function provisionProgram(poolDefinitionLookupId: PoolDefinitionLookupId, options?: ProvisionProgramOptions): Promise<ProvisionProgramResponse & ProvisionProgramResponseNonNullableFields>;
|
|
741
714
|
export interface ProvisionProgramOptions {
|
|
742
|
-
/**
|
|
743
|
-
* Identity of the individual that enrolled in the program, granting access to its associated benefits.
|
|
744
|
-
*
|
|
745
|
-
* The beneficiary's identity information is in their access token. To retrieve their identity, pass the access token from your frontend site to your backend, then call the Token Info ([SDK](https://dev.wix.com/docs/sdk/core-modules/essentials/auth#gettokeninfo)|[REST](https://dev.wix.com/docs/rest/app-management/oauth-2/token-info)) method. The returned `subjectType` and `subjectId` correspond to the identity type and ID of the beneficiary.
|
|
746
|
-
*/
|
|
715
|
+
/** Program beneficiary. */
|
|
747
716
|
beneficiary: CommonIdentificationData;
|
|
748
717
|
/**
|
|
749
|
-
*
|
|
718
|
+
* Initial program status.
|
|
750
719
|
*
|
|
751
720
|
* Default: `ACTIVE`
|
|
752
721
|
*/
|
|
753
722
|
programStatus?: ProvisionProgramRequestProgramStatus;
|
|
754
723
|
/**
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
* Use the namespace that was designated to the program definition.
|
|
724
|
+
* Namespace for your app or site's benefit programs.
|
|
758
725
|
* @minLength 1
|
|
759
726
|
* @maxLength 50
|
|
760
727
|
*/
|
|
@@ -762,24 +729,20 @@ export interface ProvisionProgramOptions {
|
|
|
762
729
|
/**
|
|
763
730
|
* Program name.
|
|
764
731
|
*
|
|
765
|
-
*
|
|
732
|
+
* You may want to use the same name that's used in the associated program definition, if it exists.
|
|
766
733
|
* @maxLength 64
|
|
767
734
|
*/
|
|
768
735
|
displayName?: string | null;
|
|
769
736
|
/**
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
* Must be unique to every app owner's namespace.
|
|
737
|
+
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
773
738
|
* @format GUID
|
|
774
739
|
*/
|
|
775
740
|
externalProgramId: string;
|
|
776
741
|
}
|
|
777
742
|
/**
|
|
778
|
-
*
|
|
743
|
+
* Renews the specified program.
|
|
779
744
|
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
* Use this method to reset each benefit pool renewal cycle.
|
|
745
|
+
* Balances are handled for each pool in the program as defined in the pool's credit configuration.
|
|
783
746
|
* @param programId - ID of the program to renew.
|
|
784
747
|
* @public
|
|
785
748
|
* @documentationMaturity preview
|
|
@@ -792,9 +755,7 @@ export interface ProvisionProgramOptions {
|
|
|
792
755
|
*/
|
|
793
756
|
export declare function renewProgram(programId: string): Promise<RenewProgramResponse & RenewProgramResponseNonNullableFields>;
|
|
794
757
|
/**
|
|
795
|
-
* Pauses the
|
|
796
|
-
*
|
|
797
|
-
* Changes the program status to `PAUSED`, preventing the redemption or reservation of benefits.
|
|
758
|
+
* Pauses the specified program. Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
798
759
|
* @param programId - ID of the program to pause.
|
|
799
760
|
* @public
|
|
800
761
|
* @documentationMaturity preview
|
|
@@ -807,9 +768,7 @@ export declare function renewProgram(programId: string): Promise<RenewProgramRes
|
|
|
807
768
|
*/
|
|
808
769
|
export declare function pauseProgram(programId: string): Promise<PauseProgramResponse & PauseProgramResponseNonNullableFields>;
|
|
809
770
|
/**
|
|
810
|
-
* Resumes the
|
|
811
|
-
*
|
|
812
|
-
* Changes the program status to `ACTIVE`, allowing the redemption or reservation of benefits to continue.
|
|
771
|
+
* Resumes the specified program. Call this method for paused programs.
|
|
813
772
|
* @param programId - ID of program to resume.
|
|
814
773
|
* @public
|
|
815
774
|
* @documentationMaturity preview
|
|
@@ -822,10 +781,8 @@ export declare function pauseProgram(programId: string): Promise<PauseProgramRes
|
|
|
822
781
|
*/
|
|
823
782
|
export declare function resumeProgram(programId: string): Promise<ResumeProgramResponse & ResumeProgramResponseNonNullableFields>;
|
|
824
783
|
/**
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
* After ending a program, it can't be restarted.
|
|
828
|
-
* @param programId - Package of pools
|
|
784
|
+
* Ends the specified program. Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
785
|
+
* @param programId - ID of the program to end.
|
|
829
786
|
* @public
|
|
830
787
|
* @documentationMaturity preview
|
|
831
788
|
* @requiredField programId
|
|
@@ -885,7 +842,7 @@ export interface UpdateProgram {
|
|
|
885
842
|
*/
|
|
886
843
|
_updatedDate?: Date | null;
|
|
887
844
|
/**
|
|
888
|
-
* ID of program definition
|
|
845
|
+
* ID of the associated program definition.
|
|
889
846
|
* @format GUID
|
|
890
847
|
* @readonly
|
|
891
848
|
* @immutable
|
|
@@ -897,7 +854,7 @@ export interface UpdateProgram {
|
|
|
897
854
|
*/
|
|
898
855
|
status?: ProgramStatus;
|
|
899
856
|
/**
|
|
900
|
-
*
|
|
857
|
+
* Program beneficiary.
|
|
901
858
|
* @readonly
|
|
902
859
|
* @immutable
|
|
903
860
|
*/
|
|
@@ -905,12 +862,12 @@ export interface UpdateProgram {
|
|
|
905
862
|
/**
|
|
906
863
|
* Program name.
|
|
907
864
|
*
|
|
908
|
-
*
|
|
865
|
+
* You may want to use the same name that's used in the associated program definition, if it exists.
|
|
909
866
|
* @maxLength 64
|
|
910
867
|
*/
|
|
911
868
|
displayName?: string | null;
|
|
912
869
|
/**
|
|
913
|
-
*
|
|
870
|
+
* Namespace for your app or site's benefit programs.
|
|
914
871
|
* @minLength 1
|
|
915
872
|
* @maxLength 50
|
|
916
873
|
* @immutable
|
|
@@ -919,27 +876,20 @@ export interface UpdateProgram {
|
|
|
919
876
|
/**
|
|
920
877
|
* Custom field data for the program object.
|
|
921
878
|
*
|
|
922
|
-
* [Extended fields](https://dev.wix.com/docs/
|
|
879
|
+
* [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.
|
|
923
880
|
*/
|
|
924
881
|
extendedFields?: ExtendedFields;
|
|
925
882
|
/**
|
|
926
|
-
*
|
|
927
|
-
*
|
|
928
|
-
* Must be unique to every app's namespace.
|
|
883
|
+
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
929
884
|
* @format GUID
|
|
930
885
|
* @immutable
|
|
931
886
|
*/
|
|
932
887
|
externalId?: string | null;
|
|
933
888
|
/**
|
|
934
|
-
*
|
|
889
|
+
* Associated program definition information.
|
|
935
890
|
* @readonly
|
|
936
891
|
*/
|
|
937
892
|
programDefinition?: ProgramDefinitionInfo;
|
|
938
|
-
/**
|
|
939
|
-
* Intended status of a program after the completion of an action.
|
|
940
|
-
* @readonly
|
|
941
|
-
*/
|
|
942
|
-
targetStatus?: ProgramStatus;
|
|
943
893
|
}
|
|
944
894
|
/**
|
|
945
895
|
* Retrieves a program.
|
|
@@ -962,13 +912,15 @@ export declare function getProgram(programId: string): Promise<Program & Program
|
|
|
962
912
|
/**
|
|
963
913
|
* Creates a query to retrieve a list of programs.
|
|
964
914
|
*
|
|
965
|
-
* The
|
|
915
|
+
* The Query Programs method builds a query to retrieve a list of programs and returns a `ProgramsQueryBuilder` object.
|
|
916
|
+
*
|
|
917
|
+
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
966
918
|
*
|
|
967
|
-
*
|
|
919
|
+
* You can refine the query by chaining `ProgramsQueryBuilder` methods onto the query. `ProgramsQueryBuilder` methods enable you to filter, sort, and control the results that Query Programs returns.
|
|
968
920
|
*
|
|
969
|
-
*
|
|
921
|
+
* Query Programs has a default paging limit of 50, which you can override.
|
|
970
922
|
*
|
|
971
|
-
*
|
|
923
|
+
* For a full description of the item object, see the object returned for the `items` property in `ProgramsQueryResult`.
|
|
972
924
|
* @public
|
|
973
925
|
* @documentationMaturity preview
|
|
974
926
|
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
@@ -1060,7 +1012,7 @@ export interface ProgramsQueryBuilder {
|
|
|
1060
1012
|
find: () => Promise<ProgramsQueryResult>;
|
|
1061
1013
|
}
|
|
1062
1014
|
/**
|
|
1063
|
-
* Retrieves a program
|
|
1015
|
+
* Retrieves a program with the specified external ID and namespace.
|
|
1064
1016
|
* @param namespace - Application sub-module that is the source of the program creation.
|
|
1065
1017
|
*
|
|
1066
1018
|
* Use the namespace that was designated to the program definition.
|
|
@@ -32,23 +32,19 @@ var ProgramStatus;
|
|
|
32
32
|
(function (ProgramStatus) {
|
|
33
33
|
/** Undefined program status. */
|
|
34
34
|
ProgramStatus["UNDEFINED"] = "UNDEFINED";
|
|
35
|
-
/**
|
|
35
|
+
/** Program is active. */
|
|
36
36
|
ProgramStatus["ACTIVE"] = "ACTIVE";
|
|
37
|
-
/**
|
|
37
|
+
/** Program is paused. It can be resumed. */
|
|
38
38
|
ProgramStatus["PAUSED"] = "PAUSED";
|
|
39
|
-
/**
|
|
40
|
-
* Inactive program.
|
|
41
|
-
*
|
|
42
|
-
* Benefits of a program with an `ENDED` status can't be redeemed or reserved.
|
|
43
|
-
*/
|
|
39
|
+
/** Program has ended. It can't be resumed. */
|
|
44
40
|
ProgramStatus["ENDED"] = "ENDED";
|
|
45
|
-
/**
|
|
41
|
+
/** Program is being activated for the first time. This status will be true for a negligible amount of time. */
|
|
46
42
|
ProgramStatus["PROVISIONING"] = "PROVISIONING";
|
|
47
|
-
/**
|
|
43
|
+
/** Program is being paused. This status will be true for a negligible amount of time. */
|
|
48
44
|
ProgramStatus["PAUSING"] = "PAUSING";
|
|
49
|
-
/**
|
|
45
|
+
/** Program is being re-activated after being paused. This status will be true for a negligible amount of time. */
|
|
50
46
|
ProgramStatus["RESUMING"] = "RESUMING";
|
|
51
|
-
/**
|
|
47
|
+
/** Program is being ended. This status will be true for a negligible amount of time. */
|
|
52
48
|
ProgramStatus["ENDING"] = "ENDING";
|
|
53
49
|
})(ProgramStatus || (exports.ProgramStatus = ProgramStatus = {}));
|
|
54
50
|
var IdentityType;
|
|
@@ -64,9 +60,9 @@ var IdentityType;
|
|
|
64
60
|
})(IdentityType || (exports.IdentityType = IdentityType = {}));
|
|
65
61
|
var ProvisionProgramRequestProgramStatus;
|
|
66
62
|
(function (ProvisionProgramRequestProgramStatus) {
|
|
67
|
-
/**
|
|
63
|
+
/** Program is active. */
|
|
68
64
|
ProvisionProgramRequestProgramStatus["ACTIVE"] = "ACTIVE";
|
|
69
|
-
/**
|
|
65
|
+
/** Program is paused. */
|
|
70
66
|
ProvisionProgramRequestProgramStatus["PAUSED"] = "PAUSED";
|
|
71
67
|
})(ProvisionProgramRequestProgramStatus || (exports.ProvisionProgramRequestProgramStatus = ProvisionProgramRequestProgramStatus = {}));
|
|
72
68
|
var OrderStatus;
|
|
@@ -92,12 +88,12 @@ var WebhookIdentityType;
|
|
|
92
88
|
WebhookIdentityType["APP"] = "APP";
|
|
93
89
|
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
94
90
|
/**
|
|
95
|
-
* Creates
|
|
96
|
-
* @param poolDefinitionLookupId - Used to locate the pool definition for creating its benefit pools within the program.
|
|
91
|
+
* Creates a program for the specified beneficiary. Creating a program is also referred to as provisioning a program.
|
|
97
92
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
93
|
+
* You can provision a program from a program definition or a pool definition:
|
|
94
|
+
* - **Program definition**: The program has associated pools that are created from the pool definitions associated with the program definition.
|
|
95
|
+
* - **Pool definition**: The program has 1 associated pool that is created from the pool definition.
|
|
96
|
+
* @param poolDefinitionLookupId - The program definition or pool definition to use to provision the program.
|
|
101
97
|
* @public
|
|
102
98
|
* @documentationMaturity preview
|
|
103
99
|
* @requiredField options.beneficiary
|
|
@@ -147,11 +143,9 @@ async function provisionProgram(poolDefinitionLookupId, options) {
|
|
|
147
143
|
}
|
|
148
144
|
exports.provisionProgram = provisionProgram;
|
|
149
145
|
/**
|
|
150
|
-
*
|
|
146
|
+
* Renews the specified program.
|
|
151
147
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* Use this method to reset each benefit pool renewal cycle.
|
|
148
|
+
* Balances are handled for each pool in the program as defined in the pool's credit configuration.
|
|
155
149
|
* @param programId - ID of the program to renew.
|
|
156
150
|
* @public
|
|
157
151
|
* @documentationMaturity preview
|
|
@@ -187,9 +181,7 @@ async function renewProgram(programId) {
|
|
|
187
181
|
}
|
|
188
182
|
exports.renewProgram = renewProgram;
|
|
189
183
|
/**
|
|
190
|
-
* Pauses the
|
|
191
|
-
*
|
|
192
|
-
* Changes the program status to `PAUSED`, preventing the redemption or reservation of benefits.
|
|
184
|
+
* Pauses the specified program. Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
193
185
|
* @param programId - ID of the program to pause.
|
|
194
186
|
* @public
|
|
195
187
|
* @documentationMaturity preview
|
|
@@ -225,9 +217,7 @@ async function pauseProgram(programId) {
|
|
|
225
217
|
}
|
|
226
218
|
exports.pauseProgram = pauseProgram;
|
|
227
219
|
/**
|
|
228
|
-
* Resumes the
|
|
229
|
-
*
|
|
230
|
-
* Changes the program status to `ACTIVE`, allowing the redemption or reservation of benefits to continue.
|
|
220
|
+
* Resumes the specified program. Call this method for paused programs.
|
|
231
221
|
* @param programId - ID of program to resume.
|
|
232
222
|
* @public
|
|
233
223
|
* @documentationMaturity preview
|
|
@@ -263,10 +253,8 @@ async function resumeProgram(programId) {
|
|
|
263
253
|
}
|
|
264
254
|
exports.resumeProgram = resumeProgram;
|
|
265
255
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* After ending a program, it can't be restarted.
|
|
269
|
-
* @param programId - Package of pools
|
|
256
|
+
* Ends the specified program. Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
257
|
+
* @param programId - ID of the program to end.
|
|
270
258
|
* @public
|
|
271
259
|
* @documentationMaturity preview
|
|
272
260
|
* @requiredField programId
|
|
@@ -389,13 +377,15 @@ exports.getProgram = getProgram;
|
|
|
389
377
|
/**
|
|
390
378
|
* Creates a query to retrieve a list of programs.
|
|
391
379
|
*
|
|
392
|
-
* The
|
|
380
|
+
* The Query Programs method builds a query to retrieve a list of programs and returns a `ProgramsQueryBuilder` object.
|
|
381
|
+
*
|
|
382
|
+
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
393
383
|
*
|
|
394
|
-
*
|
|
384
|
+
* You can refine the query by chaining `ProgramsQueryBuilder` methods onto the query. `ProgramsQueryBuilder` methods enable you to filter, sort, and control the results that Query Programs returns.
|
|
395
385
|
*
|
|
396
|
-
*
|
|
386
|
+
* Query Programs has a default paging limit of 50, which you can override.
|
|
397
387
|
*
|
|
398
|
-
*
|
|
388
|
+
* For a full description of the item object, see the object returned for the `items` property in `ProgramsQueryResult`.
|
|
399
389
|
* @public
|
|
400
390
|
* @documentationMaturity preview
|
|
401
391
|
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
@@ -453,7 +443,7 @@ function queryPrograms() {
|
|
|
453
443
|
}
|
|
454
444
|
exports.queryPrograms = queryPrograms;
|
|
455
445
|
/**
|
|
456
|
-
* Retrieves a program
|
|
446
|
+
* Retrieves a program with the specified external ID and namespace.
|
|
457
447
|
* @param namespace - Application sub-module that is the source of the program creation.
|
|
458
448
|
*
|
|
459
449
|
* Use the namespace that was designated to the program definition.
|