@wix/auto_sdk_online-programs_participants 1.0.11 → 1.0.13

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 (41) hide show
  1. package/build/cjs/index.d.ts +6 -134
  2. package/build/cjs/index.js +161 -1489
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +691 -12
  5. package/build/cjs/index.typings.js +174 -1372
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +184 -1274
  8. package/build/cjs/meta.js +19 -1060
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +6 -134
  11. package/build/es/index.mjs +144 -1446
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +691 -12
  14. package/build/es/index.typings.mjs +166 -1337
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +184 -1274
  17. package/build/es/meta.mjs +10 -1025
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +6 -145
  20. package/build/internal/cjs/index.js +161 -1489
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +691 -12
  23. package/build/internal/cjs/index.typings.js +174 -1372
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +184 -1274
  26. package/build/internal/cjs/meta.js +19 -1060
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +6 -145
  29. package/build/internal/es/index.mjs +144 -1446
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +691 -12
  32. package/build/internal/es/index.typings.mjs +166 -1337
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +184 -1274
  35. package/build/internal/es/meta.mjs +10 -1025
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
  38. package/build/cjs/online-programs-v3-participant-participants.universal-DRubTE1O.d.ts +0 -2228
  39. package/build/es/online-programs-v3-participant-participants.universal-DRubTE1O.d.mts +0 -2228
  40. package/build/internal/cjs/online-programs-v3-participant-participants.universal-DUdmZP01.d.ts +0 -2238
  41. package/build/internal/es/online-programs-v3-participant-participants.universal-DUdmZP01.d.mts +0 -2238
@@ -1,303 +1,42 @@
1
1
  // src/online-programs-v3-participant-participants.public.ts
2
2
  import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
3
3
  import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
4
- import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
4
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
5
5
  import { EventDefinition } from "@wix/sdk-types";
6
6
 
7
7
  // src/online-programs-v3-participant-participants.universal.ts
8
8
  import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
9
- import { queryBuilder } from "@wix/sdk-runtime/query-builder";
10
9
  import {
11
10
  renameKeysFromSDKRequestToRESTRequest,
12
11
  renameKeysFromRESTResponseToSDKResponse
13
12
  } from "@wix/sdk-runtime/rename-all-nested-keys";
14
13
 
15
14
  // src/online-programs-v3-participant-participants.http.ts
16
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
17
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
18
15
  import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
19
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
20
16
  import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
21
17
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
22
18
  import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
23
- function resolveWixOnlineprogramsParticipantsV3ParticipantExportsServiceUrl(opts) {
24
- const domainToMappings = {
25
- "bo._base_domain_": [
26
- {
27
- srcPath: "/participants-service",
28
- destPath: ""
29
- }
30
- ],
31
- "wixbo.ai": [
32
- {
33
- srcPath: "/participants-service",
34
- destPath: ""
35
- }
36
- ],
37
- "wix-bo.com": [
38
- {
39
- srcPath: "/participants-service",
40
- destPath: ""
41
- }
42
- ],
43
- "manage._base_domain_": [
44
- {
45
- srcPath: "/participants-service",
46
- destPath: ""
47
- }
48
- ],
49
- _: [
50
- {
51
- srcPath: "/participants-service",
52
- destPath: ""
53
- }
54
- ],
55
- "editor._base_domain_": [
56
- {
57
- srcPath: "/participants-service",
58
- destPath: ""
59
- }
60
- ],
61
- "blocks._base_domain_": [
62
- {
63
- srcPath: "/participants-service",
64
- destPath: ""
65
- }
66
- ],
67
- "create.editorx": [
68
- {
69
- srcPath: "/participants-service",
70
- destPath: ""
71
- }
72
- ],
73
- "www._base_domain_": [
74
- {
75
- srcPath: "/_api/participants-service",
76
- destPath: ""
77
- }
78
- ],
79
- "www.wixapis.com": [
80
- {
81
- srcPath: "/participants-service",
82
- destPath: ""
83
- }
84
- ]
85
- };
86
- return resolveUrl(Object.assign(opts, { domainToMappings }));
87
- }
88
19
  function resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl(opts) {
89
- const domainToMappings = {
90
- "bo._base_domain_": [
91
- {
92
- srcPath: "/participants-service",
93
- destPath: ""
94
- }
95
- ],
96
- "wixbo.ai": [
97
- {
98
- srcPath: "/participants-service",
99
- destPath: ""
100
- }
101
- ],
102
- "wix-bo.com": [
103
- {
104
- srcPath: "/participants-service",
105
- destPath: ""
106
- }
107
- ],
108
- "manage._base_domain_": [
109
- {
110
- srcPath: "/participants-service",
111
- destPath: ""
112
- }
113
- ],
114
- _: [
115
- {
116
- srcPath: "/participants-service",
117
- destPath: ""
118
- }
119
- ],
120
- "editor._base_domain_": [
121
- {
122
- srcPath: "/participants-service",
123
- destPath: ""
124
- }
125
- ],
126
- "blocks._base_domain_": [
127
- {
128
- srcPath: "/participants-service",
129
- destPath: ""
130
- }
131
- ],
132
- "create.editorx": [
133
- {
134
- srcPath: "/participants-service",
135
- destPath: ""
136
- }
137
- ],
138
- "www._base_domain_": [
139
- {
140
- srcPath: "/_api/participants-service",
141
- destPath: ""
142
- }
143
- ],
144
- "www.wixapis.com": [
145
- {
146
- srcPath: "/participants-service",
147
- destPath: ""
148
- }
149
- ]
150
- };
151
- return resolveUrl(Object.assign(opts, { domainToMappings }));
152
- }
153
- function resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl(opts) {
154
- const domainToMappings = {
155
- "bo._base_domain_": [
156
- {
157
- srcPath: "/participants-service",
158
- destPath: ""
159
- }
160
- ],
161
- "wixbo.ai": [
162
- {
163
- srcPath: "/participants-service",
164
- destPath: ""
165
- }
166
- ],
167
- "wix-bo.com": [
168
- {
169
- srcPath: "/participants-service",
170
- destPath: ""
171
- }
172
- ],
173
- "manage._base_domain_": [
174
- {
175
- srcPath: "/participants-service",
176
- destPath: ""
177
- }
178
- ],
179
- _: [
180
- {
181
- srcPath: "/participants-service",
182
- destPath: ""
183
- }
184
- ],
185
- "editor._base_domain_": [
186
- {
187
- srcPath: "/participants-service",
188
- destPath: ""
189
- }
190
- ],
191
- "blocks._base_domain_": [
192
- {
193
- srcPath: "/participants-service",
194
- destPath: ""
195
- }
196
- ],
197
- "create.editorx": [
198
- {
199
- srcPath: "/participants-service",
200
- destPath: ""
201
- }
202
- ],
203
- "www._base_domain_": [
204
- {
205
- srcPath: "/_api/participants-service",
206
- destPath: ""
207
- }
208
- ],
209
- "www.wixapis.com": [
210
- {
211
- srcPath: "/participants-service",
212
- destPath: ""
213
- }
214
- ]
215
- };
20
+ const domainToMappings = {};
216
21
  return resolveUrl(Object.assign(opts, { domainToMappings }));
217
22
  }
218
23
  var PACKAGE_NAME = "@wix/auto_sdk_online-programs_participants";
