@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,1382 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.typings.ts
21
+ var index_typings_exports = {};
22
+ __export(index_typings_exports, {
23
+ BenefitType: () => BenefitType,
24
+ Event: () => Event,
25
+ EventType: () => EventType,
26
+ Initiator: () => Initiator,
27
+ JoinPath: () => JoinPath,
28
+ OrderItemCategory: () => OrderItemCategory,
29
+ RefundStatus: () => RefundStatus,
30
+ RemovalReason: () => RemovalReason,
31
+ ScheduledActionType: () => ScheduledActionType,
32
+ SortOrder: () => SortOrder,
33
+ State: () => State,
34
+ Status: () => Status,
35
+ SubdivisionType: () => SubdivisionType,
36
+ TransactionStatus: () => TransactionStatus,
37
+ VatType: () => VatType,
38
+ WebhookIdentityType: () => WebhookIdentityType,
39
+ applyCoupon: () => applyCoupon2,
40
+ bulkAddAllToProgram: () => bulkAddAllToProgram2,
41
+ bulkAddToProgram: () => bulkAddToProgram2,
42
+ bulkApproveAllParticipant: () => bulkApproveAllParticipant2,
43
+ bulkApproveParticipant: () => bulkApproveParticipant2,
44
+ bulkInviteAllToProgram: () => bulkInviteAllToProgram2,
45
+ bulkInviteToProgram: () => bulkInviteToProgram2,
46
+ deleteParticipant: () => deleteParticipant2,
47
+ exportParticipantsStats: () => exportParticipantsStats2,
48
+ getAccessStatus: () => getAccessStatus2,
49
+ getCompletionStats: () => getCompletionStats2,
50
+ getParticipant: () => getParticipant2,
51
+ getPremiumStats: () => getPremiumStats2,
52
+ issueCertificate: () => issueCertificate2,
53
+ joinProgram: () => joinProgram2,
54
+ leaveProgram: () => leaveProgram2,
55
+ queryParticipants: () => queryParticipants2,
56
+ revertCoupon: () => revertCoupon2
57
+ });
58
+ module.exports = __toCommonJS(index_typings_exports);
59
+
60
+ // src/online-programs-v3-participant-participants.universal.ts
61
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
62
+ var import_query_builder = require("@wix/sdk-runtime/query-builder");
63
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
64
+
65
+ // src/online-programs-v3-participant-participants.http.ts
66
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
67
+ var import_float = require("@wix/sdk-runtime/transformations/float");
68
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
69
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
70
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
71
+ function resolveWixOnlineprogramsParticipantsV3ParticipantExportsServiceUrl(opts) {
72
+ const domainToMappings = {
73
+ "bo._base_domain_": [
74
+ {
75
+ srcPath: "/participants-service",
76
+ destPath: ""
77
+ }
78
+ ],
79
+ "wixbo.ai": [
80
+ {
81
+ srcPath: "/participants-service",
82
+ destPath: ""
83
+ }
84
+ ],
85
+ "wix-bo.com": [
86
+ {
87
+ srcPath: "/participants-service",
88
+ destPath: ""
89
+ }
90
+ ],
91
+ "manage._base_domain_": [
92
+ {
93
+ srcPath: "/participants-service",
94
+ destPath: ""
95
+ }
96
+ ],
97
+ _: [
98
+ {
99
+ srcPath: "/participants-service",
100
+ destPath: ""
101
+ }
102
+ ],
103
+ "editor._base_domain_": [
104
+ {
105
+ srcPath: "/participants-service",
106
+ destPath: ""
107
+ }
108
+ ],
109
+ "blocks._base_domain_": [
110
+ {
111
+ srcPath: "/participants-service",
112
+ destPath: ""
113
+ }
114
+ ],
115
+ "create.editorx": [
116
+ {
117
+ srcPath: "/participants-service",
118
+ destPath: ""
119
+ }
120
+ ],
121
+ "www._base_domain_": [
122
+ {
123
+ srcPath: "/_api/participants-service",
124
+ destPath: ""
125
+ }
126
+ ],
127
+ "www.wixapis.com": [
128
+ {
129
+ srcPath: "/participants-service",
130
+ destPath: ""
131
+ }
132
+ ]
133
+ };
134
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
135
+ }
136
+ function resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl(opts) {
137
+ const domainToMappings = {
138
+ "bo._base_domain_": [
139
+ {
140
+ srcPath: "/participants-service",
141
+ destPath: ""
142
+ }
143
+ ],
144
+ "wixbo.ai": [
145
+ {
146
+ srcPath: "/participants-service",
147
+ destPath: ""
148
+ }
149
+ ],
150
+ "wix-bo.com": [
151
+ {
152
+ srcPath: "/participants-service",
153
+ destPath: ""
154
+ }
155
+ ],
156
+ "manage._base_domain_": [
157
+ {
158
+ srcPath: "/participants-service",
159
+ destPath: ""
160
+ }
161
+ ],
162
+ _: [
163
+ {
164
+ srcPath: "/participants-service",
165
+ destPath: ""
166
+ }
167
+ ],
168
+ "editor._base_domain_": [
169
+ {
170
+ srcPath: "/participants-service",
171
+ destPath: ""
172
+ }
173
+ ],
174
+ "blocks._base_domain_": [
175
+ {
176
+ srcPath: "/participants-service",
177
+ destPath: ""
178
+ }
179
+ ],
180
+ "create.editorx": [
181
+ {
182
+ srcPath: "/participants-service",
183
+ destPath: ""
184
+ }
185
+ ],
186
+ "www._base_domain_": [
187
+ {
188
+ srcPath: "/_api/participants-service",
189
+ destPath: ""
190
+ }
191
+ ],
192
+ "www.wixapis.com": [
193
+ {
194
+ srcPath: "/participants-service",
195
+ destPath: ""
196
+ }
197
+ ]
198
+ };
199
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
200
+ }
201
+ function resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl(opts) {
202
+ const domainToMappings = {
203
+ "bo._base_domain_": [
204
+ {
205
+ srcPath: "/participants-service",
206
+ destPath: ""
207
+ }
208
+ ],
209
+ "wixbo.ai": [
210
+ {
211
+ srcPath: "/participants-service",
212
+ destPath: ""
213
+ }
214
+ ],
215
+ "wix-bo.com": [
216
+ {
217
+ srcPath: "/participants-service",
218
+ destPath: ""
219
+ }
220
+ ],
221
+ "manage._base_domain_": [
222
+ {
223
+ srcPath: "/participants-service",
224
+ destPath: ""
225
+ }
226
+ ],
227
+ _: [
228
+ {
229
+ srcPath: "/participants-service",
230
+ destPath: ""
231
+ }
232
+ ],
233
+ "editor._base_domain_": [
234
+ {
235
+ srcPath: "/participants-service",
236
+ destPath: ""
237
+ }
238
+ ],
239
+ "blocks._base_domain_": [
240
+ {
241
+ srcPath: "/participants-service",
242
+ destPath: ""
243
+ }
244
+ ],
245
+ "create.editorx": [
246
+ {
247
+ srcPath: "/participants-service",
248
+ destPath: ""
249
+ }
250
+ ],
251
+ "www._base_domain_": [
252
+ {
253
+ srcPath: "/_api/participants-service",
254
+ destPath: ""
255
+ }
256
+ ],
257
+ "www.wixapis.com": [
258
+ {
259
+ srcPath: "/participants-service",
260
+ destPath: ""
261
+ }
262
+ ]
263
+ };
264
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
265
+ }
266
+ var PACKAGE_NAME = "@wix/auto_sdk_online-programs_participants";
267
+ function joinProgram(payload) {
268
+ function __joinProgram({ host }) {
269
+ const metadata = {
270
+ entityFqdn: "wix.online_programs.v3.participant",
271
+ method: "POST",
272
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.JoinProgram",
273
+ packageName: PACKAGE_NAME,
274
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
275
+ protoPath: "/v3/participants/join",
276
+ data: payload,
277
+ host
278
+ }),
279
+ data: payload,
280
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
281
+ {
282
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
283
+ paths: [
284
+ { path: "participant.createdDate" },
285
+ { path: "participant.updatedDate" },
286
+ { path: "participant.certificate.issuedDate" }
287
+ ]
288
+ },
289
+ {
290
+ transformFn: import_float.transformRESTFloatToSDKFloat,
291
+ paths: [{ path: "participant.progress.completionPercentage" }]
292
+ }
293
+ ])
294
+ };
295
+ return metadata;
296
+ }
297
+ return __joinProgram;
298
+ }
299
+ function getParticipant(payload) {
300
+ function __getParticipant({ host }) {
301
+ const metadata = {
302
+ entityFqdn: "wix.online_programs.v3.participant",
303
+ method: "GET",
304
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant",
305
+ packageName: PACKAGE_NAME,
306
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
307
+ protoPath: "/v3/participants/{participantId}",
308
+ data: payload,
309
+ host
310
+ }),
311
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
312
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
313
+ {
314
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
315
+ paths: [
316
+ { path: "participant.createdDate" },
317
+ { path: "participant.updatedDate" },
318
+ { path: "participant.certificate.issuedDate" }
319
+ ]
320
+ },
321
+ {
322
+ transformFn: import_float.transformRESTFloatToSDKFloat,
323
+ paths: [{ path: "participant.progress.completionPercentage" }]
324
+ }
325
+ ])
326
+ };
327
+ return metadata;
328
+ }
329
+ return __getParticipant;
330
+ }
331
+ function leaveProgram(payload) {
332
+ function __leaveProgram({ host }) {
333
+ const metadata = {
334
+ entityFqdn: "wix.online_programs.v3.participant",
335
+ method: "POST",
336
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.LeaveProgram",
337
+ packageName: PACKAGE_NAME,
338
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
339
+ protoPath: "/v3/participants/{participantId}/leave",
340
+ data: payload,
341
+ host
342
+ }),
343
+ data: payload
344
+ };
345
+ return metadata;
346
+ }
347
+ return __leaveProgram;
348
+ }
349
+ function queryParticipants(payload) {
350
+ function __queryParticipants({ host }) {
351
+ const metadata = {
352
+ entityFqdn: "wix.online_programs.v3.participant",
353
+ method: "POST",
354
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants",
355
+ packageName: PACKAGE_NAME,
356
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
357
+ protoPath: "/v3/participants/query",
358
+ data: payload,
359
+ host
360
+ }),
361
+ data: payload,
362
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
363
+ {
364
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
365
+ paths: [
366
+ { path: "participants.createdDate" },
367
+ { path: "participants.updatedDate" },
368
+ { path: "participants.certificate.issuedDate" }
369
+ ]
370
+ },
371
+ {
372
+ transformFn: import_float.transformRESTFloatToSDKFloat,
373
+ paths: [{ path: "participants.progress.completionPercentage" }]
374
+ }
375
+ ])
376
+ };
377
+ return metadata;
378
+ }
379
+ return __queryParticipants;
380
+ }
381
+ function getAccessStatus(payload) {
382
+ function __getAccessStatus({ host }) {
383
+ const metadata = {
384
+ entityFqdn: "wix.online_programs.v3.participant",
385
+ method: "GET",
386
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus",
387
+ packageName: PACKAGE_NAME,
388
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
389
+ protoPath: "/v3/participants/access",
390
+ data: payload,
391
+ host
392
+ }),
393
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
394
+ };
395
+ return metadata;
396
+ }
397
+ return __getAccessStatus;
398
+ }
399
+ function applyCoupon(payload) {
400
+ function __applyCoupon({ host }) {
401
+ const metadata = {
402
+ entityFqdn: "wix.online_programs.v3.participant",
403
+ method: "POST",
404
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.ApplyCoupon",
405
+ packageName: PACKAGE_NAME,
406
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
407
+ protoPath: "/v3/participants/{participantId}/coupons/{couponCode}/apply",
408
+ data: payload,
409
+ host
410
+ }),
411
+ data: payload,
412
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
413
+ {
414
+ transformFn: import_float.transformRESTFloatToSDKFloat,
415
+ paths: [
416
+ { path: "subTotal" },
417
+ { path: "discount" },
418
+ { path: "total" }
419
+ ]
420
+ }
421
+ ])
422
+ };
423
+ return metadata;
424
+ }
425
+ return __applyCoupon;
426
+ }
427
+ function revertCoupon(payload) {
428
+ function __revertCoupon({ host }) {
429
+ const metadata = {
430
+ entityFqdn: "wix.online_programs.v3.participant",
431
+ method: "POST",
432
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.RevertCoupon",
433
+ packageName: PACKAGE_NAME,
434
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
435
+ protoPath: "/v3/participants/{participantId}/coupons/{couponId}/revert",
436
+ data: payload,
437
+ host
438
+ }),
439
+ data: payload,
440
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
441
+ {
442
+ transformFn: import_float.transformRESTFloatToSDKFloat,
443
+ paths: [{ path: "total" }]
444
+ }
445
+ ])
446
+ };
447
+ return metadata;
448
+ }
449
+ return __revertCoupon;
450
+ }
451
+ function bulkInviteToProgram(payload) {
452
+ function __bulkInviteToProgram({ host }) {
453
+ const metadata = {
454
+ entityFqdn: "wix.online_programs.v3.participant",
455
+ method: "POST",
456
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteToProgram",
457
+ packageName: PACKAGE_NAME,
458
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
459
+ protoPath: "/v3/bulk/participants/invite",
460
+ data: payload,
461
+ host
462
+ }),
463
+ data: payload,
464
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
465
+ {
466
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
467
+ paths: [
468
+ { path: "results.item.createdDate" },
469
+ { path: "results.item.updatedDate" },
470
+ { path: "results.item.certificate.issuedDate" }
471
+ ]
472
+ },
473
+ {
474
+ transformFn: import_float.transformRESTFloatToSDKFloat,
475
+ paths: [{ path: "results.item.progress.completionPercentage" }]
476
+ }
477
+ ])
478
+ };
479
+ return metadata;
480
+ }
481
+ return __bulkInviteToProgram;
482
+ }
483
+ function bulkInviteAllToProgram(payload) {
484
+ function __bulkInviteAllToProgram({ host }) {
485
+ const metadata = {
486
+ entityFqdn: "wix.online_programs.v3.participant",
487
+ method: "POST",
488
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteAllToProgram",
489
+ packageName: PACKAGE_NAME,
490
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
491
+ protoPath: "/v3/bulk/participants/invite-all",
492
+ data: payload,
493
+ host
494
+ }),
495
+ data: payload
496
+ };
497
+ return metadata;
498
+ }
499
+ return __bulkInviteAllToProgram;
500
+ }
501
+ function bulkAddToProgram(payload) {
502
+ function __bulkAddToProgram({ host }) {
503
+ const metadata = {
504
+ entityFqdn: "wix.online_programs.v3.participant",
505
+ method: "POST",
506
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddToProgram",
507
+ packageName: PACKAGE_NAME,
508
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
509
+ protoPath: "/v3/bulk/participants/add",
510
+ data: payload,
511
+ host
512
+ }),
513
+ data: payload,
514
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
515
+ {
516
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
517
+ paths: [
518
+ { path: "results.item.createdDate" },
519
+ { path: "results.item.updatedDate" },
520
+ { path: "results.item.certificate.issuedDate" }
521
+ ]
522
+ },
523
+ {
524
+ transformFn: import_float.transformRESTFloatToSDKFloat,
525
+ paths: [{ path: "results.item.progress.completionPercentage" }]
526
+ }
527
+ ])
528
+ };
529
+ return metadata;
530
+ }
531
+ return __bulkAddToProgram;
532
+ }
533
+ function bulkAddAllToProgram(payload) {
534
+ function __bulkAddAllToProgram({ host }) {
535
+ const metadata = {
536
+ entityFqdn: "wix.online_programs.v3.participant",
537
+ method: "POST",
538
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddAllToProgram",
539
+ packageName: PACKAGE_NAME,
540
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
541
+ protoPath: "/v3/bulk/participants/add-all",
542
+ data: payload,
543
+ host
544
+ }),
545
+ data: payload
546
+ };
547
+ return metadata;
548
+ }
549
+ return __bulkAddAllToProgram;
550
+ }
551
+ function bulkApproveParticipant(payload) {
552
+ function __bulkApproveParticipant({ host }) {
553
+ const metadata = {
554
+ entityFqdn: "wix.online_programs.v3.participant",
555
+ method: "POST",
556
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveParticipant",
557
+ packageName: PACKAGE_NAME,
558
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
559
+ protoPath: "/v3/bulk/participants/approve",
560
+ data: payload,
561
+ host
562
+ }),
563
+ data: payload,
564
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
565
+ {
566
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
567
+ paths: [
568
+ { path: "results.item.createdDate" },
569
+ { path: "results.item.updatedDate" },
570
+ { path: "results.item.certificate.issuedDate" }
571
+ ]
572
+ },
573
+ {
574
+ transformFn: import_float.transformRESTFloatToSDKFloat,
575
+ paths: [{ path: "results.item.progress.completionPercentage" }]
576
+ }
577
+ ])
578
+ };
579
+ return metadata;
580
+ }
581
+ return __bulkApproveParticipant;
582
+ }
583
+ function bulkApproveAllParticipant(payload) {
584
+ function __bulkApproveAllParticipant({ host }) {
585
+ const metadata = {
586
+ entityFqdn: "wix.online_programs.v3.participant",
587
+ method: "POST",
588
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveAllParticipant",
589
+ packageName: PACKAGE_NAME,
590
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
591
+ protoPath: "/v3/bulk/participants/approve-all",
592
+ data: payload,
593
+ host
594
+ }),
595
+ data: payload
596
+ };
597
+ return metadata;
598
+ }
599
+ return __bulkApproveAllParticipant;
600
+ }
601
+ function deleteParticipant(payload) {
602
+ function __deleteParticipant({ host }) {
603
+ const metadata = {
604
+ entityFqdn: "wix.online_programs.v3.participant",
605
+ method: "DELETE",
606
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.DeleteParticipant",
607
+ packageName: PACKAGE_NAME,
608
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
609
+ protoPath: "/v3/participants/{participantId}",
610
+ data: payload,
611
+ host
612
+ }),
613
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
614
+ };
615
+ return metadata;
616
+ }
617
+ return __deleteParticipant;
618
+ }
619
+ function issueCertificate(payload) {
620
+ function __issueCertificate({ host }) {
621
+ const metadata = {
622
+ entityFqdn: "wix.online_programs.v3.participant",
623
+ method: "POST",
624
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.IssueCertificate",
625
+ packageName: PACKAGE_NAME,
626
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
627
+ protoPath: "/v3/participants/{participantId}/issue-certificate",
628
+ data: payload,
629
+ host
630
+ }),
631
+ data: payload,
632
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
633
+ {
634
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
635
+ paths: [
636
+ { path: "participant.createdDate" },
637
+ { path: "participant.updatedDate" },
638
+ { path: "participant.certificate.issuedDate" }
639
+ ]
640
+ },
641
+ {
642
+ transformFn: import_float.transformRESTFloatToSDKFloat,
643
+ paths: [{ path: "participant.progress.completionPercentage" }]
644
+ }
645
+ ])
646
+ };
647
+ return metadata;
648
+ }
649
+ return __issueCertificate;
650
+ }
651
+ function getCompletionStats(payload) {
652
+ function __getCompletionStats({ host }) {
653
+ const metadata = {
654
+ entityFqdn: "wix.online_programs.v3.participant",
655
+ method: "GET",
656
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.GetCompletionStats",
657
+ packageName: PACKAGE_NAME,
658
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
659
+ protoPath: "/v3/stats/completion/{programId}",
660
+ data: payload,
661
+ host
662
+ }),
663
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
664
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
665
+ {
666
+ transformFn: import_float.transformRESTFloatToSDKFloat,
667
+ paths: [{ path: "completionRate" }]
668
+ }
669
+ ])
670
+ };
671
+ return metadata;
672
+ }
673
+ return __getCompletionStats;
674
+ }
675
+ function getPremiumStats(payload) {
676
+ function __getPremiumStats({ host }) {
677
+ const metadata = {
678
+ entityFqdn: "wix.online_programs.v3.participant",
679
+ method: "GET",
680
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.GetPremiumStats",
681
+ packageName: PACKAGE_NAME,
682
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
683
+ protoPath: "/v3/stats/premium",
684
+ data: payload,
685
+ host
686
+ }),
687
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
688
+ };
689
+ return metadata;
690
+ }
691
+ return __getPremiumStats;
692
+ }
693
+ function exportParticipantsStats(payload) {
694
+ function __exportParticipantsStats({ host }) {
695
+ const metadata = {
696
+ entityFqdn: "wix.online_programs.v3.participant",
697
+ method: "GET",
698
+ methodFqn: "wix.onlineprograms.participants.v3.ParticipantExportsService.ExportParticipantsStats",
699
+ packageName: PACKAGE_NAME,
700
+ url: resolveWixOnlineprogramsParticipantsV3ParticipantExportsServiceUrl({
701
+ protoPath: "/v3/participants/export/{programId}",
702
+ data: payload,
703
+ host
704
+ }),
705
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
706
+ };
707
+ return metadata;
708
+ }
709
+ return __exportParticipantsStats;
710
+ }
711
+
712
+ // src/online-programs-v3-participant-participants.universal.ts
713
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
714
+ var JoinPath = /* @__PURE__ */ ((JoinPath2) => {
715
+ JoinPath2["UNKNOWN_JOIN_PATH"] = "UNKNOWN_JOIN_PATH";
716
+ JoinPath2["FREE"] = "FREE";
717
+ JoinPath2["ADDED"] = "ADDED";
718
+ JoinPath2["SINGLE_PAYMENT"] = "SINGLE_PAYMENT";
719
+ JoinPath2["PAID_PLAN"] = "PAID_PLAN";
720
+ JoinPath2["FREE_COUPON"] = "FREE_COUPON";
721
+ return JoinPath2;
722
+ })(JoinPath || {});
723
+ var State = /* @__PURE__ */ ((State2) => {
724
+ State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
725
+ State2["INVITED"] = "INVITED";
726
+ State2["APPROVAL_PENDING"] = "APPROVAL_PENDING";
727
+ State2["PAYMENT_PENDING"] = "PAYMENT_PENDING";
728
+ State2["JOINED"] = "JOINED";
729
+ State2["COMPLETED"] = "COMPLETED";
730
+ State2["FAILED"] = "FAILED";
731
+ State2["SUSPENDED"] = "SUSPENDED";
732
+ State2["AUTO_REMOVED"] = "AUTO_REMOVED";
733
+ return State2;
734
+ })(State || {});
735
+ var RemovalReason = /* @__PURE__ */ ((RemovalReason2) => {
736
+ RemovalReason2["UNKNOWN_REMOVAL_REASON"] = "UNKNOWN_REMOVAL_REASON";
737
+ RemovalReason2["LEGITIMATE_LEAVE"] = "LEGITIMATE_LEAVE";
738
+ RemovalReason2["CLEANUP_FOR_REJOIN"] = "CLEANUP_FOR_REJOIN";
739
+ RemovalReason2["CLEANUP_FOR_MANUAL_ADD"] = "CLEANUP_FOR_MANUAL_ADD";
740
+ return RemovalReason2;
741
+ })(RemovalReason || {});
742
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
743
+ SortOrder2["ASC"] = "ASC";
744
+ SortOrder2["DESC"] = "DESC";
745
+ return SortOrder2;
746
+ })(SortOrder || {});
747
+ var EventType = /* @__PURE__ */ ((EventType2) => {
748
+ EventType2["UNDEFINED"] = "UNDEFINED";
749
+ EventType2["TRANSACTION_STATUS_CHANGED"] = "TRANSACTION_STATUS_CHANGED";
750
+ EventType2["REFUND_STATUS_CHANGED"] = "REFUND_STATUS_CHANGED";
751
+ EventType2["RECURRING_PAYMENT_STATUS_CHANGED"] = "RECURRING_PAYMENT_STATUS_CHANGED";
752
+ EventType2["TRANSACTION_UPDATED"] = "TRANSACTION_UPDATED";
753
+ EventType2["TRANSACTION_CREATED"] = "TRANSACTION_CREATED";
754
+ return EventType2;
755
+ })(EventType || {});
756
+ var OrderItemCategory = /* @__PURE__ */ ((OrderItemCategory2) => {
757
+ OrderItemCategory2["UNDEFINED"] = "UNDEFINED";
758
+ OrderItemCategory2["PHYSICAL"] = "PHYSICAL";
759
+ OrderItemCategory2["DIGITAL"] = "DIGITAL";
760
+ return OrderItemCategory2;
761
+ })(OrderItemCategory || {});
762
+ var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
763
+ SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
764
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
765
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
766
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
767
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
768
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
769
+ SubdivisionType2["COUNTRY"] = "COUNTRY";
770
+ return SubdivisionType2;
771
+ })(SubdivisionType || {});
772
+ var VatType = /* @__PURE__ */ ((VatType2) => {
773
+ VatType2["UNSPECIFIED"] = "UNSPECIFIED";
774
+ VatType2["CPF"] = "CPF";
775
+ VatType2["CNPJ"] = "CNPJ";
776
+ return VatType2;
777
+ })(VatType || {});
778
+ var TransactionStatus = /* @__PURE__ */ ((TransactionStatus2) => {
779
+ TransactionStatus2["UNDEFINED"] = "UNDEFINED";
780
+ TransactionStatus2["APPROVED"] = "APPROVED";
781
+ TransactionStatus2["PENDING"] = "PENDING";
782
+ TransactionStatus2["PENDING_MERCHANT"] = "PENDING_MERCHANT";
783
+ TransactionStatus2["CANCELED"] = "CANCELED";
784
+ TransactionStatus2["DECLINED"] = "DECLINED";
785
+ TransactionStatus2["REFUNDED"] = "REFUNDED";
786
+ TransactionStatus2["PARTIALLY_REFUNDED"] = "PARTIALLY_REFUNDED";
787
+ TransactionStatus2["AUTHORIZED"] = "AUTHORIZED";
788
+ TransactionStatus2["VOIDED"] = "VOIDED";
789
+ return TransactionStatus2;
790
+ })(TransactionStatus || {});
791
+ var ScheduledActionType = /* @__PURE__ */ ((ScheduledActionType2) => {
792
+ ScheduledActionType2["VOID"] = "VOID";
793
+ ScheduledActionType2["CAPTURE"] = "CAPTURE";
794
+ return ScheduledActionType2;
795
+ })(ScheduledActionType || {});
796
+ var RefundStatus = /* @__PURE__ */ ((RefundStatus2) => {
797
+ RefundStatus2["UNDEFINED"] = "UNDEFINED";
798
+ RefundStatus2["APPROVED"] = "APPROVED";
799
+ RefundStatus2["PENDING"] = "PENDING";
800
+ RefundStatus2["DECLINED"] = "DECLINED";
801
+ return RefundStatus2;
802
+ })(RefundStatus || {});
803
+ var Status = /* @__PURE__ */ ((Status2) => {
804
+ Status2["UNDEFINED"] = "UNDEFINED";
805
+ Status2["PENDING"] = "PENDING";
806
+ Status2["ACTIVE"] = "ACTIVE";
807
+ Status2["CANCELLED"] = "CANCELLED";
808
+ Status2["FINISHED"] = "FINISHED";
809
+ Status2["SUSPENDED"] = "SUSPENDED";
810
+ return Status2;
811
+ })(Status || {});
812
+ var Initiator = /* @__PURE__ */ ((Initiator2) => {
813
+ Initiator2["UNDEFINED"] = "UNDEFINED";
814
+ Initiator2["BUYER"] = "BUYER";
815
+ Initiator2["MERCHANT"] = "MERCHANT";
816
+ Initiator2["PAYMENT"] = "PAYMENT";
817
+ Initiator2["SETUP"] = "SETUP";
818
+ return Initiator2;
819
+ })(Initiator || {});
820
+ var BenefitType = /* @__PURE__ */ ((BenefitType2) => {
821
+ BenefitType2["UNDEFINED"] = "UNDEFINED";
822
+ BenefitType2["LIMITED"] = "LIMITED";
823
+ BenefitType2["UNLIMITED"] = "UNLIMITED";
824
+ return BenefitType2;
825
+ })(BenefitType || {});
826
+ var Event = /* @__PURE__ */ ((Event2) => {
827
+ Event2["Updated"] = "Updated";
828
+ Event2["Deleted"] = "Deleted";
829
+ Event2["Created"] = "Created";
830
+ return Event2;
831
+ })(Event || {});
832
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
833
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
834
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
835
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
836
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
837
+ WebhookIdentityType2["APP"] = "APP";
838
+ return WebhookIdentityType2;
839
+ })(WebhookIdentityType || {});
840
+ async function joinProgram2(programId) {
841
+ const { httpClient, sideEffects } = arguments[1];
842
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
843
+ programId
844
+ });
845
+ const reqOpts = joinProgram(payload);
846
+ sideEffects?.onSiteCall?.();
847
+ try {
848
+ const result = await httpClient.request(reqOpts);
849
+ sideEffects?.onSuccess?.(result);
850
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
851
+ } catch (err) {
852
+ const transformedError = (0, import_transform_error.transformError)(
853
+ err,
854
+ {
855
+ spreadPathsToArguments: {},
856
+ explicitPathsToArguments: { programId: "$[0]" },
857
+ singleArgumentUnchanged: false
858
+ },
859
+ ["programId"]
860
+ );
861
+ sideEffects?.onError?.(err);
862
+ throw transformedError;
863
+ }
864
+ }
865
+ async function getParticipant2(participantId) {
866
+ const { httpClient, sideEffects } = arguments[1];
867
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
868
+ participantId
869
+ });
870
+ const reqOpts = getParticipant(payload);
871
+ sideEffects?.onSiteCall?.();
872
+ try {
873
+ const result = await httpClient.request(reqOpts);
874
+ sideEffects?.onSuccess?.(result);
875
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.participant;
876
+ } catch (err) {
877
+ const transformedError = (0, import_transform_error.transformError)(
878
+ err,
879
+ {
880
+ spreadPathsToArguments: {},
881
+ explicitPathsToArguments: { participantId: "$[0]" },
882
+ singleArgumentUnchanged: false
883
+ },
884
+ ["participantId"]
885
+ );
886
+ sideEffects?.onError?.(err);
887
+ throw transformedError;
888
+ }
889
+ }
890
+ async function leaveProgram2(participantId) {
891
+ const { httpClient, sideEffects } = arguments[1];
892
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
893
+ participantId
894
+ });
895
+ const reqOpts = leaveProgram(payload);
896
+ sideEffects?.onSiteCall?.();
897
+ try {
898
+ const result = await httpClient.request(reqOpts);
899
+ sideEffects?.onSuccess?.(result);
900
+ } catch (err) {
901
+ const transformedError = (0, import_transform_error.transformError)(
902
+ err,
903
+ {
904
+ spreadPathsToArguments: {},
905
+ explicitPathsToArguments: { participantId: "$[0]" },
906
+ singleArgumentUnchanged: false
907
+ },
908
+ ["participantId"]
909
+ );
910
+ sideEffects?.onError?.(err);
911
+ throw transformedError;
912
+ }
913
+ }
914
+ function queryParticipants2() {
915
+ const { httpClient, sideEffects } = arguments[0];
916
+ return (0, import_query_builder.queryBuilder)({
917
+ func: async (payload) => {
918
+ const reqOpts = queryParticipants(payload);
919
+ sideEffects?.onSiteCall?.();
920
+ try {
921
+ const result = await httpClient.request(reqOpts);
922
+ sideEffects?.onSuccess?.(result);
923
+ return result;
924
+ } catch (err) {
925
+ sideEffects?.onError?.(err);
926
+ throw err;
927
+ }
928
+ },
929
+ requestTransformer: (query) => {
930
+ const args = [query, {}];
931
+ return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
932
+ ...args?.[1],
933
+ query: args?.[0]
934
+ });
935
+ },
936
+ responseTransformer: ({
937
+ data
938
+ }) => {
939
+ const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
940
+ (0, import_transform_paths2.transformPaths)(data, [])
941
+ );
942
+ return {
943
+ items: transformedData?.participants,
944
+ pagingMetadata: transformedData?.pagingMetadata
945
+ };
946
+ },
947
+ errorTransformer: (err) => {
948
+ const transformedError = (0, import_transform_error.transformError)(err, {
949
+ spreadPathsToArguments: {},
950
+ explicitPathsToArguments: { query: "$[0]" },
951
+ singleArgumentUnchanged: false
952
+ });
953
+ throw transformedError;
954
+ },
955
+ pagingMethod: "CURSOR",
956
+ transformationPaths: {}
957
+ });
958
+ }
959
+ async function getAccessStatus2() {
960
+ const { httpClient, sideEffects } = arguments[0];
961
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
962
+ const reqOpts = getAccessStatus(payload);
963
+ sideEffects?.onSiteCall?.();
964
+ try {
965
+ const result = await httpClient.request(reqOpts);
966
+ sideEffects?.onSuccess?.(result);
967
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
968
+ } catch (err) {
969
+ const transformedError = (0, import_transform_error.transformError)(
970
+ err,
971
+ {
972
+ spreadPathsToArguments: {},
973
+ explicitPathsToArguments: {},
974
+ singleArgumentUnchanged: false
975
+ },
976
+ []
977
+ );
978
+ sideEffects?.onError?.(err);
979
+ throw transformedError;
980
+ }
981
+ }
982
+ async function applyCoupon2(identifiers, orderId) {
983
+ const { httpClient, sideEffects } = arguments[2];
984
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
985
+ participantId: identifiers?.participantId,
986
+ couponCode: identifiers?.couponCode,
987
+ orderId
988
+ });
989
+ const reqOpts = applyCoupon(payload);
990
+ sideEffects?.onSiteCall?.();
991
+ try {
992
+ const result = await httpClient.request(reqOpts);
993
+ sideEffects?.onSuccess?.(result);
994
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
995
+ } catch (err) {
996
+ const transformedError = (0, import_transform_error.transformError)(
997
+ err,
998
+ {
999
+ spreadPathsToArguments: {},
1000
+ explicitPathsToArguments: {
1001
+ participantId: "$[0].participantId",
1002
+ couponCode: "$[0].couponCode",
1003
+ orderId: "$[1]"
1004
+ },
1005
+ singleArgumentUnchanged: false
1006
+ },
1007
+ ["identifiers", "orderId"]
1008
+ );
1009
+ sideEffects?.onError?.(err);
1010
+ throw transformedError;
1011
+ }
1012
+ }
1013
+ async function revertCoupon2(identifiers, orderId) {
1014
+ const { httpClient, sideEffects } = arguments[2];
1015
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1016
+ participantId: identifiers?.participantId,
1017
+ couponId: identifiers?.couponId,
1018
+ orderId
1019
+ });
1020
+ const reqOpts = revertCoupon(payload);
1021
+ sideEffects?.onSiteCall?.();
1022
+ try {
1023
+ const result = await httpClient.request(reqOpts);
1024
+ sideEffects?.onSuccess?.(result);
1025
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1026
+ } catch (err) {
1027
+ const transformedError = (0, import_transform_error.transformError)(
1028
+ err,
1029
+ {
1030
+ spreadPathsToArguments: {},
1031
+ explicitPathsToArguments: {
1032
+ participantId: "$[0].participantId",
1033
+ couponId: "$[0].couponId",
1034
+ orderId: "$[1]"
1035
+ },
1036
+ singleArgumentUnchanged: false
1037
+ },
1038
+ ["identifiers", "orderId"]
1039
+ );
1040
+ sideEffects?.onError?.(err);
1041
+ throw transformedError;
1042
+ }
1043
+ }
1044
+ async function bulkInviteToProgram2(programId, options) {
1045
+ const { httpClient, sideEffects } = arguments[2];
1046
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1047
+ programId,
1048
+ memberIds: options?.memberIds,
1049
+ returnEntity: options?.returnEntity
1050
+ });
1051
+ const reqOpts = bulkInviteToProgram(payload);
1052
+ sideEffects?.onSiteCall?.();
1053
+ try {
1054
+ const result = await httpClient.request(reqOpts);
1055
+ sideEffects?.onSuccess?.(result);
1056
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1057
+ } catch (err) {
1058
+ const transformedError = (0, import_transform_error.transformError)(
1059
+ err,
1060
+ {
1061
+ spreadPathsToArguments: {},
1062
+ explicitPathsToArguments: {
1063
+ programId: "$[0]",
1064
+ memberIds: "$[1].memberIds",
1065
+ returnEntity: "$[1].returnEntity"
1066
+ },
1067
+ singleArgumentUnchanged: false
1068
+ },
1069
+ ["programId", "options"]
1070
+ );
1071
+ sideEffects?.onError?.(err);
1072
+ throw transformedError;
1073
+ }
1074
+ }
1075
+ async function bulkInviteAllToProgram2(programId, options) {
1076
+ const { httpClient, sideEffects } = arguments[2];
1077
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1078
+ programId,
1079
+ excludeMemberIds: options?.excludeMemberIds
1080
+ });
1081
+ const reqOpts = bulkInviteAllToProgram(payload);
1082
+ sideEffects?.onSiteCall?.();
1083
+ try {
1084
+ const result = await httpClient.request(reqOpts);
1085
+ sideEffects?.onSuccess?.(result);
1086
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1087
+ } catch (err) {
1088
+ const transformedError = (0, import_transform_error.transformError)(
1089
+ err,
1090
+ {
1091
+ spreadPathsToArguments: {},
1092
+ explicitPathsToArguments: {
1093
+ programId: "$[0]",
1094
+ excludeMemberIds: "$[1].excludeMemberIds"
1095
+ },
1096
+ singleArgumentUnchanged: false
1097
+ },
1098
+ ["programId", "options"]
1099
+ );
1100
+ sideEffects?.onError?.(err);
1101
+ throw transformedError;
1102
+ }
1103
+ }
1104
+ async function bulkAddToProgram2(programId, options) {
1105
+ const { httpClient, sideEffects } = arguments[2];
1106
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1107
+ programId,
1108
+ memberIds: options?.memberIds,
1109
+ returnEntity: options?.returnEntity
1110
+ });
1111
+ const reqOpts = bulkAddToProgram(payload);
1112
+ sideEffects?.onSiteCall?.();
1113
+ try {
1114
+ const result = await httpClient.request(reqOpts);
1115
+ sideEffects?.onSuccess?.(result);
1116
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1117
+ } catch (err) {
1118
+ const transformedError = (0, import_transform_error.transformError)(
1119
+ err,
1120
+ {
1121
+ spreadPathsToArguments: {},
1122
+ explicitPathsToArguments: {
1123
+ programId: "$[0]",
1124
+ memberIds: "$[1].memberIds",
1125
+ returnEntity: "$[1].returnEntity"
1126
+ },
1127
+ singleArgumentUnchanged: false
1128
+ },
1129
+ ["programId", "options"]
1130
+ );
1131
+ sideEffects?.onError?.(err);
1132
+ throw transformedError;
1133
+ }
1134
+ }
1135
+ async function bulkAddAllToProgram2(programId, options) {
1136
+ const { httpClient, sideEffects } = arguments[2];
1137
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1138
+ programId,
1139
+ excludeMemberIds: options?.excludeMemberIds
1140
+ });
1141
+ const reqOpts = bulkAddAllToProgram(payload);
1142
+ sideEffects?.onSiteCall?.();
1143
+ try {
1144
+ const result = await httpClient.request(reqOpts);
1145
+ sideEffects?.onSuccess?.(result);
1146
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1147
+ } catch (err) {
1148
+ const transformedError = (0, import_transform_error.transformError)(
1149
+ err,
1150
+ {
1151
+ spreadPathsToArguments: {},
1152
+ explicitPathsToArguments: {
1153
+ programId: "$[0]",
1154
+ excludeMemberIds: "$[1].excludeMemberIds"
1155
+ },
1156
+ singleArgumentUnchanged: false
1157
+ },
1158
+ ["programId", "options"]
1159
+ );
1160
+ sideEffects?.onError?.(err);
1161
+ throw transformedError;
1162
+ }
1163
+ }
1164
+ async function bulkApproveParticipant2(participantIds, options) {
1165
+ const { httpClient, sideEffects } = arguments[2];
1166
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1167
+ participantIds,
1168
+ programId: options?.programId,
1169
+ returnEntity: options?.returnEntity
1170
+ });
1171
+ const reqOpts = bulkApproveParticipant(payload);
1172
+ sideEffects?.onSiteCall?.();
1173
+ try {
1174
+ const result = await httpClient.request(reqOpts);
1175
+ sideEffects?.onSuccess?.(result);
1176
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1177
+ } catch (err) {
1178
+ const transformedError = (0, import_transform_error.transformError)(
1179
+ err,
1180
+ {
1181
+ spreadPathsToArguments: {},
1182
+ explicitPathsToArguments: {
1183
+ participantIds: "$[0]",
1184
+ programId: "$[1].programId",
1185
+ returnEntity: "$[1].returnEntity"
1186
+ },
1187
+ singleArgumentUnchanged: false
1188
+ },
1189
+ ["participantIds", "options"]
1190
+ );
1191
+ sideEffects?.onError?.(err);
1192
+ throw transformedError;
1193
+ }
1194
+ }
1195
+ async function bulkApproveAllParticipant2(options) {
1196
+ const { httpClient, sideEffects } = arguments[1];
1197
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1198
+ programId: options?.programId,
1199
+ excludeParticipantIds: options?.excludeParticipantIds
1200
+ });
1201
+ const reqOpts = bulkApproveAllParticipant(payload);
1202
+ sideEffects?.onSiteCall?.();
1203
+ try {
1204
+ const result = await httpClient.request(reqOpts);
1205
+ sideEffects?.onSuccess?.(result);
1206
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1207
+ } catch (err) {
1208
+ const transformedError = (0, import_transform_error.transformError)(
1209
+ err,
1210
+ {
1211
+ spreadPathsToArguments: {},
1212
+ explicitPathsToArguments: {
1213
+ programId: "$[0].programId",
1214
+ excludeParticipantIds: "$[0].excludeParticipantIds"
1215
+ },
1216
+ singleArgumentUnchanged: false
1217
+ },
1218
+ ["options"]
1219
+ );
1220
+ sideEffects?.onError?.(err);
1221
+ throw transformedError;
1222
+ }
1223
+ }
1224
+ async function deleteParticipant2(participantId) {
1225
+ const { httpClient, sideEffects } = arguments[1];
1226
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1227
+ participantId
1228
+ });
1229
+ const reqOpts = deleteParticipant(payload);
1230
+ sideEffects?.onSiteCall?.();
1231
+ try {
1232
+ const result = await httpClient.request(reqOpts);
1233
+ sideEffects?.onSuccess?.(result);
1234
+ } catch (err) {
1235
+ const transformedError = (0, import_transform_error.transformError)(
1236
+ err,
1237
+ {
1238
+ spreadPathsToArguments: {},
1239
+ explicitPathsToArguments: { participantId: "$[0]" },
1240
+ singleArgumentUnchanged: false
1241
+ },
1242
+ ["participantId"]
1243
+ );
1244
+ sideEffects?.onError?.(err);
1245
+ throw transformedError;
1246
+ }
1247
+ }
1248
+ async function issueCertificate2(participantId) {
1249
+ const { httpClient, sideEffects } = arguments[1];
1250
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1251
+ participantId
1252
+ });
1253
+ const reqOpts = issueCertificate(payload);
1254
+ sideEffects?.onSiteCall?.();
1255
+ try {
1256
+ const result = await httpClient.request(reqOpts);
1257
+ sideEffects?.onSuccess?.(result);
1258
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1259
+ } catch (err) {
1260
+ const transformedError = (0, import_transform_error.transformError)(
1261
+ err,
1262
+ {
1263
+ spreadPathsToArguments: {},
1264
+ explicitPathsToArguments: { participantId: "$[0]" },
1265
+ singleArgumentUnchanged: false
1266
+ },
1267
+ ["participantId"]
1268
+ );
1269
+ sideEffects?.onError?.(err);
1270
+ throw transformedError;
1271
+ }
1272
+ }
1273
+ async function getCompletionStats2(programId) {
1274
+ const { httpClient, sideEffects } = arguments[1];
1275
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1276
+ programId
1277
+ });
1278
+ const reqOpts = getCompletionStats(payload);
1279
+ sideEffects?.onSiteCall?.();
1280
+ try {
1281
+ const result = await httpClient.request(reqOpts);
1282
+ sideEffects?.onSuccess?.(result);
1283
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1284
+ } catch (err) {
1285
+ const transformedError = (0, import_transform_error.transformError)(
1286
+ err,
1287
+ {
1288
+ spreadPathsToArguments: {},
1289
+ explicitPathsToArguments: { programId: "$[0]" },
1290
+ singleArgumentUnchanged: false
1291
+ },
1292
+ ["programId"]
1293
+ );
1294
+ sideEffects?.onError?.(err);
1295
+ throw transformedError;
1296
+ }
1297
+ }
1298
+ async function getPremiumStats2() {
1299
+ const { httpClient, sideEffects } = arguments[0];
1300
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
1301
+ const reqOpts = getPremiumStats(payload);
1302
+ sideEffects?.onSiteCall?.();
1303
+ try {
1304
+ const result = await httpClient.request(reqOpts);
1305
+ sideEffects?.onSuccess?.(result);
1306
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1307
+ } catch (err) {
1308
+ const transformedError = (0, import_transform_error.transformError)(
1309
+ err,
1310
+ {
1311
+ spreadPathsToArguments: {},
1312
+ explicitPathsToArguments: {},
1313
+ singleArgumentUnchanged: false
1314
+ },
1315
+ []
1316
+ );
1317
+ sideEffects?.onError?.(err);
1318
+ throw transformedError;
1319
+ }
1320
+ }
1321
+ async function exportParticipantsStats2(programId) {
1322
+ const { httpClient, sideEffects } = arguments[1];
1323
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1324
+ programId
1325
+ });
1326
+ const reqOpts = exportParticipantsStats(payload);
1327
+ sideEffects?.onSiteCall?.();
1328
+ try {
1329
+ const result = await httpClient.request(reqOpts);
1330
+ sideEffects?.onSuccess?.(result);
1331
+ } catch (err) {
1332
+ const transformedError = (0, import_transform_error.transformError)(
1333
+ err,
1334
+ {
1335
+ spreadPathsToArguments: {},
1336
+ explicitPathsToArguments: { programId: "$[0]" },
1337
+ singleArgumentUnchanged: false
1338
+ },
1339
+ ["programId"]
1340
+ );
1341
+ sideEffects?.onError?.(err);
1342
+ throw transformedError;
1343
+ }
1344
+ }
1345
+ // Annotate the CommonJS export names for ESM import in node:
1346
+ 0 && (module.exports = {
1347
+ BenefitType,
1348
+ Event,
1349
+ EventType,
1350
+ Initiator,
1351
+ JoinPath,
1352
+ OrderItemCategory,
1353
+ RefundStatus,
1354
+ RemovalReason,
1355
+ ScheduledActionType,
1356
+ SortOrder,
1357
+ State,
1358
+ Status,
1359
+ SubdivisionType,
1360
+ TransactionStatus,
1361
+ VatType,
1362
+ WebhookIdentityType,
1363
+ applyCoupon,
1364
+ bulkAddAllToProgram,
1365
+ bulkAddToProgram,
1366
+ bulkApproveAllParticipant,
1367
+ bulkApproveParticipant,
1368
+ bulkInviteAllToProgram,
1369
+ bulkInviteToProgram,
1370
+ deleteParticipant,
1371
+ exportParticipantsStats,
1372
+ getAccessStatus,
1373
+ getCompletionStats,
1374
+ getParticipant,
1375
+ getPremiumStats,
1376
+ issueCertificate,
1377
+ joinProgram,
1378
+ leaveProgram,
1379
+ queryParticipants,
1380
+ revertCoupon
1381
+ });
1382
+ //# sourceMappingURL=index.typings.js.map