@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.
Files changed (52) hide show
  1. package/build/cjs/index.d.ts +48 -0
  2. package/build/cjs/index.js +573 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1003 -0
  5. package/build/cjs/index.typings.js +475 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +759 -0
  8. package/build/cjs/meta.js +394 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +478 -0
  11. package/build/cjs/schemas.js +748 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +48 -0
  14. package/build/es/index.mjs +533 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +1003 -0
  17. package/build/es/index.typings.mjs +436 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +759 -0
  20. package/build/es/meta.mjs +354 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +478 -0
  24. package/build/es/schemas.mjs +704 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +48 -0
  27. package/build/internal/cjs/index.js +573 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +1014 -0
  30. package/build/internal/cjs/index.typings.js +475 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +759 -0
  33. package/build/internal/cjs/meta.js +394 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +478 -0
  36. package/build/internal/cjs/schemas.js +748 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +48 -0
  39. package/build/internal/es/index.mjs +533 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +1014 -0
  42. package/build/internal/es/index.typings.mjs +436 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +759 -0
  45. package/build/internal/es/meta.mjs +354 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +478 -0
  48. package/build/internal/es/schemas.mjs +704 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,436 @@
1
+ // src/hub-v1-workflow-movement-workflows.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/hub-v1-workflow-movement-workflows.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
12
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
14
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
15
+ function resolveWixHubV1DataMovementWorkflowServiceUrl(opts) {
16
+ const domainToMappings = {
17
+ "editor._base_domain_": [
18
+ {
19
+ srcPath: "/_api/wix-data-hub-workflow",
20
+ destPath: ""
21
+ }
22
+ ],
23
+ "blocks._base_domain_": [
24
+ {
25
+ srcPath: "/_api/wix-data-hub-workflow",
26
+ destPath: ""
27
+ }
28
+ ],
29
+ "create.editorx": [
30
+ {
31
+ srcPath: "/_api/wix-data-hub-workflow",
32
+ destPath: ""
33
+ }
34
+ ],
35
+ _: [
36
+ {
37
+ srcPath: "/_api/wix-data-hub-workflow",
38
+ destPath: ""
39
+ }
40
+ ],
41
+ "manage._base_domain_": [
42
+ {
43
+ srcPath: "/_api/wix-data-hub-workflow",
44
+ destPath: ""
45
+ }
46
+ ],
47
+ "*.dev.wix-code.com": [
48
+ {
49
+ srcPath: "/_api/wix-data-hub-workflow",
50
+ destPath: ""
51
+ }
52
+ ]
53
+ };
54
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
55
+ }
56
+ var PACKAGE_NAME = "@wix/auto_sdk_data_movement-workflows";
57
+ function createWorkflow(payload) {
58
+ function __createWorkflow({ host }) {
59
+ const serializedData = transformPaths(payload, [
60
+ {
61
+ transformFn: transformSDKTimestampToRESTTimestamp,
62
+ paths: [
63
+ { path: "workflow.createdDate" },
64
+ { path: "workflow.updatedDate" }
65
+ ]
66
+ }
67
+ ]);
68
+ const metadata = {
69
+ entityFqdn: "wix.hub.v1.workflow",
70
+ method: "POST",
71
+ methodFqn: "wix.hub.v1.DataMovementWorkflowService.CreateWorkflow",
72
+ packageName: PACKAGE_NAME,
73
+ migrationOptions: {
74
+ optInTransformResponse: true
75
+ },
76
+ url: resolveWixHubV1DataMovementWorkflowServiceUrl({
77
+ protoPath: "/v1/workflows",
78
+ data: serializedData,
79
+ host
80
+ }),
81
+ data: serializedData,
82
+ transformResponse: (payload2) => transformPaths(payload2, [
83
+ {
84
+ transformFn: transformRESTTimestampToSDKTimestamp,
85
+ paths: [
86
+ { path: "workflow.createdDate" },
87
+ { path: "workflow.updatedDate" }
88
+ ]
89
+ }
90
+ ])
91
+ };
92
+ return metadata;
93
+ }
94
+ return __createWorkflow;
95
+ }
96
+ function getWorkflow(payload) {
97
+ function __getWorkflow({ host }) {
98
+ const metadata = {
99
+ entityFqdn: "wix.hub.v1.workflow",
100
+ method: "GET",
101
+ methodFqn: "wix.hub.v1.DataMovementWorkflowService.GetWorkflow",
102
+ packageName: PACKAGE_NAME,
103
+ migrationOptions: {
104
+ optInTransformResponse: true
105
+ },
106
+ url: resolveWixHubV1DataMovementWorkflowServiceUrl({
107
+ protoPath: "/v1/workflows/{workflowId}",
108
+ data: payload,
109
+ host
110
+ }),
111
+ params: toURLSearchParams(payload),
112
+ transformResponse: (payload2) => transformPaths(payload2, [
113
+ {
114
+ transformFn: transformRESTTimestampToSDKTimestamp,
115
+ paths: [
116
+ { path: "workflow.createdDate" },
117
+ { path: "workflow.updatedDate" }
118
+ ]
119
+ }
120
+ ])
121
+ };
122
+ return metadata;
123
+ }
124
+ return __getWorkflow;
125
+ }
126
+ function queryWorkflows(payload) {
127
+ function __queryWorkflows({ host }) {
128
+ const metadata = {
129
+ entityFqdn: "wix.hub.v1.workflow",
130
+ method: "GET",
131
+ methodFqn: "wix.hub.v1.DataMovementWorkflowService.QueryWorkflows",
132
+ packageName: PACKAGE_NAME,
133
+ migrationOptions: {
134
+ optInTransformResponse: true
135
+ },
136
+ url: resolveWixHubV1DataMovementWorkflowServiceUrl({
137
+ protoPath: "/v1/workflows/query",
138
+ data: payload,
139
+ host
140
+ }),
141
+ params: toURLSearchParams(payload, true),
142
+ transformResponse: (payload2) => transformPaths(payload2, [
143
+ {
144
+ transformFn: transformRESTTimestampToSDKTimestamp,
145
+ paths: [
146
+ { path: "workflows.createdDate" },
147
+ { path: "workflows.updatedDate" }
148
+ ]
149
+ }
150
+ ]),
151
+ fallback: [
152
+ {
153
+ method: "POST",
154
+ url: resolveWixHubV1DataMovementWorkflowServiceUrl({
155
+ protoPath: "/v1/workflows/query",
156
+ data: payload,
157
+ host
158
+ }),
159
+ data: payload
160
+ }
161
+ ]
162
+ };
163
+ return metadata;
164
+ }
165
+ return __queryWorkflows;
166
+ }
167
+ function terminateWorkflow(payload) {
168
+ function __terminateWorkflow({ host }) {
169
+ const metadata = {
170
+ entityFqdn: "wix.hub.v1.workflow",
171
+ method: "POST",
172
+ methodFqn: "wix.hub.v1.DataMovementWorkflowService.TerminateWorkflow",
173
+ packageName: PACKAGE_NAME,
174
+ migrationOptions: {
175
+ optInTransformResponse: true
176
+ },
177
+ url: resolveWixHubV1DataMovementWorkflowServiceUrl({
178
+ protoPath: "/v1/workflows/{workflowId}/terminate",
179
+ data: payload,
180
+ host
181
+ }),
182
+ data: payload,
183
+ transformResponse: (payload2) => transformPaths(payload2, [
184
+ {
185
+ transformFn: transformRESTTimestampToSDKTimestamp,
186
+ paths: [
187
+ { path: "workflow.createdDate" },
188
+ { path: "workflow.updatedDate" }
189
+ ]
190
+ }
191
+ ])
192
+ };
193
+ return metadata;
194
+ }
195
+ return __terminateWorkflow;
196
+ }
197
+
198
+ // src/hub-v1-workflow-movement-workflows.universal.ts
199
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
200
+ import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
201
+ var Status = /* @__PURE__ */ ((Status2) => {
202
+ Status2["UNINITIALIZED"] = "UNINITIALIZED";
203
+ Status2["RUNNING"] = "RUNNING";
204
+ Status2["FINISHED"] = "FINISHED";
205
+ return Status2;
206
+ })(Status || {});
207
+ var WixDataEnvironment = /* @__PURE__ */ ((WixDataEnvironment2) => {
208
+ WixDataEnvironment2["LIVE"] = "LIVE";
209
+ WixDataEnvironment2["SANDBOX"] = "SANDBOX";
210
+ return WixDataEnvironment2;
211
+ })(WixDataEnvironment || {});
212
+ var FileFormat = /* @__PURE__ */ ((FileFormat2) => {
213
+ FileFormat2["UNKNOWN"] = "UNKNOWN";
214
+ FileFormat2["CSV"] = "CSV";
215
+ FileFormat2["JSONL"] = "JSONL";
216
+ return FileFormat2;
217
+ })(FileFormat || {});
218
+ var MediaType = /* @__PURE__ */ ((MediaType2) => {
219
+ MediaType2["ALL"] = "ALL";
220
+ MediaType2["IMAGE"] = "IMAGE";
221
+ MediaType2["VIDEO"] = "VIDEO";
222
+ MediaType2["AUDIO"] = "AUDIO";
223
+ MediaType2["DOCUMENT"] = "DOCUMENT";
224
+ return MediaType2;
225
+ })(MediaType || {});
226
+ var WixDataDestinationWritePolicy = /* @__PURE__ */ ((WixDataDestinationWritePolicy2) => {
227
+ WixDataDestinationWritePolicy2["OVERWRITE"] = "OVERWRITE";
228
+ WixDataDestinationWritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
229
+ WixDataDestinationWritePolicy2["TRUNCATE_BEFORE"] = "TRUNCATE_BEFORE";
230
+ return WixDataDestinationWritePolicy2;
231
+ })(WixDataDestinationWritePolicy || {});
232
+ var FieldType = /* @__PURE__ */ ((FieldType2) => {
233
+ FieldType2["ANY"] = "ANY";
234
+ FieldType2["STRING"] = "STRING";
235
+ FieldType2["NUMBER"] = "NUMBER";
236
+ FieldType2["BOOLEAN"] = "BOOLEAN";
237
+ FieldType2["DATE"] = "DATE";
238
+ FieldType2["DATETIME"] = "DATETIME";
239
+ FieldType2["BINARY"] = "BINARY";
240
+ FieldType2["OBJECT"] = "OBJECT";
241
+ FieldType2["ARRAY"] = "ARRAY";
242
+ FieldType2["URL"] = "URL";
243
+ FieldType2["WIX_MEDIA_URL"] = "WIX_MEDIA_URL";
244
+ FieldType2["WIX_MEDIA_IMAGE_URL"] = "WIX_MEDIA_IMAGE_URL";
245
+ FieldType2["WIX_MEDIA_VIDEO_URL"] = "WIX_MEDIA_VIDEO_URL";
246
+ FieldType2["WIX_MEDIA_DOCUMENT_URL"] = "WIX_MEDIA_DOCUMENT_URL";
247
+ FieldType2["IMAGE_URL"] = "IMAGE_URL";
248
+ FieldType2["VIDEO_URL"] = "VIDEO_URL";
249
+ return FieldType2;
250
+ })(FieldType || {});
251
+ var WixMediaDestinationWritePolicy = /* @__PURE__ */ ((WixMediaDestinationWritePolicy2) => {
252
+ WixMediaDestinationWritePolicy2["OVERWRITE"] = "OVERWRITE";
253
+ WixMediaDestinationWritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
254
+ return WixMediaDestinationWritePolicy2;
255
+ })(WixMediaDestinationWritePolicy || {});
256
+ var WritePolicy = /* @__PURE__ */ ((WritePolicy2) => {
257
+ WritePolicy2["SKIP_EXISTING"] = "SKIP_EXISTING";
258
+ WritePolicy2["OVERWRITE"] = "OVERWRITE";
259
+ return WritePolicy2;
260
+ })(WritePolicy || {});
261
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
262
+ SortOrder2["ASC"] = "ASC";
263
+ SortOrder2["DESC"] = "DESC";
264
+ return SortOrder2;
265
+ })(SortOrder || {});
266
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
267
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
268
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
269
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
270
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
271
+ WebhookIdentityType2["APP"] = "APP";
272
+ return WebhookIdentityType2;
273
+ })(WebhookIdentityType || {});
274
+ async function createWorkflow2(workflow) {
275
+ const { httpClient, sideEffects } = arguments[1];
276
+ const payload = renameKeysFromSDKRequestToRESTRequest({ workflow });
277
+ const reqOpts = createWorkflow(payload);
278
+ sideEffects?.onSiteCall?.();
279
+ try {
280
+ const result = await httpClient.request(reqOpts);
281
+ sideEffects?.onSuccess?.(result);
282
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.workflow;
283
+ } catch (err) {
284
+ const transformedError = sdkTransformError(
285
+ err,
286
+ {
287
+ spreadPathsToArguments: {},
288
+ explicitPathsToArguments: { workflow: "$[0]" },
289
+ singleArgumentUnchanged: false
290
+ },
291
+ ["workflow"]
292
+ );
293
+ sideEffects?.onError?.(err);
294
+ throw transformedError;
295
+ }
296
+ }
297
+ async function getWorkflow2(workflowId) {
298
+ const { httpClient, sideEffects } = arguments[1];
299
+ const payload = renameKeysFromSDKRequestToRESTRequest({
300
+ workflowId
301
+ });
302
+ const reqOpts = getWorkflow(payload);
303
+ sideEffects?.onSiteCall?.();
304
+ try {
305
+ const result = await httpClient.request(reqOpts);
306
+ sideEffects?.onSuccess?.(result);
307
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.workflow;
308
+ } catch (err) {
309
+ const transformedError = sdkTransformError(
310
+ err,
311
+ {
312
+ spreadPathsToArguments: {},
313
+ explicitPathsToArguments: { workflowId: "$[0]" },
314
+ singleArgumentUnchanged: false
315
+ },
316
+ ["workflowId"]
317
+ );
318
+ sideEffects?.onError?.(err);
319
+ throw transformedError;
320
+ }
321
+ }
322
+ function queryWorkflows2() {
323
+ const { httpClient, sideEffects } = arguments[0];
324
+ return queryBuilder({
325
+ func: async (payload) => {
326
+ const reqOpts = queryWorkflows(payload);
327
+ sideEffects?.onSiteCall?.();
328
+ try {
329
+ const result = await httpClient.request(reqOpts);
330
+ sideEffects?.onSuccess?.(result);
331
+ return result;
332
+ } catch (err) {
333
+ sideEffects?.onError?.(err);
334
+ throw err;
335
+ }
336
+ },
337
+ requestTransformer: (query) => {
338
+ const args = [query, {}];
339
+ return renameKeysFromSDKRequestToRESTRequest({
340
+ ...args?.[1],
341
+ query: args?.[0]
342
+ });
343
+ },
344
+ responseTransformer: ({ data }) => {
345
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
346
+ transformPaths2(data, [])
347
+ );
348
+ return {
349
+ items: transformedData?.workflows,
350
+ pagingMetadata: transformedData?.pagingMetadata
351
+ };
352
+ },
353
+ errorTransformer: (err) => {
354
+ const transformedError = sdkTransformError(err, {
355
+ spreadPathsToArguments: {},
356
+ explicitPathsToArguments: { query: "$[0]" },
357
+ singleArgumentUnchanged: false
358
+ });
359
+ throw transformedError;
360
+ },
361
+ pagingMethod: "CURSOR",
362
+ transformationPaths: {}
363
+ });
364
+ }
365
+ async function typedQueryWorkflows(query) {
366
+ const { httpClient, sideEffects } = arguments[1];
367
+ const payload = renameKeysFromSDKRequestToRESTRequest({ query });
368
+ const reqOpts = queryWorkflows(payload);
369
+ sideEffects?.onSiteCall?.();
370
+ try {
371
+ const result = await httpClient.request(reqOpts);
372
+ sideEffects?.onSuccess?.(result);
373
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
374
+ } catch (err) {
375
+ const transformedError = sdkTransformError(
376
+ err,
377
+ {
378
+ spreadPathsToArguments: {},
379
+ explicitPathsToArguments: { query: "$[0]" },
380
+ singleArgumentUnchanged: false
381
+ },
382
+ ["query"]
383
+ );
384
+ sideEffects?.onError?.(err);
385
+ throw transformedError;
386
+ }
387
+ }
388
+ var utils = {
389
+ query: {
390
+ ...createQueryUtils()
391
+ }
392
+ };
393
+ async function terminateWorkflow2(workflowId) {
394
+ const { httpClient, sideEffects } = arguments[1];
395
+ const payload = renameKeysFromSDKRequestToRESTRequest({
396
+ workflowId
397
+ });
398
+ const reqOpts = terminateWorkflow(payload);
399
+ sideEffects?.onSiteCall?.();
400
+ try {
401
+ const result = await httpClient.request(reqOpts);
402
+ sideEffects?.onSuccess?.(result);
403
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
404
+ } catch (err) {
405
+ const transformedError = sdkTransformError(
406
+ err,
407
+ {
408
+ spreadPathsToArguments: {},
409
+ explicitPathsToArguments: { workflowId: "$[0]" },
410
+ singleArgumentUnchanged: false
411
+ },
412
+ ["workflowId"]
413
+ );
414
+ sideEffects?.onError?.(err);
415
+ throw transformedError;
416
+ }
417
+ }
418
+ export {
419
+ FieldType,
420
+ FileFormat,
421
+ MediaType,
422
+ SortOrder,
423
+ Status,
424
+ WebhookIdentityType,
425
+ WixDataDestinationWritePolicy,
426
+ WixDataEnvironment,
427
+ WixMediaDestinationWritePolicy,
428
+ WritePolicy,
429
+ createWorkflow2 as createWorkflow,
430
+ getWorkflow2 as getWorkflow,
431
+ queryWorkflows2 as queryWorkflows,
432
+ terminateWorkflow2 as terminateWorkflow,
433
+ typedQueryWorkflows,
434
+ utils
435
+ };
436
+ //# sourceMappingURL=index.typings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/hub-v1-workflow-movement-workflows.universal.ts","../../../src/hub-v1-workflow-movement-workflows.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixHubV1Workflow from './hub-v1-workflow-movement-workflows.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/** Workflow run composed of ordered data movement steps. */\nexport interface Workflow {\n /**\n * Workflow ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number incremented on each workflow update.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time when the workflow was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time when the workflow was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Current workflow lifecycle status.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Immutable ordered execution plan for the workflow.\n * @minSize 1\n * @maxSize 100\n */\n specs?: JobSpec[];\n}\n\n/** Workflow lifecycle status. */\nexport enum Status {\n UNINITIALIZED = 'UNINITIALIZED',\n RUNNING = 'RUNNING',\n FINISHED = 'FINISHED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNINITIALIZED'\n | 'RUNNING'\n | 'FINISHED';\n\n/** Immutable specification for a single data movement step. */\nexport interface JobSpec extends JobSpecSiteOverrideOneOf {\n /**\n * Site ID to read from instead of the current site.\n * @format GUID\n */\n sourceSiteId?: string;\n /**\n * Site ID to write to instead of the current site.\n * @format GUID\n */\n destinationSiteId?: string;\n /** Source to read data from. */\n source?: Source;\n /** Destination to write data to. */\n destination?: Destination;\n}\n\n/** @oneof */\nexport interface JobSpecSiteOverrideOneOf {\n /**\n * Site ID to read from instead of the current site.\n * @format GUID\n */\n sourceSiteId?: string;\n /**\n * Site ID to write to instead of the current site.\n * @format GUID\n */\n destinationSiteId?: string;\n}\n\nexport interface Source extends SourceSourceOneOf {\n /**\n * Wix data collection.\n *\n * 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).\n */\n wixDataCollection?: WixDataSource;\n /**\n * Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n *\n * Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).\n */\n localization?: LocalizationSource;\n /**\n * Source file.\n *\n * You can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n *\n * 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:\n *\n * `curl --request PUT --upload-file \"${path_to_file}\" \"${uploadUrl}\"`\n */\n file?: FileSource;\n}\n\n/** @oneof */\nexport interface SourceSourceOneOf {\n /**\n * Wix data collection.\n *\n * 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).\n */\n wixDataCollection?: WixDataSource;\n /**\n * Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n *\n * Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).\n */\n localization?: LocalizationSource;\n /**\n * Source file.\n *\n * You can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n *\n * 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:\n *\n * `curl --request PUT --upload-file \"${path_to_file}\" \"${uploadUrl}\"`\n */\n file?: FileSource;\n}\n\nexport enum WixDataEnvironment {\n /** Collection's [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */\n LIVE = 'LIVE',\n /** Collection's [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */\n SANDBOX = 'SANDBOX',\n}\n\n/** @enumType */\nexport type WixDataEnvironmentWithLiterals =\n | WixDataEnvironment\n | 'LIVE'\n | 'SANDBOX';\n\nexport enum FileFormat {\n /** Unknown format. */\n UNKNOWN = 'UNKNOWN',\n /** CSV format. */\n CSV = 'CSV',\n /** JSONL format. */\n JSONL = 'JSONL',\n}\n\n/** @enumType */\nexport type FileFormatWithLiterals = FileFormat | 'UNKNOWN' | 'CSV' | 'JSONL';\n\nexport enum MediaType {\n /** All media types. */\n ALL = 'ALL',\n /** Images. */\n IMAGE = 'IMAGE',\n /** Videos. */\n VIDEO = 'VIDEO',\n /** Audio files. */\n AUDIO = 'AUDIO',\n /** Documents. */\n DOCUMENT = 'DOCUMENT',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals =\n | MediaType\n | 'ALL'\n | 'IMAGE'\n | 'VIDEO'\n | 'AUDIO'\n | 'DOCUMENT';\n\n/** Wix data collection. */\nexport interface WixDataSource {\n /**\n * ID of the data collection.\n * @minLength 1\n * @maxLength 256\n */\n collectionId?: string;\n /**\n * Filter to apply to the items. Only items that pass the filter are moved.\n *\n * Learn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /** Item fields to move. If not set, the method moves the full items. */\n fields?: string[];\n}\n\nexport interface LocalizationSource {\n /**\n * 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.\n *\n * 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.\n *\n * Learn more about [available languages in Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-languages-available).\n * @format LANGUAGE_TAG\n * @minSize 2\n * @maxSize 64\n */\n languages?: string[];\n}\n\n/**\n * File.\n *\n * 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.\n */\nexport interface FileSource {\n /** File format. If not specified, automatically determined by Wix. */\n format?: FileFormatWithLiterals;\n /**\n * File ID as returned in the `fileId` property of the Create File Upload URL method's response.\n * @maxLength 512\n */\n fileId?: string;\n /**\n * URL where the source file is uploaded. Automatically generated by Wix.\n * @readonly\n * @maxLength 2048\n */\n url?: string;\n}\n\nexport interface TestSource {\n /**\n * Discriminator value for a particular test source.\n * @maxLength 512\n */\n type?: string;\n /** Test source details. */\n details?: Record<string, any> | null;\n}\n\n/** Job logs. */\nexport interface DataMovementJobLogs {\n /**\n * ID of the job from which to export logs.\n * @format GUID\n */\n jobId?: string;\n}\n\n/** File. */\nexport interface ExternalFileSource {\n /** File format. If not specified, automatically determined by Wix. */\n format?: FileFormatWithLiterals;\n /**\n * URL where the source file is located.\n * @maxLength 2048\n * @format WEB_URL\n */\n url?: string;\n}\n\n/** Google Sheets source. */\nexport interface GoogleSheetsSource {\n /**\n * ID of the Google Sheets spreadsheet.\n * @minLength 1\n * @maxLength 256\n */\n spreadsheetId?: string;\n /**\n * Name of the sheet within the spreadsheet.\n * @maxLength 256\n */\n sheetName?: string | null;\n /**\n * Range of cells within the sheet.\n * @maxLength 256\n */\n range?: string | null;\n /**\n * Entity ID of the saved OAuth token.\n * @format GUID\n */\n oauthTokenId?: string;\n}\n\n/** Wix Media Manager source. */\nexport interface WixMediaSource {\n /**\n * ID of the source folder in the Media Manager. If not specified, all media items are included.\n * @maxLength 256\n */\n sourceFolderId?: string | null;\n}\n\n/** Exports collection structure (fields, permissions, etc.) from a site. */\nexport interface WixDataCollectionDefinitionSource {\n /**\n * IDs of collections whose definitions to read.\n * @minSize 1\n * @maxSize 1000\n * @maxLength 256\n */\n collectionIds?: string[];\n}\n\nexport interface Destination extends DestinationDestinationOneOf {\n /**\n * Wix data collection.\n *\n * 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).\n */\n wixDataCollection?: WixDataDestination;\n /**\n * Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n *\n * Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).\n */\n localization?: LocalizationDestination;\n /** Downloadable file with the moved items. */\n file?: FileDestination;\n}\n\n/** @oneof */\nexport interface DestinationDestinationOneOf {\n /**\n * Wix data collection.\n *\n * 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).\n */\n wixDataCollection?: WixDataDestination;\n /**\n * Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n *\n * Learn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).\n */\n localization?: LocalizationDestination;\n /** Downloadable file with the moved items. */\n file?: FileDestination;\n}\n\n/** Wix data collection. */\nexport interface WixDataDestination {\n /**\n * ID of the destination collection.\n * @maxLength 256\n */\n collectionId?: string;\n /**\n * When items already exist in the destination collection, the data writing policy.\n *\n * Default: `OVERWRITE`.\n */\n writePolicy?: WixDataDestinationWritePolicyWithLiterals;\n}\n\nexport enum WixDataDestinationWritePolicy {\n /** When an item with the same ID exists in the collection, overwrite it. */\n OVERWRITE = 'OVERWRITE',\n /** When an item with the same ID exists in the collection, skip it. */\n SKIP_EXISTING = 'SKIP_EXISTING',\n /** Clear the destination collection before moving data. When the job completes, the collection contains only the moved data. */\n TRUNCATE_BEFORE = 'TRUNCATE_BEFORE',\n}\n\n/** @enumType */\nexport type WixDataDestinationWritePolicyWithLiterals =\n | WixDataDestinationWritePolicy\n | 'OVERWRITE'\n | 'SKIP_EXISTING'\n | 'TRUNCATE_BEFORE';\n\nexport interface LocalizationDestination {\n /**\n * 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.\n *\n * 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.\n *\n * Learn more about [available languages in Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-languages-available).\n * @minSize 2\n * @maxSize 64\n * @format LANGUAGE_TAG\n */\n languages?: string[];\n}\n\n/** Destination file. Creates a file and generates a download URL. */\nexport interface FileDestination {\n /** File format. */\n format?: FileFormatWithLiterals;\n /**\n * File name.\n * @maxLength 512\n */\n fileName?: string | null;\n /**\n * File download URL.\n * @readonly\n * @maxLength 2048\n */\n url?: string;\n /**\n * Formatting schema for the destination file.\n *\n * When moving data to CSV files, use each field's `key` to specify the path of the data in the source item. Use each field's `display_name` property to set the header in the CSV file's first row.\n *\n * For example, a source item of the [type](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data) `Object` with the nested properties `data: {address: {city: cityName}}` can be mapped to the CSV file by specifying the field's `key` as `data.address.city` and its `display_name` as `City`.\n *\n * If the schema isn't set, the source file schema is used.\n * @internal\n */\n schema?: Schema;\n}\n\n/** Schema used to specify item format. */\nexport interface Schema {\n /**\n * Item fields to move to the destination file.\n * @maxSize 1000\n */\n fields?: Field[];\n}\n\nexport interface Field {\n /**\n * Field ID.\n *\n * 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`.\n * @maxLength 1024\n */\n key?: string;\n /**\n * Field display name.\n *\n * When moving items to CSV files, use this to set the header of the target column.\n * @maxLength 1024\n */\n displayName?: string;\n /**\n * Field data type. Default: `ANY`.\n *\n * Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data).\n */\n fieldType?: FieldTypeWithLiterals;\n}\n\nexport enum FieldType {\n /** Any data type. */\n ANY = 'ANY',\n /** String. */\n STRING = 'STRING',\n /** Number. */\n NUMBER = 'NUMBER',\n /** Boolean. */\n BOOLEAN = 'BOOLEAN',\n /** Date string in ISO 8601 date format: `YYYY-MM-DD`. */\n DATE = 'DATE',\n /** [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\"}`. */\n DATETIME = 'DATETIME',\n /** Binary file. */\n BINARY = 'BINARY',\n /** object. */\n OBJECT = 'OBJECT',\n /** Array. */\n ARRAY = 'ARRAY',\n /** Web URL. */\n URL = 'URL',\n WIX_MEDIA_URL = 'WIX_MEDIA_URL',\n WIX_MEDIA_IMAGE_URL = 'WIX_MEDIA_IMAGE_URL',\n WIX_MEDIA_VIDEO_URL = 'WIX_MEDIA_VIDEO_URL',\n WIX_MEDIA_DOCUMENT_URL = 'WIX_MEDIA_DOCUMENT_URL',\n IMAGE_URL = 'IMAGE_URL',\n VIDEO_URL = 'VIDEO_URL',\n}\n\n/** @enumType */\nexport type FieldTypeWithLiterals =\n | FieldType\n | 'ANY'\n | 'STRING'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'BINARY'\n | 'OBJECT'\n | 'ARRAY'\n | 'URL'\n | 'WIX_MEDIA_URL'\n | 'WIX_MEDIA_IMAGE_URL'\n | 'WIX_MEDIA_VIDEO_URL'\n | 'WIX_MEDIA_DOCUMENT_URL'\n | 'IMAGE_URL'\n | 'VIDEO_URL';\n\nexport interface StoresCatalogProductsDestination {}\n\n/** Wix Media Manager destination. */\nexport interface WixMediaDestination {\n /**\n * ID of the target folder in the Media Manager. If not specified, media is imported to the root folder.\n * @maxLength 256\n */\n targetFolderId?: string | null;\n}\n\nexport enum WixMediaDestinationWritePolicy {\n /** Overwrite existing media with the same name. */\n OVERWRITE = 'OVERWRITE',\n /** Skip media that already exists. */\n SKIP_EXISTING = 'SKIP_EXISTING',\n}\n\n/** @enumType */\nexport type WixMediaDestinationWritePolicyWithLiterals =\n | WixMediaDestinationWritePolicy\n | 'OVERWRITE'\n | 'SKIP_EXISTING';\n\n/** Creates empty Wix data collections (no data items are inserted). */\nexport interface WixDataCollectionDefinitionDestination {\n /** Policy for handling collections that already exist on the target site. */\n writePolicy?: WritePolicyWithLiterals;\n}\n\nexport enum WritePolicy {\n /** Only create new collections. Skip collections that already exist on the target site. */\n SKIP_EXISTING = 'SKIP_EXISTING',\n /** Create new collections and overwrite existing ones. */\n OVERWRITE = 'OVERWRITE',\n}\n\n/** @enumType */\nexport type WritePolicyWithLiterals =\n | WritePolicy\n | 'SKIP_EXISTING'\n | 'OVERWRITE';\n\nexport interface TestDestination {\n /**\n * Discriminator value for a particular test destination.\n * @maxLength 512\n */\n type?: string;\n /** Test destination details. */\n details?: Record<string, any> | null;\n}\n\nexport interface Transformation extends TransformationTransformationOneOf {}\n\n/** @oneof */\nexport interface TransformationTransformationOneOf {}\n\nexport interface TestTransformation {}\n\n/** Create workflow request. */\nexport interface CreateWorkflowRequest {\n /** Workflow to create. */\n workflow: Workflow;\n}\n\n/** Create workflow response. */\nexport interface CreateWorkflowResponse {\n /** Created workflow. */\n workflow?: Workflow;\n}\n\n/** Get workflow request. */\nexport interface GetWorkflowRequest {\n /**\n * ID of the workflow to retrieve.\n * @format GUID\n */\n workflowId: string;\n}\n\n/** Get workflow response. */\nexport interface GetWorkflowResponse {\n /** Retrieved workflow. */\n workflow?: Workflow;\n}\n\n/** Query workflows request. */\nexport interface QueryWorkflowsRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor paging options. */\n cursorPaging?: CursorPaging;\n /** Filter object. */\n filter?: Record<string, any> | null;\n /**\n * Sort fields.\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor paging options. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 100\n */\n limit?: number | null;\n /**\n * Cursor token from a previous response.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\n/** Query workflows response. */\nexport interface QueryWorkflowsResponse {\n /** Matching workflows. */\n workflows?: Workflow[];\n /** Cursor paging metadata for the current result set. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the current page. */\n count?: number | null;\n /** Cursor values for navigating between pages. */\n cursors?: Cursors;\n /** Whether another page can be retrieved. */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor pointing to the next page.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\n/** Terminate workflow request. */\nexport interface TerminateWorkflowRequest {\n /**\n * ID of the workflow to terminate.\n * @format GUID\n */\n workflowId: string;\n}\n\n/** Terminate workflow response. */\nexport interface TerminateWorkflowResponse {\n /** Terminated workflow. */\n workflow?: Workflow;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface WorkflowCreatedEnvelope {\n entity: Workflow;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Data Mover Manage Jobs\n * @permissionScopeId SCOPE.DC-DATA.MANAGE_MOVEMENT_JOBS\n * @permissionId hub:v1:workflow:get_workflow\n * @webhook\n * @eventType wix.hub.v1.workflow_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onWorkflowCreated(\n handler: (event: WorkflowCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface WorkflowUpdatedEnvelope {\n entity: Workflow;\n metadata: EventMetadata;\n}\n\n/** @permissionScope Data Mover Manage Jobs\n * @permissionScopeId SCOPE.DC-DATA.MANAGE_MOVEMENT_JOBS\n * @permissionId hub:v1:workflow:get_workflow\n * @webhook\n * @eventType wix.hub.v1.workflow_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onWorkflowUpdated(\n handler: (event: WorkflowUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a workflow and persists its immutable execution plan.\n * @param workflow - Workflow to create.\n * @public\n * @documentationMaturity preview\n * @requiredField workflow\n * @requiredField workflow.specs\n * @permissionId hub:v1:workflow:create_workflow\n * @applicableIdentity APP\n * @returns Created workflow.\n * @fqn wix.hub.v1.DataMovementWorkflowService.CreateWorkflow\n */\nexport async function createWorkflow(\n workflow: NonNullablePaths<Workflow, `specs`, 2>\n): Promise<\n NonNullablePaths<\n Workflow,\n | `_id`\n | `status`\n | `specs`\n | `specs.${number}.sourceSiteId`\n | `specs.${number}.destinationSiteId`\n | `specs.${number}.source.wixDataCollection.collectionId`\n | `specs.${number}.source.file.format`\n | `specs.${number}.source.file.fileId`\n | `specs.${number}.source.file.url`\n | `specs.${number}.destination.wixDataCollection.collectionId`\n | `specs.${number}.destination.wixDataCollection.writePolicy`\n | `specs.${number}.destination.file.format`\n | `specs.${number}.destination.file.url`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ workflow: workflow });\n\n const reqOpts = ambassadorWixHubV1Workflow.createWorkflow(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.workflow!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { workflow: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['workflow']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a workflow by ID.\n * @param workflowId - ID of the workflow to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField workflowId\n * @permissionId hub:v1:workflow:get_workflow\n * @applicableIdentity APP\n * @returns Retrieved workflow.\n * @fqn wix.hub.v1.DataMovementWorkflowService.GetWorkflow\n */\nexport async function getWorkflow(\n workflowId: string\n): Promise<\n NonNullablePaths<\n Workflow,\n | `_id`\n | `status`\n | `specs`\n | `specs.${number}.sourceSiteId`\n | `specs.${number}.destinationSiteId`\n | `specs.${number}.source.wixDataCollection.collectionId`\n | `specs.${number}.source.file.format`\n | `specs.${number}.source.file.fileId`\n | `specs.${number}.source.file.url`\n | `specs.${number}.destination.wixDataCollection.collectionId`\n | `specs.${number}.destination.wixDataCollection.writePolicy`\n | `specs.${number}.destination.file.format`\n | `specs.${number}.destination.file.url`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n workflowId: workflowId,\n });\n\n const reqOpts = ambassadorWixHubV1Workflow.getWorkflow(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.workflow!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { workflowId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['workflowId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Queries workflows using cursor paging, filtering, and sorting.\n * @public\n * @documentationMaturity preview\n * @permissionId hub:v1:workflow:query_workflows\n * @applicableIdentity APP\n * @fqn wix.hub.v1.DataMovementWorkflowService.QueryWorkflows\n */\nexport function queryWorkflows(): WorkflowsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Workflow,\n 'CURSOR',\n QueryWorkflowsRequest,\n QueryWorkflowsResponse\n >({\n func: async (payload: QueryWorkflowsRequest) => {\n const reqOpts = ambassadorWixHubV1Workflow.queryWorkflows(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryWorkflowsRequest['query']) => {\n const args = [query, {}] as [QueryWorkflowsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryWorkflowsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.workflows,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface WorkflowsQueryResult extends QueryCursorResult {\n items: Workflow[];\n query: WorkflowsQueryBuilder;\n next: () => Promise<WorkflowsQueryResult>;\n prev: () => Promise<WorkflowsQueryResult>;\n}\n\nexport interface WorkflowsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_id' | '_createdDate' | '_updatedDate',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (propertyName: '_id', value: string) => WorkflowsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status',\n value: any[]\n ) => WorkflowsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status',\n value: any\n ) => WorkflowsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status',\n value: boolean\n ) => WorkflowsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'status'>\n ) => WorkflowsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'status'>\n ) => WorkflowsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => WorkflowsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => WorkflowsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<WorkflowsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.hub.v1.DataMovementWorkflowService.QueryWorkflows\n * @requiredField query\n * @returns Query workflows response.\n */\nexport async function typedQueryWorkflows(\n query: WorkflowQuery\n): Promise<\n NonNullablePaths<\n QueryWorkflowsResponse,\n `workflows` | `workflows.${number}._id` | `workflows.${number}.status`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixHubV1Workflow.queryWorkflows(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface WorkflowQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_createdDate', '_id', '_updatedDate', 'status'];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Workflow,\n WorkflowQuerySpec\n>;\nexport type WorkflowQuery = {\n /** \n Cursor paging options. \n */\n cursorPaging?: {\n /** \n Maximum number of items to return. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Cursor token from a previous response. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object. \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort fields. \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<Workflow, WorkflowQuerySpec, WorkflowQuery>(),\n },\n};\n\n/**\n * Terminates a workflow and prevents further step creation.\n * @param workflowId - ID of the workflow to terminate.\n * @public\n * @documentationMaturity preview\n * @requiredField workflowId\n * @permissionId hub:v1:workflow:terminate_workflow\n * @applicableIdentity APP\n * @returns Terminate workflow response.\n * @fqn wix.hub.v1.DataMovementWorkflowService.TerminateWorkflow\n */\nexport async function terminateWorkflow(\n workflowId: string\n): Promise<\n NonNullablePaths<\n TerminateWorkflowResponse,\n | `workflow._id`\n | `workflow.status`\n | `workflow.specs`\n | `workflow.specs.${number}.sourceSiteId`\n | `workflow.specs.${number}.destinationSiteId`\n | `workflow.specs.${number}.source.wixDataCollection.collectionId`\n | `workflow.specs.${number}.source.file.format`\n | `workflow.specs.${number}.source.file.fileId`\n | `workflow.specs.${number}.source.file.url`\n | `workflow.specs.${number}.destination.wixDataCollection.collectionId`\n | `workflow.specs.${number}.destination.wixDataCollection.writePolicy`\n | `workflow.specs.${number}.destination.file.format`\n | `workflow.specs.${number}.destination.file.url`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n workflowId: workflowId,\n });\n\n const reqOpts = ambassadorWixHubV1Workflow.terminateWorkflow(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { workflowId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['workflowId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixHubV1DataMovementWorkflowServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/wix-data-hub-workflow',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/wix-data-hub-workflow',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/wix-data-hub-workflow',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/wix-data-hub-workflow',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/wix-data-hub-workflow',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/wix-data-hub-workflow',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_movement-workflows';\n\n/** Creates a workflow and persists its immutable execution plan. */\nexport function createWorkflow(payload: object): RequestOptionsFactory<any> {\n function __createWorkflow({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'workflow.createdDate' },\n { path: 'workflow.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.hub.v1.workflow',\n method: 'POST' as any,\n methodFqn: 'wix.hub.v1.DataMovementWorkflowService.CreateWorkflow',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixHubV1DataMovementWorkflowServiceUrl({\n protoPath: '/v1/workflows',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'workflow.createdDate' },\n { path: 'workflow.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createWorkflow;\n}\n\n/** Retrieves a workflow by ID. */\nexport function getWorkflow(payload: object): RequestOptionsFactory<any> {\n function __getWorkflow({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.hub.v1.workflow',\n method: 'GET' as any,\n methodFqn: 'wix.hub.v1.DataMovementWorkflowService.GetWorkflow',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixHubV1DataMovementWorkflowServiceUrl({\n protoPath: '/v1/workflows/{workflowId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'workflow.createdDate' },\n { path: 'workflow.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWorkflow;\n}\n\n/** Queries workflows using cursor paging, filtering, and sorting. */\nexport function queryWorkflows(payload: object): RequestOptionsFactory<any> {\n function __queryWorkflows({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.hub.v1.workflow',\n method: 'GET' as any,\n methodFqn: 'wix.hub.v1.DataMovementWorkflowService.QueryWorkflows',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixHubV1DataMovementWorkflowServiceUrl({\n protoPath: '/v1/workflows/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'workflows.createdDate' },\n { path: 'workflows.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixHubV1DataMovementWorkflowServiceUrl({\n protoPath: '/v1/workflows/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryWorkflows;\n}\n\n/** Terminates a workflow and prevents further step creation. */\nexport function terminateWorkflow(payload: object): RequestOptionsFactory<any> {\n function __terminateWorkflow({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.hub.v1.workflow',\n method: 'POST' as any,\n methodFqn: 'wix.hub.v1.DataMovementWorkflowService.TerminateWorkflow',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixHubV1DataMovementWorkflowServiceUrl({\n protoPath: '/v1/workflows/{workflowId}/terminate',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'workflow.createdDate' },\n { path: 'workflow.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __terminateWorkflow;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,eAAe,SAA6C;AAC1E,WAAS,iBAAi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SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,YAAY,OAAO;AAAA,QAC/C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,YAAY;AAAA,IACf;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","Status","WixDataEnvironment","FileFormat","MediaType","WixDataDestinationWritePolicy","FieldType","WixMediaDestinationWritePolicy","WritePolicy","SortOrder","WebhookIdentityType","createWorkflow","getWorkflow","queryWorkflows","terminateWorkflow"]}