@wix/auto_sdk_online-programs_sections 1.0.17 → 1.0.19

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