@lokalise/maestro-expert-tenant-lib 1.4.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.
@@ -0,0 +1,741 @@
1
+ import z, { z as z$1 } from 'zod';
2
+ import { WorkflowLayout, WorkflowLayoutStep, WorkflowLayoutStepSettings, WorkflowLayoutStepSettingsList, WorkflowLayoutStepTriggerList, WorkflowLayoutStepTriggerEvent } from '@lokalise/maestro-common';
3
+
4
+ declare const METADATA_FIELDS: z.ZodEnum<["targetLanguageIds", "error"]>;
5
+ declare const TRIGGER_TYPE: z.ZodEnum<["Manual", "Scheduled", "Automated"]>;
6
+ declare const WORKFLOW_STATUS: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
7
+ declare const API_ERROR: z.ZodObject<{
8
+ message: z.ZodString;
9
+ errorCode: z.ZodString;
10
+ details: z.ZodOptional<z.ZodAny>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ errorCode: string;
13
+ message: string;
14
+ details?: any;
15
+ }, {
16
+ errorCode: string;
17
+ message: string;
18
+ details?: any;
19
+ }>;
20
+ declare const GET_WORKFLOW_PARAMS: z.ZodObject<{
21
+ groupId: z.ZodString;
22
+ workflowId: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ groupId: string;
25
+ workflowId: string;
26
+ }, {
27
+ groupId: string;
28
+ workflowId: string;
29
+ }>;
30
+ declare const WORKFLOW: z.ZodObject<{
31
+ id: z.ZodString;
32
+ version: z.ZodNumber;
33
+ status: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
34
+ title: z.ZodString;
35
+ triggerType: z.ZodEnum<["Manual", "Scheduled", "Automated"]>;
36
+ targetLanguageIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
37
+ error: z.ZodNullable<z.ZodOptional<z.ZodObject<{
38
+ message: z.ZodString;
39
+ errorCode: z.ZodString;
40
+ details: z.ZodOptional<z.ZodAny>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ errorCode: string;
43
+ message: string;
44
+ details?: any;
45
+ }, {
46
+ errorCode: string;
47
+ message: string;
48
+ details?: any;
49
+ }>>>;
50
+ createdAt: z.ZodString;
51
+ updatedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
52
+ publishedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
53
+ triggeredAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
54
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
57
+ id: string;
58
+ version: number;
59
+ title: string;
60
+ triggerType: "Manual" | "Scheduled" | "Automated";
61
+ createdAt: string;
62
+ targetLanguageIds?: string[] | null | undefined;
63
+ error?: {
64
+ errorCode: string;
65
+ message: string;
66
+ details?: any;
67
+ } | null | undefined;
68
+ updatedAt?: string | null | undefined;
69
+ publishedAt?: string | null | undefined;
70
+ triggeredAt?: string | null | undefined;
71
+ metadata?: Record<string, unknown> | null | undefined;
72
+ }, {
73
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
74
+ id: string;
75
+ version: number;
76
+ title: string;
77
+ triggerType: "Manual" | "Scheduled" | "Automated";
78
+ createdAt: string;
79
+ targetLanguageIds?: string[] | null | undefined;
80
+ error?: {
81
+ errorCode: string;
82
+ message: string;
83
+ details?: any;
84
+ } | null | undefined;
85
+ updatedAt?: string | null | undefined;
86
+ publishedAt?: string | null | undefined;
87
+ triggeredAt?: string | null | undefined;
88
+ metadata?: Record<string, unknown> | null | undefined;
89
+ }>;
90
+ declare const WORKFLOW_EXTENDED_SCHEMA: z.ZodArray<z.ZodObject<{
91
+ id: z.ZodString;
92
+ type: z.ZodEnum<["trigger_step", "review_task_step", "translate_task_step", "end_step"]>;
93
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
94
+ }, "strip", z.ZodTypeAny, {
95
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
96
+ values: Record<string, unknown>;
97
+ id: string;
98
+ }, {
99
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
100
+ values: Record<string, unknown>;
101
+ id: string;
102
+ }>, "many">;
103
+ declare const WORKFLOW_EXTENDED: z.ZodObject<{
104
+ id: z.ZodString;
105
+ groupId: z.ZodString;
106
+ version: z.ZodNumber;
107
+ status: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
108
+ title: z.ZodString;
109
+ schema: z.ZodArray<z.ZodObject<{
110
+ id: z.ZodString;
111
+ type: z.ZodEnum<["trigger_step", "review_task_step", "translate_task_step", "end_step"]>;
112
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
115
+ values: Record<string, unknown>;
116
+ id: string;
117
+ }, {
118
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
119
+ values: Record<string, unknown>;
120
+ id: string;
121
+ }>, "many">;
122
+ createdAt: z.ZodString;
123
+ updatedAt: z.ZodOptional<z.ZodString>;
124
+ publishedAt: z.ZodOptional<z.ZodString>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
127
+ id: string;
128
+ groupId: string;
129
+ version: number;
130
+ title: string;
131
+ createdAt: string;
132
+ schema: {
133
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
134
+ values: Record<string, unknown>;
135
+ id: string;
136
+ }[];
137
+ updatedAt?: string | undefined;
138
+ publishedAt?: string | undefined;
139
+ }, {
140
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
141
+ id: string;
142
+ groupId: string;
143
+ version: number;
144
+ title: string;
145
+ createdAt: string;
146
+ schema: {
147
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
148
+ values: Record<string, unknown>;
149
+ id: string;
150
+ }[];
151
+ updatedAt?: string | undefined;
152
+ publishedAt?: string | undefined;
153
+ }>;
154
+ type Workflow = z.infer<typeof WORKFLOW>;
155
+ type WorkflowExtended = z.infer<typeof WORKFLOW_EXTENDED>;
156
+ type WorkflowExtendedSchema = z.infer<typeof WORKFLOW_EXTENDED_SCHEMA>;
157
+ declare const GET_WORKFLOW_RESPONSE: z.ZodObject<{
158
+ data: z.ZodObject<{
159
+ id: z.ZodString;
160
+ groupId: z.ZodString;
161
+ version: z.ZodNumber;
162
+ status: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
163
+ title: z.ZodString;
164
+ schema: z.ZodArray<z.ZodObject<{
165
+ id: z.ZodString;
166
+ type: z.ZodEnum<["trigger_step", "review_task_step", "translate_task_step", "end_step"]>;
167
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
170
+ values: Record<string, unknown>;
171
+ id: string;
172
+ }, {
173
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
174
+ values: Record<string, unknown>;
175
+ id: string;
176
+ }>, "many">;
177
+ createdAt: z.ZodString;
178
+ updatedAt: z.ZodOptional<z.ZodString>;
179
+ publishedAt: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
182
+ id: string;
183
+ groupId: string;
184
+ version: number;
185
+ title: string;
186
+ createdAt: string;
187
+ schema: {
188
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
189
+ values: Record<string, unknown>;
190
+ id: string;
191
+ }[];
192
+ updatedAt?: string | undefined;
193
+ publishedAt?: string | undefined;
194
+ }, {
195
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
196
+ id: string;
197
+ groupId: string;
198
+ version: number;
199
+ title: string;
200
+ createdAt: string;
201
+ schema: {
202
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
203
+ values: Record<string, unknown>;
204
+ id: string;
205
+ }[];
206
+ updatedAt?: string | undefined;
207
+ publishedAt?: string | undefined;
208
+ }>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ data: {
211
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
212
+ id: string;
213
+ groupId: string;
214
+ version: number;
215
+ title: string;
216
+ createdAt: string;
217
+ schema: {
218
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
219
+ values: Record<string, unknown>;
220
+ id: string;
221
+ }[];
222
+ updatedAt?: string | undefined;
223
+ publishedAt?: string | undefined;
224
+ };
225
+ }, {
226
+ data: {
227
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
228
+ id: string;
229
+ groupId: string;
230
+ version: number;
231
+ title: string;
232
+ createdAt: string;
233
+ schema: {
234
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
235
+ values: Record<string, unknown>;
236
+ id: string;
237
+ }[];
238
+ updatedAt?: string | undefined;
239
+ publishedAt?: string | undefined;
240
+ };
241
+ }>;
242
+ declare const GET_WORKFLOW_LIST_PARAMS: z.ZodObject<{
243
+ groupId: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ groupId: string;
246
+ }, {
247
+ groupId: string;
248
+ }>;
249
+ declare const GET_WORKFLOW_LIST_RESPONSE: z.ZodObject<{
250
+ data: z.ZodArray<z.ZodObject<{
251
+ id: z.ZodString;
252
+ version: z.ZodNumber;
253
+ status: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
254
+ title: z.ZodString;
255
+ triggerType: z.ZodEnum<["Manual", "Scheduled", "Automated"]>;
256
+ targetLanguageIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
257
+ error: z.ZodNullable<z.ZodOptional<z.ZodObject<{
258
+ message: z.ZodString;
259
+ errorCode: z.ZodString;
260
+ details: z.ZodOptional<z.ZodAny>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ errorCode: string;
263
+ message: string;
264
+ details?: any;
265
+ }, {
266
+ errorCode: string;
267
+ message: string;
268
+ details?: any;
269
+ }>>>;
270
+ createdAt: z.ZodString;
271
+ updatedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
272
+ publishedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
273
+ triggeredAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
274
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
277
+ id: string;
278
+ version: number;
279
+ title: string;
280
+ triggerType: "Manual" | "Scheduled" | "Automated";
281
+ createdAt: string;
282
+ targetLanguageIds?: string[] | null | undefined;
283
+ error?: {
284
+ errorCode: string;
285
+ message: string;
286
+ details?: any;
287
+ } | null | undefined;
288
+ updatedAt?: string | null | undefined;
289
+ publishedAt?: string | null | undefined;
290
+ triggeredAt?: string | null | undefined;
291
+ metadata?: Record<string, unknown> | null | undefined;
292
+ }, {
293
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
294
+ id: string;
295
+ version: number;
296
+ title: string;
297
+ triggerType: "Manual" | "Scheduled" | "Automated";
298
+ createdAt: string;
299
+ targetLanguageIds?: string[] | null | undefined;
300
+ error?: {
301
+ errorCode: string;
302
+ message: string;
303
+ details?: any;
304
+ } | null | undefined;
305
+ updatedAt?: string | null | undefined;
306
+ publishedAt?: string | null | undefined;
307
+ triggeredAt?: string | null | undefined;
308
+ metadata?: Record<string, unknown> | null | undefined;
309
+ }>, "many">;
310
+ }, "strip", z.ZodTypeAny, {
311
+ data: {
312
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
313
+ id: string;
314
+ version: number;
315
+ title: string;
316
+ triggerType: "Manual" | "Scheduled" | "Automated";
317
+ createdAt: string;
318
+ targetLanguageIds?: string[] | null | undefined;
319
+ error?: {
320
+ errorCode: string;
321
+ message: string;
322
+ details?: any;
323
+ } | null | undefined;
324
+ updatedAt?: string | null | undefined;
325
+ publishedAt?: string | null | undefined;
326
+ triggeredAt?: string | null | undefined;
327
+ metadata?: Record<string, unknown> | null | undefined;
328
+ }[];
329
+ }, {
330
+ data: {
331
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
332
+ id: string;
333
+ version: number;
334
+ title: string;
335
+ triggerType: "Manual" | "Scheduled" | "Automated";
336
+ createdAt: string;
337
+ targetLanguageIds?: string[] | null | undefined;
338
+ error?: {
339
+ errorCode: string;
340
+ message: string;
341
+ details?: any;
342
+ } | null | undefined;
343
+ updatedAt?: string | null | undefined;
344
+ publishedAt?: string | null | undefined;
345
+ triggeredAt?: string | null | undefined;
346
+ metadata?: Record<string, unknown> | null | undefined;
347
+ }[];
348
+ }>;
349
+ type GetWorkflowListParams = z.infer<typeof GET_WORKFLOW_LIST_PARAMS>;
350
+ type GetWorkflowListResponse = z.infer<typeof GET_WORKFLOW_LIST_RESPONSE>;
351
+ declare const PATCH_PAUSE_WORKFLOW_PARAMS: z.ZodObject<{
352
+ groupId: z.ZodString;
353
+ workflowId: z.ZodString;
354
+ }, "strip", z.ZodTypeAny, {
355
+ groupId: string;
356
+ workflowId: string;
357
+ }, {
358
+ groupId: string;
359
+ workflowId: string;
360
+ }>;
361
+ declare const PATCH_PAUSE_WORKFLOW_RESPONSE: z.ZodNull;
362
+ declare const PATCH_RESUME_WORKFLOW_PARAMS: z.ZodObject<{
363
+ groupId: z.ZodString;
364
+ workflowId: z.ZodString;
365
+ }, "strip", z.ZodTypeAny, {
366
+ groupId: string;
367
+ workflowId: string;
368
+ }, {
369
+ groupId: string;
370
+ workflowId: string;
371
+ }>;
372
+ declare const PATCH_RESUME_WORKFLOW_RESPONSE: z.ZodNull;
373
+ declare const POST_DUPLICATE_WORKFLOW_PARAMS: z.ZodObject<{
374
+ groupId: z.ZodString;
375
+ workflowId: z.ZodString;
376
+ }, "strip", z.ZodTypeAny, {
377
+ groupId: string;
378
+ workflowId: string;
379
+ }, {
380
+ groupId: string;
381
+ workflowId: string;
382
+ }>;
383
+ declare const POST_DUPLICATE_WORKFLOW_RESPONSE: z.ZodObject<{
384
+ data: z.ZodObject<{
385
+ id: z.ZodString;
386
+ groupId: z.ZodString;
387
+ version: z.ZodNumber;
388
+ status: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
389
+ title: z.ZodString;
390
+ schema: z.ZodArray<z.ZodObject<{
391
+ id: z.ZodString;
392
+ type: z.ZodEnum<["trigger_step", "review_task_step", "translate_task_step", "end_step"]>;
393
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
396
+ values: Record<string, unknown>;
397
+ id: string;
398
+ }, {
399
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
400
+ values: Record<string, unknown>;
401
+ id: string;
402
+ }>, "many">;
403
+ createdAt: z.ZodString;
404
+ updatedAt: z.ZodOptional<z.ZodString>;
405
+ publishedAt: z.ZodOptional<z.ZodString>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
408
+ id: string;
409
+ groupId: string;
410
+ version: number;
411
+ title: string;
412
+ createdAt: string;
413
+ schema: {
414
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
415
+ values: Record<string, unknown>;
416
+ id: string;
417
+ }[];
418
+ updatedAt?: string | undefined;
419
+ publishedAt?: string | undefined;
420
+ }, {
421
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
422
+ id: string;
423
+ groupId: string;
424
+ version: number;
425
+ title: string;
426
+ createdAt: string;
427
+ schema: {
428
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
429
+ values: Record<string, unknown>;
430
+ id: string;
431
+ }[];
432
+ updatedAt?: string | undefined;
433
+ publishedAt?: string | undefined;
434
+ }>;
435
+ }, "strip", z.ZodTypeAny, {
436
+ data: {
437
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
438
+ id: string;
439
+ groupId: string;
440
+ version: number;
441
+ title: string;
442
+ createdAt: string;
443
+ schema: {
444
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
445
+ values: Record<string, unknown>;
446
+ id: string;
447
+ }[];
448
+ updatedAt?: string | undefined;
449
+ publishedAt?: string | undefined;
450
+ };
451
+ }, {
452
+ data: {
453
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
454
+ id: string;
455
+ groupId: string;
456
+ version: number;
457
+ title: string;
458
+ createdAt: string;
459
+ schema: {
460
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
461
+ values: Record<string, unknown>;
462
+ id: string;
463
+ }[];
464
+ updatedAt?: string | undefined;
465
+ publishedAt?: string | undefined;
466
+ };
467
+ }>;
468
+ declare const DELETE_WORKFLOW_PARAMS: z.ZodObject<{
469
+ groupId: z.ZodString;
470
+ workflowId: z.ZodString;
471
+ }, "strip", z.ZodTypeAny, {
472
+ groupId: string;
473
+ workflowId: string;
474
+ }, {
475
+ groupId: string;
476
+ workflowId: string;
477
+ }>;
478
+ declare const DELETE_WORKFLOW_RESPONSE: z.ZodNull;
479
+ declare const POST_WORKFLOW_PARAMS: z.ZodObject<{
480
+ groupId: z.ZodString;
481
+ }, "strip", z.ZodTypeAny, {
482
+ groupId: string;
483
+ }, {
484
+ groupId: string;
485
+ }>;
486
+ declare const POST_WORKFLOW_BODY: z.ZodNullable<z.ZodObject<{
487
+ templateId: z.ZodOptional<z.ZodEnum<["reviewTask", "translateTask", "translateAndReviewTask"]>>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ templateId?: "reviewTask" | "translateTask" | "translateAndReviewTask" | undefined;
490
+ }, {
491
+ templateId?: "reviewTask" | "translateTask" | "translateAndReviewTask" | undefined;
492
+ }>>;
493
+ declare const POST_WORKFLOW_RESPONSE: z.ZodObject<{
494
+ data: z.ZodObject<{
495
+ id: z.ZodString;
496
+ groupId: z.ZodString;
497
+ version: z.ZodNumber;
498
+ status: z.ZodEnum<["Draft", "Live", "Archived", "Paused", "Canceled"]>;
499
+ title: z.ZodString;
500
+ schema: z.ZodArray<z.ZodObject<{
501
+ id: z.ZodString;
502
+ type: z.ZodEnum<["trigger_step", "review_task_step", "translate_task_step", "end_step"]>;
503
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
504
+ }, "strip", z.ZodTypeAny, {
505
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
506
+ values: Record<string, unknown>;
507
+ id: string;
508
+ }, {
509
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
510
+ values: Record<string, unknown>;
511
+ id: string;
512
+ }>, "many">;
513
+ createdAt: z.ZodString;
514
+ updatedAt: z.ZodOptional<z.ZodString>;
515
+ publishedAt: z.ZodOptional<z.ZodString>;
516
+ }, "strip", z.ZodTypeAny, {
517
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
518
+ id: string;
519
+ groupId: string;
520
+ version: number;
521
+ title: string;
522
+ createdAt: string;
523
+ schema: {
524
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
525
+ values: Record<string, unknown>;
526
+ id: string;
527
+ }[];
528
+ updatedAt?: string | undefined;
529
+ publishedAt?: string | undefined;
530
+ }, {
531
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
532
+ id: string;
533
+ groupId: string;
534
+ version: number;
535
+ title: string;
536
+ createdAt: string;
537
+ schema: {
538
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
539
+ values: Record<string, unknown>;
540
+ id: string;
541
+ }[];
542
+ updatedAt?: string | undefined;
543
+ publishedAt?: string | undefined;
544
+ }>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ data: {
547
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
548
+ id: string;
549
+ groupId: string;
550
+ version: number;
551
+ title: string;
552
+ createdAt: string;
553
+ schema: {
554
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
555
+ values: Record<string, unknown>;
556
+ id: string;
557
+ }[];
558
+ updatedAt?: string | undefined;
559
+ publishedAt?: string | undefined;
560
+ };
561
+ }, {
562
+ data: {
563
+ status: "Draft" | "Live" | "Archived" | "Paused" | "Canceled";
564
+ id: string;
565
+ groupId: string;
566
+ version: number;
567
+ title: string;
568
+ createdAt: string;
569
+ schema: {
570
+ type: "trigger_step" | "review_task_step" | "translate_task_step" | "end_step";
571
+ values: Record<string, unknown>;
572
+ id: string;
573
+ }[];
574
+ updatedAt?: string | undefined;
575
+ publishedAt?: string | undefined;
576
+ };
577
+ }>;
578
+ type PostWorkflowParams = z.infer<typeof POST_WORKFLOW_PARAMS>;
579
+ type PostWorkflowBody = z.infer<typeof POST_WORKFLOW_BODY>;
580
+ type PostWorkflowResponse = z.infer<typeof POST_WORKFLOW_RESPONSE>;
581
+
582
+ declare const START_KEYS_STEP_SETTINGS_SCHEMA: z$1.ZodObject<z$1.objectUtil.extendShape<{
583
+ stepType: z$1.ZodString;
584
+ }, {
585
+ name: z$1.ZodString;
586
+ description: z$1.ZodString;
587
+ autoMarkAsUnverified: z$1.ZodBoolean;
588
+ runOnSchedule: z$1.ZodBoolean;
589
+ monitoredLanguageId: z$1.ZodNumber;
590
+ targetLanguageId: z$1.ZodNumber;
591
+ monitoredKeyType: z$1.ZodEnum<["new", "updated", "both"]>;
592
+ }>, "passthrough", z$1.ZodTypeAny, z$1.objectOutputType<z$1.objectUtil.extendShape<{
593
+ stepType: z$1.ZodString;
594
+ }, {
595
+ name: z$1.ZodString;
596
+ description: z$1.ZodString;
597
+ autoMarkAsUnverified: z$1.ZodBoolean;
598
+ runOnSchedule: z$1.ZodBoolean;
599
+ monitoredLanguageId: z$1.ZodNumber;
600
+ targetLanguageId: z$1.ZodNumber;
601
+ monitoredKeyType: z$1.ZodEnum<["new", "updated", "both"]>;
602
+ }>, z$1.ZodTypeAny, "passthrough">, z$1.objectInputType<z$1.objectUtil.extendShape<{
603
+ stepType: z$1.ZodString;
604
+ }, {
605
+ name: z$1.ZodString;
606
+ description: z$1.ZodString;
607
+ autoMarkAsUnverified: z$1.ZodBoolean;
608
+ runOnSchedule: z$1.ZodBoolean;
609
+ monitoredLanguageId: z$1.ZodNumber;
610
+ targetLanguageId: z$1.ZodNumber;
611
+ monitoredKeyType: z$1.ZodEnum<["new", "updated", "both"]>;
612
+ }>, z$1.ZodTypeAny, "passthrough">>;
613
+ declare const CREATE_TASK_STEP_SETTINGS_SCHEMA: z$1.ZodObject<z$1.objectUtil.extendShape<{
614
+ stepType: z$1.ZodString;
615
+ }, {
616
+ taskType: z$1.ZodEnum<["translate", "review"]>;
617
+ dueDate: z$1.ZodUnion<[z$1.ZodNumber, z$1.ZodString]>;
618
+ }>, "passthrough", z$1.ZodTypeAny, z$1.objectOutputType<z$1.objectUtil.extendShape<{
619
+ stepType: z$1.ZodString;
620
+ }, {
621
+ taskType: z$1.ZodEnum<["translate", "review"]>;
622
+ dueDate: z$1.ZodUnion<[z$1.ZodNumber, z$1.ZodString]>;
623
+ }>, z$1.ZodTypeAny, "passthrough">, z$1.objectInputType<z$1.objectUtil.extendShape<{
624
+ stepType: z$1.ZodString;
625
+ }, {
626
+ taskType: z$1.ZodEnum<["translate", "review"]>;
627
+ dueDate: z$1.ZodUnion<[z$1.ZodNumber, z$1.ZodString]>;
628
+ }>, z$1.ZodTypeAny, "passthrough">>;
629
+ declare const CreateTaskExampleStepSettings: z$1.objectOutputType<z$1.objectUtil.extendShape<{
630
+ stepType: z$1.ZodString;
631
+ }, {
632
+ taskType: z$1.ZodEnum<["translate", "review"]>;
633
+ dueDate: z$1.ZodUnion<[z$1.ZodNumber, z$1.ZodString]>;
634
+ }>, z$1.ZodTypeAny, "passthrough">;
635
+ declare const STEP_TYPES: readonly ["trigger_step", "review_task_step", "translate_task_step", "end_step"];
636
+ type StepType = (typeof STEP_TYPES)[number];
637
+ declare const SCHEDULED_TRIGGER_STEP_SETTINGS_SCHEMA: z$1.ZodObject<z$1.objectUtil.extendShape<{
638
+ stepType: z$1.ZodString;
639
+ }, {
640
+ runOnSchedule: z$1.ZodBoolean;
641
+ monitoredKeyType: z$1.ZodEnum<["new", "updated", "both"]>;
642
+ monitoredLanguageId: z$1.ZodOptional<z$1.ZodNumber>;
643
+ targetLanguageIds: z$1.ZodArray<z$1.ZodNumber, "many">;
644
+ }>, "passthrough", z$1.ZodTypeAny, z$1.objectOutputType<z$1.objectUtil.extendShape<{
645
+ stepType: z$1.ZodString;
646
+ }, {
647
+ runOnSchedule: z$1.ZodBoolean;
648
+ monitoredKeyType: z$1.ZodEnum<["new", "updated", "both"]>;
649
+ monitoredLanguageId: z$1.ZodOptional<z$1.ZodNumber>;
650
+ targetLanguageIds: z$1.ZodArray<z$1.ZodNumber, "many">;
651
+ }>, z$1.ZodTypeAny, "passthrough">, z$1.objectInputType<z$1.objectUtil.extendShape<{
652
+ stepType: z$1.ZodString;
653
+ }, {
654
+ runOnSchedule: z$1.ZodBoolean;
655
+ monitoredKeyType: z$1.ZodEnum<["new", "updated", "both"]>;
656
+ monitoredLanguageId: z$1.ZodOptional<z$1.ZodNumber>;
657
+ targetLanguageIds: z$1.ZodArray<z$1.ZodNumber, "many">;
658
+ }>, z$1.ZodTypeAny, "passthrough">>;
659
+ type ScheduledTriggerStepSettings = z$1.infer<typeof SCHEDULED_TRIGGER_STEP_SETTINGS_SCHEMA> & {
660
+ stepType: StepType;
661
+ };
662
+ declare const SCHEDULED_TRIGGER_STEP_SETTINGS: ScheduledTriggerStepSettings;
663
+ declare const REVIEW_TASK_STEP_SETTINGS_SCHEMA: z$1.ZodObject<{
664
+ stepType: z$1.ZodString;
665
+ }, "passthrough", z$1.ZodTypeAny, z$1.objectOutputType<{
666
+ stepType: z$1.ZodString;
667
+ }, z$1.ZodTypeAny, "passthrough">, z$1.objectInputType<{
668
+ stepType: z$1.ZodString;
669
+ }, z$1.ZodTypeAny, "passthrough">>;
670
+ type ReviewTaskStepSettings = z$1.infer<typeof REVIEW_TASK_STEP_SETTINGS_SCHEMA> & {
671
+ stepType: StepType;
672
+ };
673
+ declare const REVIEW_TASK_STEP_SETTINGS: ReviewTaskStepSettings;
674
+ declare const TRANSLATE_TASK_STEP_SETTINGS_SCHEMA: z$1.ZodObject<{
675
+ stepType: z$1.ZodString;
676
+ }, "passthrough", z$1.ZodTypeAny, z$1.objectOutputType<{
677
+ stepType: z$1.ZodString;
678
+ }, z$1.ZodTypeAny, "passthrough">, z$1.objectInputType<{
679
+ stepType: z$1.ZodString;
680
+ }, z$1.ZodTypeAny, "passthrough">>;
681
+ type TranslateTaskStepSettings = z$1.infer<typeof TRANSLATE_TASK_STEP_SETTINGS_SCHEMA> & {
682
+ stepType: StepType;
683
+ };
684
+ declare const TRANSLATE_TASK_STEP_SETTINGS: TranslateTaskStepSettings;
685
+ declare const END_STEP_SETTINGS_SCHEMA: z$1.ZodObject<{
686
+ stepType: z$1.ZodString;
687
+ }, "passthrough", z$1.ZodTypeAny, z$1.objectOutputType<{
688
+ stepType: z$1.ZodString;
689
+ }, z$1.ZodTypeAny, "passthrough">, z$1.objectInputType<{
690
+ stepType: z$1.ZodString;
691
+ }, z$1.ZodTypeAny, "passthrough">>;
692
+ type EndStepSettings = z$1.infer<typeof END_STEP_SETTINGS_SCHEMA> & {
693
+ stepType: StepType;
694
+ };
695
+ declare const END_STEP_SETTINGS: EndStepSettings;
696
+
697
+ type StrictWorkflowLayoutStepTriggerEvent<StateName extends string> = WorkflowLayoutStepTriggerEvent & {
698
+ target: StateName;
699
+ };
700
+ type StrictWorkflowLayoutStepTriggerList<StateName extends string> = WorkflowLayoutStepTriggerList & {
701
+ [key: string]: StrictWorkflowLayoutStepTriggerEvent<StateName>;
702
+ };
703
+ type StrictWorkflowLayoutStep<StateName extends string> = WorkflowLayoutStep & {
704
+ on?: StrictWorkflowLayoutStepTriggerList<StateName>;
705
+ };
706
+ type StrictWorkflowLayout<StateName extends string> = WorkflowLayout & {
707
+ initial: StateName;
708
+ states: Record<StateName, StrictWorkflowLayoutStep<StateName>>;
709
+ };
710
+ type StrictWorkflowLayoutStepSettings = WorkflowLayoutStepSettings & {
711
+ stepType: StepType;
712
+ };
713
+ type StrictWorkflowLayoutStepSettingsList = WorkflowLayoutStepSettingsList & {
714
+ [key: string]: StrictWorkflowLayoutStepSettings;
715
+ };
716
+ type StrictWorkflowLayoutSettings<StateName extends string> = StrictWorkflowLayoutStepSettingsList & {
717
+ [key in StateName]: StrictWorkflowLayoutStepSettings;
718
+ };
719
+ type FrontendLayoutStep<StateName extends string> = {
720
+ id: StateName;
721
+ type: StepType;
722
+ values: Record<string, unknown>;
723
+ };
724
+ type FrontendLayout<StateName extends string> = FrontendLayoutStep<StateName>[];
725
+ type InternalTemplate<StateName extends string> = {
726
+ id: TemplateId;
727
+ title: string;
728
+ summary: string;
729
+ description: string;
730
+ layout: StrictWorkflowLayout<StateName>;
731
+ settings: StrictWorkflowLayoutSettings<StateName>;
732
+ };
733
+ type Template<StateName extends string> = InternalTemplate<StateName> & {
734
+ frontendLayout: FrontendLayout<StateName>;
735
+ };
736
+
737
+ declare const TEMPLATE_IDS: readonly ["reviewTask", "translateTask", "translateAndReviewTask"];
738
+ type TemplateId = (typeof TEMPLATE_IDS)[number];
739
+ declare const TEMPLATES: Record<TemplateId, Template<string>>;
740
+
741
+ export { API_ERROR, CREATE_TASK_STEP_SETTINGS_SCHEMA, CreateTaskExampleStepSettings, DELETE_WORKFLOW_PARAMS, DELETE_WORKFLOW_RESPONSE, END_STEP_SETTINGS, END_STEP_SETTINGS_SCHEMA, type EndStepSettings, type FrontendLayout, type FrontendLayoutStep, GET_WORKFLOW_LIST_PARAMS, GET_WORKFLOW_LIST_RESPONSE, GET_WORKFLOW_PARAMS, GET_WORKFLOW_RESPONSE, type GetWorkflowListParams, type GetWorkflowListResponse, METADATA_FIELDS, PATCH_PAUSE_WORKFLOW_PARAMS, PATCH_PAUSE_WORKFLOW_RESPONSE, PATCH_RESUME_WORKFLOW_PARAMS, PATCH_RESUME_WORKFLOW_RESPONSE, POST_DUPLICATE_WORKFLOW_PARAMS, POST_DUPLICATE_WORKFLOW_RESPONSE, POST_WORKFLOW_BODY, POST_WORKFLOW_PARAMS, POST_WORKFLOW_RESPONSE, type PostWorkflowBody, type PostWorkflowParams, type PostWorkflowResponse, REVIEW_TASK_STEP_SETTINGS, REVIEW_TASK_STEP_SETTINGS_SCHEMA, type ReviewTaskStepSettings, SCHEDULED_TRIGGER_STEP_SETTINGS, SCHEDULED_TRIGGER_STEP_SETTINGS_SCHEMA, START_KEYS_STEP_SETTINGS_SCHEMA, STEP_TYPES, type ScheduledTriggerStepSettings, type StepType, TEMPLATES, TRANSLATE_TASK_STEP_SETTINGS, TRANSLATE_TASK_STEP_SETTINGS_SCHEMA, TRIGGER_TYPE, type Template, type TemplateId, type TranslateTaskStepSettings, WORKFLOW, WORKFLOW_EXTENDED, WORKFLOW_EXTENDED_SCHEMA, WORKFLOW_STATUS, type Workflow, type WorkflowExtended, type WorkflowExtendedSchema };