@wix/auto_sdk_automations_action-catalog 1.0.0
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/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +13 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js +22 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +1 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +27 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js +349 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +1 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +26 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js +199 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +1 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +84 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js +67 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +1 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts +699 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js +51 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +1 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts +964 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js +490 -0
- package/build/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +13 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.context.js +13 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +1 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +27 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.http.js +337 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +1 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +26 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js +164 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +1 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +84 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.public.js +49 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +1 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts +699 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.types.js +48 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +1 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts +964 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js +455 -0
- package/build/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +13 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js +22 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +1 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +27 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js +349 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +1 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +26 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js +199 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +1 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +84 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js +67 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +1 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts +699 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js +51 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +1 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts +964 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js +490 -0
- package/build/internal/cjs/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.context.d.ts +13 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.context.js +13 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.context.js.map +1 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.http.d.ts +27 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.http.js +337 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.http.js.map +1 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.meta.d.ts +26 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js +164 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.meta.js.map +1 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.public.d.ts +84 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.public.js +49 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.public.js.map +1 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.types.d.ts +699 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.types.js +48 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.types.js.map +1 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.universal.d.ts +964 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js +455 -0
- package/build/internal/es/src/automations-actioncatalog-v1-action-action-catalog.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,964 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
export interface Action {
|
|
3
|
+
/**
|
|
4
|
+
* Action ID.
|
|
5
|
+
* @format GUID
|
|
6
|
+
* @readonly
|
|
7
|
+
*/
|
|
8
|
+
_id?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* The ID of the app that defines the action.
|
|
11
|
+
* @format GUID
|
|
12
|
+
* @readonly
|
|
13
|
+
*/
|
|
14
|
+
appId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Human-readable identifier for the action.
|
|
17
|
+
* @minLength 5
|
|
18
|
+
* @maxLength 50
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
actionKey?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The action [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/about-actions#the-input-schema)
|
|
24
|
+
* as defined in the app dashboard.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
inputSchema?: Record<string, any> | null;
|
|
28
|
+
/**
|
|
29
|
+
* The action [output schema](https://dev.wix.com/docs/rest/business-management/automations/actions/about-actions#the-output-schema)
|
|
30
|
+
* as defined in the app dashboard.
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
outputSchema?: Record<string, any> | null;
|
|
34
|
+
/**
|
|
35
|
+
* Action name displayed in the site dashboard to Wix users. For example, "Send SMS" or "Create Coupon".
|
|
36
|
+
* @minLength 1
|
|
37
|
+
* @maxLength 80
|
|
38
|
+
* @readonly
|
|
39
|
+
*/
|
|
40
|
+
displayName?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Action description displayed in the site dashboard to Wix users.
|
|
43
|
+
* @readonly
|
|
44
|
+
*/
|
|
45
|
+
description?: string | null;
|
|
46
|
+
/** The optional service plugin methods that are implemented for this action. Invoke is required and therefore excluded from this list. */
|
|
47
|
+
implementedMethods?: ImplementedMethods;
|
|
48
|
+
/** Whether the action is executed immediately or with a delay. */
|
|
49
|
+
executionType?: ExecutionType;
|
|
50
|
+
/** The chosen user interface for the action. The UI is displayed to the Wix user in the site dashboard when they configure the action. */
|
|
51
|
+
interfaceConfiguration?: InterfaceConfiguration;
|
|
52
|
+
/** Action icon displayed in the site dashboard to Wix users. */
|
|
53
|
+
icon?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Date and time the action was created.
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
_createdDate?: Date | null;
|
|
59
|
+
/**
|
|
60
|
+
* Date and time the action was updated.
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
_updatedDate?: Date | null;
|
|
64
|
+
/**
|
|
65
|
+
* Action component ID.
|
|
66
|
+
* @format GUID
|
|
67
|
+
* @readonly
|
|
68
|
+
*/
|
|
69
|
+
componentId?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* Component version at the time the action was created.
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
74
|
+
componentVersion?: string | null;
|
|
75
|
+
}
|
|
76
|
+
export declare enum Type {
|
|
77
|
+
/** Unknown action configuration UI. */
|
|
78
|
+
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
79
|
+
/**
|
|
80
|
+
* The generic action configuration UI. This requires you to provide a
|
|
81
|
+
* [UI schema](https://dev.wix.com/docs/rest/business-management/automations/actions/about-actions#the-ui-schema).
|
|
82
|
+
*/
|
|
83
|
+
GENERIC = "GENERIC"
|
|
84
|
+
}
|
|
85
|
+
export interface WidgetComponentOptions {
|
|
86
|
+
/**
|
|
87
|
+
* Widget component name.
|
|
88
|
+
* @minLength 1
|
|
89
|
+
* @maxLength 80
|
|
90
|
+
*/
|
|
91
|
+
componentName?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface GenericOptions {
|
|
94
|
+
/** UI schema. */
|
|
95
|
+
uiSchema?: Record<string, any> | null;
|
|
96
|
+
}
|
|
97
|
+
export declare enum SourceType {
|
|
98
|
+
UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
|
|
99
|
+
/** The input/output schemas are constructed by developers in Dev Center using the self-service flow */
|
|
100
|
+
DEV_CENTER = "DEV_CENTER",
|
|
101
|
+
/** The input/output schemas are derived from an existing Wix API through the API-to-Action feature */
|
|
102
|
+
WIX_API = "WIX_API"
|
|
103
|
+
}
|
|
104
|
+
export interface WixApiOptions {
|
|
105
|
+
/**
|
|
106
|
+
* Service entity fqdn
|
|
107
|
+
* @minLength 1
|
|
108
|
+
* @maxLength 100
|
|
109
|
+
*/
|
|
110
|
+
serviceEntityFqdn?: string;
|
|
111
|
+
/**
|
|
112
|
+
* The service providing the API
|
|
113
|
+
* @minLength 1
|
|
114
|
+
* @maxLength 200
|
|
115
|
+
*/
|
|
116
|
+
serviceName?: string;
|
|
117
|
+
/**
|
|
118
|
+
* The method name
|
|
119
|
+
* @minLength 1
|
|
120
|
+
* @maxLength 200
|
|
121
|
+
*/
|
|
122
|
+
methodName?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface Metadata {
|
|
125
|
+
/** Whether the action is only shown to advanced mode users (Wix staff). */
|
|
126
|
+
hidden?: boolean;
|
|
127
|
+
}
|
|
128
|
+
export interface ImplementedMethods {
|
|
129
|
+
/** Whether Validate Configuration is implemented. */
|
|
130
|
+
validateConfiguration?: boolean;
|
|
131
|
+
/** Whether Duplicate Input Mapping is implemented. */
|
|
132
|
+
duplicateInputMapping?: boolean;
|
|
133
|
+
/** Whether Generate Application Automation Input Mapping is implemented. */
|
|
134
|
+
generateApplicationAutomationInputMapping?: boolean;
|
|
135
|
+
/** Whether Get Quota Info is implemented. */
|
|
136
|
+
getQuotaInfo?: boolean;
|
|
137
|
+
/** Whether On Before Save is implemented. */
|
|
138
|
+
onBeforeSave?: boolean;
|
|
139
|
+
/** Whether On Reset is implemented. */
|
|
140
|
+
onReset?: boolean;
|
|
141
|
+
/** Whether Generate Action Input Mapping From Template is implemented. */
|
|
142
|
+
generateActionInputMappingFromTemplate?: boolean;
|
|
143
|
+
/** Whether On Remove is implemented. */
|
|
144
|
+
onRemove?: boolean;
|
|
145
|
+
/** Whether Get Dynamic Input Schema is implemented. */
|
|
146
|
+
getDynamicInputSchema?: boolean;
|
|
147
|
+
/** Whether Merge Input Mappings is implemented. */
|
|
148
|
+
mergeInputMappings?: boolean;
|
|
149
|
+
/** Whether Get Dynamic Output Schema is implemented. */
|
|
150
|
+
getDynamicOutputSchema?: boolean;
|
|
151
|
+
}
|
|
152
|
+
export declare enum ExecutionType {
|
|
153
|
+
/** Unknown type. */
|
|
154
|
+
UNKNOWN_EXECUTION_TYPE = "UNKNOWN_EXECUTION_TYPE",
|
|
155
|
+
/** Action completes immediately. */
|
|
156
|
+
SYNC = "SYNC",
|
|
157
|
+
/** Action completes asynchronously. */
|
|
158
|
+
ASYNC = "ASYNC"
|
|
159
|
+
}
|
|
160
|
+
export interface InterfaceConfiguration extends InterfaceConfigurationOptionsOneOf {
|
|
161
|
+
/** Details for the generic UI. */
|
|
162
|
+
genericOptions?: GenericOptions;
|
|
163
|
+
/** Type of action configuration UI. */
|
|
164
|
+
type?: Type;
|
|
165
|
+
}
|
|
166
|
+
/** @oneof */
|
|
167
|
+
export interface InterfaceConfigurationOptionsOneOf {
|
|
168
|
+
/** Details for the generic UI. */
|
|
169
|
+
genericOptions?: GenericOptions;
|
|
170
|
+
}
|
|
171
|
+
export interface FocalPoint {
|
|
172
|
+
/** X-coordinate of the focal point. */
|
|
173
|
+
x?: number;
|
|
174
|
+
/** Y-coordinate of the focal point. */
|
|
175
|
+
y?: number;
|
|
176
|
+
/** crop by height */
|
|
177
|
+
height?: number | null;
|
|
178
|
+
/** crop by width */
|
|
179
|
+
width?: number | null;
|
|
180
|
+
}
|
|
181
|
+
export interface Source extends SourceOptionsOneOf {
|
|
182
|
+
/** Wix API options */
|
|
183
|
+
wixApiOptions?: WixApiOptions;
|
|
184
|
+
/** the source type */
|
|
185
|
+
type?: SourceType;
|
|
186
|
+
}
|
|
187
|
+
/** @oneof */
|
|
188
|
+
export interface SourceOptionsOneOf {
|
|
189
|
+
/** Wix API options */
|
|
190
|
+
wixApiOptions?: WixApiOptions;
|
|
191
|
+
}
|
|
192
|
+
export interface RetryExperimentCreation {
|
|
193
|
+
/** action spec info */
|
|
194
|
+
actionSpecInfo?: ActionSpecInfo;
|
|
195
|
+
/**
|
|
196
|
+
* app id
|
|
197
|
+
* @format GUID
|
|
198
|
+
*/
|
|
199
|
+
appId?: string;
|
|
200
|
+
/** experiment action type */
|
|
201
|
+
experimentActionType?: ExperimentActionType;
|
|
202
|
+
/**
|
|
203
|
+
* component id
|
|
204
|
+
* @format GUID
|
|
205
|
+
*/
|
|
206
|
+
componentId?: string;
|
|
207
|
+
}
|
|
208
|
+
export interface ActionSpecInfo {
|
|
209
|
+
/**
|
|
210
|
+
* Spec to conduct on for the automation
|
|
211
|
+
* @maxLength 128
|
|
212
|
+
*/
|
|
213
|
+
spec?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Value the spec should return in order to affect the user with the operation
|
|
216
|
+
* e.g. creation - show the users the automation, update - show the users the updated automation, deletion - not show the users the automation
|
|
217
|
+
* @maxLength 128
|
|
218
|
+
*/
|
|
219
|
+
variantValue?: string | null;
|
|
220
|
+
/**
|
|
221
|
+
* Version from which the experiment should decide whether to expose it to users when !conduct(spec).contains(variant_value)
|
|
222
|
+
* For example, if 50 is set, version 49 and below (including 49) will not expose the preinstalled automation to the user.
|
|
223
|
+
*/
|
|
224
|
+
experimentVersion?: number;
|
|
225
|
+
}
|
|
226
|
+
export declare enum ExperimentActionType {
|
|
227
|
+
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
228
|
+
CREATE_COMPONENT = "CREATE_COMPONENT",
|
|
229
|
+
UPDATE_COMPONENT = "UPDATE_COMPONENT",
|
|
230
|
+
DELETE_COMPONENT = "DELETE_COMPONENT"
|
|
231
|
+
}
|
|
232
|
+
export interface CreateActionRequest {
|
|
233
|
+
/** The action to create */
|
|
234
|
+
action?: Action;
|
|
235
|
+
/** Action spec info */
|
|
236
|
+
actionSpecInfo?: ActionSpecInfo;
|
|
237
|
+
/**
|
|
238
|
+
* base uri for the action
|
|
239
|
+
* @maxLength 256
|
|
240
|
+
*/
|
|
241
|
+
baseUri?: string;
|
|
242
|
+
}
|
|
243
|
+
export interface CreateActionResponse {
|
|
244
|
+
/** The created action */
|
|
245
|
+
action?: Action;
|
|
246
|
+
}
|
|
247
|
+
export interface UpdateActionRequest {
|
|
248
|
+
/** Action Configuration */
|
|
249
|
+
action?: Action;
|
|
250
|
+
/** Action spec info */
|
|
251
|
+
actionSpecInfo?: ActionSpecInfo;
|
|
252
|
+
}
|
|
253
|
+
export interface UpdateActionResponse {
|
|
254
|
+
/** Action Configuration */
|
|
255
|
+
updatedAction?: Action;
|
|
256
|
+
}
|
|
257
|
+
export interface DeleteActionRequest {
|
|
258
|
+
/**
|
|
259
|
+
* The action App Id
|
|
260
|
+
* @format GUID
|
|
261
|
+
*/
|
|
262
|
+
actionAppId: string;
|
|
263
|
+
/**
|
|
264
|
+
* Action Configuration key
|
|
265
|
+
* @minLength 1
|
|
266
|
+
* @maxLength 100
|
|
267
|
+
*/
|
|
268
|
+
actionKey: string;
|
|
269
|
+
}
|
|
270
|
+
export interface DeleteActionResponse {
|
|
271
|
+
}
|
|
272
|
+
export interface MigrateComponentToActionRequest {
|
|
273
|
+
/**
|
|
274
|
+
* The action App Id
|
|
275
|
+
* @format GUID
|
|
276
|
+
*/
|
|
277
|
+
appId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* The component id
|
|
280
|
+
* @format GUID
|
|
281
|
+
*/
|
|
282
|
+
componentId?: string;
|
|
283
|
+
}
|
|
284
|
+
export interface MigrateComponentToActionResponse {
|
|
285
|
+
}
|
|
286
|
+
export interface GetRuntimeActionRequest {
|
|
287
|
+
/** The action App Id */
|
|
288
|
+
appId: string;
|
|
289
|
+
/** Action key */
|
|
290
|
+
actionKey: string;
|
|
291
|
+
}
|
|
292
|
+
export interface GetRuntimeActionResponse {
|
|
293
|
+
/** Action Configuration */
|
|
294
|
+
action?: Action;
|
|
295
|
+
}
|
|
296
|
+
export interface GetActionDynamicInputSchemaRequest {
|
|
297
|
+
/**
|
|
298
|
+
* The App ID of the action's owner.
|
|
299
|
+
* @format GUID
|
|
300
|
+
*/
|
|
301
|
+
appId: string;
|
|
302
|
+
/**
|
|
303
|
+
* Action key as defined in an app's action configuration in the Wix Developers Center.
|
|
304
|
+
* For example, `send-email` or `generate-invoice`.
|
|
305
|
+
* @minLength 5
|
|
306
|
+
* @maxLength 50
|
|
307
|
+
*/
|
|
308
|
+
actionKey: string;
|
|
309
|
+
/**
|
|
310
|
+
* Object representing the mapping a site contributor made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected
|
|
311
|
+
* values when running the automation. A field can be a static value mapping, or an expression that will be evaluated
|
|
312
|
+
* dynamically on each activation.
|
|
313
|
+
*/
|
|
314
|
+
inputMapping: Record<string, any> | null;
|
|
315
|
+
}
|
|
316
|
+
export interface GetActionDynamicInputSchemaResponse {
|
|
317
|
+
/** A [JSON schema](https://json-schema.org/) containing the action's added dynamic fields and its static fields. */
|
|
318
|
+
inputSchema?: Record<string, any> | null;
|
|
319
|
+
/** A [UI schema](https://bo.wix.com/pages/automations-ui-lib/?path=/story/getting-started--about) is a JSON Schema that describes the UI of the static and dynamic fields. */
|
|
320
|
+
uiSchema?: Record<string, any> | null;
|
|
321
|
+
}
|
|
322
|
+
export interface ResolveActionsRequest {
|
|
323
|
+
/** Query options. */
|
|
324
|
+
query?: QueryV2;
|
|
325
|
+
}
|
|
326
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
327
|
+
/** Paging options to limit and skip the number of items. */
|
|
328
|
+
paging?: Paging;
|
|
329
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
330
|
+
cursorPaging?: CursorPaging;
|
|
331
|
+
/**
|
|
332
|
+
* Filter object.
|
|
333
|
+
*
|
|
334
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
335
|
+
*/
|
|
336
|
+
filter?: Record<string, any> | null;
|
|
337
|
+
/**
|
|
338
|
+
* Sort object.
|
|
339
|
+
*
|
|
340
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
341
|
+
*/
|
|
342
|
+
sort?: Sorting[];
|
|
343
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
344
|
+
fields?: string[];
|
|
345
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
346
|
+
fieldsets?: string[];
|
|
347
|
+
}
|
|
348
|
+
/** @oneof */
|
|
349
|
+
export interface QueryV2PagingMethodOneOf {
|
|
350
|
+
/** Paging options to limit and skip the number of items. */
|
|
351
|
+
paging?: Paging;
|
|
352
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
353
|
+
cursorPaging?: CursorPaging;
|
|
354
|
+
}
|
|
355
|
+
export interface Sorting {
|
|
356
|
+
/**
|
|
357
|
+
* Name of the field to sort by.
|
|
358
|
+
* @maxLength 512
|
|
359
|
+
*/
|
|
360
|
+
fieldName?: string;
|
|
361
|
+
/** Sort order. */
|
|
362
|
+
order?: SortOrder;
|
|
363
|
+
}
|
|
364
|
+
export declare enum SortOrder {
|
|
365
|
+
ASC = "ASC",
|
|
366
|
+
DESC = "DESC"
|
|
367
|
+
}
|
|
368
|
+
export interface Paging {
|
|
369
|
+
/** Number of items to load. */
|
|
370
|
+
limit?: number | null;
|
|
371
|
+
/** Number of items to skip in the current sort order. */
|
|
372
|
+
offset?: number | null;
|
|
373
|
+
}
|
|
374
|
+
export interface CursorPaging {
|
|
375
|
+
/**
|
|
376
|
+
* Maximum number of items to return in the results.
|
|
377
|
+
* @max 100
|
|
378
|
+
*/
|
|
379
|
+
limit?: number | null;
|
|
380
|
+
/**
|
|
381
|
+
* Pointer to the next or previous page in the list of results.
|
|
382
|
+
*
|
|
383
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
384
|
+
* Not relevant for the first request.
|
|
385
|
+
* @maxLength 16000
|
|
386
|
+
*/
|
|
387
|
+
cursor?: string | null;
|
|
388
|
+
}
|
|
389
|
+
export interface ResolveActionsResponse {
|
|
390
|
+
/** Retrieved actions. */
|
|
391
|
+
actions?: Action[];
|
|
392
|
+
/** Paging metadata of the response. */
|
|
393
|
+
paging?: PagingMetadataV2;
|
|
394
|
+
}
|
|
395
|
+
export interface PagingMetadataV2 {
|
|
396
|
+
/** Number of items returned in the response. */
|
|
397
|
+
count?: number | null;
|
|
398
|
+
/** Offset that was requested. */
|
|
399
|
+
offset?: number | null;
|
|
400
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
401
|
+
total?: number | null;
|
|
402
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
403
|
+
tooManyToCount?: boolean | null;
|
|
404
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
405
|
+
cursors?: Cursors;
|
|
406
|
+
}
|
|
407
|
+
export interface Cursors {
|
|
408
|
+
/**
|
|
409
|
+
* Cursor string pointing to the next page in the list of results.
|
|
410
|
+
* @maxLength 16000
|
|
411
|
+
*/
|
|
412
|
+
next?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* Cursor pointing to the previous page in the list of results.
|
|
415
|
+
* @maxLength 16000
|
|
416
|
+
*/
|
|
417
|
+
prev?: string | null;
|
|
418
|
+
}
|
|
419
|
+
export interface CopyInputMappingRequest {
|
|
420
|
+
/**
|
|
421
|
+
* Action app id
|
|
422
|
+
* @format GUID
|
|
423
|
+
*/
|
|
424
|
+
appId: string;
|
|
425
|
+
/**
|
|
426
|
+
* Action key
|
|
427
|
+
* @maxLength 100
|
|
428
|
+
*/
|
|
429
|
+
actionKey: string;
|
|
430
|
+
/** Action input mapping */
|
|
431
|
+
inputMapping: Record<string, any> | null;
|
|
432
|
+
}
|
|
433
|
+
export interface CopyInputMappingResponse {
|
|
434
|
+
/** New action input mapping */
|
|
435
|
+
inputMapping?: Record<string, any> | null;
|
|
436
|
+
}
|
|
437
|
+
export interface GetActionDynamicOutputSchemaRequest {
|
|
438
|
+
/**
|
|
439
|
+
* The App ID of the action's owner.
|
|
440
|
+
* @format GUID
|
|
441
|
+
*/
|
|
442
|
+
appId: string;
|
|
443
|
+
/**
|
|
444
|
+
* Action key as defined in an app's action configuration in the Wix Developers Center.
|
|
445
|
+
* For example, `send-email` or `generate-invoice`.
|
|
446
|
+
* @minLength 5
|
|
447
|
+
* @maxLength 50
|
|
448
|
+
*/
|
|
449
|
+
actionKey: string;
|
|
450
|
+
/**
|
|
451
|
+
* Object representing the mapping a site contributor made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected
|
|
452
|
+
* values when running the automation. A field can be a static value mapping, or an expression that will be evaluated
|
|
453
|
+
* dynamically on each activation.
|
|
454
|
+
* For example: [users] configuration contains cms collection id, the output schema will contain the fields of the selected collection.
|
|
455
|
+
*/
|
|
456
|
+
inputMapping: Record<string, any> | null;
|
|
457
|
+
}
|
|
458
|
+
export interface GetActionDynamicOutputSchemaResponse {
|
|
459
|
+
/** A [JSON schema](https://json-schema.org/) containing the action's output schema. */
|
|
460
|
+
outputSchema?: Record<string, any> | null;
|
|
461
|
+
}
|
|
462
|
+
export interface BulkGetActionDynamicOutputSchemasRequest {
|
|
463
|
+
/**
|
|
464
|
+
* list of actions details which will be used to generate the output schemas
|
|
465
|
+
* @maxSize 20
|
|
466
|
+
* @minSize 1
|
|
467
|
+
*/
|
|
468
|
+
actionsInputMappings: ActionInputMappings[];
|
|
469
|
+
}
|
|
470
|
+
export interface ActionInputMappings {
|
|
471
|
+
/**
|
|
472
|
+
* The App ID of the action's owner.
|
|
473
|
+
* @format GUID
|
|
474
|
+
*/
|
|
475
|
+
appId?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Action key as defined in an app's action configuration in the Wix Developers Center.
|
|
478
|
+
* For example, `send-email` or `generate-invoice`.
|
|
479
|
+
* @minLength 5
|
|
480
|
+
* @maxLength 50
|
|
481
|
+
*/
|
|
482
|
+
actionKey?: string;
|
|
483
|
+
/**
|
|
484
|
+
* action identifier in the automation, useful for extracting out the output schema
|
|
485
|
+
* @format GUID
|
|
486
|
+
*/
|
|
487
|
+
actionId?: string;
|
|
488
|
+
/**
|
|
489
|
+
* Object representing the mapping a site contributor made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected
|
|
490
|
+
* values when running the automation. A field can be a static value mapping, or an expression that will be evaluated
|
|
491
|
+
* dynamically on each activation.
|
|
492
|
+
* For example: [users] configuration contains cms collection id, the output schema will contain the fields of the selected collection.
|
|
493
|
+
*/
|
|
494
|
+
inputMapping?: Record<string, any> | null;
|
|
495
|
+
}
|
|
496
|
+
export interface BulkGetActionDynamicOutputSchemasResponse {
|
|
497
|
+
/** list of action output schemas */
|
|
498
|
+
results?: BulkActionOutputSchemaResult[];
|
|
499
|
+
/** metadata of the bulk action */
|
|
500
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
501
|
+
}
|
|
502
|
+
export interface ItemMetadata {
|
|
503
|
+
/**
|
|
504
|
+
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
505
|
+
* @format GUID
|
|
506
|
+
*/
|
|
507
|
+
_id?: string | null;
|
|
508
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
509
|
+
originalIndex?: number;
|
|
510
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
511
|
+
success?: boolean;
|
|
512
|
+
/** Details about the error in case of failure. */
|
|
513
|
+
error?: ApplicationError;
|
|
514
|
+
}
|
|
515
|
+
export interface ApplicationError {
|
|
516
|
+
/** Error code. */
|
|
517
|
+
code?: string;
|
|
518
|
+
/** Description of the error. */
|
|
519
|
+
description?: string;
|
|
520
|
+
/** Data related to the error. */
|
|
521
|
+
data?: Record<string, any> | null;
|
|
522
|
+
}
|
|
523
|
+
export interface BulkActionOutputSchemaResult {
|
|
524
|
+
itemMetadata?: ItemMetadata;
|
|
525
|
+
/** A [JSON schema](https://json-schema.org/) containing the action's output schema. */
|
|
526
|
+
outputSchema?: Record<string, any> | null;
|
|
527
|
+
}
|
|
528
|
+
export interface BulkActionMetadata {
|
|
529
|
+
/** Number of items that were successfully processed. */
|
|
530
|
+
totalSuccesses?: number;
|
|
531
|
+
/** Number of items that couldn't be processed. */
|
|
532
|
+
totalFailures?: number;
|
|
533
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
534
|
+
undetailedFailures?: number;
|
|
535
|
+
}
|
|
536
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
537
|
+
createdEvent?: EntityCreatedEvent;
|
|
538
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
539
|
+
deletedEvent?: EntityDeletedEvent;
|
|
540
|
+
actionEvent?: ActionEvent;
|
|
541
|
+
/**
|
|
542
|
+
* Unique event ID.
|
|
543
|
+
* Allows clients to ignore duplicate webhooks.
|
|
544
|
+
*/
|
|
545
|
+
_id?: string;
|
|
546
|
+
/**
|
|
547
|
+
* Assumes actions are also always typed to an entity_type
|
|
548
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
549
|
+
*/
|
|
550
|
+
entityFqdn?: string;
|
|
551
|
+
/**
|
|
552
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
553
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
554
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
555
|
+
*/
|
|
556
|
+
slug?: string;
|
|
557
|
+
/** ID of the entity associated with the event. */
|
|
558
|
+
entityId?: string;
|
|
559
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
560
|
+
eventTime?: Date | null;
|
|
561
|
+
/**
|
|
562
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
563
|
+
* (for example, GDPR).
|
|
564
|
+
*/
|
|
565
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
566
|
+
/** If present, indicates the action that triggered the event. */
|
|
567
|
+
originatedFrom?: string | null;
|
|
568
|
+
/**
|
|
569
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
570
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
571
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
572
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
573
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
574
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
575
|
+
*/
|
|
576
|
+
entityEventSequence?: string | null;
|
|
577
|
+
}
|
|
578
|
+
/** @oneof */
|
|
579
|
+
export interface DomainEventBodyOneOf {
|
|
580
|
+
createdEvent?: EntityCreatedEvent;
|
|
581
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
582
|
+
deletedEvent?: EntityDeletedEvent;
|
|
583
|
+
actionEvent?: ActionEvent;
|
|
584
|
+
}
|
|
585
|
+
export interface EntityCreatedEvent {
|
|
586
|
+
entity?: string;
|
|
587
|
+
}
|
|
588
|
+
export interface RestoreInfo {
|
|
589
|
+
deletedDate?: Date | null;
|
|
590
|
+
}
|
|
591
|
+
export interface EntityUpdatedEvent {
|
|
592
|
+
/**
|
|
593
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
594
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
595
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
596
|
+
*/
|
|
597
|
+
currentEntity?: string;
|
|
598
|
+
}
|
|
599
|
+
export interface EntityDeletedEvent {
|
|
600
|
+
/** Entity that was deleted */
|
|
601
|
+
deletedEntity?: string | null;
|
|
602
|
+
}
|
|
603
|
+
export interface ActionEvent {
|
|
604
|
+
body?: string;
|
|
605
|
+
}
|
|
606
|
+
export interface MessageEnvelope {
|
|
607
|
+
/**
|
|
608
|
+
* App instance ID.
|
|
609
|
+
* @format GUID
|
|
610
|
+
*/
|
|
611
|
+
instanceId?: string | null;
|
|
612
|
+
/**
|
|
613
|
+
* Event type.
|
|
614
|
+
* @maxLength 150
|
|
615
|
+
*/
|
|
616
|
+
eventType?: string;
|
|
617
|
+
/** The identification type and identity data. */
|
|
618
|
+
identity?: IdentificationData;
|
|
619
|
+
/** Stringify payload. */
|
|
620
|
+
data?: string;
|
|
621
|
+
}
|
|
622
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
623
|
+
/**
|
|
624
|
+
* ID of a site visitor that has not logged in to the site.
|
|
625
|
+
* @format GUID
|
|
626
|
+
*/
|
|
627
|
+
anonymousVisitorId?: string;
|
|
628
|
+
/**
|
|
629
|
+
* ID of a site visitor that has logged in to the site.
|
|
630
|
+
* @format GUID
|
|
631
|
+
*/
|
|
632
|
+
memberId?: string;
|
|
633
|
+
/**
|
|
634
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
635
|
+
* @format GUID
|
|
636
|
+
*/
|
|
637
|
+
wixUserId?: string;
|
|
638
|
+
/**
|
|
639
|
+
* ID of an app.
|
|
640
|
+
* @format GUID
|
|
641
|
+
*/
|
|
642
|
+
appId?: string;
|
|
643
|
+
/** @readonly */
|
|
644
|
+
identityType?: WebhookIdentityType;
|
|
645
|
+
}
|
|
646
|
+
/** @oneof */
|
|
647
|
+
export interface IdentificationDataIdOneOf {
|
|
648
|
+
/**
|
|
649
|
+
* ID of a site visitor that has not logged in to the site.
|
|
650
|
+
* @format GUID
|
|
651
|
+
*/
|
|
652
|
+
anonymousVisitorId?: string;
|
|
653
|
+
/**
|
|
654
|
+
* ID of a site visitor that has logged in to the site.
|
|
655
|
+
* @format GUID
|
|
656
|
+
*/
|
|
657
|
+
memberId?: string;
|
|
658
|
+
/**
|
|
659
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
660
|
+
* @format GUID
|
|
661
|
+
*/
|
|
662
|
+
wixUserId?: string;
|
|
663
|
+
/**
|
|
664
|
+
* ID of an app.
|
|
665
|
+
* @format GUID
|
|
666
|
+
*/
|
|
667
|
+
appId?: string;
|
|
668
|
+
}
|
|
669
|
+
export declare enum WebhookIdentityType {
|
|
670
|
+
UNKNOWN = "UNKNOWN",
|
|
671
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
672
|
+
MEMBER = "MEMBER",
|
|
673
|
+
WIX_USER = "WIX_USER",
|
|
674
|
+
APP = "APP"
|
|
675
|
+
}
|
|
676
|
+
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`;
|
|
677
|
+
/**
|
|
678
|
+
* Create an action
|
|
679
|
+
* @public
|
|
680
|
+
* @documentationMaturity preview
|
|
681
|
+
* @requiredField options.action.actionKey
|
|
682
|
+
* @requiredField options.action.appId
|
|
683
|
+
* @returns The created action
|
|
684
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.CreateAction
|
|
685
|
+
*/
|
|
686
|
+
export declare function createAction(options?: NonNullablePaths<CreateActionOptions, `action.actionKey` | `action.appId`>): Promise<NonNullablePaths<Action, ActionNonNullablePaths>>;
|
|
687
|
+
export interface CreateActionOptions {
|
|
688
|
+
/** The action to create */
|
|
689
|
+
action?: Action;
|
|
690
|
+
/** Action spec info */
|
|
691
|
+
actionSpecInfo?: ActionSpecInfo;
|
|
692
|
+
/**
|
|
693
|
+
* base uri for the action
|
|
694
|
+
* @maxLength 256
|
|
695
|
+
*/
|
|
696
|
+
baseUri?: string;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Create a new version for a trigger, update the latest version of the component to point to this trigger
|
|
700
|
+
* @param _id - Action ID.
|
|
701
|
+
* @public
|
|
702
|
+
* @documentationMaturity preview
|
|
703
|
+
* @requiredField _id
|
|
704
|
+
* @requiredField options.action.actionKey
|
|
705
|
+
* @requiredField options.action.appId
|
|
706
|
+
* @returns Action Configuration
|
|
707
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.UpdateAction
|
|
708
|
+
*/
|
|
709
|
+
export declare function updateAction(_id: string, options?: NonNullablePaths<UpdateActionOptions, `action.actionKey` | `action.appId`>): Promise<NonNullablePaths<Action, ActionNonNullablePaths>>;
|
|
710
|
+
export interface UpdateActionOptions {
|
|
711
|
+
action: {
|
|
712
|
+
/**
|
|
713
|
+
* Action ID.
|
|
714
|
+
* @format GUID
|
|
715
|
+
* @readonly
|
|
716
|
+
*/
|
|
717
|
+
_id?: string | null;
|
|
718
|
+
/**
|
|
719
|
+
* The ID of the app that defines the action.
|
|
720
|
+
* @format GUID
|
|
721
|
+
* @readonly
|
|
722
|
+
*/
|
|
723
|
+
appId?: string;
|
|
724
|
+
/**
|
|
725
|
+
* Human-readable identifier for the action.
|
|
726
|
+
* @minLength 5
|
|
727
|
+
* @maxLength 50
|
|
728
|
+
* @readonly
|
|
729
|
+
*/
|
|
730
|
+
actionKey?: string;
|
|
731
|
+
/**
|
|
732
|
+
* The action [input schema](https://dev.wix.com/docs/rest/business-management/automations/actions/about-actions#the-input-schema)
|
|
733
|
+
* as defined in the app dashboard.
|
|
734
|
+
* @readonly
|
|
735
|
+
*/
|
|
736
|
+
inputSchema?: Record<string, any> | null;
|
|
737
|
+
/**
|
|
738
|
+
* The action [output schema](https://dev.wix.com/docs/rest/business-management/automations/actions/about-actions#the-output-schema)
|
|
739
|
+
* as defined in the app dashboard.
|
|
740
|
+
* @readonly
|
|
741
|
+
*/
|
|
742
|
+
outputSchema?: Record<string, any> | null;
|
|
743
|
+
/**
|
|
744
|
+
* Action name displayed in the site dashboard to Wix users. For example, "Send SMS" or "Create Coupon".
|
|
745
|
+
* @minLength 1
|
|
746
|
+
* @maxLength 80
|
|
747
|
+
* @readonly
|
|
748
|
+
*/
|
|
749
|
+
displayName?: string | null;
|
|
750
|
+
/**
|
|
751
|
+
* Action description displayed in the site dashboard to Wix users.
|
|
752
|
+
* @readonly
|
|
753
|
+
*/
|
|
754
|
+
description?: string | null;
|
|
755
|
+
/** The optional service plugin methods that are implemented for this action. Invoke is required and therefore excluded from this list. */
|
|
756
|
+
implementedMethods?: ImplementedMethods;
|
|
757
|
+
/** Whether the action is executed immediately or with a delay. */
|
|
758
|
+
executionType?: ExecutionType;
|
|
759
|
+
/** The chosen user interface for the action. The UI is displayed to the Wix user in the site dashboard when they configure the action. */
|
|
760
|
+
interfaceConfiguration?: InterfaceConfiguration;
|
|
761
|
+
/** Action icon displayed in the site dashboard to Wix users. */
|
|
762
|
+
icon?: string;
|
|
763
|
+
/**
|
|
764
|
+
* Date and time the action was created.
|
|
765
|
+
* @readonly
|
|
766
|
+
*/
|
|
767
|
+
_createdDate?: Date | null;
|
|
768
|
+
/**
|
|
769
|
+
* Date and time the action was updated.
|
|
770
|
+
* @readonly
|
|
771
|
+
*/
|
|
772
|
+
_updatedDate?: Date | null;
|
|
773
|
+
/**
|
|
774
|
+
* Action component ID.
|
|
775
|
+
* @format GUID
|
|
776
|
+
* @readonly
|
|
777
|
+
*/
|
|
778
|
+
componentId?: string | null;
|
|
779
|
+
/**
|
|
780
|
+
* Component version at the time the action was created.
|
|
781
|
+
* @readonly
|
|
782
|
+
*/
|
|
783
|
+
componentVersion?: string | null;
|
|
784
|
+
};
|
|
785
|
+
/** Action spec info */
|
|
786
|
+
actionSpecInfo?: ActionSpecInfo;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Delete a trigger by app id and key
|
|
790
|
+
* @param actionAppId - The action App Id
|
|
791
|
+
* @public
|
|
792
|
+
* @documentationMaturity preview
|
|
793
|
+
* @requiredField actionAppId
|
|
794
|
+
* @requiredField options
|
|
795
|
+
* @requiredField options.actionKey
|
|
796
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.DeleteAction
|
|
797
|
+
*/
|
|
798
|
+
export declare function deleteAction(actionAppId: string, options: NonNullablePaths<DeleteActionOptions, `actionKey`>): Promise<void>;
|
|
799
|
+
export interface DeleteActionOptions {
|
|
800
|
+
/**
|
|
801
|
+
* Action Configuration key
|
|
802
|
+
* @minLength 1
|
|
803
|
+
* @maxLength 100
|
|
804
|
+
*/
|
|
805
|
+
actionKey: string;
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Returns action configuration by action key
|
|
809
|
+
* @public
|
|
810
|
+
* @documentationMaturity preview
|
|
811
|
+
* @requiredField identifiers
|
|
812
|
+
* @requiredField identifiers.actionKey
|
|
813
|
+
* @requiredField identifiers.appId
|
|
814
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
815
|
+
* @permissionScope Manage Stores
|
|
816
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
817
|
+
* @permissionScope Set Up Automations
|
|
818
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
819
|
+
* @applicableIdentity APP
|
|
820
|
+
* @returns Action Configuration
|
|
821
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetRuntimeAction
|
|
822
|
+
*/
|
|
823
|
+
export declare function getRuntimeAction(identifiers: NonNullablePaths<GetRuntimeActionIdentifiers, `actionKey` | `appId`>): Promise<NonNullablePaths<Action, ActionNonNullablePaths>>;
|
|
824
|
+
export interface GetRuntimeActionIdentifiers {
|
|
825
|
+
/** The action App Id */
|
|
826
|
+
appId: string;
|
|
827
|
+
/** Action key */
|
|
828
|
+
actionKey: string;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Returns action dynamic schema and ui schema for the given action key and input mapping (action config)
|
|
832
|
+
* @param appId - The App ID of the action's owner.
|
|
833
|
+
* @public
|
|
834
|
+
* @documentationMaturity preview
|
|
835
|
+
* @requiredField appId
|
|
836
|
+
* @requiredField options
|
|
837
|
+
* @requiredField options.actionKey
|
|
838
|
+
* @requiredField options.inputMapping
|
|
839
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
840
|
+
* @permissionScope Manage Stores
|
|
841
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
842
|
+
* @permissionScope Set Up Automations
|
|
843
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
844
|
+
* @applicableIdentity APP
|
|
845
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetActionDynamicInputSchema
|
|
846
|
+
*/
|
|
847
|
+
export declare function getActionDynamicInputSchema(appId: string, options: NonNullablePaths<GetActionDynamicInputSchemaOptions, `actionKey` | `inputMapping`>): Promise<GetActionDynamicInputSchemaResponse>;
|
|
848
|
+
export interface GetActionDynamicInputSchemaOptions {
|
|
849
|
+
/**
|
|
850
|
+
* Action key as defined in an app's action configuration in the Wix Developers Center.
|
|
851
|
+
* For example, `send-email` or `generate-invoice`.
|
|
852
|
+
* @minLength 5
|
|
853
|
+
* @maxLength 50
|
|
854
|
+
*/
|
|
855
|
+
actionKey: string;
|
|
856
|
+
/**
|
|
857
|
+
* Object representing the mapping a site contributor made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected
|
|
858
|
+
* values when running the automation. A field can be a static value mapping, or an expression that will be evaluated
|
|
859
|
+
* dynamically on each activation.
|
|
860
|
+
*/
|
|
861
|
+
inputMapping: Record<string, any> | null;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Returns action configurations that are installed on the site and exposed to Wix users.
|
|
865
|
+
* @public
|
|
866
|
+
* @documentationMaturity preview
|
|
867
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
868
|
+
* @permissionScope Manage Stores
|
|
869
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
870
|
+
* @permissionScope Set Up Automations
|
|
871
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
872
|
+
* @applicableIdentity APP
|
|
873
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.ResolveActions
|
|
874
|
+
*/
|
|
875
|
+
export declare function resolveActions(options?: ResolveActionsOptions): Promise<NonNullablePaths<ResolveActionsResponse, {
|
|
876
|
+
[P in ActionNonNullablePaths]: `actions.${number}.${P}`;
|
|
877
|
+
}[ActionNonNullablePaths]>>;
|
|
878
|
+
export interface ResolveActionsOptions {
|
|
879
|
+
/** Query options. */
|
|
880
|
+
query?: QueryV2;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Get action input mapping copy
|
|
884
|
+
* The main use case is to call this method from the automations editor, when the user wants to copy an action. So
|
|
885
|
+
* this method is getting an input mapping of an existing action and returns a changed input mapping. It's changing
|
|
886
|
+
* the input mapping by passing it through the SPI endpoint of `DuplicateInputMapping` in the case that this SPI
|
|
887
|
+
* endpoint is implemented.
|
|
888
|
+
* A possible usage is by `triggered-email` action - Wix Emails need to change the `messageId` inside the input mapping
|
|
889
|
+
* so such that the `messageId` stays unique across multiple actions.
|
|
890
|
+
* @param appId - Action app id
|
|
891
|
+
* @public
|
|
892
|
+
* @documentationMaturity preview
|
|
893
|
+
* @requiredField appId
|
|
894
|
+
* @requiredField options
|
|
895
|
+
* @requiredField options.actionKey
|
|
896
|
+
* @requiredField options.inputMapping
|
|
897
|
+
* @permissionId AUTOMATIONS.ACTION_COPY
|
|
898
|
+
* @permissionScope Manage Stores
|
|
899
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
900
|
+
* @permissionScope Set Up Automations
|
|
901
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
902
|
+
* @applicableIdentity APP
|
|
903
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.CopyInputMapping
|
|
904
|
+
*/
|
|
905
|
+
export declare function copyInputMapping(appId: string, options: NonNullablePaths<CopyInputMappingOptions, `actionKey` | `inputMapping`>): Promise<CopyInputMappingResponse>;
|
|
906
|
+
export interface CopyInputMappingOptions {
|
|
907
|
+
/**
|
|
908
|
+
* Action key
|
|
909
|
+
* @maxLength 100
|
|
910
|
+
*/
|
|
911
|
+
actionKey: string;
|
|
912
|
+
/** Action input mapping */
|
|
913
|
+
inputMapping: Record<string, any> | null;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Returns action dynamic output schema for the given action key and the [users] action configuration
|
|
917
|
+
* @param appId - The App ID of the action's owner.
|
|
918
|
+
* @public
|
|
919
|
+
* @documentationMaturity preview
|
|
920
|
+
* @requiredField appId
|
|
921
|
+
* @requiredField options
|
|
922
|
+
* @requiredField options.actionKey
|
|
923
|
+
* @requiredField options.inputMapping
|
|
924
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
925
|
+
* @permissionScope Manage Stores
|
|
926
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
927
|
+
* @permissionScope Set Up Automations
|
|
928
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
929
|
+
* @applicableIdentity APP
|
|
930
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.GetActionDynamicOutputSchema
|
|
931
|
+
*/
|
|
932
|
+
export declare function getActionDynamicOutputSchema(appId: string, options: NonNullablePaths<GetActionDynamicOutputSchemaOptions, `actionKey` | `inputMapping`>): Promise<GetActionDynamicOutputSchemaResponse>;
|
|
933
|
+
export interface GetActionDynamicOutputSchemaOptions {
|
|
934
|
+
/**
|
|
935
|
+
* Action key as defined in an app's action configuration in the Wix Developers Center.
|
|
936
|
+
* For example, `send-email` or `generate-invoice`.
|
|
937
|
+
* @minLength 5
|
|
938
|
+
* @maxLength 50
|
|
939
|
+
*/
|
|
940
|
+
actionKey: string;
|
|
941
|
+
/**
|
|
942
|
+
* Object representing the mapping a site contributor made between keys in the [input schema](https://dev.wix.com/docs/rest/api-reference/wix-automations/action-spi/about-the-action-spi-input-schema) and their expected
|
|
943
|
+
* values when running the automation. A field can be a static value mapping, or an expression that will be evaluated
|
|
944
|
+
* dynamically on each activation.
|
|
945
|
+
* For example: [users] configuration contains cms collection id, the output schema will contain the fields of the selected collection.
|
|
946
|
+
*/
|
|
947
|
+
inputMapping: Record<string, any> | null;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Returns action dynamic output schema for the given actions
|
|
951
|
+
* @param actionsInputMappings - list of actions details which will be used to generate the output schemas
|
|
952
|
+
* @public
|
|
953
|
+
* @documentationMaturity preview
|
|
954
|
+
* @requiredField actionsInputMappings
|
|
955
|
+
* @permissionId AUTOMATIONS.ACTION_READ
|
|
956
|
+
* @permissionScope Manage Stores
|
|
957
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
958
|
+
* @permissionScope Set Up Automations
|
|
959
|
+
* @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
|
|
960
|
+
* @applicableIdentity APP
|
|
961
|
+
* @fqn wix.automations.actioncatalog.v1.ActionCatalogService.BulkGetActionDynamicOutputSchemas
|
|
962
|
+
*/
|
|
963
|
+
export 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`>>;
|
|
964
|
+
export {};
|