219
- function createParticipant(payload) {
220
- function __createParticipant({ host }) {
221
- const serializedData = transformPaths(payload, [
222
- {
223
- transformFn: transformSDKTimestampToRESTTimestamp,
224
- paths: [
225
- { path: "participant.createdDate" },
226
- { path: "participant.updatedDate" },
227
- { path: "participant.lastActivityDate" },
228
- { path: "participant.certificate.issuedDate" }
229
- ]
230
- },
231
- {
232
- transformFn: transformSDKFloatToRESTFloat,
233
- paths: [{ path: "participant.progress.completionPercentage" }]
234
- }
235
- ]);
236
- const metadata = {
237
- entityFqdn: "wix.online_programs.v3.participant",
238
- method: "POST",
239
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.CreateParticipant",
240
- packageName: PACKAGE_NAME,
241
- migrationOptions: {
242
- optInTransformResponse: true
243
- },
244
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
245
- protoPath: "/v3/participants",
246
- data: serializedData,
247
- host
248
- }),
249
- data: serializedData,
250
- transformResponse: (payload2) => transformPaths(payload2, [
251
- {
252
- transformFn: transformRESTTimestampToSDKTimestamp,
253
- paths: [
254
- { path: "participant.createdDate" },
255
- { path: "participant.updatedDate" },
256
- { path: "participant.lastActivityDate" },
257
- { path: "participant.certificate.issuedDate" }
258
- ]
259
- },
260
- {
261
- transformFn: transformRESTFloatToSDKFloat,
262
- paths: [{ path: "participant.progress.completionPercentage" }]
263
- }
264
- ])
265
- };
266
- return metadata;
267
- }
268
- return __createParticipant;
269
- }
270
- function bulkCreateParticipant(payload) {
271
- function __bulkCreateParticipant({ host }) {
272
- const serializedData = transformPaths(payload, [
273
- {
274
- transformFn: transformSDKTimestampToRESTTimestamp,
275
- paths: [
276
- { path: "participants.createdDate" },
277
- { path: "participants.updatedDate" },
278
- { path: "participants.lastActivityDate" },
279
- { path: "participants.certificate.issuedDate" }
280
- ]
281
- },
282
- {
283
- transformFn: transformSDKFloatToRESTFloat,
284
- paths: [{ path: "participants.progress.completionPercentage" }]
285
- }
286
- ]);
24
+ function bulkInviteToProgram(payload) {
25
+ function __bulkInviteToProgram({ host }) {
287
26
  const metadata = {
288
27
  entityFqdn: "wix.online_programs.v3.participant",
289
28
  method: "POST",
290
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.BulkCreateParticipant",
29
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteToProgram",
291
30
  packageName: PACKAGE_NAME,
292
31
  migrationOptions: {
293
32
  optInTransformResponse: true
294
33
  },
295
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
296
- protoPath: "/v3/bulk/participants/create",
297
- data: serializedData,
34
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
35
+ protoPath: "/v3/bulk/participants/invite",
36
+ data: payload,
298
37
  host
299
38
  }),
300
- data: serializedData,
39
+ data: payload,
301
40
  transformResponse: (payload2) => transformPaths(payload2, [
302
41
  {
303
42
  transformFn: transformRESTTimestampToSDKTimestamp,
@@ -316,1011 +55,152 @@ function bulkCreateParticipant(payload) {
316
55
  };
317
56
  return metadata;
318
57
  }
319
- return __bulkCreateParticipant;
320
- }
321
- function bulkAddAllToProgram(payload) {
322
- function __bulkAddAllToProgram({ host }) {
323
- const metadata = {
324
- entityFqdn: "wix.online_programs.v3.participant",
325
- method: "POST",
326
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.BulkAddAllToProgram",
327
- packageName: PACKAGE_NAME,
328
- migrationOptions: {
329
- optInTransformResponse: true
330
- },
331
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
332
- protoPath: "/v3/bulk/participants/add-all",
333
- data: payload,
334
- host
335
- }),
336
- data: payload
337
- };
338
- return metadata;
339
- }
340
- return __bulkAddAllToProgram;
341
- }
342
- function deleteParticipant(payload) {
343
- function __deleteParticipant({ host }) {
344
- const metadata = {
345
- entityFqdn: "wix.online_programs.v3.participant",
346
- method: "DELETE",
347
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.DeleteParticipant",
348
- packageName: PACKAGE_NAME,
349
- migrationOptions: {
350
- optInTransformResponse: true
351
- },
352
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
353
- protoPath: "/v3/participants/{participantId}",
354
- data: payload,
355
- host
356
- }),
357
- params: toURLSearchParams(payload)
358
- };
359
- return metadata;
360
- }
361
- return __deleteParticipant;
362
- }
363
- function issueCertificate(payload) {
364
- function __issueCertificate({ host }) {
365
- const metadata = {
366
- entityFqdn: "wix.online_programs.v3.participant",
367
- method: "POST",
368
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.IssueCertificate",
369
- packageName: PACKAGE_NAME,
370
- migrationOptions: {
371
- optInTransformResponse: true
372
- },
373
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
374
- protoPath: "/v3/participants/{participantId}/issue-certificate",
375
- data: payload,
376
- host
377
- }),
378
- data: payload,
379
- transformResponse: (payload2) => transformPaths(payload2, [
380
- {
381
- transformFn: transformRESTTimestampToSDKTimestamp,
382
- paths: [
383
- { path: "participant.createdDate" },
384
- { path: "participant.updatedDate" },
385
- { path: "participant.lastActivityDate" },
386
- { path: "participant.certificate.issuedDate" }
387
- ]
388
- },
389
- {
390
- transformFn: transformRESTFloatToSDKFloat,
391
- paths: [{ path: "participant.progress.completionPercentage" }]
392
- }
393
- ])
394
- };
395
- return metadata;
396
- }
397
- return __issueCertificate;
398
- }
399
- function getCompletionStats(payload) {
400
- function __getCompletionStats({ host }) {
401
- const metadata = {
402
- entityFqdn: "wix.online_programs.v3.participant",
403
- method: "GET",
404
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.GetCompletionStats",
405
- packageName: PACKAGE_NAME,
406
- migrationOptions: {
407
- optInTransformResponse: true
408
- },
409
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
410
- protoPath: "/v3/stats/completion/{programId}",
411
- data: payload,
412
- host
413
- }),
414
- params: toURLSearchParams(payload),
415
- transformResponse: (payload2) => transformPaths(payload2, [
416
- {
417
- transformFn: transformRESTFloatToSDKFloat,
418
- paths: [{ path: "completionRate" }]
419
- }
420
- ])
421
- };
422
- return metadata;
423
- }
424
- return __getCompletionStats;
425
- }
426
- function getPremiumStats(payload) {
427
- function __getPremiumStats({ host }) {
428
- const metadata = {
429
- entityFqdn: "wix.online_programs.v3.participant",
430
- method: "GET",
431
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.GetPremiumStats",
432
- packageName: PACKAGE_NAME,
433
- migrationOptions: {
434
- optInTransformResponse: true
435
- },
436
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
437
- protoPath: "/v3/stats/premium",
438
- data: payload,
439
- host
440
- }),
441
- params: toURLSearchParams(payload)
442
- };
443
- return metadata;
444
- }
445
- return __getPremiumStats;
446
- }
447
- function getParticipant(payload) {
448
- function __getParticipant({ host }) {
449
- const metadata = {
450
- entityFqdn: "wix.online_programs.v3.participant",
451
- method: "GET",
452
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.GetParticipant",
453
- packageName: PACKAGE_NAME,
454
- migrationOptions: {
455
- optInTransformResponse: true
456
- },
457
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
458
- protoPath: "/v3/participants/{participantId}",
459
- data: payload,
460
- host
461
- }),
462
- params: toURLSearchParams(payload),
463
- transformResponse: (payload2) => transformPaths(payload2, [
464
- {
465
- transformFn: transformRESTTimestampToSDKTimestamp,
466
- paths: [
467
- { path: "participant.createdDate" },
468
- { path: "participant.updatedDate" },
469
- { path: "participant.lastActivityDate" },
470
- { path: "participant.certificate.issuedDate" }
471
- ]
472
- },
473
- {
474
- transformFn: transformRESTFloatToSDKFloat,
475
- paths: [{ path: "participant.progress.completionPercentage" }]
476
- }
477
- ])
478
- };
479
- return metadata;
480
- }
481
- return __getParticipant;
482
- }
483
- function queryParticipants(payload) {
484
- function __queryParticipants({ host }) {
485
- const metadata = {
486
- entityFqdn: "wix.online_programs.v3.participant",
487
- method: "POST",
488
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.QueryParticipants",
489
- packageName: PACKAGE_NAME,
490
- migrationOptions: {
491
- optInTransformResponse: true
492
- },
493
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
494
- protoPath: "/v3/participants/query",
495
- data: payload,
496
- host
497
- }),
498
- data: payload,
499
- transformResponse: (payload2) => transformPaths(payload2, [
500
- {
501
- transformFn: transformRESTTimestampToSDKTimestamp,
502
- paths: [
503
- { path: "participants.createdDate" },
504
- { path: "participants.updatedDate" },
505
- { path: "participants.lastActivityDate" },
506
- { path: "participants.certificate.issuedDate" }
507
- ]
508
- },
509
- {
510
- transformFn: transformRESTFloatToSDKFloat,
511
- paths: [{ path: "participants.progress.completionPercentage" }]
512
- }
513
- ])
514
- };
515
- return metadata;
516
- }
517
- return __queryParticipants;
518
- }
519
- function getAccessStatus(payload) {
520
- function __getAccessStatus({ host }) {
521
- const metadata = {
522
- entityFqdn: "wix.online_programs.v3.participant",
523
- method: "GET",
524
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.GetAccessStatus",
525
- packageName: PACKAGE_NAME,
526
- migrationOptions: {
527
- optInTransformResponse: true
528
- },
529
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
530
- protoPath: "/v3/participants/access",
531
- data: payload,
532
- host
533
- }),
534
- params: toURLSearchParams(payload)
535
- };
536
- return metadata;
537
- }
538
- return __getAccessStatus;
58
+ return __bulkInviteToProgram;
539
59
  }
