@wix/auto_sdk_online-programs_participants 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 (39) hide show
  1. package/build/cjs/index.d.ts +187 -0
  2. package/build/cjs/index.js +1676 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1866 -0
  5. package/build/cjs/index.typings.js +1382 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +599 -0
  8. package/build/cjs/meta.js +1043 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +187 -0
  11. package/build/es/index.mjs +1612 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +1866 -0
  14. package/build/es/index.typings.mjs +1325 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +599 -0
  17. package/build/es/meta.mjs +999 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +198 -0
  21. package/build/internal/cjs/index.js +1676 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +1876 -0
  24. package/build/internal/cjs/index.typings.js +1382 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +599 -0
  27. package/build/internal/cjs/meta.js +1043 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +198 -0
  30. package/build/internal/es/index.mjs +1612 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +1876 -0
  33. package/build/internal/es/index.typings.mjs +1325 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +599 -0
  36. package/build/internal/es/meta.mjs +999 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,1866 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ interface Participant extends ParticipantStateOptionsOneOf {
4
+ paymentPendingOptions?: PaymentPendingOptions;
5
+ joinedOptions?: JoinedOptions;
6
+ completedOptions?: CompletedOptions;
7
+ failedOptions?: FailedOptions;
8
+ suspendedOptions?: SuspendedOptions;
9
+ /** options for auto removed participant */
10
+ autoRemovedOptions?: AutoRemovedOptions;
11
+ /**
12
+ * Participant ID.
13
+ * @format GUID
14
+ * @readonly
15
+ */
16
+ _id?: string | null;
17
+ /** @readonly */
18
+ revision?: string | null;
19
+ /** @readonly */
20
+ _createdDate?: Date | null;
21
+ /** @readonly */
22
+ _updatedDate?: Date | null;
23
+ /**
24
+ * Member ID of participant on site
25
+ * @format GUID
26
+ * @readonly
27
+ */
28
+ memberId?: string;
29
+ /**
30
+ * Program ID which participant participates in
31
+ * @format GUID
32
+ * @readonly
33
+ */
34
+ programId?: string;
35
+ /**
36
+ * Program completion progress
37
+ * @readonly
38
+ */
39
+ progress?: Progress;
40
+ /** state of participation in the program */
41
+ state?: StateWithLiterals;
42
+ /** Certificate issued to participant */
43
+ certificate?: Certificate;
44
+ extendedFields?: ExtendedFields;
45
+ }
46
+ /** @oneof */
47
+ interface ParticipantStateOptionsOneOf {
48
+ paymentPendingOptions?: PaymentPendingOptions;
49
+ joinedOptions?: JoinedOptions;
50
+ completedOptions?: CompletedOptions;
51
+ failedOptions?: FailedOptions;
52
+ suspendedOptions?: SuspendedOptions;
53
+ /** options for auto removed participant */
54
+ autoRemovedOptions?: AutoRemovedOptions;
55
+ }
56
+ declare enum JoinPath {
57
+ UNKNOWN_JOIN_PATH = "UNKNOWN_JOIN_PATH",
58
+ /** Member joined to the program for free */
59
+ FREE = "FREE",
60
+ /** Member was added to the program by site owner */
61
+ ADDED = "ADDED",
62
+ /** Member paid once to join the program */
63
+ SINGLE_PAYMENT = "SINGLE_PAYMENT",
64
+ /** Member has Paid Plan to join */
65
+ PAID_PLAN = "PAID_PLAN",
66
+ /** Member joined with the Free Coupon */
67
+ FREE_COUPON = "FREE_COUPON"
68
+ }
69
+ /** @enumType */
70
+ type JoinPathWithLiterals = JoinPath | 'UNKNOWN_JOIN_PATH' | 'FREE' | 'ADDED' | 'SINGLE_PAYMENT' | 'PAID_PLAN' | 'FREE_COUPON';
71
+ interface SinglePaymentOptions {
72
+ orderId?: string;
73
+ }
74
+ interface PaidPlanOptions {
75
+ /** @maxSize 10 */
76
+ planIds?: string[];
77
+ }
78
+ interface FreeCouponOptions {
79
+ couponId?: string;
80
+ }
81
+ interface Progress {
82
+ /** Number of program steps completed by member */
83
+ totalStepsCompleted?: number;
84
+ /** Total number of program steps available to resolve */
85
+ totalStepsAvailable?: number;
86
+ /**
87
+ * Completion percentage
88
+ * @max 100
89
+ */
90
+ completionPercentage?: number;
91
+ }
92
+ declare enum State {
93
+ /** Unknown state */
94
+ UNKNOWN_STATE = "UNKNOWN_STATE",
95
+ /** Member invited to participate in program */
96
+ INVITED = "INVITED",
97
+ /** Member asked owner to participate in program */
98
+ APPROVAL_PENDING = "APPROVAL_PENDING",
99
+ PAYMENT_PENDING = "PAYMENT_PENDING",
100
+ /** Member joined the program and became participant */
101
+ JOINED = "JOINED",
102
+ /** Participant completed the program, and could join again */
103
+ COMPLETED = "COMPLETED",
104
+ /** Participant failed to complete the program, and could join again */
105
+ FAILED = "FAILED",
106
+ /** Participant with ended pricing plan (PP), will be joined as renew PP */
107
+ SUSPENDED = "SUSPENDED",
108
+ /** Participant removed automatically after some program condition */
109
+ AUTO_REMOVED = "AUTO_REMOVED"
110
+ }
111
+ /** @enumType */
112
+ type StateWithLiterals = State | 'UNKNOWN_STATE' | 'INVITED' | 'APPROVAL_PENDING' | 'PAYMENT_PENDING' | 'JOINED' | 'COMPLETED' | 'FAILED' | 'SUSPENDED' | 'AUTO_REMOVED';
113
+ interface Certificate {
114
+ /**
115
+ * when certificate was issued, UTC
116
+ * @readonly
117
+ */
118
+ issuedDate?: Date | null;
119
+ }
120
+ interface ExtendedFields {
121
+ /**
122
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
123
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
124
+ *
125
+ * You can only access fields for which you have the appropriate permissions.
126
+ *
127
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
128
+ */
129
+ namespaces?: Record<string, Record<string, any>>;
130
+ }
131
+ interface PaymentPendingOptions {
132
+ /**
133
+ * Payment order
134
+ * @format GUID
135
+ */
136
+ paymentOrderId?: string | null;
137
+ /**
138
+ * Offline payment transaction
139
+ * @format GUID
140
+ */
141
+ offlineTrxId?: string | null;
142
+ /**
143
+ * Pricing plans
144
+ * @format GUID
145
+ * @maxSize 10
146
+ */
147
+ paidPlanIds?: string[];
148
+ }
149
+ interface JoinedOptions extends JoinedOptionsJoinPathOptionsOneOf {
150
+ singlePaymentOptions?: SinglePaymentOptions;
151
+ paidPlanOptions?: PaidPlanOptions;
152
+ freeCouponOptions?: FreeCouponOptions;
153
+ timeZone?: string;
154
+ /** @format LOCAL_DATE */
155
+ startDate?: string;
156
+ joinPath?: JoinPathWithLiterals;
157
+ }
158
+ /** @oneof */
159
+ interface JoinedOptionsJoinPathOptionsOneOf {
160
+ singlePaymentOptions?: SinglePaymentOptions;
161
+ paidPlanOptions?: PaidPlanOptions;
162
+ freeCouponOptions?: FreeCouponOptions;
163
+ }
164
+ interface CompletedOptions {
165
+ /**
166
+ * date participant started the program
167
+ * @format LOCAL_DATE
168
+ */
169
+ startDate?: string;
170
+ }
171
+ interface FailedOptions {
172
+ /**
173
+ * date participant started the program
174
+ * @format LOCAL_DATE
175
+ */
176
+ startDate?: string;
177
+ }
178
+ interface SuspendedOptions {
179
+ /**
180
+ * date participant started the program
181
+ * @format LOCAL_DATE
182
+ */
183
+ startDate?: string;
184
+ }
185
+ interface AutoRemovedOptions {
186
+ /**
187
+ * date participant started the program
188
+ * @format LOCAL_DATE
189
+ */
190
+ startDate?: string;
191
+ }
192
+ interface ParticipantsBulkCompleteEvent {
193
+ /**
194
+ * Program ID
195
+ * @format GUID
196
+ */
197
+ programId?: string;
198
+ /**
199
+ * Optional cursor for the next result page
200
+ * @maxLength 16000
201
+ */
202
+ cursorNext?: string | null;
203
+ }
204
+ interface ParticipantsBulkDeleteEvent {
205
+ /**
206
+ * Program ID
207
+ * @format GUID
208
+ */
209
+ programId?: string;
210
+ /**
211
+ * Optional cursor for the next result page
212
+ * @maxLength 16000
213
+ */
214
+ cursorNext?: string | null;
215
+ }
216
+ interface JoinProgramRequest {
217
+ /**
218
+ * Program to join
219
+ * @format GUID
220
+ */
221
+ programId: string;
222
+ }
223
+ interface JoinProgramResponse {
224
+ /** Created participant with corresponding state */
225
+ participant?: Participant;
226
+ }
227
+ interface ParticipantJoined {
228
+ /** Joined participant */
229
+ participant?: Participant;
230
+ }
231
+ interface GetParticipantRequest {
232
+ /**
233
+ * Participant id to fetch
234
+ * @format GUID
235
+ */
236
+ participantId: string;
237
+ }
238
+ interface GetParticipantResponse {
239
+ /** existing participant */
240
+ participant?: Participant;
241
+ }
242
+ interface LeaveProgramRequest {
243
+ /**
244
+ * Participant id to leave program
245
+ * @format GUID
246
+ */
247
+ participantId: string;
248
+ }
249
+ interface LeaveProgramResponse {
250
+ }
251
+ interface ParticipantLeft {
252
+ /**
253
+ * Participant id who left
254
+ * @format GUID
255
+ */
256
+ participantId?: string;
257
+ /**
258
+ * Program id participant left
259
+ * @format GUID
260
+ */
261
+ programId?: string;
262
+ /**
263
+ * Participant's member id
264
+ * @format GUID
265
+ */
266
+ memberId?: string;
267
+ /** Reason for removal */
268
+ removalReason?: RemovalReasonWithLiterals;
269
+ }
270
+ declare enum RemovalReason {
271
+ /** Default for backward compatibility */
272
+ UNKNOWN_REMOVAL_REASON = "UNKNOWN_REMOVAL_REASON",
273
+ /** User-initiated leave */
274
+ LEGITIMATE_LEAVE = "LEGITIMATE_LEAVE",
275
+ /** Cleanup during rejoin flow */
276
+ CLEANUP_FOR_REJOIN = "CLEANUP_FOR_REJOIN",
277
+ /** Cleanup during manual addition */
278
+ CLEANUP_FOR_MANUAL_ADD = "CLEANUP_FOR_MANUAL_ADD"
279
+ }
280
+ /** @enumType */
281
+ type RemovalReasonWithLiterals = RemovalReason | 'UNKNOWN_REMOVAL_REASON' | 'LEGITIMATE_LEAVE' | 'CLEANUP_FOR_REJOIN' | 'CLEANUP_FOR_MANUAL_ADD';
282
+ interface QueryParticipantsRequest {
283
+ /** Platformized query */
284
+ query?: CursorQuery;
285
+ }
286
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
287
+ /** 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`. */
288
+ cursorPaging?: CursorPaging;
289
+ /**
290
+ * Filter object in the following format:
291
+ * `"filter" : {
292
+ * "fieldName1": "value1",
293
+ * "fieldName2":{"$operator":"value2"}
294
+ * }`
295
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
296
+ */
297
+ filter?: Record<string, any> | null;
298
+ /**
299
+ * Sort object in the following format:
300
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
301
+ */
302
+ sort?: Sorting[];
303
+ }
304
+ /** @oneof */
305
+ interface CursorQueryPagingMethodOneOf {
306
+ /** 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`. */
307
+ cursorPaging?: CursorPaging;
308
+ }
309
+ interface Sorting {
310
+ /**
311
+ * Name of the field to sort by.
312
+ * @maxLength 512
313
+ */
314
+ fieldName?: string;
315
+ /** Sort order. */
316
+ order?: SortOrderWithLiterals;
317
+ }
318
+ declare enum SortOrder {
319
+ ASC = "ASC",
320
+ DESC = "DESC"
321
+ }
322
+ /** @enumType */
323
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
324
+ interface CursorPaging {
325
+ /**
326
+ * Number of items to load.
327
+ * @max 100
328
+ */
329
+ limit?: number | null;
330
+ /**
331
+ * Pointer to the next or previous page in the list of results.
332
+ *
333
+ * You can get the relevant cursor token
334
+ * from the `pagingMetadata` object in the previous call's response.
335
+ * Not relevant for the first request.
336
+ */
337
+ cursor?: string | null;
338
+ }
339
+ interface QueryParticipantsResponse {
340
+ /** found participants */
341
+ participants?: Participant[];
342
+ /** paging metadata */
343
+ pagingMetadata?: CursorPagingMetadata;
344
+ }
345
+ interface CursorPagingMetadata {
346
+ /** Number of items returned in the response. */
347
+ count?: number | null;
348
+ /** Offset that was requested. */
349
+ cursors?: Cursors;
350
+ /**
351
+ * Indicates if there are more results after the current page.
352
+ * If `true`, another page of results can be retrieved.
353
+ * If `false`, this is the last page.
354
+ */
355
+ hasNext?: boolean | null;
356
+ }
357
+ interface Cursors {
358
+ /** Cursor pointing to next page in the list of results. */
359
+ next?: string | null;
360
+ /** Cursor pointing to previous page in the list of results. */
361
+ prev?: string | null;
362
+ }
363
+ interface GetAccessStatusRequest {
364
+ }
365
+ interface GetAccessStatusResponse {
366
+ /** True if participants cannot access online programs due to some limitations */
367
+ isBlocked?: boolean;
368
+ }
369
+ interface ApplyCouponRequest {
370
+ /** @format GUID */
371
+ participantId: string;
372
+ /** @format GUID */
373
+ orderId: string;
374
+ couponCode: string;
375
+ }
376
+ interface ApplyCouponResponse {
377
+ /** @format GUID */
378
+ couponId?: string;
379
+ subTotal?: number;
380
+ discount?: number;
381
+ total?: number;
382
+ }
383
+ interface RevertCouponRequest {
384
+ /** @format GUID */
385
+ participantId: string;
386
+ /** @format GUID */
387
+ orderId: string;
388
+ /** @format GUID */
389
+ couponId: string;
390
+ }
391
+ interface RevertCouponResponse {
392
+ total?: number;
393
+ }
394
+ /** This webhook is triggered whenever a payment transaction is updated (including refunds) via specific [Wix Apps](https://dev.wix.com/api/rest/wix-payments/about-wix-payments). */
395
+ interface PaymentEvent extends PaymentEventEventOneOf {
396
+ /** `TRANSACTION_STATUS_CHANGED` event details. */
397
+ transactionStatusChangedEvent?: TransactionStatusChangedEvent;
398
+ /** `REFUND_STATUS_CHANGED` event details. */
399
+ refundStatusChangedEvent?: RefundStatusChangedEvent;
400
+ /**
401
+ * `RECURRING_PAYMENT_STATUS_CHANGED` event details.
402
+ * @deprecated `RECURRING_PAYMENT_STATUS_CHANGED` event details.
403
+ * @targetRemovalDate 2026-06-30
404
+ */
405
+ recurringPaymentStatusChangedEvent?: RecurringPaymentStatusChangedEvent;
406
+ /** `TRANSACTION_UPDATED` event details. */
407
+ transactionUpdatedEvent?: TransactionUpdatedEvent;
408
+ /** `TRANSACTION_CREATED` event details. */
409
+ transactionCreatedEvent?: TransactionCreatedEvent;
410
+ /**
411
+ * Unique event ID.
412
+ * @format GUID
413
+ */
414
+ _id?: string;
415
+ /** Event timestamp */
416
+ eventTime?: Date | null;
417
+ /**
418
+ * ID of the [Wix app](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) that triggered this event.
419
+ * @maxLength 100
420
+ */
421
+ wixAppId?: string;
422
+ /**
423
+ * Unique ID assigned to each Wix app in each site.
424
+ * @format GUID
425
+ */
426
+ wixAppInstanceId?: string;
427
+ /** Event type. */
428
+ eventType?: EventTypeWithLiterals;
429
+ /**
430
+ * ID of Wix app that mediated between Wix Payments and the Wix app that triggered the event (if relevant).
431
+ * @maxLength 100
432
+ */
433
+ managingWixAppId?: string | null;
434
+ }
435
+ /** @oneof */
436
+ interface PaymentEventEventOneOf {
437
+ /** `TRANSACTION_STATUS_CHANGED` event details. */
438
+ transactionStatusChangedEvent?: TransactionStatusChangedEvent;
439
+ /** `REFUND_STATUS_CHANGED` event details. */
440
+ refundStatusChangedEvent?: RefundStatusChangedEvent;
441
+ /**
442
+ * `RECURRING_PAYMENT_STATUS_CHANGED` event details.
443
+ * @deprecated `RECURRING_PAYMENT_STATUS_CHANGED` event details.
444
+ * @targetRemovalDate 2026-06-30
445
+ */
446
+ recurringPaymentStatusChangedEvent?: RecurringPaymentStatusChangedEvent;
447
+ /** `TRANSACTION_UPDATED` event details. */
448
+ transactionUpdatedEvent?: TransactionUpdatedEvent;
449
+ /** `TRANSACTION_CREATED` event details. */
450
+ transactionCreatedEvent?: TransactionCreatedEvent;
451
+ }
452
+ declare enum EventType {
453
+ UNDEFINED = "UNDEFINED",
454
+ /** Fired when a transaction's status changes. */
455
+ TRANSACTION_STATUS_CHANGED = "TRANSACTION_STATUS_CHANGED",
456
+ /** Fired when a refund's status changes. */
457
+ REFUND_STATUS_CHANGED = "REFUND_STATUS_CHANGED",
458
+ /** Fired when a legacy subscription's status changes. */
459
+ RECURRING_PAYMENT_STATUS_CHANGED = "RECURRING_PAYMENT_STATUS_CHANGED",
460
+ /** Fired when a transaction is updated. */
461
+ TRANSACTION_UPDATED = "TRANSACTION_UPDATED",
462
+ /** Fired when a transaction is created. */
463
+ TRANSACTION_CREATED = "TRANSACTION_CREATED"
464
+ }
465
+ /** @enumType */
466
+ type EventTypeWithLiterals = EventType | 'UNDEFINED' | 'TRANSACTION_STATUS_CHANGED' | 'REFUND_STATUS_CHANGED' | 'RECURRING_PAYMENT_STATUS_CHANGED' | 'TRANSACTION_UPDATED' | 'TRANSACTION_CREATED';
467
+ interface TransactionStatusChangedEvent {
468
+ /** Order details (limited to 30 items). */
469
+ order?: Order;
470
+ /** New transaction details. */
471
+ transaction?: Transaction;
472
+ /** Previous transaction status. */
473
+ previousStatus?: TransactionStatusWithLiterals;
474
+ }
475
+ interface Order {
476
+ _id?: string;
477
+ /** Wix app order ID */
478
+ wixAppOrderId?: string;
479
+ /** Wix app buyer ID */
480
+ wixAppBuyerId?: string | null;
481
+ /** Items included in the order */
482
+ items?: OrderItem[];
483
+ /**
484
+ * total number of items in order
485
+ * items_total_count > `items`.size if `items` doesn't contain all items
486
+ */
487
+ itemsTotalCount?: number;
488
+ /** Additional charges to the order - e.g., tax, shipping or discount (optional) */
489
+ additionalCharges?: OrderAdditionalCharges;
490
+ /** Customer's shipping address (optional) */
491
+ shippingAddress?: Address;
492
+ /** Customer's shipping address details (optional) */
493
+ shippingAddressContacts?: FullAddressContactDetails;
494
+ /** Order creation date */
495
+ createdAt?: Date | null;
496
+ /** External data which is stored with the order */
497
+ externalData?: Record<string, string>;
498
+ /**
499
+ * Vertical invoice ID
500
+ * @maxLength 200
501
+ */
502
+ verticalInvoiceId?: string | null;
503
+ /** the part of total amount taken by platform from the amount sent to merchant */
504
+ platformFee?: number | null;
505
+ }
506
+ /** Item included in order */
507
+ interface OrderItem {
508
+ /** Order item ID (required) */
509
+ _id?: string;
510
+ /** Order item name (required) */
511
+ name?: string;
512
+ /** Quantity (required) */
513
+ quantity?: number;
514
+ /** Total price charged for this item in the order - quantity * price (required) */
515
+ price?: number;
516
+ /** Order item description */
517
+ description?: string;
518
+ /** Weight of one item */
519
+ weightInKg?: number;
520
+ /** Whether the item is a physical a digital product */
521
+ category?: OrderItemCategoryWithLiterals;
522
+ }
523
+ /** Order item type */
524
+ declare enum OrderItemCategory {
525
+ UNDEFINED = "UNDEFINED",
526
+ /** Physical product */
527
+ PHYSICAL = "PHYSICAL",
528
+ /** Digital product */
529
+ DIGITAL = "DIGITAL"
530
+ }
531
+ /** @enumType */
532
+ type OrderItemCategoryWithLiterals = OrderItemCategory | 'UNDEFINED' | 'PHYSICAL' | 'DIGITAL';
533
+ /** Describing any additional charges in the order. They are not required, but can't be added later. */
534
+ interface OrderAdditionalCharges {
535
+ /** Absolute taxes charged to the order */
536
+ tax?: number;
537
+ /** Shipping cost charged to the order */
538
+ shipping?: number;
539
+ /** Discount amount applied to the order */
540
+ discount?: number;
541
+ /** Application fee */
542
+ applicationFee?: number;
543
+ }
544
+ /** Physical address */
545
+ interface Address extends AddressStreetOneOf {
546
+ /** Street name and number. */
547
+ streetAddress?: StreetAddress;
548
+ /** Main address line, usually street and number as free text. */
549
+ addressLine1?: string | null;
550
+ /**
551
+ * Country code.
552
+ * @format COUNTRY
553
+ */
554
+ country?: string | null;
555
+ /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
556
+ subdivision?: string | null;
557
+ /** City name. */
558
+ city?: string | null;
559
+ /** Zip/postal code. */
560
+ postalCode?: string | null;
561
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
562
+ addressLine2?: string | null;
563
+ }
564
+ /** @oneof */
565
+ interface AddressStreetOneOf {
566
+ /** Street name and number. */
567
+ streetAddress?: StreetAddress;
568
+ /** Main address line, usually street and number as free text. */
569
+ addressLine?: string | null;
570
+ }
571
+ interface StreetAddress {
572
+ /** Street number. */
573
+ number?: string;
574
+ /** Street name. */
575
+ name?: string;
576
+ }
577
+ interface AddressLocation {
578
+ /** Address latitude. */
579
+ latitude?: number | null;
580
+ /** Address longitude. */
581
+ longitude?: number | null;
582
+ }
583
+ interface Subdivision {
584
+ /** Short subdivision code. */
585
+ code?: string;
586
+ /** Subdivision full name. */
587
+ name?: string;
588
+ }
589
+ declare enum SubdivisionType {
590
+ UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
591
+ /** State */
592
+ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
593
+ /** County */
594
+ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
595
+ /** City/town */
596
+ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
597
+ /** Neighborhood/quarter */
598
+ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
599
+ /** Street/block */
600
+ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
601
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
602
+ COUNTRY = "COUNTRY"
603
+ }
604
+ /** @enumType */
605
+ type SubdivisionTypeWithLiterals = SubdivisionType | 'UNKNOWN_SUBDIVISION_TYPE' | 'ADMINISTRATIVE_AREA_LEVEL_1' | 'ADMINISTRATIVE_AREA_LEVEL_2' | 'ADMINISTRATIVE_AREA_LEVEL_3' | 'ADMINISTRATIVE_AREA_LEVEL_4' | 'ADMINISTRATIVE_AREA_LEVEL_5' | 'COUNTRY';
606
+ /** Subdivision Concordance values */
607
+ interface StandardDetails {
608
+ /**
609
+ * subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30
610
+ * @maxLength 20
611
+ */
612
+ iso31662?: string | null;
613
+ }
614
+ /** Full contact details for an address */
615
+ interface FullAddressContactDetails {
616
+ /** Contact's first name. */
617
+ firstName?: string | null;
618
+ /** Contact's last name. */
619
+ lastName?: string | null;
620
+ /**
621
+ * Contact's phone number.
622
+ * @format PHONE
623
+ */
624
+ phone?: string | null;
625
+ /** Contact's company name. */
626
+ company?: string | null;
627
+ /**
628
+ * Email associated with the address.
629
+ * @format EMAIL
630
+ */
631
+ email?: string | null;
632
+ /** Tax info. Currently usable only in Brazil. */
633
+ vatId?: VatId;
634
+ }
635
+ interface VatId {
636
+ /** Customer's tax ID. */
637
+ _id?: string;
638
+ /**
639
+ * Tax type.
640
+ *
641
+ * Supported values:
642
+ * + `CPF`: for individual tax payers
643
+ * + `CNPJ`: for corporations
644
+ */
645
+ type?: VatTypeWithLiterals;
646
+ }
647
+ /** tax info types */
648
+ declare enum VatType {
649
+ UNSPECIFIED = "UNSPECIFIED",
650
+ /** CPF - for individual tax payers. */
651
+ CPF = "CPF",
652
+ /** CNPJ - for corporations */
653
+ CNPJ = "CNPJ"
654
+ }
655
+ /** @enumType */
656
+ type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
657
+ interface Transaction extends TransactionPaymentMethodDataOneOf {
658
+ creditCardPaymentMethodData?: CreditCardPaymentMethodData;
659
+ /** Transaction ID */
660
+ _id?: string;
661
+ /** Provider transaction ID */
662
+ providerTransactionId?: string | null;
663
+ /** Amount and currency of transaction */
664
+ amount?: CurrencyAmount;
665
+ /** Refunded amount and currency of transaction */
666
+ refundedAmount?: CurrencyAmount;
667
+ /** Updated transaction status */
668
+ status?: TransactionStatusWithLiterals;
669
+ /** Reason provided for status change */
670
+ reasonCode?: string | null;
671
+ /** Payment method */
672
+ paymentMethod?: string;
673
+ /** Payment service provider */
674
+ paymentProvider?: string;
675
+ /** Customer's billing address (optional) */
676
+ billingAddress?: Address;
677
+ /** Customer's billing address - contact details (optional) */
678
+ billingAddressContacts?: FullAddressContactDetails;
679
+ /** Details of subscription, which (if) the transaction is a part of */
680
+ recurringPaymentDetails?: RecurringPaymentDetails;
681
+ /** The details of a payment method account. */
682
+ paymentMethodAccountInfo?: AccountInfo;
683
+ /** Transaction creation date */
684
+ createdAt?: Date | null;
685
+ /** Total number of installments */
686
+ installments?: number;
687
+ /** Scheduled action for this transaction */
688
+ scheduledAction?: ScheduledAction;
689
+ /**
690
+ * order id associated with the transaction on the vertical side
691
+ * @minLength 1
692
+ * @maxLength 100
693
+ */
694
+ verticalOrderId?: string | null;
695
+ }
696
+ /** @oneof */
697
+ interface TransactionPaymentMethodDataOneOf {
698
+ creditCardPaymentMethodData?: CreditCardPaymentMethodData;
699
+ }
700
+ interface CurrencyAmount {
701
+ /** Amount */
702
+ amount?: number;
703
+ currency?: string;
704
+ }
705
+ declare enum TransactionStatus {
706
+ UNDEFINED = "UNDEFINED",
707
+ APPROVED = "APPROVED",
708
+ PENDING = "PENDING",
709
+ PENDING_MERCHANT = "PENDING_MERCHANT",
710
+ CANCELED = "CANCELED",
711
+ DECLINED = "DECLINED",
712
+ REFUNDED = "REFUNDED",
713
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
714
+ AUTHORIZED = "AUTHORIZED",
715
+ VOIDED = "VOIDED"
716
+ }
717
+ /** @enumType */
718
+ type TransactionStatusWithLiterals = TransactionStatus | 'UNDEFINED' | 'APPROVED' | 'PENDING' | 'PENDING_MERCHANT' | 'CANCELED' | 'DECLINED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'AUTHORIZED' | 'VOIDED';
719
+ interface RecurringPaymentDetails {
720
+ /** Current cycle number (Recurring payments only) */
721
+ cycleNumber?: number;
722
+ }
723
+ interface CreditCardPaymentMethodData {
724
+ /** Card issuing network */
725
+ network?: string;
726
+ /** Card number with only bin and last4 positions showed (non-PCI data) */
727
+ maskedCreditCard?: string;
728
+ /** Card holder's full name specified on the card. */
729
+ holderName?: string;
730
+ /** Card expiration month. */
731
+ expiryMonth?: string;
732
+ /**
733
+ * Card expiration year.
734
+ * @minLength 4
735
+ * @maxLength 4
736
+ */
737
+ expiryYear?: string | null;
738
+ /**
739
+ * Card last 4 digits.
740
+ * @minLength 4
741
+ * @maxLength 4
742
+ */
743
+ lastFourDigits?: string | null;
744
+ /**
745
+ * Card BIN (Bank Identification Number). It's the first 4-8 digits of a card number.
746
+ * @minLength 4
747
+ * @maxLength 8
748
+ */
749
+ bin?: string | null;
750
+ }
751
+ interface AccountInfo {
752
+ /**
753
+ * The email of an Account used by Payment Method
754
+ * @format EMAIL
755
+ */
756
+ email?: string | null;
757
+ }
758
+ interface ScheduledAction {
759
+ /** type of the action */
760
+ type?: ScheduledActionTypeWithLiterals;
761
+ /** the date and time of the action */
762
+ executionDate?: Date | null;
763
+ }
764
+ declare enum ScheduledActionType {
765
+ VOID = "VOID",
766
+ CAPTURE = "CAPTURE"
767
+ }
768
+ /** @enumType */
769
+ type ScheduledActionTypeWithLiterals = ScheduledActionType | 'VOID' | 'CAPTURE';
770
+ interface RefundStatusChangedEvent {
771
+ /** Order details (limited to 30 items). */
772
+ order?: Order;
773
+ /** Updated transaction details. */
774
+ transaction?: Transaction;
775
+ /** Updated refund details. */
776
+ refund?: Refund;
777
+ /** Previous refund status. */
778
+ previousStatus?: RefundStatusWithLiterals;
779
+ }
780
+ interface Refund {
781
+ _id?: string;
782
+ /** Amount and currency of refund */
783
+ amount?: CurrencyAmount;
784
+ /** Updated refund status */
785
+ status?: RefundStatusWithLiterals;
786
+ /** Reason provided for status change */
787
+ reasonCode?: string | null;
788
+ /** Refund creation date */
789
+ createdAt?: Date | null;
790
+ }
791
+ declare enum RefundStatus {
792
+ UNDEFINED = "UNDEFINED",
793
+ APPROVED = "APPROVED",
794
+ PENDING = "PENDING",
795
+ DECLINED = "DECLINED"
796
+ }
797
+ /** @enumType */
798
+ type RefundStatusWithLiterals = RefundStatus | 'UNDEFINED' | 'APPROVED' | 'PENDING' | 'DECLINED';
799
+ interface RecurringPaymentStatusChangedEvent {
800
+ /** Order details(limited to 30 items). */
801
+ order?: Order;
802
+ /** Recurring payment status. */
803
+ status?: StatusWithLiterals;
804
+ /** Previous recurring payment status. */
805
+ previousStatus?: StatusWithLiterals;
806
+ /** Details of RecurringPayment cancellation (empty if `status` is not CANCELLED). */
807
+ cancellationDetails?: RecurringPaymentCancellationDetails;
808
+ }
809
+ declare enum Status {
810
+ UNDEFINED = "UNDEFINED",
811
+ PENDING = "PENDING",
812
+ ACTIVE = "ACTIVE",
813
+ CANCELLED = "CANCELLED",
814
+ FINISHED = "FINISHED",
815
+ SUSPENDED = "SUSPENDED"
816
+ }
817
+ /** @enumType */
818
+ type StatusWithLiterals = Status | 'UNDEFINED' | 'PENDING' | 'ACTIVE' | 'CANCELLED' | 'FINISHED' | 'SUSPENDED';
819
+ interface RecurringPaymentCancellationDetails {
820
+ /** Initiator of cancellation */
821
+ initiator?: InitiatorWithLiterals;
822
+ /** Successfully paid recurring cycles count before the cancellation */
823
+ paidRegularCycleCount?: number;
824
+ }
825
+ declare enum Initiator {
826
+ UNDEFINED = "UNDEFINED",
827
+ BUYER = "BUYER",
828
+ MERCHANT = "MERCHANT",
829
+ PAYMENT = "PAYMENT",
830
+ SETUP = "SETUP"
831
+ }
832
+ /** @enumType */
833
+ type InitiatorWithLiterals = Initiator | 'UNDEFINED' | 'BUYER' | 'MERCHANT' | 'PAYMENT' | 'SETUP';
834
+ interface TransactionUpdatedEvent {
835
+ /** Order details (limited to 30 items). */
836
+ order?: Order;
837
+ /** Updated transaction details. */
838
+ transaction?: Transaction;
839
+ /** Is event triggered by request to clean user data */
840
+ triggeredByAnonymizeRequest?: boolean | null;
841
+ }
842
+ interface TransactionCreatedEvent {
843
+ /** Order details (limited to 30 items). */
844
+ order?: Order;
845
+ /** Updated transaction details. */
846
+ transaction?: Transaction;
847
+ }
848
+ interface Empty {
849
+ }
850
+ interface OfflinePaymentSent {
851
+ /** Participant who started offline payment */
852
+ participant?: Participant;
853
+ }
854
+ interface PaymentFailed {
855
+ /** Participant whose payment was failed */
856
+ participant?: Participant;
857
+ }
858
+ interface SinglePaymentConfirmed {
859
+ /** Participant whose payment was confirmed */
860
+ participant?: Participant;
861
+ }
862
+ interface SinglePaymentDeclined {
863
+ /** Participant whose payment was declined */
864
+ participant?: Participant;
865
+ }
866
+ interface DomainEvent extends DomainEventBodyOneOf {
867
+ createdEvent?: EntityCreatedEvent;
868
+ updatedEvent?: EntityUpdatedEvent;
869
+ deletedEvent?: EntityDeletedEvent;
870
+ actionEvent?: ActionEvent;
871
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
872
+ _id?: string;
873
+ /**
874
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
875
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
876
+ */
877
+ entityFqdn?: string;
878
+ /**
879
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
880
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
881
+ */
882
+ slug?: string;
883
+ /** ID of the entity associated with the event. */
884
+ entityId?: string;
885
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
886
+ eventTime?: Date | null;
887
+ /**
888
+ * Whether the event was triggered as a result of a privacy regulation application
889
+ * (for example, GDPR).
890
+ */
891
+ triggeredByAnonymizeRequest?: boolean | null;
892
+ /** If present, indicates the action that triggered the event. */
893
+ originatedFrom?: string | null;
894
+ /**
895
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
896
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
897
+ */
898
+ entityEventSequence?: string | null;
899
+ }
900
+ /** @oneof */
901
+ interface DomainEventBodyOneOf {
902
+ createdEvent?: EntityCreatedEvent;
903
+ updatedEvent?: EntityUpdatedEvent;
904
+ deletedEvent?: EntityDeletedEvent;
905
+ actionEvent?: ActionEvent;
906
+ }
907
+ interface EntityCreatedEvent {
908
+ entity?: string;
909
+ }
910
+ interface RestoreInfo {
911
+ deletedDate?: Date | null;
912
+ }
913
+ interface EntityUpdatedEvent {
914
+ /**
915
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
916
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
917
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
918
+ */
919
+ currentEntity?: string;
920
+ }
921
+ interface EntityDeletedEvent {
922
+ /** Entity that was deleted. */
923
+ deletedEntity?: string | null;
924
+ }
925
+ interface ActionEvent {
926
+ body?: string;
927
+ }
928
+ interface BenefitNotification {
929
+ /**
930
+ * Plan unique ID
931
+ * @format GUID
932
+ */
933
+ planId?: string;
934
+ /**
935
+ * App def ID
936
+ * @format GUID
937
+ */
938
+ appDefId?: string;
939
+ /** Current benefit details */
940
+ benefit?: Benefit;
941
+ /** Previous benefit */
942
+ prevBenefit?: Benefit;
943
+ /** Notification event */
944
+ event?: EventWithLiterals;
945
+ }
946
+ interface Benefit {
947
+ /**
948
+ * Benefit unique ID
949
+ * @format GUID
950
+ * @readonly
951
+ */
952
+ _id?: string | null;
953
+ /** Benefit Type */
954
+ benefitType?: BenefitTypeWithLiterals;
955
+ /**
956
+ * Resource IDs that serves by this benefit
957
+ * @format GUID
958
+ */
959
+ resourceIds?: string[];
960
+ /** Amount of credits that provided by this benefit */
961
+ creditAmount?: number | null;
962
+ /**
963
+ * additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value
964
+ * @maxSize 20
965
+ */
966
+ customFields?: Record<string, string>;
967
+ /** return value only in case it required in the ListRequest, true means that benefit's type could be updated */
968
+ editable?: boolean | null;
969
+ /** Benefit behavior */
970
+ behavior?: Behavior;
971
+ /**
972
+ * Id of the app associated with this benefit
973
+ * @format GUID
974
+ * @readonly
975
+ */
976
+ appDefId?: string | null;
977
+ }
978
+ interface EntryPass {
979
+ }
980
+ interface Discount extends DiscountDiscountOneOf {
981
+ /**
982
+ * Fixed-rate percent off discount
983
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
984
+ */
985
+ percentOffRate?: string;
986
+ /**
987
+ * Absolute amount discount
988
+ * @decimalValue options { gt:0, maxScale:2 }
989
+ */
990
+ moneyOffAmount?: string;
991
+ }
992
+ /** @oneof */
993
+ interface DiscountDiscountOneOf {
994
+ /**
995
+ * Fixed-rate percent off discount
996
+ * @decimalValue options { gt:0, lte:100, maxScale:2 }
997
+ */
998
+ percentOffRate?: string;
999
+ /**
1000
+ * Absolute amount discount
1001
+ * @decimalValue options { gt:0, maxScale:2 }
1002
+ */
1003
+ moneyOffAmount?: string;
1004
+ }
1005
+ declare enum BenefitType {
1006
+ /** Should never be used */
1007
+ UNDEFINED = "UNDEFINED",
1008
+ /** Limited benefit type */
1009
+ LIMITED = "LIMITED",
1010
+ /** Unlimited benefit type */
1011
+ UNLIMITED = "UNLIMITED"
1012
+ }
1013
+ /** @enumType */
1014
+ type BenefitTypeWithLiterals = BenefitType | 'UNDEFINED' | 'LIMITED' | 'UNLIMITED';
1015
+ interface Behavior extends BehaviorBehaviorOneOf {
1016
+ /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
1017
+ defaultBehavior?: EntryPass;
1018
+ /** Discount applied to paid resources */
1019
+ discount?: Discount;
1020
+ }
1021
+ /** @oneof */
1022
+ interface BehaviorBehaviorOneOf {
1023
+ /** Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events. */
1024
+ defaultBehavior?: EntryPass;
1025
+ /** Discount applied to paid resources */
1026
+ discount?: Discount;
1027
+ }
1028
+ declare enum Event {
1029
+ Updated = "Updated",
1030
+ Deleted = "Deleted",
1031
+ Created = "Created"
1032
+ }
1033
+ /** @enumType */
1034
+ type EventWithLiterals = Event | 'Updated' | 'Deleted' | 'Created';
1035
+ interface MessageEnvelope {
1036
+ /**
1037
+ * App instance ID.
1038
+ * @format GUID
1039
+ */
1040
+ instanceId?: string | null;
1041
+ /**
1042
+ * Event type.
1043
+ * @maxLength 150
1044
+ */
1045
+ eventType?: string;
1046
+ /** The identification type and identity data. */
1047
+ identity?: IdentificationData;
1048
+ /** Stringify payload. */
1049
+ data?: string;
1050
+ }
1051
+ interface IdentificationData extends IdentificationDataIdOneOf {
1052
+ /**
1053
+ * ID of a site visitor that has not logged in to the site.
1054
+ * @format GUID
1055
+ */
1056
+ anonymousVisitorId?: string;
1057
+ /**
1058
+ * ID of a site visitor that has logged in to the site.
1059
+ * @format GUID
1060
+ */
1061
+ memberId?: string;
1062
+ /**
1063
+ * ID of a Wix user (site owner, contributor, etc.).
1064
+ * @format GUID
1065
+ */
1066
+ wixUserId?: string;
1067
+ /**
1068
+ * ID of an app.
1069
+ * @format GUID
1070
+ */
1071
+ appId?: string;
1072
+ /** @readonly */
1073
+ identityType?: WebhookIdentityTypeWithLiterals;
1074
+ }
1075
+ /** @oneof */
1076
+ interface IdentificationDataIdOneOf {
1077
+ /**
1078
+ * ID of a site visitor that has not logged in to the site.
1079
+ * @format GUID
1080
+ */
1081
+ anonymousVisitorId?: string;
1082
+ /**
1083
+ * ID of a site visitor that has logged in to the site.
1084
+ * @format GUID
1085
+ */
1086
+ memberId?: string;
1087
+ /**
1088
+ * ID of a Wix user (site owner, contributor, etc.).
1089
+ * @format GUID
1090
+ */
1091
+ wixUserId?: string;
1092
+ /**
1093
+ * ID of an app.
1094
+ * @format GUID
1095
+ */
1096
+ appId?: string;
1097
+ }
1098
+ declare enum WebhookIdentityType {
1099
+ UNKNOWN = "UNKNOWN",
1100
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1101
+ MEMBER = "MEMBER",
1102
+ WIX_USER = "WIX_USER",
1103
+ APP = "APP"
1104
+ }
1105
+ /** @enumType */
1106
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1107
+ interface BulkInviteToProgramRequest {
1108
+ /**
1109
+ * Program to which bulk invite participants.
1110
+ * @format GUID
1111
+ */
1112
+ programId: string;
1113
+ /**
1114
+ * Return added participants in the response or not.
1115
+ * @format GUID
1116
+ * @minSize 1
1117
+ * @maxSize 100
1118
+ */
1119
+ memberIds?: string[];
1120
+ /** Return invited participants in the response or not. */
1121
+ returnEntity?: boolean;
1122
+ }
1123
+ interface BulkInviteToProgramResponse {
1124
+ /** Participants created by bulk action */
1125
+ results?: BulkInviteToProgramResult[];
1126
+ /** Bulk action metadata. */
1127
+ bulkActionMetadata?: BulkActionMetadata;
1128
+ }
1129
+ interface ItemMetadata {
1130
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1131
+ _id?: string | null;
1132
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
1133
+ originalIndex?: number;
1134
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1135
+ success?: boolean;
1136
+ /** Details about the error in case of failure. */
1137
+ error?: ApplicationError;
1138
+ }
1139
+ interface ApplicationError {
1140
+ /** Error code. */
1141
+ code?: string;
1142
+ /** Description of the error. */
1143
+ description?: string;
1144
+ /** Data related to the error. */
1145
+ data?: Record<string, any> | null;
1146
+ }
1147
+ interface BulkInviteToProgramResult {
1148
+ /** Invited participant metadata. */
1149
+ itemMetadata?: ItemMetadata;
1150
+ /** Invited participant */
1151
+ item?: Participant;
1152
+ }
1153
+ interface BulkActionMetadata {
1154
+ /** Number of items that were successfully processed. */
1155
+ totalSuccesses?: number;
1156
+ /** Number of items that couldn't be processed. */
1157
+ totalFailures?: number;
1158
+ /** Number of failures without details because detailed failure threshold was exceeded. */
1159
+ undetailedFailures?: number;
1160
+ }
1161
+ interface ParticipantInvited {
1162
+ /**
1163
+ * Program to which bulk invite participants.
1164
+ * @format GUID
1165
+ */
1166
+ programId?: string;
1167
+ /**
1168
+ * Invited member to program
1169
+ * @format GUID
1170
+ */
1171
+ memberId?: string;
1172
+ }
1173
+ interface BulkInviteAllToProgramRequest {
1174
+ /**
1175
+ * Program to which bulk add participants.
1176
+ * @format GUID
1177
+ */
1178
+ programId: string;
1179
+ /**
1180
+ * Exclude site members.
1181
+ * @format GUID
1182
+ * @maxSize 100
1183
+ */
1184
+ excludeMemberIds?: string[];
1185
+ }
1186
+ interface BulkInviteAllToProgramResponse {
1187
+ /** Bulk action metadata. */
1188
+ bulkActionMetadata?: BulkActionMetadata;
1189
+ }
1190
+ interface BulkAddToProgramRequest {
1191
+ /**
1192
+ * Program to which bulk add participants.
1193
+ * @format GUID
1194
+ */
1195
+ programId: string;
1196
+ /**
1197
+ * Site members.
1198
+ * @format GUID
1199
+ * @minSize 1
1200
+ * @maxSize 1000
1201
+ */
1202
+ memberIds?: string[];
1203
+ /** Return added participants in the response or not. */
1204
+ returnEntity?: boolean;
1205
+ }
1206
+ interface BulkAddToProgramResponse {
1207
+ /** Participants created by bulk action */
1208
+ results?: BulkAddToProgramResult[];
1209
+ /** Bulk action metadata. */
1210
+ bulkActionMetadata?: BulkActionMetadata;
1211
+ }
1212
+ interface BulkAddToProgramResult {
1213
+ /** Added participant metadata. */
1214
+ itemMetadata?: ItemMetadata;
1215
+ /** Added participant */
1216
+ item?: Participant;
1217
+ }
1218
+ interface ParticipantAdded {
1219
+ /**
1220
+ * Program ID which participant was added
1221
+ * @format GUID
1222
+ */
1223
+ programId?: string;
1224
+ /**
1225
+ * Member ID of participant on site
1226
+ * @format GUID
1227
+ */
1228
+ memberId?: string;
1229
+ }
1230
+ interface BulkAddAllToProgramRequest {
1231
+ /**
1232
+ * Program to which bulk add participants.
1233
+ * @format GUID
1234
+ */
1235
+ programId: string;
1236
+ /**
1237
+ * Exclude site members.
1238
+ * @format GUID
1239
+ * @maxSize 100
1240
+ */
1241
+ excludeMemberIds?: string[];
1242
+ }
1243
+ interface BulkAddAllToProgramResponse {
1244
+ /** Bulk action metadata. */
1245
+ bulkActionMetadata?: BulkActionMetadata;
1246
+ }
1247
+ interface BulkApproveParticipantRequest {
1248
+ /**
1249
+ * Participants to add
1250
+ * @format GUID
1251
+ * @maxSize 100
1252
+ */
1253
+ participantIds: string[];
1254
+ /**
1255
+ * program to approve participant
1256
+ * @format GUID
1257
+ */
1258
+ programId?: string;
1259
+ /** Return approved participants in the response or not */
1260
+ returnEntity?: boolean;
1261
+ }
1262
+ interface BulkApproveParticipantResponse {
1263
+ /** Participants approved by bulk action */
1264
+ results?: BulkApproveParticipantResult[];
1265
+ /** Bulk action metadata */
1266
+ bulkActionMetadata?: BulkActionMetadata;
1267
+ }
1268
+ interface BulkApproveParticipantResult {
1269
+ /** Approved participant metadata */
1270
+ itemMetadata?: ItemMetadata;
1271
+ /** Approved or existing participant */
1272
+ item?: Participant;
1273
+ }
1274
+ interface ParticipantApproved {
1275
+ /**
1276
+ * Program ID which participant approved
1277
+ * @format GUID
1278
+ */
1279
+ programId?: string;
1280
+ /**
1281
+ * Member ID of participant approved
1282
+ * @format GUID
1283
+ */
1284
+ memberId?: string;
1285
+ }
1286
+ interface BulkApproveAllParticipantRequest {
1287
+ /**
1288
+ * Program to approve all participants.
1289
+ * @format GUID
1290
+ */
1291
+ programId?: string;
1292
+ /**
1293
+ * Exclude site members.
1294
+ * @format GUID
1295
+ * @maxSize 100
1296
+ */
1297
+ excludeParticipantIds?: string[];
1298
+ }
1299
+ interface BulkApproveAllParticipantResponse {
1300
+ /**
1301
+ * Job id with async process
1302
+ * @format GUID
1303
+ */
1304
+ jobId?: string;
1305
+ }
1306
+ interface DeleteParticipantRequest {
1307
+ /**
1308
+ * Participants to delete
1309
+ * @format GUID
1310
+ */
1311
+ participantId: string;
1312
+ }
1313
+ interface DeleteParticipantResponse {
1314
+ }
1315
+ interface ParticipantRejected {
1316
+ /**
1317
+ * Program ID which participant rejected
1318
+ * @format GUID
1319
+ */
1320
+ programId?: string;
1321
+ /**
1322
+ * Member ID of participant rejected
1323
+ * @format GUID
1324
+ */
1325
+ memberId?: string;
1326
+ }
1327
+ interface IssueCertificateRequest {
1328
+ /**
1329
+ * Participant to get certificate
1330
+ * @format GUID
1331
+ */
1332
+ participantId: string;
1333
+ }
1334
+ interface IssueCertificateResponse {
1335
+ /** Updated participant */
1336
+ participant?: Participant;
1337
+ }
1338
+ interface GetCompletionStatsRequest {
1339
+ /**
1340
+ * program id to get stats for
1341
+ * @format GUID
1342
+ */
1343
+ programId: string;
1344
+ }
1345
+ interface GetCompletionStatsResponse {
1346
+ /** Number of participants that completed the program */
1347
+ completedAll?: number;
1348
+ /** Percentage of participants that completed the program */
1349
+ completionRate?: number;
1350
+ }
1351
+ interface GetPremiumStatsRequest {
1352
+ }
1353
+ interface GetPremiumStatsResponse {
1354
+ /** True if site has Online Programs premium feature */
1355
+ hasPremium?: boolean;
1356
+ /** Count of active participants on the site */
1357
+ activeParticipantsCount?: number;
1358
+ /** Limit of active participants on a site without premium */
1359
+ activeParticipantsLimit?: number;
1360
+ }
1361
+ interface CompleteParticipantRequest {
1362
+ /**
1363
+ * ID of participant
1364
+ * @format GUID
1365
+ */
1366
+ participantId?: string;
1367
+ }
1368
+ interface CompleteParticipantResponse {
1369
+ /** Updated participant */
1370
+ participant?: Participant;
1371
+ }
1372
+ interface ExportParticipantsStatsRequest {
1373
+ /**
1374
+ * program id to export data from
1375
+ * @format GUID
1376
+ */
1377
+ programId: string;
1378
+ }
1379
+ interface ExportParticipantsStatsResponse {
1380
+ }
1381
+ interface ParticipantExportsFinished {
1382
+ /**
1383
+ * program id from which stats were exported
1384
+ * @format GUID
1385
+ */
1386
+ programId?: string;
1387
+ /**
1388
+ * user id of program owner
1389
+ * @format GUID
1390
+ */
1391
+ userId?: string;
1392
+ /**
1393
+ * url to download report
1394
+ * @format WEB_URL
1395
+ */
1396
+ downloadUrl?: string;
1397
+ /** days url will be downloadable */
1398
+ downloadUrlTtlDays?: number;
1399
+ }
1400
+ interface BaseEventMetadata {
1401
+ /**
1402
+ * App instance ID.
1403
+ * @format GUID
1404
+ */
1405
+ instanceId?: string | null;
1406
+ /**
1407
+ * Event type.
1408
+ * @maxLength 150
1409
+ */
1410
+ eventType?: string;
1411
+ /** The identification type and identity data. */
1412
+ identity?: IdentificationData;
1413
+ }
1414
+ interface EventMetadata extends BaseEventMetadata {
1415
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
1416
+ _id?: string;
1417
+ /**
1418
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
1419
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
1420
+ */
1421
+ entityFqdn?: string;
1422
+ /**
1423
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
1424
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
1425
+ */
1426
+ slug?: string;
1427
+ /** ID of the entity associated with the event. */
1428
+ entityId?: string;
1429
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
1430
+ eventTime?: Date | null;
1431
+ /**
1432
+ * Whether the event was triggered as a result of a privacy regulation application
1433
+ * (for example, GDPR).
1434
+ */
1435
+ triggeredByAnonymizeRequest?: boolean | null;
1436
+ /** If present, indicates the action that triggered the event. */
1437
+ originatedFrom?: string | null;
1438
+ /**
1439
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1440
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1441
+ */
1442
+ entityEventSequence?: string | null;
1443
+ }
1444
+ interface ParticipantJoinedEnvelope {
1445
+ data: ParticipantJoined;
1446
+ metadata: EventMetadata;
1447
+ }
1448
+ /** @permissionScope Manage Challenges
1449
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1450
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1451
+ * @webhook
1452
+ * @eventType wix.online_programs.v3.participant_participant_joined
1453
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ParticipantsService
1454
+ * @slug participant_joined
1455
+ * @documentationMaturity preview
1456
+ */
1457
+ declare function onParticipantJoined(handler: (event: ParticipantJoinedEnvelope) => void | Promise<void>): void;
1458
+ interface ParticipantLeftEnvelope {
1459
+ data: ParticipantLeft;
1460
+ metadata: EventMetadata;
1461
+ }
1462
+ /** @permissionScope Manage Challenges
1463
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1464
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1465
+ * @webhook
1466
+ * @eventType wix.online_programs.v3.participant_participant_left
1467
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ParticipantsService
1468
+ * @slug participant_left
1469
+ * @documentationMaturity preview
1470
+ */
1471
+ declare function onParticipantLeft(handler: (event: ParticipantLeftEnvelope) => void | Promise<void>): void;
1472
+ interface ParticipantDeletedEnvelope {
1473
+ entity: Participant;
1474
+ metadata: EventMetadata;
1475
+ }
1476
+ /** @webhook
1477
+ * @eventType wix.online_programs.v3.participant_deleted
1478
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
1479
+ * @slug deleted
1480
+ * @documentationMaturity preview
1481
+ */
1482
+ declare function onParticipantDeleted(handler: (event: ParticipantDeletedEnvelope) => void | Promise<void>): void;
1483
+ interface ParticipantAddedEnvelope {
1484
+ data: ParticipantAdded;
1485
+ metadata: EventMetadata;
1486
+ }
1487
+ /** @permissionScope Manage Challenges
1488
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1489
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1490
+ * @webhook
1491
+ * @eventType wix.online_programs.v3.participant_participant_added
1492
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
1493
+ * @slug participant_added
1494
+ * @documentationMaturity preview
1495
+ */
1496
+ declare function onParticipantAdded(handler: (event: ParticipantAddedEnvelope) => void | Promise<void>): void;
1497
+ interface ParticipantApprovedEnvelope {
1498
+ data: ParticipantApproved;
1499
+ metadata: EventMetadata;
1500
+ }
1501
+ /** @permissionScope Manage Challenges
1502
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1503
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1504
+ * @webhook
1505
+ * @eventType wix.online_programs.v3.participant_participant_approved
1506
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
1507
+ * @slug participant_approved
1508
+ * @documentationMaturity preview
1509
+ */
1510
+ declare function onParticipantApproved(handler: (event: ParticipantApprovedEnvelope) => void | Promise<void>): void;
1511
+ interface ParticipantInvitedEnvelope {
1512
+ data: ParticipantInvited;
1513
+ metadata: EventMetadata;
1514
+ }
1515
+ /** @permissionScope Manage Challenges
1516
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1517
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1518
+ * @webhook
1519
+ * @eventType wix.online_programs.v3.participant_participant_invited
1520
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
1521
+ * @slug participant_invited
1522
+ * @documentationMaturity preview
1523
+ */
1524
+ declare function onParticipantInvited(handler: (event: ParticipantInvitedEnvelope) => void | Promise<void>): void;
1525
+ interface ParticipantRejectedEnvelope {
1526
+ data: ParticipantRejected;
1527
+ metadata: EventMetadata;
1528
+ }
1529
+ /** @permissionScope Manage Challenges
1530
+ * @permissionScopeId SCOPE.CHALLENGES.MANAGE
1531
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1532
+ * @webhook
1533
+ * @eventType wix.online_programs.v3.participant_participant_rejected
1534
+ * @serviceIdentifier wix.onlineprograms.participants.v3.ManageParticipantsService
1535
+ * @slug participant_rejected
1536
+ * @documentationMaturity preview
1537
+ */
1538
+ declare function onParticipantRejected(handler: (event: ParticipantRejectedEnvelope) => void | Promise<void>): void;
1539
+ /**
1540
+ * Member joins the program. By the type of program, participant in corresponding
1541
+ * state will be created.
1542
+ * @param programId - Program to join
1543
+ * @public
1544
+ * @documentationMaturity preview
1545
+ * @requiredField programId
1546
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1547
+ * @applicableIdentity APP
1548
+ * @applicableIdentity MEMBER
1549
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.JoinProgram
1550
+ */
1551
+ declare function joinProgram(programId: string): Promise<NonNullablePaths<JoinProgramResponse, `participant.paymentPendingOptions.paidPlanIds` | `participant.joinedOptions.singlePaymentOptions.orderId` | `participant.joinedOptions.paidPlanOptions.planIds` | `participant.joinedOptions.freeCouponOptions.couponId` | `participant.joinedOptions.timeZone` | `participant.joinedOptions.startDate` | `participant.joinedOptions.joinPath` | `participant.completedOptions.startDate` | `participant.failedOptions.startDate` | `participant.suspendedOptions.startDate` | `participant.autoRemovedOptions.startDate` | `participant.memberId` | `participant.programId` | `participant.progress.totalStepsCompleted` | `participant.progress.totalStepsAvailable` | `participant.progress.completionPercentage` | `participant.state`, 5>>;
1552
+ /**
1553
+ * Returns participant.
1554
+ * @param participantId - Participant id to fetch
1555
+ * @public
1556
+ * @documentationMaturity preview
1557
+ * @requiredField participantId
1558
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1559
+ * @applicableIdentity APP
1560
+ * @applicableIdentity MEMBER
1561
+ * @returns existing participant
1562
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant
1563
+ */
1564
+ declare function getParticipant(participantId: string): Promise<NonNullablePaths<Participant, `paymentPendingOptions.paidPlanIds` | `joinedOptions.singlePaymentOptions.orderId` | `joinedOptions.paidPlanOptions.planIds` | `joinedOptions.freeCouponOptions.couponId` | `joinedOptions.timeZone` | `joinedOptions.startDate` | `joinedOptions.joinPath` | `completedOptions.startDate` | `failedOptions.startDate` | `suspendedOptions.startDate` | `autoRemovedOptions.startDate` | `memberId` | `programId` | `progress.totalStepsCompleted` | `progress.totalStepsAvailable` | `progress.completionPercentage` | `state`, 4>>;
1565
+ /**
1566
+ * Participant leaves program. Entity will be deleted. Idempotent call.
1567
+ * @param participantId - Participant id to leave program
1568
+ * @public
1569
+ * @documentationMaturity preview
1570
+ * @requiredField participantId
1571
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_LEAVE
1572
+ * @applicableIdentity APP
1573
+ * @applicableIdentity MEMBER
1574
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.LeaveProgram
1575
+ */
1576
+ declare function leaveProgram(participantId: string): Promise<void>;
1577
+ /**
1578
+ * Query existing participants
1579
+ * @public
1580
+ * @documentationMaturity preview
1581
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1582
+ * @applicableIdentity APP
1583
+ * @applicableIdentity MEMBER
1584
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants
1585
+ */
1586
+ declare function queryParticipants(): ParticipantsQueryBuilder;
1587
+ interface QueryCursorResult {
1588
+ cursors: Cursors;
1589
+ hasNext: () => boolean;
1590
+ hasPrev: () => boolean;
1591
+ length: number;
1592
+ pageSize: number;
1593
+ }
1594
+ interface ParticipantsQueryResult extends QueryCursorResult {
1595
+ items: Participant[];
1596
+ query: ParticipantsQueryBuilder;
1597
+ next: () => Promise<ParticipantsQueryResult>;
1598
+ prev: () => Promise<ParticipantsQueryResult>;
1599
+ }
1600
+ interface ParticipantsQueryBuilder {
1601
+ /** @param propertyName - Property whose value is compared with `value`.
1602
+ * @param value - Value to compare against.
1603
+ * @documentationMaturity preview
1604
+ */
1605
+ eq: (propertyName: '_id' | 'memberId' | 'programId' | 'state', value: any) => ParticipantsQueryBuilder;
1606
+ /** @param propertyName - Property whose value is compared with `value`.
1607
+ * @param value - Value to compare against.
1608
+ * @documentationMaturity preview
1609
+ */
1610
+ ge: (propertyName: 'joinedOptions.startDate', value: any) => ParticipantsQueryBuilder;
1611
+ /** @param propertyName - Property whose value is compared with `value`.
1612
+ * @param value - Value to compare against.
1613
+ * @documentationMaturity preview
1614
+ */
1615
+ gt: (propertyName: 'joinedOptions.startDate', value: any) => ParticipantsQueryBuilder;
1616
+ /** @param propertyName - Property whose value is compared with `value`.
1617
+ * @param value - Value to compare against.
1618
+ * @documentationMaturity preview
1619
+ */
1620
+ le: (propertyName: 'joinedOptions.startDate', value: any) => ParticipantsQueryBuilder;
1621
+ /** @param propertyName - Property whose value is compared with `value`.
1622
+ * @param value - Value to compare against.
1623
+ * @documentationMaturity preview
1624
+ */
1625
+ lt: (propertyName: 'joinedOptions.startDate', value: any) => ParticipantsQueryBuilder;
1626
+ /** @documentationMaturity preview */
1627
+ in: (propertyName: '_id' | 'memberId' | 'state', value: any) => ParticipantsQueryBuilder;
1628
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1629
+ * @documentationMaturity preview
1630
+ */
1631
+ ascending: (...propertyNames: Array<'joinedOptions.startDate' | '_id' | '_createdDate' | 'state'>) => ParticipantsQueryBuilder;
1632
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1633
+ * @documentationMaturity preview
1634
+ */
1635
+ descending: (...propertyNames: Array<'joinedOptions.startDate' | '_id' | '_createdDate' | 'state'>) => ParticipantsQueryBuilder;
1636
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1637
+ * @documentationMaturity preview
1638
+ */
1639
+ limit: (limit: number) => ParticipantsQueryBuilder;
1640
+ /** @param cursor - A pointer to specific record
1641
+ * @documentationMaturity preview
1642
+ */
1643
+ skipTo: (cursor: string) => ParticipantsQueryBuilder;
1644
+ /** @documentationMaturity preview */
1645
+ find: () => Promise<ParticipantsQueryResult>;
1646
+ }
1647
+ /**
1648
+ * Get access status
1649
+ * @public
1650
+ * @documentationMaturity preview
1651
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_READ
1652
+ * @applicableIdentity APP
1653
+ * @applicableIdentity MEMBER
1654
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus
1655
+ */
1656
+ declare function getAccessStatus(): Promise<NonNullablePaths<GetAccessStatusResponse, `isBlocked`, 2>>;
1657
+ /**
1658
+ * Apply coupon to order
1659
+ * @public
1660
+ * @documentationMaturity preview
1661
+ * @requiredField identifiers
1662
+ * @requiredField identifiers.couponCode
1663
+ * @requiredField identifiers.participantId
1664
+ * @requiredField orderId
1665
+ * @permissionId ONLINE_PROGRAMS.COUPON_APPLY
1666
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.ApplyCoupon
1667
+ */
1668
+ declare function applyCoupon(identifiers: NonNullablePaths<ApplyCouponIdentifiers, `couponCode` | `participantId`, 2>, orderId: string): Promise<NonNullablePaths<ApplyCouponResponse, `couponId` | `subTotal` | `discount` | `total`, 2>>;
1669
+ interface ApplyCouponIdentifiers {
1670
+ /** @format GUID */
1671
+ participantId: string;
1672
+ couponCode: string;
1673
+ }
1674
+ /**
1675
+ * Remove coupon from order
1676
+ * @public
1677
+ * @documentationMaturity preview
1678
+ * @requiredField identifiers
1679
+ * @requiredField identifiers.couponId
1680
+ * @requiredField identifiers.participantId
1681
+ * @requiredField orderId
1682
+ * @permissionId ONLINE_PROGRAMS.COUPON_REVERT
1683
+ * @fqn wix.onlineprograms.participants.v3.ParticipantsService.RevertCoupon
1684
+ */
1685
+ declare function revertCoupon(identifiers: NonNullablePaths<RevertCouponIdentifiers, `couponId` | `participantId`, 2>, orderId: string): Promise<NonNullablePaths<RevertCouponResponse, `total`, 2>>;
1686
+ interface RevertCouponIdentifiers {
1687
+ /** @format GUID */
1688
+ participantId: string;
1689
+ /** @format GUID */
1690
+ couponId: string;
1691
+ }
1692
+ /**
1693
+ * Bulk invites participants to program.
1694
+ * For each member participant in Invited state is created.
1695
+ * @param programId - Program to which bulk invite participants.
1696
+ * @public
1697
+ * @documentationMaturity preview
1698
+ * @requiredField programId
1699
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_INVITE
1700
+ * @applicableIdentity APP
1701
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteToProgram
1702
+ */
1703
+ declare function bulkInviteToProgram(programId: string, options?: BulkInviteToProgramOptions): Promise<NonNullablePaths<BulkInviteToProgramResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.joinedOptions.timeZone` | `results.${number}.item.joinedOptions.startDate` | `results.${number}.item.joinedOptions.joinPath` | `results.${number}.item.completedOptions.startDate` | `results.${number}.item.failedOptions.startDate` | `results.${number}.item.suspendedOptions.startDate` | `results.${number}.item.autoRemovedOptions.startDate` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
1704
+ interface BulkInviteToProgramOptions {
1705
+ /**
1706
+ * Return added participants in the response or not.
1707
+ * @format GUID
1708
+ * @minSize 1
1709
+ * @maxSize 100
1710
+ */
1711
+ memberIds?: string[];
1712
+ /** Return invited participants in the response or not. */
1713
+ returnEntity?: boolean;
1714
+ }
1715
+ /**
1716
+ * Bulk invites all participants to program, but not more then 1000.
1717
+ * For each member participant in Invited state is created.
1718
+ * @param programId - Program to which bulk add participants.
1719
+ * @public
1720
+ * @documentationMaturity preview
1721
+ * @requiredField programId
1722
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_INVITE
1723
+ * @applicableIdentity APP
1724
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteAllToProgram
1725
+ */
1726
+ declare function bulkInviteAllToProgram(programId: string, options?: BulkInviteAllToProgramOptions): Promise<NonNullablePaths<BulkInviteAllToProgramResponse, `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 3>>;
1727
+ interface BulkInviteAllToProgramOptions {
1728
+ /**
1729
+ * Exclude site members.
1730
+ * @format GUID
1731
+ * @maxSize 100
1732
+ */
1733
+ excludeMemberIds?: string[];
1734
+ }
1735
+ /**
1736
+ * Bulk adds participants to program.
1737
+ * Participant will be either created in state Joined, or updated to that state
1738
+ * from pending one.
1739
+ * @param programId - Program to which bulk add participants.
1740
+ * @public
1741
+ * @documentationMaturity preview
1742
+ * @requiredField programId
1743
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
1744
+ * @applicableIdentity APP
1745
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddToProgram
1746
+ */
1747
+ declare function bulkAddToProgram(programId: string, options?: BulkAddToProgramOptions): Promise<NonNullablePaths<BulkAddToProgramResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.joinedOptions.timeZone` | `results.${number}.item.joinedOptions.startDate` | `results.${number}.item.joinedOptions.joinPath` | `results.${number}.item.completedOptions.startDate` | `results.${number}.item.failedOptions.startDate` | `results.${number}.item.suspendedOptions.startDate` | `results.${number}.item.autoRemovedOptions.startDate` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
1748
+ interface BulkAddToProgramOptions {
1749
+ /**
1750
+ * Site members.
1751
+ * @format GUID
1752
+ * @minSize 1
1753
+ * @maxSize 1000
1754
+ */
1755
+ memberIds?: string[];
1756
+ /** Return added participants in the response or not. */
1757
+ returnEntity?: boolean;
1758
+ }
1759
+ /**
1760
+ * Bulk adds all site members to program, but not more then 1000.
1761
+ * Participant will be either created in state Joined, or updated to that state
1762
+ * from pending one.
1763
+ * @param programId - Program to which bulk add participants.
1764
+ * @public
1765
+ * @documentationMaturity preview
1766
+ * @requiredField programId
1767
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ADD
1768
+ * @applicableIdentity APP
1769
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddAllToProgram
1770
+ */
1771
+ declare function bulkAddAllToProgram(programId: string, options?: BulkAddAllToProgramOptions): Promise<NonNullablePaths<BulkAddAllToProgramResponse, `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 3>>;
1772
+ interface BulkAddAllToProgramOptions {
1773
+ /**
1774
+ * Exclude site members.
1775
+ * @format GUID
1776
+ * @maxSize 100
1777
+ */
1778
+ excludeMemberIds?: string[];
1779
+ }
1780
+ /**
1781
+ * Bulk approves participants, who asked to join private program (aka in
1782
+ * state `APPROVAL_PENDING`). If participant was in other state, no effect and
1783
+ * error returned.
1784
+ * @param participantIds - Participants to add
1785
+ * @public
1786
+ * @documentationMaturity preview
1787
+ * @requiredField participantIds
1788
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_APPROVE
1789
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveParticipant
1790
+ */
1791
+ declare function bulkApproveParticipant(participantIds: string[], options?: BulkApproveParticipantOptions): Promise<NonNullablePaths<BulkApproveParticipantResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.joinedOptions.timeZone` | `results.${number}.item.joinedOptions.startDate` | `results.${number}.item.joinedOptions.joinPath` | `results.${number}.item.completedOptions.startDate` | `results.${number}.item.failedOptions.startDate` | `results.${number}.item.suspendedOptions.startDate` | `results.${number}.item.autoRemovedOptions.startDate` | `results.${number}.item.memberId` | `results.${number}.item.programId` | `results.${number}.item.progress.totalStepsCompleted` | `results.${number}.item.progress.totalStepsAvailable` | `results.${number}.item.progress.completionPercentage` | `results.${number}.item.state` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
1792
+ interface BulkApproveParticipantOptions {
1793
+ /**
1794
+ * program to approve participant
1795
+ * @format GUID
1796
+ */
1797
+ programId?: string;
1798
+ /** Return approved participants in the response or not */
1799
+ returnEntity?: boolean;
1800
+ }
1801
+ /**
1802
+ * Bulk approves all pending participants, who asked to join private program (aka
1803
+ * in state `APPROVAL_PENDING`).
1804
+ * @public
1805
+ * @documentationMaturity preview
1806
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_APPROVE
1807
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveAllParticipant
1808
+ */
1809
+ declare function bulkApproveAllParticipant(options?: BulkApproveAllParticipantOptions): Promise<NonNullablePaths<BulkApproveAllParticipantResponse, `jobId`, 2>>;
1810
+ interface BulkApproveAllParticipantOptions {
1811
+ /**
1812
+ * Program to approve all participants.
1813
+ * @format GUID
1814
+ */
1815
+ programId?: string;
1816
+ /**
1817
+ * Exclude site members.
1818
+ * @format GUID
1819
+ * @maxSize 100
1820
+ */
1821
+ excludeParticipantIds?: string[];
1822
+ }
1823
+ /**
1824
+ * Delete participant from program by owner will. Removes participant from member
1825
+ * group. Leaves him in Social Group.
1826
+ * @param participantId - Participants to delete
1827
+ * @public
1828
+ * @documentationMaturity preview
1829
+ * @requiredField participantId
1830
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_DELETE
1831
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.DeleteParticipant
1832
+ */
1833
+ declare function deleteParticipant(participantId: string): Promise<void>;
1834
+ /**
1835
+ * Issue certificate by site admin
1836
+ * @param participantId - Participant to get certificate
1837
+ * @public
1838
+ * @documentationMaturity preview
1839
+ * @requiredField participantId
1840
+ * @permissionId ONLINE_PROGRAMS.PARTICIPANT_ISSUE_CERTIFICATE
1841
+ * @applicableIdentity APP
1842
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.IssueCertificate
1843
+ */
1844
+ declare function issueCertificate(participantId: string): Promise<NonNullablePaths<IssueCertificateResponse, `participant.paymentPendingOptions.paidPlanIds` | `participant.joinedOptions.singlePaymentOptions.orderId` | `participant.joinedOptions.paidPlanOptions.planIds` | `participant.joinedOptions.freeCouponOptions.couponId` | `participant.joinedOptions.timeZone` | `participant.joinedOptions.startDate` | `participant.joinedOptions.joinPath` | `participant.completedOptions.startDate` | `participant.failedOptions.startDate` | `participant.suspendedOptions.startDate` | `participant.autoRemovedOptions.startDate` | `participant.memberId` | `participant.programId` | `participant.progress.totalStepsCompleted` | `participant.progress.totalStepsAvailable` | `participant.progress.completionPercentage` | `participant.state`, 5>>;
1845
+ /**
1846
+ * Get program's completion stats
1847
+ * @param programId - program id to get stats for
1848
+ * @public
1849
+ * @documentationMaturity preview
1850
+ * @requiredField programId
1851
+ * @permissionId ONLINE_PROGRAMS.STATS_READ
1852
+ * @applicableIdentity APP
1853
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.GetCompletionStats
1854
+ */
1855
+ declare function getCompletionStats(programId: string): Promise<NonNullablePaths<GetCompletionStatsResponse, `completedAll` | `completionRate`, 2>>;
1856
+ /**
1857
+ * Get premium stats
1858
+ * @public
1859
+ * @documentationMaturity preview
1860
+ * @permissionId ONLINE_PROGRAMS.STATS_READ
1861
+ * @applicableIdentity APP
1862
+ * @fqn wix.onlineprograms.participants.v3.ManageParticipantsService.GetPremiumStats
1863
+ */
1864
+ declare function getPremiumStats(): Promise<NonNullablePaths<GetPremiumStatsResponse, `hasPremium` | `activeParticipantsCount` | `activeParticipantsLimit`, 2>>;
1865
+
1866
+ export { type AccountInfo, type ActionEvent, type Address, type AddressLocation, type AddressStreetOneOf, type ApplicationError, type ApplyCouponIdentifiers, type ApplyCouponRequest, type ApplyCouponResponse, type AutoRemovedOptions, type BaseEventMetadata, type Behavior, type BehaviorBehaviorOneOf, type Benefit, type BenefitNotification, BenefitType, type BenefitTypeWithLiterals, type BulkActionMetadata, type BulkAddAllToProgramOptions, type BulkAddAllToProgramRequest, type BulkAddAllToProgramResponse, type BulkAddToProgramOptions, type BulkAddToProgramRequest, type BulkAddToProgramResponse, type BulkAddToProgramResult, type BulkApproveAllParticipantOptions, type BulkApproveAllParticipantRequest, type BulkApproveAllParticipantResponse, type BulkApproveParticipantOptions, type BulkApproveParticipantRequest, type BulkApproveParticipantResponse, type BulkApproveParticipantResult, type BulkInviteAllToProgramOptions, type BulkInviteAllToProgramRequest, type BulkInviteAllToProgramResponse, type BulkInviteToProgramOptions, type BulkInviteToProgramRequest, type BulkInviteToProgramResponse, type BulkInviteToProgramResult, type Certificate, type CompleteParticipantRequest, type CompleteParticipantResponse, type CompletedOptions, type CreditCardPaymentMethodData, type CurrencyAmount, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteParticipantRequest, type DeleteParticipantResponse, type Discount, type DiscountDiscountOneOf, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EntryPass, Event, type EventMetadata, EventType, type EventTypeWithLiterals, type EventWithLiterals, type ExportParticipantsStatsRequest, type ExportParticipantsStatsResponse, type ExtendedFields, type FailedOptions, type FreeCouponOptions, type FullAddressContactDetails, type GetAccessStatusRequest, type GetAccessStatusResponse, type GetCompletionStatsRequest, type GetCompletionStatsResponse, type GetParticipantRequest, type GetParticipantResponse, type GetPremiumStatsRequest, type GetPremiumStatsResponse, type IdentificationData, type IdentificationDataIdOneOf, Initiator, type InitiatorWithLiterals, type IssueCertificateRequest, type IssueCertificateResponse, type ItemMetadata, JoinPath, type JoinPathWithLiterals, type JoinProgramRequest, type JoinProgramResponse, type JoinedOptions, type JoinedOptionsJoinPathOptionsOneOf, type LeaveProgramRequest, type LeaveProgramResponse, type MessageEnvelope, type OfflinePaymentSent, type Order, type OrderAdditionalCharges, type OrderItem, OrderItemCategory, type OrderItemCategoryWithLiterals, type PaidPlanOptions, type Participant, type ParticipantAdded, type ParticipantAddedEnvelope, type ParticipantApproved, type ParticipantApprovedEnvelope, type ParticipantDeletedEnvelope, type ParticipantExportsFinished, type ParticipantInvited, type ParticipantInvitedEnvelope, type ParticipantJoined, type ParticipantJoinedEnvelope, type ParticipantLeft, type ParticipantLeftEnvelope, type ParticipantRejected, type ParticipantRejectedEnvelope, type ParticipantStateOptionsOneOf, type ParticipantsBulkCompleteEvent, type ParticipantsBulkDeleteEvent, type ParticipantsQueryBuilder, type ParticipantsQueryResult, type PaymentEvent, type PaymentEventEventOneOf, type PaymentFailed, type PaymentPendingOptions, type Progress, type QueryParticipantsRequest, type QueryParticipantsResponse, type RecurringPaymentCancellationDetails, type RecurringPaymentDetails, type RecurringPaymentStatusChangedEvent, type Refund, RefundStatus, type RefundStatusChangedEvent, type RefundStatusWithLiterals, RemovalReason, type RemovalReasonWithLiterals, type RestoreInfo, type RevertCouponIdentifiers, type RevertCouponRequest, type RevertCouponResponse, type ScheduledAction, ScheduledActionType, type ScheduledActionTypeWithLiterals, type SinglePaymentConfirmed, type SinglePaymentDeclined, type SinglePaymentOptions, SortOrder, type SortOrderWithLiterals, type Sorting, type StandardDetails, State, type StateWithLiterals, Status, type StatusWithLiterals, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type SuspendedOptions, type Transaction, type TransactionCreatedEvent, type TransactionPaymentMethodDataOneOf, TransactionStatus, type TransactionStatusChangedEvent, type TransactionStatusWithLiterals, type TransactionUpdatedEvent, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, applyCoupon, bulkAddAllToProgram, bulkAddToProgram, bulkApproveAllParticipant, bulkApproveParticipant, bulkInviteAllToProgram, bulkInviteToProgram, deleteParticipant, getAccessStatus, getCompletionStats, getParticipant, getPremiumStats, issueCertificate, joinProgram, leaveProgram, onParticipantAdded, onParticipantApproved, onParticipantDeleted, onParticipantInvited, onParticipantJoined, onParticipantLeft, onParticipantRejected, queryParticipants, revertCoupon };