@wix/auto_sdk_online-programs_sections 1.0.20 → 1.0.21
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 -22
- package/build/cjs/index.js +0 -107
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +16 -47
- package/build/cjs/index.typings.js +0 -99
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -5
- package/build/cjs/meta.js +0 -75
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -22
- package/build/es/index.mjs +0 -106
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +16 -47
- package/build/es/index.typings.mjs +0 -98
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -5
- package/build/es/meta.mjs +0 -74
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -22
- package/build/internal/cjs/index.typings.d.ts +26 -45
- package/build/internal/cjs/meta.d.ts +7 -4
- package/build/internal/es/index.d.mts +10 -22
- package/build/internal/es/index.typings.d.mts +26 -45
- package/build/internal/es/meta.d.mts +7 -4
- package/package.json +2 -2
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, BulkCreateSectionsOptions, BulkCreateSectionsResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse,
|
|
3
|
-
export { AccountInfo, ActionEvent, AddressLocation, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionMigrationResponse, BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, 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, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, VideoResolution, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
2
|
+
import { Section, CreateSectionOptions, BulkCreateSectionsOptions, BulkCreateSectionsResponse, GetSectionOptions, UpdateSectionOptions, ListSectionsOptions, ListSectionsResponse, CloneSectionOptions, CloneSectionResponse, MoveSectionOptions, MoveSectionResponse, SectionQuery, QuerySectionsOptions, typedQuerySections, SectionsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, ActionEvent, AddressLocation, ApplicationError, BulkActionMetadata, BulkActionType, BulkActionTypeWithLiterals, BulkCloneSectionRequest, BulkCloneSectionResponse, BulkCreateSectionMigrationRequest, BulkCreateSectionMigrationResponse, BulkCreateSectionRequest, BulkCreateSectionResponse, BulkCreateSectionsRequest, BulkSectionResult, CloneSectionRequest, CommonQueryWithEntityContext, CreateSectionRequest, CreateSectionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, 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, PublishSectionResponse, QuerySectionsRequest, QuerySectionsResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RestoreSectionFromTrashRequest, RestoreSectionFromTrashResponse, SearchIndexingNotification, SearchIndexingNotificationState, SearchIndexingNotificationStateWithLiterals, SectionCloned, SectionDeleted, SectionMoved, SectionPublished, SectionQuerySpec, SectionUpdated, SectionsQueryResult, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, UpdateByFilterOperation, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, UpdateExistingOperation, UpdateSectionRequest, UpdateSectionResponse, VideoResolution, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createSection$1(httpClient: HttpClient): CreateSectionSignature;
|
|
6
6
|
interface CreateSectionSignature {
|
|
@@ -13,7 +13,7 @@ interface CreateSectionSignature {
|
|
|
13
13
|
* @param - Section to create. Must include `section.program_id`.
|
|
14
14
|
* @returns Created section.
|
|
15
15
|
*/
|
|
16
|
-
(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `
|
|
16
|
+
(section: Section, options?: CreateSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
17
17
|
}
|
|
18
18
|
declare function bulkCreateSections$1(httpClient: HttpClient): BulkCreateSectionsSignature;
|
|
19
19
|
interface BulkCreateSectionsSignature {
|
|
@@ -36,7 +36,7 @@ interface GetSectionSignature {
|
|
|
36
36
|
* @param - ID of the Section to retrieve.
|
|
37
37
|
* @returns Retrieved section.
|
|
38
38
|
*/
|
|
39
|
-
(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `
|
|
39
|
+
(sectionId: string, options?: GetSectionOptions): Promise<NonNullablePaths<Section, `programId` | `description.title` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
40
40
|
}
|
|
41
41
|
declare function updateSection$1(httpClient: HttpClient): UpdateSectionSignature;
|
|
42
42
|
interface UpdateSectionSignature {
|
|
@@ -45,11 +45,11 @@ interface UpdateSectionSignature {
|
|
|
45
45
|
*
|
|
46
46
|
* Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when updating the section. This ensures you're working with the latest section and prevents unintended overwrites.
|
|
47
47
|
*
|
|
48
|
-
* Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section).
|
|
48
|
+
* Use this method to update section content and settings. To reorder a section, call [Move Section](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/move-section).
|
|
49
49
|
* @param - Section ID.
|
|
50
50
|
* @returns Updated section.
|
|
51
51
|
*/
|
|
52
|
-
(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `
|
|
52
|
+
(_id: string, options?: NonNullablePaths<UpdateSectionOptions, `section.revision`, 3>): Promise<NonNullablePaths<Section, `programId` | `description.title` | `oldTotalSteps` | `trialSection` | `ordering` | `delayInDays`, 3>>;
|
|
53
53
|
}
|
|
54
54
|
declare function deleteSection$1(httpClient: HttpClient): DeleteSectionSignature;
|
|
55
55
|
interface DeleteSectionSignature {
|
|
@@ -71,7 +71,7 @@ interface ListSectionsSignature {
|
|
|
71
71
|
* To filter or sort sections, call [Query Sections](https://dev.wix.com/docs/api-reference/business-management/online-programs/sections/query-sections).
|
|
72
72
|
* @param - Program ID to list sections for.
|
|
73
73
|
*/
|
|
74
|
-
(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.
|
|
74
|
+
(programId: string, options?: ListSectionsOptions): Promise<NonNullablePaths<ListSectionsResponse, `sections` | `sections.${number}.programId` | `sections.${number}.description.title` | `sections.${number}.oldTotalSteps` | `sections.${number}.trialSection` | `sections.${number}.ordering` | `sections.${number}.delayInDays`, 5>>;
|
|
75
75
|
}
|
|
76
76
|
declare function cloneSection$1(httpClient: HttpClient): CloneSectionSignature;
|
|
77
77
|
interface CloneSectionSignature {
|
|
@@ -81,7 +81,7 @@ interface CloneSectionSignature {
|
|
|
81
81
|
* The cloned section is added to the same program after the current last section. Translation content is copied to the cloned section.
|
|
82
82
|
* @param - ID of the section to clone.
|
|
83
83
|
*/
|
|
84
|
-
(sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.
|
|
84
|
+
(sectionId: string, options?: CloneSectionOptions): Promise<NonNullablePaths<CloneSectionResponse, `section.programId` | `section.description.title` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
85
85
|
}
|
|
86
86
|
declare function moveSection$1(httpClient: HttpClient): MoveSectionSignature;
|
|
87
87
|
interface MoveSectionSignature {
|
|
@@ -92,18 +92,7 @@ interface MoveSectionSignature {
|
|
|
92
92
|
*
|
|
93
93
|
* If `afterSectionId` isn't specified, the section is moved to the beginning of the program. The stored ordering value is recalculated automatically.
|
|
94
94
|
*/
|
|
95
|
-
(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.
|
|
96
|
-
}
|
|
97
|
-
declare function publishSection$1(httpClient: HttpClient): PublishSectionSignature;
|
|
98
|
-
interface PublishSectionSignature {
|
|
99
|
-
/**
|
|
100
|
-
* Publishes a section.
|
|
101
|
-
*
|
|
102
|
-
* Each time the section is updated, `revision` increments by 1. The current `revision` must be passed when publishing the section. This ensures you're working with the latest section and prevents unintended overwrites.
|
|
103
|
-
*
|
|
104
|
-
* Publishing sets the section's `state` to `PUBLISHED`.
|
|
105
|
-
*/
|
|
106
|
-
(options?: PublishSectionOptions): Promise<NonNullablePaths<PublishSectionResponse, `section.programId` | `section.description.title` | `section.state` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
95
|
+
(options?: MoveSectionOptions): Promise<NonNullablePaths<MoveSectionResponse, `section.programId` | `section.description.title` | `section.oldTotalSteps` | `section.trialSection` | `section.ordering` | `section.delayInDays`, 4>>;
|
|
107
96
|
}
|
|
108
97
|
|
|
109
98
|
declare function customQuerySections(httpClient: HttpClient): {
|
|
@@ -118,7 +107,6 @@ declare const deleteSection: MaybeContext<BuildRESTFunction<typeof deleteSection
|
|
|
118
107
|
declare const listSections: MaybeContext<BuildRESTFunction<typeof listSections$1> & typeof listSections$1>;
|
|
119
108
|
declare const cloneSection: MaybeContext<BuildRESTFunction<typeof cloneSection$1> & typeof cloneSection$1>;
|
|
120
109
|
declare const moveSection: MaybeContext<BuildRESTFunction<typeof moveSection$1> & typeof moveSection$1>;
|
|
121
|
-
declare const publishSection: MaybeContext<BuildRESTFunction<typeof publishSection$1> & typeof publishSection$1>;
|
|
122
110
|
declare const querySections: MaybeContext<BuildRESTFunction<typeof customQuerySections> & typeof customQuerySections>;
|
|
123
111
|
|
|
124
|
-
export { BulkCreateSectionsOptions, BulkCreateSectionsResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse,
|
|
112
|
+
export { BulkCreateSectionsOptions, BulkCreateSectionsResponse, CloneSectionOptions, CloneSectionResponse, CreateSectionOptions, GetSectionOptions, ListSectionsOptions, ListSectionsResponse, MoveSectionOptions, MoveSectionResponse, QuerySectionsOptions, Section, SectionQuery, SectionsQueryBuilder, UpdateSectionOptions, bulkCreateSections, cloneSection, createSection, deleteSection, getSection, listSections, moveSection, querySections, updateSection };
|
package/build/cjs/index.js
CHANGED
|
@@ -35,7 +35,6 @@ __export(index_exports, {
|
|
|
35
35
|
getSection: () => getSection4,
|
|
36
36
|
listSections: () => listSections4,
|
|
37
37
|
moveSection: () => moveSection4,
|
|
38
|
-
publishSection: () => publishSection4,
|
|
39
38
|
querySections: () => querySections4,
|
|
40
39
|
updateSection: () => updateSection4,
|
|
41
40
|
utils: () => utils
|
|
@@ -720,61 +719,6 @@ function moveSection(payload) {
|
|
|
720
719
|
}
|
|
721
720
|
return __moveSection;
|
|
722
721
|
}
|
|
723
|
-
function publishSection(payload) {
|
|
724
|
-
function __publishSection({ host }) {
|
|
725
|
-
const metadata = {
|
|
726
|
-
entityFqdn: "wix.online_programs.v3.section",
|
|
727
|
-
method: "PATCH",
|
|
728
|
-
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.PublishSection",
|
|
729
|
-
packageName: PACKAGE_NAME,
|
|
730
|
-
migrationOptions: {
|
|
731
|
-
optInTransformResponse: true
|
|
732
|
-
},
|
|
733
|
-
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
734
|
-
protoPath: "/v3/sections/publish",
|
|
735
|
-
data: payload,
|
|
736
|
-
host
|
|
737
|
-
}),
|
|
738
|
-
data: payload,
|
|
739
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
740
|
-
{
|
|
741
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
742
|
-
paths: [
|
|
743
|
-
{ path: "section.createdDate" },
|
|
744
|
-
{ path: "section.updatedDate" },
|
|
745
|
-
{ path: "section.description.image.urlExpirationDate" },
|
|
746
|
-
{ path: "section.description.video.urlExpirationDate" },
|
|
747
|
-
{
|
|
748
|
-
path: "section.description.video.resolutions.urlExpirationDate"
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
path: "section.description.video.resolutions.poster.urlExpirationDate"
|
|
752
|
-
},
|
|
753
|
-
{ path: "section.description.video.posters.urlExpirationDate" }
|
|
754
|
-
]
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
758
|
-
paths: [
|
|
759
|
-
{ path: "section.ordering" },
|
|
760
|
-
{ path: "section.description.image.focalPoint.x" },
|
|
761
|
-
{ path: "section.description.image.focalPoint.y" },
|
|
762
|
-
{
|
|
763
|
-
path: "section.description.video.resolutions.poster.focalPoint.x"
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
path: "section.description.video.resolutions.poster.focalPoint.y"
|
|
767
|
-
},
|
|
768
|
-
{ path: "section.description.video.posters.focalPoint.x" },
|
|
769
|
-
{ path: "section.description.video.posters.focalPoint.y" }
|
|
770
|
-
]
|
|
771
|
-
}
|
|
772
|
-
])
|
|
773
|
-
};
|
|
774
|
-
return metadata;
|
|
775
|
-
}
|
|
776
|
-
return __publishSection;
|
|
777
|
-
}
|
|
778
722
|
|
|
779
723
|
// src/online-programs-v3-section-sections.universal.ts
|
|
780
724
|
var import_image = require("@wix/sdk-runtime/transformations/image");
|
|
@@ -1266,48 +1210,6 @@ async function moveSection2(options) {
|
|
|
1266
1210
|
throw transformedError;
|
|
1267
1211
|
}
|
|
1268
1212
|
}
|
|
1269
|
-
async function publishSection2(options) {
|
|
1270
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1271
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1272
|
-
sectionId: options?.sectionId,
|
|
1273
|
-
revision: options?.revision,
|
|
1274
|
-
fields: options?.fields
|
|
1275
|
-
});
|
|
1276
|
-
const reqOpts = publishSection(payload);
|
|
1277
|
-
sideEffects?.onSiteCall?.();
|
|
1278
|
-
try {
|
|
1279
|
-
const result = await httpClient.request(reqOpts);
|
|
1280
|
-
sideEffects?.onSuccess?.(result);
|
|
1281
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1282
|
-
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1283
|
-
{
|
|
1284
|
-
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1285
|
-
paths: [{ path: "section.description.image" }]
|
|
1286
|
-
},
|
|
1287
|
-
{
|
|
1288
|
-
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1289
|
-
paths: [{ path: "section.description.video" }]
|
|
1290
|
-
}
|
|
1291
|
-
])
|
|
1292
|
-
);
|
|
1293
|
-
} catch (err) {
|
|
1294
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1295
|
-
err,
|
|
1296
|
-
{
|
|
1297
|
-
spreadPathsToArguments: {},
|
|
1298
|
-
explicitPathsToArguments: {
|
|
1299
|
-
sectionId: "$[0].sectionId",
|
|
1300
|
-
revision: "$[0].revision",
|
|
1301
|
-
fields: "$[0].fields"
|
|
1302
|
-
},
|
|
1303
|
-
singleArgumentUnchanged: false
|
|
1304
|
-
},
|
|
1305
|
-
["options"]
|
|
1306
|
-
);
|
|
1307
|
-
sideEffects?.onError?.(err);
|
|
1308
|
-
throw transformedError;
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
1213
|
|
|
1312
1214
|
// src/online-programs-v3-section-sections.public.ts
|
|
1313
1215
|
function createSection3(httpClient) {
|
|
@@ -1387,13 +1289,6 @@ function moveSection3(httpClient) {
|
|
|
1387
1289
|
{ httpClient }
|
|
1388
1290
|
);
|
|
1389
1291
|
}
|
|
1390
|
-
function publishSection3(httpClient) {
|
|
1391
|
-
return (options) => publishSection2(
|
|
1392
|
-
options,
|
|
1393
|
-
// @ts-ignore
|
|
1394
|
-
{ httpClient }
|
|
1395
|
-
);
|
|
1396
|
-
}
|
|
1397
1292
|
|
|
1398
1293
|
// src/online-programs-v3-section-sections.context.ts
|
|
1399
1294
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -1417,7 +1312,6 @@ var deleteSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
|
|
|
1417
1312
|
var listSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listSections3);
|
|
1418
1313
|
var cloneSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cloneSection3);
|
|
1419
1314
|
var moveSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(moveSection3);
|
|
1420
|
-
var publishSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishSection3);
|
|
1421
1315
|
var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQuerySections);
|
|
1422
1316
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1423
1317
|
0 && (module.exports = {
|
|
@@ -1436,7 +1330,6 @@ var querySections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(
|
|
|
1436
1330
|
getSection,
|
|
1437
1331
|
listSections,
|
|
1438
1332
|
moveSection,
|
|
1439
|
-
publishSection,
|
|
1440
1333
|
querySections,
|
|
1441
1334
|
updateSection,
|
|
1442
1335
|
utils
|