@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
@@ -380,7 +380,10 @@ interface BulkCreateSectionsResponse {
380
380
  interface BulkSectionResult {
381
381
  /** Metadata for the bulk operation result. */
382
382
  itemMetadata?: ItemMetadata;
383
- /** Created section. */
383
+ /**
384
+ * Internal placeholder. Use `item_metadata` to identify the created section.
385
+ * @internal
386
+ */
384
387
  item?: Section;
385
388
  /** Action associated with the bulk result. */
386
389
  action?: BulkActionTypeWithLiterals;
@@ -425,7 +428,7 @@ interface BulkCreateSectionRequest {
425
428
  * @minSize 1
426
429
  * @maxSize 100
427
430
  */
428
- sections: Section[];
431
+ sections?: Section[];
429
432
  /**
430
433
  * Predefined sets of fields to return.
431
434
  * @maxSize 1
@@ -711,7 +714,7 @@ interface MoveSectionRequest {
711
714
  * @format GUID
712
715
  */
713
716
  afterSectionId?: string | null;
714
- /** Current revision of the section. */
717
+ /** Current revision of the section. When provided, it must match the current revision to protect against conflicting updates. */
715
718
  revision?: string;
716
719
  /**
717
720
  * Predefined sets of fields to return.
@@ -998,7 +1001,7 @@ interface CreateSectionOptions {
998
1001
  * @applicableIdentity APP
999
1002
  * @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
1000
1003
  */
1001
- 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>>;
1004
+ 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>>;
1002
1005
  interface BulkCreateSectionsOptions {
1003
1006
  /**
1004
1007
  * Predefined sets of fields to return.
@@ -1006,29 +1009,6 @@ interface BulkCreateSectionsOptions {
1006
1009
  */
1007
1010
  fields?: RequestedFieldsWithLiterals[];
1008
1011
  }
1009
- /**
1010
- * Deprecated. Use [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
1011
- *
1012
- * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
1013
- * @param sections - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
1014
- * @public
1015
- * @documentationMaturity preview
1016
- * @requiredField sections
1017
- * @permissionId ONLINE_PROGRAMS.SECTION_CREATE
1018
- * @applicableIdentity APP
1019
- * @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection
1020
- * @deprecated
1021
- * @replacedBy wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
1022
- * @targetRemovalDate 2026-07-24
1023
- */
1024
- 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>>;
1025
- interface BulkCreateSectionOptions {
1026
- /**
1027
- * Predefined sets of fields to return.
1028
- * @maxSize 1
1029
- */
1030
- fields?: RequestedFieldsWithLiterals[];
1031
- }
1032
1012
  /**
1033
1013
  * Retrieves a section.
1034
1014
  *
@@ -1394,6 +1374,8 @@ interface CloneSectionOptions {
1394
1374
  /**
1395
1375
  * Moves a section within its program.
1396
1376
  *
1377
+ * 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.
1378
+ *
1397
1379
  * If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
1398
1380
  * @public
1399
1381
  * @documentationMaturity preview
@@ -1413,7 +1395,7 @@ interface MoveSectionOptions {
1413
1395
  * @format GUID
1414
1396
  */
1415
1397
  afterSectionId?: string | null;
1416
- /** Current revision of the section. */
1398
+ /** Current revision of the section. When provided, it must match the current revision to protect against conflicting updates. */
1417
1399
  revision?: string;
1418
1400
  /**
1419
1401
  * Predefined sets of fields to return.
@@ -1449,4 +1431,4 @@ interface PublishSectionOptions {
1449
1431
  fields?: RequestedFieldsWithLiterals[];
1450
1432
  }
1451
1433
 
1452
- 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 };
1434
+ 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 };
@@ -287,95 +287,6 @@ function bulkCreateSections(payload) {
287
287
  }
288
288
  return __bulkCreateSections;
289
289
  }
290
- function bulkCreateSection(payload) {
291
- function __bulkCreateSection({ host }) {
292
- const serializedData = transformPaths(payload, [
293
- {
294
- transformFn: transformSDKTimestampToRESTTimestamp,
295
- paths: [
296
- { path: "sections.createdDate" },
297
- { path: "sections.updatedDate" },
298
- { path: "sections.description.image.urlExpirationDate" },
299
- { path: "sections.description.video.urlExpirationDate" },
300
- { path: "sections.description.video.resolutions.urlExpirationDate" },
301
- {
302
- path: "sections.description.video.resolutions.poster.urlExpirationDate"
303
- },
304
- { path: "sections.description.video.posters.urlExpirationDate" }
305
- ]
306
- },
307
- {
308
- transformFn: transformSDKFloatToRESTFloat,
309
- paths: [
310
- { path: "sections.ordering" },
311
- { path: "sections.description.image.focalPoint.x" },
312
- { path: "sections.description.image.focalPoint.y" },
313
- {
314
- path: "sections.description.video.resolutions.poster.focalPoint.x"
315
- },
316
- {
317
- path: "sections.description.video.resolutions.poster.focalPoint.y"
318
- },
319
- { path: "sections.description.video.posters.focalPoint.x" },
320
- { path: "sections.description.video.posters.focalPoint.y" }
321
- ]
322
- }
323
- ]);
324
- const metadata = {
325
- entityFqdn: "wix.online_programs.v3.section",
326
- method: "POST",
327
- methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
328
- packageName: PACKAGE_NAME,
329
- migrationOptions: {
330
- optInTransformResponse: true
331
- },
332
- url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
333
- protoPath: "/v3/bulk/sections/create-deprecated",
334
- data: serializedData,
335
- host
336
- }),
337
- data: serializedData,
338
- transformResponse: (payload2) => transformPaths(payload2, [
339
- {
340
- transformFn: transformRESTTimestampToSDKTimestamp,
341
- paths: [
342
- { path: "results.item.createdDate" },
343
- { path: "results.item.updatedDate" },
344
- { path: "results.item.description.image.urlExpirationDate" },
345
- { path: "results.item.description.video.urlExpirationDate" },
346
- {
347
- path: "results.item.description.video.resolutions.urlExpirationDate"
348
- },
349
- {
350
- path: "results.item.description.video.resolutions.poster.urlExpirationDate"
351
- },
352
- {
353
- path: "results.item.description.video.posters.urlExpirationDate"
354
- }
355
- ]
356
- },
357
- {
358
- transformFn: transformRESTFloatToSDKFloat,
359
- paths: [
360
- { path: "results.item.ordering" },
361
- { path: "results.item.description.image.focalPoint.x" },
362
- { path: "results.item.description.image.focalPoint.y" },
363
- {
364
- path: "results.item.description.video.resolutions.poster.focalPoint.x"
365
- },
366
- {
367
- path: "results.item.description.video.resolutions.poster.focalPoint.y"
368
- },
369
- { path: "results.item.description.video.posters.focalPoint.x" },
370
- { path: "results.item.description.video.posters.focalPoint.y" }
371
- ]
372
- }
373
- ])
374
- };
375
- return metadata;
376
- }
377
- return __bulkCreateSection;
378
- }
379
290
  function getSection(payload) {
380
291
  function __getSection({ host }) {
381
292
  const metadata = {
@@ -978,55 +889,6 @@ async function bulkCreateSections2(sections, options) {
978
889
  throw transformedError;
979
890
  }
980
891
  }
981
- async function bulkCreateSection2(sections, options) {
982
- const { httpClient, sideEffects } = arguments[2];
983
- const payload = transformPaths2(
984
- renameKeysFromSDKRequestToRESTRequest({
985
- sections,
986
- fields: options?.fields
987
- }),
988
- [
989
- {
990
- transformFn: transformSDKImageToRESTImage,
991
- paths: [{ path: "sections.description.image" }]
992
- },
993
- {
994
- transformFn: transformSDKVideoV2ToRESTVideoV2,
995
- paths: [{ path: "sections.description.video" }]
996
- }
997
- ]
998
- );
999
- const reqOpts = bulkCreateSection(payload);
1000
- sideEffects?.onSiteCall?.();
1001
- try {
1002
- const result = await httpClient.request(reqOpts);
1003
- sideEffects?.onSuccess?.(result);
1004
- return renameKeysFromRESTResponseToSDKResponse(
1005
- transformPaths2(result.data, [
1006
- {
1007
- transformFn: transformRESTImageToSDKImage,
1008
- paths: [{ path: "results.item.description.image" }]
1009
- },
1010
- {
1011
- transformFn: transformRESTVideoV2ToSDKVideoV2,
1012
- paths: [{ path: "results.item.description.video" }]
1013
- }
1014
- ])
1015
- );
1016
- } catch (err) {
1017
- const transformedError = sdkTransformError(
1018
- err,
1019
- {
1020
- spreadPathsToArguments: {},
1021
- explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
1022
- singleArgumentUnchanged: false
1023
- },
1024
- ["sections", "options"]
1025
- );
1026
- sideEffects?.onError?.(err);
1027
- throw transformedError;
1028
- }
1029
- }
1030
892
  async function getSection2(sectionId, options) {
1031
893
  const { httpClient, sideEffects } = arguments[2];
1032
894
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1414,7 +1276,6 @@ export {
1414
1276
  SortOrder,
1415
1277
  State,
1416
1278
  WebhookIdentityType,
1417
- bulkCreateSection2 as bulkCreateSection,
1418
1279
  bulkCreateSections2 as bulkCreateSections,
1419
1280
  cloneSection2 as cloneSection,
1420
1281
  createSection2 as createSection,