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