@wix/auto_sdk_online-programs_sections 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/build/cjs/index.d.ts +6 -16
  2. package/build/cjs/index.js +0 -149
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +9 -32
  5. package/build/cjs/index.typings.js +0 -140
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +5 -8
  8. package/build/cjs/meta.js +0 -109
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +6 -16
  11. package/build/es/index.mjs +0 -148
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +9 -32
  14. package/build/es/index.typings.mjs +0 -139
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +5 -8
  17. package/build/es/meta.mjs +0 -108
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +6 -16
  20. package/build/internal/cjs/index.typings.d.ts +13 -31
  21. package/build/internal/cjs/meta.d.ts +9 -7
  22. package/build/internal/es/index.d.mts +6 -16
  23. package/build/internal/es/index.typings.d.mts +13 -31
  24. package/build/internal/es/meta.d.mts +9 -7
  25. package/package.json +4 -11
  26. package/build/cjs/schemas.d.ts +0 -637
  27. package/build/cjs/schemas.js +0 -999
  28. package/build/cjs/schemas.js.map +0 -1
  29. package/build/es/schemas.d.mts +0 -637
  30. package/build/es/schemas.mjs +0 -941
  31. package/build/es/schemas.mjs.map +0 -1
  32. package/build/internal/cjs/index.js +0 -1593
  33. package/build/internal/cjs/index.js.map +0 -1
  34. package/build/internal/cjs/index.typings.js +0 -1475
  35. package/build/internal/cjs/index.typings.js.map +0 -1
  36. package/build/internal/cjs/meta.js +0 -1135
  37. package/build/internal/cjs/meta.js.map +0 -1
  38. package/build/internal/cjs/schemas.d.ts +0 -637
  39. package/build/internal/cjs/schemas.js +0 -999
  40. package/build/internal/cjs/schemas.js.map +0 -1
  41. package/build/internal/es/index.mjs +0 -1550
  42. package/build/internal/es/index.mjs.map +0 -1
  43. package/build/internal/es/index.typings.mjs +0 -1431
  44. package/build/internal/es/index.typings.mjs.map +0 -1
  45. package/build/internal/es/meta.mjs +0 -1090
  46. package/build/internal/es/meta.mjs.map +0 -1
  47. package/build/internal/es/schemas.d.mts +0 -637
  48. package/build/internal/es/schemas.mjs +0 -941
  49. package/build/internal/es/schemas.mjs.map +0 -1
  50. package/schemas/package.json +0 -3
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { Section, CreateSectionOptions, BulkCreateSectionsOptions, BulkCreateSectionsResponse, BulkCreateSectionOptions, BulkCreateSectionResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.js';
3
- export { AccountInfo, ActionEvent, AddressLocation, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionMigrationResponse, BulkCreateSectionRequest, BulkCreateSectionsRequest, 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';
2
+ import { Section, CreateSectionOptions, BulkCreateSectionsOptions, BulkCreateSectionsResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, AddressLocation, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionMigrationResponse, BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, 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 {
@@ -25,18 +25,7 @@ interface BulkCreateSectionsSignature {
25
25
  * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
26
26
  * @param - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
27
27
  */
28
- (sections: Section[], options?: BulkCreateSectionsOptions): Promise<NonNullablePaths<BulkCreateSectionsResponse, `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
- declare function bulkCreateSection$1(httpClient: HttpClient): BulkCreateSectionSignature;
31
- interface BulkCreateSectionSignature {
32
- /**
33
- * Deprecated. Use [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
34
- *
35
- * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
36
- * @param - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
37
- * @deprecated
38
- */
39
- (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>>;
28
+ (sections: Section[], options?: BulkCreateSectionsOptions): Promise<NonNullablePaths<BulkCreateSectionsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.action` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
40
29
  }
41
30
  declare function getSection$1(httpClient: HttpClient): GetSectionSignature;
42
31
  interface GetSectionSignature {
@@ -99,6 +88,8 @@ interface MoveSectionSignature {
99
88
  /**
100
89
  * Moves a section within its program.
101
90
  *
91
+ * Each time the section is updated, its `revision` increments by 1. When provided, `revision` must match the current section revision to protect against conflicting updates.
92
+ *
102
93
  * If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
103
94
  */
104
95
  (options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
@@ -121,7 +112,6 @@ declare function customQuerySections(httpClient: HttpClient): {
121
112
  };
122
113
  declare const createSection: MaybeContext<BuildRESTFunction<typeof createSection$1> & typeof createSection$1>;
123
114
  declare const bulkCreateSections: MaybeContext<BuildRESTFunction<typeof bulkCreateSections$1> & typeof bulkCreateSections$1>;
124
- declare const bulkCreateSection: MaybeContext<BuildRESTFunction<typeof bulkCreateSection$1> & typeof bulkCreateSection$1>;
125
115
  declare const getSection: MaybeContext<BuildRESTFunction<typeof getSection$1> & typeof getSection$1>;
126
116
  declare const updateSection: MaybeContext<BuildRESTFunction<typeof updateSection$1> & typeof updateSection$1>;
127
117
  declare const deleteSection: MaybeContext<BuildRESTFunction<typeof deleteSection$1> & typeof deleteSection$1>;
@@ -131,4 +121,4 @@ declare const moveSection: MaybeContext<BuildRESTFunction<typeof moveSection$1>
131
121
  declare const publishSection: MaybeContext<BuildRESTFunction<typeof publishSection$1> & typeof publishSection$1>;
132
122
  declare const querySections: MaybeContext<BuildRESTFunction<typeof customQuerySections> & typeof customQuerySections>;
133
123
 
134
- export { BulkCreateSectionOptions, BulkCreateSectionResponse, BulkCreateSectionsOptions, BulkCreateSectionsResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, QuerySectionsOptions, Section, SectionQuery, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSection, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
124
+ export { BulkCreateSectionsOptions, BulkCreateSectionsResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, QuerySectionsOptions, Section, SectionQuery, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
@@ -28,7 +28,6 @@ __export(index_exports, {
28
28
  SortOrder: () => SortOrder,
29
29
  State: () => State,
30
30
  WebhookIdentityType: () => WebhookIdentityType,
31
- bulkCreateSection: () => bulkCreateSection4,
32
31
  bulkCreateSections: () => bulkCreateSections4,
33
32
  cloneSection: () => cloneSection4,
34
33
  createSection: () => createSection4,
@@ -329,95 +328,6 @@ function bulkCreateSections(payload) {
329
328
  }
330
329
  return __bulkCreateSections;
331
330
  }
332
- function bulkCreateSection(payload) {
333
- function __bulkCreateSection({ host }) {
334
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
335
- {
336
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
337
- paths: [
338
- { path: "sections.createdDate" },
339
- { path: "sections.updatedDate" },
340
- { path: "sections.description.image.urlExpirationDate" },
341
- { path: "sections.description.video.urlExpirationDate" },
342
- { path: "sections.description.video.resolutions.urlExpirationDate" },
343
- {
344
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
345
- },
346
- { path: "sections.description.video.posters.urlExpirationDate" }
347
- ]
348
- },
349
- {
350
- transformFn: import_float.transformSDKFloatToRESTFloat,
351
- paths: [
352
- { path: "sections.ordering" },
353
- { path: "sections.description.image.focalPoint.x" },
354
- { path: "sections.description.image.focalPoint.y" },
355
- {
356
- path: "sections.description.video.resolutions.poster.focalPoint.x"
357
- },
358
- {
359
- path: "sections.description.video.resolutions.poster.focalPoint.y"
360
- },
361
- { path: "sections.description.video.posters.focalPoint.x" },
362
- { path: "sections.description.video.posters.focalPoint.y" }
363
- ]
364
- }
365
- ]);
366
- const metadata = {
367
- entityFqdn: "wix.online_programs.v3.section",
368
- method: "POST",
369
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
370
- packageName: PACKAGE_NAME,
371
- migrationOptions: {
372
- optInTransformResponse: true
373
- },
374
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
375
- protoPath: "/v3/bulk/sections/create-deprecated",
376
- data: serializedData,
377
- host
378
- }),
379
- data: serializedData,
380
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
381
- {
382
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
383
- paths: [
384
- { path: "results.item.createdDate" },
385
- { path: "results.item.updatedDate" },
386
- { path: "results.item.description.image.urlExpirationDate" },
387
- { path: "results.item.description.video.urlExpirationDate" },
388
- {
389
- path: "results.item.description.video.resolutions.urlExpirationDate"
390
- },
391
- {
392
- path: "results.item.description.video.resolutions.poster.urlExpirationDate"
393
- },
394
- {
395
- path: "results.item.description.video.posters.urlExpirationDate"
396
- }
397
- ]
398
- },
399
- {
400
- transformFn: import_float2.transformRESTFloatToSDKFloat,
401
- paths: [
402
- { path: "results.item.ordering" },
403
- { path: "results.item.description.image.focalPoint.x" },
404
- { path: "results.item.description.image.focalPoint.y" },
405
- {
406
- path: "results.item.description.video.resolutions.poster.focalPoint.x"
407
- },
408
- {
409
- path: "results.item.description.video.resolutions.poster.focalPoint.y"
410
- },
411
- { path: "results.item.description.video.posters.focalPoint.x" },
412
- { path: "results.item.description.video.posters.focalPoint.y" }
413
- ]
414
- }
415
- ])
416
- };
417
- return metadata;
418
- }
419
- return __bulkCreateSection;
420
- }
421
331
  function getSection(payload) {
422
332
  function __getSection({ host }) {
423
333
  const metadata = {
@@ -1020,55 +930,6 @@ async function bulkCreateSections2(sections, options) {
1020
930
  throw transformedError;
1021
931
  }
1022
932
  }
1023
- async function bulkCreateSection2(sections, options) {
1024
- const { httpClient, sideEffects } = arguments[2];
1025
- const payload = (0, import_transform_paths2.transformPaths)(
1026
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1027
- sections,
1028
- fields: options?.fields
1029
- }),
1030
- [
1031
- {
1032
- transformFn: import_image.transformSDKImageToRESTImage,
1033
- paths: [{ path: "sections.description.image" }]
1034
- },
1035
- {
1036
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1037
- paths: [{ path: "sections.description.video" }]
1038
- }
1039
- ]
1040
- );
1041
- const reqOpts = bulkCreateSection(payload);
1042
- sideEffects?.onSiteCall?.();
1043
- try {
1044
- const result = await httpClient.request(reqOpts);
1045
- sideEffects?.onSuccess?.(result);
1046
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1047
- (0, import_transform_paths2.transformPaths)(result.data, [
1048
- {
1049
- transformFn: import_image2.transformRESTImageToSDKImage,
1050
- paths: [{ path: "results.item.description.image" }]
1051
- },
1052
- {
1053
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1054
- paths: [{ path: "results.item.description.video" }]
1055
- }
1056
- ])
1057
- );
1058
- } catch (err) {
1059
- const transformedError = (0, import_transform_error.transformError)(
1060
- err,
1061
- {
1062
- spreadPathsToArguments: {},
1063
- explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
1064
- singleArgumentUnchanged: false
1065
- },
1066
- ["sections", "options"]
1067
- );
1068
- sideEffects?.onError?.(err);
1069
- throw transformedError;
1070
- }
1071
- }
1072
933
  async function getSection2(sectionId, options) {
1073
934
  const { httpClient, sideEffects } = arguments[2];
1074
935
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1465,14 +1326,6 @@ function bulkCreateSections3(httpClient) {
1465
1326
  { httpClient }
1466
1327
  );
1467
1328
  }
1468
- function bulkCreateSection3(httpClient) {
1469
- return (sections, options) => bulkCreateSection2(
1470
- sections,
1471
- options,
1472
- // @ts-ignore
1473
- { httpClient }
1474
- );
1475
- }
1476
1329
  function getSection3(httpClient) {
1477
1330
  return (sectionId, options) => getSection2(
1478
1331
  sectionId,
@@ -1558,7 +1411,6 @@ function customQuerySections(httpClient) {
1558
1411
  }
1559
1412
  var createSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createSection3);
1560
1413
  var bulkCreateSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSections3);
1561
- var bulkCreateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSection3);
1562
1414
  var getSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSection3);
1563
1415
  var updateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSection3);
1564
1416
  var deleteSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteSection3);
@@ -1577,7 +1429,6 @@ var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
1577
1429
  SortOrder,
1578
1430
  State,
1579
1431
  WebhookIdentityType,
1580
- bulkCreateSection,
1581
1432
  bulkCreateSections,
1582
1433
  cloneSection,
1583
1434
  createSection,