@wix/auto_sdk_online-programs_sections 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/build/cjs/index.js.map +1 -1
  2. package/build/cjs/index.typings.d.ts +2 -2
  3. package/build/cjs/index.typings.js.map +1 -1
  4. package/build/cjs/meta.d.ts +1 -1
  5. package/build/cjs/meta.js.map +1 -1
  6. package/build/es/index.mjs.map +1 -1
  7. package/build/es/index.typings.d.mts +2 -2
  8. package/build/es/index.typings.mjs.map +1 -1
  9. package/build/es/meta.d.mts +1 -1
  10. package/build/es/meta.mjs.map +1 -1
  11. package/build/internal/cjs/index.typings.d.ts +2 -2
  12. package/build/internal/cjs/meta.d.ts +1 -1
  13. package/build/internal/es/index.typings.d.mts +2 -2
  14. package/build/internal/es/meta.d.mts +1 -1
  15. package/package.json +4 -11
  16. package/build/cjs/schemas.d.ts +0 -509
  17. package/build/cjs/schemas.js +0 -810
  18. package/build/cjs/schemas.js.map +0 -1
  19. package/build/es/schemas.d.mts +0 -509
  20. package/build/es/schemas.mjs +0 -754
  21. package/build/es/schemas.mjs.map +0 -1
  22. package/build/internal/cjs/index.js +0 -1444
  23. package/build/internal/cjs/index.js.map +0 -1
  24. package/build/internal/cjs/index.typings.js +0 -1335
  25. package/build/internal/cjs/index.typings.js.map +0 -1
  26. package/build/internal/cjs/meta.js +0 -1026
  27. package/build/internal/cjs/meta.js.map +0 -1
  28. package/build/internal/cjs/schemas.d.ts +0 -509
  29. package/build/internal/cjs/schemas.js +0 -810
  30. package/build/internal/cjs/schemas.js.map +0 -1
  31. package/build/internal/es/index.mjs +0 -1402
  32. package/build/internal/es/index.mjs.map +0 -1
  33. package/build/internal/es/index.typings.mjs +0 -1292
  34. package/build/internal/es/index.typings.mjs.map +0 -1
  35. package/build/internal/es/meta.mjs +0 -982
  36. package/build/internal/es/meta.mjs.map +0 -1
  37. package/build/internal/es/schemas.d.mts +0 -509
  38. package/build/internal/es/schemas.mjs +0 -754
  39. package/build/internal/es/schemas.mjs.map +0 -1
  40. package/schemas/package.json +0 -3
