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