@wix/auto_sdk_online-programs_sections 1.0.0

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