@wix/auto_sdk_benefit-programs_programs 1.0.0 → 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.
Files changed (45) hide show
  1. package/build/cjs/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
  2. package/build/cjs/src/benefit-programs-v1-program-programs.http.js +19 -25
  3. package/build/cjs/src/benefit-programs-v1-program-programs.http.js.map +1 -1
  4. package/build/cjs/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
  5. package/build/cjs/src/benefit-programs-v1-program-programs.public.js.map +1 -1
  6. package/build/cjs/src/benefit-programs-v1-program-programs.types.d.ts +215 -95
  7. package/build/cjs/src/benefit-programs-v1-program-programs.types.js +9 -13
  8. package/build/cjs/src/benefit-programs-v1-program-programs.types.js.map +1 -1
  9. package/build/cjs/src/benefit-programs-v1-program-programs.universal.d.ts +269 -146
  10. package/build/cjs/src/benefit-programs-v1-program-programs.universal.js +33 -37
  11. package/build/cjs/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
  12. package/build/es/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
  13. package/build/es/src/benefit-programs-v1-program-programs.http.js +19 -25
  14. package/build/es/src/benefit-programs-v1-program-programs.http.js.map +1 -1
  15. package/build/es/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
  16. package/build/es/src/benefit-programs-v1-program-programs.public.js.map +1 -1
  17. package/build/es/src/benefit-programs-v1-program-programs.types.d.ts +215 -95
  18. package/build/es/src/benefit-programs-v1-program-programs.types.js +9 -13
  19. package/build/es/src/benefit-programs-v1-program-programs.types.js.map +1 -1
  20. package/build/es/src/benefit-programs-v1-program-programs.universal.d.ts +269 -146
  21. package/build/es/src/benefit-programs-v1-program-programs.universal.js +33 -37
  22. package/build/es/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
  23. package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
  24. package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.js +19 -25
  25. package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.js.map +1 -1
  26. package/build/internal/cjs/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
  27. package/build/internal/cjs/src/benefit-programs-v1-program-programs.public.js.map +1 -1
  28. package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.d.ts +215 -95
  29. package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.js +9 -13
  30. package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.js.map +1 -1
  31. package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.d.ts +269 -146
  32. package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.js +33 -37
  33. package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
  34. package/build/internal/es/src/benefit-programs-v1-program-programs.http.d.ts +18 -24
  35. package/build/internal/es/src/benefit-programs-v1-program-programs.http.js +19 -25
  36. package/build/internal/es/src/benefit-programs-v1-program-programs.http.js.map +1 -1
  37. package/build/internal/es/src/benefit-programs-v1-program-programs.public.d.ts +18 -24
  38. package/build/internal/es/src/benefit-programs-v1-program-programs.public.js.map +1 -1
  39. package/build/internal/es/src/benefit-programs-v1-program-programs.types.d.ts +215 -95
  40. package/build/internal/es/src/benefit-programs-v1-program-programs.types.js +9 -13
  41. package/build/internal/es/src/benefit-programs-v1-program-programs.types.js.map +1 -1
  42. package/build/internal/es/src/benefit-programs-v1-program-programs.universal.d.ts +269 -146
  43. package/build/internal/es/src/benefit-programs-v1-program-programs.universal.js +33 -37
  44. package/build/internal/es/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
  45. package/package.json +2 -2
