@wix/auto_sdk_online-programs_sections 1.0.28 → 1.0.30

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.
@@ -9,6 +9,8 @@ interface CreateSectionSignature {
9
9
  *
10
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. The stored ordering value is assigned automatically.
11
11
  *
12
+ * A program can contain up to 1,000 sections. This call fails if creating the section would exceed that limit.
13
+ *
12
14
  * To create multiple sections in a single API call, call [Bulk Create Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/bulk-create-sections).
13
15
  * @param - Section to create. Must include `section.program_id`.
14
16
  * @returns Created section.
@@ -22,6 +24,8 @@ interface BulkCreateSectionsSignature {
22
24
  *
23
25
  * All sections in the request must include `program_id` and belong to the same program. Set `description.title` for each section title. The stored ordering values are assigned automatically.
24
26
  *
27
+ * A program can contain up to 1,000 sections. This call fails if creating the requested sections would exceed that limit.
28
+ *
25
29
  * To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
26
30
  * @param - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
27
31
  */
@@ -78,7 +82,11 @@ interface CloneSectionSignature {
78
82
  /**
79
83
  * Clones a section.
80
84
  *
81
- * The cloned section is added to the same program after the current last section. Translation content is copied to the cloned section.
85
+ * The cloned section is added to the same program after the current last section. Translation content and extended field data are copied to the cloned section.
86
+ *
87
+ * Steps are cloned asynchronously after this call returns. The `section.total_steps` value in the response may not reflect the eventual number of cloned steps. Until cloning finishes, Get, List, and Query calls may return a lower actual step count.
88
+ *
89
+ * A program can contain up to 1,000 sections. This call fails if cloning the section would exceed that limit.
82
90
  * @param - ID of the section to clone.
83
91
  */
84
92
  (sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.ordering` | `section.delayInDays`, 2>>;
@@ -91,8 +99,9 @@ interface MoveSectionSignature {
91
99
  * 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
100
  *
93
101
  * If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
102
+ * @param - ID of the section to move.
94
103
  */
95
- (options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.ordering` | `section.delayInDays`, 2>>;
104
+ (sectionId: string, options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.ordering` | `section.delayInDays`, 2>>;
96
105
  }
97
106
 
98
107
  declare function customQuerySections(httpClient: HttpClient): {
@@ -821,10 +821,10 @@ async function cloneSection2(sectionId, options) {
821
821
  throw transformedError;
822
822
  }
823
823
  }
824
- async function moveSection2(options) {
825
- const { httpClient, sideEffects } = arguments[1];
824
+ async function moveSection2(sectionId, options) {
825
+ const { httpClient, sideEffects } = arguments[2];
826
826
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
827
- sectionId: options?.sectionId,
827
+ sectionId,
828
828
  afterSectionId: options?.afterSectionId,
829
829
  revision: options?.revision,
830
830
  fields: options?.fields
@@ -841,14 +841,14 @@ async function moveSection2(options) {
841
841
  {
842
842
  spreadPathsToArguments: {},
843
843
  explicitPathsToArguments: {
844
- sectionId: "$[0].sectionId",
845
- afterSectionId: "$[0].afterSectionId",
846
- revision: "$[0].revision",
847
- fields: "$[0].fields"
844
+ sectionId: "$[0]",
845
+ afterSectionId: "$[1].afterSectionId",
846
+ revision: "$[1].revision",
847
+ fields: "$[1].fields"
848
848
  },
849
849
  singleArgumentUnchanged: false
850
850
  },
851
- ["options"]
851
+ ["sectionId", "options"]
852
852
  );
853
853
  sideEffects?.onError?.(err);
854
854
  throw transformedError;
@@ -927,7 +927,8 @@ function cloneSection3(httpClient) {
927
927
  );
928
928
  }
929
929
  function moveSection3(httpClient) {
930
- return (options) => moveSection2(
930
+ return (sectionId, options) => moveSection2(
931
+ sectionId,
931
932
  options,
932
933
  // @ts-ignore
933
934
  { httpClient }