@wix/auto_sdk_online-programs_sections 1.0.16 → 1.0.17

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 (49) 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 +7 -30
  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 +4 -7
  8. package/build/cjs/meta.js +0 -109
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1 -129
  11. package/build/cjs/schemas.js +3 -192
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +6 -16
  14. package/build/es/index.mjs +0 -148
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +7 -30
  17. package/build/es/index.typings.mjs +0 -139
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +4 -7
  20. package/build/es/meta.mjs +0 -108
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1 -129
  23. package/build/es/schemas.mjs +3 -190
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +6 -16
  26. package/build/internal/cjs/index.js +0 -149
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +11 -29
  29. package/build/internal/cjs/index.typings.js +0 -140
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +8 -6
  32. package/build/internal/cjs/meta.js +0 -109
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1 -129
  35. package/build/internal/cjs/schemas.js +3 -192
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +6 -16
  38. package/build/internal/es/index.mjs +0 -148
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +11 -29
  41. package/build/internal/es/index.typings.mjs +0 -139
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +8 -6
  44. package/build/internal/es/meta.mjs +0 -108
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1 -129
  47. package/build/internal/es/schemas.mjs +3 -190
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -320,8 +320,6 @@ interface BulkCreateSectionsResponse {
320
320
  interface BulkSectionResult {
321
321
  /** Metadata for the bulk operation result. */
322
322
  itemMetadata?: ItemMetadata;
323
- /** Created section. */
324
- item?: Section;
325
323
  /** Action associated with the bulk result. */
326
324
  action?: BulkActionTypeWithLiterals;
327
325
  }
@@ -365,7 +363,7 @@ interface BulkCreateSectionRequest {
365
363
  * @minSize 1
366
364
  * @maxSize 100
367
365
  */
368
- sections: Section[];
366
+ sections?: Section[];
369
367
  /**
370
368
  * Predefined sets of fields to return.
371
369
  * @maxSize 1
@@ -623,7 +621,7 @@ interface MoveSectionRequest {
623
621
  * @format GUID
624
622
  */
625
623
  afterSectionId?: string | null;
626
- /** Current revision of the section. */
624
+ /** Current revision of the section. When provided, it must match the current revision to protect against conflicting updates. */
627
625
  revision?: string;
628
626
  /**
629
627
  * Predefined sets of fields to return.
@@ -910,7 +908,7 @@ interface CreateSectionOptions {
910
908
  * @applicableIdentity APP
911
909
  * @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
912
910
  */
913
- declare function bulkCreateSections(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>>;
911
+ declare function bulkCreateSections(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>>;
914
912
  interface BulkCreateSectionsOptions {
915
913
  /**
916
914
  * Predefined sets of fields to return.
@@ -918,29 +916,6 @@ interface BulkCreateSectionsOptions {
918
916
  */
919
917
  fields?: RequestedFieldsWithLiterals[];
920
918
  }
921
- /**
922
- * Deprecated. Use [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
923
- *
924
- * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
925
- * @param sections - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
926
- * @public
927
- * @documentationMaturity preview
928
- * @requiredField sections
929
- * @permissionId ONLINE_PROGRAMS.SECTION_CREATE
930
- * @applicableIdentity APP
931
- * @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection
932
- * @deprecated
933
- * @replacedBy wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
934
- * @targetRemovalDate 2026-07-24
935
- */
936
- declare function bulkCreateSection(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>>;
937
- interface BulkCreateSectionOptions {
938
- /**
939
- * Predefined sets of fields to return.
940
- * @maxSize 1
941
- */
942
- fields?: RequestedFieldsWithLiterals[];
943
- }
944
919
  /**
945
920
  * Retrieves a section.
946
921
  *
@@ -1292,6 +1267,8 @@ interface CloneSectionOptions {
1292
1267
  /**
1293
1268
  * Moves a section within its program.
1294
1269
  *
1270
+ * 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.
1271
+ *
1295
1272
  * If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
1296
1273
  * @public
1297
1274
  * @documentationMaturity preview
@@ -1311,7 +1288,7 @@ interface MoveSectionOptions {
1311
1288
  * @format GUID
1312
1289
  */
1313
1290
  afterSectionId?: string | null;
1314
- /** Current revision of the section. */
1291
+ /** Current revision of the section. When provided, it must match the current revision to protect against conflicting updates. */
1315
1292
  revision?: string;
1316
1293
  /**
1317
1294
  * Predefined sets of fields to return.
@@ -1347,4 +1324,4 @@ interface PublishSectionOptions {
1347
1324
  fields?: RequestedFieldsWithLiterals[];
1348
1325
  }
1349
1326
 
1350
- export { type AccountInfo, type ActionEvent, type AddressLocation, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, type BulkCreateSectionOptions, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, type BulkSectionResult, type CloneSectionOptions, type CloneSectionRequest, type CloneSectionResponse, type CommonQueryWithEntityContext, type CreateSectionOptions, type CreateSectionRequest, type CreateSectionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteAllProgramSectionsRequest, type DeleteAllProgramSectionsResponse, type DeleteByFilterOperation, type DeleteByIdsOperation, type DeleteSectionRequest, type DeleteSectionResponse, type Description, DescriptionFieldSet, type DescriptionFieldSetWithLiterals, type DescriptionMediaOneOf, type DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, type FocalPoint, type GetSectionOptions, type GetSectionRequest, type GetSectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndexDocument, type ItemMetadata, type ListSectionsOptions, type ListSectionsRequest, type ListSectionsResponse, type MessageEnvelope, type MoveSectionOptions, type MoveSectionRequest, type MoveSectionResponse, type PublishSectionOptions, type PublishSectionRequest, type PublishSectionResponse, type QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionDeleted, type SectionMoved, type SectionPublished, type SectionQuery, type SectionQuerySpec, type SectionUpdated, type SectionsQueryBuilder, type SectionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateSectionOptions, type UpdateSectionRequest, type UpdateSectionResponse, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSection, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
1327
+ export { type AccountInfo, type ActionEvent, type AddressLocation, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, type BulkCreateSectionRequest, type BulkCreateSectionResponse, type BulkCreateSectionsOptions, type BulkCreateSectionsRequest, type BulkCreateSectionsResponse, type BulkSectionResult, type CloneSectionOptions, type CloneSectionRequest, type CloneSectionResponse, type CommonQueryWithEntityContext, type CreateSectionOptions, type CreateSectionRequest, type CreateSectionResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteAllProgramSectionsRequest, type DeleteAllProgramSectionsResponse, type DeleteByFilterOperation, type DeleteByIdsOperation, type DeleteSectionRequest, type DeleteSectionResponse, type Description, DescriptionFieldSet, type DescriptionFieldSetWithLiterals, type DescriptionMediaOneOf, type DocumentImage, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type ExtendedFields, type FocalPoint, type GetSectionOptions, type GetSectionRequest, type GetSectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type IndexDocument, type ItemMetadata, type ListSectionsOptions, type ListSectionsRequest, type ListSectionsResponse, type MessageEnvelope, type MoveSectionOptions, type MoveSectionRequest, type MoveSectionResponse, type PublishSectionOptions, type PublishSectionRequest, type PublishSectionResponse, type QuerySectionsOptions, type QuerySectionsRequest, type QuerySectionsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RestoreSectionFromTrashRequest, type RestoreSectionFromTrashResponse, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type Section, type SectionCloned, type SectionDeleted, type SectionMoved, type SectionPublished, type SectionQuery, type SectionQuerySpec, type SectionUpdated, type SectionsQueryBuilder, type SectionsQueryResult, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateSectionOptions, type UpdateSectionRequest, type UpdateSectionResponse, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
@@ -28,7 +28,6 @@ __export(index_typings_exports, {
28
28
  SortOrder: () => SortOrder,
29
29
  State: () => State,
30
30
  WebhookIdentityType: () => WebhookIdentityType,
31
- bulkCreateSection: () => bulkCreateSection2,
32
31
  bulkCreateSections: () => bulkCreateSections2,
33
32
  cloneSection: () => cloneSection2,
34
33
  createSection: () => createSection2,
@@ -330,95 +329,6 @@ function bulkCreateSections(payload) {
330
329
  }
331
330
  return __bulkCreateSections;
332
331
  }
333
- function bulkCreateSection(payload) {
334
- function __bulkCreateSection({ host }) {
335
- const serializedData = (0, import_transform_paths.transformPaths)(payload, [
336
- {
337
- transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
338
- paths: [
339
- { path: "sections.createdDate" },
340
- { path: "sections.updatedDate" },
341
- { path: "sections.description.image.urlExpirationDate" },
342
- { path: "sections.description.video.urlExpirationDate" },
343
- { path: "sections.description.video.resolutions.urlExpirationDate" },
344
- {
345
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
346
- },
347
- { path: "sections.description.video.posters.urlExpirationDate" }
348
- ]
349
- },
350
- {
351
- transformFn: import_float.transformSDKFloatToRESTFloat,
352
- paths: [
353
- { path: "sections.ordering" },
354
- { path: "sections.description.image.focalPoint.x" },
355
- { path: "sections.description.image.focalPoint.y" },
356
- {
357
- path: "sections.description.video.resolutions.poster.focalPoint.x"
358
- },
359
- {
360
- path: "sections.description.video.resolutions.poster.focalPoint.y"
361
- },
362
- { path: "sections.description.video.posters.focalPoint.x" },
363
- { path: "sections.description.video.posters.focalPoint.y" }
364
- ]
365
- }
366
- ]);
367
- const metadata = {
368
- entityFqdn: "wix.online_programs.v3.section",
369
- method: "POST",
370
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
371
- packageName: PACKAGE_NAME,
372
- migrationOptions: {
373
- optInTransformResponse: true
374
- },
375
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
376
- protoPath: "/v3/bulk/sections/create-deprecated",
377
- data: serializedData,
378
- host
379
- }),
380
- data: serializedData,
381
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
382
- {
383
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
384
- paths: [
385
- { path: "results.item.createdDate" },
386
- { path: "results.item.updatedDate" },
387
- { path: "results.item.description.image.urlExpirationDate" },
388
- { path: "results.item.description.video.urlExpirationDate" },
389
- {
390
- path: "results.item.description.video.resolutions.urlExpirationDate"
391
- },
392
- {
393
- path: "results.item.description.video.resolutions.poster.urlExpirationDate"
394
- },
395
- {
396
- path: "results.item.description.video.posters.urlExpirationDate"
397
- }
398
- ]
399
- },
400
- {
401
- transformFn: import_float2.transformRESTFloatToSDKFloat,
402
- paths: [
403
- { path: "results.item.ordering" },
404
- { path: "results.item.description.image.focalPoint.x" },
405
- { path: "results.item.description.image.focalPoint.y" },
406
- {
407
- path: "results.item.description.video.resolutions.poster.focalPoint.x"
408
- },
409
- {
410
- path: "results.item.description.video.resolutions.poster.focalPoint.y"
411
- },
412
- { path: "results.item.description.video.posters.focalPoint.x" },
413
- { path: "results.item.description.video.posters.focalPoint.y" }
414
- ]
415
- }
416
- ])
417
- };
418
- return metadata;
419
- }
420
- return __bulkCreateSection;
421
- }
422
332
  function getSection(payload) {
423
333
  function __getSection({ host }) {
424
334
  const metadata = {
@@ -1021,55 +931,6 @@ async function bulkCreateSections2(sections, options) {
1021
931
  throw transformedError;
1022
932
  }
1023
933
  }
1024
- async function bulkCreateSection2(sections, options) {
1025
- const { httpClient, sideEffects } = arguments[2];
1026
- const payload = (0, import_transform_paths2.transformPaths)(
1027
- (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1028
- sections,
1029
- fields: options?.fields
1030
- }),
1031
- [
1032
- {
1033
- transformFn: import_image.transformSDKImageToRESTImage,
1034
- paths: [{ path: "sections.description.image" }]
1035
- },
1036
- {
1037
- transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1038
- paths: [{ path: "sections.description.video" }]
1039
- }
1040
- ]
1041
- );
1042
- const reqOpts = bulkCreateSection(payload);
1043
- sideEffects?.onSiteCall?.();
1044
- try {
1045
- const result = await httpClient.request(reqOpts);
1046
- sideEffects?.onSuccess?.(result);
1047
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1048
- (0, import_transform_paths2.transformPaths)(result.data, [
1049
- {
1050
- transformFn: import_image2.transformRESTImageToSDKImage,
1051
- paths: [{ path: "results.item.description.image" }]
1052
- },
1053
- {
1054
- transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1055
- paths: [{ path: "results.item.description.video" }]
1056
- }
1057
- ])
1058
- );
1059
- } catch (err) {
1060
- const transformedError = (0, import_transform_error.transformError)(
1061
- err,
1062
- {
1063
- spreadPathsToArguments: {},
1064
- explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
1065
- singleArgumentUnchanged: false
1066
- },
1067
- ["sections", "options"]
1068
- );
1069
- sideEffects?.onError?.(err);
1070
- throw transformedError;
1071
- }
1072
- }
1073
934
  async function getSection2(sectionId, options) {
1074
935
  const { httpClient, sideEffects } = arguments[2];
1075
936
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -1458,7 +1319,6 @@ async function publishSection2(options) {
1458
1319
  SortOrder,
1459
1320
  State,
1460
1321
  WebhookIdentityType,
1461
- bulkCreateSection,
1462
1322
  bulkCreateSections,
1463
1323
  cloneSection,
1464
1324
  createSection,