@@ -1,7 +1,9 @@
1
1
  export interface Program {
2
2
  /**
3
3
  * Program ID.
4
+ * @format GUID
4
5
  * @readonly
6
+ * @immutable
5
7
  */
6
8
  _id?: string | null;
7
9
  /**
@@ -23,8 +25,10 @@ export interface Program {
23
25
  */
24
26
  _updatedDate?: Date | null;
25
27
  /**
26
- * ID of program definition that provisioned this benefit pool.
28
+ * ID of the associated program definition.
29
+ * @format GUID
27
30
  * @readonly
31
+ * @immutable
28
32
  */
29
33
  programDefinitionId?: string | null;
30
34
  /**
@@ -33,78 +37,94 @@ export interface Program {
33
37
  */
34
38
  status?: ProgramStatus;
35
39
  /**
36
- * Identity of the individual that enrolled in the program, granting access to its associated benefits.
40
+ * Program beneficiary.
37
41
  * @readonly
42
+ * @immutable
38
43
  */
39
44
  beneficiary?: CommonIdentificationData;
40
45
  /**
41
46
  * Program name.
42
47
  *
43
- * Suggest setting the same value that was already specified in the program definition's `displayName`.
48
+ * You may want to use the same name that's used in the associated program definition, if it exists.
49
+ * @maxLength 64
44
50
  */
45
51
  displayName?: string | null;
46
- /** External system that is the source of the program creation. For example, `wix-pricing-plans`, `wix-loyalty`. */
52
+ /**
53
+ * Namespace for your app or site's benefit programs.
54
+ * @minLength 1
55
+ * @maxLength 50
56
+ * @immutable
57
+ */
47
58
  namespace?: string | null;
48
59
  /**
49
60
  * Custom field data for the program object.
50
61
  *
51
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
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.
52
63
  */
53
64
  extendedFields?: ExtendedFields;
54
65
  /**
55
- * External program ID.
56
- *
57
- * Must be unique to every app's namespace.
66
+ * ID for the program defined by you. You can use `externalId` to filter queries.
67
+ * @format GUID
68
+ * @immutable
58
69
  */
59
70
  externalId?: string | null;
60
71
  /**
61
- * Program definition info
72
+ * Associated program definition information.
62
73
  * @readonly
63
74
  */
64
75
  programDefinition?: ProgramDefinitionInfo;
65
- /**
66
- * Intended status of a program after the completion of an action.
67
- * @readonly
68
- */
69
- targetStatus?: ProgramStatus;
70
76
  }
71
77
  export declare enum ProgramStatus {
72
78
  /** Undefined program status. */
73
79
  UNDEFINED = "UNDEFINED",
74
- /** Active program. */
80
+ /** Program is active. */
75
81
  ACTIVE = "ACTIVE",
76
- /** Paused program. */
82
+ /** Program is paused. It can be resumed. */
77
83
  PAUSED = "PAUSED",
78
- /**
79
- * Inactive program.
80
- *
81
- * Benefits of a program with an `ENDED` status can't be redeemed or reserved.
82
- */
84
+ /** Program has ended. It can't be resumed. */
83
85
  ENDED = "ENDED",
84
- /** Process state for programs that are currently being activated but have not yet completed the provisioning process. */
86
+ /** Program is being activated for the first time. This status will be true for a negligible amount of time. */
85
87
  PROVISIONING = "PROVISIONING",
86
- /** Process state for programs that are currently pausing. */
88
+ /** Program is being paused. This status will be true for a negligible amount of time. */
87
89
  PAUSING = "PAUSING",
88
- /** Process state for programs that are currently resuming. */
90
+ /** Program is being re-activated after being paused. This status will be true for a negligible amount of time. */
89
91
  RESUMING = "RESUMING",
90
- /** Process state for programs that are currently ending. */
92
+ /** Program is being ended. This status will be true for a negligible amount of time. */
91
93
  ENDING = "ENDING"
92
94
  }
93
95
  export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
94
- /** ID of a site visitor that has not logged in to the site. */
96
+ /**
97
+ * ID of a site visitor that hasn't logged in to the site.
98
+ * @format GUID
99
+ */
95
100
  anonymousVisitorId?: string;
96
- /** ID of a site visitor that has logged in to the site. */
101
+ /**
102
+ * ID of a site member.
103
+ * @format GUID
104
+ */
97
105
  memberId?: string;
98
- /** ID of a Wix user (site owner, contributor, etc.). */
106
+ /**
107
+ * ID of a Wix user.
108
+ * @format GUID
109
+ */
99
110
  wixUserId?: string;
100
111
  }
101
112
  /** @oneof */
102
113
  export interface CommonIdentificationDataIdOneOf {
103
- /** ID of a site visitor that has not logged in to the site. */
114
+ /**
115
+ * ID of a site visitor that hasn't logged in to the site.
116
+ * @format GUID
117
+ */
104
118
  anonymousVisitorId?: string;
105
- /** ID of a site visitor that has logged in to the site. */
119
+ /**
120
+ * ID of a site member.
121
+ * @format GUID
122
+ */
106
123
  memberId?: string;
107
- /** ID of a Wix user (site owner, contributor, etc.). */
124
+ /**
125
+ * ID of a Wix user.
126
+ * @format GUID
127
+ */
108
128
  wixUserId?: string;
109
129
  }
