@wix/auto_sdk_data_movement-workflows 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 +48 -0
- package/build/cjs/index.js +573 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1003 -0
- package/build/cjs/index.typings.js +475 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +759 -0
- package/build/cjs/meta.js +394 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/schemas.d.ts +478 -0
- package/build/cjs/schemas.js +748 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +48 -0
- package/build/es/index.mjs +533 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1003 -0
- package/build/es/index.typings.mjs +436 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +759 -0
- package/build/es/meta.mjs +354 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/schemas.d.mts +478 -0
- package/build/es/schemas.mjs +704 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +48 -0
- package/build/internal/cjs/index.js +573 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1014 -0
- package/build/internal/cjs/index.typings.js +475 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +759 -0
- package/build/internal/cjs/meta.js +394 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/schemas.d.ts +478 -0
- package/build/internal/cjs/schemas.js +748 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +48 -0
- package/build/internal/es/index.mjs +533 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1014 -0
- package/build/internal/es/index.typings.mjs +436 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +759 -0
- package/build/internal/es/meta.mjs +354 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/build/internal/es/schemas.d.mts +478 -0
- package/build/internal/es/schemas.mjs +704 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +61 -0
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,1003 @@
|
|
|
1
|
+
import * as _wix_sdk_types from '@wix/sdk-types';
|
|
2
|
+
import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
/** Workflow run composed of ordered data movement steps. */
|
|
5
|
+
interface Workflow {
|
|
6
|
+
/**
|
|
7
|
+
* Workflow ID.
|
|
8
|
+
* @format GUID
|
|
9
|
+
* @readonly
|
|
10
|
+
*/
|
|
11
|
+
_id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Revision number incremented on each workflow update.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
revision?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Date and time when the workflow was created.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
_createdDate?: Date | null;
|
|
22
|
+
/**
|
|
23
|
+
* Date and time when the workflow was last updated.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
_updatedDate?: Date | null;
|
|
27
|
+
/**
|
|
28
|
+
* Current workflow lifecycle status.
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
status?: StatusWithLiterals;
|
|
32
|
+
/**
|
|
33
|
+
* Immutable ordered execution plan for the workflow.
|
|
34
|
+
* @minSize 1
|
|
35
|
+
* @maxSize 100
|
|
36
|
+
*/
|
|
37
|
+
specs?: JobSpec[];
|
|
38
|
+
}
|
|
39
|
+
/** Workflow lifecycle status. */
|
|
40
|
+
declare enum Status {
|
|
41
|
+
UNINITIALIZED = "UNINITIALIZED",
|
|
42
|
+
RUNNING = "RUNNING",
|
|
43
|
+
FINISHED = "FINISHED"
|
|
44
|
+
}
|
|
45
|
+
/** @enumType */
|
|
46
|
+
type StatusWithLiterals = Status | 'UNINITIALIZED' | 'RUNNING' | 'FINISHED';
|
|
47
|
+
/** Immutable specification for a single data movement step. */
|
|
48
|
+
interface JobSpec extends JobSpecSiteOverrideOneOf {
|
|
49
|
+
/**
|
|
50
|
+
* Site ID to read from instead of the current site.
|
|
51
|
+
* @format GUID
|
|
52
|
+
*/
|
|
53
|
+
sourceSiteId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Site ID to write to instead of the current site.
|
|
56
|
+
* @format GUID
|
|
57
|
+
*/
|
|
58
|
+
destinationSiteId?: string;
|
|
59
|
+
/** Source to read data from. */
|
|
60
|
+
source?: Source;
|
|
61
|
+
/** Destination to write data to. */
|
|
62
|
+
destination?: Destination;
|
|
63
|
+
}
|
|
64
|
+
/** @oneof */
|
|
65
|
+
interface JobSpecSiteOverrideOneOf {
|
|
66
|
+
/**
|
|
67
|
+
* Site ID to read from instead of the current site.
|
|
68
|
+
* @format GUID
|
|
69
|
+
*/
|
|
70
|
+
sourceSiteId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Site ID to write to instead of the current site.
|
|
73
|
+
* @format GUID
|
|
74
|
+
*/
|
|
75
|
+
destinationSiteId?: string;
|
|
76
|
+
}
|
|
77
|
+
interface Source extends SourceSourceOneOf {
|
|
78
|
+
/**
|
|
79
|
+
* Wix data collection.
|
|
80
|
+
*
|
|
81
|
+
* You can move items from native Wix collections, [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), and [external database collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site).
|
|
82
|
+
*/
|
|
83
|
+
wixDataCollection?: WixDataSource;
|
|
84
|
+
/**
|
|
85
|
+
* Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.
|
|
86
|
+
*
|
|
87
|
+
* Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).
|
|
88
|
+
*/
|
|
89
|
+
localization?: LocalizationSource;
|
|
90
|
+
/**
|
|
91
|
+
* Source file.
|
|
92
|
+
*
|
|
93
|
+
* You can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.
|
|
94
|
+
*
|
|
95
|
+
* To upload a file, call Create File Upload Url ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/movement-jobs/create-file-upload-url) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-movement-jobs/create-file-upload-url)) and use the `uploadUrl` from the response. For example:
|
|
96
|
+
*
|
|
97
|
+
* `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"`
|
|
98
|
+
*/
|
|
99
|
+
file?: FileSource;
|
|
100
|
+
}
|
|
101
|
+
/** @oneof */
|
|
102
|
+
interface SourceSourceOneOf {
|
|
103
|
+
/**
|
|
104
|
+
* Wix data collection.
|
|
105
|
+
*
|
|
106
|
+
* You can move items from native Wix collections, [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), and [external database collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site).
|
|
107
|
+
*/
|
|
108
|
+
wixDataCollection?: WixDataSource;
|
|
109
|
+
/**
|
|
110
|
+
* Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.
|
|
111
|
+
*
|
|
112
|
+
* Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).
|
|
113
|
+
*/
|
|
114
|
+
localization?: LocalizationSource;
|
|
115
|
+
/**
|
|
116
|
+
* Source file.
|
|
117
|
+
*
|
|
118
|
+
* You can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.
|
|
119
|
+
*
|
|
120
|
+
* To upload a file, call Create File Upload Url ([SDK](https://dev.wix.com/docs/sdk/backend-modules/data/movement-jobs/create-file-upload-url) | [REST](https://dev.wix.com/docs/rest/business-solutions/cms/data-movement-jobs/create-file-upload-url)) and use the `uploadUrl` from the response. For example:
|
|
121
|
+
*
|
|
122
|
+
* `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"`
|
|
123
|
+
*/
|
|
124
|
+
file?: FileSource;
|
|
125
|
+
}
|
|
126
|
+
declare enum WixDataEnvironment {
|
|
127
|
+
/** Collection's [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */
|
|
128
|
+
LIVE = "LIVE",
|
|
129
|
+
/** Collection's [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */
|
|
130
|
+
SANDBOX = "SANDBOX"
|
|
131
|
+
}
|
|
132
|
+
/** @enumType */
|
|
133
|
+
type WixDataEnvironmentWithLiterals = WixDataEnvironment | 'LIVE' | 'SANDBOX';
|
|
134
|
+
declare enum FileFormat {
|
|
135
|
+
/** Unknown format. */
|
|
136
|
+
UNKNOWN = "UNKNOWN",
|
|
137
|
+
/** CSV format. */
|
|
138
|
+
CSV = "CSV",
|
|
139
|
+
/** JSONL format. */
|
|
140
|
+
JSONL = "JSONL"
|
|
141
|
+
}
|
|
142
|
+
/** @enumType */
|
|
143
|
+
type FileFormatWithLiterals = FileFormat | 'UNKNOWN' | 'CSV' | 'JSONL';
|
|
144
|
+
declare enum MediaType {
|
|
145
|
+
/** All media types. */
|
|
146
|
+
ALL = "ALL",
|
|
147
|
+
/** Images. */
|
|
148
|
+
IMAGE = "IMAGE",
|
|
149
|
+
/** Videos. */
|
|
150
|
+
VIDEO = "VIDEO",
|
|
151
|
+
/** Audio files. */
|
|
152
|
+
AUDIO = "AUDIO",
|
|
153
|
+
/** Documents. */
|
|
154
|
+
DOCUMENT = "DOCUMENT"
|
|
155
|
+
}
|
|
156
|
+
/** @enumType */
|
|
157
|
+
type MediaTypeWithLiterals = MediaType | 'ALL' | 'IMAGE' | 'VIDEO' | 'AUDIO' | 'DOCUMENT';
|
|
158
|
+
/** Wix data collection. */
|
|
159
|
+
interface WixDataSource {
|
|
160
|
+
/**
|
|
161
|
+
* ID of the data collection.
|
|
162
|
+
* @minLength 1
|
|
163
|
+
* @maxLength 256
|
|
164
|
+
*/
|
|
165
|
+
collectionId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Filter to apply to the items. Only items that pass the filter are moved.
|
|
168
|
+
*
|
|
169
|
+
* Learn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
170
|
+
*/
|
|
171
|
+
filter?: Record<string, any> | null;
|
|
172
|
+
/** Item fields to move. If not set, the method moves the full items. */
|
|
173
|
+
fields?: string[];
|
|
174
|
+
}
|
|
175
|
+
interface LocalizationSource {
|
|
176
|
+
/**
|
|
177
|
+
* Translated CMS content in the specified languages. Content in these languages is exported to the destination, with the first specified language treated as the main one.
|
|
178
|
+
*
|
|
179
|
+
* Use two-letter language codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. You can also specify a two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
|
|
180
|
+
*
|
|
181
|
+
* Learn more about [available languages in Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-languages-available).
|
|
182
|
+
* @format LANGUAGE_TAG
|
|
183
|
+
* @minSize 2
|
|
184
|
+
* @maxSize 64
|
|
185
|
+
*/
|
|
186
|
+
languages?: string[];
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* File.
|
|
190
|
+
*
|
|
191
|
+
* To create a file upload URL, call the Create File Upload Url method and use the `uploadURL` in the response to upload the source file.
|
|
192
|
+
*/
|
|
193
|
+
interface FileSource {
|
|
194
|
+
/** File format. If not specified, automatically determined by Wix. */
|
|
195
|
+
format?: FileFormatWithLiterals;
|
|
196
|
+
/**
|
|
197
|
+
* File ID as returned in the `fileId` property of the Create File Upload URL method's response.
|
|
198
|
+
* @maxLength 512
|
|
199
|
+
*/
|
|
200
|
+
fileId?: string;
|
|
201
|
+
/**
|
|
202
|
+
* URL where the source file is uploaded. Automatically generated by Wix.
|
|
203
|
+
* @readonly
|
|
204
|
+
* @maxLength 2048
|
|
205
|
+
*/
|
|
206
|
+
url?: string;
|
|
207
|
+
}
|
|
208
|
+
interface TestSource {
|
|
209
|
+
/**
|
|
210
|
+
* Discriminator value for a particular test source.
|
|
211
|
+
* @maxLength 512
|
|
212
|
+
*/
|
|
213
|
+
type?: string;
|
|
214
|
+
/** Test source details. */
|
|
215
|
+
details?: Record<string, any> | null;
|
|
216
|
+
}
|
|
217
|
+
/** Job logs. */
|
|
218
|
+
interface DataMovementJobLogs {
|
|
219
|
+
/**
|
|
220
|
+
* ID of the job from which to export logs.
|
|
221
|
+
* @format GUID
|
|
222
|
+
*/
|
|
223
|
+
jobId?: string;
|
|
224
|
+
}
|
|
225
|
+
/** File. */
|
|
226
|
+
interface ExternalFileSource {
|
|
227
|
+
/** File format. If not specified, automatically determined by Wix. */
|
|
228
|
+
format?: FileFormatWithLiterals;
|
|
229
|
+
/**
|
|
230
|
+
* URL where the source file is located.
|
|
231
|
+
* @maxLength 2048
|
|
232
|
+
* @format WEB_URL
|
|
233
|
+
*/
|
|
234
|
+
url?: string;
|
|
235
|
+
}
|
|
236
|
+
/** Google Sheets source. */
|
|
237
|
+
interface GoogleSheetsSource {
|
|
238
|
+
/**
|
|
239
|
+
* ID of the Google Sheets spreadsheet.
|
|
240
|
+
* @minLength 1
|
|
241
|
+
* @maxLength 256
|
|
242
|
+
*/
|
|
243
|
+
spreadsheetId?: string;
|
|
244
|
+
/**
|
|
245
|
+
* Name of the sheet within the spreadsheet.
|
|
246
|
+
* @maxLength 256
|
|
247
|
+
*/
|
|
248
|
+
sheetName?: string | null;
|
|
249
|
+
/**
|
|
250
|
+
* Range of cells within the sheet.
|
|
251
|
+
* @maxLength 256
|
|
252
|
+
*/
|
|
253
|
+
range?: string | null;
|
|
254
|
+
/**
|
|
255
|
+
* Entity ID of the saved OAuth token.
|
|
256
|
+
* @format GUID
|
|
257
|
+
*/
|
|
258
|
+
oauthTokenId?: string;
|
|
259
|
+
}
|
|
260
|
+
/** Wix Media Manager source. */
|
|
261
|
+
interface WixMediaSource {
|
|
262
|
+
/**
|
|
263
|
+
* ID of the source folder in the Media Manager. If not specified, all media items are included.
|
|
264
|
+
* @maxLength 256
|
|
265
|
+
*/
|
|
266
|
+
sourceFolderId?: string | null;
|
|
267
|
+
}
|
|
268
|
+
/** Exports collection structure (fields, permissions, etc.) from a site. */
|
|
269
|
+
interface WixDataCollectionDefinitionSource {
|
|
270
|
+
/**
|
|
271
|
+
* IDs of collections whose definitions to read.
|
|
272
|
+
* @minSize 1
|
|
273
|
+
* @maxSize 1000
|
|
274
|
+
* @maxLength 256
|
|
275
|
+
*/
|
|
276
|
+
collectionIds?: string[];
|
|
277
|
+
}
|
|
278
|
+
interface Destination extends DestinationDestinationOneOf {
|
|
279
|
+
/**
|
|
280
|
+
* Wix data collection.
|
|
281
|
+
*
|
|
282
|
+
* You can move items to native Wix collections, [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), and [external database collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site).
|
|
283
|
+
*/
|
|
284
|
+
wixDataCollection?: WixDataDestination;
|
|
285
|
+
/**
|
|
286
|
+
* Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.
|
|
287
|
+
*
|
|
288
|
+
* Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).
|
|
289
|
+
*/
|
|
290
|
+
localization?: LocalizationDestination;
|
|
291
|
+
/** Downloadable file with the moved items. */
|
|
292
|
+
file?: FileDestination;
|
|
293
|
+
}
|
|
294
|
+
/** @oneof */
|
|
295
|
+
interface DestinationDestinationOneOf {
|
|
296
|
+
/**
|
|
297
|
+
* Wix data collection.
|
|
298
|
+
*
|
|
299
|
+
* You can move items to native Wix collections, [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), and [external database collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site).
|
|
300
|
+
*/
|
|
301
|
+
wixDataCollection?: WixDataDestination;
|
|
302
|
+
/**
|
|
303
|
+
* Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.
|
|
304
|
+
*
|
|
305
|
+
* Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).
|
|
306
|
+
*/
|
|
307
|
+
localization?: LocalizationDestination;
|
|
308
|
+
/** Downloadable file with the moved items. */
|
|
309
|
+
file?: FileDestination;
|
|
310
|
+
}
|
|
311
|
+
/** Wix data collection. */
|
|
312
|
+
interface WixDataDestination {
|
|
313
|
+
/**
|
|
314
|
+
* ID of the destination collection.
|
|
315
|
+
* @maxLength 256
|
|
316
|
+
*/
|
|
317
|
+
collectionId?: string;
|
|
318
|
+
/**
|
|
319
|
+
* When items already exist in the destination collection, the data writing policy.
|
|
320
|
+
*
|
|
321
|
+
* Default: `OVERWRITE`.
|
|
322
|
+
*/
|
|
323
|
+
writePolicy?: WixDataDestinationWritePolicyWithLiterals;
|
|
324
|
+
}
|
|
325
|
+
declare enum WixDataDestinationWritePolicy {
|
|
326
|
+
/** When an item with the same ID exists in the collection, overwrite it. */
|
|
327
|
+
OVERWRITE = "OVERWRITE",
|
|
328
|
+
/** When an item with the same ID exists in the collection, skip it. */
|
|
329
|
+
SKIP_EXISTING = "SKIP_EXISTING",
|
|
330
|
+
/** Clear the destination collection before moving data. When the job completes, the collection contains only the moved data. */
|
|
331
|
+
TRUNCATE_BEFORE = "TRUNCATE_BEFORE"
|
|
332
|
+
}
|
|
333
|
+
/** @enumType */
|
|
334
|
+
type WixDataDestinationWritePolicyWithLiterals = WixDataDestinationWritePolicy | 'OVERWRITE' | 'SKIP_EXISTING' | 'TRUNCATE_BEFORE';
|
|
335
|
+
interface LocalizationDestination {
|
|
336
|
+
/**
|
|
337
|
+
* Translated CMS content in the specified languages. Content in these languages is imported from the source, with the first specified language treated as the main one.
|
|
338
|
+
*
|
|
339
|
+
* Use two-letter language codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. You can also specify a two-letter country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format.
|
|
340
|
+
*
|
|
341
|
+
* Learn more about [available languages in Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-languages-available).
|
|
342
|
+
* @minSize 2
|
|
343
|
+
* @maxSize 64
|
|
344
|
+
* @format LANGUAGE_TAG
|
|
345
|
+
*/
|
|
346
|
+
languages?: string[];
|
|
347
|
+
}
|
|
348
|
+
/** Destination file. Creates a file and generates a download URL. */
|
|
349
|
+
interface FileDestination {
|
|
350
|
+
/** File format. */
|
|
351
|
+
format?: FileFormatWithLiterals;
|
|
352
|
+
/**
|
|
353
|
+
* File name.
|
|
354
|
+
* @maxLength 512
|
|
355
|
+
*/
|
|
356
|
+
fileName?: string | null;
|
|
357
|
+
/**
|
|
358
|
+
* File download URL.
|
|
359
|
+
* @readonly
|
|
360
|
+
* @maxLength 2048
|
|
361
|
+
*/
|
|
362
|
+
url?: string;
|
|
363
|
+
}
|
|
364
|
+
/** Schema used to specify item format. */
|
|
365
|
+
interface Schema {
|
|
366
|
+
/**
|
|
367
|
+
* Item fields to move to the destination file.
|
|
368
|
+
* @maxSize 1000
|
|
369
|
+
*/
|
|
370
|
+
fields?: Field[];
|
|
371
|
+
}
|
|
372
|
+
interface Field {
|
|
373
|
+
/**
|
|
374
|
+
* Field ID.
|
|
375
|
+
*
|
|
376
|
+
* If the field type is `Array`, specify the item index. If the field type is `Object`, specify the field path. Use dot notation to specify nested fields, for example: `data.address.city`.
|
|
377
|
+
* @maxLength 1024
|
|
378
|
+
*/
|
|
379
|
+
key?: string;
|
|
380
|
+
/**
|
|
381
|
+
* Field display name.
|
|
382
|
+
*
|
|
383
|
+
* When moving items to CSV files, use this to set the header of the target column.
|
|
384
|
+
* @maxLength 1024
|
|
385
|
+
*/
|
|
386
|
+
displayName?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Field data type. Default: `ANY`.
|
|
389
|
+
*
|
|
390
|
+
* Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).
|
|
391
|
+
*/
|
|
392
|
+
fieldType?: FieldTypeWithLiterals;
|
|
393
|
+
}
|
|
394
|
+
declare enum FieldType {
|
|
395
|
+
/** Any data type. */
|
|
396
|
+
ANY = "ANY",
|
|
397
|
+
/** String. */
|
|
398
|
+
STRING = "STRING",
|
|
399
|
+
/** Number. */
|
|
400
|
+
NUMBER = "NUMBER",
|
|
401
|
+
/** Boolean. */
|
|
402
|
+
BOOLEAN = "BOOLEAN",
|
|
403
|
+
/** Date string in ISO 8601 date format: `YYYY-MM-DD`. */
|
|
404
|
+
DATE = "DATE",
|
|
405
|
+
/** [Date object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) (SDK) or an object in the following format: `"someFieldKey": { "$date": "YYYY-MM-DDTHH:mm:ss.sssZ"}`. */
|
|
406
|
+
DATETIME = "DATETIME",
|
|
407
|
+
/** Binary file. */
|
|
408
|
+
BINARY = "BINARY",
|
|
409
|
+
/** object. */
|
|
410
|
+
OBJECT = "OBJECT",
|
|
411
|
+
/** Array. */
|
|
412
|
+
ARRAY = "ARRAY",
|
|
413
|
+
/** Web URL. */
|
|
414
|
+
URL = "URL",
|
|
415
|
+
WIX_MEDIA_URL = "WIX_MEDIA_URL",
|
|
416
|
+
WIX_MEDIA_IMAGE_URL = "WIX_MEDIA_IMAGE_URL",
|
|
417
|
+
WIX_MEDIA_VIDEO_URL = "WIX_MEDIA_VIDEO_URL",
|
|
418
|
+
WIX_MEDIA_DOCUMENT_URL = "WIX_MEDIA_DOCUMENT_URL",
|
|
419
|
+
IMAGE_URL = "IMAGE_URL",
|
|
420
|
+
VIDEO_URL = "VIDEO_URL"
|
|
421
|
+
}
|
|
422
|
+
/** @enumType */
|
|
423
|
+
type FieldTypeWithLiterals = FieldType | 'ANY' | 'STRING' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'BINARY' | 'OBJECT' | 'ARRAY' | 'URL' | 'WIX_MEDIA_URL' | 'WIX_MEDIA_IMAGE_URL' | 'WIX_MEDIA_VIDEO_URL' | 'WIX_MEDIA_DOCUMENT_URL' | 'IMAGE_URL' | 'VIDEO_URL';
|
|
424
|
+
interface StoresCatalogProductsDestination {
|
|
425
|
+
}
|
|
426
|
+
/** Wix Media Manager destination. */
|
|
427
|
+
interface WixMediaDestination {
|
|
428
|
+
/**
|
|
429
|
+
* ID of the target folder in the Media Manager. If not specified, media is imported to the root folder.
|
|
430
|
+
* @maxLength 256
|
|
431
|
+
*/
|
|
432
|
+
targetFolderId?: string | null;
|
|
433
|
+
}
|
|
434
|
+
declare enum WixMediaDestinationWritePolicy {
|
|
435
|
+
/** Overwrite existing media with the same name. */
|
|
436
|
+
OVERWRITE = "OVERWRITE",
|
|
437
|
+
/** Skip media that already exists. */
|
|
438
|
+
SKIP_EXISTING = "SKIP_EXISTING"
|
|
439
|
+
}
|
|
440
|
+
/** @enumType */
|
|
441
|
+
type WixMediaDestinationWritePolicyWithLiterals = WixMediaDestinationWritePolicy | 'OVERWRITE' | 'SKIP_EXISTING';
|
|
442
|
+
/** Creates empty Wix data collections (no data items are inserted). */
|
|
443
|
+
interface WixDataCollectionDefinitionDestination {
|
|
444
|
+
/** Policy for handling collections that already exist on the target site. */
|
|
445
|
+
writePolicy?: WritePolicyWithLiterals;
|
|
446
|
+
}
|
|
447
|
+
declare enum WritePolicy {
|
|
448
|
+
/** Only create new collections. Skip collections that already exist on the target site. */
|
|
449
|
+
SKIP_EXISTING = "SKIP_EXISTING",
|
|
450
|
+
/** Create new collections and overwrite existing ones. */
|
|
451
|
+
OVERWRITE = "OVERWRITE"
|
|
452
|
+
}
|
|
453
|
+
/** @enumType */
|
|
454
|
+
type WritePolicyWithLiterals = WritePolicy | 'SKIP_EXISTING' | 'OVERWRITE';
|
|
455
|
+
interface TestDestination {
|
|
456
|
+
/**
|
|
457
|
+
* Discriminator value for a particular test destination.
|
|
458
|
+
* @maxLength 512
|
|
459
|
+
*/
|
|
460
|
+
type?: string;
|
|
461
|
+
/** Test destination details. */
|
|
462
|
+
details?: Record<string, any> | null;
|
|
463
|
+
}
|
|
464
|
+
interface Transformation extends TransformationTransformationOneOf {
|
|
465
|
+
}
|
|
466
|
+
/** @oneof */
|
|
467
|
+
interface TransformationTransformationOneOf {
|
|
468
|
+
}
|
|
469
|
+
interface TestTransformation {
|
|
470
|
+
}
|
|
471
|
+
/** Create workflow request. */
|
|
472
|
+
interface CreateWorkflowRequest {
|
|
473
|
+
/** Workflow to create. */
|
|
474
|
+
workflow: Workflow;
|
|
475
|
+
}
|
|
476
|
+
/** Create workflow response. */
|
|
477
|
+
interface CreateWorkflowResponse {
|
|
478
|
+
/** Created workflow. */
|
|
479
|
+
workflow?: Workflow;
|
|
480
|
+
}
|
|
481
|
+
/** Get workflow request. */
|
|
482
|
+
interface GetWorkflowRequest {
|
|
483
|
+
/**
|
|
484
|
+
* ID of the workflow to retrieve.
|
|
485
|
+
* @format GUID
|
|
486
|
+
*/
|
|
487
|
+
workflowId: string;
|
|
488
|
+
}
|
|
489
|
+
/** Get workflow response. */
|
|
490
|
+
interface GetWorkflowResponse {
|
|
491
|
+
/** Retrieved workflow. */
|
|
492
|
+
workflow?: Workflow;
|
|
493
|
+
}
|
|
494
|
+
/** Query workflows request. */
|
|
495
|
+
interface QueryWorkflowsRequest {
|
|
496
|
+
/** Query options. */
|
|
497
|
+
query?: CursorQuery;
|
|
498
|
+
}
|
|
499
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
500
|
+
/** Cursor paging options. */
|
|
501
|
+
cursorPaging?: CursorPaging;
|
|
502
|
+
/** Filter object. */
|
|
503
|
+
filter?: Record<string, any> | null;
|
|
504
|
+
/**
|
|
505
|
+
* Sort fields.
|
|
506
|
+
* @maxSize 5
|
|
507
|
+
*/
|
|
508
|
+
sort?: Sorting[];
|
|
509
|
+
}
|
|
510
|
+
/** @oneof */
|
|
511
|
+
interface CursorQueryPagingMethodOneOf {
|
|
512
|
+
/** Cursor paging options. */
|
|
513
|
+
cursorPaging?: CursorPaging;
|
|
514
|
+
}
|
|
515
|
+
interface Sorting {
|
|
516
|
+
/**
|
|
517
|
+
* Name of the field to sort by.
|
|
518
|
+
* @maxLength 512
|
|
519
|
+
*/
|
|
520
|
+
fieldName?: string;
|
|
521
|
+
/** Sort order. */
|
|
522
|
+
order?: SortOrderWithLiterals;
|
|
523
|
+
}
|
|
524
|
+
declare enum SortOrder {
|
|
525
|
+
ASC = "ASC",
|
|
526
|
+
DESC = "DESC"
|
|
527
|
+
}
|
|
528
|
+
/** @enumType */
|
|
529
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
530
|
+
interface CursorPaging {
|
|
531
|
+
/**
|
|
532
|
+
* Maximum number of items to return.
|
|
533
|
+
* @max 100
|
|
534
|
+
*/
|
|
535
|
+
limit?: number | null;
|
|
536
|
+
/**
|
|
537
|
+
* Cursor token from a previous response.
|
|
538
|
+
* @maxLength 16000
|
|
539
|
+
*/
|
|
540
|
+
cursor?: string | null;
|
|
541
|
+
}
|
|
542
|
+
/** Query workflows response. */
|
|
543
|
+
interface QueryWorkflowsResponse {
|
|
544
|
+
/** Matching workflows. */
|
|
545
|
+
workflows?: Workflow[];
|
|
546
|
+
/** Cursor paging metadata for the current result set. */
|
|
547
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
548
|
+
}
|
|
549
|
+
interface CursorPagingMetadata {
|
|
550
|
+
/** Number of items returned in the current page. */
|
|
551
|
+
count?: number | null;
|
|
552
|
+
/** Cursor values for navigating between pages. */
|
|
553
|
+
cursors?: Cursors;
|
|
554
|
+
/** Whether another page can be retrieved. */
|
|
555
|
+
hasNext?: boolean | null;
|
|
556
|
+
}
|
|
557
|
+
interface Cursors {
|
|
558
|
+
/**
|
|
559
|
+
* Cursor pointing to the next page.
|
|
560
|
+
* @maxLength 16000
|
|
561
|
+
*/
|
|
562
|
+
next?: string | null;
|
|
563
|
+
/**
|
|
564
|
+
* Cursor pointing to the previous page.
|
|
565
|
+
* @maxLength 16000
|
|
566
|
+
*/
|
|
567
|
+
prev?: string | null;
|
|
568
|
+
}
|
|
569
|
+
/** Terminate workflow request. */
|
|
570
|
+
interface TerminateWorkflowRequest {
|
|
571
|
+
/**
|
|
572
|
+
* ID of the workflow to terminate.
|
|
573
|
+
* @format GUID
|
|
574
|
+
*/
|
|
575
|
+
workflowId: string;
|
|
576
|
+
}
|
|
577
|
+
/** Terminate workflow response. */
|
|
578
|
+
interface TerminateWorkflowResponse {
|
|
579
|
+
/** Terminated workflow. */
|
|
580
|
+
workflow?: Workflow;
|
|
581
|
+
}
|
|
582
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
583
|
+
createdEvent?: EntityCreatedEvent;
|
|
584
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
585
|
+
deletedEvent?: EntityDeletedEvent;
|
|
586
|
+
actionEvent?: ActionEvent;
|
|
587
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
588
|
+
_id?: string;
|
|
589
|
+
/**
|
|
590
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
591
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
592
|
+
*/
|
|
593
|
+
entityFqdn?: string;
|
|
594
|
+
/**
|
|
595
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
596
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
597
|
+
*/
|
|
598
|
+
slug?: string;
|
|
599
|
+
/** ID of the entity associated with the event. */
|
|
600
|
+
entityId?: string;
|
|
601
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
602
|
+
eventTime?: Date | null;
|
|
603
|
+
/**
|
|
604
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
605
|
+
* (for example, GDPR).
|
|
606
|
+
*/
|
|
607
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
608
|
+
/** If present, indicates the action that triggered the event. */
|
|
609
|
+
originatedFrom?: string | null;
|
|
610
|
+
/**
|
|
611
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
612
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
613
|
+
*/
|
|
614
|
+
entityEventSequence?: string | null;
|
|
615
|
+
}
|
|
616
|
+
/** @oneof */
|
|
617
|
+
interface DomainEventBodyOneOf {
|
|
618
|
+
createdEvent?: EntityCreatedEvent;
|
|
619
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
620
|
+
deletedEvent?: EntityDeletedEvent;
|
|
621
|
+
actionEvent?: ActionEvent;
|
|
622
|
+
}
|
|
623
|
+
interface EntityCreatedEvent {
|
|
624
|
+
entity?: string;
|
|
625
|
+
}
|
|
626
|
+
interface RestoreInfo {
|
|
627
|
+
deletedDate?: Date | null;
|
|
628
|
+
}
|
|
629
|
+
interface EntityUpdatedEvent {
|
|
630
|
+
/**
|
|
631
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
632
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
633
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
634
|
+
*/
|
|
635
|
+
currentEntity?: string;
|
|
636
|
+
}
|
|
637
|
+
interface EntityDeletedEvent {
|
|
638
|
+
/** Entity that was deleted. */
|
|
639
|
+
deletedEntity?: string | null;
|
|
640
|
+
}
|
|
641
|
+
interface ActionEvent {
|
|
642
|
+
body?: string;
|
|
643
|
+
}
|
|
644
|
+
interface Empty {
|
|
645
|
+
}
|
|
646
|
+
interface MessageEnvelope {
|
|
647
|
+
/**
|
|
648
|
+
* App instance ID.
|
|
649
|
+
* @format GUID
|
|
650
|
+
*/
|
|
651
|
+
instanceId?: string | null;
|
|
652
|
+
/**
|
|
653
|
+
* Event type.
|
|
654
|
+
* @maxLength 150
|
|
655
|
+
*/
|
|
656
|
+
eventType?: string;
|
|
657
|
+
/** The identification type and identity data. */
|
|
658
|
+
identity?: IdentificationData;
|
|
659
|
+
/** Stringify payload. */
|
|
660
|
+
data?: string;
|
|
661
|
+
/** Details related to the account */
|
|
662
|
+
accountInfo?: AccountInfo;
|
|
663
|
+
}
|
|
664
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
665
|
+
/**
|
|
666
|
+
* ID of a site visitor that has not logged in to the site.
|
|
667
|
+
* @format GUID
|
|
668
|
+
*/
|
|
669
|
+
anonymousVisitorId?: string;
|
|
670
|
+
/**
|
|
671
|
+
* ID of a site visitor that has logged in to the site.
|
|
672
|
+
* @format GUID
|
|
673
|
+
*/
|
|
674
|
+
memberId?: string;
|
|
675
|
+
/**
|
|
676
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
677
|
+
* @format GUID
|
|
678
|
+
*/
|
|
679
|
+
wixUserId?: string;
|
|
680
|
+
/**
|
|
681
|
+
* ID of an app.
|
|
682
|
+
* @format GUID
|
|
683
|
+
*/
|
|
684
|
+
appId?: string;
|
|
685
|
+
/** @readonly */
|
|
686
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
687
|
+
}
|
|
688
|
+
/** @oneof */
|
|
689
|
+
interface IdentificationDataIdOneOf {
|
|
690
|
+
/**
|
|
691
|
+
* ID of a site visitor that has not logged in to the site.
|
|
692
|
+
* @format GUID
|
|
693
|
+
*/
|
|
694
|
+
anonymousVisitorId?: string;
|
|
695
|
+
/**
|
|
696
|
+
* ID of a site visitor that has logged in to the site.
|
|
697
|
+
* @format GUID
|
|
698
|
+
*/
|
|
699
|
+
memberId?: string;
|
|
700
|
+
/**
|
|
701
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
702
|
+
* @format GUID
|
|
703
|
+
*/
|
|
704
|
+
wixUserId?: string;
|
|
705
|
+
/**
|
|
706
|
+
* ID of an app.
|
|
707
|
+
* @format GUID
|
|
708
|
+
*/
|
|
709
|
+
appId?: string;
|
|
710
|
+
}
|
|
711
|
+
declare enum WebhookIdentityType {
|
|
712
|
+
UNKNOWN = "UNKNOWN",
|
|
713
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
714
|
+
MEMBER = "MEMBER",
|
|
715
|
+
WIX_USER = "WIX_USER",
|
|
716
|
+
APP = "APP"
|
|
717
|
+
}
|
|
718
|
+
/** @enumType */
|
|
719
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
720
|
+
interface AccountInfo {
|
|
721
|
+
/**
|
|
722
|
+
* ID of the Wix account associated with the event.
|
|
723
|
+
* @format GUID
|
|
724
|
+
*/
|
|
725
|
+
accountId?: string | null;
|
|
726
|
+
/**
|
|
727
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
728
|
+
* @format GUID
|
|
729
|
+
*/
|
|
730
|
+
parentAccountId?: string | null;
|
|
731
|
+
/**
|
|
732
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
733
|
+
* @format GUID
|
|
734
|
+
*/
|
|
735
|
+
siteId?: string | null;
|
|
736
|
+
}
|
|
737
|
+
interface BaseEventMetadata {
|
|
738
|
+
/**
|
|
739
|
+
* App instance ID.
|
|
740
|
+
* @format GUID
|
|
741
|
+
*/
|
|
742
|
+
instanceId?: string | null;
|
|
743
|
+
/**
|
|
744
|
+
* Event type.
|
|
745
|
+
* @maxLength 150
|
|
746
|
+
*/
|
|
747
|
+
eventType?: string;
|
|
748
|
+
/** The identification type and identity data. */
|
|
749
|
+
identity?: IdentificationData;
|
|
750
|
+
/** Details related to the account */
|
|
751
|
+
accountInfo?: AccountInfo;
|
|
752
|
+
}
|
|
753
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
754
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
755
|
+
_id?: string;
|
|
756
|
+
/**
|
|
757
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
758
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
759
|
+
*/
|
|
760
|
+
entityFqdn?: string;
|
|
761
|
+
/**
|
|
762
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
763
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
764
|
+
*/
|
|
765
|
+
slug?: string;
|
|
766
|
+
/** ID of the entity associated with the event. */
|
|
767
|
+
entityId?: string;
|
|
768
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
769
|
+
eventTime?: Date | null;
|
|
770
|
+
/**
|
|
771
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
772
|
+
* (for example, GDPR).
|
|
773
|
+
*/
|
|
774
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
775
|
+
/** If present, indicates the action that triggered the event. */
|
|
776
|
+
originatedFrom?: string | null;
|
|
777
|
+
/**
|
|
778
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
779
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
780
|
+
*/
|
|
781
|
+
entityEventSequence?: string | null;
|
|
782
|
+
accountInfo?: AccountInfoMetadata;
|
|
783
|
+
}
|
|
784
|
+
interface AccountInfoMetadata {
|
|
785
|
+
/** ID of the Wix account associated with the event */
|
|
786
|
+
accountId: string;
|
|
787
|
+
/** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
|
|
788
|
+
siteId?: string;
|
|
789
|
+
/** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
|
|
790
|
+
parentAccountId?: string;
|
|
791
|
+
}
|
|
792
|
+
interface WorkflowCreatedEnvelope {
|
|
793
|
+
entity: Workflow;
|
|
794
|
+
metadata: EventMetadata;
|
|
795
|
+
}
|
|
796
|
+
/** @permissionScope Data Mover Manage Jobs
|
|
797
|
+
* @permissionScopeId SCOPE.DC-DATA.MANAGE_MOVEMENT_JOBS
|
|
798
|
+
* @permissionId hub:v1:workflow:get_workflow
|
|
799
|
+
* @webhook
|
|
800
|
+
* @eventType wix.hub.v1.workflow_created
|
|
801
|
+
* @slug created
|
|
802
|
+
* @documentationMaturity preview
|
|
803
|
+
*/
|
|
804
|
+
declare function onWorkflowCreated(handler: (event: WorkflowCreatedEnvelope) => void | Promise<void>): void;
|
|
805
|
+
interface WorkflowUpdatedEnvelope {
|
|
806
|
+
entity: Workflow;
|
|
807
|
+
metadata: EventMetadata;
|
|
808
|
+
}
|
|
809
|
+
/** @permissionScope Data Mover Manage Jobs
|
|
810
|
+
* @permissionScopeId SCOPE.DC-DATA.MANAGE_MOVEMENT_JOBS
|
|
811
|
+
* @permissionId hub:v1:workflow:get_workflow
|
|
812
|
+
* @webhook
|
|
813
|
+
* @eventType wix.hub.v1.workflow_updated
|
|
814
|
+
* @slug updated
|
|
815
|
+
* @documentationMaturity preview
|
|
816
|
+
*/
|
|
817
|
+
declare function onWorkflowUpdated(handler: (event: WorkflowUpdatedEnvelope) => void | Promise<void>): void;
|
|
818
|
+
/**
|
|
819
|
+
* Creates a workflow and persists its immutable execution plan.
|
|
820
|
+
* @param workflow - Workflow to create.
|
|
821
|
+
* @public
|
|
822
|
+
* @documentationMaturity preview
|
|
823
|
+
* @requiredField workflow
|
|
824
|
+
* @requiredField workflow.specs
|
|
825
|
+
* @permissionId hub:v1:workflow:create_workflow
|
|
826
|
+
* @applicableIdentity APP
|
|
827
|
+
* @returns Created workflow.
|
|
828
|
+
* @fqn wix.hub.v1.DataMovementWorkflowService.CreateWorkflow
|
|
829
|
+
*/
|
|
830
|
+
declare function createWorkflow(workflow: NonNullablePaths<Workflow, `specs`, 2>): Promise<NonNullablePaths<Workflow, `_id` | `status` | `specs` | `specs.${number}.sourceSiteId` | `specs.${number}.destinationSiteId` | `specs.${number}.source.wixDataCollection.collectionId` | `specs.${number}.source.file.format` | `specs.${number}.source.file.fileId` | `specs.${number}.source.file.url` | `specs.${number}.destination.wixDataCollection.collectionId` | `specs.${number}.destination.wixDataCollection.writePolicy` | `specs.${number}.destination.file.format` | `specs.${number}.destination.file.url`, 6>>;
|
|
831
|
+
/**
|
|
832
|
+
* Retrieves a workflow by ID.
|
|
833
|
+
* @param workflowId - ID of the workflow to retrieve.
|
|
834
|
+
* @public
|
|
835
|
+
* @documentationMaturity preview
|
|
836
|
+
* @requiredField workflowId
|
|
837
|
+
* @permissionId hub:v1:workflow:get_workflow
|
|
838
|
+
* @applicableIdentity APP
|
|
839
|
+
* @returns Retrieved workflow.
|
|
840
|
+
* @fqn wix.hub.v1.DataMovementWorkflowService.GetWorkflow
|
|
841
|
+
*/
|
|
842
|
+
declare function getWorkflow(workflowId: string): Promise<NonNullablePaths<Workflow, `_id` | `status` | `specs` | `specs.${number}.sourceSiteId` | `specs.${number}.destinationSiteId` | `specs.${number}.source.wixDataCollection.collectionId` | `specs.${number}.source.file.format` | `specs.${number}.source.file.fileId` | `specs.${number}.source.file.url` | `specs.${number}.destination.wixDataCollection.collectionId` | `specs.${number}.destination.wixDataCollection.writePolicy` | `specs.${number}.destination.file.format` | `specs.${number}.destination.file.url`, 6>>;
|
|
843
|
+
/**
|
|
844
|
+
* Queries workflows using cursor paging, filtering, and sorting.
|
|
845
|
+
* @public
|
|
846
|
+
* @documentationMaturity preview
|
|
847
|
+
* @permissionId hub:v1:workflow:query_workflows
|
|
848
|
+
* @applicableIdentity APP
|
|
849
|
+
* @fqn wix.hub.v1.DataMovementWorkflowService.QueryWorkflows
|
|
850
|
+
*/
|
|
851
|
+
declare function queryWorkflows(): WorkflowsQueryBuilder;
|
|
852
|
+
interface QueryCursorResult {
|
|
853
|
+
cursors: Cursors;
|
|
854
|
+
hasNext: () => boolean;
|
|
855
|
+
hasPrev: () => boolean;
|
|
856
|
+
length: number;
|
|
857
|
+
pageSize: number;
|
|
858
|
+
}
|
|
859
|
+
interface WorkflowsQueryResult extends QueryCursorResult {
|
|
860
|
+
items: Workflow[];
|
|
861
|
+
query: WorkflowsQueryBuilder;
|
|
862
|
+
next: () => Promise<WorkflowsQueryResult>;
|
|
863
|
+
prev: () => Promise<WorkflowsQueryResult>;
|
|
864
|
+
}
|
|
865
|
+
interface WorkflowsQueryBuilder {
|
|
866
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
867
|
+
* @param value - Value to compare against.
|
|
868
|
+
* @documentationMaturity preview
|
|
869
|
+
*/
|
|
870
|
+
eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status', value: any) => WorkflowsQueryBuilder;
|
|
871
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
872
|
+
* @param value - Value to compare against.
|
|
873
|
+
* @documentationMaturity preview
|
|
874
|
+
*/
|
|
875
|
+
ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status', value: any) => WorkflowsQueryBuilder;
|
|
876
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
877
|
+
* @param value - Value to compare against.
|
|
878
|
+
* @documentationMaturity preview
|
|
879
|
+
*/
|
|
880
|
+
ge: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => WorkflowsQueryBuilder;
|
|
881
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
882
|
+
* @param value - Value to compare against.
|
|
883
|
+
* @documentationMaturity preview
|
|
884
|
+
*/
|
|
885
|
+
gt: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => WorkflowsQueryBuilder;
|
|
886
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
887
|
+
* @param value - Value to compare against.
|
|
888
|
+
* @documentationMaturity preview
|
|
889
|
+
*/
|
|
890
|
+
le: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => WorkflowsQueryBuilder;
|
|
891
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
892
|
+
* @param value - Value to compare against.
|
|
893
|
+
* @documentationMaturity preview
|
|
894
|
+
*/
|
|
895
|
+
lt: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => WorkflowsQueryBuilder;
|
|
896
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
897
|
+
* @param string - String to compare against. Case-insensitive.
|
|
898
|
+
* @documentationMaturity preview
|
|
899
|
+
*/
|
|
900
|
+
startsWith: (propertyName: '_id', value: string) => WorkflowsQueryBuilder;
|
|
901
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
902
|
+
* @param values - List of values to compare against.
|
|
903
|
+
* @documentationMaturity preview
|
|
904
|
+
*/
|
|
905
|
+
hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status', value: any[]) => WorkflowsQueryBuilder;
|
|
906
|
+
/** @documentationMaturity preview */
|
|
907
|
+
in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status', value: any) => WorkflowsQueryBuilder;
|
|
908
|
+
/** @documentationMaturity preview */
|
|
909
|
+
exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status', value: boolean) => WorkflowsQueryBuilder;
|
|
910
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
911
|
+
* @documentationMaturity preview
|
|
912
|
+
*/
|
|
913
|
+
ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'status'>) => WorkflowsQueryBuilder;
|
|
914
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
915
|
+
* @documentationMaturity preview
|
|
916
|
+
*/
|
|
917
|
+
descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'status'>) => WorkflowsQueryBuilder;
|
|
918
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
919
|
+
* @documentationMaturity preview
|
|
920
|
+
*/
|
|
921
|
+
limit: (limit: number) => WorkflowsQueryBuilder;
|
|
922
|
+
/** @param cursor - A pointer to specific record
|
|
923
|
+
* @documentationMaturity preview
|
|
924
|
+
*/
|
|
925
|
+
skipTo: (cursor: string) => WorkflowsQueryBuilder;
|
|
926
|
+
/** @documentationMaturity preview */
|
|
927
|
+
find: () => Promise<WorkflowsQueryResult>;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* @hidden
|
|
931
|
+
* @fqn wix.hub.v1.DataMovementWorkflowService.QueryWorkflows
|
|
932
|
+
* @requiredField query
|
|
933
|
+
* @returns Query workflows response.
|
|
934
|
+
*/
|
|
935
|
+
declare function typedQueryWorkflows(query: WorkflowQuery): Promise<NonNullablePaths<QueryWorkflowsResponse, `workflows` | `workflows.${number}._id` | `workflows.${number}.status`, 4>>;
|
|
936
|
+
interface WorkflowQuerySpec extends QuerySpec {
|
|
937
|
+
paging: 'cursor';
|
|
938
|
+
wql: [
|
|
939
|
+
{
|
|
940
|
+
fields: ['_createdDate', '_id', '_updatedDate', 'status'];
|
|
941
|
+
operators: '*';
|
|
942
|
+
sort: 'BOTH';
|
|
943
|
+
}
|
|
944
|
+
];
|
|
945
|
+
}
|
|
946
|
+
type CommonQueryWithEntityContext = Query<Workflow, WorkflowQuerySpec>;
|
|
947
|
+
type WorkflowQuery = {
|
|
948
|
+
/**
|
|
949
|
+
Cursor paging options.
|
|
950
|
+
*/
|
|
951
|
+
cursorPaging?: {
|
|
952
|
+
/**
|
|
953
|
+
Maximum number of items to return.
|
|
954
|
+
@max: 100
|
|
955
|
+
*/
|
|
956
|
+
limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
|
|
957
|
+
/**
|
|
958
|
+
Cursor token from a previous response.
|
|
959
|
+
@maxLength: 16000
|
|
960
|
+
*/
|
|
961
|
+
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
962
|
+
};
|
|
963
|
+
/**
|
|
964
|
+
Filter object.
|
|
965
|
+
*/
|
|
966
|
+
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
967
|
+
/**
|
|
968
|
+
Sort fields.
|
|
969
|
+
@maxSize: 5
|
|
970
|
+
*/
|
|
971
|
+
sort?: {
|
|
972
|
+
/**
|
|
973
|
+
Name of the field to sort by.
|
|
974
|
+
@maxLength: 512
|
|
975
|
+
*/
|
|
976
|
+
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
977
|
+
/**
|
|
978
|
+
Sort order.
|
|
979
|
+
*/
|
|
980
|
+
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
981
|
+
}[];
|
|
982
|
+
};
|
|
983
|
+
declare const utils: {
|
|
984
|
+
query: {
|
|
985
|
+
QueryBuilder: () => _wix_sdk_types.QueryBuilder<Workflow, WorkflowQuerySpec, WorkflowQuery>;
|
|
986
|
+
Filter: _wix_sdk_types.FilterFactory<Workflow, WorkflowQuerySpec>;
|
|
987
|
+
Sort: _wix_sdk_types.SortFactory<WorkflowQuerySpec>;
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
/**
|
|
991
|
+
* Terminates a workflow and prevents further step creation.
|
|
992
|
+
* @param workflowId - ID of the workflow to terminate.
|
|
993
|
+
* @public
|
|
994
|
+
* @documentationMaturity preview
|
|
995
|
+
* @requiredField workflowId
|
|
996
|
+
* @permissionId hub:v1:workflow:terminate_workflow
|
|
997
|
+
* @applicableIdentity APP
|
|
998
|
+
* @returns Terminate workflow response.
|
|
999
|
+
* @fqn wix.hub.v1.DataMovementWorkflowService.TerminateWorkflow
|
|
1000
|
+
*/
|
|
1001
|
+
declare function terminateWorkflow(workflowId: string): Promise<NonNullablePaths<TerminateWorkflowResponse, `workflow._id` | `workflow.status` | `workflow.specs` | `workflow.specs.${number}.sourceSiteId` | `workflow.specs.${number}.destinationSiteId` | `workflow.specs.${number}.source.wixDataCollection.collectionId` | `workflow.specs.${number}.source.file.format` | `workflow.specs.${number}.source.file.fileId` | `workflow.specs.${number}.source.file.url` | `workflow.specs.${number}.destination.wixDataCollection.collectionId` | `workflow.specs.${number}.destination.wixDataCollection.writePolicy` | `workflow.specs.${number}.destination.file.format` | `workflow.specs.${number}.destination.file.url`, 7>>;
|
|
1002
|
+
|
|
1003
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type CommonQueryWithEntityContext, type CreateWorkflowRequest, type CreateWorkflowResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DataMovementJobLogs, type Destination, type DestinationDestinationOneOf, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExternalFileSource, type Field, FieldType, type FieldTypeWithLiterals, type FileDestination, FileFormat, type FileFormatWithLiterals, type FileSource, type GetWorkflowRequest, type GetWorkflowResponse, type GoogleSheetsSource, type IdentificationData, type IdentificationDataIdOneOf, type JobSpec, type JobSpecSiteOverrideOneOf, type LocalizationDestination, type LocalizationSource, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type QueryWorkflowsRequest, type QueryWorkflowsResponse, type RestoreInfo, type Schema, SortOrder, type SortOrderWithLiterals, type Sorting, type Source, type SourceSourceOneOf, Status, type StatusWithLiterals, type StoresCatalogProductsDestination, type TerminateWorkflowRequest, type TerminateWorkflowResponse, type TestDestination, type TestSource, type TestTransformation, type Transformation, type TransformationTransformationOneOf, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixDataCollectionDefinitionDestination, type WixDataCollectionDefinitionSource, type WixDataDestination, WixDataDestinationWritePolicy, type WixDataDestinationWritePolicyWithLiterals, WixDataEnvironment, type WixDataEnvironmentWithLiterals, type WixDataSource, type WixMediaDestination, WixMediaDestinationWritePolicy, type WixMediaDestinationWritePolicyWithLiterals, type WixMediaSource, type Workflow, type WorkflowCreatedEnvelope, type WorkflowQuery, type WorkflowQuerySpec, type WorkflowUpdatedEnvelope, type WorkflowsQueryBuilder, type WorkflowsQueryResult, WritePolicy, type WritePolicyWithLiterals, createWorkflow, getWorkflow, onWorkflowCreated, onWorkflowUpdated, queryWorkflows, terminateWorkflow, typedQueryWorkflows, utils };
|