@wix/auto_sdk_online-programs_sections 1.0.12 → 1.0.14

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 (50) hide show
  1. package/build/cjs/index.d.ts +49 -31
  2. package/build/cjs/index.js +18 -149
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +221 -154
  5. package/build/cjs/index.typings.js +18 -141
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +89 -77
  8. package/build/cjs/meta.js +8 -111
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +537 -0
  11. package/build/cjs/schemas.js +852 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +49 -31
  14. package/build/es/index.mjs +16 -147
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +221 -154
  17. package/build/es/index.typings.mjs +16 -139
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +89 -77
  20. package/build/es/meta.mjs +8 -110
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +537 -0
  23. package/build/es/schemas.mjs +796 -0
  24. package/build/es/schemas.mjs.map +1 -0
  25. package/build/internal/cjs/index.d.ts +49 -31
  26. package/build/internal/cjs/index.js +18 -149
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +221 -154
  29. package/build/internal/cjs/index.typings.js +18 -141
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +89 -77
  32. package/build/internal/cjs/meta.js +8 -111
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +537 -0
  35. package/build/internal/cjs/schemas.js +852 -0
  36. package/build/internal/cjs/schemas.js.map +1 -0
  37. package/build/internal/es/index.d.mts +49 -31
  38. package/build/internal/es/index.mjs +16 -147
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +221 -154
  41. package/build/internal/es/index.typings.mjs +16 -139
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +89 -77
  44. package/build/internal/es/meta.mjs +8 -110
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +537 -0
  47. package/build/internal/es/schemas.mjs +796 -0
  48. package/build/internal/es/schemas.mjs.map +1 -0
  49. package/package.json +12 -5
  50. package/schemas/package.json +3 -0