110
130
  export declare enum IdentityType {
@@ -130,14 +150,14 @@ export interface ExtendedFields {
130
150
  }
131
151
  export interface ProgramDefinitionInfo {
132
152
  /**
133
- * ID of the program definition that provisioned the program associated with this benefit pool.
153
+ * Program definition ID.
154
+ * @format GUID
134
155
  * @readonly
135
156
  */
136
157
  _id?: string;
137
158
  /**
138
- * External ID of the program definition that provisioned this program.
139
- *
140
- * This identifies the source program definition in the external system.
159
+ * Program definition external ID.
160
+ * @format GUID
141
161
  * @readonly
142
162
  */
143
163
  externalId?: string | null;
@@ -164,91 +184,114 @@ export interface ProgramResumed {
164
184
  }
165
185
  /** In case pool_definition_id is provided should test if it's part of a package. If it is, reject the request */
166
186
  export interface ProvisionProgramRequest {
167
- /**
168
- * Used to locate the pool definition for creating its benefit pools within the program.
169
- *
170
- * This object must contain either `programDefinitionId` or `poolDefinitionId`:
171
- * + Use `programDefinitionId` for programs with multiple benefit pools.
172
- * + Use `poolDefinitionId` for a program with just 1 benefit pool.
173
- */
187
+ /** The program definition or pool definition to use to provision the program. */
174
188
  poolDefinitionLookupId: PoolDefinitionLookupId;
175
- /**
176
- * Identity of the individual that enrolled in the program, granting access to its associated benefits.
177
- *
178
- * 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.
179
- */
189
+ /** Program beneficiary. */
180
190
  beneficiary: CommonIdentificationData;
181
191
  /**
182
- * Set the status of the program upon provision.
192
+ * Initial program status.
183
193
  *
184
194
  * Default: `ACTIVE`
185
195
  */
186
196
  programStatus?: ProvisionProgramRequestProgramStatus;
187
197
  /**
188
- * Application sub-module that is the source of the program creation.
189
- *
190
- * Use the namespace that was designated to the program definition.
198
+ * Namespace for your app or site's benefit programs.
199
+ * @minLength 1
200
+ * @maxLength 50
191
201
  */
192
202
  namespace: string;
193
203
  /**
194
204
  * Program name.
195
205
  *
196
- * Suggest using the same value that was already specified in the program definition's `displayName`.
206
+ * You may want to use the same name that's used in the associated program definition, if it exists.
207
+ * @maxLength 64
197
208
  */
198
209
  displayName?: string | null;
199
210
  /**
200
- * External program ID.
201
- *
202
- * Must be unique to every app owner's namespace.
211
+ * ID for the program defined by you. You can use `externalId` to filter queries.
212
+ * @format GUID
203
213
  */
204
214
  externalProgramId: string;
205
215
  }
206
216
  export interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {
207
- /** Pool definition ID. */
217
+ /**
218
+ * Pool definition ID.
219
+ * @format GUID
220
+ */
208
221
  poolDefinitionId?: string;
209
- /** Program definition ID. */
222
+ /**
223
+ * Program definition ID.
224
+ * @format GUID
225
+ */
210
226
  programDefinitionId?: string;
211
227
  }
212
228
  /** @oneof */
213
229
  export interface PoolDefinitionLookupIdIdOneOf {
214
- /** Pool definition ID. */
230
+ /**
231
+ * Pool definition ID.
232
+ * @format GUID
233
+ */
215
234
  poolDefinitionId?: string;
216
- /** Program definition ID. */
235
+ /**
236
+ * Program definition ID.
237
+ * @format GUID
238
+ */
217
239
  programDefinitionId?: string;
218
240
  }
219
241
  export declare enum ProvisionProgramRequestProgramStatus {
220
- /** Active program. */
242
+ /** Program is active. */
221
243
  ACTIVE = "ACTIVE",
222
- /** Paused program. */
244
+ /** Program is paused. */
223
245
  PAUSED = "PAUSED"
224
246
  }
225
247
  export interface ProvisionProgramResponse {
226
- /** Job ID of the provisioned program. */
248
+ /**
249
+ * Job ID of the provisioning of the program.
250
+ * @format GUID
251
+ */
227
252
  jobId?: string;
228
253
  /** Provisioned program. */
229
254
  program?: Program;
230
255
  }
231
256
  export interface ProgramAlreadyExists {
232
- /** Key of a program that already exists */
257
+ /**
258
+ * Key of a program that already exists
259
+ * @format GUID
260
+ */
233
261
  externalProgramId?: string;
234
- /** Key of a program that already exists */
262
+ /**
263
+ * Key of a program that already exists
264
+ * @format GUID
265
+ */
235
266
  namespace?: string;
236
267
  }
237
268
  /** Updates the pool credit amount according to the configuration. */
238
269
  export interface RenewProgramRequest {
239
- /** ID of the program to renew. */
270
+ /**
271
+ * ID of the program to renew.
272
+ * @format GUID
273
+ */
240
274
  programId: string;
241
275
  }
242
276
  export interface RenewProgramResponse {
243
- /** Job ID of the renewed program. */
277
+ /**
278
+ * Job ID of the program renewal.
279
+ * @format GUID
280
+ */
244
281
  jobId?: string;
245
282
  }
246
283
  export interface PauseProgramRequest {
247
- /** ID of the program to pause. */
284
+ /**
285
+ * ID of the program to pause.
286
+ * @format GUID
287
+ */
248
288
  programId: string;
249
289
  }
250
290
  export interface PauseProgramResponse {
251
- /** Job ID of the paused program. */
291
+ /**
292
+ * Job ID of the pausing of the program.
293
+ * @format GUID
294
+ */
252
295
  jobId?: string;
253
296
  }
254
297
  export interface ProgramStatusTransitionNotAllowed {
@@ -258,23 +301,38 @@ export interface ProgramStatusTransitionNotAllowed {
258
301
  requestedStatus?: ProgramStatus;
259
302
  }
260
303
  export interface ResumeProgramRequest {
261
- /** ID of program to resume. */
304
+ /**
305
+ * ID of program to resume.
306
+ * @format GUID
307
+ */
262
308
  programId: string;
263
309
  }
264
310
  export interface ResumeProgramResponse {
265
- /** Job ID of the resumed program. */
311
+ /**
312
+ * Job ID of the resuming of the program.
313
+ * @format GUID
314
+ */
266
315
  jobId?: string;
267
316
  }
268
317
  export interface EndProgramRequest {
269
- /** Package of pools */
318
+ /**
319
+ * ID of the program to end.
320
+ * @format GUID
321
+ */
270
322
  programId: string;
271
323
  }
272
324
  export interface EndProgramResponse {
273
- /** Job ID of the discontinued program. */
325
+ /**
326
+ * Job ID of the ending of the program.
327
+ * @format GUID
328
+ */
274
329
  jobId?: string;
275
330
  }
276
331
  export interface UpdateProgramStatusRequest {
277
- /** Program to update */
332
+ /**
333
+ * Program to update
334
+ * @format GUID
335
+ */
278
336
  programId?: string;
279
337
  /** Program revision */
280
338
  programRevision?: string;
@@ -288,15 +346,27 @@ export interface UpdateProgramStatusResponse {
288
346
  program?: Program;
289
347
  }
290
348
  export interface UpsertMigratedProgramRequest {
291
- /** Order id */
349
+ /**
350
+ * Order id
351
+ * @format GUID
352
+ */
292
353
  orderId?: string;
293
- /** Plan id */
354
+ /**
355
+ * Plan id
356
+ * @format GUID
357
+ */
294
358
  planId?: string;
295
- /** Order member id */
359
+ /**
360
+ * Order member id
361
+ * @format GUID
362
+ */
296
363
  memberId?: string;
297
364
  /** Order status */
298
365
  status?: OrderStatus;
299
- /** Plan name */
366
+ /**
367
+ * Plan name
368
+ * @maxLength 64
369
+ */
300
370
  planName?: string;
301
371
  }
302
372
  export declare enum OrderStatus {
@@ -310,7 +380,7 @@ export interface UpsertMigratedProgramResponse {
310
380
  program?: Program;
311
381
  }
312
382
  export interface UpdateProgramRequest {
313
- /** Program to be updated. */
383
+ /** Program to update. */
314
384
  program: Program;
315
385
  }
316
386
  export interface UpdateProgramResponse {
@@ -318,7 +388,10 @@ export interface UpdateProgramResponse {
318
388
  program?: Program;
319
389
  }
320
390
  export interface GetProgramRequest {
321
- /** ID of the program to retrieve. */
391
+ /**
392
+ * ID of the program to retrieve.
393
+ * @format GUID
394
+ */
322
395
  programId: string;
323
396
  }
324
397
  export interface GetProgramResponse {
@@ -326,7 +399,7 @@ export interface GetProgramResponse {
326
399
  program?: Program;
327
400
  }
328
401
  export interface QueryProgramsRequest {
329
- /** Query to select programs. */
402
+ /** Filter, sort, and paging to apply to the query. */
330
403
  query?: CursorQuery;
331
404
  }
332
405
  export interface CursorQuery extends CursorQueryPagingMethodOneOf {
@@ -344,6 +417,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
344
417
  /**
345
418
  * Sort object in the following format:
346
419
  * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
420
+ * @maxSize 5
347
421
  */
348
422
  sort?: Sorting[];
349
423
  }
@@ -353,7 +427,10 @@ export interface CursorQueryPagingMethodOneOf {
353
427
  cursorPaging?: CursorPaging;
354
428
  }
355
429
  export interface Sorting {
356
- /** Name of the field to sort by. */
430
+ /**
431
+ * Name of the field to sort by.
432
+ * @maxLength 512
433
+ */
357
434
  fieldName?: string;
358
435
  /** Sort order. */
359
436
  order?: SortOrder;
@@ -365,18 +442,22 @@ export declare enum SortOrder {
365
442
  DESC = "DESC"
366
443
  }
367
444
  export interface CursorPaging {
368
- /** Maximum number of items to return in the results. */
445
+ /**
446
+ * Maximum number of items to return in the results.
447
+ * @max 100
448
+ */
369
449
  limit?: number | null;
370
450
  /**
371
451
  * Pointer to the next or previous page in the list of results.
372
452
  *
373
453
  * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
374
454
  * Not relevant for the first request.
455
+ * @maxLength 16000
375
456
  */
376
457
  cursor?: string | null;
377
458
  }
378
459
  export interface QueryProgramsResponse {
379
- /** List of programs. */
460
+ /** List of retrieved programs. */
380
461
  programs?: Program[];
381
462
  /** Metadata for the paginated results. */
382
463
  metadata?: CursorPagingMetadata;
@@ -395,9 +476,15 @@ export interface CursorPagingMetadata {
395
476
  hasNext?: boolean | null;
396
477
  }
397
478
  export interface Cursors {
398
- /** Cursor string pointing to the next page in the list of results. */
479
+ /**
480
+ * Cursor string pointing to the next page in the list of results.
481
+ * @maxLength 16000
482
+ */
399
483
  next?: string | null;
400
- /** Cursor pointing to the previous page in the list of results. */
484
+ /**
485
+ * Cursor pointing to the previous page in the list of results.
486
+ * @maxLength 16000
487
+ */
401
488
  prev?: string | null;
402
489
  }
403
490
  export interface GetProgramByExternalIdAndNamespaceRequest {
@@ -405,12 +492,15 @@ export interface GetProgramByExternalIdAndNamespaceRequest {
405
492
  * Application sub-module that is the source of the program creation.
406
493
  *
407
494
  * Use the namespace that was designated to the program definition.
495
+ * @minLength 1
496
+ * @maxLength 50
408
497
  */
409
498
  namespace: string;
410
499
  /**
411
500
  * External program ID.
412
501
  *
413
502
  * Must be unique to every app's namespace.
503
+ * @format GUID
414
504
  */
415
505
  externalId: string;
416
506
  }
@@ -489,9 +579,15 @@ export interface ActionEvent {
489
579
  body?: string;
490
580
  }
491
581
  export interface MessageEnvelope {
492
- /** App instance ID. */
582
+ /**
583
+ * App instance ID.
584
+ * @format GUID
585
+ */
493
586
  instanceId?: string | null;
494
- /** Event type. */
587
+ /**
588
+ * Event type.
589
+ * @maxLength 150
590
+ */
495
591
  eventType?: string;
496
592
  /** The identification type and identity data. */
497
593
  identity?: IdentificationData;
@@ -499,26 +595,50 @@ export interface MessageEnvelope {
499
595
  data?: string;
500
596
  }
501
597
  export interface IdentificationData extends IdentificationDataIdOneOf {
502
- /** ID of a site visitor that has not logged in to the site. */
598
+ /**
599
+ * ID of a site visitor that has not logged in to the site.
600
+ * @format GUID
601
+ */
503
602
  anonymousVisitorId?: string;
504
- /** ID of a site visitor that has logged in to the site. */
603
+ /**
604
+ * ID of a site visitor that has logged in to the site.
605
+ * @format GUID
606
+ */
505
607
  memberId?: string;
506
- /** ID of a Wix user (site owner, contributor, etc.). */
608
+ /**
609
+ * ID of a Wix user (site owner, contributor, etc.).
610
+ * @format GUID
611
+ */
507
612
  wixUserId?: string;
508
- /** ID of an app. */
613
+ /**
614
+ * ID of an app.
615
+ * @format GUID
616
+ */
509
617
  appId?: string;
510
618
  /** @readonly */
511
619
  identityType?: WebhookIdentityType;
512
620
  }
513
621
  /** @oneof */
514
622
  export interface IdentificationDataIdOneOf {
515
- /** ID of a site visitor that has not logged in to the site. */
623
+ /**
624
+ * ID of a site visitor that has not logged in to the site.
625
+ * @format GUID
626
+ */
516
627
  anonymousVisitorId?: string;
517
- /** ID of a site visitor that has logged in to the site. */
628
+ /**
629
+ * ID of a site visitor that has logged in to the site.
630
+ * @format GUID
631
+ */
518
632
  memberId?: string;
519
- /** ID of a Wix user (site owner, contributor, etc.). */
633
+ /**
634
+ * ID of a Wix user (site owner, contributor, etc.).
635
+ * @format GUID
636
+ */
520
637
  wixUserId?: string;
521
- /** ID of an app. */
638
+ /**
639
+ * ID of an app.
640
+ * @format GUID
641
+ */
522
642
  appId?: string;
523
643
  }
524
644
  export declare enum WebhookIdentityType {
@@ -572,12 +692,12 @@ export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
572
692
  program?: ProgramNonNullableFields;
573
693
  }
574
694
  /**
575
- * Creates active programs consisting of benefits derived from their underlying program definitions and pool definitions.
576
- * @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.
577
696
  *
578
- * This object must contain either `programDefinitionId` or `poolDefinitionId`:
579
- * + Use `programDefinitionId` for programs with multiple benefit pools.
580
- * + Use `poolDefinitionId` for a program with just 1 benefit pool.
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.
581
701
  * @public
582
702
  * @documentationMaturity preview
583
703
  * @requiredField options.beneficiary
@@ -592,43 +712,37 @@ export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
592
712
  */
593
713
  export declare function provisionProgram(poolDefinitionLookupId: PoolDefinitionLookupId, options?: ProvisionProgramOptions): Promise<ProvisionProgramResponse & ProvisionProgramResponseNonNullableFields>;
594
714
  export interface ProvisionProgramOptions {
595
- /**
596
- * Identity of the individual that enrolled in the program, granting access to its associated benefits.
597
- *
598
- * 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.
599
- */
715
+ /** Program beneficiary. */
600
716
  beneficiary: CommonIdentificationData;
601
717
  /**
602
- * Set the status of the program upon provision.
718
+ * Initial program status.
603
719
  *
604
720
  * Default: `ACTIVE`
605
721
  */
606
722
  programStatus?: ProvisionProgramRequestProgramStatus;
607
723
  /**
608
- * Application sub-module that is the source of the program creation.
609
- *
610
- * Use the namespace that was designated to the program definition.
724
+ * Namespace for your app or site's benefit programs.
725
+ * @minLength 1
726
+ * @maxLength 50
611
727
  */
612
728
  namespace: string;
613
729
  /**
614
730
  * Program name.
615
731
  *
616
- * Suggest using the same value that was already specified in the program definition's `displayName`.
732
+ * You may want to use the same name that's used in the associated program definition, if it exists.
733
+ * @maxLength 64
617
734
  */
618
735
  displayName?: string | null;
619
736
  /**
620
- * External program ID.
621
- *
622
- * Must be unique to every app owner's namespace.
737
+ * ID for the program defined by you. You can use `externalId` to filter queries.
738
+ * @format GUID
623
739
  */
624
740
  externalProgramId: string;
625
741
  }
626
742
  /**
627
- * Updates the benefit pools within a program.
743
+ * Renews the specified program.
628
744
  *
629
- * Adjusts each pool in the program according to its unique credit configuration as specified in the pool definition.
630
- *
631
- * 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.
632
746
  * @param programId - ID of the program to renew.
633
747
  * @public
634
748
  * @documentationMaturity preview
@@ -641,9 +755,7 @@ export interface ProvisionProgramOptions {
641
755
  */
642
756
  export declare function renewProgram(programId: string): Promise<RenewProgramResponse & RenewProgramResponseNonNullableFields>;
643
757
  /**
644
- * Pauses the benefit pools within a program.
645
- *
646
- * 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.
647
759
  * @param programId - ID of the program to pause.
648
760
  * @public
649
761
  * @documentationMaturity preview
@@ -656,9 +768,7 @@ export declare function renewProgram(programId: string): Promise<RenewProgramRes
656
768
  */
657
769
  export declare function pauseProgram(programId: string): Promise<PauseProgramResponse & PauseProgramResponseNonNullableFields>;
658
770
  /**
659
- * Resumes the benefit pools within a program.
660
- *
661
- * 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.
662
772
  * @param programId - ID of program to resume.
663
773
  * @public
664
774
  * @documentationMaturity preview
@@ -671,10 +781,8 @@ export declare function pauseProgram(programId: string): Promise<PauseProgramRes
671
781
  */
672
782
  export declare function resumeProgram(programId: string): Promise<ResumeProgramResponse & ResumeProgramResponseNonNullableFields>;
673
783
  /**
674
- * Prevents the benefit pools in the provided package from being redeemed or reserved.
675
- *
676
- * After ending a program, it can't be restarted.
677
- * @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.
678
786
  * @public
679
787
  * @documentationMaturity preview
680
788
  * @requiredField programId
@@ -710,7 +818,9 @@ export declare function updateProgram(_id: string | null, program: UpdateProgram
710
818
  export interface UpdateProgram {
711
819
  /**
712
820
  * Program ID.
821
+ * @format GUID
713
822
  * @readonly
823
+ * @immutable
714
824
  */
715
825
  _id?: string | null;
716
826
  /**
@@ -732,8 +842,10 @@ export interface UpdateProgram {
732
842
  */
733
843
  _updatedDate?: Date | null;
734
844
  /**
735
- * ID of program definition that provisioned this benefit pool.
845
+ * ID of the associated program definition.
846
+ * @format GUID
736
847
  * @readonly
848
+ * @immutable
737
849
  */
738
850
  programDefinitionId?: string | null;
739
851
  /**
@@ -742,40 +854,42 @@ export interface UpdateProgram {
742
854
  */
743
855
  status?: ProgramStatus;
744
856
  /**
745
- * Identity of the individual that enrolled in the program, granting access to its associated benefits.
857
+ * Program beneficiary.
746
858
  * @readonly
859
+ * @immutable
747
860
  */
748
861
  beneficiary?: CommonIdentificationData;
749
862
  /**
750
863
  * Program name.
751
864
  *
752
- * Suggest setting the same value that was already specified in the program definition's `displayName`.
865
+ * You may want to use the same name that's used in the associated program definition, if it exists.
866
+ * @maxLength 64
753
867
  */
754
868
  displayName?: string | null;
755
- /** External system that is the source of the program creation. For example, `wix-pricing-plans`, `wix-loyalty`. */
869
+ /**
870
+ * Namespace for your app or site's benefit programs.
871
+ * @minLength 1
872
+ * @maxLength 50
873
+ * @immutable
874
+ */
756
875
  namespace?: string | null;
757
876
  /**
758
877
  * Custom field data for the program object.
759
878
  *
760
- * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
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.
761
880
  */
762
881
  extendedFields?: ExtendedFields;
763
882
  /**
764
- * External program ID.
765
- *
766
- * Must be unique to every app's namespace.
883
+ * ID for the program defined by you. You can use `externalId` to filter queries.
884
+ * @format GUID
885
+ * @immutable
767
886
  */
768
887
  externalId?: string | null;
769
888
  /**
770
- * Program definition info
889
+ * Associated program definition information.
771
890
  * @readonly
772
891
  */
773
892
  programDefinition?: ProgramDefinitionInfo;
774
- /**
775
- * Intended status of a program after the completion of an action.
776
- * @readonly
777
- */
778
- targetStatus?: ProgramStatus;
779
893
  }
780
894
  /**
781
895
  * Retrieves a program.
@@ -788,6 +902,8 @@ export interface UpdateProgram {
788
902
  * @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
789
903
  * @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
790
904
  * @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
905
+ * @permissionScope Manage Events
906
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
791
907
  * @applicableIdentity APP
792
908
  * @returns Retrieved program.
793
909
  * @fqn wix.benefit_programs.v1.program.ProgramService.GetProgram
@@ -796,19 +912,23 @@ export declare function getProgram(programId: string): Promise<Program & Program
796
912
  /**
797
913
  * Creates a query to retrieve a list of programs.
798
914
  *
799
- * The `queryPrograms()` method builds a query to retrieve a list of programs and returns a `ProgramsQueryBuilder` object.
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.
800
918
  *
801
- * The returned object contains the query definition, which is used to run the query using the [`find()`](/programs/programs-query-builder/find) function.
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.
802
920
  *
803
- * You can refine the query by chaining `ProgramsQueryBuilder` methods onto the query. `ProgramsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPrograms()` returns.
921
+ * Query Programs has a default paging limit of 50, which you can override.
804
922
  *
805
- * The following `ProgramsQueryBuilder` functions are supported for `queryPrograms()`. For a full description of the program object, see the object returned for the [`items`](/programs/programs-query-result/items) property in `ProgramsQueryResult`.
923
+ * For a full description of the item object, see the object returned for the `items` property in `ProgramsQueryResult`.
806
924
  * @public
807
925
  * @documentationMaturity preview
808
926
  * @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
809
927
  * @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
810
928
  * @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
811
929
  * @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
930
+ * @permissionScope Manage Events
931
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
812
932
  * @permissionId BENEFIT_PROGRAMS.PROGRAM_READ
813
933
  * @applicableIdentity APP
814
934
  * @fqn wix.benefit_programs.v1.program.ProgramService.QueryPrograms
@@ -892,7 +1012,7 @@ export interface ProgramsQueryBuilder {
892
1012
  find: () => Promise<ProgramsQueryResult>;
893
1013
  }
894
1014
  /**
895
- * Retrieves a program by program external ID and corresponding namespace.
1015
+ * Retrieves a program with the specified external ID and namespace.
896
1016
  * @param namespace - Application sub-module that is the source of the program creation.
897
1017
  *
898
1018
  * Use the namespace that was designated to the program definition.
@@ -906,6 +1026,8 @@ export interface ProgramsQueryBuilder {
906
1026
  * @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
907
1027
  * @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
908
1028
  * @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
1029
+ * @permissionScope Manage Events
1030
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
909
1031
  * @applicableIdentity APP
910
1032
  * @fqn wix.benefit_programs.v1.program.ProgramService.GetProgramByExternalIdAndNamespace
911
1033
  */
@@ -915,6 +1037,7 @@ export interface GetProgramByExternalIdAndNamespaceOptions {
915
1037
  * External program ID.
916
1038
  *
917
1039
  * Must be unique to every app's namespace.
1040
+ * @format GUID
918
1041
  */
919
1042
  externalId: string;
920
1043
  }