@wix/auto_sdk_online-programs_sections 1.0.29 → 1.0.31
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.
- package/build/cjs/index.d.ts +15 -6
- package/build/cjs/index.js +10 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +105 -37
- package/build/cjs/index.typings.js +8 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +46 -14
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +15 -6
- package/build/es/index.mjs +10 -9
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +105 -37
- package/build/es/index.typings.mjs +8 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +46 -14
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -6
- package/build/internal/cjs/index.typings.d.ts +105 -37
- package/build/internal/cjs/meta.d.ts +46 -14
- package/build/internal/es/index.d.mts +15 -6
- package/build/internal/es/index.typings.d.mts +105 -37
- package/build/internal/es/meta.d.mts +46 -14
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -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
|
*/
|
|
@@ -31,8 +35,6 @@ declare function getSection$1(httpClient: HttpClient): GetSectionSignature;
|
|
|
31
35
|
interface GetSectionSignature {
|
|
32
36
|
/**
|
|
33
37
|
* Retrieves a section.
|
|
34
|
-
*
|
|
35
|
-
* `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
|
|
36
38
|
* @param - ID of the Section to retrieve.
|
|
37
39
|
* @returns Retrieved section.
|
|
38
40
|
*/
|
|
@@ -64,11 +66,13 @@ interface DeleteSectionSignature {
|
|
|
64
66
|
declare function listSections$1(httpClient: HttpClient): ListSectionsSignature;
|
|
65
67
|
interface ListSectionsSignature {
|
|
66
68
|
/**
|
|
67
|
-
* Retrieves
|
|
69
|
+
* Retrieves all sections in a program.
|
|
68
70
|
*
|
|
69
|
-
*
|
|
71
|
+
* Use this method when you know the program ID and need all sections in program order.
|
|
70
72
|
*
|
|
71
|
-
*
|
|
73
|
+
* Results are sorted by `ordering` in ascending order.
|
|
74
|
+
*
|
|
75
|
+
* To filter sections, apply custom sorting or paging, or query across programs, call [Query Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/query-sections).
|
|
72
76
|
* @param - Program ID to list sections for.
|
|
73
77
|
*/
|
|
74
78
|
(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 3>>;
|
|
@@ -79,6 +83,10 @@ interface CloneSectionSignature {
|
|
|
79
83
|
* Clones a section.
|
|
80
84
|
*
|
|
81
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): {
|
package/build/cjs/index.js
CHANGED
|
@@ -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[
|
|
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
|
|
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]
|
|
845
|
-
afterSectionId: "$[
|
|
846
|
-
revision: "$[
|
|
847
|
-
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 }
|