@wix/auto_sdk_online-programs_participants 1.0.13 → 1.0.15

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