@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,748 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// schemas.ts
|
|
31
|
+
var schemas_exports = {};
|
|
32
|
+
__export(schemas_exports, {
|
|
33
|
+
CreateWorkflowRequest: () => CreateWorkflowRequest,
|
|
34
|
+
CreateWorkflowResponse: () => CreateWorkflowResponse,
|
|
35
|
+
GetWorkflowRequest: () => GetWorkflowRequest,
|
|
36
|
+
GetWorkflowResponse: () => GetWorkflowResponse,
|
|
37
|
+
QueryWorkflowsRequest: () => QueryWorkflowsRequest,
|
|
38
|
+
QueryWorkflowsResponse: () => QueryWorkflowsResponse,
|
|
39
|
+
TerminateWorkflowRequest: () => TerminateWorkflowRequest,
|
|
40
|
+
TerminateWorkflowResponse: () => TerminateWorkflowResponse
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
43
|
+
|
|
44
|
+
// src/hub-v1-workflow-movement-workflows.schemas.ts
|
|
45
|
+
var z = __toESM(require("zod"));
|
|
46
|
+
var CreateWorkflowRequest = z.object({
|
|
47
|
+
workflow: z.object({
|
|
48
|
+
_id: z.string().describe("Workflow ID.").regex(
|
|
49
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
50
|
+
"Must be a valid GUID"
|
|
51
|
+
).optional(),
|
|
52
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Revision number incremented on each workflow update.").optional().nullable(),
|
|
53
|
+
_createdDate: z.date().describe("Date and time when the workflow was created.").optional().nullable(),
|
|
54
|
+
_updatedDate: z.date().describe("Date and time when the workflow was last updated.").optional().nullable(),
|
|
55
|
+
status: z.enum(["UNINITIALIZED", "RUNNING", "FINISHED"]).optional(),
|
|
56
|
+
specs: z.array(
|
|
57
|
+
z.intersection(
|
|
58
|
+
z.object({
|
|
59
|
+
source: z.intersection(
|
|
60
|
+
z.object({}),
|
|
61
|
+
z.xor([
|
|
62
|
+
z.object({
|
|
63
|
+
wixDataCollection: z.never().optional(),
|
|
64
|
+
localization: z.never().optional(),
|
|
65
|
+
file: z.never().optional()
|
|
66
|
+
}),
|
|
67
|
+
z.object({
|
|
68
|
+
localization: z.never().optional(),
|
|
69
|
+
file: z.never().optional(),
|
|
70
|
+
wixDataCollection: z.object({
|
|
71
|
+
collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
|
|
72
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
73
|
+
"Filter to apply to the items. Only items that pass the filter are moved.\n\nLearn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
74
|
+
).optional().nullable(),
|
|
75
|
+
fields: z.array(z.string()).optional()
|
|
76
|
+
}).describe(
|
|
77
|
+
"Wix data collection.\n\nYou 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)."
|
|
78
|
+
)
|
|
79
|
+
}),
|
|
80
|
+
z.object({
|
|
81
|
+
wixDataCollection: z.never().optional(),
|
|
82
|
+
file: z.never().optional(),
|
|
83
|
+
localization: z.object({
|
|
84
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
85
|
+
}).describe(
|
|
86
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
87
|
+
)
|
|
88
|
+
}),
|
|
89
|
+
z.object({
|
|
90
|
+
wixDataCollection: z.never().optional(),
|
|
91
|
+
localization: z.never().optional(),
|
|
92
|
+
file: z.object({
|
|
93
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
|
|
94
|
+
"File format. If not specified, automatically determined by Wix."
|
|
95
|
+
).optional(),
|
|
96
|
+
fileId: z.string().describe(
|
|
97
|
+
"File ID as returned in the `fileId` property of the Create File Upload URL method's response."
|
|
98
|
+
).max(512).optional(),
|
|
99
|
+
url: z.string().describe(
|
|
100
|
+
"URL where the source file is uploaded. Automatically generated by Wix."
|
|
101
|
+
).max(2048).optional()
|
|
102
|
+
}).describe(
|
|
103
|
+
'Source file.\n\nYou can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n\nTo 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}"`'
|
|
104
|
+
)
|
|
105
|
+
})
|
|
106
|
+
])
|
|
107
|
+
).describe("Source to read data from.").optional(),
|
|
108
|
+
destination: z.intersection(
|
|
109
|
+
z.object({}),
|
|
110
|
+
z.xor([
|
|
111
|
+
z.object({
|
|
112
|
+
wixDataCollection: z.never().optional(),
|
|
113
|
+
localization: z.never().optional(),
|
|
114
|
+
file: z.never().optional()
|
|
115
|
+
}),
|
|
116
|
+
z.object({
|
|
117
|
+
localization: z.never().optional(),
|
|
118
|
+
file: z.never().optional(),
|
|
119
|
+
wixDataCollection: z.object({
|
|
120
|
+
collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
|
|
121
|
+
writePolicy: z.enum([
|
|
122
|
+
"OVERWRITE",
|
|
123
|
+
"SKIP_EXISTING",
|
|
124
|
+
"TRUNCATE_BEFORE"
|
|
125
|
+
]).describe(
|
|
126
|
+
"When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
|
|
127
|
+
).optional()
|
|
128
|
+
}).describe(
|
|
129
|
+
"Wix data collection.\n\nYou 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)."
|
|
130
|
+
)
|
|
131
|
+
}),
|
|
132
|
+
z.object({
|
|
133
|
+
wixDataCollection: z.never().optional(),
|
|
134
|
+
file: z.never().optional(),
|
|
135
|
+
localization: z.object({
|
|
136
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
137
|
+
}).describe(
|
|
138
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
139
|
+
)
|
|
140
|
+
}),
|
|
141
|
+
z.object({
|
|
142
|
+
wixDataCollection: z.never().optional(),
|
|
143
|
+
localization: z.never().optional(),
|
|
144
|
+
file: z.object({
|
|
145
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
|
|
146
|
+
fileName: z.string().describe("File name.").max(512).optional().nullable(),
|
|
147
|
+
url: z.string().describe("File download URL.").max(2048).optional()
|
|
148
|
+
}).describe("Downloadable file with the moved items.")
|
|
149
|
+
})
|
|
150
|
+
])
|
|
151
|
+
).describe("Destination to write data to.").optional()
|
|
152
|
+
}),
|
|
153
|
+
z.xor([
|
|
154
|
+
z.object({
|
|
155
|
+
sourceSiteId: z.never().optional(),
|
|
156
|
+
destinationSiteId: z.never().optional()
|
|
157
|
+
}),
|
|
158
|
+
z.object({
|
|
159
|
+
destinationSiteId: z.never().optional(),
|
|
160
|
+
sourceSiteId: z.string().describe("Site ID to read from instead of the current site.").regex(
|
|
161
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
162
|
+
"Must be a valid GUID"
|
|
163
|
+
)
|
|
164
|
+
}),
|
|
165
|
+
z.object({
|
|
166
|
+
sourceSiteId: z.never().optional(),
|
|
167
|
+
destinationSiteId: z.string().describe("Site ID to write to instead of the current site.").regex(
|
|
168
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
169
|
+
"Must be a valid GUID"
|
|
170
|
+
)
|
|
171
|
+
})
|
|
172
|
+
])
|
|
173
|
+
)
|
|
174
|
+
).min(1).max(100)
|
|
175
|
+
}).describe("Workflow to create.")
|
|
176
|
+
});
|
|
177
|
+
var CreateWorkflowResponse = z.object({
|
|
178
|
+
_id: z.string().describe("Workflow ID.").regex(
|
|
179
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
180
|
+
"Must be a valid GUID"
|
|
181
|
+
).optional(),
|
|
182
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Revision number incremented on each workflow update.").optional().nullable(),
|
|
183
|
+
_createdDate: z.date().describe("Date and time when the workflow was created.").optional().nullable(),
|
|
184
|
+
_updatedDate: z.date().describe("Date and time when the workflow was last updated.").optional().nullable(),
|
|
185
|
+
status: z.enum(["UNINITIALIZED", "RUNNING", "FINISHED"]).describe("Current workflow lifecycle status.").optional(),
|
|
186
|
+
specs: z.array(
|
|
187
|
+
z.intersection(
|
|
188
|
+
z.object({
|
|
189
|
+
source: z.intersection(
|
|
190
|
+
z.object({}),
|
|
191
|
+
z.xor([
|
|
192
|
+
z.object({
|
|
193
|
+
wixDataCollection: z.never().optional(),
|
|
194
|
+
localization: z.never().optional(),
|
|
195
|
+
file: z.never().optional()
|
|
196
|
+
}),
|
|
197
|
+
z.object({
|
|
198
|
+
localization: z.never().optional(),
|
|
199
|
+
file: z.never().optional(),
|
|
200
|
+
wixDataCollection: z.object({
|
|
201
|
+
collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
|
|
202
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
203
|
+
"Filter to apply to the items. Only items that pass the filter are moved.\n\nLearn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
204
|
+
).optional().nullable(),
|
|
205
|
+
fields: z.array(z.string()).optional()
|
|
206
|
+
}).describe(
|
|
207
|
+
"Wix data collection.\n\nYou 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)."
|
|
208
|
+
)
|
|
209
|
+
}),
|
|
210
|
+
z.object({
|
|
211
|
+
wixDataCollection: z.never().optional(),
|
|
212
|
+
file: z.never().optional(),
|
|
213
|
+
localization: z.object({
|
|
214
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
215
|
+
}).describe(
|
|
216
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
217
|
+
)
|
|
218
|
+
}),
|
|
219
|
+
z.object({
|
|
220
|
+
wixDataCollection: z.never().optional(),
|
|
221
|
+
localization: z.never().optional(),
|
|
222
|
+
file: z.object({
|
|
223
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
|
|
224
|
+
"File format. If not specified, automatically determined by Wix."
|
|
225
|
+
).optional(),
|
|
226
|
+
fileId: z.string().describe(
|
|
227
|
+
"File ID as returned in the `fileId` property of the Create File Upload URL method's response."
|
|
228
|
+
).max(512).optional(),
|
|
229
|
+
url: z.string().describe(
|
|
230
|
+
"URL where the source file is uploaded. Automatically generated by Wix."
|
|
231
|
+
).max(2048).optional()
|
|
232
|
+
}).describe(
|
|
233
|
+
'Source file.\n\nYou can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n\nTo 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}"`'
|
|
234
|
+
)
|
|
235
|
+
})
|
|
236
|
+
])
|
|
237
|
+
).describe("Source to read data from.").optional(),
|
|
238
|
+
destination: z.intersection(
|
|
239
|
+
z.object({}),
|
|
240
|
+
z.xor([
|
|
241
|
+
z.object({
|
|
242
|
+
wixDataCollection: z.never().optional(),
|
|
243
|
+
localization: z.never().optional(),
|
|
244
|
+
file: z.never().optional()
|
|
245
|
+
}),
|
|
246
|
+
z.object({
|
|
247
|
+
localization: z.never().optional(),
|
|
248
|
+
file: z.never().optional(),
|
|
249
|
+
wixDataCollection: z.object({
|
|
250
|
+
collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
|
|
251
|
+
writePolicy: z.enum(["OVERWRITE", "SKIP_EXISTING", "TRUNCATE_BEFORE"]).describe(
|
|
252
|
+
"When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
|
|
253
|
+
).optional()
|
|
254
|
+
}).describe(
|
|
255
|
+
"Wix data collection.\n\nYou 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)."
|
|
256
|
+
)
|
|
257
|
+
}),
|
|
258
|
+
z.object({
|
|
259
|
+
wixDataCollection: z.never().optional(),
|
|
260
|
+
file: z.never().optional(),
|
|
261
|
+
localization: z.object({
|
|
262
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
263
|
+
}).describe(
|
|
264
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
265
|
+
)
|
|
266
|
+
}),
|
|
267
|
+
z.object({
|
|
268
|
+
wixDataCollection: z.never().optional(),
|
|
269
|
+
localization: z.never().optional(),
|
|
270
|
+
file: z.object({
|
|
271
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
|
|
272
|
+
fileName: z.string().describe("File name.").max(512).optional().nullable(),
|
|
273
|
+
url: z.string().describe("File download URL.").max(2048).optional()
|
|
274
|
+
}).describe("Downloadable file with the moved items.")
|
|
275
|
+
})
|
|
276
|
+
])
|
|
277
|
+
).describe("Destination to write data to.").optional()
|
|
278
|
+
}),
|
|
279
|
+
z.xor([
|
|
280
|
+
z.object({
|
|
281
|
+
sourceSiteId: z.never().optional(),
|
|
282
|
+
destinationSiteId: z.never().optional()
|
|
283
|
+
}),
|
|
284
|
+
z.object({
|
|
285
|
+
destinationSiteId: z.never().optional(),
|
|
286
|
+
sourceSiteId: z.string().describe("Site ID to read from instead of the current site.").regex(
|
|
287
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
288
|
+
"Must be a valid GUID"
|
|
289
|
+
)
|
|
290
|
+
}),
|
|
291
|
+
z.object({
|
|
292
|
+
sourceSiteId: z.never().optional(),
|
|
293
|
+
destinationSiteId: z.string().describe("Site ID to write to instead of the current site.").regex(
|
|
294
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
295
|
+
"Must be a valid GUID"
|
|
296
|
+
)
|
|
297
|
+
})
|
|
298
|
+
])
|
|
299
|
+
)
|
|
300
|
+
).min(1).max(100).optional()
|
|
301
|
+
});
|
|
302
|
+
var GetWorkflowRequest = z.object({
|
|
303
|
+
workflowId: z.string().describe("ID of the workflow to retrieve.").regex(
|
|
304
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
305
|
+
"Must be a valid GUID"
|
|
306
|
+
)
|
|
307
|
+
});
|
|
308
|
+
var GetWorkflowResponse = z.object({
|
|
309
|
+
_id: z.string().describe("Workflow ID.").regex(
|
|
310
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
311
|
+
"Must be a valid GUID"
|
|
312
|
+
).optional(),
|
|
313
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Revision number incremented on each workflow update.").optional().nullable(),
|
|
314
|
+
_createdDate: z.date().describe("Date and time when the workflow was created.").optional().nullable(),
|
|
315
|
+
_updatedDate: z.date().describe("Date and time when the workflow was last updated.").optional().nullable(),
|
|
316
|
+
status: z.enum(["UNINITIALIZED", "RUNNING", "FINISHED"]).describe("Current workflow lifecycle status.").optional(),
|
|
317
|
+
specs: z.array(
|
|
318
|
+
z.intersection(
|
|
319
|
+
z.object({
|
|
320
|
+
source: z.intersection(
|
|
321
|
+
z.object({}),
|
|
322
|
+
z.xor([
|
|
323
|
+
z.object({
|
|
324
|
+
wixDataCollection: z.never().optional(),
|
|
325
|
+
localization: z.never().optional(),
|
|
326
|
+
file: z.never().optional()
|
|
327
|
+
}),
|
|
328
|
+
z.object({
|
|
329
|
+
localization: z.never().optional(),
|
|
330
|
+
file: z.never().optional(),
|
|
331
|
+
wixDataCollection: z.object({
|
|
332
|
+
collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
|
|
333
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
334
|
+
"Filter to apply to the items. Only items that pass the filter are moved.\n\nLearn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
335
|
+
).optional().nullable(),
|
|
336
|
+
fields: z.array(z.string()).optional()
|
|
337
|
+
}).describe(
|
|
338
|
+
"Wix data collection.\n\nYou 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)."
|
|
339
|
+
)
|
|
340
|
+
}),
|
|
341
|
+
z.object({
|
|
342
|
+
wixDataCollection: z.never().optional(),
|
|
343
|
+
file: z.never().optional(),
|
|
344
|
+
localization: z.object({
|
|
345
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
346
|
+
}).describe(
|
|
347
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
348
|
+
)
|
|
349
|
+
}),
|
|
350
|
+
z.object({
|
|
351
|
+
wixDataCollection: z.never().optional(),
|
|
352
|
+
localization: z.never().optional(),
|
|
353
|
+
file: z.object({
|
|
354
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
|
|
355
|
+
"File format. If not specified, automatically determined by Wix."
|
|
356
|
+
).optional(),
|
|
357
|
+
fileId: z.string().describe(
|
|
358
|
+
"File ID as returned in the `fileId` property of the Create File Upload URL method's response."
|
|
359
|
+
).max(512).optional(),
|
|
360
|
+
url: z.string().describe(
|
|
361
|
+
"URL where the source file is uploaded. Automatically generated by Wix."
|
|
362
|
+
).max(2048).optional()
|
|
363
|
+
}).describe(
|
|
364
|
+
'Source file.\n\nYou can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n\nTo 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}"`'
|
|
365
|
+
)
|
|
366
|
+
})
|
|
367
|
+
])
|
|
368
|
+
).describe("Source to read data from.").optional(),
|
|
369
|
+
destination: z.intersection(
|
|
370
|
+
z.object({}),
|
|
371
|
+
z.xor([
|
|
372
|
+
z.object({
|
|
373
|
+
wixDataCollection: z.never().optional(),
|
|
374
|
+
localization: z.never().optional(),
|
|
375
|
+
file: z.never().optional()
|
|
376
|
+
}),
|
|
377
|
+
z.object({
|
|
378
|
+
localization: z.never().optional(),
|
|
379
|
+
file: z.never().optional(),
|
|
380
|
+
wixDataCollection: z.object({
|
|
381
|
+
collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
|
|
382
|
+
writePolicy: z.enum(["OVERWRITE", "SKIP_EXISTING", "TRUNCATE_BEFORE"]).describe(
|
|
383
|
+
"When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
|
|
384
|
+
).optional()
|
|
385
|
+
}).describe(
|
|
386
|
+
"Wix data collection.\n\nYou 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)."
|
|
387
|
+
)
|
|
388
|
+
}),
|
|
389
|
+
z.object({
|
|
390
|
+
wixDataCollection: z.never().optional(),
|
|
391
|
+
file: z.never().optional(),
|
|
392
|
+
localization: z.object({
|
|
393
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
394
|
+
}).describe(
|
|
395
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
396
|
+
)
|
|
397
|
+
}),
|
|
398
|
+
z.object({
|
|
399
|
+
wixDataCollection: z.never().optional(),
|
|
400
|
+
localization: z.never().optional(),
|
|
401
|
+
file: z.object({
|
|
402
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
|
|
403
|
+
fileName: z.string().describe("File name.").max(512).optional().nullable(),
|
|
404
|
+
url: z.string().describe("File download URL.").max(2048).optional()
|
|
405
|
+
}).describe("Downloadable file with the moved items.")
|
|
406
|
+
})
|
|
407
|
+
])
|
|
408
|
+
).describe("Destination to write data to.").optional()
|
|
409
|
+
}),
|
|
410
|
+
z.xor([
|
|
411
|
+
z.object({
|
|
412
|
+
sourceSiteId: z.never().optional(),
|
|
413
|
+
destinationSiteId: z.never().optional()
|
|
414
|
+
}),
|
|
415
|
+
z.object({
|
|
416
|
+
destinationSiteId: z.never().optional(),
|
|
417
|
+
sourceSiteId: z.string().describe("Site ID to read from instead of the current site.").regex(
|
|
418
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
419
|
+
"Must be a valid GUID"
|
|
420
|
+
)
|
|
421
|
+
}),
|
|
422
|
+
z.object({
|
|
423
|
+
sourceSiteId: z.never().optional(),
|
|
424
|
+
destinationSiteId: z.string().describe("Site ID to write to instead of the current site.").regex(
|
|
425
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
426
|
+
"Must be a valid GUID"
|
|
427
|
+
)
|
|
428
|
+
})
|
|
429
|
+
])
|
|
430
|
+
)
|
|
431
|
+
).min(1).max(100).optional()
|
|
432
|
+
});
|
|
433
|
+
var QueryWorkflowsRequest = z.object({
|
|
434
|
+
query: z.intersection(
|
|
435
|
+
z.object({
|
|
436
|
+
filter: z.record(z.string(), z.any()).describe("Filter object.").optional().nullable(),
|
|
437
|
+
sort: z.array(
|
|
438
|
+
z.object({
|
|
439
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
440
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
441
|
+
})
|
|
442
|
+
).max(5).optional()
|
|
443
|
+
}),
|
|
444
|
+
z.xor([
|
|
445
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
446
|
+
z.object({
|
|
447
|
+
cursorPaging: z.object({
|
|
448
|
+
limit: z.number().int().describe("Maximum number of items to return.").min(0).max(100).optional().nullable(),
|
|
449
|
+
cursor: z.string().describe("Cursor token from a previous response.").max(16e3).optional().nullable()
|
|
450
|
+
}).describe("Cursor paging options.")
|
|
451
|
+
})
|
|
452
|
+
])
|
|
453
|
+
).describe("Query options.")
|
|
454
|
+
});
|
|
455
|
+
var QueryWorkflowsResponse = z.object({
|
|
456
|
+
workflows: z.array(
|
|
457
|
+
z.object({
|
|
458
|
+
_id: z.string().describe("Workflow ID.").regex(
|
|
459
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
460
|
+
"Must be a valid GUID"
|
|
461
|
+
).optional(),
|
|
462
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Revision number incremented on each workflow update.").optional().nullable(),
|
|
463
|
+
_createdDate: z.date().describe("Date and time when the workflow was created.").optional().nullable(),
|
|
464
|
+
_updatedDate: z.date().describe("Date and time when the workflow was last updated.").optional().nullable(),
|
|
465
|
+
status: z.enum(["UNINITIALIZED", "RUNNING", "FINISHED"]).describe("Current workflow lifecycle status.").optional(),
|
|
466
|
+
specs: z.array(
|
|
467
|
+
z.intersection(
|
|
468
|
+
z.object({
|
|
469
|
+
source: z.intersection(
|
|
470
|
+
z.object({}),
|
|
471
|
+
z.xor([
|
|
472
|
+
z.object({
|
|
473
|
+
wixDataCollection: z.never().optional(),
|
|
474
|
+
localization: z.never().optional(),
|
|
475
|
+
file: z.never().optional()
|
|
476
|
+
}),
|
|
477
|
+
z.object({
|
|
478
|
+
localization: z.never().optional(),
|
|
479
|
+
file: z.never().optional(),
|
|
480
|
+
wixDataCollection: z.object({
|
|
481
|
+
collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
|
|
482
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
483
|
+
"Filter to apply to the items. Only items that pass the filter are moved.\n\nLearn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
484
|
+
).optional().nullable(),
|
|
485
|
+
fields: z.array(z.string()).optional()
|
|
486
|
+
}).describe(
|
|
487
|
+
"Wix data collection.\n\nYou 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)."
|
|
488
|
+
)
|
|
489
|
+
}),
|
|
490
|
+
z.object({
|
|
491
|
+
wixDataCollection: z.never().optional(),
|
|
492
|
+
file: z.never().optional(),
|
|
493
|
+
localization: z.object({
|
|
494
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
495
|
+
}).describe(
|
|
496
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
497
|
+
)
|
|
498
|
+
}),
|
|
499
|
+
z.object({
|
|
500
|
+
wixDataCollection: z.never().optional(),
|
|
501
|
+
localization: z.never().optional(),
|
|
502
|
+
file: z.object({
|
|
503
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
|
|
504
|
+
"File format. If not specified, automatically determined by Wix."
|
|
505
|
+
).optional(),
|
|
506
|
+
fileId: z.string().describe(
|
|
507
|
+
"File ID as returned in the `fileId` property of the Create File Upload URL method's response."
|
|
508
|
+
).max(512).optional(),
|
|
509
|
+
url: z.string().describe(
|
|
510
|
+
"URL where the source file is uploaded. Automatically generated by Wix."
|
|
511
|
+
).max(2048).optional()
|
|
512
|
+
}).describe(
|
|
513
|
+
'Source file.\n\nYou can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n\nTo 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}"`'
|
|
514
|
+
)
|
|
515
|
+
})
|
|
516
|
+
])
|
|
517
|
+
).describe("Source to read data from.").optional(),
|
|
518
|
+
destination: z.intersection(
|
|
519
|
+
z.object({}),
|
|
520
|
+
z.xor([
|
|
521
|
+
z.object({
|
|
522
|
+
wixDataCollection: z.never().optional(),
|
|
523
|
+
localization: z.never().optional(),
|
|
524
|
+
file: z.never().optional()
|
|
525
|
+
}),
|
|
526
|
+
z.object({
|
|
527
|
+
localization: z.never().optional(),
|
|
528
|
+
file: z.never().optional(),
|
|
529
|
+
wixDataCollection: z.object({
|
|
530
|
+
collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
|
|
531
|
+
writePolicy: z.enum([
|
|
532
|
+
"OVERWRITE",
|
|
533
|
+
"SKIP_EXISTING",
|
|
534
|
+
"TRUNCATE_BEFORE"
|
|
535
|
+
]).describe(
|
|
536
|
+
"When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
|
|
537
|
+
).optional()
|
|
538
|
+
}).describe(
|
|
539
|
+
"Wix data collection.\n\nYou 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)."
|
|
540
|
+
)
|
|
541
|
+
}),
|
|
542
|
+
z.object({
|
|
543
|
+
wixDataCollection: z.never().optional(),
|
|
544
|
+
file: z.never().optional(),
|
|
545
|
+
localization: z.object({
|
|
546
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
547
|
+
}).describe(
|
|
548
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
549
|
+
)
|
|
550
|
+
}),
|
|
551
|
+
z.object({
|
|
552
|
+
wixDataCollection: z.never().optional(),
|
|
553
|
+
localization: z.never().optional(),
|
|
554
|
+
file: z.object({
|
|
555
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
|
|
556
|
+
fileName: z.string().describe("File name.").max(512).optional().nullable(),
|
|
557
|
+
url: z.string().describe("File download URL.").max(2048).optional()
|
|
558
|
+
}).describe("Downloadable file with the moved items.")
|
|
559
|
+
})
|
|
560
|
+
])
|
|
561
|
+
).describe("Destination to write data to.").optional()
|
|
562
|
+
}),
|
|
563
|
+
z.xor([
|
|
564
|
+
z.object({
|
|
565
|
+
sourceSiteId: z.never().optional(),
|
|
566
|
+
destinationSiteId: z.never().optional()
|
|
567
|
+
}),
|
|
568
|
+
z.object({
|
|
569
|
+
destinationSiteId: z.never().optional(),
|
|
570
|
+
sourceSiteId: z.string().describe(
|
|
571
|
+
"Site ID to read from instead of the current site."
|
|
572
|
+
).regex(
|
|
573
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
574
|
+
"Must be a valid GUID"
|
|
575
|
+
)
|
|
576
|
+
}),
|
|
577
|
+
z.object({
|
|
578
|
+
sourceSiteId: z.never().optional(),
|
|
579
|
+
destinationSiteId: z.string().describe(
|
|
580
|
+
"Site ID to write to instead of the current site."
|
|
581
|
+
).regex(
|
|
582
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
583
|
+
"Must be a valid GUID"
|
|
584
|
+
)
|
|
585
|
+
})
|
|
586
|
+
])
|
|
587
|
+
)
|
|
588
|
+
).min(1).max(100).optional()
|
|
589
|
+
})
|
|
590
|
+
).optional(),
|
|
591
|
+
pagingMetadata: z.object({
|
|
592
|
+
count: z.number().int().describe("Number of items returned in the current page.").optional().nullable(),
|
|
593
|
+
cursors: z.object({
|
|
594
|
+
next: z.string().describe("Cursor pointing to the next page.").max(16e3).optional().nullable(),
|
|
595
|
+
prev: z.string().describe("Cursor pointing to the previous page.").max(16e3).optional().nullable()
|
|
596
|
+
}).describe("Cursor values for navigating between pages.").optional(),
|
|
597
|
+
hasNext: z.boolean().describe("Whether another page can be retrieved.").optional().nullable()
|
|
598
|
+
}).describe("Cursor paging metadata for the current result set.").optional()
|
|
599
|
+
});
|
|
600
|
+
var TerminateWorkflowRequest = z.object({
|
|
601
|
+
workflowId: z.string().describe("ID of the workflow to terminate.").regex(
|
|
602
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
603
|
+
"Must be a valid GUID"
|
|
604
|
+
)
|
|
605
|
+
});
|
|
606
|
+
var TerminateWorkflowResponse = z.object({
|
|
607
|
+
workflow: z.object({
|
|
608
|
+
_id: z.string().describe("Workflow ID.").regex(
|
|
609
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
610
|
+
"Must be a valid GUID"
|
|
611
|
+
).optional(),
|
|
612
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Revision number incremented on each workflow update.").optional().nullable(),
|
|
613
|
+
_createdDate: z.date().describe("Date and time when the workflow was created.").optional().nullable(),
|
|
614
|
+
_updatedDate: z.date().describe("Date and time when the workflow was last updated.").optional().nullable(),
|
|
615
|
+
status: z.enum(["UNINITIALIZED", "RUNNING", "FINISHED"]).describe("Current workflow lifecycle status.").optional(),
|
|
616
|
+
specs: z.array(
|
|
617
|
+
z.intersection(
|
|
618
|
+
z.object({
|
|
619
|
+
source: z.intersection(
|
|
620
|
+
z.object({}),
|
|
621
|
+
z.xor([
|
|
622
|
+
z.object({
|
|
623
|
+
wixDataCollection: z.never().optional(),
|
|
624
|
+
localization: z.never().optional(),
|
|
625
|
+
file: z.never().optional()
|
|
626
|
+
}),
|
|
627
|
+
z.object({
|
|
628
|
+
localization: z.never().optional(),
|
|
629
|
+
file: z.never().optional(),
|
|
630
|
+
wixDataCollection: z.object({
|
|
631
|
+
collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
|
|
632
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
633
|
+
"Filter to apply to the items. Only items that pass the filter are moved.\n\nLearn more about building a query filter using [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters)."
|
|
634
|
+
).optional().nullable(),
|
|
635
|
+
fields: z.array(z.string()).optional()
|
|
636
|
+
}).describe(
|
|
637
|
+
"Wix data collection.\n\nYou 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)."
|
|
638
|
+
)
|
|
639
|
+
}),
|
|
640
|
+
z.object({
|
|
641
|
+
wixDataCollection: z.never().optional(),
|
|
642
|
+
file: z.never().optional(),
|
|
643
|
+
localization: z.object({
|
|
644
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
645
|
+
}).describe(
|
|
646
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
647
|
+
)
|
|
648
|
+
}),
|
|
649
|
+
z.object({
|
|
650
|
+
wixDataCollection: z.never().optional(),
|
|
651
|
+
localization: z.never().optional(),
|
|
652
|
+
file: z.object({
|
|
653
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
|
|
654
|
+
"File format. If not specified, automatically determined by Wix."
|
|
655
|
+
).optional(),
|
|
656
|
+
fileId: z.string().describe(
|
|
657
|
+
"File ID as returned in the `fileId` property of the Create File Upload URL method's response."
|
|
658
|
+
).max(512).optional(),
|
|
659
|
+
url: z.string().describe(
|
|
660
|
+
"URL where the source file is uploaded. Automatically generated by Wix."
|
|
661
|
+
).max(2048).optional()
|
|
662
|
+
}).describe(
|
|
663
|
+
'Source file.\n\nYou can import data from files in CSV or JSONL formats. Uploading a file with an invalid format causes the movement job to fail.\n\nTo 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}"`'
|
|
664
|
+
)
|
|
665
|
+
})
|
|
666
|
+
])
|
|
667
|
+
).describe("Source to read data from.").optional(),
|
|
668
|
+
destination: z.intersection(
|
|
669
|
+
z.object({}),
|
|
670
|
+
z.xor([
|
|
671
|
+
z.object({
|
|
672
|
+
wixDataCollection: z.never().optional(),
|
|
673
|
+
localization: z.never().optional(),
|
|
674
|
+
file: z.never().optional()
|
|
675
|
+
}),
|
|
676
|
+
z.object({
|
|
677
|
+
localization: z.never().optional(),
|
|
678
|
+
file: z.never().optional(),
|
|
679
|
+
wixDataCollection: z.object({
|
|
680
|
+
collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
|
|
681
|
+
writePolicy: z.enum([
|
|
682
|
+
"OVERWRITE",
|
|
683
|
+
"SKIP_EXISTING",
|
|
684
|
+
"TRUNCATE_BEFORE"
|
|
685
|
+
]).describe(
|
|
686
|
+
"When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
|
|
687
|
+
).optional()
|
|
688
|
+
}).describe(
|
|
689
|
+
"Wix data collection.\n\nYou 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)."
|
|
690
|
+
)
|
|
691
|
+
}),
|
|
692
|
+
z.object({
|
|
693
|
+
wixDataCollection: z.never().optional(),
|
|
694
|
+
file: z.never().optional(),
|
|
695
|
+
localization: z.object({
|
|
696
|
+
languages: z.array(z.string()).min(2).max(64).optional()
|
|
697
|
+
}).describe(
|
|
698
|
+
"Localized CMS content. Available when the site has [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) installed.\n\nLearn more about working with [translated CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content)."
|
|
699
|
+
)
|
|
700
|
+
}),
|
|
701
|
+
z.object({
|
|
702
|
+
wixDataCollection: z.never().optional(),
|
|
703
|
+
localization: z.never().optional(),
|
|
704
|
+
file: z.object({
|
|
705
|
+
format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
|
|
706
|
+
fileName: z.string().describe("File name.").max(512).optional().nullable(),
|
|
707
|
+
url: z.string().describe("File download URL.").max(2048).optional()
|
|
708
|
+
}).describe("Downloadable file with the moved items.")
|
|
709
|
+
})
|
|
710
|
+
])
|
|
711
|
+
).describe("Destination to write data to.").optional()
|
|
712
|
+
}),
|
|
713
|
+
z.xor([
|
|
714
|
+
z.object({
|
|
715
|
+
sourceSiteId: z.never().optional(),
|
|
716
|
+
destinationSiteId: z.never().optional()
|
|
717
|
+
}),
|
|
718
|
+
z.object({
|
|
719
|
+
destinationSiteId: z.never().optional(),
|
|
720
|
+
sourceSiteId: z.string().describe("Site ID to read from instead of the current site.").regex(
|
|
721
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
722
|
+
"Must be a valid GUID"
|
|
723
|
+
)
|
|
724
|
+
}),
|
|
725
|
+
z.object({
|
|
726
|
+
sourceSiteId: z.never().optional(),
|
|
727
|
+
destinationSiteId: z.string().describe("Site ID to write to instead of the current site.").regex(
|
|
728
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
729
|
+
"Must be a valid GUID"
|
|
730
|
+
)
|
|
731
|
+
})
|
|
732
|
+
])
|
|
733
|
+
)
|
|
734
|
+
).min(1).max(100).optional()
|
|
735
|
+
}).describe("Terminated workflow.").optional()
|
|
736
|
+
});
|
|
737
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
738
|
+
0 && (module.exports = {
|
|
739
|
+
CreateWorkflowRequest,
|
|
740
|
+
CreateWorkflowResponse,
|
|
741
|
+
GetWorkflowRequest,
|
|
742
|
+
GetWorkflowResponse,
|
|
743
|
+
QueryWorkflowsRequest,
|
|
744
|
+
QueryWorkflowsResponse,
|
|
745
|
+
TerminateWorkflowRequest,
|
|
746
|
+
TerminateWorkflowResponse
|
|
747
|
+
});
|
|
748
|
+
//# sourceMappingURL=schemas.js.map
|