@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
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { Section, CreateSectionOptions, BulkCreateSectionOptions, BulkCreateSectionResponse, BulkCreateSectionMigrationResponse, GetSectionOptions, UpdateSectionOptions,
|
|
3
|
-
export { ActionEvent, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionRequest, BulkSectionResult, CloneSectionRequest, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { Section, CreateSectionOptions, BulkCreateSectionOptions, BulkCreateSectionResponse, BulkCreateSectionMigrationResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, CursorQuery, typedQuerySections, QuerySectionsOptions, SectionsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionRequest, BulkSectionResult, CloneSectionRequest, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, 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, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, VideoResolution, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
|
|
6
6
|
interface CreateSectionSignature {
|
|
@@ -54,15 +54,6 @@ interface DeleteSectionSignature {
|
|
|
54
54
|
*/
|
|
55
55
|
(sectionId: string): Promise<void>;
|
|
56
56
|
}
|
|
57
|
-
declare function querySections$1(httpClient: HttpClient): QuerySectionsSignature;
|
|
58
|
-
interface QuerySectionsSignature {
|
|
59
|
-
/**
|
|
60
|
-
* Retrieves a list of Sections, given the provided [paging, filtering, and sorting][1].
|
|
61
|
-
*
|
|
62
|
-
* Up to 1,000 Sections can be returned per request.
|
|
63
|
-
*/
|
|
64
|
-
(options?: QuerySectionsOptions): SectionsQueryBuilder;
|
|
65
|
-
}
|
|
66
57
|
declare function listSections$1(httpClient: HttpClient): ListSectionsSignature;
|
|
67
58
|
interface ListSectionsSignature {
|
|
68
59
|
/**
|
|
@@ -94,16 +85,22 @@ interface PublishSectionSignature {
|
|
|
94
85
|
(options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
95
86
|
}
|
|
96
87
|
|
|
88
|
+
declare function customQuerySections(httpClient: HttpClient): {
|
|
89
|
+
(query: CursorQuery): ReturnType<typeof typedQuerySections>;
|
|
90
|
+
(query: CursorQuery, options: QuerySectionsOptions): ReturnType<typeof typedQuerySections>;
|
|
91
|
+
(): SectionsQueryBuilder;
|
|
92
|
+
(options: QuerySectionsOptions): SectionsQueryBuilder;
|
|
93
|
+
};
|
|
97
94
|
declare const createSection: MaybeContext<BuildRESTFunction<typeof createSection$1> & typeof createSection$1>;
|
|
98
95
|
declare const bulkCreateSection: MaybeContext<BuildRESTFunction<typeof bulkCreateSection$1> & typeof bulkCreateSection$1>;
|
|
99
96
|
declare const bulkCreateSectionMigration: MaybeContext<BuildRESTFunction<typeof bulkCreateSectionMigration$1> & typeof bulkCreateSectionMigration$1>;
|
|
100
97
|
declare const getSection: MaybeContext<BuildRESTFunction<typeof getSection$1> & typeof getSection$1>;
|
|
101
98
|
declare const updateSection: MaybeContext<BuildRESTFunction<typeof updateSection$1> & typeof updateSection$1>;
|
|
102
99
|
declare const deleteSection: MaybeContext<BuildRESTFunction<typeof deleteSection$1> & typeof deleteSection$1>;
|
|
103
|
-
declare const querySections: MaybeContext<BuildRESTFunction<typeof querySections$1> & typeof querySections$1>;
|
|
104
100
|
declare const listSections: MaybeContext<BuildRESTFunction<typeof listSections$1> & typeof listSections$1>;
|
|
105
101
|
declare const cloneSection: MaybeContext<BuildRESTFunction<typeof cloneSection$1> & typeof cloneSection$1>;
|
|
106
102
|
declare const moveSection: MaybeContext<BuildRESTFunction<typeof moveSection$1> & typeof moveSection$1>;
|
|
107
103
|
declare const publishSection: MaybeContext<BuildRESTFunction<typeof publishSection$1> & typeof publishSection$1>;
|
|
104
|
+
declare const querySections: MaybeContext<BuildRESTFunction<typeof customQuerySections> & typeof customQuerySections>;
|
|
108
105
|
|
|
109
|
-
export { BulkCreateSectionMigrationResponse, BulkCreateSectionOptions, BulkCreateSectionResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, QuerySectionsOptions, Section, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSection, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
|
|
106
|
+
export { BulkCreateSectionMigrationResponse, BulkCreateSectionOptions, BulkCreateSectionResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, CursorQuery, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, PublishSectionOptions, PublishSectionResponse, QuerySectionsOptions, Section, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSection, bulkCreateSectionMigration, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, publishSection, querySections, updateSection };
|
package/build/cjs/index.js
CHANGED
|
@@ -1222,6 +1222,43 @@ function querySections2(options) {
|
|
|
1222
1222
|
transformationPaths: {}
|
|
1223
1223
|
});
|
|
1224
1224
|
}
|
|
1225
|
+
async function typedQuerySections(query, options) {
|
|
1226
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1227
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1228
|
+
query,
|
|
1229
|
+
...options
|
|
1230
|
+
});
|
|
1231
|
+
const reqOpts = querySections(payload);
|
|
1232
|
+
sideEffects?.onSiteCall?.();
|
|
1233
|
+
try {
|
|
1234
|
+
const result = await httpClient.request(reqOpts);
|
|
1235
|
+
sideEffects?.onSuccess?.(result);
|
|
1236
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1237
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1238
|
+
{
|
|
1239
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1240
|
+
paths: [{ path: "sections.description.image" }]
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1244
|
+
paths: [{ path: "sections.description.video" }]
|
|
1245
|
+
}
|
|
1246
|
+
])
|
|
1247
|
+
);
|
|
1248
|
+
} catch (err) {
|
|
1249
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1250
|
+
err,
|
|
1251
|
+
{
|
|
1252
|
+
spreadPathsToArguments: {},
|
|
1253
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1254
|
+
singleArgumentUnchanged: false
|
|
1255
|
+
},
|
|
1256
|
+
["query", "options"]
|
|
1257
|
+
);
|
|
1258
|
+
sideEffects?.onError?.(err);
|
|
1259
|
+
throw transformedError;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1225
1262
|
async function listSections2(programId, options) {
|
|
1226
1263
|
const { httpClient, sideEffects } = arguments[2];
|
|
1227
1264
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1442,6 +1479,14 @@ function querySections3(httpClient) {
|
|
|
1442
1479
|
{ httpClient }
|
|
1443
1480
|
);
|
|
1444
1481
|
}
|
|
1482
|
+
function typedQuerySections2(httpClient) {
|
|
1483
|
+
return (query, options) => typedQuerySections(
|
|
1484
|
+
query,
|
|
1485
|
+
options,
|
|
1486
|
+
// @ts-ignore
|
|
1487
|
+
{ httpClient }
|
|
1488
|
+
);
|
|
1489
|
+
}
|
|
1445
1490
|
function listSections3(httpClient) {
|
|
1446
1491
|
return (programId, options) => listSections2(
|
|
1447
1492
|
programId,
|
|
@@ -1475,17 +1520,29 @@ function publishSection3(httpClient) {
|
|
|
1475
1520
|
|
|
1476
1521
|
// src/online-programs-v3-section-sections.context.ts
|
|
1477
1522
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
1523
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
1524
|
+
function customQuerySections(httpClient) {
|
|
1525
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
1526
|
+
builderQueryFunction: (options) => querySections3(httpClient)(options),
|
|
1527
|
+
typedQueryFunction: (query, options) => typedQuerySections2(httpClient)(query, options),
|
|
1528
|
+
hasOptionsParameter: true
|
|
1529
|
+
});
|
|
1530
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
1531
|
+
return router(...arguments);
|
|
1532
|
+
}
|
|
1533
|
+
return overloadedQuery;
|
|
1534
|
+
}
|
|
1478
1535
|
var createSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createSection3);
|
|
1479
1536
|
var bulkCreateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSection3);
|
|
1480
1537
|
var bulkCreateSectionMigration4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateSectionMigration3);
|
|
1481
1538
|
var getSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSection3);
|
|
1482
1539
|
var updateSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateSection3);
|
|
1483
1540
|
var deleteSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteSection3);
|
|
1484
|
-
var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(querySections3);
|
|
1485
1541
|
var listSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSections3);
|
|
1486
1542
|
var cloneSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cloneSection3);
|
|
1487
1543
|
var moveSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(moveSection3);
|
|
1488
1544
|
var publishSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishSection3);
|
|
1545
|
+
var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQuerySections);
|
|
1489
1546
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1490
1547
|
0 && (module.exports = {
|
|
1491
1548
|
BulkActionType,
|