@wix/auto_sdk_online-programs_sections 1.0.14 → 1.0.16
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 +18 -6
- package/build/cjs/index.js +163 -7
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +63 -14
- package/build/cjs/index.typings.js +153 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +35 -4
- package/build/cjs/meta.js +122 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +101 -1
- package/build/cjs/schemas.js +168 -21
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +18 -6
- package/build/es/index.mjs +162 -7
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +63 -14
- package/build/es/index.typings.mjs +152 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +35 -4
- package/build/es/meta.mjs +121 -4
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +101 -1
- package/build/es/schemas.mjs +166 -21
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -6
- package/build/internal/cjs/index.js +163 -7
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +165 -14
- package/build/internal/cjs/index.typings.js +153 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +237 -4
- package/build/internal/cjs/meta.js +122 -4
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +101 -1
- package/build/internal/cjs/schemas.js +168 -21
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -6
- package/build/internal/es/index.mjs +162 -7
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +165 -14
- package/build/internal/es/index.typings.mjs +152 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +237 -4
- package/build/internal/es/meta.mjs +121 -4
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +101 -1
- package/build/internal/es/schemas.mjs +166 -21
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -298,7 +298,7 @@ interface CreateSectionResponse {
|
|
|
298
298
|
/** Created section. */
|
|
299
299
|
section?: Section;
|
|
300
300
|
}
|
|
301
|
-
interface
|
|
301
|
+
interface BulkCreateSectionsRequest {
|
|
302
302
|
/**
|
|
303
303
|
* List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
304
304
|
* @minSize 1
|
|
@@ -311,7 +311,7 @@ interface BulkCreateSectionRequest {
|
|
|
311
311
|
*/
|
|
312
312
|
fields?: RequestedFieldsWithLiterals[];
|
|
313
313
|
}
|
|
314
|
-
interface
|
|
314
|
+
interface BulkCreateSectionsResponse {
|
|
315
315
|
/** Results for the bulk create operation. */
|
|
316
316
|
results?: BulkSectionResult[];
|
|
317
317
|
/** Summary of the bulk create operation. */
|
|
@@ -359,6 +359,25 @@ interface BulkActionMetadata {
|
|
|
359
359
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
360
360
|
undetailedFailures?: number;
|
|
361
361
|
}
|
|
362
|
+
interface BulkCreateSectionRequest {
|
|
363
|
+
/**
|
|
364
|
+
* List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
365
|
+
* @minSize 1
|
|
366
|
+
* @maxSize 100
|
|
367
|
+
*/
|
|
368
|
+
sections: Section[];
|
|
369
|
+
/**
|
|
370
|
+
* Predefined sets of fields to return.
|
|
371
|
+
* @maxSize 1
|
|
372
|
+
*/
|
|
373
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
374
|
+
}
|
|
375
|
+
interface BulkCreateSectionResponse {
|
|
376
|
+
/** Results for the bulk create operation. */
|
|
377
|
+
results?: BulkSectionResult[];
|
|
378
|
+
/** Summary of the bulk create operation. */
|
|
379
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
380
|
+
}
|
|
362
381
|
interface BulkCreateSectionMigrationRequest {
|
|
363
382
|
/**
|
|
364
383
|
* List of sections to create.
|
|
@@ -492,6 +511,11 @@ interface Sorting {
|
|
|
492
511
|
fieldName?: string;
|
|
493
512
|
/** Sort order. */
|
|
494
513
|
order?: SortOrderWithLiterals;
|
|
514
|
+
/**
|
|
515
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
516
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
517
|
+
*/
|
|
518
|
+
origin?: AddressLocation;
|
|
495
519
|
}
|
|
496
520
|
declare enum SortOrder {
|
|
497
521
|
ASC = "ASC",
|
|
@@ -499,6 +523,12 @@ declare enum SortOrder {
|
|
|
499
523
|
}
|
|
500
524
|
/** @enumType */
|
|
501
525
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
526
|
+
interface AddressLocation {
|
|
527
|
+
/** Address latitude. */
|
|
528
|
+
latitude?: number | null;
|
|
529
|
+
/** Address longitude. */
|
|
530
|
+
longitude?: number | null;
|
|
531
|
+
}
|
|
502
532
|
interface CursorPaging {
|
|
503
533
|
/**
|
|
504
534
|
* Maximum number of items to return in the results.
|
|
@@ -848,7 +878,7 @@ interface AccountInfo {
|
|
|
848
878
|
*
|
|
849
879
|
* 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.
|
|
850
880
|
*
|
|
851
|
-
* To create multiple sections in a single API call, call [Bulk Create
|
|
881
|
+
* 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).
|
|
852
882
|
* @param section - Section to create. Must include `section.program_id`.
|
|
853
883
|
* @public
|
|
854
884
|
* @documentationMaturity preview
|
|
@@ -878,7 +908,30 @@ interface CreateSectionOptions {
|
|
|
878
908
|
* @requiredField sections
|
|
879
909
|
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
880
910
|
* @applicableIdentity APP
|
|
911
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
|
|
912
|
+
*/
|
|
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>>;
|
|
914
|
+
interface BulkCreateSectionsOptions {
|
|
915
|
+
/**
|
|
916
|
+
* Predefined sets of fields to return.
|
|
917
|
+
* @maxSize 1
|
|
918
|
+
*/
|
|
919
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
920
|
+
}
|
|
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
|
|
881
931
|
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection
|
|
932
|
+
* @deprecated
|
|
933
|
+
* @replacedBy wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
|
|
934
|
+
* @targetRemovalDate 2026-07-24
|
|
882
935
|
*/
|
|
883
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>>;
|
|
884
937
|
interface BulkCreateSectionOptions {
|
|
@@ -1089,11 +1142,6 @@ interface SectionsQueryBuilder {
|
|
|
1089
1142
|
* @documentationMaturity preview
|
|
1090
1143
|
*/
|
|
1091
1144
|
startsWith: (propertyName: '_id', value: string) => SectionsQueryBuilder;
|
|
1092
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
1093
|
-
* @param values - List of values to compare against.
|
|
1094
|
-
* @documentationMaturity preview
|
|
1095
|
-
*/
|
|
1096
|
-
hasSome: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any[]) => SectionsQueryBuilder;
|
|
1097
1145
|
/** @documentationMaturity preview */
|
|
1098
1146
|
in: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1099
1147
|
/** @documentationMaturity preview */
|
|
@@ -1187,14 +1235,15 @@ type SectionQuery = {
|
|
|
1187
1235
|
Sort order.
|
|
1188
1236
|
*/
|
|
1189
1237
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1238
|
+
/**
|
|
1239
|
+
Origin point for geo-distance sorting on a GEO field
|
|
1240
|
+
results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
1241
|
+
*/
|
|
1242
|
+
origin?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['origin'];
|
|
1190
1243
|
}[];
|
|
1191
1244
|
};
|
|
1192
1245
|
declare const utils: {
|
|
1193
|
-
query:
|
|
1194
|
-
QueryBuilder: () => _wix_sdk_types.QueryBuilder<Section, SectionQuerySpec, SectionQuery>;
|
|
1195
|
-
Filter: _wix_sdk_types.FilterFactory<Section, SectionQuerySpec>;
|
|
1196
|
-
Sort: _wix_sdk_types.SortFactory<SectionQuerySpec>;
|
|
1197
|
-
};
|
|
1246
|
+
query: _wix_sdk_types.QueryHelpers<Section, SectionQuerySpec, SectionQuery>;
|
|
1198
1247
|
};
|
|
1199
1248
|
/**
|
|
1200
1249
|
* Retrieves the sections in a program.
|
|
@@ -1298,4 +1347,4 @@ interface PublishSectionOptions {
|
|
|
1298
1347
|
fields?: RequestedFieldsWithLiterals[];
|
|
1299
1348
|
}
|
|
1300
1349
|
|
|
1301
|
-
export { type AccountInfo, type ActionEvent, type ApplicationError, type BulkActionMetadata, BulkActionType, type BulkActionTypeWithLiterals, type BulkCloneSectionRequest, type BulkCloneSectionResponse, type BulkCreateSectionMigrationRequest, type BulkCreateSectionMigrationResponse, type BulkCreateSectionOptions, type BulkCreateSectionRequest, type BulkCreateSectionResponse, 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, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection, utils };
|
|
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 };
|
|
@@ -198,6 +198,95 @@ function createSection(payload) {
|
|
|
198
198
|
}
|
|
199
199
|
return __createSection;
|
|
200
200
|
}
|
|
201
|
+
function bulkCreateSections(payload) {
|
|
202
|
+
function __bulkCreateSections({ host }) {
|
|
203
|
+
const serializedData = transformPaths(payload, [
|
|
204
|
+
{
|
|
205
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
206
|
+
paths: [
|
|
207
|
+
{ path: "sections.createdDate" },
|
|
208
|
+
{ path: "sections.updatedDate" },
|
|
209
|
+
{ path: "sections.description.image.urlExpirationDate" },
|
|
210
|
+
{ path: "sections.description.video.urlExpirationDate" },
|
|
211
|
+
{ path: "sections.description.video.resolutions.urlExpirationDate" },
|
|
212
|
+
{
|
|
213
|
+
path: "sections.description.video.resolutions.poster.urlExpirationDate"
|
|
214
|
+
},
|
|
215
|
+
{ path: "sections.description.video.posters.urlExpirationDate" }
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
220
|
+
paths: [
|
|
221
|
+
{ path: "sections.ordering" },
|
|
222
|
+
{ path: "sections.description.image.focalPoint.x" },
|
|
223
|
+
{ path: "sections.description.image.focalPoint.y" },
|
|
224
|
+
{
|
|
225
|
+
path: "sections.description.video.resolutions.poster.focalPoint.x"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
path: "sections.description.video.resolutions.poster.focalPoint.y"
|
|
229
|
+
},
|
|
230
|
+
{ path: "sections.description.video.posters.focalPoint.x" },
|
|
231
|
+
{ path: "sections.description.video.posters.focalPoint.y" }
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
]);
|
|
235
|
+
const metadata = {
|
|
236
|
+
entityFqdn: "wix.online_programs.v3.section",
|
|
237
|
+
method: "POST",
|
|
238
|
+
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections",
|
|
239
|
+
packageName: PACKAGE_NAME,
|
|
240
|
+
migrationOptions: {
|
|
241
|
+
optInTransformResponse: true
|
|
242
|
+
},
|
|
243
|
+
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
244
|
+
protoPath: "/v3/bulk/sections/create",
|
|
245
|
+
data: serializedData,
|
|
246
|
+
host
|
|
247
|
+
}),
|
|
248
|
+
data: serializedData,
|
|
249
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
250
|
+
{
|
|
251
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
252
|
+
paths: [
|
|
253
|
+
{ path: "results.item.createdDate" },
|
|
254
|
+
{ path: "results.item.updatedDate" },
|
|
255
|
+
{ path: "results.item.description.image.urlExpirationDate" },
|
|
256
|
+
{ path: "results.item.description.video.urlExpirationDate" },
|
|
257
|
+
{
|
|
258
|
+
path: "results.item.description.video.resolutions.urlExpirationDate"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
path: "results.item.description.video.resolutions.poster.urlExpirationDate"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
path: "results.item.description.video.posters.urlExpirationDate"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
270
|
+
paths: [
|
|
271
|
+
{ path: "results.item.ordering" },
|
|
272
|
+
{ path: "results.item.description.image.focalPoint.x" },
|
|
273
|
+
{ path: "results.item.description.image.focalPoint.y" },
|
|
274
|
+
{
|
|
275
|
+
path: "results.item.description.video.resolutions.poster.focalPoint.x"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
path: "results.item.description.video.resolutions.poster.focalPoint.y"
|
|
279
|
+
},
|
|
280
|
+
{ path: "results.item.description.video.posters.focalPoint.x" },
|
|
281
|
+
{ path: "results.item.description.video.posters.focalPoint.y" }
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
])
|
|
285
|
+
};
|
|
286
|
+
return metadata;
|
|
287
|
+
}
|
|
288
|
+
return __bulkCreateSections;
|
|
289
|
+
}
|
|
201
290
|
function bulkCreateSection(payload) {
|
|
202
291
|
function __bulkCreateSection({ host }) {
|
|
203
292
|
const serializedData = transformPaths(payload, [
|
|
@@ -241,7 +330,7 @@ function bulkCreateSection(payload) {
|
|
|
241
330
|
optInTransformResponse: true
|
|
242
331
|
},
|
|
243
332
|
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
244
|
-
protoPath: "/v3/bulk/sections/create",
|
|
333
|
+
protoPath: "/v3/bulk/sections/create-deprecated",
|
|
245
334
|
data: serializedData,
|
|
246
335
|
host
|
|
247
336
|
}),
|
|
@@ -452,6 +541,15 @@ function deleteSection(payload) {
|
|
|
452
541
|
}
|
|
453
542
|
function querySections(payload) {
|
|
454
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
|
+
]);
|
|
455
553
|
const metadata = {
|
|
456
554
|
entityFqdn: "wix.online_programs.v3.section",
|
|
457
555
|
method: "POST",
|
|
@@ -462,10 +560,10 @@ function querySections(payload) {
|
|
|
462
560
|
},
|
|
463
561
|
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
464
562
|
protoPath: "/v3/sections/query",
|
|
465
|
-
data:
|
|
563
|
+
data: serializedData,
|
|
466
564
|
host
|
|
467
565
|
}),
|
|
468
|
-
data:
|
|
566
|
+
data: serializedData,
|
|
469
567
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
470
568
|
{
|
|
471
569
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -831,6 +929,55 @@ async function createSection2(section, options) {
|
|
|
831
929
|
throw transformedError;
|
|
832
930
|
}
|
|
833
931
|
}
|
|
932
|
+
async function bulkCreateSections2(sections, options) {
|
|
933
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
934
|
+
const payload = transformPaths2(
|
|
935
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
936
|
+
sections,
|
|
937
|
+
fields: options?.fields
|
|
938
|
+
}),
|
|
939
|
+
[
|
|
940
|
+
{
|
|
941
|
+
transformFn: transformSDKImageToRESTImage,
|
|
942
|
+
paths: [{ path: "sections.description.image" }]
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
transformFn: transformSDKVideoV2ToRESTVideoV2,
|
|
946
|
+
paths: [{ path: "sections.description.video" }]
|
|
947
|
+
}
|
|
948
|
+
]
|
|
949
|
+
);
|
|
950
|
+
const reqOpts = bulkCreateSections(payload);
|
|
951
|
+
sideEffects?.onSiteCall?.();
|
|
952
|
+
try {
|
|
953
|
+
const result = await httpClient.request(reqOpts);
|
|
954
|
+
sideEffects?.onSuccess?.(result);
|
|
955
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
956
|
+
transformPaths2(result.data, [
|
|
957
|
+
{
|
|
958
|
+
transformFn: transformRESTImageToSDKImage,
|
|
959
|
+
paths: [{ path: "results.item.description.image" }]
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
963
|
+
paths: [{ path: "results.item.description.video" }]
|
|
964
|
+
}
|
|
965
|
+
])
|
|
966
|
+
);
|
|
967
|
+
} catch (err) {
|
|
968
|
+
const transformedError = sdkTransformError(
|
|
969
|
+
err,
|
|
970
|
+
{
|
|
971
|
+
spreadPathsToArguments: {},
|
|
972
|
+
explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
|
|
973
|
+
singleArgumentUnchanged: false
|
|
974
|
+
},
|
|
975
|
+
["sections", "options"]
|
|
976
|
+
);
|
|
977
|
+
sideEffects?.onError?.(err);
|
|
978
|
+
throw transformedError;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
834
981
|
async function bulkCreateSection2(sections, options) {
|
|
835
982
|
const { httpClient, sideEffects } = arguments[2];
|
|
836
983
|
const payload = transformPaths2(
|
|
@@ -1091,9 +1238,7 @@ async function typedQuerySections(query, options) {
|
|
|
1091
1238
|
}
|
|
1092
1239
|
}
|
|
1093
1240
|
var utils = {
|
|
1094
|
-
query:
|
|
1095
|
-
...createQueryUtils()
|
|
1096
|
-
}
|
|
1241
|
+
query: /* @__PURE__ */ createQueryUtils()
|
|
1097
1242
|
};
|
|
1098
1243
|
async function listSections2(programId, options) {
|
|
1099
1244
|
const { httpClient, sideEffects } = arguments[2];
|
|
@@ -1270,6 +1415,7 @@ export {
|
|
|
1270
1415
|
State,
|
|
1271
1416
|
WebhookIdentityType,
|
|
1272
1417
|
bulkCreateSection2 as bulkCreateSection,
|
|
1418
|
+
bulkCreateSections2 as bulkCreateSections,
|
|
1273
1419
|
cloneSection2 as cloneSection,
|
|
1274
1420
|
createSection2 as createSection,
|
|
1275
1421
|
deleteSection2 as deleteSection,
|