@wix/auto_sdk_online-programs_sections 1.0.2 → 1.0.4
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 };
|
|
@@ -1181,6 +1181,43 @@ function querySections2(options) {
|
|
|
1181
1181
|
transformationPaths: {}
|
|
1182
1182
|
});
|
|
1183
1183
|
}
|
|
1184
|
+
async function typedQuerySections(query, options) {
|
|
1185
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1186
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1187
|
+
query,
|
|
1188
|
+
...options
|
|
1189
|
+
});
|
|
1190
|
+
const reqOpts = querySections(payload);
|
|
1191
|
+
sideEffects?.onSiteCall?.();
|
|
1192
|
+
try {
|
|
1193
|
+
const result = await httpClient.request(reqOpts);
|
|
1194
|
+
sideEffects?.onSuccess?.(result);
|
|
1195
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1196
|
+
transformPaths2(result.data, [
|
|
1197
|
+
{
|
|
1198
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1199
|
+
paths: [{ path: "sections.description.image" }]
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
1203
|
+
paths: [{ path: "sections.description.video" }]
|
|
1204
|
+
}
|
|
1205
|
+
])
|
|
1206
|
+
);
|
|
1207
|
+
} catch (err) {
|
|
1208
|
+
const transformedError = sdkTransformError(
|
|
1209
|
+
err,
|
|
1210
|
+
{
|
|
1211
|
+
spreadPathsToArguments: {},
|
|
1212
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1213
|
+
singleArgumentUnchanged: false
|
|
1214
|
+
},
|
|
1215
|
+
["query", "options"]
|
|
1216
|
+
);
|
|
1217
|
+
sideEffects?.onError?.(err);
|
|
1218
|
+
throw transformedError;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1184
1221
|
async function listSections2(programId, options) {
|
|
1185
1222
|
const { httpClient, sideEffects } = arguments[2];
|
|
1186
1223
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -1365,6 +1402,7 @@ export {
|
|
|
1365
1402
|
moveSection2 as moveSection,
|
|
1366
1403
|
publishSection2 as publishSection,
|
|
1367
1404
|
querySections2 as querySections,
|
|
1405
|
+
typedQuerySections,
|
|
1368
1406
|
updateSection2 as updateSection
|
|
1369
1407
|
};
|
|
1370
1408
|
//# sourceMappingURL=index.typings.mjs.map
|