540
- function bulkUpdateParticipantTags(payload) {
541
- function __bulkUpdateParticipantTags({ host }) {
542
- const metadata = {
543
- entityFqdn: "wix.online_programs.v3.participant",
544
- method: "POST",
545
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.BulkUpdateParticipantTags",
546
- packageName: PACKAGE_NAME,
547
- migrationOptions: {
548
- optInTransformResponse: true
549
- },
550
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
551
- protoPath: "/v3/bulk/participants/update-tags",
552
- data: payload,
553
- host
554
- }),
555
- data: payload
556
- };
557
- return metadata;
558
- }
559
- return __bulkUpdateParticipantTags;
560
- }
561
- function bulkUpdateParticipantTagsByFilter(payload) {
562
- function __bulkUpdateParticipantTagsByFilter({ host }) {
563
- const metadata = {
564
- entityFqdn: "wix.online_programs.v3.participant",
565
- method: "POST",
566
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.BulkUpdateParticipantTagsByFilter",
567
- packageName: PACKAGE_NAME,
568
- migrationOptions: {
569
- optInTransformResponse: true
570
- },
571
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
572
- protoPath: "/v3/bulk/participants/update-tags-by-filter",
573
- data: payload,
574
- host
575
- }),
576
- data: payload
577
- };
578
- return metadata;
579
- }
580
- return __bulkUpdateParticipantTagsByFilter;
581
- }
582
- function searchParticipants(payload) {
583
- function __searchParticipants({ host }) {
584
- const serializedData = transformPaths(payload, [
585
- {
586
- transformFn: transformSDKFloatToRESTFloat,
587
- paths: [
588
- { path: "search.aggregations.range.buckets.from" },
589
- { path: "search.aggregations.range.buckets.to" },
590
- {
591
- path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
592
- },
593
- {
594
- path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
595
- }
596
- ]
597
- }
598
- ]);
599
- const metadata = {
600
- entityFqdn: "wix.online_programs.v3.participant",
601
- method: "POST",
602
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantsService.SearchParticipants",
603
- packageName: PACKAGE_NAME,
604
- migrationOptions: {
605
- optInTransformResponse: true
606
- },
607
- url: resolveWixOnlineprogramsParticipantsV3ParticipantsServiceUrl({
608
- protoPath: "/v3/participants/search",
609
- data: serializedData,
610
- host
611
- }),
612
- data: serializedData,
613
- transformResponse: (payload2) => transformPaths(payload2, [
614
- {
615
- transformFn: transformRESTTimestampToSDKTimestamp,
616
- paths: [
617
- { path: "participants.createdDate" },
618
- { path: "participants.updatedDate" },
619
- { path: "participants.lastActivityDate" },
620
- { path: "participants.certificate.issuedDate" }
621
- ]
622
- },
623
- {
624
- transformFn: transformRESTFloatToSDKFloat,
625
- paths: [
626
- { path: "participants.progress.completionPercentage" },
627
- { path: "aggregationData.results.scalar.value" },
628
- {
629
- path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
630
- },
631
- {
632
- path: "aggregationData.results.nested.results.results.*.scalar.value"
633
- },
634
- { path: "aggregationData.results.ranges.results.from" },
635
- { path: "aggregationData.results.ranges.results.to" },
636
- {
637
- path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
638
- },
639
- {
640
- path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
641
- },
642
- {
643
- path: "aggregationData.results.nested.results.results.*.range.from"
644
- },
645
- {
646
- path: "aggregationData.results.nested.results.results.*.range.to"
647
- }
648
- ]
649
- }
650
- ])
651
- };
652
- return metadata;
653
- }
654
- return __searchParticipants;
655
- }
656
- function bulkInviteToProgram(payload) {
657
- function __bulkInviteToProgram({ host }) {
658
- const metadata = {
659
- entityFqdn: "wix.online_programs.v3.participant",
660
- method: "POST",
661
- methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteToProgram",
662
- packageName: PACKAGE_NAME,
663
- migrationOptions: {
664
- optInTransformResponse: true
665
- },
666
- url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
667
- protoPath: "/v3/bulk/participants/invite",
668
- data: payload,
669
- host
670
- }),
671
- data: payload,
672
- transformResponse: (payload2) => transformPaths(payload2, [
673
- {
674
- transformFn: transformRESTTimestampToSDKTimestamp,
675
- paths: [
676
- { path: "results.item.createdDate" },
677
- { path: "results.item.updatedDate" },
678
- { path: "results.item.lastActivityDate" },
679
- { path: "results.item.certificate.issuedDate" }
680
- ]
681
- },
682
- {
683
- transformFn: transformRESTFloatToSDKFloat,
684
- paths: [{ path: "results.item.progress.completionPercentage" }]
685
- }
686
- ])
687
- };
688
- return metadata;
689
- }
690
- return __bulkInviteToProgram;
691
- }
692
- function bulkInviteAllToProgram(payload) {
693
- function __bulkInviteAllToProgram({ host }) {
60
+ function bulkInviteAllToProgram(payload) {
61
+ function __bulkInviteAllToProgram({ host }) {
694
62
  const metadata = {
695
63
  entityFqdn: "wix.online_programs.v3.participant",
696
64
  method: "POST",
697
65
  methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkInviteAllToProgram",
698
- packageName: PACKAGE_NAME,
699
- migrationOptions: {
700
- optInTransformResponse: true
701
- },
702
- url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
703
- protoPath: "/v3/bulk/participants/invite-all",
704
- data: payload,
705
- host
706
- }),
707
- data: payload
708
- };
709
- return metadata;
710
- }
711
- return __bulkInviteAllToProgram;
712
- }
713
- function bulkAddToProgram(payload) {
714
- function __bulkAddToProgram({ host }) {
715
- const metadata = {
716
- entityFqdn: "wix.online_programs.v3.participant",
717
- method: "POST",
718
- methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddToProgram",
719
- packageName: PACKAGE_NAME,
720
- migrationOptions: {
721
- optInTransformResponse: true
722
- },
723
- url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
724
- protoPath: "/v3/bulk/participants/add",
725
- data: payload,
726
- host
727
- }),
728
- data: payload,
729
- transformResponse: (payload2) => transformPaths(payload2, [
730
- {
731
- transformFn: transformRESTTimestampToSDKTimestamp,
732
- paths: [
733
- { path: "results.item.createdDate" },
734
- { path: "results.item.updatedDate" },
735
- { path: "results.item.lastActivityDate" },
736
- { path: "results.item.certificate.issuedDate" }
737
- ]
738
- },
739
- {
740
- transformFn: transformRESTFloatToSDKFloat,
741
- paths: [{ path: "results.item.progress.completionPercentage" }]
742
- }
743
- ])
744
- };
745
- return metadata;
746
- }
747
- return __bulkAddToProgram;
748
- }
749
- function bulkApproveParticipant(payload) {
750
- function __bulkApproveParticipant({ host }) {
751
- const metadata = {
752
- entityFqdn: "wix.online_programs.v3.participant",
753
- method: "POST",
754
- methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveParticipant",
755
- packageName: PACKAGE_NAME,
756
- migrationOptions: {
757
- optInTransformResponse: true
758
- },
759
- url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
760
- protoPath: "/v3/bulk/participants/approve",
761
- data: payload,
762
- host
763
- }),
764
- data: payload,
765
- transformResponse: (payload2) => transformPaths(payload2, [
766
- {
767
- transformFn: transformRESTTimestampToSDKTimestamp,
768
- paths: [
769
- { path: "results.item.createdDate" },
770
- { path: "results.item.updatedDate" },
771
- { path: "results.item.lastActivityDate" },
772
- { path: "results.item.certificate.issuedDate" }
773
- ]
774
- },
775
- {
776
- transformFn: transformRESTFloatToSDKFloat,
777
- paths: [{ path: "results.item.progress.completionPercentage" }]
778
- }
779
- ])
780
- };
781
- return metadata;
782
- }
783
- return __bulkApproveParticipant;
784
- }
785
- function bulkApproveAllParticipant(payload) {
786
- function __bulkApproveAllParticipant({ host }) {
787
- const metadata = {
788
- entityFqdn: "wix.online_programs.v3.participant",
789
- method: "POST",
790
- methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveAllParticipant",
791
- packageName: PACKAGE_NAME,
792
- migrationOptions: {
793
- optInTransformResponse: true
794
- },
795
- url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
796
- protoPath: "/v3/bulk/participants/approve-all",
797
- data: payload,
798
- host
799
- }),
800
- data: payload
801
- };
802
- return metadata;
803
- }
804
- return __bulkApproveAllParticipant;
805
- }
806
- function exportParticipantsStats(payload) {
807
- function __exportParticipantsStats({ host }) {
808
- const metadata = {
809
- entityFqdn: "wix.online_programs.v3.participant",
810
- method: "GET",
811
- methodFqn: "wix.onlineprograms.participants.v3.ParticipantExportsService.ExportParticipantsStats",
812
- packageName: PACKAGE_NAME,
813
- migrationOptions: {
814
- optInTransformResponse: true
815
- },
816
- url: resolveWixOnlineprogramsParticipantsV3ParticipantExportsServiceUrl({
817
- protoPath: "/v3/participants/export/{programId}",
818
- data: payload,
819
- host
820
- }),
821
- params: toURLSearchParams(payload)
822
- };
823
- return metadata;
824
- }
825
- return __exportParticipantsStats;
826
- }
827
-
828
- // src/online-programs-v3-participant-participants.universal.ts
829
- import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
830
- var JoinPath = /* @__PURE__ */ ((JoinPath2) => {
831
- JoinPath2["UNKNOWN_JOIN_PATH"] = "UNKNOWN_JOIN_PATH";
832
- JoinPath2["FREE"] = "FREE";
833
- JoinPath2["ADDED"] = "ADDED";
834
- JoinPath2["SINGLE_PAYMENT"] = "SINGLE_PAYMENT";
835
- JoinPath2["PAID_PLAN"] = "PAID_PLAN";
836
- JoinPath2["FREE_COUPON"] = "FREE_COUPON";
837
- return JoinPath2;
838
- })(JoinPath || {});
839
- var Status = /* @__PURE__ */ ((Status2) => {
840
- Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
841
- Status2["JOINED"] = "JOINED";
842
- Status2["COMPLETED"] = "COMPLETED";
843
- Status2["FAILED"] = "FAILED";
844
- Status2["SUSPENDED"] = "SUSPENDED";
845
- Status2["AUTO_REMOVED"] = "AUTO_REMOVED";
846
- Status2["REMOVED"] = "REMOVED";
847
- Status2["LEFT"] = "LEFT";
848
- return Status2;
849
- })(Status || {});
850
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
851
- SortOrder2["ASC"] = "ASC";
852
- SortOrder2["DESC"] = "DESC";
853
- return SortOrder2;
854
- })(SortOrder || {});
855
- var SortType = /* @__PURE__ */ ((SortType2) => {
856
- SortType2["COUNT"] = "COUNT";
857
- SortType2["VALUE"] = "VALUE";
858
- return SortType2;
859
- })(SortType || {});
860
- var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
861
- SortDirection2["DESC"] = "DESC";
862
- SortDirection2["ASC"] = "ASC";
863
- return SortDirection2;
864
- })(SortDirection || {});
865
- var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
866
- MissingValues2["EXCLUDE"] = "EXCLUDE";
867
- MissingValues2["INCLUDE"] = "INCLUDE";
868
- return MissingValues2;
869
- })(MissingValues || {});
870
- var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
871
- ScalarType2["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
872
- ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
873
- ScalarType2["MIN"] = "MIN";
874
- ScalarType2["MAX"] = "MAX";
875
- return ScalarType2;
876
- })(ScalarType || {});
877
- var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
878
- NestedAggregationType2["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
879
- NestedAggregationType2["VALUE"] = "VALUE";
880
- NestedAggregationType2["RANGE"] = "RANGE";
881
- NestedAggregationType2["SCALAR"] = "SCALAR";
882
- NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
883
- return NestedAggregationType2;
884
- })(NestedAggregationType || {});
885
- var Interval = /* @__PURE__ */ ((Interval2) => {
886
- Interval2["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
887
- Interval2["YEAR"] = "YEAR";
888
- Interval2["MONTH"] = "MONTH";
889
- Interval2["WEEK"] = "WEEK";
890
- Interval2["DAY"] = "DAY";
891
- Interval2["HOUR"] = "HOUR";
892
- Interval2["MINUTE"] = "MINUTE";
893
- Interval2["SECOND"] = "SECOND";
894
- return Interval2;
895
- })(Interval || {});
896
- var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
897
- AggregationType2["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
898
- AggregationType2["VALUE"] = "VALUE";
899
- AggregationType2["RANGE"] = "RANGE";
900
- AggregationType2["SCALAR"] = "SCALAR";
901
- AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
902
- AggregationType2["NESTED"] = "NESTED";
903
- return AggregationType2;
904
- })(AggregationType || {});
905
- var Mode = /* @__PURE__ */ ((Mode2) => {
906
- Mode2["OR"] = "OR";
907
- Mode2["AND"] = "AND";
908
- return Mode2;
909
- })(Mode || {});
910
- var BenefitType = /* @__PURE__ */ ((BenefitType2) => {
911
- BenefitType2["UNDEFINED"] = "UNDEFINED";
912
- BenefitType2["LIMITED"] = "LIMITED";
913
- BenefitType2["UNLIMITED"] = "UNLIMITED";
914
- return BenefitType2;
915
- })(BenefitType || {});
916
- var Event = /* @__PURE__ */ ((Event2) => {
917
- Event2["Updated"] = "Updated";
918
- Event2["Deleted"] = "Deleted";
919
- Event2["Created"] = "Created";
920
- return Event2;
921
- })(Event || {});
922
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
923
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
924
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
925
- WebhookIdentityType2["MEMBER"] = "MEMBER";
926
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
927
- WebhookIdentityType2["APP"] = "APP";
928
- return WebhookIdentityType2;
929
- })(WebhookIdentityType || {});
930
- var State = /* @__PURE__ */ ((State2) => {
931
- State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
932
- State2["JOINED"] = "JOINED";
933
- State2["COMPLETED"] = "COMPLETED";
934
- State2["FAILED"] = "FAILED";
935
- State2["SUSPENDED"] = "SUSPENDED";
936
- State2["AUTO_REMOVED"] = "AUTO_REMOVED";
937
- State2["REMOVED"] = "REMOVED";
938
- State2["LEFT"] = "LEFT";
939
- return State2;
940
- })(State || {});
941
- async function createParticipant2(participant) {
942
- const { httpClient, sideEffects } = arguments[1];
943
- const payload = renameKeysFromSDKRequestToRESTRequest({
944
- participant
945
- });
946
- const reqOpts = createParticipant(payload);
947
- sideEffects?.onSiteCall?.();
948
- try {
949
- const result = await httpClient.request(reqOpts);
950
- sideEffects?.onSuccess?.(result);
951
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.participant;
952
- } catch (err) {
953
- const transformedError = sdkTransformError(
954
- err,
955
- {
956
- spreadPathsToArguments: {},
957
- explicitPathsToArguments: { participant: "$[0]" },
958
- singleArgumentUnchanged: false
959
- },
960
- ["participant"]
961
- );
962
- sideEffects?.onError?.(err);
963
- throw transformedError;
964
- }
965
- }
966
- async function bulkCreateParticipant2(participants, options) {
967
- const { httpClient, sideEffects } = arguments[2];
968
- const payload = renameKeysFromSDKRequestToRESTRequest({
969
- participants,
970
- returnEntity: options?.returnEntity
971
- });
972
- const reqOpts = bulkCreateParticipant(payload);
973
- sideEffects?.onSiteCall?.();
974
- try {
975
- const result = await httpClient.request(reqOpts);
976
- sideEffects?.onSuccess?.(result);
977
- return renameKeysFromRESTResponseToSDKResponse(result.data);
978
- } catch (err) {
979
- const transformedError = sdkTransformError(
980
- err,
981
- {
982
- spreadPathsToArguments: {},
983
- explicitPathsToArguments: {
984
- participants: "$[0]",
985
- returnEntity: "$[1].returnEntity"
986
- },
987
- singleArgumentUnchanged: false
988
- },
989
- ["participants", "options"]
990
- );
991
- sideEffects?.onError?.(err);
992
- throw transformedError;
993
- }
994
- }
995
- async function bulkAddAllToProgram2(programId, options) {
996
- const { httpClient, sideEffects } = arguments[2];
997
- const payload = renameKeysFromSDKRequestToRESTRequest({
998
- programId,
999
- excludeMemberIds: options?.excludeMemberIds
1000
- });
1001
- const reqOpts = bulkAddAllToProgram(payload);
1002
- sideEffects?.onSiteCall?.();
1003
- try {
1004
- const result = await httpClient.request(reqOpts);
1005
- sideEffects?.onSuccess?.(result);
1006
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1007
- } catch (err) {
1008
- const transformedError = sdkTransformError(
1009
- err,
1010
- {
1011
- spreadPathsToArguments: {},
1012
- explicitPathsToArguments: {
1013
- programId: "$[0]",
1014
- excludeMemberIds: "$[1].excludeMemberIds"
1015
- },
1016
- singleArgumentUnchanged: false
1017
- },
1018
- ["programId", "options"]
1019
- );
1020
- sideEffects?.onError?.(err);
1021
- throw transformedError;
1022
- }
1023
- }
1024
- async function deleteParticipant2(participantId) {
1025
- const { httpClient, sideEffects } = arguments[1];
1026
- const payload = renameKeysFromSDKRequestToRESTRequest({
1027
- participantId
1028
- });
1029
- const reqOpts = deleteParticipant(payload);
1030
- sideEffects?.onSiteCall?.();
1031
- try {
1032
- const result = await httpClient.request(reqOpts);
1033
- sideEffects?.onSuccess?.(result);
1034
- } catch (err) {
1035
- const transformedError = sdkTransformError(
1036
- err,
1037
- {
1038
- spreadPathsToArguments: {},
1039
- explicitPathsToArguments: { participantId: "$[0]" },
1040
- singleArgumentUnchanged: false
1041
- },
1042
- ["participantId"]
1043
- );
1044
- sideEffects?.onError?.(err);
1045
- throw transformedError;
1046
- }
1047
- }
1048
- async function issueCertificate2(participantId) {
1049
- const { httpClient, sideEffects } = arguments[1];
1050
- const payload = renameKeysFromSDKRequestToRESTRequest({
1051
- participantId
1052
- });
1053
- const reqOpts = issueCertificate(payload);
1054
- sideEffects?.onSiteCall?.();
1055
- try {
1056
- const result = await httpClient.request(reqOpts);
1057
- sideEffects?.onSuccess?.(result);
1058
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1059
- } catch (err) {
1060
- const transformedError = sdkTransformError(
1061
- err,
1062
- {
1063
- spreadPathsToArguments: {},
1064
- explicitPathsToArguments: { participantId: "$[0]" },
1065
- singleArgumentUnchanged: false
1066
- },
1067
- ["participantId"]
1068
- );
1069
- sideEffects?.onError?.(err);
1070
- throw transformedError;
1071
- }
1072
- }
1073
- async function getCompletionStats2(programId) {
1074
- const { httpClient, sideEffects } = arguments[1];
1075
- const payload = renameKeysFromSDKRequestToRESTRequest({
1076
- programId
1077
- });
1078
- const reqOpts = getCompletionStats(payload);
1079
- sideEffects?.onSiteCall?.();
1080
- try {
1081
- const result = await httpClient.request(reqOpts);
1082
- sideEffects?.onSuccess?.(result);
1083
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1084
- } catch (err) {
1085
- const transformedError = sdkTransformError(
1086
- err,
1087
- {
1088
- spreadPathsToArguments: {},
1089
- explicitPathsToArguments: { programId: "$[0]" },
1090
- singleArgumentUnchanged: false
1091
- },
1092
- ["programId"]
1093
- );
1094
- sideEffects?.onError?.(err);
1095
- throw transformedError;
1096
- }
1097
- }
1098
- async function getPremiumStats2() {
1099
- const { httpClient, sideEffects } = arguments[0];
1100
- const payload = renameKeysFromSDKRequestToRESTRequest({});
1101
- const reqOpts = getPremiumStats(payload);
1102
- sideEffects?.onSiteCall?.();
1103
- try {
1104
- const result = await httpClient.request(reqOpts);
1105
- sideEffects?.onSuccess?.(result);
1106
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1107
- } catch (err) {
1108
- const transformedError = sdkTransformError(
1109
- err,
1110
- {
1111
- spreadPathsToArguments: {},
1112
- explicitPathsToArguments: {},
1113
- singleArgumentUnchanged: false
1114
- },
1115
- []
1116
- );
1117
- sideEffects?.onError?.(err);
1118
- throw transformedError;
1119
- }
1120
- }
1121
- async function getParticipant2(participantId) {
1122
- const { httpClient, sideEffects } = arguments[1];
1123
- const payload = renameKeysFromSDKRequestToRESTRequest({
1124
- participantId
1125
- });
1126
- const reqOpts = getParticipant(payload);
1127
- sideEffects?.onSiteCall?.();
1128
- try {
1129
- const result = await httpClient.request(reqOpts);
1130
- sideEffects?.onSuccess?.(result);
1131
- return renameKeysFromRESTResponseToSDKResponse(result.data)?.participant;
1132
- } catch (err) {
1133
- const transformedError = sdkTransformError(
1134
- err,
1135
- {
1136
- spreadPathsToArguments: {},
1137
- explicitPathsToArguments: { participantId: "$[0]" },
1138
- singleArgumentUnchanged: false
1139
- },
1140
- ["participantId"]
1141
- );
1142
- sideEffects?.onError?.(err);
1143
- throw transformedError;
1144
- }
1145
- }
1146
- function queryParticipants2() {
1147
- const { httpClient, sideEffects } = arguments[0];
1148
- return queryBuilder({
1149
- func: async (payload) => {
1150
- const reqOpts = queryParticipants(payload);
1151
- sideEffects?.onSiteCall?.();
1152
- try {
1153
- const result = await httpClient.request(reqOpts);
1154
- sideEffects?.onSuccess?.(result);
1155
- return result;
1156
- } catch (err) {
1157
- sideEffects?.onError?.(err);
1158
- throw err;
1159
- }
1160
- },
1161
- requestTransformer: (query) => {
1162
- const args = [query, {}];
1163
- return renameKeysFromSDKRequestToRESTRequest({
1164
- ...args?.[1],
1165
- query: args?.[0]
1166
- });
1167
- },
1168
- responseTransformer: ({
1169
- data
1170
- }) => {
1171
- const transformedData = renameKeysFromRESTResponseToSDKResponse(
1172
- transformPaths2(data, [])
1173
- );
1174
- return {
1175
- items: transformedData?.participants,
1176
- pagingMetadata: transformedData?.pagingMetadata
1177
- };
1178
- },
1179
- errorTransformer: (err) => {
1180
- const transformedError = sdkTransformError(err, {
1181
- spreadPathsToArguments: {},
1182
- explicitPathsToArguments: { query: "$[0]" },
1183
- singleArgumentUnchanged: false
1184
- });
1185
- throw transformedError;
1186
- },
1187
- pagingMethod: "CURSOR",
1188
- transformationPaths: {}
1189
- });
1190
- }
1191
- async function typedQueryParticipants(query) {
1192
- const { httpClient, sideEffects } = arguments[1];
1193
- const payload = renameKeysFromSDKRequestToRESTRequest({ query });
1194
- const reqOpts = queryParticipants(payload);
1195
- sideEffects?.onSiteCall?.();
1196
- try {
1197
- const result = await httpClient.request(reqOpts);
1198
- sideEffects?.onSuccess?.(result);
1199
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1200
- } catch (err) {
1201
- const transformedError = sdkTransformError(
1202
- err,
1203
- {
1204
- spreadPathsToArguments: {},
1205
- explicitPathsToArguments: { query: "$[0]" },
1206
- singleArgumentUnchanged: false
1207
- },
1208
- ["query"]
1209
- );
1210
- sideEffects?.onError?.(err);
1211
- throw transformedError;
1212
- }
1213
- }
1214
- async function getAccessStatus2() {
1215
- const { httpClient, sideEffects } = arguments[0];
1216
- const payload = renameKeysFromSDKRequestToRESTRequest({});
1217
- const reqOpts = getAccessStatus(payload);
1218
- sideEffects?.onSiteCall?.();
1219
- try {
1220
- const result = await httpClient.request(reqOpts);
1221
- sideEffects?.onSuccess?.(result);
1222
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1223
- } catch (err) {
1224
- const transformedError = sdkTransformError(
1225
- err,
1226
- {
1227
- spreadPathsToArguments: {},
1228
- explicitPathsToArguments: {},
1229
- singleArgumentUnchanged: false
1230
- },
1231
- []
1232
- );
1233
- sideEffects?.onError?.(err);
1234
- throw transformedError;
1235
- }
1236
- }
1237
- async function bulkUpdateParticipantTags2(participantIds, options) {
1238
- const { httpClient, sideEffects } = arguments[2];
1239
- const payload = renameKeysFromSDKRequestToRESTRequest({
1240
- participantIds,
1241
- assignTags: options?.assignTags,
1242
- unassignTags: options?.unassignTags
1243
- });
1244
- const reqOpts = bulkUpdateParticipantTags(payload);
1245
- sideEffects?.onSiteCall?.();
1246
- try {
1247
- const result = await httpClient.request(reqOpts);
1248
- sideEffects?.onSuccess?.(result);
1249
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1250
- } catch (err) {
1251
- const transformedError = sdkTransformError(
1252
- err,
1253
- {
1254
- spreadPathsToArguments: {},
1255
- explicitPathsToArguments: {
1256
- participantIds: "$[0]",
1257
- assignTags: "$[1].assignTags",
1258
- unassignTags: "$[1].unassignTags"
1259
- },
1260
- singleArgumentUnchanged: false
66
+ packageName: PACKAGE_NAME,
67
+ migrationOptions: {
68
+ optInTransformResponse: true
1261
69
  },
1262
- ["participantIds", "options"]
1263
- );
1264
- sideEffects?.onError?.(err);
1265
- throw transformedError;
70
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
71
+ protoPath: "/v3/bulk/participants/invite-all",
72
+ data: payload,
73
+ host
74
+ }),
75
+ data: payload
76
+ };
77
+ return metadata;
1266
78
  }
