@wix/auto_sdk_data_scheduled-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 +98 -0
  2. package/build/cjs/index.js +723 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1035 -0
  5. package/build/cjs/index.typings.js +594 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +839 -0
  8. package/build/cjs/meta.js +531 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +595 -0
  11. package/build/cjs/schemas.js +1090 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +98 -0
  14. package/build/es/index.mjs +681 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +1035 -0
  17. package/build/es/index.typings.mjs +555 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +839 -0
  20. package/build/es/meta.mjs +489 -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 +595 -0
  24. package/build/es/schemas.mjs +1040 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +98 -0
  27. package/build/internal/cjs/index.js +723 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +1046 -0
  30. package/build/internal/cjs/index.typings.js +594 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +839 -0
  33. package/build/internal/cjs/meta.js +531 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +595 -0
  36. package/build/internal/cjs/schemas.js +1090 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +98 -0
  39. package/build/internal/es/index.mjs +681 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +1046 -0
  42. package/build/internal/es/index.typings.mjs +555 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +839 -0
  45. package/build/internal/es/meta.mjs +489 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +595 -0
  48. package/build/internal/es/schemas.mjs +1040 -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,1040 @@
1
+ // src/data-sync-v1-jobs-scheduled-workflows.schemas.ts
2
+ import * as z from "zod";
3
+ var CreateScheduledDataWorkflowRequest = z.object({
4
+ scheduledDataWorkflow: z.object({
5
+ _id: z.string().describe("Scheduled data workflow ID.").regex(
6
+ /^[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}$/,
7
+ "Must be a valid GUID"
8
+ ),
9
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
10
+ "Revision number that increments by 1 each time the scheduled data workflow updates.\nTo prevent conflicting changes, pass the current revision when updating.\n\nIgnored when creating a scheduled data workflow."
11
+ ).optional().nullable(),
12
+ name: z.string().describe("Scheduled data workflow name.").max(1024).optional(),
13
+ enabled: z.boolean().describe(
14
+ "Whether the scheduled data workflow is enabled for execution.\n\nWhen `true`, it runs according to the schedule defined by `cronExpression`. When `false`, it doesn't run."
15
+ ).optional(),
16
+ cronExpression: z.string().describe(
17
+ "[Cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) defining when the scheduled data workflow should run.\n\nUses standard 5-field cron format (minute, hour, day of month, month, day of week) in [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). Supports using `H` for minute randomization. For example, `0 2 * * *` runs daily at 2\\:00 AM UTC, or `H 2 * * *` runs daily at 2\\:XX AM UTC where XX is a random minute."
18
+ ).max(200).optional(),
19
+ lastExecutionDate: z.date().describe(
20
+ "Date and time when the scheduled data movement workflow was last run."
21
+ ).optional().nullable(),
22
+ nextExecutionDate: z.date().describe(
23
+ "Date and time when the scheduled data movement workflow is scheduled to run next.\n\nCalculated based on the cron expression and current time. Returned only when the request includes `nextScheduleExecution` in the `fields` parameter."
24
+ ).optional().nullable(),
25
+ workflow: z.object({
26
+ steps: z.array(
27
+ z.intersection(
28
+ z.object({
29
+ source: z.intersection(
30
+ z.object({}),
31
+ z.xor([
32
+ z.object({
33
+ wixDataCollection: z.never().optional(),
34
+ localization: z.never().optional(),
35
+ file: z.never().optional()
36
+ }),
37
+ z.object({
38
+ localization: z.never().optional(),
39
+ file: z.never().optional(),
40
+ wixDataCollection: z.object({
41
+ collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
42
+ filter: z.record(z.string(), z.any()).describe(
43
+ "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)."
44
+ ).optional().nullable(),
45
+ fields: z.array(z.string()).optional()
46
+ }).describe(
47
+ "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)."
48
+ )
49
+ }),
50
+ z.object({
51
+ wixDataCollection: z.never().optional(),
52
+ file: z.never().optional(),
53
+ localization: z.object({
54
+ languages: z.array(z.string()).min(2).max(64).optional()
55
+ }).describe(
56
+ "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)."
57
+ )
58
+ }),
59
+ z.object({
60
+ wixDataCollection: z.never().optional(),
61
+ localization: z.never().optional(),
62
+ file: z.object({
63
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
64
+ "File format. If not specified, automatically determined by Wix."
65
+ ).optional(),
66
+ fileId: z.string().describe(
67
+ "File ID as returned in the `fileId` property of the Create File Upload URL method's response."
68
+ ).max(512).optional(),
69
+ url: z.string().describe(
70
+ "URL where the source file is uploaded. Automatically generated by Wix."
71
+ ).max(2048).optional()
72
+ }).describe(
73
+ '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}"`'
74
+ )
75
+ })
76
+ ])
77
+ ).describe("Source to read data from.").optional(),
78
+ destination: z.intersection(
79
+ z.object({}),
80
+ z.xor([
81
+ z.object({
82
+ wixDataCollection: z.never().optional(),
83
+ localization: z.never().optional(),
84
+ file: z.never().optional()
85
+ }),
86
+ z.object({
87
+ localization: z.never().optional(),
88
+ file: z.never().optional(),
89
+ wixDataCollection: z.object({
90
+ collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
91
+ writePolicy: z.enum([
92
+ "OVERWRITE",
93
+ "SKIP_EXISTING",
94
+ "TRUNCATE_BEFORE"
95
+ ]).describe(
96
+ "When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
97
+ ).optional()
98
+ }).describe(
99
+ "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)."
100
+ )
101
+ }),
102
+ z.object({
103
+ wixDataCollection: z.never().optional(),
104
+ file: z.never().optional(),
105
+ localization: z.object({
106
+ languages: z.array(z.string()).min(2).max(64).optional()
107
+ }).describe(
108
+ "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)."
109
+ )
110
+ }),
111
+ z.object({
112
+ wixDataCollection: z.never().optional(),
113
+ localization: z.never().optional(),
114
+ file: z.object({
115
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
116
+ fileName: z.string().describe("File name.").max(512).optional().nullable(),
117
+ url: z.string().describe("File download URL.").max(2048).optional()
118
+ }).describe(
119
+ "Downloadable file with the moved items."
120
+ )
121
+ })
122
+ ])
123
+ ).describe("Destination to write data to.").optional()
124
+ }),
125
+ z.xor([
126
+ z.object({
127
+ sourceSiteId: z.never().optional(),
128
+ destinationSiteId: z.never().optional()
129
+ }),
130
+ z.object({
131
+ destinationSiteId: z.never().optional(),
132
+ sourceSiteId: z.string().describe(
133
+ "When moving data from the Wix data collection of a site other than the current site, the ID of the site to read from.\n\nBy default, the `source` site is the current site. However, you can move data from any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `source` site or a `destination` site other than the current site, but not both."
134
+ ).regex(
135
+ /^[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}$/,
136
+ "Must be a valid GUID"
137
+ )
138
+ }),
139
+ z.object({
140
+ sourceSiteId: z.never().optional(),
141
+ destinationSiteId: z.string().describe(
142
+ "When moving data to the Wix data collection of a site other than the current site, the ID of the site to write to.\n\nBy default, the `destination` site is the current site. However, you can move data to any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `destination` site or a `source` site other than the current site, but not both."
143
+ ).regex(
144
+ /^[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}$/,
145
+ "Must be a valid GUID"
146
+ )
147
+ })
148
+ ])
149
+ )
150
+ ).min(1).max(100)
151
+ }).describe(
152
+ "Ordered workflow specification describing what should run when the schedule fires."
153
+ ),
154
+ lastWorkflowId: z.string().describe(
155
+ "ID of the data movement workflow created by the most recent execution."
156
+ ).regex(
157
+ /^[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}$/,
158
+ "Must be a valid GUID"
159
+ ).optional()
160
+ }).describe("Scheduled data movement workflow to create."),
161
+ options: z.object({
162
+ fields: z.array(z.enum(["NEXT_SCHEDULE_EXECUTION"])).max(1).optional()
163
+ }).optional()
164
+ });
165
+ var CreateScheduledDataWorkflowResponse = z.object({
166
+ _id: z.string().describe("Scheduled data workflow ID.").regex(
167
+ /^[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}$/,
168
+ "Must be a valid GUID"
169
+ ).optional(),
170
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
171
+ "Revision number that increments by 1 each time the scheduled data workflow updates.\nTo prevent conflicting changes, pass the current revision when updating.\n\nIgnored when creating a scheduled data workflow."
172
+ ).optional().nullable(),
173
+ name: z.string().describe("Scheduled data workflow name.").max(1024).optional(),
174
+ enabled: z.boolean().describe(
175
+ "Whether the scheduled data workflow is enabled for execution.\n\nWhen `true`, it runs according to the schedule defined by `cronExpression`. When `false`, it doesn't run."
176
+ ).optional(),
177
+ cronExpression: z.string().describe(
178
+ "[Cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) defining when the scheduled data workflow should run.\n\nUses standard 5-field cron format (minute, hour, day of month, month, day of week) in [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). Supports using `H` for minute randomization. For example, `0 2 * * *` runs daily at 2\\:00 AM UTC, or `H 2 * * *` runs daily at 2\\:XX AM UTC where XX is a random minute."
179
+ ).max(200).optional(),
180
+ lastExecutionDate: z.date().describe(
181
+ "Date and time when the scheduled data movement workflow was last run."
182
+ ).optional().nullable(),
183
+ nextExecutionDate: z.date().describe(
184
+ "Date and time when the scheduled data movement workflow is scheduled to run next.\n\nCalculated based on the cron expression and current time. Returned only when the request includes `nextScheduleExecution` in the `fields` parameter."
185
+ ).optional().nullable(),
186
+ workflow: z.object({
187
+ steps: z.array(
188
+ z.intersection(
189
+ z.object({
190
+ source: z.intersection(
191
+ z.object({}),
192
+ z.xor([
193
+ z.object({
194
+ wixDataCollection: z.never().optional(),
195
+ localization: z.never().optional(),
196
+ file: z.never().optional()
197
+ }),
198
+ z.object({
199
+ localization: z.never().optional(),
200
+ file: z.never().optional(),
201
+ wixDataCollection: z.object({
202
+ collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
203
+ filter: z.record(z.string(), z.any()).describe(
204
+ "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)."
205
+ ).optional().nullable(),
206
+ fields: z.array(z.string()).optional()
207
+ }).describe(
208
+ "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)."
209
+ )
210
+ }),
211
+ z.object({
212
+ wixDataCollection: z.never().optional(),
213
+ file: z.never().optional(),
214
+ localization: z.object({
215
+ languages: z.array(z.string()).min(2).max(64).optional()
216
+ }).describe(
217
+ "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)."
218
+ )
219
+ }),
220
+ z.object({
221
+ wixDataCollection: z.never().optional(),
222
+ localization: z.never().optional(),
223
+ file: z.object({
224
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
225
+ "File format. If not specified, automatically determined by Wix."
226
+ ).optional(),
227
+ fileId: z.string().describe(
228
+ "File ID as returned in the `fileId` property of the Create File Upload URL method's response."
229
+ ).max(512).optional(),
230
+ url: z.string().describe(
231
+ "URL where the source file is uploaded. Automatically generated by Wix."
232
+ ).max(2048).optional()
233
+ }).describe(
234
+ '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}"`'
235
+ )
236
+ })
237
+ ])
238
+ ).describe("Source to read data from.").optional(),
239
+ destination: z.intersection(
240
+ z.object({}),
241
+ z.xor([
242
+ z.object({
243
+ wixDataCollection: z.never().optional(),
244
+ localization: z.never().optional(),
245
+ file: z.never().optional()
246
+ }),
247
+ z.object({
248
+ localization: z.never().optional(),
249
+ file: z.never().optional(),
250
+ wixDataCollection: z.object({
251
+ collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
252
+ writePolicy: z.enum([
253
+ "OVERWRITE",
254
+ "SKIP_EXISTING",
255
+ "TRUNCATE_BEFORE"
256
+ ]).describe(
257
+ "When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
258
+ ).optional()
259
+ }).describe(
260
+ "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)."
261
+ )
262
+ }),
263
+ z.object({
264
+ wixDataCollection: z.never().optional(),
265
+ file: z.never().optional(),
266
+ localization: z.object({
267
+ languages: z.array(z.string()).min(2).max(64).optional()
268
+ }).describe(
269
+ "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)."
270
+ )
271
+ }),
272
+ z.object({
273
+ wixDataCollection: z.never().optional(),
274
+ localization: z.never().optional(),
275
+ file: z.object({
276
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
277
+ fileName: z.string().describe("File name.").max(512).optional().nullable(),
278
+ url: z.string().describe("File download URL.").max(2048).optional()
279
+ }).describe("Downloadable file with the moved items.")
280
+ })
281
+ ])
282
+ ).describe("Destination to write data to.").optional()
283
+ }),
284
+ z.xor([
285
+ z.object({
286
+ sourceSiteId: z.never().optional(),
287
+ destinationSiteId: z.never().optional()
288
+ }),
289
+ z.object({
290
+ destinationSiteId: z.never().optional(),
291
+ sourceSiteId: z.string().describe(
292
+ "When moving data from the Wix data collection of a site other than the current site, the ID of the site to read from.\n\nBy default, the `source` site is the current site. However, you can move data from any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `source` site or a `destination` site other than the current site, but not both."
293
+ ).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
+ z.object({
299
+ sourceSiteId: z.never().optional(),
300
+ destinationSiteId: z.string().describe(
301
+ "When moving data to the Wix data collection of a site other than the current site, the ID of the site to write to.\n\nBy default, the `destination` site is the current site. However, you can move data to any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `destination` site or a `source` site other than the current site, but not both."
302
+ ).regex(
303
+ /^[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}$/,
304
+ "Must be a valid GUID"
305
+ )
306
+ })
307
+ ])
308
+ )
309
+ ).min(1).max(100).optional()
310
+ }).describe(
311
+ "Ordered workflow specification describing what should run when the schedule fires."
312
+ ).optional(),
313
+ lastWorkflowId: z.string().describe(
314
+ "ID of the data movement workflow created by the most recent execution."
315
+ ).regex(
316
+ /^[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}$/,
317
+ "Must be a valid GUID"
318
+ ).optional()
319
+ });
320
+ var RescheduleScheduledDataWorkflowRequest = z.object({
321
+ scheduledDataWorkflowId: z.string().describe("ID of the scheduled data movement workflow to reschedule.").regex(
322
+ /^[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}$/,
323
+ "Must be a valid GUID"
324
+ ),
325
+ options: z.object({
326
+ fields: z.array(z.enum(["NEXT_SCHEDULE_EXECUTION"])).max(1).optional()
327
+ }).optional()
328
+ });
329
+ var RescheduleScheduledDataWorkflowResponse = z.object({
330
+ nextExecutionDate: z.date().describe(
331
+ "Date and time when the scheduled data movement workflow is next scheduled to run."
332
+ ).optional().nullable()
333
+ });
334
+ var TriggerScheduledDataWorkflowNowRequest = z.object({
335
+ scheduledDataWorkflowId: z.string().describe("ID of the scheduled data movement workflow to run immediately.").regex(
336
+ /^[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}$/,
337
+ "Must be a valid GUID"
338
+ )
339
+ });
340
+ var TriggerScheduledDataWorkflowNowResponse = z.object({});
341
+ var UpdateScheduledDataWorkflowRequest = z.object({
342
+ scheduledDataWorkflow: z.object({
343
+ _id: z.string().describe("Scheduled data workflow ID.").regex(
344
+ /^[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}$/,
345
+ "Must be a valid GUID"
346
+ ).optional(),
347
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
348
+ "Revision number that increments by 1 each time the scheduled data workflow updates.\nTo prevent conflicting changes, pass the current revision when updating.\n\nIgnored when creating a scheduled data workflow."
349
+ ).optional().nullable(),
350
+ name: z.string().describe("Scheduled data workflow name.").max(1024).optional(),
351
+ enabled: z.boolean().describe(
352
+ "Whether the scheduled data workflow is enabled for execution.\n\nWhen `true`, it runs according to the schedule defined by `cronExpression`. When `false`, it doesn't run."
353
+ ).optional(),
354
+ cronExpression: z.string().describe(
355
+ "[Cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) defining when the scheduled data workflow should run.\n\nUses standard 5-field cron format (minute, hour, day of month, month, day of week) in [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). Supports using `H` for minute randomization. For example, `0 2 * * *` runs daily at 2\\:00 AM UTC, or `H 2 * * *` runs daily at 2\\:XX AM UTC where XX is a random minute."
356
+ ).max(200).optional(),
357
+ lastExecutionDate: z.date().describe(
358
+ "Date and time when the scheduled data movement workflow was last run."
359
+ ).optional().nullable(),
360
+ nextExecutionDate: z.date().describe(
361
+ "Date and time when the scheduled data movement workflow is scheduled to run next.\n\nCalculated based on the cron expression and current time. Returned only when the request includes `nextScheduleExecution` in the `fields` parameter."
362
+ ).optional().nullable(),
363
+ workflow: z.object({
364
+ steps: z.array(
365
+ z.intersection(
366
+ z.object({
367
+ source: z.intersection(
368
+ z.object({}),
369
+ z.xor([
370
+ z.object({
371
+ wixDataCollection: z.never().optional(),
372
+ localization: z.never().optional(),
373
+ file: z.never().optional()
374
+ }),
375
+ z.object({
376
+ localization: z.never().optional(),
377
+ file: z.never().optional(),
378
+ wixDataCollection: z.object({
379
+ collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
380
+ filter: z.record(z.string(), z.any()).describe(
381
+ "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)."
382
+ ).optional().nullable(),
383
+ fields: z.array(z.string()).optional()
384
+ }).describe(
385
+ "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)."
386
+ )
387
+ }),
388
+ z.object({
389
+ wixDataCollection: z.never().optional(),
390
+ file: z.never().optional(),
391
+ localization: z.object({
392
+ languages: z.array(z.string()).min(2).max(64).optional()
393
+ }).describe(
394
+ "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)."
395
+ )
396
+ }),
397
+ z.object({
398
+ wixDataCollection: z.never().optional(),
399
+ localization: z.never().optional(),
400
+ file: z.object({
401
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
402
+ "File format. If not specified, automatically determined by Wix."
403
+ ).optional(),
404
+ fileId: z.string().describe(
405
+ "File ID as returned in the `fileId` property of the Create File Upload URL method's response."
406
+ ).max(512).optional(),
407
+ url: z.string().describe(
408
+ "URL where the source file is uploaded. Automatically generated by Wix."
409
+ ).max(2048).optional()
410
+ }).describe(
411
+ '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}"`'
412
+ )
413
+ })
414
+ ])
415
+ ).describe("Source to read data from.").optional(),
416
+ destination: z.intersection(
417
+ z.object({}),
418
+ z.xor([
419
+ z.object({
420
+ wixDataCollection: z.never().optional(),
421
+ localization: z.never().optional(),
422
+ file: z.never().optional()
423
+ }),
424
+ z.object({
425
+ localization: z.never().optional(),
426
+ file: z.never().optional(),
427
+ wixDataCollection: z.object({
428
+ collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
429
+ writePolicy: z.enum([
430
+ "OVERWRITE",
431
+ "SKIP_EXISTING",
432
+ "TRUNCATE_BEFORE"
433
+ ]).describe(
434
+ "When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
435
+ ).optional()
436
+ }).describe(
437
+ "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)."
438
+ )
439
+ }),
440
+ z.object({
441
+ wixDataCollection: z.never().optional(),
442
+ file: z.never().optional(),
443
+ localization: z.object({
444
+ languages: z.array(z.string()).min(2).max(64).optional()
445
+ }).describe(
446
+ "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)."
447
+ )
448
+ }),
449
+ z.object({
450
+ wixDataCollection: z.never().optional(),
451
+ localization: z.never().optional(),
452
+ file: z.object({
453
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
454
+ fileName: z.string().describe("File name.").max(512).optional().nullable(),
455
+ url: z.string().describe("File download URL.").max(2048).optional()
456
+ }).describe(
457
+ "Downloadable file with the moved items."
458
+ )
459
+ })
460
+ ])
461
+ ).describe("Destination to write data to.").optional()
462
+ }),
463
+ z.xor([
464
+ z.object({
465
+ sourceSiteId: z.never().optional(),
466
+ destinationSiteId: z.never().optional()
467
+ }),
468
+ z.object({
469
+ destinationSiteId: z.never().optional(),
470
+ sourceSiteId: z.string().describe(
471
+ "When moving data from the Wix data collection of a site other than the current site, the ID of the site to read from.\n\nBy default, the `source` site is the current site. However, you can move data from any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `source` site or a `destination` site other than the current site, but not both."
472
+ ).regex(
473
+ /^[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}$/,
474
+ "Must be a valid GUID"
475
+ )
476
+ }),
477
+ z.object({
478
+ sourceSiteId: z.never().optional(),
479
+ destinationSiteId: z.string().describe(
480
+ "When moving data to the Wix data collection of a site other than the current site, the ID of the site to write to.\n\nBy default, the `destination` site is the current site. However, you can move data to any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `destination` site or a `source` site other than the current site, but not both."
481
+ ).regex(
482
+ /^[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}$/,
483
+ "Must be a valid GUID"
484
+ )
485
+ })
486
+ ])
487
+ )
488
+ ).min(1).max(100)
489
+ }).describe(
490
+ "Ordered workflow specification describing what should run when the schedule fires."
491
+ ),
492
+ lastWorkflowId: z.string().describe(
493
+ "ID of the data movement workflow created by the most recent execution."
494
+ ).regex(
495
+ /^[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}$/,
496
+ "Must be a valid GUID"
497
+ ).optional()
498
+ }).describe("Scheduled data movement workflow information to update."),
499
+ options: z.object({
500
+ fields: z.array(z.enum(["NEXT_SCHEDULE_EXECUTION"])).max(1).optional()
501
+ }).optional()
502
+ });
503
+ var UpdateScheduledDataWorkflowResponse = z.object({
504
+ _id: z.string().describe("Scheduled data workflow ID.").regex(
505
+ /^[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}$/,
506
+ "Must be a valid GUID"
507
+ ).optional(),
508
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
509
+ "Revision number that increments by 1 each time the scheduled data workflow updates.\nTo prevent conflicting changes, pass the current revision when updating.\n\nIgnored when creating a scheduled data workflow."
510
+ ).optional().nullable(),
511
+ name: z.string().describe("Scheduled data workflow name.").max(1024).optional(),
512
+ enabled: z.boolean().describe(
513
+ "Whether the scheduled data workflow is enabled for execution.\n\nWhen `true`, it runs according to the schedule defined by `cronExpression`. When `false`, it doesn't run."
514
+ ).optional(),
515
+ cronExpression: z.string().describe(
516
+ "[Cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) defining when the scheduled data workflow should run.\n\nUses standard 5-field cron format (minute, hour, day of month, month, day of week) in [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). Supports using `H` for minute randomization. For example, `0 2 * * *` runs daily at 2\\:00 AM UTC, or `H 2 * * *` runs daily at 2\\:XX AM UTC where XX is a random minute."
517
+ ).max(200).optional(),
518
+ lastExecutionDate: z.date().describe(
519
+ "Date and time when the scheduled data movement workflow was last run."
520
+ ).optional().nullable(),
521
+ nextExecutionDate: z.date().describe(
522
+ "Date and time when the scheduled data movement workflow is scheduled to run next.\n\nCalculated based on the cron expression and current time. Returned only when the request includes `nextScheduleExecution` in the `fields` parameter."
523
+ ).optional().nullable(),
524
+ workflow: z.object({
525
+ steps: z.array(
526
+ z.intersection(
527
+ z.object({
528
+ source: z.intersection(
529
+ z.object({}),
530
+ z.xor([
531
+ z.object({
532
+ wixDataCollection: z.never().optional(),
533
+ localization: z.never().optional(),
534
+ file: z.never().optional()
535
+ }),
536
+ z.object({
537
+ localization: z.never().optional(),
538
+ file: z.never().optional(),
539
+ wixDataCollection: z.object({
540
+ collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
541
+ filter: z.record(z.string(), z.any()).describe(
542
+ "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)."
543
+ ).optional().nullable(),
544
+ fields: z.array(z.string()).optional()
545
+ }).describe(
546
+ "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)."
547
+ )
548
+ }),
549
+ z.object({
550
+ wixDataCollection: z.never().optional(),
551
+ file: z.never().optional(),
552
+ localization: z.object({
553
+ languages: z.array(z.string()).min(2).max(64).optional()
554
+ }).describe(
555
+ "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)."
556
+ )
557
+ }),
558
+ z.object({
559
+ wixDataCollection: z.never().optional(),
560
+ localization: z.never().optional(),
561
+ file: z.object({
562
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
563
+ "File format. If not specified, automatically determined by Wix."
564
+ ).optional(),
565
+ fileId: z.string().describe(
566
+ "File ID as returned in the `fileId` property of the Create File Upload URL method's response."
567
+ ).max(512).optional(),
568
+ url: z.string().describe(
569
+ "URL where the source file is uploaded. Automatically generated by Wix."
570
+ ).max(2048).optional()
571
+ }).describe(
572
+ '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}"`'
573
+ )
574
+ })
575
+ ])
576
+ ).describe("Source to read data from.").optional(),
577
+ destination: z.intersection(
578
+ z.object({}),
579
+ z.xor([
580
+ z.object({
581
+ wixDataCollection: z.never().optional(),
582
+ localization: z.never().optional(),
583
+ file: z.never().optional()
584
+ }),
585
+ z.object({
586
+ localization: z.never().optional(),
587
+ file: z.never().optional(),
588
+ wixDataCollection: z.object({
589
+ collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
590
+ writePolicy: z.enum([
591
+ "OVERWRITE",
592
+ "SKIP_EXISTING",
593
+ "TRUNCATE_BEFORE"
594
+ ]).describe(
595
+ "When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
596
+ ).optional()
597
+ }).describe(
598
+ "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)."
599
+ )
600
+ }),
601
+ z.object({
602
+ wixDataCollection: z.never().optional(),
603
+ file: z.never().optional(),
604
+ localization: z.object({
605
+ languages: z.array(z.string()).min(2).max(64).optional()
606
+ }).describe(
607
+ "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)."
608
+ )
609
+ }),
610
+ z.object({
611
+ wixDataCollection: z.never().optional(),
612
+ localization: z.never().optional(),
613
+ file: z.object({
614
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
615
+ fileName: z.string().describe("File name.").max(512).optional().nullable(),
616
+ url: z.string().describe("File download URL.").max(2048).optional()
617
+ }).describe("Downloadable file with the moved items.")
618
+ })
619
+ ])
620
+ ).describe("Destination to write data to.").optional()
621
+ }),
622
+ z.xor([
623
+ z.object({
624
+ sourceSiteId: z.never().optional(),
625
+ destinationSiteId: z.never().optional()
626
+ }),
627
+ z.object({
628
+ destinationSiteId: z.never().optional(),
629
+ sourceSiteId: z.string().describe(
630
+ "When moving data from the Wix data collection of a site other than the current site, the ID of the site to read from.\n\nBy default, the `source` site is the current site. However, you can move data from any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `source` site or a `destination` site other than the current site, but not both."
631
+ ).regex(
632
+ /^[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}$/,
633
+ "Must be a valid GUID"
634
+ )
635
+ }),
636
+ z.object({
637
+ sourceSiteId: z.never().optional(),
638
+ destinationSiteId: z.string().describe(
639
+ "When moving data to the Wix data collection of a site other than the current site, the ID of the site to write to.\n\nBy default, the `destination` site is the current site. However, you can move data to any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `destination` site or a `source` site other than the current site, but not both."
640
+ ).regex(
641
+ /^[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}$/,
642
+ "Must be a valid GUID"
643
+ )
644
+ })
645
+ ])
646
+ )
647
+ ).min(1).max(100).optional()
648
+ }).describe(
649
+ "Ordered workflow specification describing what should run when the schedule fires."
650
+ ).optional(),
651
+ lastWorkflowId: z.string().describe(
652
+ "ID of the data movement workflow created by the most recent execution."
653
+ ).regex(
654
+ /^[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}$/,
655
+ "Must be a valid GUID"
656
+ ).optional()
657
+ });
658
+ var DeleteScheduledDataWorkflowRequest = z.object({
659
+ scheduledDataWorkflowId: z.string().describe("ID of the scheduled data movement workflow to delete.").regex(
660
+ /^[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}$/,
661
+ "Must be a valid GUID"
662
+ )
663
+ });
664
+ var DeleteScheduledDataWorkflowResponse = z.object({});
665
+ var GetScheduledDataWorkflowRequest = z.object({
666
+ scheduledDataWorkflowId: z.string().describe("ID of the scheduled data movement workflow to retrieve.").regex(
667
+ /^[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}$/,
668
+ "Must be a valid GUID"
669
+ ),
670
+ options: z.object({
671
+ fields: z.array(z.enum(["NEXT_SCHEDULE_EXECUTION"])).max(1).optional()
672
+ }).optional()
673
+ });
674
+ var GetScheduledDataWorkflowResponse = z.object({
675
+ _id: z.string().describe("Scheduled data workflow ID.").regex(
676
+ /^[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}$/,
677
+ "Must be a valid GUID"
678
+ ).optional(),
679
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
680
+ "Revision number that increments by 1 each time the scheduled data workflow updates.\nTo prevent conflicting changes, pass the current revision when updating.\n\nIgnored when creating a scheduled data workflow."
681
+ ).optional().nullable(),
682
+ name: z.string().describe("Scheduled data workflow name.").max(1024).optional(),
683
+ enabled: z.boolean().describe(
684
+ "Whether the scheduled data workflow is enabled for execution.\n\nWhen `true`, it runs according to the schedule defined by `cronExpression`. When `false`, it doesn't run."
685
+ ).optional(),
686
+ cronExpression: z.string().describe(
687
+ "[Cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) defining when the scheduled data workflow should run.\n\nUses standard 5-field cron format (minute, hour, day of month, month, day of week) in [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). Supports using `H` for minute randomization. For example, `0 2 * * *` runs daily at 2\\:00 AM UTC, or `H 2 * * *` runs daily at 2\\:XX AM UTC where XX is a random minute."
688
+ ).max(200).optional(),
689
+ lastExecutionDate: z.date().describe(
690
+ "Date and time when the scheduled data movement workflow was last run."
691
+ ).optional().nullable(),
692
+ nextExecutionDate: z.date().describe(
693
+ "Date and time when the scheduled data movement workflow is scheduled to run next.\n\nCalculated based on the cron expression and current time. Returned only when the request includes `nextScheduleExecution` in the `fields` parameter."
694
+ ).optional().nullable(),
695
+ workflow: z.object({
696
+ steps: z.array(
697
+ z.intersection(
698
+ z.object({
699
+ source: z.intersection(
700
+ z.object({}),
701
+ z.xor([
702
+ z.object({
703
+ wixDataCollection: z.never().optional(),
704
+ localization: z.never().optional(),
705
+ file: z.never().optional()
706
+ }),
707
+ z.object({
708
+ localization: z.never().optional(),
709
+ file: z.never().optional(),
710
+ wixDataCollection: z.object({
711
+ collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
712
+ filter: z.record(z.string(), z.any()).describe(
713
+ "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)."
714
+ ).optional().nullable(),
715
+ fields: z.array(z.string()).optional()
716
+ }).describe(
717
+ "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)."
718
+ )
719
+ }),
720
+ z.object({
721
+ wixDataCollection: z.never().optional(),
722
+ file: z.never().optional(),
723
+ localization: z.object({
724
+ languages: z.array(z.string()).min(2).max(64).optional()
725
+ }).describe(
726
+ "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)."
727
+ )
728
+ }),
729
+ z.object({
730
+ wixDataCollection: z.never().optional(),
731
+ localization: z.never().optional(),
732
+ file: z.object({
733
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
734
+ "File format. If not specified, automatically determined by Wix."
735
+ ).optional(),
736
+ fileId: z.string().describe(
737
+ "File ID as returned in the `fileId` property of the Create File Upload URL method's response."
738
+ ).max(512).optional(),
739
+ url: z.string().describe(
740
+ "URL where the source file is uploaded. Automatically generated by Wix."
741
+ ).max(2048).optional()
742
+ }).describe(
743
+ '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}"`'
744
+ )
745
+ })
746
+ ])
747
+ ).describe("Source to read data from.").optional(),
748
+ destination: z.intersection(
749
+ z.object({}),
750
+ z.xor([
751
+ z.object({
752
+ wixDataCollection: z.never().optional(),
753
+ localization: z.never().optional(),
754
+ file: z.never().optional()
755
+ }),
756
+ z.object({
757
+ localization: z.never().optional(),
758
+ file: z.never().optional(),
759
+ wixDataCollection: z.object({
760
+ collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
761
+ writePolicy: z.enum([
762
+ "OVERWRITE",
763
+ "SKIP_EXISTING",
764
+ "TRUNCATE_BEFORE"
765
+ ]).describe(
766
+ "When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
767
+ ).optional()
768
+ }).describe(
769
+ "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)."
770
+ )
771
+ }),
772
+ z.object({
773
+ wixDataCollection: z.never().optional(),
774
+ file: z.never().optional(),
775
+ localization: z.object({
776
+ languages: z.array(z.string()).min(2).max(64).optional()
777
+ }).describe(
778
+ "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)."
779
+ )
780
+ }),
781
+ z.object({
782
+ wixDataCollection: z.never().optional(),
783
+ localization: z.never().optional(),
784
+ file: z.object({
785
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
786
+ fileName: z.string().describe("File name.").max(512).optional().nullable(),
787
+ url: z.string().describe("File download URL.").max(2048).optional()
788
+ }).describe("Downloadable file with the moved items.")
789
+ })
790
+ ])
791
+ ).describe("Destination to write data to.").optional()
792
+ }),
793
+ z.xor([
794
+ z.object({
795
+ sourceSiteId: z.never().optional(),
796
+ destinationSiteId: z.never().optional()
797
+ }),
798
+ z.object({
799
+ destinationSiteId: z.never().optional(),
800
+ sourceSiteId: z.string().describe(
801
+ "When moving data from the Wix data collection of a site other than the current site, the ID of the site to read from.\n\nBy default, the `source` site is the current site. However, you can move data from any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `source` site or a `destination` site other than the current site, but not both."
802
+ ).regex(
803
+ /^[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}$/,
804
+ "Must be a valid GUID"
805
+ )
806
+ }),
807
+ z.object({
808
+ sourceSiteId: z.never().optional(),
809
+ destinationSiteId: z.string().describe(
810
+ "When moving data to the Wix data collection of a site other than the current site, the ID of the site to write to.\n\nBy default, the `destination` site is the current site. However, you can move data to any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `destination` site or a `source` site other than the current site, but not both."
811
+ ).regex(
812
+ /^[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}$/,
813
+ "Must be a valid GUID"
814
+ )
815
+ })
816
+ ])
817
+ )
818
+ ).min(1).max(100).optional()
819
+ }).describe(
820
+ "Ordered workflow specification describing what should run when the schedule fires."
821
+ ).optional(),
822
+ lastWorkflowId: z.string().describe(
823
+ "ID of the data movement workflow created by the most recent execution."
824
+ ).regex(
825
+ /^[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}$/,
826
+ "Must be a valid GUID"
827
+ ).optional()
828
+ });
829
+ var ListScheduledDataWorkflowsRequest = z.object({
830
+ options: z.object({
831
+ fields: z.array(z.enum(["NEXT_SCHEDULE_EXECUTION"])).max(1).optional(),
832
+ paging: z.object({
833
+ limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(100).optional().nullable(),
834
+ cursor: z.string().describe(
835
+ "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
836
+ ).max(16e3).optional().nullable()
837
+ }).describe(
838
+ "Reserved for future server-side paging support. Currently ignored."
839
+ ).optional(),
840
+ filter: z.record(z.string(), z.any()).describe(
841
+ "Reserved for future server-side filtering support. Currently ignored."
842
+ ).optional().nullable()
843
+ }).optional()
844
+ });
845
+ var ListScheduledDataWorkflowsResponse = z.object({
846
+ scheduledDataWorkflows: z.array(
847
+ z.object({
848
+ _id: z.string().describe("Scheduled data workflow ID.").regex(
849
+ /^[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}$/,
850
+ "Must be a valid GUID"
851
+ ).optional(),
852
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
853
+ "Revision number that increments by 1 each time the scheduled data workflow updates.\nTo prevent conflicting changes, pass the current revision when updating.\n\nIgnored when creating a scheduled data workflow."
854
+ ).optional().nullable(),
855
+ name: z.string().describe("Scheduled data workflow name.").max(1024).optional(),
856
+ enabled: z.boolean().describe(
857
+ "Whether the scheduled data workflow is enabled for execution.\n\nWhen `true`, it runs according to the schedule defined by `cronExpression`. When `false`, it doesn't run."
858
+ ).optional(),
859
+ cronExpression: z.string().describe(
860
+ "[Cron expression](https://en.wikipedia.org/wiki/Cron#Cron_expression) defining when the scheduled data workflow should run.\n\nUses standard 5-field cron format (minute, hour, day of month, month, day of week) in [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). Supports using `H` for minute randomization. For example, `0 2 * * *` runs daily at 2\\:00 AM UTC, or `H 2 * * *` runs daily at 2\\:XX AM UTC where XX is a random minute."
861
+ ).max(200).optional(),
862
+ lastExecutionDate: z.date().describe(
863
+ "Date and time when the scheduled data movement workflow was last run."
864
+ ).optional().nullable(),
865
+ nextExecutionDate: z.date().describe(
866
+ "Date and time when the scheduled data movement workflow is scheduled to run next.\n\nCalculated based on the cron expression and current time. Returned only when the request includes `nextScheduleExecution` in the `fields` parameter."
867
+ ).optional().nullable(),
868
+ workflow: z.object({
869
+ steps: z.array(
870
+ z.intersection(
871
+ z.object({
872
+ source: z.intersection(
873
+ z.object({}),
874
+ z.xor([
875
+ z.object({
876
+ wixDataCollection: z.never().optional(),
877
+ localization: z.never().optional(),
878
+ file: z.never().optional()
879
+ }),
880
+ z.object({
881
+ localization: z.never().optional(),
882
+ file: z.never().optional(),
883
+ wixDataCollection: z.object({
884
+ collectionId: z.string().describe("ID of the data collection.").min(1).max(256).optional(),
885
+ filter: z.record(z.string(), z.any()).describe(
886
+ "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)."
887
+ ).optional().nullable(),
888
+ fields: z.array(z.string()).optional()
889
+ }).describe(
890
+ "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)."
891
+ )
892
+ }),
893
+ z.object({
894
+ wixDataCollection: z.never().optional(),
895
+ file: z.never().optional(),
896
+ localization: z.object({
897
+ languages: z.array(z.string()).min(2).max(64).optional()
898
+ }).describe(
899
+ "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)."
900
+ )
901
+ }),
902
+ z.object({
903
+ wixDataCollection: z.never().optional(),
904
+ localization: z.never().optional(),
905
+ file: z.object({
906
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe(
907
+ "File format. If not specified, automatically determined by Wix."
908
+ ).optional(),
909
+ fileId: z.string().describe(
910
+ "File ID as returned in the `fileId` property of the Create File Upload URL method's response."
911
+ ).max(512).optional(),
912
+ url: z.string().describe(
913
+ "URL where the source file is uploaded. Automatically generated by Wix."
914
+ ).max(2048).optional()
915
+ }).describe(
916
+ '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}"`'
917
+ )
918
+ })
919
+ ])
920
+ ).describe("Source to read data from.").optional(),
921
+ destination: z.intersection(
922
+ z.object({}),
923
+ z.xor([
924
+ z.object({
925
+ wixDataCollection: z.never().optional(),
926
+ localization: z.never().optional(),
927
+ file: z.never().optional()
928
+ }),
929
+ z.object({
930
+ localization: z.never().optional(),
931
+ file: z.never().optional(),
932
+ wixDataCollection: z.object({
933
+ collectionId: z.string().describe("ID of the destination collection.").max(256).optional(),
934
+ writePolicy: z.enum([
935
+ "OVERWRITE",
936
+ "SKIP_EXISTING",
937
+ "TRUNCATE_BEFORE"
938
+ ]).describe(
939
+ "When items already exist in the destination collection, the data writing policy.\n\nDefault: `OVERWRITE`."
940
+ ).optional()
941
+ }).describe(
942
+ "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)."
943
+ )
944
+ }),
945
+ z.object({
946
+ wixDataCollection: z.never().optional(),
947
+ file: z.never().optional(),
948
+ localization: z.object({
949
+ languages: z.array(z.string()).min(2).max(64).optional()
950
+ }).describe(
951
+ "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)."
952
+ )
953
+ }),
954
+ z.object({
955
+ wixDataCollection: z.never().optional(),
956
+ localization: z.never().optional(),
957
+ file: z.object({
958
+ format: z.enum(["UNKNOWN", "CSV", "JSONL"]).describe("File format.").optional(),
959
+ fileName: z.string().describe("File name.").max(512).optional().nullable(),
960
+ url: z.string().describe("File download URL.").max(2048).optional()
961
+ }).describe(
962
+ "Downloadable file with the moved items."
963
+ )
964
+ })
965
+ ])
966
+ ).describe("Destination to write data to.").optional()
967
+ }),
968
+ z.xor([
969
+ z.object({
970
+ sourceSiteId: z.never().optional(),
971
+ destinationSiteId: z.never().optional()
972
+ }),
973
+ z.object({
974
+ destinationSiteId: z.never().optional(),
975
+ sourceSiteId: z.string().describe(
976
+ "When moving data from the Wix data collection of a site other than the current site, the ID of the site to read from.\n\nBy default, the `source` site is the current site. However, you can move data from any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `source` site or a `destination` site other than the current site, but not both."
977
+ ).regex(
978
+ /^[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}$/,
979
+ "Must be a valid GUID"
980
+ )
981
+ }),
982
+ z.object({
983
+ sourceSiteId: z.never().optional(),
984
+ destinationSiteId: z.string().describe(
985
+ "When moving data to the Wix data collection of a site other than the current site, the ID of the site to write to.\n\nBy default, the `destination` site is the current site. However, you can move data to any site in the same [Wix Account](https://support.wix.com/en/article/managing-multiple-sites-under-one-account).\n\n> **Note**: You can specify the ID of a `destination` site or a `source` site other than the current site, but not both."
986
+ ).regex(
987
+ /^[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}$/,
988
+ "Must be a valid GUID"
989
+ )
990
+ })
991
+ ])
992
+ )
993
+ ).min(1).max(100).optional()
994
+ }).describe(
995
+ "Ordered workflow specification describing what should run when the schedule fires."
996
+ ).optional(),
997
+ lastWorkflowId: z.string().describe(
998
+ "ID of the data movement workflow created by the most recent execution."
999
+ ).regex(
1000
+ /^[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}$/,
1001
+ "Must be a valid GUID"
1002
+ ).optional()
1003
+ })
1004
+ ).optional(),
1005
+ pagingMetadata: z.object({
1006
+ count: z.number().int().describe("Number of items returned in current page.").optional().nullable(),
1007
+ cursors: z.object({
1008
+ next: z.string().describe(
1009
+ "Cursor string pointing to the next page in the list of results."
1010
+ ).max(16e3).optional().nullable(),
1011
+ prev: z.string().describe(
1012
+ "Cursor pointing to the previous page in the list of results."
1013
+ ).max(16e3).optional().nullable()
1014
+ }).describe(
1015
+ "Cursor strings that point to the next page, previous page, or both."
1016
+ ).optional(),
1017
+ hasNext: z.boolean().describe(
1018
+ "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
1019
+ ).optional().nullable()
1020
+ }).describe(
1021
+ "Paging metadata, when available. Currently omitted because server-side paging is not applied."
1022
+ ).optional()
1023
+ });
1024
+ export {
1025
+ CreateScheduledDataWorkflowRequest,
1026
+ CreateScheduledDataWorkflowResponse,
1027
+ DeleteScheduledDataWorkflowRequest,
1028
+ DeleteScheduledDataWorkflowResponse,
1029
+ GetScheduledDataWorkflowRequest,
1030
+ GetScheduledDataWorkflowResponse,
1031
+ ListScheduledDataWorkflowsRequest,
1032
+ ListScheduledDataWorkflowsResponse,
1033
+ RescheduleScheduledDataWorkflowRequest,
1034
+ RescheduleScheduledDataWorkflowResponse,
1035
+ TriggerScheduledDataWorkflowNowRequest,
1036
+ TriggerScheduledDataWorkflowNowResponse,
1037
+ UpdateScheduledDataWorkflowRequest,
1038
+ UpdateScheduledDataWorkflowResponse
1039
+ };
1040
+ //# sourceMappingURL=schemas.mjs.map