@wix/auto_sdk_automations_automations-v-2 1.0.6 → 1.0.8
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/{automations-v2-automation-automations-v-2.universal-CUoGClWF.d.ts → automations-v2-automation-automations-v-2.universal-BCyd22mR.d.ts} +28 -1
- package/build/cjs/index.d.ts +11 -3
- package/build/cjs/index.js +53 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +53 -2
- package/build/cjs/meta.js +38 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{automations-v2-automation-automations-v-2.universal-CUoGClWF.d.mts → automations-v2-automation-automations-v-2.universal-BCyd22mR.d.mts} +28 -1
- package/build/es/index.d.mts +11 -3
- package/build/es/index.mjs +52 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/meta.d.mts +53 -2
- package/build/es/meta.mjs +37 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/{automations-v2-automation-automations-v-2.universal-CUoGClWF.d.ts → automations-v2-automation-automations-v-2.universal-BCyd22mR.d.ts} +28 -1
- package/build/internal/cjs/index.d.ts +11 -3
- package/build/internal/cjs/index.js +53 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +53 -2
- package/build/internal/cjs/meta.js +38 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/{automations-v2-automation-automations-v-2.universal-CUoGClWF.d.mts → automations-v2-automation-automations-v-2.universal-BCyd22mR.d.mts} +28 -1
- package/build/internal/es/index.d.mts +11 -3
- package/build/internal/es/index.mjs +52 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +53 -2
- package/build/internal/es/meta.mjs +37 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
deleteAutomation: () => deleteAutomation4,
|
|
49
49
|
deleteDraftAutomation: () => deleteDraftAutomation4,
|
|
50
50
|
generatePreinstalledAutomation: () => generatePreinstalledAutomation4,
|
|
51
|
+
getAggregatedUsageInfo: () => getAggregatedUsageInfo4,
|
|
51
52
|
getAutomation: () => getAutomation4,
|
|
52
53
|
getAutomationRevision: () => getAutomationRevision4,
|
|
53
54
|
getOrCreateDraftAutomation: () => getOrCreateDraftAutomation4,
|
|
@@ -371,6 +372,24 @@ function queryAutomations(payload) {
|
|
|
371
372
|
}
|
|
372
373
|
return __queryAutomations;
|
|
373
374
|
}
|
|
375
|
+
function getAggregatedUsageInfo(payload) {
|
|
376
|
+
function __getAggregatedUsageInfo({ host }) {
|
|
377
|
+
const metadata = {
|
|
378
|
+
entityFqdn: "wix.automations.v2.automation",
|
|
379
|
+
method: "GET",
|
|
380
|
+
methodFqn: "wix.automations.v2.AutomationsService.GetAggregatedUsageInfo",
|
|
381
|
+
packageName: PACKAGE_NAME,
|
|
382
|
+
url: resolveWixAutomationsV2AutomationsServiceUrl({
|
|
383
|
+
protoPath: "/v2/automations/usage",
|
|
384
|
+
data: payload,
|
|
385
|
+
host
|
|
386
|
+
}),
|
|
387
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload, true)
|
|
388
|
+
};
|
|
389
|
+
return metadata;
|
|
390
|
+
}
|
|
391
|
+
return __getAggregatedUsageInfo;
|
|
392
|
+
}
|
|
374
393
|
function copyAutomation(payload) {
|
|
375
394
|
function __copyAutomation({ host }) {
|
|
376
395
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1040,6 +1059,31 @@ function queryAutomations2() {
|
|
|
1040
1059
|
transformationPaths: {}
|
|
1041
1060
|
});
|
|
1042
1061
|
}
|
|
1062
|
+
async function getAggregatedUsageInfo2(options) {
|
|
1063
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1064
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1065
|
+
filter: options?.filter
|
|
1066
|
+
});
|
|
1067
|
+
const reqOpts = getAggregatedUsageInfo(payload);
|
|
1068
|
+
sideEffects?.onSiteCall?.();
|
|
1069
|
+
try {
|
|
1070
|
+
const result = await httpClient.request(reqOpts);
|
|
1071
|
+
sideEffects?.onSuccess?.(result);
|
|
1072
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1073
|
+
} catch (err) {
|
|
1074
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1075
|
+
err,
|
|
1076
|
+
{
|
|
1077
|
+
spreadPathsToArguments: {},
|
|
1078
|
+
explicitPathsToArguments: { filter: "$[0].filter" },
|
|
1079
|
+
singleArgumentUnchanged: false
|
|
1080
|
+
},
|
|
1081
|
+
["options"]
|
|
1082
|
+
);
|
|
1083
|
+
sideEffects?.onError?.(err);
|
|
1084
|
+
throw transformedError;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1043
1087
|
async function copyAutomation2(automationId, options) {
|
|
1044
1088
|
const { httpClient, sideEffects } = arguments[2];
|
|
1045
1089
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -1361,6 +1405,13 @@ function queryAutomations3(httpClient) {
|
|
|
1361
1405
|
{ httpClient }
|
|
1362
1406
|
);
|
|
1363
1407
|
}
|
|
1408
|
+
function getAggregatedUsageInfo3(httpClient) {
|
|
1409
|
+
return (options) => getAggregatedUsageInfo2(
|
|
1410
|
+
options,
|
|
1411
|
+
// @ts-ignore
|
|
1412
|
+
{ httpClient }
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1364
1415
|
function copyAutomation3(httpClient) {
|
|
1365
1416
|
return (automationId, options) => copyAutomation2(
|
|
1366
1417
|
automationId,
|
|
@@ -1498,6 +1549,7 @@ var deleteAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModul
|
|
|
1498
1549
|
var bulkDeleteAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteAutomations3);
|
|
1499
1550
|
var generatePreinstalledAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generatePreinstalledAutomation3);
|
|
1500
1551
|
var queryAutomations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryAutomations3);
|
|
1552
|
+
var getAggregatedUsageInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getAggregatedUsageInfo3);
|
|
1501
1553
|
var copyAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(copyAutomation3);
|
|
1502
1554
|
var createDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDraftAutomation3);
|
|
1503
1555
|
var getOrCreateDraftAutomation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrCreateDraftAutomation3);
|
|
@@ -1541,6 +1593,7 @@ var onAutomationUpdated2 = (0, import_event_definition_modules.createEventModule
|
|
|
1541
1593
|
deleteAutomation,
|
|
1542
1594
|
deleteDraftAutomation,
|
|
1543
1595
|
generatePreinstalledAutomation,
|
|
1596
|
+
getAggregatedUsageInfo,
|
|
1544
1597
|
getAutomation,
|
|
1545
1598
|
getAutomationRevision,
|
|
1546
1599
|
getOrCreateDraftAutomation,
|