@wix/auto_sdk_automations_action-catalog 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.
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface Action {
2
4
  /**
3
5
  * Action ID.
@@ -676,6 +678,17 @@ declare enum WebhookIdentityType {
676
678
  }
677
679
  /** @enumType */
678
680
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
681
+ type ActionNonNullablePaths = `appId` | `actionKey` | `implementedMethods.validateConfiguration` | `implementedMethods.duplicateInputMapping` | `implementedMethods.generateApplicationAutomationInputMapping` | `implementedMethods.getQuotaInfo` | `implementedMethods.onBeforeSave` | `implementedMethods.onReset` | `implementedMethods.generateActionInputMappingFromTemplate` | `implementedMethods.onRemove` | `implementedMethods.getDynamicInputSchema` | `implementedMethods.mergeInputMappings` | `implementedMethods.getDynamicOutputSchema` | `executionType` | `interfaceConfiguration.type`;
682
+ /**
683
+ * Create an action
684
+ * @public
685
+ * @documentationMaturity preview
686
+ * @requiredField options.action.actionKey
687
+ * @requiredField options.action.appId
688
+ * @returns The created action
689
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.CreateAction
690
+ */
691
+ declare function createAction(options?: NonNullablePaths<CreateActionOptions, `action.actionKey` | `action.appId`>): Promise<NonNullablePaths<Action, ActionNonNullablePaths>>;
679
692
  interface CreateActionOptions {
680
693
  /** The action to create */
681
694
  action?: Action;
@@ -687,6 +700,18 @@ interface CreateActionOptions {
687
700
  */
688
701
  baseUri?: string;
689
702
  }
703
+ /**
704
+ * Create a new version for a trigger, update the latest version of the component to point to this trigger
705
+ * @param _id - Action ID.
706
+ * @public
707
+ * @documentationMaturity preview
708
+ * @requiredField _id
709
+ * @requiredField options.action.actionKey
710
+ * @requiredField options.action.appId
711
+ * @returns Action Configuration
712
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.UpdateAction
713
+ */
714
+ declare function updateAction(_id: string, options?: NonNullablePaths<UpdateActionOptions, `action.actionKey` | `action.appId`>): Promise<NonNullablePaths<Action, ActionNonNullablePaths>>;
690
715
  interface UpdateActionOptions {
691
716
  action: {
692
717
  /**
@@ -765,6 +790,17 @@ interface UpdateActionOptions {
765
790
  /** Action spec info */
766
791
  actionSpecInfo?: ActionSpecInfo;
767
792
  }
793
+ /**
794
+ * Delete a trigger by app id and key
795
+ * @param actionAppId - The action App Id
796
+ * @public
797
+ * @documentationMaturity preview
798
+ * @requiredField actionAppId
799
+ * @requiredField options
800
+ * @requiredField options.actionKey
801
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.DeleteAction
802
+ */
803
+ declare function deleteAction(actionAppId: string, options: NonNullablePaths<DeleteActionOptions, `actionKey`>): Promise<void>;
768
804
  interface DeleteActionOptions {
769
805
  /**
770
806
  * Action Configuration key
@@ -773,12 +809,39 @@ interface DeleteActionOptions {
773
809
  */
774
810
  actionKey: string;
775
811
  }
812
+ /**
813
+ * Returns action configuration by action key
814
+ * @public
815
+ * @documentationMaturity preview
816
+ * @requiredField identifiers
817
+ * @requiredField identifiers.actionKey
818
+ * @requiredField identifiers.appId
819
+ * @permissionId AUTOMATIONS.ACTION_READ
820
+ * @applicableIdentity APP
821
+ * @returns Action Configuration
822
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetRuntimeAction
823
+ */
824
+ declare function getRuntimeAction(identifiers: NonNullablePaths<GetRuntimeActionIdentifiers, `actionKey` | `appId`>): Promise<NonNullablePaths<Action, ActionNonNullablePaths>>;
776
825
  interface GetRuntimeActionIdentifiers {
777
826
  /** The action App Id */
778
827
  appId: string;
779
828
  /** Action key */
780
829
  actionKey: string;
781
830
  }
831
+ /**
832
+ * Returns action dynamic schema and ui schema for the given action key and input mapping (action config)
833
+ * @param appId - The App ID of the action's owner.
834
+ * @public
835
+ * @documentationMaturity preview
836
+ * @requiredField appId
837
+ * @requiredField options
838
+ * @requiredField options.actionKey
839
+ * @requiredField options.inputMapping
840
+ * @permissionId AUTOMATIONS.ACTION_READ
841
+ * @applicableIdentity APP
842
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetActionDynamicInputSchema
843
+ */
844
+ declare function getActionDynamicInputSchema(appId: string, options: NonNullablePaths<GetActionDynamicInputSchemaOptions, `actionKey` | `inputMapping`>): Promise<GetActionDynamicInputSchemaResponse>;
782
845
  interface GetActionDynamicInputSchemaOptions {
783
846
  /**
784
847
  * Action key as defined in an app's action configuration in the Wix Developers Center.
@@ -794,10 +857,41 @@ interface GetActionDynamicInputSchemaOptions {
794
857
  */
795
858
  inputMapping: Record<string, any> | null;
796
859
  }
860
+ /**
861
+ * Returns action configurations that are installed on the site and exposed to Wix users.
862
+ * @public
863
+ * @documentationMaturity preview
864
+ * @permissionId AUTOMATIONS.ACTION_READ
865
+ * @applicableIdentity APP
866
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.ResolveActions
867
+ */
868
+ declare function resolveActions(options?: ResolveActionsOptions): Promise<NonNullablePaths<ResolveActionsResponse, {
869
+ [P in ActionNonNullablePaths]: `actions.${number}.${P}`;
870
+ }[ActionNonNullablePaths]>>;
797
871
  interface ResolveActionsOptions {
798
872
  /** Query options. */
799
873
  query?: QueryV2;
800
874
  }
875
+ /**
876
+ * Get action input mapping copy
877
+ * The main use case is to call this method from the automations editor, when the user wants to copy an action. So
878
+ * this method is getting an input mapping of an existing action and returns a changed input mapping. It's changing
879
+ * the input mapping by passing it through the SPI endpoint of `DuplicateInputMapping` in the case that this SPI
880
+ * endpoint is implemented.
881
+ * A possible usage is by `triggered-email` action - Wix Emails need to change the `messageId` inside the input mapping
882
+ * so such that the `messageId` stays unique across multiple actions.
883
+ * @param appId - Action app id
884
+ * @public
885
+ * @documentationMaturity preview
886
+ * @requiredField appId
887
+ * @requiredField options
888
+ * @requiredField options.actionKey
889
+ * @requiredField options.inputMapping
890
+ * @permissionId AUTOMATIONS.ACTION_COPY
891
+ * @applicableIdentity APP
892
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.CopyInputMapping
893
+ */
894
+ declare function copyInputMapping(appId: string, options: NonNullablePaths<CopyInputMappingOptions, `actionKey` | `inputMapping`>): Promise<CopyInputMappingResponse>;
801
895
  interface CopyInputMappingOptions {
802
896
  /**
803
897
  * Action key
@@ -807,6 +901,20 @@ interface CopyInputMappingOptions {
807
901
  /** Action input mapping */
808
902
  inputMapping: Record<string, any> | null;
809
903
  }
904
+ /**
905
+ * Returns action dynamic output schema for the given action key and the [users] action configuration
906
+ * @param appId - The App ID of the action's owner.
907
+ * @public
908
+ * @documentationMaturity preview
909
+ * @requiredField appId
910
+ * @requiredField options
911
+ * @requiredField options.actionKey
912
+ * @requiredField options.inputMapping
913
+ * @permissionId AUTOMATIONS.ACTION_READ
914
+ * @applicableIdentity APP
915
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetActionDynamicOutputSchema
916
+ */
917
+ declare function getActionDynamicOutputSchema(appId: string, options: NonNullablePaths<GetActionDynamicOutputSchemaOptions, `actionKey` | `inputMapping`>): Promise<GetActionDynamicOutputSchemaResponse>;
810
918
  interface GetActionDynamicOutputSchemaOptions {
811
919
  /**
812
920
  * Action key as defined in an app's action configuration in the Wix Developers Center.
@@ -823,5 +931,16 @@ interface GetActionDynamicOutputSchemaOptions {
823
931
  */
824
932
  inputMapping: Record<string, any> | null;
825
933
  }
934
+ /**
935
+ * Returns action dynamic output schema for the given actions
936
+ * @param actionsInputMappings - list of actions details which will be used to generate the output schemas
937
+ * @public
938
+ * @documentationMaturity preview
939
+ * @requiredField actionsInputMappings
940
+ * @permissionId AUTOMATIONS.ACTION_READ
941
+ * @applicableIdentity APP
942
+ * @fqn wix.automations.actioncatalog.v1.ActionCatalogService.BulkGetActionDynamicOutputSchemas
943
+ */
944
+ declare function bulkGetActionDynamicOutputSchemas(actionsInputMappings: ActionInputMappings[]): Promise<NonNullablePaths<BulkGetActionDynamicOutputSchemasResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
826
945
 
827
- export { type GetActionDynamicOutputSchemaRequest as $, type Action as A, type BulkGetActionDynamicOutputSchemasResponse as B, type CreateActionOptions as C, type DeleteActionOptions as D, ExecutionType as E, type FocalPoint as F, type GetRuntimeActionIdentifiers as G, type MigrateComponentToActionResponse as H, type ImplementedMethods as I, type GetRuntimeActionRequest as J, type GetRuntimeActionResponse as K, type GetActionDynamicInputSchemaRequest as L, type Metadata as M, type ResolveActionsRequest as N, type QueryV2PagingMethodOneOf as O, type Sorting as P, type QueryV2 as Q, type ResolveActionsOptions as R, SourceType as S, Type as T, type UpdateActionOptions as U, type Paging as V, WebhookIdentityType as W, type CursorPaging as X, type PagingMetadataV2 as Y, type Cursors as Z, type CopyInputMappingRequest as _, type GetActionDynamicInputSchemaOptions as a, type BulkGetActionDynamicOutputSchemasRequest as a0, type ItemMetadata as a1, type ApplicationError as a2, type BulkActionOutputSchemaResult as a3, type BulkActionMetadata as a4, type DomainEvent as a5, type DomainEventBodyOneOf as a6, type EntityCreatedEvent as a7, type RestoreInfo as a8, type EntityUpdatedEvent as a9, type EntityDeletedEvent as aa, type ActionEvent as ab, type MessageEnvelope as ac, type IdentificationData as ad, type IdentificationDataIdOneOf as ae, type GetActionDynamicInputSchemaResponse as b, type ResolveActionsResponse as c, type CopyInputMappingOptions as d, type CopyInputMappingResponse as e, type GetActionDynamicOutputSchemaOptions as f, type GetActionDynamicOutputSchemaResponse as g, type ActionInputMappings as h, ExperimentActionType as i, SortOrder as j, type WidgetComponentOptions as k, type GenericOptions as l, type WixApiOptions as m, type InterfaceConfiguration as n, type InterfaceConfigurationOptionsOneOf as o, type Source as p, type SourceOptionsOneOf as q, type RetryExperimentCreation as r, type ActionSpecInfo as s, type CreateActionRequest as t, type CreateActionResponse as u, type UpdateActionRequest as v, type UpdateActionResponse as w, type DeleteActionRequest as x, type DeleteActionResponse as y, type MigrateComponentToActionRequest as z };
946
+ export { type Action, type ActionEvent, type ActionInputMappings, type ActionSpecInfo, type ApplicationError, type BulkActionMetadata, type BulkActionOutputSchemaResult, type BulkGetActionDynamicOutputSchemasRequest, type BulkGetActionDynamicOutputSchemasResponse, type CopyInputMappingOptions, type CopyInputMappingRequest, type CopyInputMappingResponse, type CreateActionOptions, type CreateActionRequest, type CreateActionResponse, type CursorPaging, type Cursors, type DeleteActionOptions, type DeleteActionRequest, type DeleteActionResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ExecutionType, type ExecutionTypeWithLiterals, ExperimentActionType, type ExperimentActionTypeWithLiterals, type FocalPoint, type GenericOptions, type GetActionDynamicInputSchemaOptions, type GetActionDynamicInputSchemaRequest, type GetActionDynamicInputSchemaResponse, type GetActionDynamicOutputSchemaOptions, type GetActionDynamicOutputSchemaRequest, type GetActionDynamicOutputSchemaResponse, type GetRuntimeActionIdentifiers, type GetRuntimeActionRequest, type GetRuntimeActionResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImplementedMethods, type InterfaceConfiguration, type InterfaceConfigurationOptionsOneOf, type ItemMetadata, type MessageEnvelope, type Metadata, type MigrateComponentToActionRequest, type MigrateComponentToActionResponse, type Paging, type PagingMetadataV2, type QueryV2, type QueryV2PagingMethodOneOf, type ResolveActionsOptions, type ResolveActionsRequest, type ResolveActionsResponse, type RestoreInfo, type RetryExperimentCreation, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, type SourceOptionsOneOf, SourceType, type SourceTypeWithLiterals, Type, type TypeWithLiterals, type UpdateActionOptions, type UpdateActionRequest, type UpdateActionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WidgetComponentOptions, type WixApiOptions, bulkGetActionDynamicOutputSchemas, copyInputMapping, createAction, deleteAction, getActionDynamicInputSchema, getActionDynamicOutputSchema, getRuntimeAction, resolveActions, updateAction };