@wix/auto_sdk_automations_action-catalog 1.0.32 → 1.0.34

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 +59 -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 +31 -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 +59 -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 +31 -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 +59 -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 +31 -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 +59 -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 +31 -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
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { CreateActionOptions, Action, UpdateActionOptions, DeleteActionOptions, GetRuntimeActionIdentifiers, GetActionDynamicInputSchemaOptions, GetActionDynamicInputSchemaResponse, ResolveActionsOptions, ResolveActionsResponse, CopyInputMappingOptions, CopyInputMappingResponse, GetActionDynamicOutputSchemaOptions, GetActionDynamicOutputSchemaResponse, ActionInputMappings, BulkGetActionDynamicOutputSchemasResponse } from './index.typings.js';
3
- export { AccountInfo, ActionEvent, ActionSpecInfo, AdditionalInformationRequiredInfo, ApplicationError, BulkActionMetadata, BulkActionOutputSchemaResult, BulkGetActionDynamicOutputSchemasRequest, CommonCursorPaging, CommonCursors, CommonPaging, CommonPagingMetadataV2, CommonQueryV2, CommonQueryV2PagingMethodOneOf, CommonSortOrder, CommonSortOrderWithLiterals, CommonSorting, CopyInputMappingRequest, CreateActionRequest, CreateActionResponse, CursorPaging, Cursors, DeleteActionRequest, DeleteActionResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExecutionType, ExecutionTypeWithLiterals, ExperimentActionType, ExperimentActionTypeWithLiterals, FocalPoint, GenerateInputMappingFromIntentRequest, GenerateInputMappingFromIntentResponse, GenerateInputMappingFromIntentResponseStatusInfoOneOf, GenericOptions, GetActionDynamicInputSchemaRequest, GetActionDynamicOutputSchemaRequest, GetRuntimeActionRequest, GetRuntimeActionResponse, IdentificationData, IdentificationDataIdOneOf, ImplementedMethods, InputMappingGeneratedInfo, IntegrationOptions, IntegrationType, IntegrationTypeWithLiterals, InterfaceConfiguration, InterfaceConfigurationOptionsOneOf, ItemMetadata, MessageEnvelope, Metadata, MigrateComponentToActionRequest, MigrateComponentToActionResponse, Paging, PagingMetadataV2, QueryActionsRequest, QueryActionsResponse, QueryV2, QueryV2PagingMethodOneOf, ResolveActionsRequest, RestoreInfo, RetryExperimentCreation, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceOptionsOneOf, SourceType, SourceTypeWithLiterals, Status, StatusWithLiterals, Type, TypeWithLiterals, UpdateActionRequest, UpdateActionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WidgetComponentOptions, WixApiOptions } from './index.typings.js';
2
+ import { CreateActionOptions, Action, UpdateActionOptions, DeleteActionOptions, GetRuntimeActionIdentifiers, GetLatestActionIdentifiers, GetLatestActionOptions, GetLatestActionResponse, GetActionDynamicInputSchemaOptions, GetActionDynamicInputSchemaResponse, ResolveActionsOptions, ResolveActionsResponse, CopyInputMappingOptions, CopyInputMappingResponse, GetActionDynamicOutputSchemaOptions, GetActionDynamicOutputSchemaResponse, ActionInputMappings, BulkGetActionDynamicOutputSchemasResponse } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, ActionSpecInfo, AdditionalInformationRequiredInfo, ApplicationError, BulkActionMetadata, BulkActionOutputSchemaResult, BulkGetActionDynamicOutputSchemasRequest, CommonCursorPaging, CommonCursors, CommonPaging, CommonPagingMetadataV2, CommonQueryV2, CommonQueryV2PagingMethodOneOf, CommonSortOrder, CommonSortOrderWithLiterals, CommonSorting, CopyInputMappingRequest, CreateActionRequest, CreateActionResponse, CursorPaging, Cursors, DeleteActionRequest, DeleteActionResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExecutionType, ExecutionTypeWithLiterals, ExperimentActionType, ExperimentActionTypeWithLiterals, FocalPoint, GenerateInputMappingFromIntentRequest, GenerateInputMappingFromIntentResponse, GenerateInputMappingFromIntentResponseStatusInfoOneOf, GenericOptions, GetActionDynamicInputSchemaRequest, GetActionDynamicOutputSchemaRequest, GetLatestActionRequest, GetRuntimeActionRequest, GetRuntimeActionResponse, IdentificationData, IdentificationDataIdOneOf, ImplementedMethods, InputMappingGeneratedInfo, IntegrationOptions, IntegrationType, IntegrationTypeWithLiterals, InterfaceConfiguration, InterfaceConfigurationOptionsOneOf, ItemMetadata, MessageEnvelope, Metadata, MigrateComponentToActionRequest, MigrateComponentToActionResponse, Paging, PagingMetadataV2, QueryActionsRequest, QueryActionsResponse, QueryV2, QueryV2PagingMethodOneOf, ResolveActionsRequest, RestoreInfo, RetryExperimentCreation, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceOptionsOneOf, SourceType, SourceTypeWithLiterals, Status, StatusWithLiterals, Type, TypeWithLiterals, UpdateActionRequest, UpdateActionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WidgetComponentOptions, WixApiOptions } from './index.typings.js';
4
4
 
5
5
  declare function createAction$1(httpClient: HttpClient): CreateActionSignature;
