@wix/auto_sdk_online-programs_sections 1.0.13 → 1.0.15
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 +61 -31
- package/build/cjs/index.js +47 -26
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +220 -120
- package/build/cjs/index.typings.js +41 -21
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +117 -72
- package/build/cjs/meta.js +35 -18
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +14 -5
- package/build/cjs/schemas.js +335 -212
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +61 -31
- package/build/es/index.mjs +46 -25
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +220 -120
- package/build/es/index.typings.mjs +40 -20
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +117 -72
- package/build/es/meta.mjs +34 -17
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +14 -5
- package/build/es/schemas.mjs +333 -210
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +61 -31
- package/build/internal/cjs/index.js +47 -26
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +220 -120
- package/build/internal/cjs/index.typings.js +41 -21
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +117 -72
- package/build/internal/cjs/meta.js +35 -18
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +14 -5
- package/build/internal/cjs/schemas.js +335 -212
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +61 -31
- package/build/internal/es/index.mjs +46 -25
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +220 -120
- package/build/internal/es/index.typings.mjs +40 -20
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +117 -72
- package/build/internal/es/meta.mjs +34 -17
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +14 -5
- package/build/internal/es/schemas.mjs +333 -210
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -1,86 +1,116 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { Section, CreateSectionOptions, BulkCreateSectionOptions, BulkCreateSectionResponse,
|
|
3
|
-
export { AccountInfo, ActionEvent, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionRequest, 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.mjs';
|
|
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.mjs';
|
|
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.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
|
|
6
6
|
interface CreateSectionSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Creates a
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Creates a section.
|
|
9
|
+
*
|
|
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. `section.description.details`, `section.description.image`, and `section.description.video` are deprecated backward-compatibility fields. The stored ordering value is assigned automatically.
|
|
11
|
+
*
|
|
12
|
+
* 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
|
+
* @param - Section to create. Must include `section.program_id`.
|
|
14
|
+
* @returns Created section.
|
|
11
15
|
*/
|
|
12
16
|
(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
13
17
|
}
|
|
14
|
-
declare function
|
|
15
|
-
interface
|
|
18
|
+
declare function bulkCreateSections$1(httpClient: HttpClient): BulkCreateSectionsSignature;
|
|
19
|
+
interface BulkCreateSectionsSignature {
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
21
|
+
* Creates up to 100 sections in a single API call.
|
|
22
|
+
*
|
|
23
|
+
* All sections in the request must include `program_id` and belong to the same program. Set `description.title` for each section title. `description.details`, `description.image`, and `description.video` are deprecated backward-compatibility fields. The stored ordering values are assigned automatically.
|
|
24
|
+
*
|
|
25
|
+
* To create a single section, call [Create Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/create-section).
|
|
26
|
+
* @param - List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
19
27
|
*/
|
|
20
|
-
(sections: Section[], options?:
|
|
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>>;
|
|
21
29
|
}
|
|
22
|
-
declare function
|
|
23
|
-
interface
|
|
30
|
+
declare function bulkCreateSection$1(httpClient: HttpClient): BulkCreateSectionSignature;
|
|
31
|
+
interface BulkCreateSectionSignature {
|
|
24
32
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
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
|
|
27
38
|
*/
|
|
28
|
-
(sections: Section[]): Promise<NonNullablePaths<
|
|
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>>;
|
|
29
40
|
}
|
|
30
41
|
declare function getSection$1(httpClient: HttpClient): GetSectionSignature;
|
|
31
42
|
interface GetSectionSignature {
|
|
32
43
|
/**
|
|
33
|
-
* Retrieves a
|
|
44
|
+
* Retrieves a section.
|
|
45
|
+
*
|
|
46
|
+
* `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
|
|
34
47
|
* @param - ID of the Section to retrieve.
|
|
35
|
-
* @returns
|
|
48
|
+
* @returns Retrieved section.
|
|
36
49
|
*/
|
|
37
50
|
(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
38
51
|
}
|
|
39
52
|
declare function updateSection$1(httpClient: HttpClient): UpdateSectionSignature;
|
|
40
53
|
interface UpdateSectionSignature {
|
|
41
54
|
/**
|
|
42
|
-
* Updates a
|
|
43
|
-
*
|
|
44
|
-
*
|
|
55
|
+
* Updates a section.
|
|
56
|
+
*
|
|
57
|
+
* Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when updating the section. This ensures you're working with the latest section and prevents unintended overwrites.
|
|
58
|
+
*
|
|
59
|
+
* Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section). To publish a section, call [Publish Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/publish-section).
|
|
60
|
+
* @param - Section ID.
|
|
61
|
+
* @returns Updated section.
|
|
45
62
|
*/
|
|
46
63
|
(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `state` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
47
64
|
}
|
|
48
65
|
declare function deleteSection$1(httpClient: HttpClient): DeleteSectionSignature;
|
|
49
66
|
interface DeleteSectionSignature {
|
|
50
67
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
68
|
+
* Permanently deletes a section from the public API.
|
|
69
|
+
*
|
|
70
|
+
* Deleted sections aren't returned by standard retrieval and list methods. The public API doesn't expose trash-bin or restore operations.
|
|
71
|
+
* @param - ID of the section to delete.
|
|
54
72
|
*/
|
|
55
73
|
(sectionId: string): Promise<void>;
|
|
56
74
|
}
|
|
57
75
|
declare function listSections$1(httpClient: HttpClient): ListSectionsSignature;
|
|
58
76
|
interface ListSectionsSignature {
|
|
59
77
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
78
|
+
* Retrieves the sections in a program.
|
|
79
|
+
*
|
|
80
|
+
* Results are sorted by `ordering` in ascending order. `descriptionFieldSet` is retained for backward compatibility. Current section responses return the section title.
|
|
81
|
+
*
|
|
82
|
+
* To filter or sort sections, call [Query Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/query-sections).
|
|
83
|
+
* @param - Program ID to list sections for.
|
|
62
84
|
*/
|
|
63
85
|
(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.state` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
|
|
64
86
|
}
|
|
65
87
|
declare function cloneSection$1(httpClient: HttpClient): CloneSectionSignature;
|
|
66
88
|
interface CloneSectionSignature {
|
|
67
89
|
/**
|
|
68
|
-
* Clones section
|
|
69
|
-
*
|
|
90
|
+
* Clones a section.
|
|
91
|
+
*
|
|
92
|
+
* The cloned section is added to the same program after the current last section. Translation content is copied to the cloned section.
|
|
93
|
+
* @param - ID of the section to clone.
|
|
70
94
|
*/
|
|
71
95
|
(sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
72
96
|
}
|
|
73
97
|
declare function moveSection$1(httpClient: HttpClient): MoveSectionSignature;
|
|
74
98
|
interface MoveSectionSignature {
|
|
75
99
|
/**
|
|
76
|
-
*
|
|
100
|
+
* Moves a section within its program.
|
|
101
|
+
*
|
|
102
|
+
* If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
|
|
77
103
|
*/
|
|
78
104
|
(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
79
105
|
}
|
|
80
106
|
declare function publishSection$1(httpClient: HttpClient): PublishSectionSignature;
|
|
81
107
|
interface PublishSectionSignature {
|
|
82
108
|
/**
|
|
83
|
-
* Publishes section
|
|
109
|
+
* Publishes a section.
|
|
110
|
+
*
|
|
111
|
+
* Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when publishing the section. This ensures you're working with the latest section and prevents unintended overwrites.
|
|
112
|
+
*
|
|
113
|
+
* Publishing sets the section's `state` to `PUBLISHED`.
|
|
84
114
|
*/
|
|
85
115
|
(options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
86
116
|
}
|
|
@@ -90,8 +120,8 @@ declare function customQuerySections(httpClient: HttpClient): {
|
|
|
90
120
|
(options?: QuerySectionsOptions): SectionsQueryBuilder;
|
|
91
121
|
};
|
|
92
122
|
declare const createSection: MaybeContext<BuildRESTFunction<typeof createSection$1> & typeof createSection$1>;
|
|
123
|
+
declare const bulkCreateSections: MaybeContext<BuildRESTFunction<typeof bulkCreateSections$1> & typeof bulkCreateSections$1>;
|
|
93
124
|
declare const bulkCreateSection: MaybeContext<BuildRESTFunction<typeof bulkCreateSection$1> & typeof bulkCreateSection$1>;
|
|
94
|
-
declare const bulkCreateSectionMigration: MaybeContext<BuildRESTFunction<typeof bulkCreateSectionMigration$1> & typeof bulkCreateSectionMigration$1>;
|
|
95
125
|
declare const getSection: MaybeContext<BuildRESTFunction<typeof getSection$1> & typeof getSection$1>;
|
|
96
126
|
declare const updateSection: MaybeContext<BuildRESTFunction<typeof updateSection$1> & typeof updateSection$1>;
|
|
97
127
|
declare const deleteSection: MaybeContext<BuildRESTFunction<typeof deleteSection$1> & typeof deleteSection$1>;
|
|
@@ -101,4 +131,4 @@ declare const moveSection: MaybeContext<BuildRESTFunction<typeof moveSection$1>
|
|
|
101
131
|
declare const publishSection: MaybeContext<BuildRESTFunction<typeof publishSection$1> & typeof publishSection$1>;
|
|
102
132
|
declare const querySections: MaybeContext<BuildRESTFunction<typeof customQuerySections> & typeof customQuerySections>;
|
|
103
133
|
|
|
104
|
-
export {
|
|
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 };
|
package/build/es/index.mjs
CHANGED
|
@@ -101,6 +101,14 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
|
|
|
101
101
|
{
|
|
102
102
|
srcPath: "/program-sections-service",
|
|
103
103
|
destPath: ""
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
srcPath: "/online-programs/v3/sections",
|
|
107
|
+
destPath: "/v3/sections"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
srcPath: "/online-programs/v3/bulk/sections",
|
|
111
|
+
destPath: "/v3/bulk/sections"
|
|
104
112
|
}
|
|
105
113
|
]
|
|
106
114
|
};
|
|
@@ -190,8 +198,8 @@ function createSection(payload) {
|
|
|
190
198
|
}
|
|
191
199
|
return __createSection;
|
|
192
200
|
}
|
|
193
|
-
function
|
|
194
|
-
function
|
|
201
|
+
function bulkCreateSections(payload) {
|
|
202
|
+
function __bulkCreateSections({ host }) {
|
|
195
203
|
const serializedData = transformPaths(payload, [
|
|
196
204
|
{
|
|
197
205
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
@@ -227,7 +235,7 @@ function bulkCreateSection(payload) {
|
|
|
227
235
|
const metadata = {
|
|
228
236
|
entityFqdn: "wix.online_programs.v3.section",
|
|
229
237
|
method: "POST",
|
|
230
|
-
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.
|
|
238
|
+
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections",
|
|
231
239
|
packageName: PACKAGE_NAME,
|
|
232
240
|
migrationOptions: {
|
|
233
241
|
optInTransformResponse: true
|
|
@@ -277,10 +285,10 @@ function bulkCreateSection(payload) {
|
|
|
277
285
|
};
|
|
278
286
|
return metadata;
|
|
279
287
|
}
|
|
280
|
-
return
|
|
288
|
+
return __bulkCreateSections;
|
|
281
289
|
}
|
|
282
|
-
function
|
|
283
|
-
function
|
|
290
|
+
function bulkCreateSection(payload) {
|
|
291
|
+
function __bulkCreateSection({ host }) {
|
|
284
292
|
const serializedData = transformPaths(payload, [
|
|
285
293
|
{
|
|
286
294
|
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
@@ -316,13 +324,13 @@ function bulkCreateSectionMigration(payload) {
|
|
|
316
324
|
const metadata = {
|
|
317
325
|
entityFqdn: "wix.online_programs.v3.section",
|
|
318
326
|
method: "POST",
|
|
319
|
-
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.
|
|
327
|
+
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection",
|
|
320
328
|
packageName: PACKAGE_NAME,
|
|
321
329
|
migrationOptions: {
|
|
322
330
|
optInTransformResponse: true
|
|
323
331
|
},
|
|
324
332
|
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
325
|
-
protoPath: "/v3/bulk/sections/create
|
|
333
|
+
protoPath: "/v3/bulk/sections/create-deprecated",
|
|
326
334
|
data: serializedData,
|
|
327
335
|
host
|
|
328
336
|
}),
|
|
@@ -366,7 +374,7 @@ function bulkCreateSectionMigration(payload) {
|
|
|
366
374
|
};
|
|
367
375
|
return metadata;
|
|
368
376
|
}
|
|
369
|
-
return
|
|
377
|
+
return __bulkCreateSection;
|
|
370
378
|
}
|
|
371
379
|
function getSection(payload) {
|
|
372
380
|
function __getSection({ host }) {
|
|
@@ -533,6 +541,15 @@ function deleteSection(payload) {
|
|
|
533
541
|
}
|
|
534
542
|
function querySections(payload) {
|
|
535
543
|
function __querySections({ host }) {
|
|
544
|
+
const serializedData = transformPaths(payload, [
|
|
545
|
+
{
|
|
546
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
547
|
+
paths: [
|
|
548
|
+
{ path: "query.sort.origin.latitude" },
|
|
549
|
+
{ path: "query.sort.origin.longitude" }
|
|
550
|
+
]
|
|
551
|
+
}
|
|
552
|
+
]);
|
|
536
553
|
const metadata = {
|
|
537
554
|
entityFqdn: "wix.online_programs.v3.section",
|
|
538
555
|
method: "POST",
|
|
@@ -543,10 +560,10 @@ function querySections(payload) {
|
|
|
543
560
|
},
|
|
544
561
|
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
545
562
|
protoPath: "/v3/sections/query",
|
|
546
|
-
data:
|
|
563
|
+
data: serializedData,
|
|
547
564
|
host
|
|
548
565
|
}),
|
|
549
|
-
data:
|
|
566
|
+
data: serializedData,
|
|
550
567
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
551
568
|
{
|
|
552
569
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -912,7 +929,7 @@ async function createSection2(section, options) {
|
|
|
912
929
|
throw transformedError;
|
|
913
930
|
}
|
|
914
931
|
}
|
|
915
|
-
async function
|
|
932
|
+
async function bulkCreateSections2(sections, options) {
|
|
916
933
|
const { httpClient, sideEffects } = arguments[2];
|
|
917
934
|
const payload = transformPaths2(
|
|
918
935
|
renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -930,7 +947,7 @@ async function bulkCreateSection2(sections, options) {
|
|
|
930
947
|
}
|
|
931
948
|
]
|
|
932
949
|
);
|
|
933
|
-
const reqOpts =
|
|
950
|
+
const reqOpts = bulkCreateSections(payload);
|
|
934
951
|
sideEffects?.onSiteCall?.();
|
|
935
952
|
try {
|
|
936
953
|
const result = await httpClient.request(reqOpts);
|
|
@@ -961,10 +978,13 @@ async function bulkCreateSection2(sections, options) {
|
|
|
961
978
|
throw transformedError;
|
|
962
979
|
}
|
|
963
980
|
}
|
|
964
|
-
async function
|
|
965
|
-
const { httpClient, sideEffects } = arguments[
|
|
981
|
+
async function bulkCreateSection2(sections, options) {
|
|
982
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
966
983
|
const payload = transformPaths2(
|
|
967
|
-
renameKeysFromSDKRequestToRESTRequest({
|
|
984
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
985
|
+
sections,
|
|
986
|
+
fields: options?.fields
|
|
987
|
+
}),
|
|
968
988
|
[
|
|
969
989
|
{
|
|
970
990
|
transformFn: transformSDKImageToRESTImage,
|
|
@@ -976,7 +996,7 @@ async function bulkCreateSectionMigration2(sections) {
|
|
|
976
996
|
}
|
|
977
997
|
]
|
|
978
998
|
);
|
|
979
|
-
const reqOpts =
|
|
999
|
+
const reqOpts = bulkCreateSection(payload);
|
|
980
1000
|
sideEffects?.onSiteCall?.();
|
|
981
1001
|
try {
|
|
982
1002
|
const result = await httpClient.request(reqOpts);
|
|
@@ -998,10 +1018,10 @@ async function bulkCreateSectionMigration2(sections) {
|
|
|
998
1018
|
err,
|
|
999
1019
|
{
|
|
1000
1020
|
spreadPathsToArguments: {},
|
|
1001
|
-
explicitPathsToArguments: { sections: "$[0]" },
|
|
1021
|
+
explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
|
|
1002
1022
|
singleArgumentUnchanged: false
|
|
1003
1023
|
},
|
|
1004
|
-
["sections"]
|
|
1024
|
+
["sections", "options"]
|
|
1005
1025
|
);
|
|
1006
1026
|
sideEffects?.onError?.(err);
|
|
1007
1027
|
throw transformedError;
|
|
@@ -1397,17 +1417,18 @@ function createSection3(httpClient) {
|
|
|
1397
1417
|
{ httpClient }
|
|
1398
1418
|
);
|
|
1399
1419
|
}
|
|
1400
|
-
function
|
|
1401
|
-
return (sections, options) =>
|
|
1420
|
+
function bulkCreateSections3(httpClient) {
|
|
1421
|
+
return (sections, options) => bulkCreateSections2(
|
|
1402
1422
|
sections,
|
|
1403
1423
|
options,
|
|
1404
1424
|
// @ts-ignore
|
|
1405
1425
|
{ httpClient }
|
|
1406
1426
|
);
|
|
1407
1427
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return (sections) =>
|
|
1428
|
+
function bulkCreateSection3(httpClient) {
|
|
1429
|
+
return (sections, options) => bulkCreateSection2(
|
|
1410
1430
|
sections,
|
|
1431
|
+
options,
|
|
1411
1432
|
// @ts-ignore
|
|
1412
1433
|
{ httpClient }
|
|
1413
1434
|
);
|
|
@@ -1496,8 +1517,8 @@ function customQuerySections(httpClient) {
|
|
|
1496
1517
|
return overloadedQuery;
|
|
1497
1518
|
}
|
|
1498
1519
|
var createSection4 = /* @__PURE__ */ createRESTModule(createSection3);
|
|
1520
|
+
var bulkCreateSections4 = /* @__PURE__ */ createRESTModule(bulkCreateSections3);
|
|
1499
1521
|
var bulkCreateSection4 = /* @__PURE__ */ createRESTModule(bulkCreateSection3);
|
|
1500
|
-
var bulkCreateSectionMigration4 = /* @__PURE__ */ createRESTModule(bulkCreateSectionMigration3);
|
|
1501
1522
|
var getSection4 = /* @__PURE__ */ createRESTModule(getSection3);
|
|
1502
1523
|
var updateSection4 = /* @__PURE__ */ createRESTModule(updateSection3);
|
|
1503
1524
|
var deleteSection4 = /* @__PURE__ */ createRESTModule(deleteSection3);
|
|
@@ -1516,7 +1537,7 @@ export {
|
|
|
1516
1537
|
State,
|
|
1517
1538
|
WebhookIdentityType,
|
|
1518
1539
|
bulkCreateSection4 as bulkCreateSection,
|
|
1519
|
-
|
|
1540
|
+
bulkCreateSections4 as bulkCreateSections,
|
|
1520
1541
|
cloneSection4 as cloneSection,
|
|
1521
1542
|
createSection4 as createSection,
|
|
1522
1543
|
deleteSection4 as deleteSection,
|