@@ -1,86 +1,105 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { Section, CreateSectionOptions, BulkCreateSectionOptions, BulkCreateSectionResponse, BulkCreateSectionMigrationResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.js';
3
- export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteAllProgramSectionsRequest, DeleteAllProgramSectionsResponse, DeleteByFilterOperation, DeleteByIdsOperation, DeleteSectionRequest, DeleteSectionResponse, Description, DescriptionFieldSet, DescriptionFieldSetWithLiterals, DescriptionMediaOneOf, DocumentImage, DocumentPayload, DocumentUpdateOperation, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Enum, EnumWithLiterals, ExtendedFields, FocalPoint, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, IndexDocument, ItemMetadata, ListSectionsRequest, MessageEnvelope, MoveSectionRequest, PublishSectionRequest, QuerySectionsRequest, QuerySectionsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RestoreSectionFromTrashRequest, RestoreSectionFromTrashResponse, SearchIndexingNotification, SearchIndexingNotificationState, SearchIndexingNotificationStateWithLiterals, SectionCloned, SectionDeleted, SectionMoved, SectionPublished, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, VideoResolution, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
2
+ import { Section, CreateSectionOptions, BulkCreateSectionOptions, BulkCreateSectionResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionMigrationResponse, BulkCreateSectionRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteAllProgramSectionsRequest, DeleteAllProgramSectionsResponse, DeleteByFilterOperation, DeleteByIdsOperation, DeleteSectionRequest, DeleteSectionResponse, Description, DescriptionFieldSet, DescriptionFieldSetWithLiterals, DescriptionMediaOneOf, DocumentImage, DocumentPayload, DocumentUpdateOperation, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Enum, EnumWithLiterals, ExtendedFields, FocalPoint, GetSectionRequest, GetSectionResponse, IdentificationData, IdentificationDataIdOneOf, IndexDocument, ItemMetadata, ListSectionsRequest, MessageEnvelope, MoveSectionRequest, PublishSectionRequest, QuerySectionsRequest, QuerySectionsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RestoreSectionFromTrashRequest, RestoreSectionFromTrashResponse, SearchIndexingNotification, SearchIndexingNotificationState, SearchIndexingNotificationStateWithLiterals, SectionCloned, SectionDeleted, SectionMoved, SectionPublished, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, VideoResolution, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
4
4
 
5
5
  declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
6
6
  interface CreateSectionSignature {
7
7
  /**
8
- * Creates a Section.
9
- * @param - Section to be created.
10
- * @returns The created Section.
8
+ * Creates a section.
9
+ *
10
+ * The section is added to the program identified by `section.program_id`. Provide that program ID in the request. Set `section.description.title` for the section title. `section.description.details`, `section.description.image`, and `section.description.video` are deprecated backward-compatibility fields. The stored ordering value is assigned automatically.
11
+ *
12
+ * To create multiple sections in a single API call, call [Bulk Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-section).
13
+ * @param - Section to create. Must include `section.program_id`.
14
+ * @returns Created section.
11
15
  */
12
16
  (section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
13
17
  }
14
18
  declare function bulkCreateSection$1(httpClient: HttpClient): BulkCreateSectionSignature;
15
19
  interface BulkCreateSectionSignature {
16
20
  /**
17
- * Bulk Section creation.
18
- * @param - List of sections you want to create
21
+ * Creates up to 100 sections in a single API call.
22
+ *
23
+ * All sections in the request must include `program_id` and belong to the same program. Set `description.title` for each section title. `description.details`, `description.image`, and `description.video` are deprecated backward-compatibility fields. The stored ordering values are assigned automatically.
24
+ *
25
+ * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
26
+ * @param - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
19
27
  */
20
28
  (sections: Section[], options?: BulkCreateSectionOptions): Promise<NonNullablePaths<BulkCreateSectionResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.programId` | `results.${number}.item.description.title` | `results.${number}.item.state` | `results.${number}.item.oldTotalSteps` | `results.${number}.item.trialSection` | `results.${number}.item.ordering` | `results.${number}.item.delayInDays` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
21
29
  }
22
- declare function bulkCreateSectionMigration$1(httpClient: HttpClient): BulkCreateSectionMigrationSignature;
23
- interface BulkCreateSectionMigrationSignature {
24
- /**
25
- * Bulk Section creation for migration.
26
- * @param - List of sections you want to create
27
- */
28
- (sections: Section[]): Promise<NonNullablePaths<BulkCreateSectionMigrationResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.item.programId` | `results.${number}.item.description.title` | `results.${number}.item.state` | `results.${number}.item.oldTotalSteps` | `results.${number}.item.trialSection` | `results.${number}.item.ordering` | `results.${number}.item.delayInDays` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
29
- }
30
30
  declare function getSection$1(httpClient: HttpClient): GetSectionSignature;
31
31
  interface GetSectionSignature {
32
32
  /**
33
- * Retrieves a Section.
33
+ * Retrieves a section.
34
+ *
35
+ * `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
34
36
  * @param - ID of the Section to retrieve.
35
- * @returns The requested Section.
37
+ * @returns Retrieved section.
36
38
  */
37
39
  (sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
38
40
  }
39
41
  declare function updateSection$1(httpClient: HttpClient): UpdateSectionSignature;
40
42
  interface UpdateSectionSignature {
41
43
  /**
42
- * Updates a Section.
43
- * @param - Program Section ID.
44
- * @returns Updated Section.
44
+ * Updates a section.
45
+ *
46
+ * Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when updating the section. This ensures you're working with the latest section and prevents unintended overwrites.
47
+ *
48
+ * Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section). To publish a section, call [Publish Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/publish-section).
49
+ * @param - Section ID.
50
+ * @returns Updated section.
45
51
  */
46
52
  (_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
47
53
  }
48
54
  declare function deleteSection$1(httpClient: HttpClient): DeleteSectionSignature;
49
55
  interface DeleteSectionSignature {
50
56
  /**
51
- * Deletes a Section.
52
- * Deleting a Section permanently removes them from the Section List.
53
- * @param - Id of the Section to delete.
57
+ * Permanently deletes a section from the public API.
58
+ *
59
+ * Deleted sections aren't returned by standard retrieval and list methods. The public API doesn't expose trash-bin or restore operations.
60
+ * @param - ID of the section to delete.
54
61
  */
55
62
  (sectionId: string): Promise<void>;
56
63
  }
57
64
  declare function listSections$1(httpClient: HttpClient): ListSectionsSignature;
58
65
  interface ListSectionsSignature {
59
66
  /**
60
- * List sections per program id
61
- * @param - Program id to list sections
67
+ * Retrieves the sections in a program.
68
+ *
69
+ * Results are sorted by `ordering` in ascending order. `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
70
+ *
71
+ * To filter or sort sections, call [Query Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/query-sections).
72
+ * @param - Program ID to list sections for.
62
73
  */
63
74
  (programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.state` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
64
75
  }
65
76
  declare function cloneSection$1(httpClient: HttpClient): CloneSectionSignature;
66
77
  interface CloneSectionSignature {
67
78
  /**
68
- * Clones section with specified id
69
- * @param - Section to clone
79
+ * Clones a section.
80
+ *
81
+ * The cloned section is added to the same program after the current last section. Translation content is copied to the cloned section.
82
+ * @param - ID of the section to clone.
70
83
  */
71
84
  (sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
72
85
  }
73
86
  declare function moveSection$1(httpClient: HttpClient): MoveSectionSignature;
74
87
  interface MoveSectionSignature {
75
88
  /**
76
- * Places section after specified one or inserts it in the beginning
89
+ * Moves a section within its program.
90
+ *
91
+ * If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
77
92
  */
78
93
  (options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
79
94
  }
80
95
  declare function publishSection$1(httpClient: HttpClient): PublishSectionSignature;
81
96
  interface PublishSectionSignature {
82
97
  /**
83
- * Publishes section
98
+ * Publishes a section.
99
+ *
100
+ * Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when publishing the section. This ensures you're working with the latest section and prevents unintended overwrites.
101
+ *
102
+ * Publishing sets the section's `state` to `PUBLISHED`.
84
103
  */
85
104
  (options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
86
105
  }
@@ -91,7 +110,6 @@ declare function customQuerySections(httpClient: HttpClient): {
91
110
  };
92
111
  declare const createSection: MaybeContext<BuildRESTFunction<typeof createSection$1> & typeof createSection$1>;
93
112
  declare const bulkCreateSection: MaybeContext<BuildRESTFunction<typeof bulkCreateSection$1> & typeof bulkCreateSection$1>;
94
- declare const bulkCreateSectionMigration: MaybeContext<BuildRESTFunction<typeof bulkCreateSectionMigration$1> & typeof bulkCreateSectionMigration$1>;
95
113
  declare const getSection: MaybeContext<BuildRESTFunction<typeof getSection$1> & typeof getSection$1>;
96
114
  declare const updateSection: MaybeContext<BuildRESTFunction<typeof updateSection$1> & typeof updateSection$1>;
97
115
  declare const deleteSection: MaybeContext<BuildRESTFunction<typeof deleteSection$1> & typeof deleteSection$1>;
@@ -101,4 +119,4 @@ declare const moveSection: MaybeContext<BuildRESTFunction<typeof moveSection$1>
101
119
  declare const publishSection: MaybeContext<BuildRESTFunction<typeof publishSection$1> & typeof publishSection$1>;
102
120
  declare const querySections: MaybeContext<BuildRESTFunction<typeof customQuerySections> & typeof customQuerySections>;
103
121
 
104
- export { BulkCreateSectionMigrationResponse, BulkCreateSectionOptions, BulkCreateSectionResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, QuerySectionsOptions, Section, SectionQuery, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSection, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
122
+ export { BulkCreateSectionOptions, BulkCreateSectionResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, QuerySectionsOptions, Section, SectionQuery, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSection, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
@@ -29,7 +29,6 @@ __export(index_exports, {
29
29
  State: () => State,
30
30
  WebhookIdentityType: () => WebhookIdentityType,
31
31
  bulkCreateSection: () => bulkCreateSection4,
32
- bulkCreateSectionMigration: () => bulkCreateSectionMigration4,
33
32
  cloneSection: () => cloneSection4,
34
33
  createSection: () => createSection4,
35
34
  deleteSection: () => deleteSection4,
@@ -38,7 +37,8 @@ __export(index_exports, {
38
37
  moveSection: () => moveSection4,
39
38
  publishSection: () => publishSection4,
40
39
  querySections: () => querySections4,
41
- updateSection: () => updateSection4
40
+ updateSection: () => updateSection4,
41
+ utils: () => utils
42
42
  });
43
43
  module.exports = __toCommonJS(index_exports);
44
44
 
@@ -142,6 +142,14 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
142
142
  {
143
143
  srcPath: "/program-sections-service",
144
144
  destPath: ""
145
+ },
146
+ {
147
+ srcPath: "/online-programs/v3/sections",
148
+ destPath: "/v3/sections"
149
+ },
150
+ {
151
+ srcPath: "/online-programs/v3/bulk/sections",
152
+ destPath: "/v3/bulk/sections"
145
153
  }
146
154
  ]
147
155
  };
@@ -320,95 +328,6 @@ function bulkCreateSection(payload) {
320
328
  }
321
329
  return __bulkCreateSection;
322
330
  }
323
- function bulkCreateSectionMigration(payload) {
324
- function __bulkCreateSectionMigration({ host }) {
325
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
326
- {
327
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
328
- paths: [
329
- { path: "sections.createdDate" },
330
- { path: "sections.updatedDate" },
331
- { path: "sections.description.image.urlExpirationDate" },
332
- { path: "sections.description.video.urlExpirationDate" },
333
- { path: "sections.description.video.resolutions.urlExpirationDate" },
334
- {
335
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
336
- },
337
- { path: "sections.description.video.posters.urlExpirationDate" }
338
- ]
339
- },
340
- {
341
- transformFn: import_float.transformSDKFloatToRESTFloat,
342
- paths: [
343
- { path: "sections.ordering" },
344
- { path: "sections.description.image.focalPoint.x" },
345
- { path: "sections.description.image.focalPoint.y" },
346
- {
347
- path: "sections.description.video.resolutions.poster.focalPoint.x"
348
- },
349
- {
350
- path: "sections.description.video.resolutions.poster.focalPoint.y"
351
- },
352
- { path: "sections.description.video.posters.focalPoint.x" },
353
- { path: "sections.description.video.posters.focalPoint.y" }
354
- ]
355
- }
356
- ]);
357
- const metadata = {
358
- entityFqdn: "wix.online_programs.v3.section",
359
- method: "POST",
360
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration",
361
- packageName: PACKAGE_NAME,
362
- migrationOptions: {
363
- optInTransformResponse: true
364
- },
365
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
366
- protoPath: "/v3/bulk/sections/create/migration",
367
- data: serializedData,
368
- host
369
- }),
370
- data: serializedData,
371
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
372
- {
373
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
374
- paths: [
375
- { path: "results.item.createdDate" },
376
- { path: "results.item.updatedDate" },
377
- { path: "results.item.description.image.urlExpirationDate" },
378
- { path: "results.item.description.video.urlExpirationDate" },
379
- {
380
- path: "results.item.description.video.resolutions.urlExpirationDate"
381
- },
382
- {
383
- path: "results.item.description.video.resolutions.poster.urlExpirationDate"
384
- },
385
- {
386
- path: "results.item.description.video.posters.urlExpirationDate"
387
- }
388
- ]
389
- },
390
- {
391
- transformFn: import_float2.transformRESTFloatToSDKFloat,
392
- paths: [
393
- { path: "results.item.ordering" },
394
- { path: "results.item.description.image.focalPoint.x" },
395
- { path: "results.item.description.image.focalPoint.y" },
396
- {
397
- path: "results.item.description.video.resolutions.poster.focalPoint.x"
398
- },
399
- {
400
- path: "results.item.description.video.resolutions.poster.focalPoint.y"
401
- },
402
- { path: "results.item.description.video.posters.focalPoint.x" },
403
- { path: "results.item.description.video.posters.focalPoint.y" }
404
- ]
405
- }
406
- ])
407
- };
408
- return metadata;
409
- }
410
- return __bulkCreateSectionMigration;
411
- }
412
331
  function getSection(payload) {
413
332
  function __getSection({ host }) {
414
333
  const metadata = {
@@ -854,8 +773,8 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
854
773
  var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
855
774
  var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
856
775
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
776
+ var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
857
777
  var State = /* @__PURE__ */ ((State2) => {
858
- State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
859
778
  State2["DRAFT"] = "DRAFT";
860
779
  State2["PUBLISHED"] = "PUBLISHED";
861
780
  return State2;
@@ -870,7 +789,6 @@ var Enum = /* @__PURE__ */ ((Enum2) => {
870
789
  return Enum2;
871
790
  })(Enum || {});
872
791
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
873
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
874
792
  RequestedFields2["TOTAL_STEPS"] = "TOTAL_STEPS";
875
793
  return RequestedFields2;
876
794
  })(RequestedFields || {});
@@ -1003,52 +921,6 @@ async function bulkCreateSection2(sections, options) {
1003
921
  throw transformedError;
1004
922
  }
1005
923
  }
1006
- async function bulkCreateSectionMigration2(sections) {
1007
- const { httpClient, sideEffects } = arguments[1];
1008
- const payload = (0, import_transform_paths2.transformPaths)(
1009
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ sections }),
1010
- [
1011
- {
1012
- transformFn: import_image.transformSDKImageToRESTImage,
1013
- paths: [{ path: "sections.description.image" }]
1014
- },
1015
- {
1016
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1017
- paths: [{ path: "sections.description.video" }]
1018
- }
1019
- ]
1020
- );
1021
- const reqOpts = bulkCreateSectionMigration(payload);
1022
- sideEffects?.onSiteCall?.();
1023
- try {
1024
- const result = await httpClient.request(reqOpts);
1025
- sideEffects?.onSuccess?.(result);
1026
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1027
- (0, import_transform_paths2.transformPaths)(result.data, [
1028
- {
1029
- transformFn: import_image2.transformRESTImageToSDKImage,
1030
- paths: [{ path: "results.item.description.image" }]
1031
- },
1032
- {
1033
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1034
- paths: [{ path: "results.item.description.video" }]
1035
- }
1036
- ])
1037
- );
1038
- } catch (err) {
1039
- const transformedError = (0, import_transform_error.transformError)(
1040
- err,
1041
- {
1042
- spreadPathsToArguments: {},
1043
- explicitPathsToArguments: { sections: "$[0]" },
1044
- singleArgumentUnchanged: false
1045
- },
1046
- ["sections"]
1047
- );
1048
- sideEffects?.onError?.(err);
1049
- throw transformedError;
1050
- }
1051
- }
1052
924
  async function getSection2(sectionId, options) {
1053
925
  const { httpClient, sideEffects } = arguments[2];
1054
926
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1259,6 +1131,11 @@ async function typedQuerySections(query, options) {
1259
1131
  throw transformedError;
1260
1132
  }
1261
1133
  }
1134
+ var utils = {
1135
+ query: {
1136
+ ...(0, import_query_builder_utils.createQueryUtils)()
1137
+ }
1138
+ };
1262
1139
  async function listSections2(programId, options) {
1263
1140
  const { httpClient, sideEffects } = arguments[2];
1264
1141
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1442,13 +1319,6 @@ function bulkCreateSection3(httpClient) {
1442
1319
  { httpClient }
1443
1320
  );
1444
1321
  }
1445
- function bulkCreateSectionMigration3(httpClient) {
1446
- return (sections) => bulkCreateSectionMigration2(
1447
- sections,
1448
- // @ts-ignore
1449
- { httpClient }
1450
- );
1451
- }
1452
1322
  function getSection3(httpClient) {
1453
1323
  return (sectionId, options) => getSection2(
1454
1324
  sectionId,
@@ -1534,7 +1404,6 @@ function customQuerySections(httpClient) {
1534
1404
  }
1535
1405
  var createSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createSection3);
1536
1406
  var bulkCreateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSection3);
1537
- var bulkCreateSectionMigration4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSectionMigration3);
1538
1407
  var getSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSection3);
1539
1408
  var updateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSection3);
1540
1409
  var deleteSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteSection3);
@@ -1554,7 +1423,6 @@ var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
1554
1423
  State,
1555
1424
  WebhookIdentityType,
1556
1425
  bulkCreateSection,
1557
- bulkCreateSectionMigration,
1558
1426
  cloneSection,
1559
1427
  createSection,
1560
1428
  deleteSection,
@@ -1563,6 +1431,7 @@ var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
1563
1431
  moveSection,
1564
1432
  publishSection,
1565
1433
  querySections,
1566
- updateSection
1434
+ updateSection,
1435
+ utils
1567
1436
  });
1568
1437
  //# sourceMappingURL=index.js.map