@wix/auto_sdk_online-programs_programs 1.0.30 → 1.0.31

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.
@@ -1,1935 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- AccessType: () => AccessType,
24
- AggregationType: () => AggregationType,
25
- BulkActionType: () => BulkActionType,
26
- DayOfWeek: () => DayOfWeek,
27
- DeleteStatus: () => DeleteStatus,
28
- Enum: () => Enum,
29
- Interval: () => Interval,
30
- MissingValues: () => MissingValues,
31
- Mode: () => Mode,
32
- Namespace: () => Namespace,
33
- NestedAggregationType: () => NestedAggregationType,
34
- PlacementType: () => PlacementType,
35
- ResolutionMethod: () => ResolutionMethod,
36
- ScalarType: () => ScalarType,
37
- SearchIndexingNotificationState: () => SearchIndexingNotificationState,
38
- SiteCreatedContext: () => SiteCreatedContext,
39
- SortDirection: () => SortDirection,
40
- SortOrder: () => SortOrder,
41
- SortType: () => SortType,
42
- State: () => State,
43
- Status: () => Status,
44
- Trigger: () => Trigger,
45
- WebhookIdentityType: () => WebhookIdentityType,
46
- archiveProgram: () => archiveProgram4,
47
- bulkUpdatePrograms: () => bulkUpdatePrograms4,
48
- countPrograms: () => countPrograms4,
49
- createProgram: () => createProgram4,
50
- deleteProgram: () => deleteProgram4,
51
- duplicateProgram: () => duplicateProgram4,
52
- endProgram: () => endProgram4,
53
- getProgram: () => getProgram4,
54
- listSamplePrograms: () => listSamplePrograms4,
55
- publishProgram: () => publishProgram4,
56
- queryPrograms: () => queryPrograms4,
57
- searchPrograms: () => searchPrograms4,
58
- updateProgram: () => updateProgram4,
59
- utils: () => utils
60
- });
61
- module.exports = __toCommonJS(index_exports);
62
-
63
- // src/online-programs-v3-program-programs.universal.ts
64
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
65
- var import_query_builder = require("@wix/sdk-runtime/query-builder");
66
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
67
-
68
- // src/online-programs-v3-program-programs.http.ts
69
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
70
- var import_float = require("@wix/sdk-runtime/transformations/float");
71
- var import_float2 = require("@wix/sdk-runtime/transformations/float");
72
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
73
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
74
- var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
75
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
76
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
77
- function resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl(opts) {
78
- const domainToMappings = {
79
- "manage._base_domain_": [
80
- {
81
- srcPath: "/_api/programs-service",
82
- destPath: ""
83
- }
84
- ],
85
- _: [
86
- {
87
- srcPath: "/_api/programs-service",
88
- destPath: ""
89
- }
90
- ],
91
- "editor.wixapps.net": [
92
- {
93
- srcPath: "/_api/programs-service",
94
- destPath: ""
95
- }
96
- ],
97
- "www.wixapis.com": [
98
- {
99
- srcPath: "/_api/programs-service",
100
- destPath: ""
101
- },
102
- {
103
- srcPath: "/online-programs/v3/programs",
104
- destPath: "/v3/programs"
105
- },
106
- {
107
- srcPath: "/online-programs/v3/bulk/programs",
108
- destPath: "/v3/bulk/programs"
109
- }
110
- ],
111
- "*.dev.wix-code.com": [
112
- {
113
- srcPath: "/online-programs/v3/programs",
114
- destPath: "/v3/programs"
115
- },
116
- {
117
- srcPath: "/online-programs/v3/bulk/programs",
118
- destPath: "/v3/bulk/programs"
119
- }
120
- ]
121
- };
122
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
123
- }
124
- var PACKAGE_NAME = "@wix/auto_sdk_online-programs_programs";
125
- function createProgram(payload) {
126
- function __createProgram({ host }) {
127
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
128
- {
129
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
130
- paths: [
131
- { path: "program.createdDate" },
132
- { path: "program.updatedDate" },
133
- { path: "program.statusUpdatedDate" },
134
- { path: "program.description.image.urlExpirationDate" },
135
- { path: "program.description.video.urlExpirationDate" },
136
- { path: "program.description.video.resolutions.urlExpirationDate" },
137
- {
138
- path: "program.description.video.resolutions.poster.urlExpirationDate"
139
- },
140
- { path: "program.description.video.posters.urlExpirationDate" },
141
- { path: "program.rewards.certificate.connectedDate" }
142
- ]
143
- },
144
- {
145
- transformFn: import_float.transformSDKFloatToRESTFloat,
146
- paths: [
147
- { path: "program.description.image.focalPoint.x" },
148
- { path: "program.description.image.focalPoint.y" },
149
- { path: "program.description.video.resolutions.poster.focalPoint.x" },
150
- { path: "program.description.video.resolutions.poster.focalPoint.y" },
151
- { path: "program.description.video.posters.focalPoint.x" },
152
- { path: "program.description.video.posters.focalPoint.y" },
153
- { path: "program.videoStepsSettings.requiredCompletionPercentage" }
154
- ]
155
- }
156
- ]);
157
- const metadata = {
158
- entityFqdn: "wix.online_programs.v3.program",
159
- method: "POST",
160
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.CreateProgram",
161
- packageName: PACKAGE_NAME,
162
- migrationOptions: {
163
- optInTransformResponse: true
164
- },
165
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
166
- protoPath: "/v3/programs",
167
- data: serializedData,
168
- host
169
- }),
170
- data: serializedData,
171
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
172
- {
173
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
174
- paths: [
175
- { path: "program.createdDate" },
176
- { path: "program.updatedDate" },
177
- { path: "program.statusUpdatedDate" },
178
- { path: "program.description.image.urlExpirationDate" },
179
- { path: "program.description.video.urlExpirationDate" },
180
- {
181
- path: "program.description.video.resolutions.urlExpirationDate"
182
- },
183
- {
184
- path: "program.description.video.resolutions.poster.urlExpirationDate"
185
- },
186
- { path: "program.description.video.posters.urlExpirationDate" },
187
- { path: "program.rewards.certificate.connectedDate" }
188
- ]
189
- },
190
- {
191
- transformFn: import_float2.transformRESTFloatToSDKFloat,
192
- paths: [
193
- { path: "program.description.image.focalPoint.x" },
194
- { path: "program.description.image.focalPoint.y" },
195
- {
196
- path: "program.description.video.resolutions.poster.focalPoint.x"
197
- },
198
- {
199
- path: "program.description.video.resolutions.poster.focalPoint.y"
200
- },
201
- { path: "program.description.video.posters.focalPoint.x" },
202
- { path: "program.description.video.posters.focalPoint.y" },
203
- {
204
- path: "program.videoStepsSettings.requiredCompletionPercentage"
205
- }
206
- ]
207
- }
208
- ])
209
- };
210
- return metadata;
211
- }
212
- return __createProgram;
213
- }
214
- function duplicateProgram(payload) {
215
- function __duplicateProgram({ host }) {
216
- const metadata = {
217
- entityFqdn: "wix.online_programs.v3.program",
218
- method: "POST",
219
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.DuplicateProgram",
220
- packageName: PACKAGE_NAME,
221
- migrationOptions: {
222
- optInTransformResponse: true
223
- },
224
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
225
- protoPath: "/v3/programs/{programId}/duplicate",
226
- data: payload,
227
- host
228
- }),
229
- data: payload,
230
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
231
- {
232
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
233
- paths: [
234
- { path: "program.createdDate" },
235
- { path: "program.updatedDate" },
236
- { path: "program.statusUpdatedDate" },
237
- { path: "program.description.image.urlExpirationDate" },
238
- { path: "program.description.video.urlExpirationDate" },
239
- {
240
- path: "program.description.video.resolutions.urlExpirationDate"
241
- },
242
- {
243
- path: "program.description.video.resolutions.poster.urlExpirationDate"
244
- },
245
- { path: "program.description.video.posters.urlExpirationDate" },
246
- { path: "program.rewards.certificate.connectedDate" }
247
- ]
248
- },
249
- {
250
- transformFn: import_float2.transformRESTFloatToSDKFloat,
251
- paths: [
252
- { path: "program.description.image.focalPoint.x" },
253
- { path: "program.description.image.focalPoint.y" },
254
- {
255
- path: "program.description.video.resolutions.poster.focalPoint.x"
256
- },
257
- {
258
- path: "program.description.video.resolutions.poster.focalPoint.y"
259
- },
260
- { path: "program.description.video.posters.focalPoint.x" },
261
- { path: "program.description.video.posters.focalPoint.y" },
262
- {
263
- path: "program.videoStepsSettings.requiredCompletionPercentage"
264
- }
265
- ]
266
- }
267
- ])
268
- };
269
- return metadata;
270
- }
271
- return __duplicateProgram;
272
- }
273
- function getProgram(payload) {
274
- function __getProgram({ host }) {
275
- const metadata = {
276
- entityFqdn: "wix.online_programs.v3.program",
277
- method: "GET",
278
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.GetProgram",
279
- packageName: PACKAGE_NAME,
280
- migrationOptions: {
281
- optInTransformResponse: true
282
- },
283
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
284
- protoPath: "/v3/programs/{programId}",
285
- data: payload,
286
- host
287
- }),
288
- params: (0, import_rest_modules.toURLSearchParams)(payload),
289
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
290
- {
291
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
292
- paths: [
293
- { path: "program.createdDate" },
294
- { path: "program.updatedDate" },
295
- { path: "program.statusUpdatedDate" },
296
- { path: "program.description.image.urlExpirationDate" },
297
- { path: "program.description.video.urlExpirationDate" },
298
- {
299
- path: "program.description.video.resolutions.urlExpirationDate"
300
- },
301
- {
302
- path: "program.description.video.resolutions.poster.urlExpirationDate"
303
- },
304
- { path: "program.description.video.posters.urlExpirationDate" },
305
- { path: "program.rewards.certificate.connectedDate" }
306
- ]
307
- },
308
- {
309
- transformFn: import_float2.transformRESTFloatToSDKFloat,
310
- paths: [
311
- { path: "program.description.image.focalPoint.x" },
312
- { path: "program.description.image.focalPoint.y" },
313
- {
314
- path: "program.description.video.resolutions.poster.focalPoint.x"
315
- },
316
- {
317
- path: "program.description.video.resolutions.poster.focalPoint.y"
318
- },
319
- { path: "program.description.video.posters.focalPoint.x" },
320
- { path: "program.description.video.posters.focalPoint.y" },
321
- {
322
- path: "program.videoStepsSettings.requiredCompletionPercentage"
323
- }
324
- ]
325
- }
326
- ])
327
- };
328
- return metadata;
329
- }
330
- return __getProgram;
331
- }
332
- function updateProgram(payload) {
333
- function __updateProgram({ host }) {
334
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
335
- {
336
- transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
337
- paths: [{ path: "fieldMask" }]
338
- },
339
- {
340
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
341
- paths: [
342
- { path: "program.createdDate" },
343
- { path: "program.updatedDate" },
344
- { path: "program.statusUpdatedDate" },
345
- { path: "program.description.image.urlExpirationDate" },
346
- { path: "program.description.video.urlExpirationDate" },
347
- { path: "program.description.video.resolutions.urlExpirationDate" },
348
- {
349
- path: "program.description.video.resolutions.poster.urlExpirationDate"
350
- },
351
- { path: "program.description.video.posters.urlExpirationDate" },
352
- { path: "program.rewards.certificate.connectedDate" }
353
- ]
354
- },
355
- {
356
- transformFn: import_float.transformSDKFloatToRESTFloat,
357
- paths: [
358
- { path: "program.description.image.focalPoint.x" },
359
- { path: "program.description.image.focalPoint.y" },
360
- { path: "program.description.video.resolutions.poster.focalPoint.x" },
361
- { path: "program.description.video.resolutions.poster.focalPoint.y" },
362
- { path: "program.description.video.posters.focalPoint.x" },
363
- { path: "program.description.video.posters.focalPoint.y" },
364
- { path: "program.videoStepsSettings.requiredCompletionPercentage" }
365
- ]
366
- }
367
- ]);
368
- const metadata = {
369
- entityFqdn: "wix.online_programs.v3.program",
370
- method: "PATCH",
371
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.UpdateProgram",
372
- packageName: PACKAGE_NAME,
373
- migrationOptions: {
374
- optInTransformResponse: true
375
- },
376
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
377
- protoPath: "/v3/programs/{program.id}",
378
- data: serializedData,
379
- host
380
- }),
381
- data: serializedData,
382
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
383
- {
384
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
385
- paths: [
386
- { path: "program.createdDate" },
387
- { path: "program.updatedDate" },
388
- { path: "program.statusUpdatedDate" },
389
- { path: "program.description.image.urlExpirationDate" },
390
- { path: "program.description.video.urlExpirationDate" },
391
- {
392
- path: "program.description.video.resolutions.urlExpirationDate"
393
- },
394
- {
395
- path: "program.description.video.resolutions.poster.urlExpirationDate"
396
- },
397
- { path: "program.description.video.posters.urlExpirationDate" },
398
- { path: "program.rewards.certificate.connectedDate" }
399
- ]
400
- },
401
- {
402
- transformFn: import_float2.transformRESTFloatToSDKFloat,
403
- paths: [
404
- { path: "program.description.image.focalPoint.x" },
405
- { path: "program.description.image.focalPoint.y" },
406
- {
407
- path: "program.description.video.resolutions.poster.focalPoint.x"
408
- },
409
- {
410
- path: "program.description.video.resolutions.poster.focalPoint.y"
411
- },
412
- { path: "program.description.video.posters.focalPoint.x" },
413
- { path: "program.description.video.posters.focalPoint.y" },
414
- {
415
- path: "program.videoStepsSettings.requiredCompletionPercentage"
416
- }
417
- ]
418
- }
419
- ])
420
- };
421
- return metadata;
422
- }
423
- return __updateProgram;
424
- }
425
- function deleteProgram(payload) {
426
- function __deleteProgram({ host }) {
427
- const metadata = {
428
- entityFqdn: "wix.online_programs.v3.program",
429
- method: "DELETE",
430
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.DeleteProgram",
431
- packageName: PACKAGE_NAME,
432
- migrationOptions: {
433
- optInTransformResponse: true
434
- },
435
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
436
- protoPath: "/v3/programs/{programId}",
437
- data: payload,
438
- host
439
- }),
440
- params: (0, import_rest_modules.toURLSearchParams)(payload)
441
- };
442
- return metadata;
443
- }
444
- return __deleteProgram;
445
- }
446
- function queryPrograms(payload) {
447
- function __queryPrograms({ host }) {
448
- const metadata = {
449
- entityFqdn: "wix.online_programs.v3.program",
450
- method: "POST",
451
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.QueryPrograms",
452
- packageName: PACKAGE_NAME,
453
- migrationOptions: {
454
- optInTransformResponse: true
455
- },
456
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
457
- protoPath: "/v3/programs/query",
458
- data: payload,
459
- host
460
- }),
461
- data: payload,
462
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
463
- {
464
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
465
- paths: [
466
- { path: "programs.createdDate" },
467
- { path: "programs.updatedDate" },
468
- { path: "programs.statusUpdatedDate" },
469
- { path: "programs.description.image.urlExpirationDate" },
470
- { path: "programs.description.video.urlExpirationDate" },
471
- {
472
- path: "programs.description.video.resolutions.urlExpirationDate"
473
- },
474
- {
475
- path: "programs.description.video.resolutions.poster.urlExpirationDate"
476
- },
477
- { path: "programs.description.video.posters.urlExpirationDate" },
478
- { path: "programs.rewards.certificate.connectedDate" }
479
- ]
480
- },
481
- {
482
- transformFn: import_float2.transformRESTFloatToSDKFloat,
483
- paths: [
484
- { path: "programs.description.image.focalPoint.x" },
485
- { path: "programs.description.image.focalPoint.y" },
486
- {
487
- path: "programs.description.video.resolutions.poster.focalPoint.x"
488
- },
489
- {
490
- path: "programs.description.video.resolutions.poster.focalPoint.y"
491
- },
492
- { path: "programs.description.video.posters.focalPoint.x" },
493
- { path: "programs.description.video.posters.focalPoint.y" },
494
- {
495
- path: "programs.videoStepsSettings.requiredCompletionPercentage"
496
- }
497
- ]
498
- }
499
- ])
500
- };
501
- return metadata;
502
- }
503
- return __queryPrograms;
504
- }
505
- function searchPrograms(payload) {
506
- function __searchPrograms({ host }) {
507
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
508
- {
509
- transformFn: import_float.transformSDKFloatToRESTFloat,
510
- paths: [
511
- { path: "search.aggregations.range.buckets.from" },
512
- { path: "search.aggregations.range.buckets.to" },
513
- {
514
- path: "search.aggregations.nested.nestedAggregations.range.buckets.from"
515
- },
516
- {
517
- path: "search.aggregations.nested.nestedAggregations.range.buckets.to"
518
- }
519
- ]
520
- }
521
- ]);
522
- const metadata = {
523
- entityFqdn: "wix.online_programs.v3.program",
524
- method: "POST",
525
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.SearchPrograms",
526
- packageName: PACKAGE_NAME,
527
- migrationOptions: {
528
- optInTransformResponse: true
529
- },
530
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
531
- protoPath: "/v3/programs/search",
532
- data: serializedData,
533
- host
534
- }),
535
- data: serializedData,
536
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
537
- {
538
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
539
- paths: [
540
- { path: "programs.createdDate" },
541
- { path: "programs.updatedDate" },
542
- { path: "programs.statusUpdatedDate" },
543
- { path: "programs.description.image.urlExpirationDate" },
544
- { path: "programs.description.video.urlExpirationDate" },
545
- {
546
- path: "programs.description.video.resolutions.urlExpirationDate"
547
- },
548
- {
549
- path: "programs.description.video.resolutions.poster.urlExpirationDate"
550
- },
551
- { path: "programs.description.video.posters.urlExpirationDate" },
552
- { path: "programs.rewards.certificate.connectedDate" }
553
- ]
554
- },
555
- {
556
- transformFn: import_float2.transformRESTFloatToSDKFloat,
557
- paths: [
558
- { path: "programs.description.image.focalPoint.x" },
559
- { path: "programs.description.image.focalPoint.y" },
560
- {
561
- path: "programs.description.video.resolutions.poster.focalPoint.x"
562
- },
563
- {
564
- path: "programs.description.video.resolutions.poster.focalPoint.y"
565
- },
566
- { path: "programs.description.video.posters.focalPoint.x" },
567
- { path: "programs.description.video.posters.focalPoint.y" },
568
- {
569
- path: "programs.videoStepsSettings.requiredCompletionPercentage"
570
- },
571
- { path: "aggregationData.results.scalar.value" },
572
- {
573
- path: "aggregationData.results.groupedByValue.results.nestedResults.scalar.value"
574
- },
575
- {
576
- path: "aggregationData.results.nested.results.results.*.scalar.value"
577
- },
578
- { path: "aggregationData.results.ranges.results.from" },
579
- { path: "aggregationData.results.ranges.results.to" },
580
- {
581
- path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from"
582
- },
583
- {
584
- path: "aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to"
585
- },
586
- {
587
- path: "aggregationData.results.nested.results.results.*.range.from"
588
- },
589
- {
590
- path: "aggregationData.results.nested.results.results.*.range.to"
591
- }
592
- ]
593
- }
594
- ])
595
- };
596
- return metadata;
597
- }
598
- return __searchPrograms;
599
- }
600
- function publishProgram(payload) {
601
- function __publishProgram({ host }) {
602
- const metadata = {
603
- entityFqdn: "wix.online_programs.v3.program",
604
- method: "POST",
605
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.PublishProgram",
606
- packageName: PACKAGE_NAME,
607
- migrationOptions: {
608
- optInTransformResponse: true
609
- },
610
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
611
- protoPath: "/v3/programs/{programId}/publish",
612
- data: payload,
613
- host
614
- }),
615
- data: payload,
616
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
617
- {
618
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
619
- paths: [
620
- { path: "program.createdDate" },
621
- { path: "program.updatedDate" },
622
- { path: "program.statusUpdatedDate" },
623
- { path: "program.description.image.urlExpirationDate" },
624
- { path: "program.description.video.urlExpirationDate" },
625
- {
626
- path: "program.description.video.resolutions.urlExpirationDate"
627
- },
628
- {
629
- path: "program.description.video.resolutions.poster.urlExpirationDate"
630
- },
631
- { path: "program.description.video.posters.urlExpirationDate" },
632
- { path: "program.rewards.certificate.connectedDate" }
633
- ]
634
- },
635
- {
636
- transformFn: import_float2.transformRESTFloatToSDKFloat,
637
- paths: [
638
- { path: "program.description.image.focalPoint.x" },
639
- { path: "program.description.image.focalPoint.y" },
640
- {
641
- path: "program.description.video.resolutions.poster.focalPoint.x"
642
- },
643
- {
644
- path: "program.description.video.resolutions.poster.focalPoint.y"
645
- },
646
- { path: "program.description.video.posters.focalPoint.x" },
647
- { path: "program.description.video.posters.focalPoint.y" },
648
- {
649
- path: "program.videoStepsSettings.requiredCompletionPercentage"
650
- }
651
- ]
652
- }
653
- ])
654
- };
655
- return metadata;
656
- }
657
- return __publishProgram;
658
- }
659
- function endProgram(payload) {
660
- function __endProgram({ host }) {
661
- const metadata = {
662
- entityFqdn: "wix.online_programs.v3.program",
663
- method: "POST",
664
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.EndProgram",
665
- packageName: PACKAGE_NAME,
666
- migrationOptions: {
667
- optInTransformResponse: true
668
- },
669
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
670
- protoPath: "/v3/programs/{programId}/end",
671
- data: payload,
672
- host
673
- }),
674
- data: payload,
675
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
676
- {
677
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
678
- paths: [
679
- { path: "program.createdDate" },
680
- { path: "program.updatedDate" },
681
- { path: "program.statusUpdatedDate" },
682
- { path: "program.description.image.urlExpirationDate" },
683
- { path: "program.description.video.urlExpirationDate" },
684
- {
685
- path: "program.description.video.resolutions.urlExpirationDate"
686
- },
687
- {
688
- path: "program.description.video.resolutions.poster.urlExpirationDate"
689
- },
690
- { path: "program.description.video.posters.urlExpirationDate" },
691
- { path: "program.rewards.certificate.connectedDate" }
692
- ]
693
- },
694
- {
695
- transformFn: import_float2.transformRESTFloatToSDKFloat,
696
- paths: [
697
- { path: "program.description.image.focalPoint.x" },
698
- { path: "program.description.image.focalPoint.y" },
699
- {
700
- path: "program.description.video.resolutions.poster.focalPoint.x"
701
- },
702
- {
703
- path: "program.description.video.resolutions.poster.focalPoint.y"
704
- },
705
- { path: "program.description.video.posters.focalPoint.x" },
706
- { path: "program.description.video.posters.focalPoint.y" },
707
- {
708
- path: "program.videoStepsSettings.requiredCompletionPercentage"
709
- }
710
- ]
711
- }
712
- ])
713
- };
714
- return metadata;
715
- }
716
- return __endProgram;
717
- }
718
- function archiveProgram(payload) {
719
- function __archiveProgram({ host }) {
720
- const metadata = {
721
- entityFqdn: "wix.online_programs.v3.program",
722
- method: "POST",
723
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.ArchiveProgram",
724
- packageName: PACKAGE_NAME,
725
- migrationOptions: {
726
- optInTransformResponse: true
727
- },
728
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
729
- protoPath: "/v3/programs/{programId}/archive",
730
- data: payload,
731
- host
732
- }),
733
- data: payload,
734
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
735
- {
736
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
737
- paths: [
738
- { path: "program.createdDate" },
739
- { path: "program.updatedDate" },
740
- { path: "program.statusUpdatedDate" },
741
- { path: "program.description.image.urlExpirationDate" },
742
- { path: "program.description.video.urlExpirationDate" },
743
- {
744
- path: "program.description.video.resolutions.urlExpirationDate"
745
- },
746
- {
747
- path: "program.description.video.resolutions.poster.urlExpirationDate"
748
- },
749
- { path: "program.description.video.posters.urlExpirationDate" },
750
- { path: "program.rewards.certificate.connectedDate" }
751
- ]
752
- },
753
- {
754
- transformFn: import_float2.transformRESTFloatToSDKFloat,
755
- paths: [
756
- { path: "program.description.image.focalPoint.x" },
757
- { path: "program.description.image.focalPoint.y" },
758
- {
759
- path: "program.description.video.resolutions.poster.focalPoint.x"
760
- },
761
- {
762
- path: "program.description.video.resolutions.poster.focalPoint.y"
763
- },
764
- { path: "program.description.video.posters.focalPoint.x" },
765
- { path: "program.description.video.posters.focalPoint.y" },
766
- {
767
- path: "program.videoStepsSettings.requiredCompletionPercentage"
768
- }
769
- ]
770
- }
771
- ])
772
- };
773
- return metadata;
774
- }
775
- return __archiveProgram;
776
- }
777
- function bulkUpdatePrograms(payload) {
778
- function __bulkUpdatePrograms({ host }) {
779
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
780
- {
781
- transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
782
- paths: [{ path: "programs.fieldMask" }]
783
- },
784
- {
785
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
786
- paths: [
787
- { path: "programs.program.createdDate" },
788
- { path: "programs.program.updatedDate" },
789
- { path: "programs.program.statusUpdatedDate" },
790
- { path: "programs.program.description.image.urlExpirationDate" },
791
- { path: "programs.program.description.video.urlExpirationDate" },
792
- {
793
- path: "programs.program.description.video.resolutions.urlExpirationDate"
794
- },
795
- {
796
- path: "programs.program.description.video.resolutions.poster.urlExpirationDate"
797
- },
798
- {
799
- path: "programs.program.description.video.posters.urlExpirationDate"
800
- },
801
- { path: "programs.program.rewards.certificate.connectedDate" }
802
- ]
803
- },
804
- {
805
- transformFn: import_float.transformSDKFloatToRESTFloat,
806
- paths: [
807
- { path: "programs.program.description.image.focalPoint.x" },
808
- { path: "programs.program.description.image.focalPoint.y" },
809
- {
810
- path: "programs.program.description.video.resolutions.poster.focalPoint.x"
811
- },
812
- {
813
- path: "programs.program.description.video.resolutions.poster.focalPoint.y"
814
- },
815
- { path: "programs.program.description.video.posters.focalPoint.x" },
816
- { path: "programs.program.description.video.posters.focalPoint.y" },
817
- {
818
- path: "programs.program.videoStepsSettings.requiredCompletionPercentage"
819
- }
820
- ]
821
- }
822
- ]);
823
- const metadata = {
824
- entityFqdn: "wix.online_programs.v3.program",
825
- method: "POST",
826
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.BulkUpdatePrograms",
827
- packageName: PACKAGE_NAME,
828
- migrationOptions: {
829
- optInTransformResponse: true
830
- },
831
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
832
- protoPath: "/v3/bulk/programs/update",
833
- data: serializedData,
834
- host
835
- }),
836
- data: serializedData,
837
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
838
- {
839
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
840
- paths: [
841
- { path: "results.item.createdDate" },
842
- { path: "results.item.updatedDate" },
843
- { path: "results.item.statusUpdatedDate" },
844
- { path: "results.item.description.image.urlExpirationDate" },
845
- { path: "results.item.description.video.urlExpirationDate" },
846
- {
847
- path: "results.item.description.video.resolutions.urlExpirationDate"
848
- },
849
- {
850
- path: "results.item.description.video.resolutions.poster.urlExpirationDate"
851
- },
852
- {
853
- path: "results.item.description.video.posters.urlExpirationDate"
854
- },
855
- { path: "results.item.rewards.certificate.connectedDate" }
856
- ]
857
- },
858
- {
859
- transformFn: import_float2.transformRESTFloatToSDKFloat,
860
- paths: [
861
- { path: "results.item.description.image.focalPoint.x" },
862
- { path: "results.item.description.image.focalPoint.y" },
863
- {
864
- path: "results.item.description.video.resolutions.poster.focalPoint.x"
865
- },
866
- {
867
- path: "results.item.description.video.resolutions.poster.focalPoint.y"
868
- },
869
- { path: "results.item.description.video.posters.focalPoint.x" },
870
- { path: "results.item.description.video.posters.focalPoint.y" },
871
- {
872
- path: "results.item.videoStepsSettings.requiredCompletionPercentage"
873
- }
874
- ]
875
- }
876
- ])
877
- };
878
- return metadata;
879
- }
880
- return __bulkUpdatePrograms;
881
- }
882
- function countPrograms(payload) {
883
- function __countPrograms({ host }) {
884
- const metadata = {
885
- entityFqdn: "wix.online_programs.v3.program",
886
- method: "POST",
887
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.CountPrograms",
888
- packageName: PACKAGE_NAME,
889
- migrationOptions: {
890
- optInTransformResponse: true
891
- },
892
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
893
- protoPath: "/v3/programs/count",
894
- data: payload,
895
- host
896
- }),
897
- data: payload
898
- };
899
- return metadata;
900
- }
901
- return __countPrograms;
902
- }
903
- function listSamplePrograms(payload) {
904
- function __listSamplePrograms({ host }) {
905
- const metadata = {
906
- entityFqdn: "wix.online_programs.v3.program",
907
- method: "GET",
908
- methodFqn: "wix.onlineprograms.programs.v3.ProgramsService.ListSamplePrograms",
909
- packageName: PACKAGE_NAME,
910
- migrationOptions: {
911
- optInTransformResponse: true
912
- },
913
- url: resolveWixOnlineprogramsProgramsV3ProgramsServiceUrl({
914
- protoPath: "/v3/programs/samples",
915
- data: payload,
916
- host
917
- }),
918
- params: (0, import_rest_modules.toURLSearchParams)(payload),
919
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
920
- {
921
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
922
- paths: [
923
- { path: "programs.program.createdDate" },
924
- { path: "programs.program.updatedDate" },
925
- { path: "programs.program.statusUpdatedDate" },
926
- { path: "programs.program.description.image.urlExpirationDate" },
927
- { path: "programs.program.description.video.urlExpirationDate" },
928
- {
929
- path: "programs.program.description.video.resolutions.urlExpirationDate"
930
- },
931
- {
932
- path: "programs.program.description.video.resolutions.poster.urlExpirationDate"
933
- },
934
- {
935
- path: "programs.program.description.video.posters.urlExpirationDate"
936
- },
937
- { path: "programs.program.rewards.certificate.connectedDate" }
938
- ]
939
- },
940
- {
941
- transformFn: import_float2.transformRESTFloatToSDKFloat,
942
- paths: [
943
- { path: "programs.program.description.image.focalPoint.x" },
944
- { path: "programs.program.description.image.focalPoint.y" },
945
- {
946
- path: "programs.program.description.video.resolutions.poster.focalPoint.x"
947
- },
948
- {
949
- path: "programs.program.description.video.resolutions.poster.focalPoint.y"
950
- },
951
- {
952
- path: "programs.program.description.video.posters.focalPoint.x"
953
- },
954
- {
955
- path: "programs.program.description.video.posters.focalPoint.y"
956
- },
957
- {
958
- path: "programs.program.videoStepsSettings.requiredCompletionPercentage"
959
- }
960
- ]
961
- }
962
- ])
963
- };
964
- return metadata;
965
- }
966
- return __listSamplePrograms;
967
- }
968
-
969
- // src/online-programs-v3-program-programs.universal.ts
970
- var import_image = require("@wix/sdk-runtime/transformations/image");
971
- var import_image2 = require("@wix/sdk-runtime/transformations/image");
972
- var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
973
- var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
974
- var import_page_url = require("@wix/sdk-runtime/transformations/page-url");
975
- var import_page_url2 = require("@wix/sdk-runtime/transformations/page-url");
976
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
977
- var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
978
- var import_search_builder_utils = require("@wix/sdk-runtime/search-builder-utils");
979
- var Status = /* @__PURE__ */ ((Status2) => {
980
- Status2["DRAFT"] = "DRAFT";
981
- Status2["PUBLISHED"] = "PUBLISHED";
982
- Status2["ENDED"] = "ENDED";
983
- Status2["ARCHIVED"] = "ARCHIVED";
984
- return Status2;
985
- })(Status || {});
986
- var AccessType = /* @__PURE__ */ ((AccessType2) => {
987
- AccessType2["PUBLIC"] = "PUBLIC";
988
- AccessType2["PRIVATE"] = "PRIVATE";
989
- AccessType2["SECRET"] = "SECRET";
990
- return AccessType2;
991
- })(AccessType || {});
992
- var Trigger = /* @__PURE__ */ ((Trigger2) => {
993
- Trigger2["JOINED_TO_PROGRAM"] = "JOINED_TO_PROGRAM";
994
- Trigger2["STEP_COMPLETED"] = "STEP_COMPLETED";
995
- Trigger2["ALL_STEPS_COMPLETED"] = "ALL_STEPS_COMPLETED";
996
- return Trigger2;
997
- })(Trigger || {});
998
- var Enum = /* @__PURE__ */ ((Enum2) => {
999
- Enum2["UNKNOWN"] = "UNKNOWN";
1000
- Enum2["PROTECTED"] = "PROTECTED";
1001
- Enum2["PRIVATE"] = "PRIVATE";
1002
- Enum2["PUBLIC"] = "PUBLIC";
1003
- Enum2["UNCHANGED"] = "UNCHANGED";
1004
- Enum2["GROUP_PROTECTED"] = "GROUP_PROTECTED";
1005
- return Enum2;
1006
- })(Enum || {});
1007
- var BulkActionType = /* @__PURE__ */ ((BulkActionType2) => {
1008
- BulkActionType2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
1009
- BulkActionType2["INSERT"] = "INSERT";
1010
- BulkActionType2["UPDATE"] = "UPDATE";
1011
- BulkActionType2["DELETE"] = "DELETE";
1012
- return BulkActionType2;
1013
- })(BulkActionType || {});
1014
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
1015
- SortOrder2["ASC"] = "ASC";
1016
- SortOrder2["DESC"] = "DESC";
1017
- return SortOrder2;
1018
- })(SortOrder || {});
1019
- var SortType = /* @__PURE__ */ ((SortType2) => {
1020
- SortType2["COUNT"] = "COUNT";
1021
- SortType2["VALUE"] = "VALUE";
1022
- return SortType2;
1023
- })(SortType || {});
1024
- var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
1025
- SortDirection2["DESC"] = "DESC";
1026
- SortDirection2["ASC"] = "ASC";
1027
- return SortDirection2;
1028
- })(SortDirection || {});
1029
- var MissingValues = /* @__PURE__ */ ((MissingValues2) => {
1030
- MissingValues2["EXCLUDE"] = "EXCLUDE";
1031
- MissingValues2["INCLUDE"] = "INCLUDE";
1032
- return MissingValues2;
1033
- })(MissingValues || {});
1034
- var ScalarType = /* @__PURE__ */ ((ScalarType2) => {
1035
- ScalarType2["COUNT_DISTINCT"] = "COUNT_DISTINCT";
1036
- ScalarType2["MIN"] = "MIN";
1037
- ScalarType2["MAX"] = "MAX";
1038
- ScalarType2["SUM"] = "SUM";
1039
- ScalarType2["AVG"] = "AVG";
1040
- return ScalarType2;
1041
- })(ScalarType || {});
1042
- var NestedAggregationType = /* @__PURE__ */ ((NestedAggregationType2) => {
1043
- NestedAggregationType2["VALUE"] = "VALUE";
1044
- NestedAggregationType2["RANGE"] = "RANGE";
1045
- NestedAggregationType2["SCALAR"] = "SCALAR";
1046
- NestedAggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
1047
- return NestedAggregationType2;
1048
- })(NestedAggregationType || {});
1049
- var Interval = /* @__PURE__ */ ((Interval2) => {
1050
- Interval2["YEAR"] = "YEAR";
1051
- Interval2["MONTH"] = "MONTH";
1052
- Interval2["WEEK"] = "WEEK";
1053
- Interval2["DAY"] = "DAY";
1054
- Interval2["HOUR"] = "HOUR";
1055
- Interval2["MINUTE"] = "MINUTE";
1056
- Interval2["SECOND"] = "SECOND";
1057
- return Interval2;
1058
- })(Interval || {});
1059
- var AggregationType = /* @__PURE__ */ ((AggregationType2) => {
1060
- AggregationType2["VALUE"] = "VALUE";
1061
- AggregationType2["RANGE"] = "RANGE";
1062
- AggregationType2["SCALAR"] = "SCALAR";
1063
- AggregationType2["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
1064
- AggregationType2["NESTED"] = "NESTED";
1065
- return AggregationType2;
1066
- })(AggregationType || {});
1067
- var Mode = /* @__PURE__ */ ((Mode2) => {
1068
- Mode2["OR"] = "OR";
1069
- Mode2["AND"] = "AND";
1070
- return Mode2;
1071
- })(Mode || {});
1072
- var State = /* @__PURE__ */ ((State2) => {
1073
- State2["UNKNOWN"] = "UNKNOWN";
1074
- State2["ENABLED"] = "ENABLED";
1075
- State2["DISABLED"] = "DISABLED";
1076
- State2["PENDING"] = "PENDING";
1077
- State2["DEMO"] = "DEMO";
1078
- return State2;
1079
- })(State || {});
1080
- var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
1081
- SiteCreatedContext2["OTHER"] = "OTHER";
1082
- SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
1083
- SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
1084
- SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
1085
- SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
1086
- SiteCreatedContext2["FLASH"] = "FLASH";
1087
- return SiteCreatedContext2;
1088
- })(SiteCreatedContext || {});
1089
- var Namespace = /* @__PURE__ */ ((Namespace2) => {
1090
- Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
1091
- Namespace2["WIX"] = "WIX";
1092
- Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
1093
- Namespace2["ALBUMS"] = "ALBUMS";
1094
- Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
1095
- Namespace2["HOTELS"] = "HOTELS";
1096
- Namespace2["CLUBS"] = "CLUBS";
1097
- Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
1098
- Namespace2["DEV_SITE"] = "DEV_SITE";
1099
- Namespace2["LOGOS"] = "LOGOS";
1100
- Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
1101
- Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
1102
- Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
1103
- Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
1104
- Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
1105
- Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
1106
- Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
1107
- Namespace2["ANYWHERE"] = "ANYWHERE";
1108
- Namespace2["HEADLESS"] = "HEADLESS";
1109
- Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
1110
- Namespace2["RISE"] = "RISE";
1111
- Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
1112
- Namespace2["NOWNIA"] = "NOWNIA";
1113
- Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
1114
- Namespace2["CODUX"] = "CODUX";
1115
- Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
1116
- Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
1117
- Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
1118
- Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
1119
- Namespace2["MIMIR"] = "MIMIR";
1120
- Namespace2["TWINS"] = "TWINS";
1121
- Namespace2["NANO"] = "NANO";
1122
- Namespace2["BASE44"] = "BASE44";
1123
- Namespace2["CHANNELS"] = "CHANNELS";
1124
- Namespace2["NAUTILUS"] = "NAUTILUS";
1125
- Namespace2["SYMPHONY"] = "SYMPHONY";
1126
- Namespace2["NAUTILUS_APPS"] = "NAUTILUS_APPS";
1127
- Namespace2["VIBU"] = "VIBU";
1128
- Namespace2["ENTERPRISE_BRAND_KIT"] = "ENTERPRISE_BRAND_KIT";
1129
- Namespace2["DEV_CENTER_DEV_SITE"] = "DEV_CENTER_DEV_SITE";
1130
- return Namespace2;
1131
- })(Namespace || {});
1132
- var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
1133
- DeleteStatus2["UNKNOWN"] = "UNKNOWN";
1134
- DeleteStatus2["TRASH"] = "TRASH";
1135
- DeleteStatus2["DELETED"] = "DELETED";
1136
- DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
1137
- DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
1138
- return DeleteStatus2;
1139
- })(DeleteStatus || {});
1140
- var SearchIndexingNotificationState = /* @__PURE__ */ ((SearchIndexingNotificationState2) => {
1141
- SearchIndexingNotificationState2["Unknown"] = "Unknown";
1142
- SearchIndexingNotificationState2["Off"] = "Off";
1143
- SearchIndexingNotificationState2["On"] = "On";
1144
- return SearchIndexingNotificationState2;
1145
- })(SearchIndexingNotificationState || {});
1146
- var PlacementType = /* @__PURE__ */ ((PlacementType2) => {
1147
- PlacementType2["BEFORE"] = "BEFORE";
1148
- PlacementType2["AFTER"] = "AFTER";
1149
- PlacementType2["REPLACE"] = "REPLACE";
1150
- return PlacementType2;
1151
- })(PlacementType || {});
1152
- var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
1153
- DayOfWeek2["MONDAY"] = "MONDAY";
1154
- DayOfWeek2["TUESDAY"] = "TUESDAY";
1155
- DayOfWeek2["WEDNESDAY"] = "WEDNESDAY";
1156
- DayOfWeek2["THURSDAY"] = "THURSDAY";
1157
- DayOfWeek2["FRIDAY"] = "FRIDAY";
1158
- DayOfWeek2["SATURDAY"] = "SATURDAY";
1159
- DayOfWeek2["SUNDAY"] = "SUNDAY";
1160
- return DayOfWeek2;
1161
- })(DayOfWeek || {});
1162
- var ResolutionMethod = /* @__PURE__ */ ((ResolutionMethod2) => {
1163
- ResolutionMethod2["QUERY_PARAM"] = "QUERY_PARAM";
1164
- ResolutionMethod2["SUBDOMAIN"] = "SUBDOMAIN";
1165
- ResolutionMethod2["SUBDIRECTORY"] = "SUBDIRECTORY";
1166
- return ResolutionMethod2;
1167
- })(ResolutionMethod || {});
1168
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1169
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1170
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1171
- WebhookIdentityType2["MEMBER"] = "MEMBER";
1172
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1173
- WebhookIdentityType2["APP"] = "APP";
1174
- return WebhookIdentityType2;
1175
- })(WebhookIdentityType || {});
1176
- async function createProgram2(program) {
1177
- const { httpClient, sideEffects } = arguments[1];
1178
- const payload = (0, import_transform_paths2.transformPaths)(
1179
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ program }),
1180
- [
1181
- {
1182
- transformFn: import_image.transformSDKImageToRESTImage,
1183
- paths: [{ path: "program.description.image" }]
1184
- },
1185
- {
1186
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1187
- paths: [{ path: "program.description.video" }]
1188
- },
1189
- {
1190
- transformFn: import_page_url.transformSDKPageURLToRESTPageURL,
1191
- paths: [{ path: "program.seo.url" }]
1192
- }
1193
- ]
1194
- );
1195
- const reqOpts = createProgram(payload);
1196
- sideEffects?.onSiteCall?.();
1197
- try {
1198
- const result = await httpClient.request(reqOpts);
1199
- sideEffects?.onSuccess?.(result);
1200
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1201
- (0, import_transform_paths2.transformPaths)(result.data, [
1202
- {
1203
- transformFn: import_image2.transformRESTImageToSDKImage,
1204
- paths: [{ path: "program.description.image" }]
1205
- },
1206
- {
1207
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1208
- paths: [{ path: "program.description.video" }]
1209
- },
1210
- {
1211
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1212
- paths: [{ path: "program.seo.url" }]
1213
- }
1214
- ])
1215
- )?.program;
1216
- } catch (err) {
1217
- const transformedError = (0, import_transform_error.transformError)(
1218
- err,
1219
- {
1220
- spreadPathsToArguments: {},
1221
- explicitPathsToArguments: { program: "$[0]" },
1222
- singleArgumentUnchanged: false
1223
- },
1224
- ["program"]
1225
- );
1226
- sideEffects?.onError?.(err);
1227
- throw transformedError;
1228
- }
1229
- }
1230
- async function duplicateProgram2(programId) {
1231
- const { httpClient, sideEffects } = arguments[1];
1232
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1233
- programId
1234
- });
1235
- const reqOpts = duplicateProgram(payload);
1236
- sideEffects?.onSiteCall?.();
1237
- try {
1238
- const result = await httpClient.request(reqOpts);
1239
- sideEffects?.onSuccess?.(result);
1240
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1241
- (0, import_transform_paths2.transformPaths)(result.data, [
1242
- {
1243
- transformFn: import_image2.transformRESTImageToSDKImage,
1244
- paths: [{ path: "program.description.image" }]
1245
- },
1246
- {
1247
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1248
- paths: [{ path: "program.description.video" }]
1249
- },
1250
- {
1251
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1252
- paths: [{ path: "program.seo.url" }]
1253
- }
1254
- ])
1255
- );
1256
- } catch (err) {
1257
- const transformedError = (0, import_transform_error.transformError)(
1258
- err,
1259
- {
1260
- spreadPathsToArguments: {},
1261
- explicitPathsToArguments: { programId: "$[0]" },
1262
- singleArgumentUnchanged: false
1263
- },
1264
- ["programId"]
1265
- );
1266
- sideEffects?.onError?.(err);
1267
- throw transformedError;
1268
- }
1269
- }
1270
- async function getProgram2(programId) {
1271
- const { httpClient, sideEffects } = arguments[1];
1272
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1273
- programId
1274
- });
1275
- const reqOpts = getProgram(payload);
1276
- sideEffects?.onSiteCall?.();
1277
- try {
1278
- const result = await httpClient.request(reqOpts);
1279
- sideEffects?.onSuccess?.(result);
1280
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1281
- (0, import_transform_paths2.transformPaths)(result.data, [
1282
- {
1283
- transformFn: import_image2.transformRESTImageToSDKImage,
1284
- paths: [{ path: "program.description.image" }]
1285
- },
1286
- {
1287
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1288
- paths: [{ path: "program.description.video" }]
1289
- },
1290
- {
1291
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1292
- paths: [{ path: "program.seo.url" }]
1293
- }
1294
- ])
1295
- )?.program;
1296
- } catch (err) {
1297
- const transformedError = (0, import_transform_error.transformError)(
1298
- err,
1299
- {
1300
- spreadPathsToArguments: {},
1301
- explicitPathsToArguments: { programId: "$[0]" },
1302
- singleArgumentUnchanged: false
1303
- },
1304
- ["programId"]
1305
- );
1306
- sideEffects?.onError?.(err);
1307
- throw transformedError;
1308
- }
1309
- }
1310
- async function updateProgram2(_id, program) {
1311
- const { httpClient, sideEffects } = arguments[2];
1312
- const payload = (0, import_transform_paths2.transformPaths)(
1313
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ program: { ...program, id: _id } }),
1314
- [
1315
- {
1316
- transformFn: import_image.transformSDKImageToRESTImage,
1317
- paths: [{ path: "program.description.image" }]
1318
- },
1319
- {
1320
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1321
- paths: [{ path: "program.description.video" }]
1322
- },
1323
- {
1324
- transformFn: import_page_url.transformSDKPageURLToRESTPageURL,
1325
- paths: [{ path: "program.seo.url" }]
1326
- }
1327
- ]
1328
- );
1329
- const reqOpts = updateProgram(payload);
1330
- sideEffects?.onSiteCall?.();
1331
- try {
1332
- const result = await httpClient.request(reqOpts);
1333
- sideEffects?.onSuccess?.(result);
1334
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1335
- (0, import_transform_paths2.transformPaths)(result.data, [
1336
- {
1337
- transformFn: import_image2.transformRESTImageToSDKImage,
1338
- paths: [{ path: "program.description.image" }]
1339
- },
1340
- {
1341
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1342
- paths: [{ path: "program.description.video" }]
1343
- },
1344
- {
1345
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1346
- paths: [{ path: "program.seo.url" }]
1347
- }
1348
- ])
1349
- )?.program;
1350
- } catch (err) {
1351
- const transformedError = (0, import_transform_error.transformError)(
1352
- err,
1353
- {
1354
- spreadPathsToArguments: { program: "$[1]" },
1355
- explicitPathsToArguments: { "program.id": "$[0]" },
1356
- singleArgumentUnchanged: false
1357
- },
1358
- ["_id", "program"]
1359
- );
1360
- sideEffects?.onError?.(err);
1361
- throw transformedError;
1362
- }
1363
- }
1364
- async function deleteProgram2(programId) {
1365
- const { httpClient, sideEffects } = arguments[1];
1366
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1367
- programId
1368
- });
1369
- const reqOpts = deleteProgram(payload);
1370
- sideEffects?.onSiteCall?.();
1371
- try {
1372
- const result = await httpClient.request(reqOpts);
1373
- sideEffects?.onSuccess?.(result);
1374
- } catch (err) {
1375
- const transformedError = (0, import_transform_error.transformError)(
1376
- err,
1377
- {
1378
- spreadPathsToArguments: {},
1379
- explicitPathsToArguments: { programId: "$[0]" },
1380
- singleArgumentUnchanged: false
1381
- },
1382
- ["programId"]
1383
- );
1384
- sideEffects?.onError?.(err);
1385
- throw transformedError;
1386
- }
1387
- }
1388
- function queryPrograms2() {
1389
- const { httpClient, sideEffects } = arguments[0];
1390
- return (0, import_query_builder.queryBuilder)({
1391
- func: async (payload) => {
1392
- const reqOpts = queryPrograms(payload);
1393
- sideEffects?.onSiteCall?.();
1394
- try {
1395
- const result = await httpClient.request(reqOpts);
1396
- sideEffects?.onSuccess?.(result);
1397
- return result;
1398
- } catch (err) {
1399
- sideEffects?.onError?.(err);
1400
- throw err;
1401
- }
1402
- },
1403
- requestTransformer: (query) => {
1404
- const args = [query, {}];
1405
- return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1406
- ...args?.[1],
1407
- query: args?.[0]
1408
- });
1409
- },
1410
- responseTransformer: ({ data }) => {
1411
- const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1412
- (0, import_transform_paths2.transformPaths)(data, [
1413
- {
1414
- transformFn: import_image2.transformRESTImageToSDKImage,
1415
- paths: [{ path: "programs.description.image" }]
1416
- },
1417
- {
1418
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1419
- paths: [{ path: "programs.description.video" }]
1420
- },
1421
- {
1422
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1423
- paths: [{ path: "programs.seo.url" }]
1424
- }
1425
- ])
1426
- );
1427
- return {
1428
- items: transformedData?.programs,
1429
- pagingMetadata: transformedData?.pagingMetadata
1430
- };
1431
- },
1432
- errorTransformer: (err) => {
1433
- const transformedError = (0, import_transform_error.transformError)(err, {
1434
- spreadPathsToArguments: {},
1435
- explicitPathsToArguments: { query: "$[0]" },
1436
- singleArgumentUnchanged: false
1437
- });
1438
- throw transformedError;
1439
- },
1440
- pagingMethod: "CURSOR",
1441
- transformationPaths: {}
1442
- });
1443
- }
1444
- async function typedQueryPrograms(query) {
1445
- const { httpClient, sideEffects } = arguments[1];
1446
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
1447
- const reqOpts = queryPrograms(payload);
1448
- sideEffects?.onSiteCall?.();
1449
- try {
1450
- const result = await httpClient.request(reqOpts);
1451
- sideEffects?.onSuccess?.(result);
1452
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1453
- (0, import_transform_paths2.transformPaths)(result.data, [
1454
- {
1455
- transformFn: import_image2.transformRESTImageToSDKImage,
1456
- paths: [{ path: "programs.description.image" }]
1457
- },
1458
- {
1459
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1460
- paths: [{ path: "programs.description.video" }]
1461
- },
1462
- {
1463
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1464
- paths: [{ path: "programs.seo.url" }]
1465
- }
1466
- ])
1467
- );
1468
- } catch (err) {
1469
- const transformedError = (0, import_transform_error.transformError)(
1470
- err,
1471
- {
1472
- spreadPathsToArguments: {},
1473
- explicitPathsToArguments: { query: "$[0]" },
1474
- singleArgumentUnchanged: false
1475
- },
1476
- ["query"]
1477
- );
1478
- sideEffects?.onError?.(err);
1479
- throw transformedError;
1480
- }
1481
- }
1482
- var utils = {
1483
- query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)(),
1484
- search: /* @__PURE__ */ (0, import_search_builder_utils.createSearchUtils)()
1485
- };
1486
- async function searchPrograms2(search) {
1487
- const { httpClient, sideEffects } = arguments[1];
1488
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ search });
1489
- const reqOpts = searchPrograms(payload);
1490
- sideEffects?.onSiteCall?.();
1491
- try {
1492
- const result = await httpClient.request(reqOpts);
1493
- sideEffects?.onSuccess?.(result);
1494
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1495
- (0, import_transform_paths2.transformPaths)(result.data, [
1496
- {
1497
- transformFn: import_image2.transformRESTImageToSDKImage,
1498
- paths: [{ path: "programs.description.image" }]
1499
- },
1500
- {
1501
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1502
- paths: [{ path: "programs.description.video" }]
1503
- },
1504
- {
1505
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1506
- paths: [{ path: "programs.seo.url" }]
1507
- }
1508
- ])
1509
- );
1510
- } catch (err) {
1511
- const transformedError = (0, import_transform_error.transformError)(
1512
- err,
1513
- {
1514
- spreadPathsToArguments: {},
1515
- explicitPathsToArguments: { search: "$[0]" },
1516
- singleArgumentUnchanged: false
1517
- },
1518
- ["search"]
1519
- );
1520
- sideEffects?.onError?.(err);
1521
- throw transformedError;
1522
- }
1523
- }
1524
- async function publishProgram2(programId) {
1525
- const { httpClient, sideEffects } = arguments[1];
1526
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1527
- programId
1528
- });
1529
- const reqOpts = publishProgram(payload);
1530
- sideEffects?.onSiteCall?.();
1531
- try {
1532
- const result = await httpClient.request(reqOpts);
1533
- sideEffects?.onSuccess?.(result);
1534
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1535
- (0, import_transform_paths2.transformPaths)(result.data, [
1536
- {
1537
- transformFn: import_image2.transformRESTImageToSDKImage,
1538
- paths: [{ path: "program.description.image" }]
1539
- },
1540
- {
1541
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1542
- paths: [{ path: "program.description.video" }]
1543
- },
1544
- {
1545
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1546
- paths: [{ path: "program.seo.url" }]
1547
- }
1548
- ])
1549
- );
1550
- } catch (err) {
1551
- const transformedError = (0, import_transform_error.transformError)(
1552
- err,
1553
- {
1554
- spreadPathsToArguments: {},
1555
- explicitPathsToArguments: { programId: "$[0]" },
1556
- singleArgumentUnchanged: false
1557
- },
1558
- ["programId"]
1559
- );
1560
- sideEffects?.onError?.(err);
1561
- throw transformedError;
1562
- }
1563
- }
1564
- async function endProgram2(programId) {
1565
- const { httpClient, sideEffects } = arguments[1];
1566
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1567
- programId
1568
- });
1569
- const reqOpts = endProgram(payload);
1570
- sideEffects?.onSiteCall?.();
1571
- try {
1572
- const result = await httpClient.request(reqOpts);
1573
- sideEffects?.onSuccess?.(result);
1574
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1575
- (0, import_transform_paths2.transformPaths)(result.data, [
1576
- {
1577
- transformFn: import_image2.transformRESTImageToSDKImage,
1578
- paths: [{ path: "program.description.image" }]
1579
- },
1580
- {
1581
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1582
- paths: [{ path: "program.description.video" }]
1583
- },
1584
- {
1585
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1586
- paths: [{ path: "program.seo.url" }]
1587
- }
1588
- ])
1589
- );
1590
- } catch (err) {
1591
- const transformedError = (0, import_transform_error.transformError)(
1592
- err,
1593
- {
1594
- spreadPathsToArguments: {},
1595
- explicitPathsToArguments: { programId: "$[0]" },
1596
- singleArgumentUnchanged: false
1597
- },
1598
- ["programId"]
1599
- );
1600
- sideEffects?.onError?.(err);
1601
- throw transformedError;
1602
- }
1603
- }
1604
- async function archiveProgram2(programId) {
1605
- const { httpClient, sideEffects } = arguments[1];
1606
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1607
- programId
1608
- });
1609
- const reqOpts = archiveProgram(payload);
1610
- sideEffects?.onSiteCall?.();
1611
- try {
1612
- const result = await httpClient.request(reqOpts);
1613
- sideEffects?.onSuccess?.(result);
1614
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1615
- (0, import_transform_paths2.transformPaths)(result.data, [
1616
- {
1617
- transformFn: import_image2.transformRESTImageToSDKImage,
1618
- paths: [{ path: "program.description.image" }]
1619
- },
1620
- {
1621
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1622
- paths: [{ path: "program.description.video" }]
1623
- },
1624
- {
1625
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1626
- paths: [{ path: "program.seo.url" }]
1627
- }
1628
- ])
1629
- );
1630
- } catch (err) {
1631
- const transformedError = (0, import_transform_error.transformError)(
1632
- err,
1633
- {
1634
- spreadPathsToArguments: {},
1635
- explicitPathsToArguments: { programId: "$[0]" },
1636
- singleArgumentUnchanged: false
1637
- },
1638
- ["programId"]
1639
- );
1640
- sideEffects?.onError?.(err);
1641
- throw transformedError;
1642
- }
1643
- }
1644
- async function bulkUpdatePrograms2(programs, options) {
1645
- const { httpClient, sideEffects } = arguments[2];
1646
- const payload = (0, import_transform_paths2.transformPaths)(
1647
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1648
- programs,
1649
- returnEntity: options?.returnEntity
1650
- }),
1651
- [
1652
- {
1653
- transformFn: import_image.transformSDKImageToRESTImage,
1654
- paths: [{ path: "programs.program.description.image" }]
1655
- },
1656
- {
1657
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1658
- paths: [{ path: "programs.program.description.video" }]
1659
- },
1660
- {
1661
- transformFn: import_page_url.transformSDKPageURLToRESTPageURL,
1662
- paths: [{ path: "programs.program.seo.url" }]
1663
- }
1664
- ]
1665
- );
1666
- const reqOpts = bulkUpdatePrograms(payload);
1667
- sideEffects?.onSiteCall?.();
1668
- try {
1669
- const result = await httpClient.request(reqOpts);
1670
- sideEffects?.onSuccess?.(result);
1671
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1672
- (0, import_transform_paths2.transformPaths)(result.data, [
1673
- {
1674
- transformFn: import_image2.transformRESTImageToSDKImage,
1675
- paths: [{ path: "results.item.description.image" }]
1676
- },
1677
- {
1678
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1679
- paths: [{ path: "results.item.description.video" }]
1680
- },
1681
- {
1682
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1683
- paths: [{ path: "results.item.seo.url" }]
1684
- }
1685
- ])
1686
- );
1687
- } catch (err) {
1688
- const transformedError = (0, import_transform_error.transformError)(
1689
- err,
1690
- {
1691
- spreadPathsToArguments: {},
1692
- explicitPathsToArguments: {
1693
- programs: "$[0]",
1694
- returnEntity: "$[1].returnEntity"
1695
- },
1696
- singleArgumentUnchanged: false
1697
- },
1698
- ["programs", "options"]
1699
- );
1700
- sideEffects?.onError?.(err);
1701
- throw transformedError;
1702
- }
1703
- }
1704
- async function countPrograms2(options) {
1705
- const { httpClient, sideEffects } = arguments[1];
1706
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1707
- filter: options?.filter
1708
- });
1709
- const reqOpts = countPrograms(payload);
1710
- sideEffects?.onSiteCall?.();
1711
- try {
1712
- const result = await httpClient.request(reqOpts);
1713
- sideEffects?.onSuccess?.(result);
1714
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1715
- } catch (err) {
1716
- const transformedError = (0, import_transform_error.transformError)(
1717
- err,
1718
- {
1719
- spreadPathsToArguments: {},
1720
- explicitPathsToArguments: { filter: "$[0].filter" },
1721
- singleArgumentUnchanged: false
1722
- },
1723
- ["options"]
1724
- );
1725
- sideEffects?.onError?.(err);
1726
- throw transformedError;
1727
- }
1728
- }
1729
- async function listSamplePrograms2() {
1730
- const { httpClient, sideEffects } = arguments[0];
1731
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
1732
- const reqOpts = listSamplePrograms(payload);
1733
- sideEffects?.onSiteCall?.();
1734
- try {
1735
- const result = await httpClient.request(reqOpts);
1736
- sideEffects?.onSuccess?.(result);
1737
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1738
- (0, import_transform_paths2.transformPaths)(result.data, [
1739
- {
1740
- transformFn: import_image2.transformRESTImageToSDKImage,
1741
- paths: [{ path: "programs.program.description.image" }]
1742
- },
1743
- {
1744
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1745
- paths: [{ path: "programs.program.description.video" }]
1746
- },
1747
- {
1748
- transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
1749
- paths: [{ path: "programs.program.seo.url" }]
1750
- }
1751
- ])
1752
- );
1753
- } catch (err) {
1754
- const transformedError = (0, import_transform_error.transformError)(
1755
- err,
1756
- {
1757
- spreadPathsToArguments: {},
1758
- explicitPathsToArguments: {},
1759
- singleArgumentUnchanged: false
1760
- },
1761
- []
1762
- );
1763
- sideEffects?.onError?.(err);
1764
- throw transformedError;
1765
- }
1766
- }
1767
-
1768
- // src/online-programs-v3-program-programs.public.ts
1769
- function createProgram3(httpClient) {
1770
- return (program) => createProgram2(
1771
- program,
1772
- // @ts-ignore
1773
- { httpClient }
1774
- );
1775
- }
1776
- function duplicateProgram3(httpClient) {
1777
- return (programId) => duplicateProgram2(
1778
- programId,
1779
- // @ts-ignore
1780
- { httpClient }
1781
- );
1782
- }
1783
- function getProgram3(httpClient) {
1784
- return (programId) => getProgram2(
1785
- programId,
1786
- // @ts-ignore
1787
- { httpClient }
1788
- );
1789
- }
1790
- function updateProgram3(httpClient) {
1791
- return (_id, program) => updateProgram2(
1792
- _id,
1793
- program,
1794
- // @ts-ignore
1795
- { httpClient }
1796
- );
1797
- }
1798
- function deleteProgram3(httpClient) {
1799
- return (programId) => deleteProgram2(
1800
- programId,
1801
- // @ts-ignore
1802
- { httpClient }
1803
- );
1804
- }
1805
- function queryPrograms3(httpClient) {
1806
- return () => queryPrograms2(
1807
- // @ts-ignore
1808
- { httpClient }
1809
- );
1810
- }
1811
- function typedQueryPrograms2(httpClient) {
1812
- return (query) => typedQueryPrograms(
1813
- query,
1814
- // @ts-ignore
1815
- { httpClient }
1816
- );
1817
- }
1818
- function searchPrograms3(httpClient) {
1819
- return (search) => searchPrograms2(
1820
- search,
1821
- // @ts-ignore
1822
- { httpClient }
1823
- );
1824
- }
1825
- function publishProgram3(httpClient) {
1826
- return (programId) => publishProgram2(
1827
- programId,
1828
- // @ts-ignore
1829
- { httpClient }
1830
- );
1831
- }
1832
- function endProgram3(httpClient) {
1833
- return (programId) => endProgram2(
1834
- programId,
1835
- // @ts-ignore
1836
- { httpClient }
1837
- );
1838
- }
1839
- function archiveProgram3(httpClient) {
1840
- return (programId) => archiveProgram2(
1841
- programId,
1842
- // @ts-ignore
1843
- { httpClient }
1844
- );
1845
- }
1846
- function bulkUpdatePrograms3(httpClient) {
1847
- return (programs, options) => bulkUpdatePrograms2(
1848
- programs,
1849
- options,
1850
- // @ts-ignore
1851
- { httpClient }
1852
- );
1853
- }
1854
- function countPrograms3(httpClient) {
1855
- return (options) => countPrograms2(
1856
- options,
1857
- // @ts-ignore
1858
- { httpClient }
1859
- );
1860
- }
1861
- function listSamplePrograms3(httpClient) {
1862
- return () => listSamplePrograms2(
1863
- // @ts-ignore
1864
- { httpClient }
1865
- );
1866
- }
1867
-
1868
- // src/online-programs-v3-program-programs.context.ts
1869
- var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1870
- var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
1871
- function customQueryPrograms(httpClient) {
1872
- const router = /* @__PURE__ */ (0, import_query_method_router.createQueryOverloadRouter)({
1873
- builderQueryFunction: () => queryPrograms3(httpClient)(),
1874
- typedQueryFunction: (query) => typedQueryPrograms2(httpClient)(query),
1875
- hasOptionsParameter: false
1876
- });
1877
- function overloadedQuery(query) {
1878
- return router(...arguments);
1879
- }
1880
- return overloadedQuery;
1881
- }
1882
- var createProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createProgram3);
1883
- var duplicateProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateProgram3);
1884
- var getProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getProgram3);
1885
- var updateProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateProgram3);
1886
- var deleteProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteProgram3);
1887
- var searchPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(searchPrograms3);
1888
- var publishProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishProgram3);
1889
- var endProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(endProgram3);
1890
- var archiveProgram4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(archiveProgram3);
1891
- var bulkUpdatePrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdatePrograms3);
1892
- var countPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(countPrograms3);
1893
- var listSamplePrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSamplePrograms3);
1894
- var queryPrograms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryPrograms);
1895
- // Annotate the CommonJS export names for ESM import in node:
1896
- 0 && (module.exports = {
1897
- AccessType,
1898
- AggregationType,
1899
- BulkActionType,
1900
- DayOfWeek,
1901
- DeleteStatus,
1902
- Enum,
1903
- Interval,
1904
- MissingValues,
1905
- Mode,
1906
- Namespace,
1907
- NestedAggregationType,
1908
- PlacementType,
1909
- ResolutionMethod,
1910
- ScalarType,
1911
- SearchIndexingNotificationState,
1912
- SiteCreatedContext,
1913
- SortDirection,
1914
- SortOrder,
1915
- SortType,
1916
- State,
1917
- Status,
1918
- Trigger,
1919
- WebhookIdentityType,
1920
- archiveProgram,
1921
- bulkUpdatePrograms,
1922
- countPrograms,
1923
- createProgram,
1924
- deleteProgram,
1925
- duplicateProgram,
1926
- endProgram,
1927
- getProgram,
1928
- listSamplePrograms,
1929
- publishProgram,
1930
- queryPrograms,
1931
- searchPrograms,
1932
- updateProgram,
1933
- utils
1934
- });
1935
- //# sourceMappingURL=index.js.map