79
+ return __bulkInviteAllToProgram;
1267
80
  }
1268
- async function bulkUpdateParticipantTagsByFilter2(filter, options) {
1269
- const { httpClient, sideEffects } = arguments[2];
1270
- const payload = renameKeysFromSDKRequestToRESTRequest({
1271
- filter,
1272
- assignTags: options?.assignTags,
1273
- unassignTags: options?.unassignTags
1274
- });
1275
- const reqOpts = bulkUpdateParticipantTagsByFilter(
1276
- payload
1277
- );
1278
- sideEffects?.onSiteCall?.();
1279
- try {
1280
- const result = await httpClient.request(reqOpts);
1281
- sideEffects?.onSuccess?.(result);
1282
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1283
- } catch (err) {
1284
- const transformedError = sdkTransformError(
1285
- err,
1286
- {
1287
- spreadPathsToArguments: {},
1288
- explicitPathsToArguments: {
1289
- filter: "$[0]",
1290
- assignTags: "$[1].assignTags",
1291
- unassignTags: "$[1].unassignTags"
81
+ function bulkAddToProgram(payload) {
82
+ function __bulkAddToProgram({ host }) {
83
+ const metadata = {
84
+ entityFqdn: "wix.online_programs.v3.participant",
85
+ method: "POST",
86
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkAddToProgram",
87
+ packageName: PACKAGE_NAME,
88
+ migrationOptions: {
89
+ optInTransformResponse: true
90
+ },
91
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
92
+ protoPath: "/v3/bulk/participants/add",
93
+ data: payload,
94
+ host
95
+ }),
96
+ data: payload,
97
+ transformResponse: (payload2) => transformPaths(payload2, [
98
+ {
99
+ transformFn: transformRESTTimestampToSDKTimestamp,
100
+ paths: [
101
+ { path: "results.item.createdDate" },
102
+ { path: "results.item.updatedDate" },
103
+ { path: "results.item.lastActivityDate" },
104
+ { path: "results.item.certificate.issuedDate" }
105
+ ]
1292
106
  },
1293
- singleArgumentUnchanged: false
107
+ {
108
+ transformFn: transformRESTFloatToSDKFloat,
109
+ paths: [{ path: "results.item.progress.completionPercentage" }]
110
+ }
111
+ ])
112
+ };
113
+ return metadata;
114
+ }
115
+ return __bulkAddToProgram;
116
+ }
117
+ function bulkApproveParticipant(payload) {
118
+ function __bulkApproveParticipant({ host }) {
119
+ const metadata = {
120
+ entityFqdn: "wix.online_programs.v3.participant",
121
+ method: "POST",
122
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveParticipant",
123
+ packageName: PACKAGE_NAME,
124
+ migrationOptions: {
125
+ optInTransformResponse: true
1294
126
  },
1295
- ["filter", "options"]
1296
- );
1297
- sideEffects?.onError?.(err);
1298
- throw transformedError;
127
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
128
+ protoPath: "/v3/bulk/participants/approve",
129
+ data: payload,
130
+ host
131
+ }),
132
+ data: payload,
133
+ transformResponse: (payload2) => transformPaths(payload2, [
134
+ {
135
+ transformFn: transformRESTTimestampToSDKTimestamp,
136
+ paths: [
137
+ { path: "results.item.createdDate" },
138
+ { path: "results.item.updatedDate" },
139
+ { path: "results.item.lastActivityDate" },
140
+ { path: "results.item.certificate.issuedDate" }
141
+ ]
142
+ },
143
+ {
144
+ transformFn: transformRESTFloatToSDKFloat,
145
+ paths: [{ path: "results.item.progress.completionPercentage" }]
146
+ }
147
+ ])
148
+ };
149
+ return metadata;
1299
150
  }
151
+ return __bulkApproveParticipant;
1300
152
  }
