@wix/auto_sdk_online-programs_sections 1.0.12 → 1.0.14
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 +49 -31
- package/build/cjs/index.js +18 -149
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +221 -154
- package/build/cjs/index.typings.js +18 -141
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +89 -77
- package/build/cjs/meta.js +8 -111
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +537 -0
- package/build/cjs/schemas.js +852 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +49 -31
- package/build/es/index.mjs +16 -147
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +221 -154
- package/build/es/index.typings.mjs +16 -139
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +89 -77
- package/build/es/meta.mjs +8 -110
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +537 -0
- package/build/es/schemas.mjs +796 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +49 -31
- package/build/internal/cjs/index.js +18 -149
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +221 -154
- package/build/internal/cjs/index.typings.js +18 -141
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +89 -77
- package/build/internal/cjs/meta.js +8 -111
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +537 -0
- package/build/internal/cjs/schemas.js +852 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +49 -31
- package/build/internal/es/index.mjs +16 -147
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +221 -154
- package/build/internal/es/index.typings.mjs +16 -139
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +89 -77
- package/build/internal/es/meta.mjs +8 -110
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +537 -0
- package/build/internal/es/schemas.mjs +796 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
|
@@ -29,7 +29,6 @@ __export(index_typings_exports, {
|
|
|
29
29
|
State: () => State,
|
|
30
30
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
31
31
|
bulkCreateSection: () => bulkCreateSection2,
|
|
32
|
-
bulkCreateSectionMigration: () => bulkCreateSectionMigration2,
|
|
33
32
|
cloneSection: () => cloneSection2,
|
|
34
33
|
createSection: () => createSection2,
|
|
35
34
|
deleteSection: () => deleteSection2,
|
|
@@ -39,7 +38,8 @@ __export(index_typings_exports, {
|
|
|
39
38
|
publishSection: () => publishSection2,
|
|
40
39
|
querySections: () => querySections2,
|
|
41
40
|
typedQuerySections: () => typedQuerySections,
|
|
42
|
-
updateSection: () => updateSection2
|
|
41
|
+
updateSection: () => updateSection2,
|
|
42
|
+
utils: () => utils
|
|
43
43
|
});
|
|
44
44
|
module.exports = __toCommonJS(index_typings_exports);
|
|
45
45
|
|
|
@@ -143,6 +143,14 @@ function resolveWixOnlineprogramsSectionsV3SectionsServiceUrl(opts) {
|
|
|
143
143
|
{
|
|
144
144
|
srcPath: "/program-sections-service",
|
|
145
145
|
destPath: ""
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
srcPath: "/online-programs/v3/sections",
|
|
149
|
+
destPath: "/v3/sections"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
srcPath: "/online-programs/v3/bulk/sections",
|
|
153
|
+
destPath: "/v3/bulk/sections"
|
|
146
154
|
}
|
|
147
155
|
]
|
|
148
156
|
};
|
|
@@ -321,95 +329,6 @@ function bulkCreateSection(payload) {
|
|
|
321
329
|
}
|
|
322
330
|
return __bulkCreateSection;
|
|
323
331
|
}
|
|
324
|
-
function bulkCreateSectionMigration(payload) {
|
|
325
|
-
function __bulkCreateSectionMigration({ host }) {
|
|
326
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
327
|
-
{
|
|
328
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
329
|
-
paths: [
|
|
330
|
-
{ path: "sections.createdDate" },
|
|
331
|
-
{ path: "sections.updatedDate" },
|
|
332
|
-
{ path: "sections.description.image.urlExpirationDate" },
|
|
333
|
-
{ path: "sections.description.video.urlExpirationDate" },
|
|
334
|
-
{ path: "sections.description.video.resolutions.urlExpirationDate" },
|
|
335
|
-
{
|
|
336
|
-
path: "sections.description.video.resolutions.poster.urlExpirationDate"
|
|
337
|
-
},
|
|
338
|
-
{ path: "sections.description.video.posters.urlExpirationDate" }
|
|
339
|
-
]
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
343
|
-
paths: [
|
|
344
|
-
{ path: "sections.ordering" },
|
|
345
|
-
{ path: "sections.description.image.focalPoint.x" },
|
|
346
|
-
{ path: "sections.description.image.focalPoint.y" },
|
|
347
|
-
{
|
|
348
|
-
path: "sections.description.video.resolutions.poster.focalPoint.x"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
path: "sections.description.video.resolutions.poster.focalPoint.y"
|
|
352
|
-
},
|
|
353
|
-
{ path: "sections.description.video.posters.focalPoint.x" },
|
|
354
|
-
{ path: "sections.description.video.posters.focalPoint.y" }
|
|
355
|
-
]
|
|
356
|
-
}
|
|
357
|
-
]);
|
|
358
|
-
const metadata = {
|
|
359
|
-
entityFqdn: "wix.online_programs.v3.section",
|
|
360
|
-
method: "POST",
|
|
361
|
-
methodFqn: "wix.onlineprograms.sections.v3.SectionsService.BulkCreateSectionMigration",
|
|
362
|
-
packageName: PACKAGE_NAME,
|
|
363
|
-
migrationOptions: {
|
|
364
|
-
optInTransformResponse: true
|
|
365
|
-
},
|
|
366
|
-
url: resolveWixOnlineprogramsSectionsV3SectionsServiceUrl({
|
|
367
|
-
protoPath: "/v3/bulk/sections/create/migration",
|
|
368
|
-
data: serializedData,
|
|
369
|
-
host
|
|
370
|
-
}),
|
|
371
|
-
data: serializedData,
|
|
372
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
373
|
-
{
|
|
374
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
375
|
-
paths: [
|
|
376
|
-
{ path: "results.item.createdDate" },
|
|
377
|
-
{ path: "results.item.updatedDate" },
|
|
378
|
-
{ path: "results.item.description.image.urlExpirationDate" },
|
|
379
|
-
{ path: "results.item.description.video.urlExpirationDate" },
|
|
380
|
-
{
|
|
381
|
-
path: "results.item.description.video.resolutions.urlExpirationDate"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
path: "results.item.description.video.resolutions.poster.urlExpirationDate"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
path: "results.item.description.video.posters.urlExpirationDate"
|
|
388
|
-
}
|
|
389
|
-
]
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
393
|
-
paths: [
|
|
394
|
-
{ path: "results.item.ordering" },
|
|
395
|
-
{ path: "results.item.description.image.focalPoint.x" },
|
|
396
|
-
{ path: "results.item.description.image.focalPoint.y" },
|
|
397
|
-
{
|
|
398
|
-
path: "results.item.description.video.resolutions.poster.focalPoint.x"
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
path: "results.item.description.video.resolutions.poster.focalPoint.y"
|
|
402
|
-
},
|
|
403
|
-
{ path: "results.item.description.video.posters.focalPoint.x" },
|
|
404
|
-
{ path: "results.item.description.video.posters.focalPoint.y" }
|
|
405
|
-
]
|
|
406
|
-
}
|
|
407
|
-
])
|
|
408
|
-
};
|
|
409
|
-
return metadata;
|
|
410
|
-
}
|
|
411
|
-
return __bulkCreateSectionMigration;
|
|
412
|
-
}
|
|
413
332
|
function getSection(payload) {
|
|
414
333
|
function __getSection({ host }) {
|
|
415
334
|
const metadata = {
|
|
@@ -855,8 +774,8 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
|
|
|
855
774
|
var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
|
|
856
775
|
var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
|
|
857
776
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
777
|
+
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
858
778
|
var State = /* @__PURE__ */ ((State2) => {
|
|
859
|
-
State2["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
860
779
|
State2["DRAFT"] = "DRAFT";
|
|
861
780
|
State2["PUBLISHED"] = "PUBLISHED";
|
|
862
781
|
return State2;
|
|
@@ -871,7 +790,6 @@ var Enum = /* @__PURE__ */ ((Enum2) => {
|
|
|
871
790
|
return Enum2;
|
|
872
791
|
})(Enum || {});
|
|
873
792
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
874
|
-
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
875
793
|
RequestedFields2["TOTAL_STEPS"] = "TOTAL_STEPS";
|
|
876
794
|
return RequestedFields2;
|
|
877
795
|
})(RequestedFields || {});
|
|
@@ -1004,52 +922,6 @@ async function bulkCreateSection2(sections, options) {
|
|
|
1004
922
|
throw transformedError;
|
|
1005
923
|
}
|
|
1006
924
|
}
|
|
1007
|
-
async function bulkCreateSectionMigration2(sections) {
|
|
1008
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1009
|
-
const payload = (0, import_transform_paths2.transformPaths)(
|
|
1010
|
-
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ sections }),
|
|
1011
|
-
[
|
|
1012
|
-
{
|
|
1013
|
-
transformFn: import_image.transformSDKImageToRESTImage,
|
|
1014
|
-
paths: [{ path: "sections.description.image" }]
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
|
|
1018
|
-
paths: [{ path: "sections.description.video" }]
|
|
1019
|
-
}
|
|
1020
|
-
]
|
|
1021
|
-
);
|
|
1022
|
-
const reqOpts = bulkCreateSectionMigration(payload);
|
|
1023
|
-
sideEffects?.onSiteCall?.();
|
|
1024
|
-
try {
|
|
1025
|
-
const result = await httpClient.request(reqOpts);
|
|
1026
|
-
sideEffects?.onSuccess?.(result);
|
|
1027
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1028
|
-
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1029
|
-
{
|
|
1030
|
-
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1031
|
-
paths: [{ path: "results.item.description.image" }]
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1035
|
-
paths: [{ path: "results.item.description.video" }]
|
|
1036
|
-
}
|
|
1037
|
-
])
|
|
1038
|
-
);
|
|
1039
|
-
} catch (err) {
|
|
1040
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1041
|
-
err,
|
|
1042
|
-
{
|
|
1043
|
-
spreadPathsToArguments: {},
|
|
1044
|
-
explicitPathsToArguments: { sections: "$[0]" },
|
|
1045
|
-
singleArgumentUnchanged: false
|
|
1046
|
-
},
|
|
1047
|
-
["sections"]
|
|
1048
|
-
);
|
|
1049
|
-
sideEffects?.onError?.(err);
|
|
1050
|
-
throw transformedError;
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
925
|
async function getSection2(sectionId, options) {
|
|
1054
926
|
const { httpClient, sideEffects } = arguments[2];
|
|
1055
927
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1260,6 +1132,11 @@ async function typedQuerySections(query, options) {
|
|
|
1260
1132
|
throw transformedError;
|
|
1261
1133
|
}
|
|
1262
1134
|
}
|
|
1135
|
+
var utils = {
|
|
1136
|
+
query: {
|
|
1137
|
+
...(0, import_query_builder_utils.createQueryUtils)()
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1263
1140
|
async function listSections2(programId, options) {
|
|
1264
1141
|
const { httpClient, sideEffects } = arguments[2];
|
|
1265
1142
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1436,7 +1313,6 @@ async function publishSection2(options) {
|
|
|
1436
1313
|
State,
|
|
1437
1314
|
WebhookIdentityType,
|
|
1438
1315
|
bulkCreateSection,
|
|
1439
|
-
bulkCreateSectionMigration,
|
|
1440
1316
|
cloneSection,
|
|
1441
1317
|
createSection,
|
|
1442
1318
|
deleteSection,
|
|
@@ -1446,6 +1322,7 @@ async function publishSection2(options) {
|
|
|
1446
1322
|
publishSection,
|
|
1447
1323
|
querySections,
|
|
1448
1324
|
typedQuerySections,
|
|
1449
|
-
updateSection
|
|
1325
|
+
updateSection,
|
|
1326
|
+
utils
|
|
1450
1327
|
});
|
|
1451
1328
|
//# sourceMappingURL=index.typings.js.map
|