@wix/auto_sdk_automations_action-catalog 1.0.32 → 1.0.33

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +11 -3
  2. package/build/cjs/index.js +87 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +57 -1
  5. package/build/cjs/index.typings.js +78 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +29 -2
  8. package/build/cjs/meta.js +58 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +11 -3
  11. package/build/es/index.mjs +86 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +57 -1
  14. package/build/es/index.typings.mjs +77 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +29 -2
  17. package/build/es/meta.mjs +57 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +11 -3
  20. package/build/internal/cjs/index.js +87 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +57 -1
  23. package/build/internal/cjs/index.typings.js +78 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +29 -2
  26. package/build/internal/cjs/meta.js +58 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +11 -3
  29. package/build/internal/es/index.mjs +86 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +57 -1
  32. package/build/internal/es/index.typings.mjs +77 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +29 -2
  35. package/build/internal/es/meta.mjs +57 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  deleteAction: () => deleteAction4,
36
36
  getActionDynamicInputSchema: () => getActionDynamicInputSchema4,
37
37
  getActionDynamicOutputSchema: () => getActionDynamicOutputSchema4,
38
+ getLatestAction: () => getLatestAction4,
38
39
  getRuntimeAction: () => getRuntimeAction4,
39
40
  resolveActions: () => resolveActions4,
40
41
  updateAction: () => updateAction4
@@ -286,6 +287,44 @@ function getRuntimeAction(payload) {
286
287
  }
287
288
  return __getRuntimeAction;
288
289
  }
290
+ function getLatestAction(payload) {
291
+ function __getLatestAction({ host }) {
292
+ const metadata = {
293
+ entityFqdn: "wix.automations.actioncatalog.v1.action",
294
+ method: "GET",
295
+ methodFqn: "wix.automations.actioncatalog.v1.ActionCatalogService.GetLatestAction",
296
+ packageName: PACKAGE_NAME,
297
+ migrationOptions: {
298
+ optInTransformResponse: true
299
+ },
300
+ url: resolveWixAutomationsActioncatalogV1ActionCatalogServiceUrl({
301
+ protoPath: "/v1/actions/latest/apps/{appId}/keys/{actionKey}",
302
+ data: payload,
303
+ host
304
+ }),
305
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
306
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
307
+ {
308
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
309
+ paths: [
310
+ { path: "action.createdDate" },
311
+ { path: "action.updatedDate" },
312
+ { path: "action.icon.urlExpirationDate" }
313
+ ]
314
+ },
315
+ {
316
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
317
+ paths: [
318
+ { path: "action.icon.focalPoint.x" },
319
+ { path: "action.icon.focalPoint.y" }
320
+ ]
321
+ }
322
+ ])
323
+ };
324
+ return metadata;
325
+ }
326
+ return __getLatestAction;
327
+ }
289
328
  function getActionDynamicInputSchema(payload) {
290
329
  function __getActionDynamicInputSchema({ host }) {
291
330
  const metadata = {
@@ -621,6 +660,44 @@ async function getRuntimeAction2(identifiers) {
621
660
  throw transformedError;
622
661
  }
623
662
  }
663
+ async function getLatestAction2(identifiers, options) {
664
+ const { httpClient, sideEffects } = arguments[2];
665
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
666
+ appId: identifiers?.appId,
667
+ actionKey: identifiers?.actionKey,
668
+ translate: options?.translate
669
+ });
670
+ const reqOpts = getLatestAction(payload);
671
+ sideEffects?.onSiteCall?.();
672
+ try {
673
+ const result = await httpClient.request(reqOpts);
674
+ sideEffects?.onSuccess?.(result);
675
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
676
+ (0, import_transform_paths2.transformPaths)(result.data, [
677
+ {
678
+ transformFn: import_image2.transformRESTImageToSDKImage,
679
+ paths: [{ path: "action.icon" }]
680
+ }
681
+ ])
682
+ );
683
+ } catch (err) {
684
+ const transformedError = (0, import_transform_error.transformError)(
685
+ err,
686
+ {
687
+ spreadPathsToArguments: {},
688
+ explicitPathsToArguments: {
689
+ appId: "$[0].appId",
690
+ actionKey: "$[0].actionKey",
691
+ translate: "$[1].translate"
692
+ },
693
+ singleArgumentUnchanged: false
694
+ },
695
+ ["identifiers", "options"]
696
+ );
697
+ sideEffects?.onError?.(err);
698
+ throw transformedError;
699
+ }
700
+ }
624
701
  async function getActionDynamicInputSchema2(appId, options) {
625
702
  const { httpClient, sideEffects } = arguments[2];
626
703
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -809,6 +886,14 @@ function getRuntimeAction3(httpClient) {
809
886
  { httpClient }
810
887
  );
811
888
  }
889
+ function getLatestAction3(httpClient) {
890
+ return (identifiers, options) => getLatestAction2(
891
+ identifiers,
892
+ options,
893
+ // @ts-ignore
894
+ { httpClient }
895
+ );
896
+ }
812
897
  function getActionDynamicInputSchema3(httpClient) {
813
898
  return (appId, options) => getActionDynamicInputSchema2(
814
899
  appId,
@@ -854,6 +939,7 @@ var createAction4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(c
854
939
  var updateAction4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateAction3);
855
940
  var deleteAction4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteAction3);
856
941
  var getRuntimeAction4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getRuntimeAction3);
942
+ var getLatestAction4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getLatestAction3);
857
943
  var getActionDynamicInputSchema4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getActionDynamicInputSchema3);
858
944
  var resolveActions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(resolveActions3);
859
945
  var copyInputMapping4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(copyInputMapping3);
@@ -876,6 +962,7 @@ var bulkGetActionDynamicOutputSchemas4 = /* @__PURE__ */ (0, import_rest_modules
876
962
  deleteAction,
877
963
  getActionDynamicInputSchema,
878
964
  getActionDynamicOutputSchema,
965
+ getLatestAction,
879
966
  getRuntimeAction,
880
967
  resolveActions,
881
968
  updateAction