1301
- async function searchParticipants2(search) {
1302
- const { httpClient, sideEffects } = arguments[1];
1303
- const payload = renameKeysFromSDKRequestToRESTRequest({ search });
1304
- const reqOpts = searchParticipants(payload);
1305
- sideEffects?.onSiteCall?.();
1306
- try {
1307
- const result = await httpClient.request(reqOpts);
1308
- sideEffects?.onSuccess?.(result);
1309
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1310
- } catch (err) {
1311
- const transformedError = sdkTransformError(
1312
- err,
1313
- {
1314
- spreadPathsToArguments: {},
1315
- explicitPathsToArguments: { search: "$[0]" },
1316
- singleArgumentUnchanged: false
153
+ function bulkApproveAllParticipant(payload) {
154
+ function __bulkApproveAllParticipant({ host }) {
155
+ const metadata = {
156
+ entityFqdn: "wix.online_programs.v3.participant",
157
+ method: "POST",
158
+ methodFqn: "wix.onlineprograms.participants.v3.ManageParticipantsService.BulkApproveAllParticipant",
159
+ packageName: PACKAGE_NAME,
160
+ migrationOptions: {
161
+ optInTransformResponse: true
1317
162
  },
1318
- ["search"]
1319
- );
1320
- sideEffects?.onError?.(err);
1321
- throw transformedError;
163
+ url: resolveWixOnlineprogramsParticipantsV3ManageParticipantsServiceUrl({
164
+ protoPath: "/v3/bulk/participants/approve-all",
165
+ data: payload,
166
+ host
167
+ }),
168
+ data: payload
169
+ };
170
+ return metadata;
1322
171
  }
172
+ return __bulkApproveAllParticipant;
1323
173
  }
174
+
175
+ // src/online-programs-v3-participant-participants.universal.ts
176
+ var JoinPath = /* @__PURE__ */ ((JoinPath2) => {
177
+ JoinPath2["UNKNOWN_JOIN_PATH"] = "UNKNOWN_JOIN_PATH";
178
+ JoinPath2["FREE"] = "FREE";
179
+ JoinPath2["ADDED"] = "ADDED";
180
+ JoinPath2["SINGLE_PAYMENT"] = "SINGLE_PAYMENT";
181
+ JoinPath2["PAID_PLAN"] = "PAID_PLAN";
182
+ JoinPath2["FREE_COUPON"] = "FREE_COUPON";
183
+ return JoinPath2;
184
+ })(JoinPath || {});
185
+ var State = /* @__PURE__ */ ((State2) => {
186
+ State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
187
+ State2["JOINED"] = "JOINED";
188
+ State2["COMPLETED"] = "COMPLETED";
189
+ State2["FAILED"] = "FAILED";
190
+ State2["SUSPENDED"] = "SUSPENDED";
191
+ State2["AUTO_REMOVED"] = "AUTO_REMOVED";
192
+ State2["REMOVED"] = "REMOVED";
193
+ State2["LEFT"] = "LEFT";
194
+ return State2;
195
+ })(State || {});
196
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
197
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
198
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
199
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
200
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
201
+ WebhookIdentityType2["APP"] = "APP";
202
+ return WebhookIdentityType2;
203
+ })(WebhookIdentityType || {});
1324
204
  async function bulkInviteToProgram2(programId, options) {
1325
205
  const { httpClient, sideEffects } = arguments[2];
1326
206
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1472,131 +352,8 @@ async function bulkApproveAllParticipant2(options) {
1472
352
  throw transformedError;
1473
353
  }
1474
354
  }
1475
- async function exportParticipantsStats2(programId) {
1476
- const { httpClient, sideEffects } = arguments[1];
1477
- const payload = renameKeysFromSDKRequestToRESTRequest({
1478
- programId
1479
- });
1480
- const reqOpts = exportParticipantsStats(payload);
1481
- sideEffects?.onSiteCall?.();
1482
- try {
1483
- const result = await httpClient.request(reqOpts);
1484
- sideEffects?.onSuccess?.(result);
1485
- } catch (err) {
1486
- const transformedError = sdkTransformError(
1487
- err,
1488
- {
1489
- spreadPathsToArguments: {},
1490
- explicitPathsToArguments: { programId: "$[0]" },
1491
- singleArgumentUnchanged: false
1492
- },
1493
- ["programId"]
1494
- );
1495
- sideEffects?.onError?.(err);
1496
- throw transformedError;
1497
- }
1498
- }
1499
355
 
1500
356
  // src/online-programs-v3-participant-participants.public.ts
1501
- function createParticipant3(httpClient) {
1502
- return (participant) => createParticipant2(
1503
- participant,
1504
- // @ts-ignore
1505
- { httpClient }
1506
- );
1507
- }
1508
- function bulkCreateParticipant3(httpClient) {
1509
- return (participants, options) => bulkCreateParticipant2(
1510
- participants,
1511
- options,
1512
- // @ts-ignore
1513
- { httpClient }
1514
- );
1515
- }
1516
- function bulkAddAllToProgram3(httpClient) {
1517
- return (programId, options) => bulkAddAllToProgram2(
1518
- programId,
1519
- options,
1520
- // @ts-ignore
1521
- { httpClient }
1522
- );
1523
- }
1524
- function deleteParticipant3(httpClient) {
1525
- return (participantId) => deleteParticipant2(
1526
- participantId,
1527
- // @ts-ignore
1528
- { httpClient }
1529
- );
1530
- }
1531
- function issueCertificate3(httpClient) {
1532
- return (participantId) => issueCertificate2(
1533
- participantId,
1534
- // @ts-ignore
1535
- { httpClient }
1536
- );
1537
- }
1538
- function getCompletionStats3(httpClient) {
1539
- return (programId) => getCompletionStats2(
1540
- programId,
1541
- // @ts-ignore
1542
- { httpClient }
1543
- );
1544
- }
1545
- function getPremiumStats3(httpClient) {
1546
- return () => getPremiumStats2(
1547
- // @ts-ignore
1548
- { httpClient }
1549
- );
1550
- }
1551
- function getParticipant3(httpClient) {
1552
- return (participantId) => getParticipant2(
1553
- participantId,
1554
- // @ts-ignore
1555
- { httpClient }
1556
- );
1557
- }
1558
- function queryParticipants3(httpClient) {
1559
- return () => queryParticipants2(
1560
- // @ts-ignore
1561
- { httpClient }
1562
- );
1563
- }
1564
- function typedQueryParticipants2(httpClient) {
1565
- return (query) => typedQueryParticipants(
1566
- query,
1567
- // @ts-ignore
1568
- { httpClient }
1569
- );
1570
- }
1571
- function getAccessStatus3(httpClient) {
1572
- return () => getAccessStatus2(
1573
- // @ts-ignore
1574
- { httpClient }
1575
- );
1576
- }
1577
- function bulkUpdateParticipantTags3(httpClient) {
1578
- return (participantIds, options) => bulkUpdateParticipantTags2(
1579
- participantIds,
1580
- options,
1581
- // @ts-ignore
1582
- { httpClient }
1583
- );
1584
- }
1585
- function bulkUpdateParticipantTagsByFilter3(httpClient) {
1586
- return (filter, options) => bulkUpdateParticipantTagsByFilter2(
1587
- filter,
1588
- options,
1589
- // @ts-ignore
1590
- { httpClient }
1591
- );
1592
- }
1593
- function searchParticipants3(httpClient) {
1594
- return (search) => searchParticipants2(
1595
- search,
1596
- // @ts-ignore
1597
- { httpClient }
1598
- );
1599
- }
1600
357
  function bulkInviteToProgram3(httpClient) {
1601
358
  return (programId, options) => bulkInviteToProgram2(
1602
359
  programId,
@@ -1636,18 +393,11 @@ function bulkApproveAllParticipant3(httpClient) {
1636
393
  { httpClient }
1637
394
  );
1638
395
  }
1639
- function exportParticipantsStats3(httpClient) {
1640
- return (programId) => exportParticipantsStats2(
1641
- programId,
1642
- // @ts-ignore
1643
- { httpClient }
1644
- );
1645
- }
1646
396
  var onParticipantAdded = EventDefinition(
1647
397
  "wix.online_programs.v3.participant_added",
1648
398
  true,
1649
399
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1650
- transformPaths3(event, [
400
+ transformPaths2(event, [
1651
401
  {
1652
402
  transformFn: transformRESTTimestampToSDKTimestamp2,
1653
403
  paths: [{ path: "metadata.eventTime" }]
@@ -1659,7 +409,7 @@ var onParticipantApproved = EventDefinition(
1659
409
  "wix.online_programs.v3.participant_participant_approved",
1660
410
  true,
1661
411
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1662
- transformPaths3(event, [
412
+ transformPaths2(event, [
1663
413
  {
1664
414
  transformFn: transformRESTTimestampToSDKTimestamp2,
1665
415
  paths: [{ path: "metadata.eventTime" }]
@@ -1671,7 +421,7 @@ var onParticipantInvited = EventDefinition(
1671
421
  "wix.online_programs.v3.participant_participant_invited",
1672
422
  true,
1673
423
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1674
- transformPaths3(event, [
424
+ transformPaths2(event, [
1675
425
  {
1676
426
  transformFn: transformRESTTimestampToSDKTimestamp2,
1677
427
  paths: [{ path: "metadata.eventTime" }]
@@ -1683,37 +433,11 @@ var onParticipantInvited = EventDefinition(
1683
433
  // src/online-programs-v3-participant-participants.context.ts
1684
434
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1685
435
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1686
- import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
1687
- function customQueryParticipants(httpClient) {
1688
- const router = createQueryOverloadRouter({
1689
- builderQueryFunction: () => queryParticipants3(httpClient)(),
1690
- typedQueryFunction: (query) => typedQueryParticipants2(httpClient)(query),
1691
- hasOptionsParameter: false
1692
- });
1693
- function overloadedQuery(query) {
1694
- return router(...arguments);
1695
- }
1696
- return overloadedQuery;
1697
- }
1698
- var createParticipant4 = /* @__PURE__ */ createRESTModule(createParticipant3);
1699
- var bulkCreateParticipant4 = /* @__PURE__ */ createRESTModule(bulkCreateParticipant3);
1700
- var bulkAddAllToProgram4 = /* @__PURE__ */ createRESTModule(bulkAddAllToProgram3);
1701
- var deleteParticipant4 = /* @__PURE__ */ createRESTModule(deleteParticipant3);
1702
- var issueCertificate4 = /* @__PURE__ */ createRESTModule(issueCertificate3);
1703
- var getCompletionStats4 = /* @__PURE__ */ createRESTModule(getCompletionStats3);
1704
- var getPremiumStats4 = /* @__PURE__ */ createRESTModule(getPremiumStats3);
1705
- var getParticipant4 = /* @__PURE__ */ createRESTModule(getParticipant3);
1706
- var getAccessStatus4 = /* @__PURE__ */ createRESTModule(getAccessStatus3);
1707
- var bulkUpdateParticipantTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateParticipantTags3);
1708
- var bulkUpdateParticipantTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateParticipantTagsByFilter3);
1709
- var searchParticipants4 = /* @__PURE__ */ createRESTModule(searchParticipants3);
1710
436
  var bulkInviteToProgram4 = /* @__PURE__ */ createRESTModule(bulkInviteToProgram3);
1711
437
  var bulkInviteAllToProgram4 = /* @__PURE__ */ createRESTModule(bulkInviteAllToProgram3);
1712
438
  var bulkAddToProgram4 = /* @__PURE__ */ createRESTModule(bulkAddToProgram3);
1713
439
  var bulkApproveParticipant4 = /* @__PURE__ */ createRESTModule(bulkApproveParticipant3);
1714
440
  var bulkApproveAllParticipant4 = /* @__PURE__ */ createRESTModule(bulkApproveAllParticipant3);
1715
- var exportParticipantsStats4 = /* @__PURE__ */ createRESTModule(exportParticipantsStats3);
1716
- var queryParticipants4 = /* @__PURE__ */ createRESTModule(customQueryParticipants);
1717
441
  var onParticipantAdded2 = createEventModule(onParticipantAdded);
1718
442
  var onParticipantApproved2 = createEventModule(
1719
443
  onParticipantApproved
@@ -1722,42 +446,16 @@ var onParticipantInvited2 = createEventModule(
1722
446
  onParticipantInvited
1723
447
  );
1724
448
  export {
1725
- AggregationType,
1726
- BenefitType,
1727
- Event,
1728
- Interval,
1729
449
  JoinPath,
1730
- MissingValues,
1731
- Mode,
1732
- NestedAggregationType,
1733
- ScalarType,
1734
- SortDirection,
1735
- SortOrder,
1736
- SortType,
1737
450
  State,
1738
- Status,
1739
451
  WebhookIdentityType,
1740
- bulkAddAllToProgram4 as bulkAddAllToProgram,
1741
452
  bulkAddToProgram4 as bulkAddToProgram,
1742
453
  bulkApproveAllParticipant4 as bulkApproveAllParticipant,
1743
454
  bulkApproveParticipant4 as bulkApproveParticipant,
1744
- bulkCreateParticipant4 as bulkCreateParticipant,
1745
455
  bulkInviteAllToProgram4 as bulkInviteAllToProgram,
1746
456
  bulkInviteToProgram4 as bulkInviteToProgram,
1747
- bulkUpdateParticipantTags4 as bulkUpdateParticipantTags,
1748
- bulkUpdateParticipantTagsByFilter4 as bulkUpdateParticipantTagsByFilter,
1749
- createParticipant4 as createParticipant,
1750
- deleteParticipant4 as deleteParticipant,
1751
- exportParticipantsStats4 as exportParticipantsStats,
1752
- getAccessStatus4 as getAccessStatus,
1753
- getCompletionStats4 as getCompletionStats,
1754
- getParticipant4 as getParticipant,
1755
- getPremiumStats4 as getPremiumStats,
1756
- issueCertificate4 as issueCertificate,
1757
457
  onParticipantAdded2 as onParticipantAdded,
1758
458
  onParticipantApproved2 as onParticipantApproved,
1759
- onParticipantInvited2 as onParticipantInvited,
1760
- queryParticipants4 as queryParticipants,
1761
- searchParticipants4 as searchParticipants
459
+ onParticipantInvited2 as onParticipantInvited
1762
460
  };
1763
461
  //# sourceMappingURL=index.mjs.map