@wix/auto_sdk_automations_activations 1.0.135 → 1.0.136

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.
@@ -1894,7 +1894,7 @@ interface ReportEventRequest {
1894
1894
  * For example, `fc81a355-3429-50fc-a4c7-def486e828f3`.
1895
1895
  *
1896
1896
  * Required if your app needs to
1897
- * [cancel the event](https://dev.wix.com/docs/sdk/backend-modules/automations/triggered-events/cancel-event)
1897
+ * [cancel the event](https://dev.wix.com/docs/rest/business-management/automations/triggered-events/cancel-event)
1898
1898
  * if the automation becomes no longer relevant.
1899
1899
  *
1900
1900
  * Typically, this ID is defined in your system,
@@ -2053,12 +2053,12 @@ interface CancelEventRequest {
2053
2053
  interface CancelEventResponse {
2054
2054
  }
2055
2055
  interface V1RunAutomationRequest extends V1RunAutomationRequestIdentifierOneOf {
2056
- /** a preinstalled automation identifier */
2056
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2057
2057
  preinstalledIdentifier?: PreinstalledIdentifier;
2058
- /** a automation of any type identifier that will be available in future */
2058
+ /** Identifies an automation by its ID. */
2059
2059
  automationIdentifier?: AutomationIdentifier;
2060
2060
  /**
2061
- * identifier MUST be either AUTOMATION or PREINSTALLED
2061
+ * How the automation to run is identified. Set to `AUTOMATION` to use `automationIdentifier`, or `PREINSTALLED` to use `preinstalledIdentifier`.
2062
2062
  * @immutable
2063
2063
  */
2064
2064
  identifierType: IdentifierTypeWithLiterals;
@@ -2085,54 +2085,54 @@ interface V1RunAutomationRequest extends V1RunAutomationRequestIdentifierOneOf {
2085
2085
  }
2086
2086
  /** @oneof */
2087
2087
  interface V1RunAutomationRequestIdentifierOneOf {
2088
- /** a preinstalled automation identifier */
2088
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2089
2089
  preinstalledIdentifier?: PreinstalledIdentifier;
2090
- /** a automation of any type identifier that will be available in future */
2090
+ /** Identifies an automation by its ID. */
2091
2091
  automationIdentifier?: AutomationIdentifier;
2092
2092
  }
2093
- /** Specifies how an automation is identified when invoking RunAutomation or TestAutomation endpoints. */
2093
+ /** Specifies how an automation is identified when calling Run Automation or Test Automation. */
2094
2094
  declare enum IdentifierType {
2095
- /** Identifies a pre-installed automation by component ID and app ID. */
2095
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2096
2096
  PREINSTALLED = "PREINSTALLED",
2097
- /** Identifies a specific automation by its unique automation ID. */
2097
+ /** Identifies an automation by its ID. */
2098
2098
  AUTOMATION = "AUTOMATION"
2099
2099
  }
2100
2100
  /** @enumType */
2101
2101
  type IdentifierTypeWithLiterals = IdentifierType | 'PREINSTALLED' | 'AUTOMATION';
2102
2102
  interface PreinstalledIdentifier {
2103
2103
  /**
2104
- * identifier for the application of the preinstalled
2104
+ * ID of the app that the preinstalled automation belongs to.
2105
2105
  * @format GUID
2106
2106
  */
2107
2107
  appId?: string;
2108
2108
  /**
2109
- * application component id
2109
+ * ID of the app component that defines the preinstalled automation.
2110
2110
  * @format GUID
2111
2111
  */
2112
2112
  componentId?: string;
2113
2113
  }
2114
2114
  interface AutomationIdentifier {
2115
2115
  /**
2116
- * automation id
2116
+ * ID of the automation to run.
2117
2117
  * @format GUID
2118
2118
  */
2119
2119
  automationId?: string;
2120
2120
  }
2121
2121
  interface V1RunAutomationResponse {
2122
2122
  /**
2123
- * Activation ID generated (for tracking)
2123
+ * ID of the activation created for this run.
2124
2124
  * @format GUID
2125
2125
  */
2126
2126
  activationId?: string | null;
2127
2127
  }
2128
2128
  /** Test mode variant of RunAutomationRequest. */
2129
2129
  interface TestAutomationRequest extends TestAutomationRequestIdentifierOneOf {
2130
- /** a preinstalled automation identifier */
2130
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2131
2131
  preinstalledIdentifier?: PreinstalledIdentifier;
2132
- /** a automation of any type identifier that will be available in future */
2132
+ /** Identifies an automation by its ID. */
2133
2133
  automationIdentifier?: AutomationIdentifier;
2134
2134
  /**
2135
- * identifier MUST be either AUTOMATION or PREINSTALLED
2135
+ * How the automation to run is identified. Set to `AUTOMATION` to use `automationIdentifier`, or `PREINSTALLED` to use `preinstalledIdentifier`.
2136
2136
  * @immutable
2137
2137
  */
2138
2138
  identifierType: IdentifierTypeWithLiterals;
@@ -2154,14 +2154,14 @@ interface TestAutomationRequest extends TestAutomationRequestIdentifierOneOf {
2154
2154
  }
2155
2155
  /** @oneof */
2156
2156
  interface TestAutomationRequestIdentifierOneOf {
2157
- /** a preinstalled automation identifier */
2157
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2158
2158
  preinstalledIdentifier?: PreinstalledIdentifier;
2159
- /** a automation of any type identifier that will be available in future */
2159
+ /** Identifies an automation by its ID. */
2160
2160
  automationIdentifier?: AutomationIdentifier;
2161
2161
  }
2162
2162
  interface TestAutomationResponse {
2163
2163
  /**
2164
- * Activation ID generated (for tracking)
2164
+ * ID of the activation created for this test run.
2165
2165
  * @format GUID
2166
2166
  */
2167
2167
  activationId?: string | null;
@@ -2169,21 +2169,21 @@ interface TestAutomationResponse {
2169
2169
  /** Request to rerun an automation using a previous activation's payload. */
2170
2170
  interface RerunActivationRequest {
2171
2171
  /**
2172
- * The activation ID whose payload will be used for the rerun.
2172
+ * ID of the activation to rerun. Its original payload and external entity ID are reused.
2173
2173
  * @format GUID
2174
2174
  */
2175
2175
  activationId: string;
2176
- /** Options controlling execution behavior. */
2176
+ /** Options that control how the activation is rerun. */
2177
2177
  options?: RunOptions;
2178
2178
  }
2179
- /** Options that control how an automation activation is executed. */
2179
+ /** Options that control how an activation is executed. */
2180
2180
  interface RunOptions {
2181
- /** When true, delay actions will be skipped (similar to test mode behavior). */
2181
+ /** Whether to skip the automation's delay actions so it runs immediately. */
2182
2182
  skipDelays?: boolean;
2183
2183
  }
2184
2184
  interface RerunActivationResponse {
2185
2185
  /**
2186
- * Activation ID generated (for tracking)
2186
+ * ID of the new activation created by the rerun.
2187
2187
  * @format GUID
2188
2188
  */
2189
2189
  activationId?: string | null;
@@ -2781,7 +2781,15 @@ type ReportEventApplicationErrors = {
2781
2781
  *
2782
2782
  * If your app supports canceling events,
2783
2783
  * `externalEntityId` must be provided.
2784
- * `externalEntityId` is required when calling [cancelEvent()](#cancel-event).
2784
+ * `externalEntityId` is required when calling [Cancel Event](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/cancel-event).
2785
+ *
2786
+ * The event is processed asynchronously. A successful response means the event was accepted for processing, not that the automations have finished running.
2787
+ *
2788
+ * To report multiple events in a single call, call [Bulk Report Event](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/bulk-report-event).
2789
+ *
2790
+ * > You cannot try out this endpoint because
2791
+ * > it can be called only by the app that created the specified `triggerKey`.
2792
+ * > So please ignore the **Try It Out** button.
2785
2793
  * @param triggerKey - Trigger key as defined in your app's trigger configuration
2786
2794
  * in the app dashboard.
2787
2795
  * For example, `form_submitted` or `invoice_due`.
@@ -2815,7 +2823,7 @@ interface ReportEventOptions {
2815
2823
  * For example, `fc81a355-3429-50fc-a4c7-def486e828f3`.
2816
2824
  *
2817
2825
  * Required if your app needs to
2818
- * [cancel the event](https://dev.wix.com/docs/sdk/backend-modules/automations/triggered-events/cancel-event)
2826
+ * [cancel the event](https://dev.wix.com/docs/rest/business-management/automations/triggered-events/cancel-event)
2819
2827
  * if the automation becomes no longer relevant.
2820
2828
  *
2821
2829
  * Typically, this ID is defined in your system,
@@ -2831,7 +2839,12 @@ interface ReportEventOptions {
2831
2839
  idempotency?: Idempotency;
2832
2840
  }
2833
2841
  /**
2834
- * Bulk reports events and activates site automations with the specified trigger key.
2842
+ * Reports multiple events at once, activating site automations configured with the specified trigger key.
2843
+ *
2844
+ *
2845
+ * Each event in `eventsInfo` is processed independently and asynchronously, so some events can succeed while others fail. Check `bulkActionMetadata` for the success and failure totals.
2846
+ *
2847
+ * To report a single event, call [Report Event](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/report-event).
2835
2848
  * @param triggerKey - Trigger key as defined in your app's trigger configuration
2836
2849
  * in the app dashboard.
2837
2850
  * For example, `form_submitted` or `invoice_due`.
@@ -2845,7 +2858,12 @@ interface ReportEventOptions {
2845
2858
  */
2846
2859
  declare function bulkReportEvent(triggerKey: string, eventsInfo: EventInfo[]): Promise<NonNullablePaths<BulkReportEventResponse, `triggerKey` | `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `results.${number}.eventInfo.idempotency.key` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
2847
2860
  /**
2848
- * Bulk cancels any remaining actions for a trigger and external entities.
2861
+ * Cancels any remaining actions for multiple events at once, given a trigger key and the events' external entity IDs.
2862
+ *
2863
+ *
2864
+ * Each external entity ID is processed independently, so some cancellations can succeed while others fail. Check `bulkActionMetadata` for the success and failure totals.
2865
+ *
2866
+ * To cancel a single event, call [Cancel Event](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/cancel-event).
2849
2867
  * @param triggerKey - Trigger key whose events you want to cancel.
2850
2868
  * For example, `form_submitted` or `invoice_due`.
2851
2869
  * @param externalEntityIds - Repeated list of external_entity_id, representing the related resources' IDs.
@@ -2864,10 +2882,19 @@ declare function bulkCancelEvent(triggerKey: string, externalEntityIds: string[]
2864
2882
  * Events are not cancelable by default.
2865
2883
  * To make an event cancelable,
2866
2884
  * you must first pass an `externalEntityId`
2867
- * and the applicable `triggerKey` to [reportEvent()](#report-event).
2868
- * When you call cancelEvent() with the same `externalEntityId` and `triggerKey`,
2885
+ * and the applicable `triggerKey` to [Report Event](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/report-event).
2886
+ * When you call Cancel Event with the same `externalEntityId` and `triggerKey`,
2869
2887
  * the event is canceled,
2870
2888
  * as are all other events that share the `externalEntityId` and `triggerKey`.
2889
+ * See
2890
+ * [Reporting and Canceling Events](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/reporting-and-canceling-events)
2891
+ * for more information.
2892
+ *
2893
+ * To cancel events for multiple external entities in a single call, call [Bulk Cancel Event](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/bulk-cancel-event).
2894
+ *
2895
+ * > You cannot try out this endpoint because
2896
+ * > it can be called only by the app that created the specified `triggerKey`.
2897
+ * > So please ignore the **Try It Out** button.
2871
2898
  * @param triggerKey - Trigger key whose event you want to cancel.
2872
2899
  * For example, `form_submitted` or `invoice_due`.
2873
2900
  * @param externalEntityId - ID of the related resource in GUID format.
@@ -2888,23 +2915,18 @@ declare function bulkCancelEvent(triggerKey: string, externalEntityIds: string[]
2888
2915
  */
2889
2916
  declare function cancelEvent(triggerKey: string, externalEntityId: string): Promise<void>;
2890
2917
  /**
2891
- * Runs an automation manually.
2918
+ * Runs an automation directly, without reporting an event.
2919
+ *
2920
+ *
2921
+ * Use this to activate an automation manually when no triggering event occurs in your system. For example, an automation that sends a confirmation when a customer books online won't run if the customer books by phone instead. Run Automation lets the site owner send that confirmation anyway.
2892
2922
  *
2893
- * This gives a user the ability to trigger the automation manually,
2894
- * without requiring an event to be reported to start the automation.
2895
- * As an example,
2896
- * consider an automation that sends a confirmation for a hotel booking when a user submits a reservation online.
2897
- * However, if the user calls the hotel directly to make the reservation, the automation isn't triggered.
2898
- * The site owner needs a way to send the automated confirmation without the user making an online booking.
2899
- * Run Automation provides this functionality.
2923
+ * Identify the automation to run in one of these ways:
2900
2924
  *
2925
+ * - `automationIdentifier`: The ID of an existing automation. Retrieve it from the [Automations API](https://dev.wix.com/docs/rest/business-management/automations/introduction).
2926
+ * - `preinstalledIdentifier`: The app ID and component ID of a preinstalled automation.
2901
2927
  *
2902
- * <blockquote class="important">
2903
- * __Permissions__
2904
- * This endpoint requires the Manage Your App
2905
- * [permission scope](https://devforum.wix.com/en/article/available-permissions).
2906
- * </blockquote>
2907
- * @param identifierType - identifier MUST be either AUTOMATION or PREINSTALLED
2928
+ * To run an automation in test mode, including unpublished draft automations, call [Test Automation](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/test-automation).
2929
+ * @param identifierType - How the automation to run is identified. Set to `AUTOMATION` to use `automationIdentifier`, or `PREINSTALLED` to use `preinstalledIdentifier`.
2908
2930
  * @public
2909
2931
  * @documentationMaturity preview
2910
2932
  * @requiredField identifierType
@@ -2916,9 +2938,9 @@ declare function cancelEvent(triggerKey: string, externalEntityId: string): Prom
2916
2938
  */
2917
2939
  declare function esbConfigResolverRunAutomation(identifierType: IdentifierTypeWithLiterals, options?: NonNullablePaths<EsbConfigResolverRunAutomationOptions, `payload`, 2>): Promise<V1RunAutomationResponse>;
2918
2940
  interface EsbConfigResolverRunAutomationOptions extends EsbConfigResolverRunAutomationOptionsIdentifierOneOf {
2919
- /** a preinstalled automation identifier */
2941
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2920
2942
  preinstalledIdentifier?: PreinstalledIdentifier;
2921
- /** a automation of any type identifier that will be available in future */
2943
+ /** Identifies an automation by its ID. */
2922
2944
  automationIdentifier?: AutomationIdentifier;
2923
2945
  /**
2924
2946
  * Event payload, formatted as key:value pairs.
@@ -2943,16 +2965,19 @@ interface EsbConfigResolverRunAutomationOptions extends EsbConfigResolverRunAuto
2943
2965
  }
2944
2966
  /** @oneof */
2945
2967
  interface EsbConfigResolverRunAutomationOptionsIdentifierOneOf {
2946
- /** a preinstalled automation identifier */
2968
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2947
2969
  preinstalledIdentifier?: PreinstalledIdentifier;
2948
- /** a automation of any type identifier that will be available in future */
2970
+ /** Identifies an automation by its ID. */
2949
2971
  automationIdentifier?: AutomationIdentifier;
2950
2972
  }
2951
2973
  /**
2952
- * Runs an automation manually in test mode.
2974
+ * Runs an automation in test mode, without reporting an event.
2953
2975
  *
2954
- * Similar to RunAutomation but always executed as TEST to allow running draft automations safely.
2955
- * @param identifierType - identifier MUST be either AUTOMATION or PREINSTALLED
2976
+ *
2977
+ * Test mode runs the automation and its actions for real, but it can also run unpublished draft automations and skips any configured delays so you see the results immediately. Use it to verify an automation's behavior before publishing it.
2978
+ *
2979
+ * Identify the automation to run the same way as in [Run Automation](https://dev.wix.com/docs/api-reference/business-management/automations/triggers/triggered-events/run-automation).
2980
+ * @param identifierType - How the automation to run is identified. Set to `AUTOMATION` to use `automationIdentifier`, or `PREINSTALLED` to use `preinstalledIdentifier`.
2956
2981
  * @public
2957
2982
  * @documentationMaturity preview
2958
2983
  * @requiredField identifierType
@@ -2965,9 +2990,9 @@ interface EsbConfigResolverRunAutomationOptionsIdentifierOneOf {
2965
2990
  */
2966
2991
  declare function testAutomation(identifierType: IdentifierTypeWithLiterals, options: NonNullablePaths<TestAutomationOptions, `payload`, 2>): Promise<TestAutomationResponse>;
2967
2992
  interface TestAutomationOptions extends TestAutomationOptionsIdentifierOneOf {
2968
- /** a preinstalled automation identifier */
2993
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2969
2994
  preinstalledIdentifier?: PreinstalledIdentifier;
2970
- /** a automation of any type identifier that will be available in future */
2995
+ /** Identifies an automation by its ID. */
2971
2996
  automationIdentifier?: AutomationIdentifier;
2972
2997
  /**
2973
2998
  * Event payload, formatted as key:value pairs.
@@ -2987,14 +3012,17 @@ interface TestAutomationOptions extends TestAutomationOptionsIdentifierOneOf {
2987
3012
  }
2988
3013
  /** @oneof */
2989
3014
  interface TestAutomationOptionsIdentifierOneOf {
2990
- /** a preinstalled automation identifier */
3015
+ /** Identifies a preinstalled automation by its app ID and component ID. */
2991
3016
  preinstalledIdentifier?: PreinstalledIdentifier;
2992
- /** a automation of any type identifier that will be available in future */
3017
+ /** Identifies an automation by its ID. */
2993
3018
  automationIdentifier?: AutomationIdentifier;
2994
3019
  }
2995
3020
  /**
2996
- * Rerun an automation using a previous activation's payload.
2997
- * @param activationId - The activation ID whose payload will be used for the rerun.
3021
+ * Reruns a previous activation, reusing its original payload and external entity ID.
3022
+ *
3023
+ *
3024
+ * Use this to retry an activation that failed, after you've resolved the underlying issue. A rerun creates a new activation. You can find the original `activationId` in the automation's run log on the automations page.
3025
+ * @param activationId - ID of the activation to rerun. Its original payload and external entity ID are reused.
2998
3026
  * @public
2999
3027
  * @documentationMaturity preview
3000
3028
  * @requiredField activationId
@@ -3004,7 +3032,7 @@ interface TestAutomationOptionsIdentifierOneOf {
3004
3032
  */
3005
3033
  declare function rerunActivation(activationId: string, options?: RerunActivationOptions): Promise<RerunActivationResponse>;
3006
3034
  interface RerunActivationOptions {
3007
- /** Options controlling execution behavior. */
3035
+ /** Options that control how the activation is rerun. */
3008
3036
  options?: RunOptions;
3009
3037
  }
3010
3038
  /**