@@ -1,1444 +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
- BulkActionType: () => BulkActionType,
24
- DescriptionFieldSet: () => DescriptionFieldSet,
25
- Enum: () => Enum,
26
- RequestedFields: () => RequestedFields,
27
- SearchIndexingNotificationState: () => SearchIndexingNotificationState,
28
- SortOrder: () => SortOrder,
29
- State: () => State,
30
- WebhookIdentityType: () => WebhookIdentityType,
31
- bulkCreateSections: () => bulkCreateSections4,
32
- cloneSection: () => cloneSection4,
33
- createSection: () => createSection4,
34
- deleteSection: () => deleteSection4,
35
- getSection: () => getSection4,
36
- listSections: () => listSections4,
37
- moveSection: () => moveSection4,
38
- publishSection: () => publishSection4,
39
- querySections: () => querySections4,
40
- updateSection: () => updateSection4,
41
- utils: () => utils
42
- });
43
- module.exports = __toCommonJS(index_exports);
44
-
45
- // src/online-programs-v3-section-sections.universal.ts
46
- var import_transform_error = require("@wix/sdk-runtime/transform-error");
47
- var import_query_builder = require("@wix/sdk-runtime/query-builder");
48
- var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
49
-
50
- // src/online-programs-v3-section-sections.http.ts
51
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
52
- var import_float = require("@wix/sdk-runtime/transformations/float");
53
- var import_float2 = require("@wix/sdk-runtime/transformations/float");
54
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
55
- var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
56
- var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
57
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
58
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
59
- function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
60
- const domainToMappings = {
61
- "bo._base_domain_": [
62
- {
63
- srcPath: "/program-sections-service",
64
- destPath: ""
65
- }
66
- ],
67
- "wixbo.ai": [
68
- {
69
- srcPath: "/program-sections-service",
70
- destPath: ""
71
- }
72
- ],
73
- "wix-bo.com": [
74
- {
75
- srcPath: "/program-sections-service",
76
- destPath: ""
77
- }
78
- ],
79
- "api._api_base_domain_": [
80
- {
81
- srcPath: "/program-sections-service",
82
- destPath: ""
83
- }
84
- ],
85
- "manage._base_domain_": [
86
- {
87
- srcPath: "/_api/program-sections-service",
88
- destPath: ""
89
- }
90
- ],
91
- "www._base_domain_": [
92
- {
93
- srcPath: "/_api/program-sections-service",
94
- destPath: ""
95
- }
96
- ],
97
- "*.dev.wix-code.com": [
98
- {
99
- srcPath: "/_api/program-sections-service",
100
- destPath: ""
101
- },
102
- {
103
- srcPath: "/program-sections-service",
104
- destPath: ""
105
- }
106
- ],
107
- "editor._base_domain_": [
108
- {
109
- srcPath: "/_api/program-sections-service",
110
- destPath: ""
111
- }
112
- ],
113
- "blocks._base_domain_": [
114
- {
115
- srcPath: "/_api/program-sections-service",
116
- destPath: ""
117
- }
118
- ],
119
- "create.editorx": [
120
- {
121
- srcPath: "/_api/program-sections-service",
122
- destPath: ""
123
- }
124
- ],
125
- "editor.wixapps.net": [
126
- {
127
- srcPath: "/_api/program-sections-service",
128
- destPath: ""
129
- },
130
- {
131
- srcPath: "/program-sections-service",
132
- destPath: ""
133
- }
134
- ],
135
- _: [
136
- {
137
- srcPath: "/program-sections-service",
138
- destPath: ""
139
- }
140
- ],
141
- "www.wixapis.com": [
142
- {
143
- srcPath: "/program-sections-service",
144
- destPath: ""
145
- },
146
- {
147
- srcPath: "/online-programs/v3/sections",
148
- destPath: "/v3/sections"
149
- },
150
- {
151
- srcPath: "/online-programs/v3/bulk/sections",
152
- destPath: "/v3/bulk/sections"
153
- }
154
- ]
155
- };
156
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
157
- }
158
- var PACKAGE_NAME = "@wix/auto_sdk_online-programs_sections";
159
- function createSection(payload) {
160
- function __createSection({ host }) {
161
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
162
- {
163
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
164
- paths: [
165
- { path: "section.createdDate" },
166
- { path: "section.updatedDate" },
167
- { path: "section.description.image.urlExpirationDate" },
168
- { path: "section.description.video.urlExpirationDate" },
169
- { path: "section.description.video.resolutions.urlExpirationDate" },
170
- {
171
- path: "section.description.video.resolutions.poster.urlExpirationDate"
172
- },
173
- { path: "section.description.video.posters.urlExpirationDate" }
174
- ]
175
- },
176
- {
177
- transformFn: import_float.transformSDKFloatToRESTFloat,
178
- paths: [
179
- { path: "section.ordering" },
180
- { path: "section.description.image.focalPoint.x" },
181
- { path: "section.description.image.focalPoint.y" },
182
- { path: "section.description.video.resolutions.poster.focalPoint.x" },
183
- { path: "section.description.video.resolutions.poster.focalPoint.y" },
184
- { path: "section.description.video.posters.focalPoint.x" },
185
- { path: "section.description.video.posters.focalPoint.y" }
186
- ]
187
- }
188
- ]);
189
- const metadata = {
190
- entityFqdn: "wix.online_programs.v3.section",
191
- method: "POST",
192
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.CreateSection",
193
- packageName: PACKAGE_NAME,
194
- migrationOptions: {
195
- optInTransformResponse: true
196
- },
197
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
198
- protoPath: "/v3/sections",
199
- data: serializedData,
200
- host
201
- }),
202
- data: serializedData,
203
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
204
- {
205
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
206
- paths: [
207
- { path: "section.createdDate" },
208
- { path: "section.updatedDate" },
209
- { path: "section.description.image.urlExpirationDate" },
210
- { path: "section.description.video.urlExpirationDate" },
211
- {
212
- path: "section.description.video.resolutions.urlExpirationDate"
213
- },
214
- {
215
- path: "section.description.video.resolutions.poster.urlExpirationDate"
216
- },
217
- { path: "section.description.video.posters.urlExpirationDate" }
218
- ]
219
- },
220
- {
221
- transformFn: import_float2.transformRESTFloatToSDKFloat,
222
- paths: [
223
- { path: "section.ordering" },
224
- { path: "section.description.image.focalPoint.x" },
225
- { path: "section.description.image.focalPoint.y" },
226
- {
227
- path: "section.description.video.resolutions.poster.focalPoint.x"
228
- },
229
- {
230
- path: "section.description.video.resolutions.poster.focalPoint.y"
231
- },
232
- { path: "section.description.video.posters.focalPoint.x" },
233
- { path: "section.description.video.posters.focalPoint.y" }
234
- ]
235
- }
236
- ])
237
- };
238
- return metadata;
239
- }
240
- return __createSection;
241
- }
242
- function bulkCreateSections(payload) {
243
- function __bulkCreateSections({ host }) {
244
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
245
- {
246
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
247
- paths: [
248
- { path: "sections.createdDate" },
249
- { path: "sections.updatedDate" },
250
- { path: "sections.description.image.urlExpirationDate" },
251
- { path: "sections.description.video.urlExpirationDate" },
252
- { path: "sections.description.video.resolutions.urlExpirationDate" },
253
- {
254
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
255
- },
256
- { path: "sections.description.video.posters.urlExpirationDate" }
257
- ]
258
- },
259
- {
260
- transformFn: import_float.transformSDKFloatToRESTFloat,
261
- paths: [
262
- { path: "sections.ordering" },
263
- { path: "sections.description.image.focalPoint.x" },
264
- { path: "sections.description.image.focalPoint.y" },
265
- {
266
- path: "sections.description.video.resolutions.poster.focalPoint.x"
267
- },
268
- {
269
- path: "sections.description.video.resolutions.poster.focalPoint.y"
270
- },
271
- { path: "sections.description.video.posters.focalPoint.x" },
272
- { path: "sections.description.video.posters.focalPoint.y" }
273
- ]
274
- }
275
- ]);
276
- const metadata = {
277
- entityFqdn: "wix.online_programs.v3.section",
278
- method: "POST",
279
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections",
280
- packageName: PACKAGE_NAME,
281
- migrationOptions: {
282
- optInTransformResponse: true
283
- },
284
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
285
- protoPath: "/v3/bulk/sections/create",
286
- data: serializedData,
287
- host
288
- }),
289
- data: serializedData,
290
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
291
- {
292
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
293
- paths: [
294
- { path: "results.item.createdDate" },
295
- { path: "results.item.updatedDate" },
296
- { path: "results.item.description.image.urlExpirationDate" },
297
- { path: "results.item.description.video.urlExpirationDate" },
298
- {
299
- path: "results.item.description.video.resolutions.urlExpirationDate"
300
- },
301
- {
302
- path: "results.item.description.video.resolutions.poster.urlExpirationDate"
303
- },
304
- {
305
- path: "results.item.description.video.posters.urlExpirationDate"
306
- }
307
- ]
308
- },
309
- {
310
- transformFn: import_float2.transformRESTFloatToSDKFloat,
311
- paths: [
312
- { path: "results.item.ordering" },
313
- { path: "results.item.description.image.focalPoint.x" },
314
- { path: "results.item.description.image.focalPoint.y" },
315
- {
316
- path: "results.item.description.video.resolutions.poster.focalPoint.x"
317
- },
318
- {
319
- path: "results.item.description.video.resolutions.poster.focalPoint.y"
320
- },
321
- { path: "results.item.description.video.posters.focalPoint.x" },
322
- { path: "results.item.description.video.posters.focalPoint.y" }
323
- ]
324
- }
325
- ])
326
- };
327
- return metadata;
328
- }
329
- return __bulkCreateSections;
330
- }
331
- function getSection(payload) {
332
- function __getSection({ host }) {
333
- const metadata = {
334
- entityFqdn: "wix.online_programs.v3.section",
335
- method: "GET",
336
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.GetSection",
337
- packageName: PACKAGE_NAME,
338
- migrationOptions: {
339
- optInTransformResponse: true
340
- },
341
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
342
- protoPath: "/v3/sections/{sectionId}",
343
- data: payload,
344
- host
345
- }),
346
- params: (0, import_rest_modules.toURLSearchParams)(payload),
347
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
348
- {
349
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
350
- paths: [
351
- { path: "section.createdDate" },
352
- { path: "section.updatedDate" },
353
- { path: "section.description.image.urlExpirationDate" },
354
- { path: "section.description.video.urlExpirationDate" },
355
- {
356
- path: "section.description.video.resolutions.urlExpirationDate"
357
- },
358
- {
359
- path: "section.description.video.resolutions.poster.urlExpirationDate"
360
- },
361
- { path: "section.description.video.posters.urlExpirationDate" }
362
- ]
363
- },
364
- {
365
- transformFn: import_float2.transformRESTFloatToSDKFloat,
366
- paths: [
367
- { path: "section.ordering" },
368
- { path: "section.description.image.focalPoint.x" },
369
- { path: "section.description.image.focalPoint.y" },
370
- {
371
- path: "section.description.video.resolutions.poster.focalPoint.x"
372
- },
373
- {
374
- path: "section.description.video.resolutions.poster.focalPoint.y"
375
- },
376
- { path: "section.description.video.posters.focalPoint.x" },
377
- { path: "section.description.video.posters.focalPoint.y" }
378
- ]
379
- }
380
- ])
381
- };
382
- return metadata;
383
- }
384
- return __getSection;
385
- }
386
- function updateSection(payload) {
387
- function __updateSection({ host }) {
388
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
389
- {
390
- transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
391
- paths: [{ path: "fieldMask" }]
392
- },
393
- {
394
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
395
- paths: [
396
- { path: "section.createdDate" },
397
- { path: "section.updatedDate" },
398
- { path: "section.description.image.urlExpirationDate" },
399
- { path: "section.description.video.urlExpirationDate" },
400
- { path: "section.description.video.resolutions.urlExpirationDate" },
401
- {
402
- path: "section.description.video.resolutions.poster.urlExpirationDate"
403
- },
404
- { path: "section.description.video.posters.urlExpirationDate" }
405
- ]
406
- },
407
- {
408
- transformFn: import_float.transformSDKFloatToRESTFloat,
409
- paths: [
410
- { path: "section.ordering" },
411
- { path: "section.description.image.focalPoint.x" },
412
- { path: "section.description.image.focalPoint.y" },
413
- { path: "section.description.video.resolutions.poster.focalPoint.x" },
414
- { path: "section.description.video.resolutions.poster.focalPoint.y" },
415
- { path: "section.description.video.posters.focalPoint.x" },
416
- { path: "section.description.video.posters.focalPoint.y" }
417
- ]
418
- }
419
- ]);
420
- const metadata = {
421
- entityFqdn: "wix.online_programs.v3.section",
422
- method: "PATCH",
423
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.UpdateSection",
424
- packageName: PACKAGE_NAME,
425
- migrationOptions: {
426
- optInTransformResponse: true
427
- },
428
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
429
- protoPath: "/v3/sections/{section.id}",
430
- data: serializedData,
431
- host
432
- }),
433
- data: serializedData,
434
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
435
- {
436
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
437
- paths: [
438
- { path: "section.createdDate" },
439
- { path: "section.updatedDate" },
440
- { path: "section.description.image.urlExpirationDate" },
441
- { path: "section.description.video.urlExpirationDate" },
442
- {
443
- path: "section.description.video.resolutions.urlExpirationDate"
444
- },
445
- {
446
- path: "section.description.video.resolutions.poster.urlExpirationDate"
447
- },
448
- { path: "section.description.video.posters.urlExpirationDate" }
449
- ]
450
- },
451
- {
452
- transformFn: import_float2.transformRESTFloatToSDKFloat,
453
- paths: [
454
- { path: "section.ordering" },
455
- { path: "section.description.image.focalPoint.x" },
456
- { path: "section.description.image.focalPoint.y" },
457
- {
458
- path: "section.description.video.resolutions.poster.focalPoint.x"
459
- },
460
- {
461
- path: "section.description.video.resolutions.poster.focalPoint.y"
462
- },
463
- { path: "section.description.video.posters.focalPoint.x" },
464
- { path: "section.description.video.posters.focalPoint.y" }
465
- ]
466
- }
467
- ])
468
- };
469
- return metadata;
470
- }
471
- return __updateSection;
472
- }
473
- function deleteSection(payload) {
474
- function __deleteSection({ host }) {
475
- const metadata = {
476
- entityFqdn: "wix.online_programs.v3.section",
477
- method: "DELETE",
478
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.DeleteSection",
479
- packageName: PACKAGE_NAME,
480
- migrationOptions: {
481
- optInTransformResponse: true
482
- },
483
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
484
- protoPath: "/v3/sections/{sectionId}",
485
- data: payload,
486
- host
487
- }),
488
- params: (0, import_rest_modules.toURLSearchParams)(payload)
489
- };
490
- return metadata;
491
- }
492
- return __deleteSection;
493
- }
494
- function querySections(payload) {
495
- function __querySections({ host }) {
496
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
497
- {
498
- transformFn: import_float.transformSDKFloatToRESTFloat,
499
- paths: [
500
- { path: "query.sort.origin.latitude" },
501
- { path: "query.sort.origin.longitude" }
502
- ]
503
- }
504
- ]);
505
- const metadata = {
506
- entityFqdn: "wix.online_programs.v3.section",
507
- method: "POST",
508
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.QuerySections",
509
- packageName: PACKAGE_NAME,
510
- migrationOptions: {
511
- optInTransformResponse: true
512
- },
513
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
514
- protoPath: "/v3/sections/query",
515
- data: serializedData,
516
- host
517
- }),
518
- data: serializedData,
519
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
520
- {
521
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
522
- paths: [
523
- { path: "sections.createdDate" },
524
- { path: "sections.updatedDate" },
525
- { path: "sections.description.image.urlExpirationDate" },
526
- { path: "sections.description.video.urlExpirationDate" },
527
- {
528
- path: "sections.description.video.resolutions.urlExpirationDate"
529
- },
530
- {
531
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
532
- },
533
- { path: "sections.description.video.posters.urlExpirationDate" }
534
- ]
535
- },
536
- {
537
- transformFn: import_float2.transformRESTFloatToSDKFloat,
538
- paths: [
539
- { path: "sections.ordering" },
540
- { path: "sections.description.image.focalPoint.x" },
541
- { path: "sections.description.image.focalPoint.y" },
542
- {
543
- path: "sections.description.video.resolutions.poster.focalPoint.x"
544
- },
545
- {
546
- path: "sections.description.video.resolutions.poster.focalPoint.y"
547
- },
548
- { path: "sections.description.video.posters.focalPoint.x" },
549
- { path: "sections.description.video.posters.focalPoint.y" }
550
- ]
551
- }
552
- ])
553
- };
554
- return metadata;
555
- }
556
- return __querySections;
557
- }
558
- function listSections(payload) {
559
- function __listSections({ host }) {
560
- const metadata = {
561
- entityFqdn: "wix.online_programs.v3.section",
562
- method: "GET",
563
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.ListSections",
564
- packageName: PACKAGE_NAME,
565
- migrationOptions: {
566
- optInTransformResponse: true
567
- },
568
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
569
- protoPath: "/v3/sections",
570
- data: payload,
571
- host
572
- }),
573
- params: (0, import_rest_modules.toURLSearchParams)(payload),
574
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
575
- {
576
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
577
- paths: [
578
- { path: "sections.createdDate" },
579
- { path: "sections.updatedDate" },
580
- { path: "sections.description.image.urlExpirationDate" },
581
- { path: "sections.description.video.urlExpirationDate" },
582
- {
583
- path: "sections.description.video.resolutions.urlExpirationDate"
584
- },
585
- {
586
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
587
- },
588
- { path: "sections.description.video.posters.urlExpirationDate" }
589
- ]
590
- },
591
- {
592
- transformFn: import_float2.transformRESTFloatToSDKFloat,
593
- paths: [
594
- { path: "sections.ordering" },
595
- { path: "sections.description.image.focalPoint.x" },
596
- { path: "sections.description.image.focalPoint.y" },
597
- {
598
- path: "sections.description.video.resolutions.poster.focalPoint.x"
599
- },
600
- {
601
- path: "sections.description.video.resolutions.poster.focalPoint.y"
602
- },
603
- { path: "sections.description.video.posters.focalPoint.x" },
604
- { path: "sections.description.video.posters.focalPoint.y" }
605
- ]
606
- }
607
- ])
608
- };
609
- return metadata;
610
- }
611
- return __listSections;
612
- }
613
- function cloneSection(payload) {
614
- function __cloneSection({ host }) {
615
- const metadata = {
616
- entityFqdn: "wix.online_programs.v3.section",
617
- method: "POST",
618
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.CloneSection",
619
- packageName: PACKAGE_NAME,
620
- migrationOptions: {
621
- optInTransformResponse: true
622
- },
623
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
624
- protoPath: "/v3/sections/{sectionId}/clone",
625
- data: payload,
626
- host
627
- }),
628
- data: payload,
629
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
630
- {
631
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
632
- paths: [
633
- { path: "section.createdDate" },
634
- { path: "section.updatedDate" },
635
- { path: "section.description.image.urlExpirationDate" },
636
- { path: "section.description.video.urlExpirationDate" },
637
- {
638
- path: "section.description.video.resolutions.urlExpirationDate"
639
- },
640
- {
641
- path: "section.description.video.resolutions.poster.urlExpirationDate"
642
- },
643
- { path: "section.description.video.posters.urlExpirationDate" }
644
- ]
645
- },
646
- {
647
- transformFn: import_float2.transformRESTFloatToSDKFloat,
648
- paths: [
649
- { path: "section.ordering" },
650
- { path: "section.description.image.focalPoint.x" },
651
- { path: "section.description.image.focalPoint.y" },
652
- {
653
- path: "section.description.video.resolutions.poster.focalPoint.x"
654
- },
655
- {
656
- path: "section.description.video.resolutions.poster.focalPoint.y"
657
- },
658
- { path: "section.description.video.posters.focalPoint.x" },
659
- { path: "section.description.video.posters.focalPoint.y" }
660
- ]
661
- }
662
- ])
663
- };
664
- return metadata;
665
- }
666
- return __cloneSection;
667
- }
668
- function moveSection(payload) {
669
- function __moveSection({ host }) {
670
- const metadata = {
671
- entityFqdn: "wix.online_programs.v3.section",
672
- method: "PATCH",
673
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.MoveSection",
674
- packageName: PACKAGE_NAME,
675
- migrationOptions: {
676
- optInTransformResponse: true
677
- },
678
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
679
- protoPath: "/v3/sections/move",
680
- data: payload,
681
- host
682
- }),
683
- data: payload,
684
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
685
- {
686
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
687
- paths: [
688
- { path: "section.createdDate" },
689
- { path: "section.updatedDate" },
690
- { path: "section.description.image.urlExpirationDate" },
691
- { path: "section.description.video.urlExpirationDate" },
692
- {
693
- path: "section.description.video.resolutions.urlExpirationDate"
694
- },
695
- {
696
- path: "section.description.video.resolutions.poster.urlExpirationDate"
697
- },
698
- { path: "section.description.video.posters.urlExpirationDate" }
699
- ]
700
- },
701
- {
702
- transformFn: import_float2.transformRESTFloatToSDKFloat,
703
- paths: [
704
- { path: "section.ordering" },
705
- { path: "section.description.image.focalPoint.x" },
706
- { path: "section.description.image.focalPoint.y" },
707
- {
708
- path: "section.description.video.resolutions.poster.focalPoint.x"
709
- },
710
- {
711
- path: "section.description.video.resolutions.poster.focalPoint.y"
712
- },
713
- { path: "section.description.video.posters.focalPoint.x" },
714
- { path: "section.description.video.posters.focalPoint.y" }
715
- ]
716
- }
717
- ])
718
- };
719
- return metadata;
720
- }
721
- return __moveSection;
722
- }
723
- function publishSection(payload) {
724
- function __publishSection({ host }) {
725
- const metadata = {
726
- entityFqdn: "wix.online_programs.v3.section",
727
- method: "PATCH",
728
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.PublishSection",
729
- packageName: PACKAGE_NAME,
730
- migrationOptions: {
731
- optInTransformResponse: true
732
- },
733
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
734
- protoPath: "/v3/sections/publish",
735
- data: payload,
736
- host
737
- }),
738
- data: payload,
739
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
740
- {
741
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
742
- paths: [
743
- { path: "section.createdDate" },
744
- { path: "section.updatedDate" },
745
- { path: "section.description.image.urlExpirationDate" },
746
- { path: "section.description.video.urlExpirationDate" },
747
- {
748
- path: "section.description.video.resolutions.urlExpirationDate"
749
- },
750
- {
751
- path: "section.description.video.resolutions.poster.urlExpirationDate"
752
- },
753
- { path: "section.description.video.posters.urlExpirationDate" }
754
- ]
755
- },
756
- {
757
- transformFn: import_float2.transformRESTFloatToSDKFloat,
758
- paths: [
759
- { path: "section.ordering" },
760
- { path: "section.description.image.focalPoint.x" },
761
- { path: "section.description.image.focalPoint.y" },
762
- {
763
- path: "section.description.video.resolutions.poster.focalPoint.x"
764
- },
765
- {
766
- path: "section.description.video.resolutions.poster.focalPoint.y"
767
- },
768
- { path: "section.description.video.posters.focalPoint.x" },
769
- { path: "section.description.video.posters.focalPoint.y" }
770
- ]
771
- }
772
- ])
773
- };
774
- return metadata;
775
- }
776
- return __publishSection;
777
- }
778
-
779
- // src/online-programs-v3-section-sections.universal.ts
780
- var import_image = require("@wix/sdk-runtime/transformations/image");
781
- var import_image2 = require("@wix/sdk-runtime/transformations/image");
782
- var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
783
- var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
784
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
785
- var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
786
- var State = /* @__PURE__ */ ((State2) => {
787
- State2["DRAFT"] = "DRAFT";
788
- State2["PUBLISHED"] = "PUBLISHED";
789
- return State2;
790
- })(State || {});
791
- var Enum = /* @__PURE__ */ ((Enum2) => {
792
- Enum2["UNKNOWN"] = "UNKNOWN";
793
- Enum2["PROTECTED"] = "PROTECTED";
794
- Enum2["PRIVATE"] = "PRIVATE";
795
- Enum2["PUBLIC"] = "PUBLIC";
796
- Enum2["UNCHANGED"] = "UNCHANGED";
797
- Enum2["GROUP_PROTECTED"] = "GROUP_PROTECTED";
798
- return Enum2;
799
- })(Enum || {});
800
- var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
801
- RequestedFields2["TOTAL_STEPS"] = "TOTAL_STEPS";
802
- return RequestedFields2;
803
- })(RequestedFields || {});
804
- var BulkActionType = /* @__PURE__ */ ((BulkActionType2) => {
805
- BulkActionType2["UNKNOWN_ACTION_TYPE"] = "UNKNOWN_ACTION_TYPE";
806
- BulkActionType2["INSERT"] = "INSERT";
807
- BulkActionType2["UPDATE"] = "UPDATE";
808
- BulkActionType2["DELETE"] = "DELETE";
809
- return BulkActionType2;
810
- })(BulkActionType || {});
811
- var DescriptionFieldSet = /* @__PURE__ */ ((DescriptionFieldSet2) => {
812
- DescriptionFieldSet2["STANDARD"] = "STANDARD";
813
- DescriptionFieldSet2["EXTENDED"] = "EXTENDED";
814
- return DescriptionFieldSet2;
815
- })(DescriptionFieldSet || {});
816
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
817
- SortOrder2["ASC"] = "ASC";
818
- SortOrder2["DESC"] = "DESC";
819
- return SortOrder2;
820
- })(SortOrder || {});
821
- var SearchIndexingNotificationState = /* @__PURE__ */ ((SearchIndexingNotificationState2) => {
822
- SearchIndexingNotificationState2["Unknown"] = "Unknown";
823
- SearchIndexingNotificationState2["Off"] = "Off";
824
- SearchIndexingNotificationState2["On"] = "On";
825
- return SearchIndexingNotificationState2;
826
- })(SearchIndexingNotificationState || {});
827
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
828
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
829
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
830
- WebhookIdentityType2["MEMBER"] = "MEMBER";
831
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
832
- WebhookIdentityType2["APP"] = "APP";
833
- return WebhookIdentityType2;
834
- })(WebhookIdentityType || {});
835
- async function createSection2(section, options) {
836
- const { httpClient, sideEffects } = arguments[2];
837
- const payload = (0, import_transform_paths2.transformPaths)(
838
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
839
- section,
840
- fields: options?.fields
841
- }),
842
- [
843
- {
844
- transformFn: import_image.transformSDKImageToRESTImage,
845
- paths: [{ path: "section.description.image" }]
846
- },
847
- {
848
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
849
- paths: [{ path: "section.description.video" }]
850
- }
851
- ]
852
- );
853
- const reqOpts = createSection(payload);
854
- sideEffects?.onSiteCall?.();
855
- try {
856
- const result = await httpClient.request(reqOpts);
857
- sideEffects?.onSuccess?.(result);
858
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
859
- (0, import_transform_paths2.transformPaths)(result.data, [
860
- {
861
- transformFn: import_image2.transformRESTImageToSDKImage,
862
- paths: [{ path: "section.description.image" }]
863
- },
864
- {
865
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
866
- paths: [{ path: "section.description.video" }]
867
- }
868
- ])
869
- )?.section;
870
- } catch (err) {
871
- const transformedError = (0, import_transform_error.transformError)(
872
- err,
873
- {
874
- spreadPathsToArguments: {},
875
- explicitPathsToArguments: { section: "$[0]", fields: "$[1].fields" },
876
- singleArgumentUnchanged: false
877
- },
878
- ["section", "options"]
879
- );
880
- sideEffects?.onError?.(err);
881
- throw transformedError;
882
- }
883
- }
884
- async function bulkCreateSections2(sections, options) {
885
- const { httpClient, sideEffects } = arguments[2];
886
- const payload = (0, import_transform_paths2.transformPaths)(
887
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
888
- sections,
889
- fields: options?.fields
890
- }),
891
- [
892
- {
893
- transformFn: import_image.transformSDKImageToRESTImage,
894
- paths: [{ path: "sections.description.image" }]
895
- },
896
- {
897
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
898
- paths: [{ path: "sections.description.video" }]
899
- }
900
- ]
901
- );
902
- const reqOpts = bulkCreateSections(payload);
903
- sideEffects?.onSiteCall?.();
904
- try {
905
- const result = await httpClient.request(reqOpts);
906
- sideEffects?.onSuccess?.(result);
907
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
908
- (0, import_transform_paths2.transformPaths)(result.data, [
909
- {
910
- transformFn: import_image2.transformRESTImageToSDKImage,
911
- paths: [{ path: "results.item.description.image" }]
912
- },
913
- {
914
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
915
- paths: [{ path: "results.item.description.video" }]
916
- }
917
- ])
918
- );
919
- } catch (err) {
920
- const transformedError = (0, import_transform_error.transformError)(
921
- err,
922
- {
923
- spreadPathsToArguments: {},
924
- explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
925
- singleArgumentUnchanged: false
926
- },
927
- ["sections", "options"]
928
- );
929
- sideEffects?.onError?.(err);
930
- throw transformedError;
931
- }
932
- }
933
- async function getSection2(sectionId, options) {
934
- const { httpClient, sideEffects } = arguments[2];
935
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
936
- sectionId,
937
- descriptionFieldSet: options?.descriptionFieldSet,
938
- fields: options?.fields
939
- });
940
- const reqOpts = getSection(payload);
941
- sideEffects?.onSiteCall?.();
942
- try {
943
- const result = await httpClient.request(reqOpts);
944
- sideEffects?.onSuccess?.(result);
945
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
946
- (0, import_transform_paths2.transformPaths)(result.data, [
947
- {
948
- transformFn: import_image2.transformRESTImageToSDKImage,
949
- paths: [{ path: "section.description.image" }]
950
- },
951
- {
952
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
953
- paths: [{ path: "section.description.video" }]
954
- }
955
- ])
956
- )?.section;
957
- } catch (err) {
958
- const transformedError = (0, import_transform_error.transformError)(
959
- err,
960
- {
961
- spreadPathsToArguments: {},
962
- explicitPathsToArguments: {
963
- sectionId: "$[0]",
964
- descriptionFieldSet: "$[1].descriptionFieldSet",
965
- fields: "$[1].fields"
966
- },
967
- singleArgumentUnchanged: false
968
- },
969
- ["sectionId", "options"]
970
- );
971
- sideEffects?.onError?.(err);
972
- throw transformedError;
973
- }
974
- }
975
- async function updateSection2(_id, options) {
976
- const { httpClient, sideEffects } = arguments[2];
977
- const payload = (0, import_transform_paths2.transformPaths)(
978
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
979
- section: { ...options?.section, id: _id },
980
- fields: options?.fields
981
- }),
982
- [
983
- {
984
- transformFn: import_image.transformSDKImageToRESTImage,
985
- paths: [{ path: "section.description.image" }]
986
- },
987
- {
988
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
989
- paths: [{ path: "section.description.video" }]
990
- }
991
- ]
992
- );
993
- const reqOpts = updateSection(payload);
994
- sideEffects?.onSiteCall?.();
995
- try {
996
- const result = await httpClient.request(reqOpts);
997
- sideEffects?.onSuccess?.(result);
998
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
999
- (0, import_transform_paths2.transformPaths)(result.data, [
1000
- {
1001
- transformFn: import_image2.transformRESTImageToSDKImage,
1002
- paths: [{ path: "section.description.image" }]
1003
- },
1004
- {
1005
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1006
- paths: [{ path: "section.description.video" }]
1007
- }
1008
- ])
1009
- )?.section;
1010
- } catch (err) {
1011
- const transformedError = (0, import_transform_error.transformError)(
1012
- err,
1013
- {
1014
- spreadPathsToArguments: { section: "$[1].section" },
1015
- explicitPathsToArguments: {
1016
- "section.id": "$[0]",
1017
- fields: "$[1].fields"
1018
- },
1019
- singleArgumentUnchanged: false
1020
- },
1021
- ["_id", "options"]
1022
- );
1023
- sideEffects?.onError?.(err);
1024
- throw transformedError;
1025
- }
1026
- }
1027
- async function deleteSection2(sectionId) {
1028
- const { httpClient, sideEffects } = arguments[1];
1029
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1030
- sectionId
1031
- });
1032
- const reqOpts = deleteSection(payload);
1033
- sideEffects?.onSiteCall?.();
1034
- try {
1035
- const result = await httpClient.request(reqOpts);
1036
- sideEffects?.onSuccess?.(result);
1037
- } catch (err) {
1038
- const transformedError = (0, import_transform_error.transformError)(
1039
- err,
1040
- {
1041
- spreadPathsToArguments: {},
1042
- explicitPathsToArguments: { sectionId: "$[0]" },
1043
- singleArgumentUnchanged: false
1044
- },
1045
- ["sectionId"]
1046
- );
1047
- sideEffects?.onError?.(err);
1048
- throw transformedError;
1049
- }
1050
- }
1051
- function querySections2(options) {
1052
- const { httpClient, sideEffects } = arguments[1];
1053
- return (0, import_query_builder.queryBuilder)({
1054
- func: async (payload) => {
1055
- const reqOpts = querySections({
1056
- ...payload,
1057
- ...options ?? {}
1058
- });
1059
- sideEffects?.onSiteCall?.();
1060
- try {
1061
- const result = await httpClient.request(reqOpts);
1062
- sideEffects?.onSuccess?.(result);
1063
- return result;
1064
- } catch (err) {
1065
- sideEffects?.onError?.(err);
1066
- throw err;
1067
- }
1068
- },
1069
- requestTransformer: (query) => {
1070
- const args = [query, options];
1071
- return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1072
- ...args?.[1],
1073
- query: args?.[0]
1074
- });
1075
- },
1076
- responseTransformer: ({ data }) => {
1077
- const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1078
- (0, import_transform_paths2.transformPaths)(data, [
1079
- {
1080
- transformFn: import_image2.transformRESTImageToSDKImage,
1081
- paths: [{ path: "sections.description.image" }]
1082
- },
1083
- {
1084
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1085
- paths: [{ path: "sections.description.video" }]
1086
- }
1087
- ])
1088
- );
1089
- return {
1090
- items: transformedData?.sections,
1091
- pagingMetadata: transformedData?.pagingMetadata
1092
- };
1093
- },
1094
- errorTransformer: (err) => {
1095
- const transformedError = (0, import_transform_error.transformError)(err, {
1096
- spreadPathsToArguments: {},
1097
- explicitPathsToArguments: { query: "$[0]" },
1098
- singleArgumentUnchanged: false
1099
- });
1100
- throw transformedError;
1101
- },
1102
- pagingMethod: "CURSOR",
1103
- transformationPaths: {}
1104
- });
1105
- }
1106
- async function typedQuerySections(query, options) {
1107
- const { httpClient, sideEffects } = arguments[2];
1108
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1109
- query,
1110
- ...options
1111
- });
1112
- const reqOpts = querySections(payload);
1113
- sideEffects?.onSiteCall?.();
1114
- try {
1115
- const result = await httpClient.request(reqOpts);
1116
- sideEffects?.onSuccess?.(result);
1117
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1118
- (0, import_transform_paths2.transformPaths)(result.data, [
1119
- {
1120
- transformFn: import_image2.transformRESTImageToSDKImage,
1121
- paths: [{ path: "sections.description.image" }]
1122
- },
1123
- {
1124
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1125
- paths: [{ path: "sections.description.video" }]
1126
- }
1127
- ])
1128
- );
1129
- } catch (err) {
1130
- const transformedError = (0, import_transform_error.transformError)(
1131
- err,
1132
- {
1133
- spreadPathsToArguments: {},
1134
- explicitPathsToArguments: { query: "$[0]" },
1135
- singleArgumentUnchanged: false
1136
- },
1137
- ["query", "options"]
1138
- );
1139
- sideEffects?.onError?.(err);
1140
- throw transformedError;
1141
- }
1142
- }
1143
- var utils = {
1144
- query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
1145
- };
1146
- async function listSections2(programId, options) {
1147
- const { httpClient, sideEffects } = arguments[2];
1148
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1149
- programId,
1150
- descriptionFieldSet: options?.descriptionFieldSet,
1151
- fields: options?.fields
1152
- });
1153
- const reqOpts = listSections(payload);
1154
- sideEffects?.onSiteCall?.();
1155
- try {
1156
- const result = await httpClient.request(reqOpts);
1157
- sideEffects?.onSuccess?.(result);
1158
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1159
- (0, import_transform_paths2.transformPaths)(result.data, [
1160
- {
1161
- transformFn: import_image2.transformRESTImageToSDKImage,
1162
- paths: [{ path: "sections.description.image" }]
1163
- },
1164
- {
1165
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1166
- paths: [{ path: "sections.description.video" }]
1167
- }
1168
- ])
1169
- );
1170
- } catch (err) {
1171
- const transformedError = (0, import_transform_error.transformError)(
1172
- err,
1173
- {
1174
- spreadPathsToArguments: {},
1175
- explicitPathsToArguments: {
1176
- programId: "$[0]",
1177
- descriptionFieldSet: "$[1].descriptionFieldSet",
1178
- fields: "$[1].fields"
1179
- },
1180
- singleArgumentUnchanged: false
1181
- },
1182
- ["programId", "options"]
1183
- );
1184
- sideEffects?.onError?.(err);
1185
- throw transformedError;
1186
- }
1187
- }
1188
- async function cloneSection2(sectionId, options) {
1189
- const { httpClient, sideEffects } = arguments[2];
1190
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1191
- sectionId,
1192
- fields: options?.fields
1193
- });
1194
- const reqOpts = cloneSection(payload);
1195
- sideEffects?.onSiteCall?.();
1196
- try {
1197
- const result = await httpClient.request(reqOpts);
1198
- sideEffects?.onSuccess?.(result);
1199
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1200
- (0, import_transform_paths2.transformPaths)(result.data, [
1201
- {
1202
- transformFn: import_image2.transformRESTImageToSDKImage,
1203
- paths: [{ path: "section.description.image" }]
1204
- },
1205
- {
1206
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1207
- paths: [{ path: "section.description.video" }]
1208
- }
1209
- ])
1210
- );
1211
- } catch (err) {
1212
- const transformedError = (0, import_transform_error.transformError)(
1213
- err,
1214
- {
1215
- spreadPathsToArguments: {},
1216
- explicitPathsToArguments: { sectionId: "$[0]", fields: "$[1].fields" },
1217
- singleArgumentUnchanged: false
1218
- },
1219
- ["sectionId", "options"]
1220
- );
1221
- sideEffects?.onError?.(err);
1222
- throw transformedError;
1223
- }
1224
- }
1225
- async function moveSection2(options) {
1226
- const { httpClient, sideEffects } = arguments[1];
1227
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1228
- sectionId: options?.sectionId,
1229
- afterSectionId: options?.afterSectionId,
1230
- revision: options?.revision,
1231
- fields: options?.fields
1232
- });
1233
- const reqOpts = moveSection(payload);
1234
- sideEffects?.onSiteCall?.();
1235
- try {
1236
- const result = await httpClient.request(reqOpts);
1237
- sideEffects?.onSuccess?.(result);
1238
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1239
- (0, import_transform_paths2.transformPaths)(result.data, [
1240
- {
1241
- transformFn: import_image2.transformRESTImageToSDKImage,
1242
- paths: [{ path: "section.description.image" }]
1243
- },
1244
- {
1245
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1246
- paths: [{ path: "section.description.video" }]
1247
- }
1248
- ])
1249
- );
1250
- } catch (err) {
1251
- const transformedError = (0, import_transform_error.transformError)(
1252
- err,
1253
- {
1254
- spreadPathsToArguments: {},
1255
- explicitPathsToArguments: {
1256
- sectionId: "$[0].sectionId",
1257
- afterSectionId: "$[0].afterSectionId",
1258
- revision: "$[0].revision",
1259
- fields: "$[0].fields"
1260
- },
1261
- singleArgumentUnchanged: false
1262
- },
1263
- ["options"]
1264
- );
1265
- sideEffects?.onError?.(err);
1266
- throw transformedError;
1267
- }
1268
- }
1269
- async function publishSection2(options) {
1270
- const { httpClient, sideEffects } = arguments[1];
1271
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1272
- sectionId: options?.sectionId,
1273
- revision: options?.revision,
1274
- fields: options?.fields
1275
- });
1276
- const reqOpts = publishSection(payload);
1277
- sideEffects?.onSiteCall?.();
1278
- try {
1279
- const result = await httpClient.request(reqOpts);
1280
- sideEffects?.onSuccess?.(result);
1281
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1282
- (0, import_transform_paths2.transformPaths)(result.data, [
1283
- {
1284
- transformFn: import_image2.transformRESTImageToSDKImage,
1285
- paths: [{ path: "section.description.image" }]
1286
- },
1287
- {
1288
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1289
- paths: [{ path: "section.description.video" }]
1290
- }
1291
- ])
1292
- );
1293
- } catch (err) {
1294
- const transformedError = (0, import_transform_error.transformError)(
1295
- err,
1296
- {
1297
- spreadPathsToArguments: {},
1298
- explicitPathsToArguments: {
1299
- sectionId: "$[0].sectionId",
1300
- revision: "$[0].revision",
1301
- fields: "$[0].fields"
1302
- },
1303
- singleArgumentUnchanged: false
1304
- },
1305
- ["options"]
1306
- );
1307
- sideEffects?.onError?.(err);
1308
- throw transformedError;
1309
- }
1310
- }
1311
-
1312
- // src/online-programs-v3-section-sections.public.ts
1313
- function createSection3(httpClient) {
1314
- return (section, options) => createSection2(
1315
- section,
1316
- options,
1317
- // @ts-ignore
1318
- { httpClient }
1319
- );
1320
- }
1321
- function bulkCreateSections3(httpClient) {
1322
- return (sections, options) => bulkCreateSections2(
1323
- sections,
1324
- options,
1325
- // @ts-ignore
1326
- { httpClient }
1327
- );
1328
- }
1329
- function getSection3(httpClient) {
1330
- return (sectionId, options) => getSection2(
1331
- sectionId,
1332
- options,
1333
- // @ts-ignore
1334
- { httpClient }
1335
- );
1336
- }
1337
- function updateSection3(httpClient) {
1338
- return (_id, options) => updateSection2(
1339
- _id,
1340
- options,
1341
- // @ts-ignore
1342
- { httpClient }
1343
- );
1344
- }
1345
- function deleteSection3(httpClient) {
1346
- return (sectionId) => deleteSection2(
1347
- sectionId,
1348
- // @ts-ignore
1349
- { httpClient }
1350
- );
1351
- }
1352
- function querySections3(httpClient) {
1353
- return (options) => querySections2(
1354
- options,
1355
- // @ts-ignore
1356
- { httpClient }
1357
- );
1358
- }
1359
- function typedQuerySections2(httpClient) {
1360
- return (query, options) => typedQuerySections(
1361
- query,
1362
- options,
1363
- // @ts-ignore
1364
- { httpClient }
1365
- );
1366
- }
1367
- function listSections3(httpClient) {
1368
- return (programId, options) => listSections2(
1369
- programId,
1370
- options,
1371
- // @ts-ignore
1372
- { httpClient }
1373
- );
1374
- }
1375
- function cloneSection3(httpClient) {
1376
- return (sectionId, options) => cloneSection2(
1377
- sectionId,
1378
- options,
1379
- // @ts-ignore
1380
- { httpClient }
1381
- );
1382
- }
1383
- function moveSection3(httpClient) {
1384
- return (options) => moveSection2(
1385
- options,
1386
- // @ts-ignore
1387
- { httpClient }
1388
- );
1389
- }
1390
- function publishSection3(httpClient) {
1391
- return (options) => publishSection2(
1392
- options,
1393
- // @ts-ignore
1394
- { httpClient }
1395
- );
1396
- }
1397
-
1398
- // src/online-programs-v3-section-sections.context.ts
1399
- var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1400
- var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
1401
- function customQuerySections(httpClient) {
1402
- const router = /* @__PURE__ */ (0, import_query_method_router.createQueryOverloadRouter)({
1403
- builderQueryFunction: (options) => querySections3(httpClient)(options),
1404
- typedQueryFunction: (query, options) => typedQuerySections2(httpClient)(query, options),
1405
- hasOptionsParameter: true
1406
- });
1407
- function overloadedQuery(queryOrOptions, options) {
1408
- return router(...arguments);
1409
- }
1410
- return overloadedQuery;
1411
- }
1412
- var createSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createSection3);
1413
- var bulkCreateSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSections3);
1414
- var getSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSection3);
1415
- var updateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSection3);
1416
- var deleteSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteSection3);
1417
- var listSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSections3);
1418
- var cloneSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cloneSection3);
1419
- var moveSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(moveSection3);
1420
- var publishSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishSection3);
1421
- var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQuerySections);
1422
- // Annotate the CommonJS export names for ESM import in node:
1423
- 0 && (module.exports = {
1424
- BulkActionType,
1425
- DescriptionFieldSet,
1426
- Enum,
1427
- RequestedFields,
1428
- SearchIndexingNotificationState,
1429
- SortOrder,
1430
- State,
1431
- WebhookIdentityType,
1432
- bulkCreateSections,
1433
- cloneSection,
1434
- createSection,
1435
- deleteSection,
1436
- getSection,
1437
- listSections,
1438
- moveSection,
1439
- publishSection,
1440
- querySections,
1441
- updateSection,
1442
- utils
1443
- });
1444
- //# sourceMappingURL=index.js.map