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