@wix/auto_sdk_online-programs_sections 1.0.2 → 1.0.3
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 +10 -13
- package/build/cjs/index.js +58 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +39 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +10 -13
- package/build/es/index.mjs +58 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +38 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -13
- package/build/internal/cjs/index.js +58 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +39 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -13
- package/build/internal/es/index.mjs +58 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +38 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1035,6 +1035,12 @@ interface SectionsQueryBuilder {
|
|
|
1035
1035
|
/** @documentationMaturity preview */
|
|
1036
1036
|
find: () => Promise<SectionsQueryResult>;
|
|
1037
1037
|
}
|
|
1038
|
+
/**
|
|
1039
|
+
* @hidden
|
|
1040
|
+
* @fqn wix.onlineprograms.sections.v3.SectionsService.QuerySections
|
|
1041
|
+
* @requiredField query
|
|
1042
|
+
*/
|
|
1043
|
+
declare function typedQuerySections(query: CursorQuery, options?: QuerySectionsOptions): Promise<NonNullablePaths<QuerySectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.state` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
|
|
1038
1044
|
/**
|
|
1039
1045
|
* List sections per program id
|
|
1040
1046
|
* @param programId - Program id to list sections
|
|
@@ -1125,4 +1131,4 @@ interface PublishSectionOptions {
|
|
|
1125
1131
|
fields?: RequestedFieldsWithLiterals[];
|
|
1126
1132
|
}
|
|
1127
1133
|
|
|
1128
|
-
export { 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 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 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, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
|
|
1134
|
+
export { 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 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 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, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, typedQuerySections, updateSection };
|
|
@@ -38,6 +38,7 @@ __export(index_typings_exports, {
|
|
|
38
38
|
moveSection: () => moveSection2,
|
|
39
39
|
publishSection: () => publishSection2,
|
|
40
40
|
querySections: () => querySections2,
|
|
41
|
+
typedQuerySections: () => typedQuerySections,
|
|
41
42
|
updateSection: () => updateSection2
|
|
42
43
|
});
|
|
43
44
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -1222,6 +1223,43 @@ function querySections2(options) {
|
|
|
1222
1223
|
transformationPaths: {}
|
|
1223
1224
|
});
|
|
1224
1225
|
}
|
|
1226
|
+
async function typedQuerySections(query, options) {
|
|
1227
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1228
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1229
|
+
query,
|
|
1230
|
+
...options
|
|
1231
|
+
});
|
|
1232
|
+
const reqOpts = querySections(payload);
|
|
1233
|
+
sideEffects?.onSiteCall?.();
|
|
1234
|
+
try {
|
|
1235
|
+
const result = await httpClient.request(reqOpts);
|
|
1236
|
+
sideEffects?.onSuccess?.(result);
|
|
1237
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1238
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1239
|
+
{
|
|
1240
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1241
|
+
paths: [{ path: "sections.description.image" }]
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1245
|
+
paths: [{ path: "sections.description.video" }]
|
|
1246
|
+
}
|
|
1247
|
+
])
|
|
1248
|
+
);
|
|
1249
|
+
} catch (err) {
|
|
1250
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1251
|
+
err,
|
|
1252
|
+
{
|
|
1253
|
+
spreadPathsToArguments: {},
|
|
1254
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1255
|
+
singleArgumentUnchanged: false
|
|
1256
|
+
},
|
|
1257
|
+
["query", "options"]
|
|
1258
|
+
);
|
|
1259
|
+
sideEffects?.onError?.(err);
|
|
1260
|
+
throw transformedError;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1225
1263
|
async function listSections2(programId, options) {
|
|
1226
1264
|
const { httpClient, sideEffects } = arguments[2];
|
|
1227
1265
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1407,6 +1445,7 @@ async function publishSection2(options) {
|
|
|
1407
1445
|
moveSection,
|
|
1408
1446
|
publishSection,
|
|
1409
1447
|
querySections,
|
|
1448
|
+
typedQuerySections,
|
|
1410
1449
|
updateSection
|
|
1411
1450
|
});
|
|
1412
1451
|
//# sourceMappingURL=index.typings.js.map
|