@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
|
@@ -111,8 +111,68 @@ interface VideoResolution {
|
|
|
111
111
|
height?: number;
|
|
112
112
|
/** Video width. */
|
|
113
113
|
width?: number;
|
|
114
|
+
/**
|
|
115
|
+
* Deprecated. Use the `posters` property in the parent entity instead.
|
|
116
|
+
* @internal
|
|
117
|
+
* @deprecated
|
|
118
|
+
*/
|
|
119
|
+
poster?: string;
|
|
114
120
|
/** Video format for example, mp4, hls. */
|
|
115
121
|
format?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Deprecated. Use the `urlExpirationDate` property in the parent entity instead.
|
|
124
|
+
* @internal
|
|
125
|
+
* @deprecated
|
|
126
|
+
*/
|
|
127
|
+
urlExpirationDate?: Date | null;
|
|
128
|
+
/**
|
|
129
|
+
* Deprecated. Use the `sizeInBytes` property in the parent entity instead. Size cannot be provided per resolution.
|
|
130
|
+
* @internal
|
|
131
|
+
* @format DECIMAL_VALUE
|
|
132
|
+
* @deprecated
|
|
133
|
+
*/
|
|
134
|
+
sizeInBytes?: string | null;
|
|
135
|
+
/**
|
|
136
|
+
* Video quality. For example: 480p, 720p.
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
quality?: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* Video filename.
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
filename?: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* Video duration in seconds.
|
|
147
|
+
* @internal
|
|
148
|
+
* @readonly
|
|
149
|
+
* @deprecated Video duration in seconds.
|
|
150
|
+
* @replacedBy duration_in_milliseconds
|
|
151
|
+
* @targetRemovalDate 2024-08-01
|
|
152
|
+
*/
|
|
153
|
+
durationInSeconds?: number | null;
|
|
154
|
+
/**
|
|
155
|
+
* Video duration in milliseconds.
|
|
156
|
+
* @internal
|
|
157
|
+
* @readonly
|
|
158
|
+
*/
|
|
159
|
+
durationInMilliseconds?: number | null;
|
|
160
|
+
/**
|
|
161
|
+
* When true, this is a protected asset, and calling the URL will return a 403 error.
|
|
162
|
+
* In order to access private assets, make a request to:
|
|
163
|
+
* `GenerateFileDownloadUrl` with the WixMedia id and specify the asset_key in the request
|
|
164
|
+
* @internal
|
|
165
|
+
* @readonly
|
|
166
|
+
*/
|
|
167
|
+
private?: boolean | null;
|
|
168
|
+
/**
|
|
169
|
+
* Key to identify the video resolution's relationship to the original media in WixMedia.
|
|
170
|
+
* Can be used to request a download for the specific video resolution.
|
|
171
|
+
* For example: 480p.mp4, 720p.mp4, 1080p.mp4, trailer-720p.mp4, clip-720p.mp4
|
|
172
|
+
* @internal
|
|
173
|
+
* @readonly
|
|
174
|
+
*/
|
|
175
|
+
assetKey?: string | null;
|
|
116
176
|
}
|
|
117
177
|
declare enum State {
|
|
118
178
|
/** the section isn't ready to be shown to participants. */
|
|
@@ -298,7 +358,7 @@ interface CreateSectionResponse {
|
|
|
298
358
|
/** Created section. */
|
|
299
359
|
section?: Section;
|
|
300
360
|
}
|
|
301
|
-
interface
|
|
361
|
+
interface BulkCreateSectionsRequest {
|
|
302
362
|
/**
|
|
303
363
|
* List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
304
364
|
* @minSize 1
|
|
@@ -311,7 +371,7 @@ interface BulkCreateSectionRequest {
|
|
|
311
371
|
*/
|
|
312
372
|
fields?: RequestedFieldsWithLiterals[];
|
|
313
373
|
}
|
|
314
|
-
interface
|
|
374
|
+
interface BulkCreateSectionsResponse {
|
|
315
375
|
/** Results for the bulk create operation. */
|
|
316
376
|
results?: BulkSectionResult[];
|
|
317
377
|
/** Summary of the bulk create operation. */
|
|
@@ -359,6 +419,25 @@ interface BulkActionMetadata {
|
|
|
359
419
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
360
420
|
undetailedFailures?: number;
|
|
361
421
|
}
|
|
422
|
+
interface BulkCreateSectionRequest {
|
|
423
|
+
/**
|
|
424
|
+
* List of sections to create. Each section must include `program_id`, and all sections must belong to the same program.
|
|
425
|
+
* @minSize 1
|
|
426
|
+
* @maxSize 100
|
|
427
|
+
*/
|
|
428
|
+
sections: Section[];
|
|
429
|
+
/**
|
|
430
|
+
* Predefined sets of fields to return.
|
|
431
|
+
* @maxSize 1
|
|
432
|
+
*/
|
|
433
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
434
|
+
}
|
|
435
|
+
interface BulkCreateSectionResponse {
|
|
436
|
+
/** Results for the bulk create operation. */
|
|
437
|
+
results?: BulkSectionResult[];
|
|
438
|
+
/** Summary of the bulk create operation. */
|
|
439
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
440
|
+
}
|
|
362
441
|
interface BulkCreateSectionMigrationRequest {
|
|
363
442
|
/**
|
|
364
443
|
* List of sections to create.
|
|
@@ -402,6 +481,13 @@ interface GetSectionResponse {
|
|
|
402
481
|
interface UpdateSectionRequest {
|
|
403
482
|
/** Section to update. Include `section.id`, `section.revision`, and the fields to update. */
|
|
404
483
|
section?: Section;
|
|
484
|
+
/**
|
|
485
|
+
* Field mask that specifies which fields to update.
|
|
486
|
+
*
|
|
487
|
+
* Fields that aren't included in `fieldMask.paths` are ignored.
|
|
488
|
+
* @internal
|
|
489
|
+
*/
|
|
490
|
+
fieldMask?: string[];
|
|
405
491
|
/**
|
|
406
492
|
* Predefined sets of fields to return.
|
|
407
493
|
* @maxSize 1
|
|
@@ -492,6 +578,25 @@ interface Sorting {
|
|
|
492
578
|
fieldName?: string;
|
|
493
579
|
/** Sort order. */
|
|
494
580
|
order?: SortOrderWithLiterals;
|
|
581
|
+
/**
|
|
582
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
583
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
584
|
+
*
|
|
585
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
586
|
+
*
|
|
587
|
+
* Example:
|
|
588
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
589
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
590
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
591
|
+
* @internal
|
|
592
|
+
* @maxSize 10
|
|
593
|
+
*/
|
|
594
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
595
|
+
/**
|
|
596
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
597
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
598
|
+
*/
|
|
599
|
+
origin?: AddressLocation;
|
|
495
600
|
}
|
|
496
601
|
declare enum SortOrder {
|
|
497
602
|
ASC = "ASC",
|
|
@@ -499,6 +604,12 @@ declare enum SortOrder {
|
|
|
499
604
|
}
|
|
500
605
|
/** @enumType */
|
|
501
606
|
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
607
|
+
interface AddressLocation {
|
|
608
|
+
/** Address latitude. */
|
|
609
|
+
latitude?: number | null;
|
|
610
|
+
/** Address longitude. */
|
|
611
|
+
longitude?: number | null;
|
|
612
|
+
}
|
|
502
613
|
interface CursorPaging {
|
|
503
614
|
/**
|
|
504
615
|
* Maximum number of items to return in the results.
|
|
@@ -532,6 +643,13 @@ interface CursorPagingMetadata {
|
|
|
532
643
|
* + `false`: This is the last page.
|
|
533
644
|
*/
|
|
534
645
|
hasNext?: boolean | null;
|
|
646
|
+
/**
|
|
647
|
+
* Total number of items matching the filter.
|
|
648
|
+
* Available only on the first page of *Search* results, not included in *Query* or *List* results.
|
|
649
|
+
* If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page.
|
|
650
|
+
* @internal
|
|
651
|
+
*/
|
|
652
|
+
total?: number | null;
|
|
535
653
|
}
|
|
536
654
|
interface Cursors {
|
|
537
655
|
/**
|
|
@@ -848,7 +966,7 @@ interface AccountInfo {
|
|
|
848
966
|
*
|
|
849
967
|
* 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
968
|
*
|
|
851
|
-
* To create multiple sections in a single API call, call [Bulk Create
|
|
969
|
+
* 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
970
|
* @param section - Section to create. Must include `section.program_id`.
|
|
853
971
|
* @public
|
|
854
972
|
* @documentationMaturity preview
|
|
@@ -878,7 +996,30 @@ interface CreateSectionOptions {
|
|
|
878
996
|
* @requiredField sections
|
|
879
997
|
* @permissionId ONLINE_PROGRAMS.SECTION_CREATE
|
|
880
998
|
* @applicableIdentity APP
|
|
999
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
|
|
1000
|
+
*/
|
|
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>>;
|
|
1002
|
+
interface BulkCreateSectionsOptions {
|
|
1003
|
+
/**
|
|
1004
|
+
* Predefined sets of fields to return.
|
|
1005
|
+
* @maxSize 1
|
|
1006
|
+
*/
|
|
1007
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1008
|
+
}
|
|
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
|
|
881
1019
|
* @fqn wix.onlineprograms.sections.v3.SectionsService.BulkCreateSection
|
|
1020
|
+
* @deprecated
|
|
1021
|
+
* @replacedBy wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections
|
|
1022
|
+
* @targetRemovalDate 2026-07-24
|
|
882
1023
|
*/
|
|
883
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>>;
|
|
884
1025
|
interface BulkCreateSectionOptions {
|
|
@@ -1089,11 +1230,6 @@ interface SectionsQueryBuilder {
|
|
|
1089
1230
|
* @documentationMaturity preview
|
|
1090
1231
|
*/
|
|
1091
1232
|
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
1233
|
/** @documentationMaturity preview */
|
|
1098
1234
|
in: (propertyName: '_id' | 'state' | 'trialSection' | 'delayInDays', value: any) => SectionsQueryBuilder;
|
|
1099
1235
|
/** @documentationMaturity preview */
|
|
@@ -1187,14 +1323,29 @@ type SectionQuery = {
|
|
|
1187
1323
|
Sort order.
|
|
1188
1324
|
*/
|
|
1189
1325
|
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
1326
|
+
/**
|
|
1327
|
+
When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
1328
|
+
a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
1329
|
+
|
|
1330
|
+
If multiple filters are provided, they are combined with AND operator.
|
|
1331
|
+
|
|
1332
|
+
Example:
|
|
1333
|
+
Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
1334
|
+
and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
1335
|
+
{ fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
1336
|
+
@internal: undefined,
|
|
1337
|
+
@maxSize: 10
|
|
1338
|
+
*/
|
|
1339
|
+
selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
|
|
1340
|
+
/**
|
|
1341
|
+
Origin point for geo-distance sorting on a GEO field
|
|
1342
|
+
results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
1343
|
+
*/
|
|
1344
|
+
origin?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['origin'];
|
|
1190
1345
|
}[];
|
|
1191
1346
|
};
|
|
1192
1347
|
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
|
-
};
|
|
1348
|
+
query: _wix_sdk_types.QueryHelpers<Section, SectionQuerySpec, SectionQuery>;
|
|
1198
1349
|
};
|
|
1199
1350
|
/**
|
|
1200
1351
|
* Retrieves the sections in a program.
|
|
@@ -1298,4 +1449,4 @@ interface PublishSectionOptions {
|
|
|
1298
1449
|
fields?: RequestedFieldsWithLiterals[];
|
|
1299
1450
|
}
|
|
1300
1451
|
|
|
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 };
|
|
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 };
|
|
@@ -29,6 +29,7 @@ __export(index_typings_exports, {
|
|
|
29
29
|
State: () => State,
|
|
30
30
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
31
31
|
bulkCreateSection: () => bulkCreateSection2,
|
|
32
|
+
bulkCreateSections: () => bulkCreateSections2,
|
|
32
33
|
cloneSection: () => cloneSection2,
|
|
33
34
|
createSection: () => createSection2,
|
|
34
35
|
deleteSection: () => deleteSection2,
|
|
@@ -240,6 +241,95 @@ function createSection(payload) {
|
|
|
240
241
|
}
|
|
241
242
|
return __createSection;
|
|
242
243
|
}
|
|
244
|
+
function bulkCreateSections(payload) {
|
|
245
|
+
function __bulkCreateSections({ host }) {
|
|
246
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
247
|
+
{
|
|
248
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
249
|
+
paths: [
|
|
250
|
+
{ path: "sections.createdDate" },
|
|
251
|
+
{ path: "sections.updatedDate" },
|
|
252
|
+
{ path: "sections.description.image.urlExpirationDate" },
|
|
253
|
+
{ path: "sections.description.video.urlExpirationDate" },
|
|
254
|
+
{ path: "sections.description.video.resolutions.urlExpirationDate" },
|
|
255
|
+
{
|
|
256
|
+
path: "sections.description.video.resolutions.poster.urlExpirationDate"
|
|
257
|
+
},
|
|
258
|
+
{ path: "sections.description.video.posters.urlExpirationDate" }
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
263
|
+
paths: [
|
|
264
|
+
{ path: "sections.ordering" },
|
|
265
|
+
{ path: "sections.description.image.focalPoint.x" },
|
|
266
|
+
{ path: "sections.description.image.focalPoint.y" },
|
|
267
|
+
{
|
|
268
|
+
path: "sections.description.video.resolutions.poster.focalPoint.x"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
path: "sections.description.video.resolutions.poster.focalPoint.y"
|
|
272
|
+
},
|
|
273
|
+
{ path: "sections.description.video.posters.focalPoint.x" },
|
|
274
|
+
{ path: "sections.description.video.posters.focalPoint.y" }
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
]);
|
|
278
|
+
const metadata = {
|
|
279
|
+
entityFqdn: "wix.online_programs.v3.section",
|
|
280
|
+
method: "POST",
|
|
281
|
+
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSections",
|
|
282
|
+
packageName: PACKAGE_NAME,
|
|
283
|
+
migrationOptions: {
|
|
284
|
+
optInTransformResponse: true
|
|
285
|
+
},
|
|
286
|
+
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
287
|
+
protoPath: "/v3/bulk/sections/create",
|
|
288
|
+
data: serializedData,
|
|
289
|
+
host
|
|
290
|
+
}),
|
|
291
|
+
data: serializedData,
|
|
292
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
293
|
+
{
|
|
294
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
295
|
+
paths: [
|
|
296
|
+
{ path: "results.item.createdDate" },
|
|
297
|
+
{ path: "results.item.updatedDate" },
|
|
298
|
+
{ path: "results.item.description.image.urlExpirationDate" },
|
|
299
|
+
{ path: "results.item.description.video.urlExpirationDate" },
|
|
300
|
+
{
|
|
301
|
+
path: "results.item.description.video.resolutions.urlExpirationDate"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
path: "results.item.description.video.resolutions.poster.urlExpirationDate"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
path: "results.item.description.video.posters.urlExpirationDate"
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
313
|
+
paths: [
|
|
314
|
+
{ path: "results.item.ordering" },
|
|
315
|
+
{ path: "results.item.description.image.focalPoint.x" },
|
|
316
|
+
{ path: "results.item.description.image.focalPoint.y" },
|
|
317
|
+
{
|
|
318
|
+
path: "results.item.description.video.resolutions.poster.focalPoint.x"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
path: "results.item.description.video.resolutions.poster.focalPoint.y"
|
|
322
|
+
},
|
|
323
|
+
{ path: "results.item.description.video.posters.focalPoint.x" },
|
|
324
|
+
{ path: "results.item.description.video.posters.focalPoint.y" }
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
])
|
|
328
|
+
};
|
|
329
|
+
return metadata;
|
|
330
|
+
}
|
|
331
|
+
return __bulkCreateSections;
|
|
332
|
+
}
|
|
243
333
|
function bulkCreateSection(payload) {
|
|
244
334
|
function __bulkCreateSection({ host }) {
|
|
245
335
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -283,7 +373,7 @@ function bulkCreateSection(payload) {
|
|
|
283
373
|
optInTransformResponse: true
|
|
284
374
|
},
|
|
285
375
|
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
286
|
-
protoPath: "/v3/bulk/sections/create",
|
|
376
|
+
protoPath: "/v3/bulk/sections/create-deprecated",
|
|
287
377
|
data: serializedData,
|
|
288
378
|
host
|
|
289
379
|
}),
|
|
@@ -494,6 +584,15 @@ function deleteSection(payload) {
|
|
|
494
584
|
}
|
|
495
585
|
function querySections(payload) {
|
|
496
586
|
function __querySections({ host }) {
|
|
587
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
588
|
+
{
|
|
589
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
590
|
+
paths: [
|
|
591
|
+
{ path: "query.sort.origin.latitude" },
|
|
592
|
+
{ path: "query.sort.origin.longitude" }
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
]);
|
|
497
596
|
const metadata = {
|
|
498
597
|
entityFqdn: "wix.online_programs.v3.section",
|
|
499
598
|
method: "POST",
|
|
@@ -504,10 +603,10 @@ function querySections(payload) {
|
|
|
504
603
|
},
|
|
505
604
|
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
506
605
|
protoPath: "/v3/sections/query",
|
|
507
|
-
data:
|
|
606
|
+
data: serializedData,
|
|
508
607
|
host
|
|
509
608
|
}),
|
|
510
|
-
data:
|
|
609
|
+
data: serializedData,
|
|
511
610
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
512
611
|
{
|
|
513
612
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
@@ -873,6 +972,55 @@ async function createSection2(section, options) {
|
|
|
873
972
|
throw transformedError;
|
|
874
973
|
}
|
|
875
974
|
}
|
|
975
|
+
async function bulkCreateSections2(sections, options) {
|
|
976
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
977
|
+
const payload = (0, import_transform_paths2.transformPaths)(
|
|
978
|
+
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
979
|
+
sections,
|
|
980
|
+
fields: options?.fields
|
|
981
|
+
}),
|
|
982
|
+
[
|
|
983
|
+
{
|
|
984
|
+
transformFn: import_image.transformSDKImageToRESTImage,
|
|
985
|
+
paths: [{ path: "sections.description.image" }]
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
|
|
989
|
+
paths: [{ path: "sections.description.video" }]
|
|
990
|
+
}
|
|
991
|
+
]
|
|
992
|
+
);
|
|
993
|
+
const reqOpts = bulkCreateSections(payload);
|
|
994
|
+
sideEffects?.onSiteCall?.();
|
|
995
|
+
try {
|
|
996
|
+
const result = await httpClient.request(reqOpts);
|
|
997
|
+
sideEffects?.onSuccess?.(result);
|
|
998
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
999
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1000
|
+
{
|
|
1001
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1002
|
+
paths: [{ path: "results.item.description.image" }]
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1006
|
+
paths: [{ path: "results.item.description.video" }]
|
|
1007
|
+
}
|
|
1008
|
+
])
|
|
1009
|
+
);
|
|
1010
|
+
} catch (err) {
|
|
1011
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1012
|
+
err,
|
|
1013
|
+
{
|
|
1014
|
+
spreadPathsToArguments: {},
|
|
1015
|
+
explicitPathsToArguments: { sections: "$[0]", fields: "$[1].fields" },
|
|
1016
|
+
singleArgumentUnchanged: false
|
|
1017
|
+
},
|
|
1018
|
+
["sections", "options"]
|
|
1019
|
+
);
|
|
1020
|
+
sideEffects?.onError?.(err);
|
|
1021
|
+
throw transformedError;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
876
1024
|
async function bulkCreateSection2(sections, options) {
|
|
877
1025
|
const { httpClient, sideEffects } = arguments[2];
|
|
878
1026
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1133,9 +1281,7 @@ async function typedQuerySections(query, options) {
|
|
|
1133
1281
|
}
|
|
1134
1282
|
}
|
|
1135
1283
|
var utils = {
|
|
1136
|
-
query:
|
|
1137
|
-
...(0, import_query_builder_utils.createQueryUtils)()
|
|
1138
|
-
}
|
|
1284
|
+
query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
|
|
1139
1285
|
};
|
|
1140
1286
|
async function listSections2(programId, options) {
|
|
1141
1287
|
const { httpClient, sideEffects } = arguments[2];
|
|
@@ -1313,6 +1459,7 @@ async function publishSection2(options) {
|
|
|
1313
1459
|
State,
|
|
1314
1460
|
WebhookIdentityType,
|
|
1315
1461
|
bulkCreateSection,
|
|
1462
|
+
bulkCreateSections,
|
|
1316
1463
|
cloneSection,
|
|
1317
1464
|
createSection,
|
|
1318
1465
|
deleteSection,
|