6
6
  interface CreateActionSignature {
@@ -35,6 +35,13 @@ interface GetRuntimeActionSignature {
35
35
  */
36
36
  (identifiers: NonNullablePaths<GetRuntimeActionIdentifiers, `actionKey` | `appId`, 2>): Promise<NonNullablePaths<Action, `appId` | `actionKey` | `implementedMethods.validateConfiguration` | `implementedMethods.duplicateInputMapping` | `implementedMethods.generateApplicationAutomationInputMapping` | `implementedMethods.getQuotaInfo` | `implementedMethods.onBeforeSave` | `implementedMethods.onReset` | `implementedMethods.generateActionInputMappingFromTemplate` | `implementedMethods.onRemove` | `implementedMethods.getDynamicInputSchema` | `implementedMethods.mergeInputMappings` | `implementedMethods.getDynamicOutputSchema` | `implementedMethods.generateInputMappingFromIntent` | `executionType` | `interfaceConfiguration.type`, 3>>;
37
37
  }
38
+ declare function getLatestAction$1(httpClient: HttpClient): GetLatestActionSignature;
39
+ interface GetLatestActionSignature {
40
+ /**
41
+ * Retrieves the latest version of an action by its app ID and action key.
42
+ */
43
+ (identifiers: NonNullablePaths<GetLatestActionIdentifiers, `actionKey` | `appId`, 2>, options?: GetLatestActionOptions): Promise<NonNullablePaths<GetLatestActionResponse, `action.appId` | `action.actionKey` | `action.implementedMethods.validateConfiguration` | `action.implementedMethods.duplicateInputMapping` | `action.implementedMethods.generateApplicationAutomationInputMapping` | `action.implementedMethods.getQuotaInfo` | `action.implementedMethods.onBeforeSave` | `action.implementedMethods.onReset` | `action.implementedMethods.generateActionInputMappingFromTemplate` | `action.implementedMethods.onRemove` | `action.implementedMethods.getDynamicInputSchema` | `action.implementedMethods.mergeInputMappings` | `action.implementedMethods.getDynamicOutputSchema` | `action.implementedMethods.generateInputMappingFromIntent` | `action.executionType` | `action.interfaceConfiguration.type`, 4>>;
44
+ }
38
45
  declare function getActionDynamicInputSchema$1(httpClient: HttpClient): GetActionDynamicInputSchemaSignature;
39
46
  interface GetActionDynamicInputSchemaSignature {
40
47
  /**
@@ -85,10 +92,11 @@ declare const createAction: MaybeContext<BuildRESTFunction<typeof createAction$1
85
92
  declare const updateAction: MaybeContext<BuildRESTFunction<typeof updateAction$1> & typeof updateAction$1>;
86
93
  declare const deleteAction: MaybeContext<BuildRESTFunction<typeof deleteAction$1> & typeof deleteAction$1>;
87
94
  declare const getRuntimeAction: MaybeContext<BuildRESTFunction<typeof getRuntimeAction$1> & typeof getRuntimeAction$1>;
95
+ declare const getLatestAction: MaybeContext<BuildRESTFunction<typeof getLatestAction$1> & typeof getLatestAction$1>;
88
96
  declare const getActionDynamicInputSchema: MaybeContext<BuildRESTFunction<typeof getActionDynamicInputSchema$1> & typeof getActionDynamicInputSchema$1>;
89
97
  declare const resolveActions: MaybeContext<BuildRESTFunction<typeof resolveActions$1> & typeof resolveActions$1>;
90
98
  declare const copyInputMapping: MaybeContext<BuildRESTFunction<typeof copyInputMapping$1> & typeof copyInputMapping$1>;
91
99
  declare const getActionDynamicOutputSchema: MaybeContext<BuildRESTFunction<typeof getActionDynamicOutputSchema$1> & typeof getActionDynamicOutputSchema$1>;
92
100
  declare const bulkGetActionDynamicOutputSchemas: MaybeContext<BuildRESTFunction<typeof bulkGetActionDynamicOutputSchemas$1> & typeof bulkGetActionDynamicOutputSchemas$1>;
93
101
 
94
- export { Action, ActionInputMappings, BulkGetActionDynamicOutputSchemasResponse, CopyInputMappingOptions, CopyInputMappingResponse, CreateActionOptions, DeleteActionOptions, GetActionDynamicInputSchemaOptions, GetActionDynamicInputSchemaResponse, GetActionDynamicOutputSchemaOptions, GetActionDynamicOutputSchemaResponse, GetRuntimeActionIdentifiers, ResolveActionsOptions, ResolveActionsResponse, UpdateActionOptions, bulkGetActionDynamicOutputSchemas, copyInputMapping, createAction, deleteAction, getActionDynamicInputSchema, getActionDynamicOutputSchema, getRuntimeAction, resolveActions, updateAction };
102
+ export { Action, ActionInputMappings, BulkGetActionDynamicOutputSchemasResponse, CopyInputMappingOptions, CopyInputMappingResponse, CreateActionOptions, DeleteActionOptions, GetActionDynamicInputSchemaOptions, GetActionDynamicInputSchemaResponse, GetActionDynamicOutputSchemaOptions, GetActionDynamicOutputSchemaResponse, GetLatestActionIdentifiers, GetLatestActionOptions, GetLatestActionResponse, GetRuntimeActionIdentifiers, ResolveActionsOptions, ResolveActionsResponse, UpdateActionOptions, bulkGetActionDynamicOutputSchemas, copyInputMapping, createAction, deleteAction, getActionDynamicInputSchema, getActionDynamicOutputSchema, getLatestAction, getRuntimeAction, resolveActions, updateAction };
@@ -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