@permute/sdk 0.1.1 → 0.2.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.
@@ -1,5 +1,339 @@
1
1
  // This file is generated by scripts/generate-contract.ts. Do not edit.
2
2
  export const publicApiRoutes = {
3
+ resourceRevisionsList: {
4
+ operationId: 'resourceRevisionsList',
5
+ method: 'GET',
6
+ path: '/v1/resources/{resourceId}/revisions',
7
+ scope: 'workspace',
8
+ bodySchema: null,
9
+ querySchema: null,
10
+ responseSchema: {
11
+ type: 'object',
12
+ properties: {
13
+ resourceId: {
14
+ type: 'string',
15
+ },
16
+ version: {
17
+ type: 'string',
18
+ },
19
+ draft: {
20
+ type: 'object',
21
+ properties: {
22
+ revisionId: {
23
+ type: 'string',
24
+ },
25
+ sequence: {
26
+ type: 'integer',
27
+ exclusiveMinimum: 0,
28
+ },
29
+ },
30
+ required: ['revisionId', 'sequence'],
31
+ additionalProperties: false,
32
+ nullable: true,
33
+ },
34
+ published: {
35
+ type: 'object',
36
+ properties: {
37
+ revisionId: {
38
+ type: 'string',
39
+ },
40
+ sequence: {
41
+ type: 'integer',
42
+ exclusiveMinimum: 0,
43
+ },
44
+ },
45
+ required: ['revisionId', 'sequence'],
46
+ additionalProperties: false,
47
+ nullable: true,
48
+ },
49
+ capabilities: {
50
+ type: 'object',
51
+ properties: {
52
+ history: {
53
+ type: 'boolean',
54
+ },
55
+ restore: {
56
+ type: 'boolean',
57
+ },
58
+ publish: {
59
+ type: 'boolean',
60
+ },
61
+ },
62
+ required: ['history', 'restore', 'publish'],
63
+ additionalProperties: false,
64
+ },
65
+ items: {
66
+ type: 'array',
67
+ items: {
68
+ type: 'object',
69
+ properties: {
70
+ id: {
71
+ type: 'string',
72
+ },
73
+ parentRevisionId: {
74
+ type: 'string',
75
+ nullable: true,
76
+ },
77
+ dependencyRevisionIds: {
78
+ type: 'array',
79
+ items: {
80
+ type: 'string',
81
+ },
82
+ },
83
+ actor: {
84
+ type: 'object',
85
+ properties: {
86
+ type: {
87
+ type: 'string',
88
+ enum: ['user', 'apiKey', 'system'],
89
+ },
90
+ id: {
91
+ type: 'string',
92
+ nullable: true,
93
+ },
94
+ },
95
+ required: ['type', 'id'],
96
+ additionalProperties: false,
97
+ },
98
+ message: {
99
+ type: 'string',
100
+ nullable: true,
101
+ },
102
+ createdAt: {
103
+ type: 'string',
104
+ format: 'date-time',
105
+ },
106
+ },
107
+ required: ['id', 'parentRevisionId', 'dependencyRevisionIds', 'actor', 'message', 'createdAt'],
108
+ additionalProperties: false,
109
+ },
110
+ },
111
+ },
112
+ required: ['resourceId', 'version', 'draft', 'published', 'capabilities', 'items'],
113
+ additionalProperties: false,
114
+ },
115
+ },
116
+ resourceRevisionsGet: {
117
+ operationId: 'resourceRevisionsGet',
118
+ method: 'GET',
119
+ path: '/v1/resources/{resourceId}/revisions/{revisionId}',
120
+ scope: 'workspace',
121
+ bodySchema: null,
122
+ querySchema: null,
123
+ responseSchema: {
124
+ type: 'object',
125
+ properties: {
126
+ id: {
127
+ type: 'string',
128
+ },
129
+ parentRevisionId: {
130
+ type: 'string',
131
+ nullable: true,
132
+ },
133
+ dependencyRevisionIds: {
134
+ type: 'array',
135
+ items: {
136
+ type: 'string',
137
+ },
138
+ },
139
+ actor: {
140
+ type: 'object',
141
+ properties: {
142
+ type: {
143
+ type: 'string',
144
+ enum: ['user', 'apiKey', 'system'],
145
+ },
146
+ id: {
147
+ type: 'string',
148
+ nullable: true,
149
+ },
150
+ },
151
+ required: ['type', 'id'],
152
+ additionalProperties: false,
153
+ },
154
+ message: {
155
+ type: 'string',
156
+ nullable: true,
157
+ },
158
+ createdAt: {
159
+ type: 'string',
160
+ format: 'date-time',
161
+ },
162
+ resourceId: {
163
+ type: 'string',
164
+ },
165
+ value: {
166
+ type: 'object',
167
+ additionalProperties: {},
168
+ },
169
+ },
170
+ required: [
171
+ 'id',
172
+ 'parentRevisionId',
173
+ 'dependencyRevisionIds',
174
+ 'actor',
175
+ 'message',
176
+ 'createdAt',
177
+ 'resourceId',
178
+ 'value',
179
+ ],
180
+ additionalProperties: false,
181
+ },
182
+ },
183
+ resourceRevisionsRestore: {
184
+ operationId: 'resourceRevisionsRestore',
185
+ method: 'POST',
186
+ path: '/v1/resources/{resourceId}/revisions/{revisionId}/restore',
187
+ scope: 'workspace',
188
+ bodySchema: {
189
+ type: 'object',
190
+ properties: {
191
+ expectedVersion: {
192
+ type: 'string',
193
+ minLength: 1,
194
+ },
195
+ },
196
+ required: ['expectedVersion'],
197
+ additionalProperties: false,
198
+ },
199
+ querySchema: null,
200
+ responseSchema: {
201
+ type: 'object',
202
+ properties: {
203
+ resourceId: {
204
+ type: 'string',
205
+ },
206
+ version: {
207
+ type: 'string',
208
+ },
209
+ draft: {
210
+ type: 'object',
211
+ properties: {
212
+ revisionId: {
213
+ type: 'string',
214
+ },
215
+ sequence: {
216
+ type: 'integer',
217
+ exclusiveMinimum: 0,
218
+ },
219
+ },
220
+ required: ['revisionId', 'sequence'],
221
+ additionalProperties: false,
222
+ nullable: true,
223
+ },
224
+ published: {
225
+ type: 'object',
226
+ properties: {
227
+ revisionId: {
228
+ type: 'string',
229
+ },
230
+ sequence: {
231
+ type: 'integer',
232
+ exclusiveMinimum: 0,
233
+ },
234
+ },
235
+ required: ['revisionId', 'sequence'],
236
+ additionalProperties: false,
237
+ nullable: true,
238
+ },
239
+ capabilities: {
240
+ type: 'object',
241
+ properties: {
242
+ history: {
243
+ type: 'boolean',
244
+ },
245
+ restore: {
246
+ type: 'boolean',
247
+ },
248
+ publish: {
249
+ type: 'boolean',
250
+ },
251
+ },
252
+ required: ['history', 'restore', 'publish'],
253
+ additionalProperties: false,
254
+ },
255
+ },
256
+ required: ['resourceId', 'version', 'draft', 'published', 'capabilities'],
257
+ additionalProperties: false,
258
+ },
259
+ },
260
+ resourcesPublish: {
261
+ operationId: 'resourcesPublish',
262
+ method: 'POST',
263
+ path: '/v1/resources/{resourceId}/publish',
264
+ scope: 'workspace',
265
+ bodySchema: {
266
+ type: 'object',
267
+ properties: {
268
+ expectedVersion: {
269
+ type: 'string',
270
+ minLength: 1,
271
+ },
272
+ },
273
+ required: ['expectedVersion'],
274
+ additionalProperties: false,
275
+ },
276
+ querySchema: null,
277
+ responseSchema: {
278
+ type: 'object',
279
+ properties: {
280
+ resourceId: {
281
+ type: 'string',
282
+ },
283
+ version: {
284
+ type: 'string',
285
+ },
286
+ draft: {
287
+ type: 'object',
288
+ properties: {
289
+ revisionId: {
290
+ type: 'string',
291
+ },
292
+ sequence: {
293
+ type: 'integer',
294
+ exclusiveMinimum: 0,
295
+ },
296
+ },
297
+ required: ['revisionId', 'sequence'],
298
+ additionalProperties: false,
299
+ nullable: true,
300
+ },
301
+ published: {
302
+ type: 'object',
303
+ properties: {
304
+ revisionId: {
305
+ type: 'string',
306
+ },
307
+ sequence: {
308
+ type: 'integer',
309
+ exclusiveMinimum: 0,
310
+ },
311
+ },
312
+ required: ['revisionId', 'sequence'],
313
+ additionalProperties: false,
314
+ nullable: true,
315
+ },
316
+ capabilities: {
317
+ type: 'object',
318
+ properties: {
319
+ history: {
320
+ type: 'boolean',
321
+ },
322
+ restore: {
323
+ type: 'boolean',
324
+ },
325
+ publish: {
326
+ type: 'boolean',
327
+ },
328
+ },
329
+ required: ['history', 'restore', 'publish'],
330
+ additionalProperties: false,
331
+ },
332
+ },
333
+ required: ['resourceId', 'version', 'draft', 'published', 'capabilities'],
334
+ additionalProperties: false,
335
+ },
336
+ },
3
337
  workspacesList: {
4
338
  operationId: 'workspacesList',
5
339
  method: 'GET',
@@ -237,7 +571,7 @@ export const publicApiRoutes = {
237
571
  },
238
572
  type: {
239
573
  type: 'string',
240
- enum: ['dataset', 'connector'],
574
+ enum: ['dataset', 'connector', 'database', 'report', 'dashboard', 'dataFlow', 'dataTable'],
241
575
  },
242
576
  name: {
243
577
  type: 'string',
@@ -258,19 +592,44 @@ export const publicApiRoutes = {
258
592
  fileType: {
259
593
  type: 'string',
260
594
  },
261
- },
262
- required: ['id', 'type', 'name'],
263
- additionalProperties: false,
264
- },
265
- },
266
- },
267
- required: ['items'],
268
- additionalProperties: false,
269
- },
270
- },
271
- sourcesGet: {
272
- operationId: 'sourcesGet',
273
- method: 'GET',
595
+ capabilities: {
596
+ type: 'array',
597
+ items: {
598
+ type: 'string',
599
+ enum: ['query'],
600
+ },
601
+ },
602
+ availability: {
603
+ type: 'object',
604
+ properties: {
605
+ status: {
606
+ type: 'string',
607
+ enum: ['ready', 'refreshing', 'degraded', 'preparing', 'failed'],
608
+ },
609
+ lastSuccessfulAt: {
610
+ type: 'string',
611
+ format: 'date-time',
612
+ },
613
+ reason: {
614
+ type: 'string',
615
+ },
616
+ },
617
+ required: ['status'],
618
+ additionalProperties: false,
619
+ },
620
+ },
621
+ required: ['id', 'type', 'name', 'capabilities', 'availability'],
622
+ additionalProperties: false,
623
+ },
624
+ },
625
+ },
626
+ required: ['items'],
627
+ additionalProperties: false,
628
+ },
629
+ },
630
+ sourcesGet: {
631
+ operationId: 'sourcesGet',
632
+ method: 'GET',
274
633
  path: '/v1/sources/{sourceId}',
275
634
  scope: 'workspace',
276
635
  bodySchema: null,
@@ -286,7 +645,7 @@ export const publicApiRoutes = {
286
645
  },
287
646
  type: {
288
647
  type: 'string',
289
- enum: ['dataset', 'connector'],
648
+ enum: ['dataset', 'connector', 'database', 'report', 'dashboard', 'dataFlow', 'dataTable'],
290
649
  },
291
650
  name: {
292
651
  type: 'string',
@@ -307,8 +666,33 @@ export const publicApiRoutes = {
307
666
  fileType: {
308
667
  type: 'string',
309
668
  },
669
+ capabilities: {
670
+ type: 'array',
671
+ items: {
672
+ type: 'string',
673
+ enum: ['query'],
674
+ },
675
+ },
676
+ availability: {
677
+ type: 'object',
678
+ properties: {
679
+ status: {
680
+ type: 'string',
681
+ enum: ['ready', 'refreshing', 'degraded', 'preparing', 'failed'],
682
+ },
683
+ lastSuccessfulAt: {
684
+ type: 'string',
685
+ format: 'date-time',
686
+ },
687
+ reason: {
688
+ type: 'string',
689
+ },
690
+ },
691
+ required: ['status'],
692
+ additionalProperties: false,
693
+ },
310
694
  },
311
- required: ['id', 'type', 'name'],
695
+ required: ['id', 'type', 'name', 'capabilities', 'availability'],
312
696
  additionalProperties: false,
313
697
  },
314
698
  metadata: {
@@ -375,6 +759,124 @@ export const publicApiRoutes = {
375
759
  additionalProperties: false,
376
760
  },
377
761
  },
762
+ dashboardsSourceGet: {
763
+ operationId: 'dashboardsSourceGet',
764
+ method: 'GET',
765
+ path: '/v1/dashboards/{dashboardId}/source',
766
+ scope: 'workspace',
767
+ bodySchema: null,
768
+ querySchema: null,
769
+ responseSchema: {
770
+ type: 'object',
771
+ properties: {
772
+ dashboardId: {
773
+ type: 'string',
774
+ },
775
+ resourceId: {
776
+ type: 'string',
777
+ },
778
+ source: {
779
+ type: 'string',
780
+ },
781
+ revision: {
782
+ type: 'object',
783
+ properties: {
784
+ revisionId: {
785
+ type: 'string',
786
+ minLength: 1,
787
+ },
788
+ sequence: {
789
+ type: 'integer',
790
+ exclusiveMinimum: 0,
791
+ },
792
+ },
793
+ required: ['revisionId', 'sequence'],
794
+ additionalProperties: false,
795
+ nullable: true,
796
+ },
797
+ dataRunId: {
798
+ type: 'string',
799
+ nullable: true,
800
+ },
801
+ },
802
+ required: ['dashboardId', 'resourceId', 'source', 'revision', 'dataRunId'],
803
+ additionalProperties: false,
804
+ },
805
+ },
806
+ dashboardsSourceUpdate: {
807
+ operationId: 'dashboardsSourceUpdate',
808
+ method: 'PUT',
809
+ path: '/v1/dashboards/{dashboardId}/source',
810
+ scope: 'workspace',
811
+ bodySchema: {
812
+ type: 'object',
813
+ properties: {
814
+ source: {
815
+ type: 'string',
816
+ maxLength: 200000,
817
+ },
818
+ expectedRevision: {
819
+ type: 'object',
820
+ properties: {
821
+ revisionId: {
822
+ type: 'string',
823
+ minLength: 1,
824
+ },
825
+ sequence: {
826
+ type: 'integer',
827
+ exclusiveMinimum: 0,
828
+ },
829
+ },
830
+ required: ['revisionId', 'sequence'],
831
+ additionalProperties: false,
832
+ nullable: true,
833
+ },
834
+ expectedDataRunId: {
835
+ type: 'string',
836
+ nullable: true,
837
+ },
838
+ },
839
+ required: ['source', 'expectedRevision', 'expectedDataRunId'],
840
+ additionalProperties: false,
841
+ },
842
+ querySchema: null,
843
+ responseSchema: {
844
+ type: 'object',
845
+ properties: {
846
+ dashboardId: {
847
+ type: 'string',
848
+ },
849
+ resourceId: {
850
+ type: 'string',
851
+ },
852
+ source: {
853
+ type: 'string',
854
+ },
855
+ revision: {
856
+ type: 'object',
857
+ properties: {
858
+ revisionId: {
859
+ type: 'string',
860
+ minLength: 1,
861
+ },
862
+ sequence: {
863
+ type: 'integer',
864
+ exclusiveMinimum: 0,
865
+ },
866
+ },
867
+ required: ['revisionId', 'sequence'],
868
+ additionalProperties: false,
869
+ nullable: true,
870
+ },
871
+ dataRunId: {
872
+ type: 'string',
873
+ nullable: true,
874
+ },
875
+ },
876
+ required: ['dashboardId', 'resourceId', 'source', 'revision', 'dataRunId'],
877
+ additionalProperties: false,
878
+ },
879
+ },
378
880
  datasetsCreate: {
379
881
  operationId: 'datasetsCreate',
380
882
  method: 'POST',
@@ -1031,6 +1533,47 @@ export const publicApiRoutes = {
1031
1533
  ],
1032
1534
  },
1033
1535
  },
1536
+ datasetsDelete: {
1537
+ operationId: 'datasetsDelete',
1538
+ method: 'DELETE',
1539
+ path: '/v1/datasets/{datasetId}',
1540
+ scope: 'workspace',
1541
+ bodySchema: null,
1542
+ querySchema: null,
1543
+ responseSchema: {
1544
+ type: 'object',
1545
+ properties: {
1546
+ id: {
1547
+ type: 'string',
1548
+ },
1549
+ deleted: {
1550
+ type: 'boolean',
1551
+ enum: [true],
1552
+ },
1553
+ },
1554
+ required: ['id', 'deleted'],
1555
+ additionalProperties: false,
1556
+ },
1557
+ },
1558
+ datasetsDownload: {
1559
+ operationId: 'datasetsDownload',
1560
+ method: 'GET',
1561
+ path: '/v1/datasets/{datasetId}/download',
1562
+ scope: 'workspace',
1563
+ bodySchema: null,
1564
+ querySchema: null,
1565
+ responseSchema: {
1566
+ type: 'object',
1567
+ properties: {
1568
+ url: {
1569
+ type: 'string',
1570
+ format: 'uri',
1571
+ },
1572
+ },
1573
+ required: ['url'],
1574
+ additionalProperties: false,
1575
+ },
1576
+ },
1034
1577
  datasetsWriteTables: {
1035
1578
  operationId: 'datasetsWriteTables',
1036
1579
  method: 'POST',
@@ -1448,7 +1991,7 @@ export const publicApiRoutes = {
1448
1991
  properties: {
1449
1992
  type: {
1450
1993
  type: 'string',
1451
- enum: ['text', 'table', 'web'],
1994
+ enum: ['text', 'table', 'web', 'fact'],
1452
1995
  },
1453
1996
  sourceId: {
1454
1997
  type: 'string',
@@ -1574,7 +2117,7 @@ export const publicApiRoutes = {
1574
2117
  properties: {
1575
2118
  type: {
1576
2119
  type: 'string',
1577
- enum: ['text', 'table', 'web'],
2120
+ enum: ['text', 'table', 'web', 'fact'],
1578
2121
  },
1579
2122
  sourceId: {
1580
2123
  type: 'string',
@@ -1754,4 +2297,3221 @@ export const publicApiRoutes = {
1754
2297
  additionalProperties: false,
1755
2298
  },
1756
2299
  },
2300
+ operationRunsList: {
2301
+ operationId: 'operationRunsList',
2302
+ method: 'GET',
2303
+ path: '/v1/operation-runs',
2304
+ scope: 'workspace',
2305
+ bodySchema: null,
2306
+ querySchema: {
2307
+ type: 'object',
2308
+ properties: {
2309
+ workflowId: {
2310
+ type: 'string',
2311
+ minLength: 1,
2312
+ },
2313
+ },
2314
+ required: ['workflowId'],
2315
+ additionalProperties: false,
2316
+ },
2317
+ responseSchema: {
2318
+ type: 'object',
2319
+ properties: {
2320
+ workflowId: {
2321
+ type: 'string',
2322
+ },
2323
+ status: {
2324
+ type: 'string',
2325
+ enum: ['running', 'completed', 'failed'],
2326
+ },
2327
+ completedRuns: {
2328
+ type: 'number',
2329
+ },
2330
+ failedRuns: {
2331
+ type: 'number',
2332
+ },
2333
+ pendingRuns: {
2334
+ type: 'number',
2335
+ },
2336
+ totalRuns: {
2337
+ type: 'number',
2338
+ },
2339
+ progressPct: {
2340
+ type: 'number',
2341
+ },
2342
+ startedAt: {
2343
+ type: 'string',
2344
+ format: 'date-time',
2345
+ nullable: true,
2346
+ },
2347
+ completedAt: {
2348
+ type: 'string',
2349
+ format: 'date-time',
2350
+ nullable: true,
2351
+ },
2352
+ items: {
2353
+ type: 'array',
2354
+ items: {
2355
+ type: 'object',
2356
+ properties: {
2357
+ id: {
2358
+ type: 'string',
2359
+ },
2360
+ workflowId: {
2361
+ type: 'string',
2362
+ },
2363
+ revisionId: {
2364
+ type: 'string',
2365
+ nullable: true,
2366
+ },
2367
+ status: {
2368
+ type: 'string',
2369
+ },
2370
+ createdAt: {
2371
+ type: 'string',
2372
+ format: 'date-time',
2373
+ },
2374
+ completedAt: {
2375
+ type: 'string',
2376
+ format: 'date-time',
2377
+ nullable: true,
2378
+ },
2379
+ error: {
2380
+ type: 'string',
2381
+ nullable: true,
2382
+ },
2383
+ outputDocId: {
2384
+ type: 'string',
2385
+ nullable: true,
2386
+ },
2387
+ operationId: {
2388
+ type: 'string',
2389
+ },
2390
+ },
2391
+ required: [
2392
+ 'id',
2393
+ 'workflowId',
2394
+ 'revisionId',
2395
+ 'status',
2396
+ 'createdAt',
2397
+ 'completedAt',
2398
+ 'error',
2399
+ 'outputDocId',
2400
+ 'operationId',
2401
+ ],
2402
+ additionalProperties: false,
2403
+ },
2404
+ },
2405
+ },
2406
+ required: [
2407
+ 'workflowId',
2408
+ 'status',
2409
+ 'completedRuns',
2410
+ 'failedRuns',
2411
+ 'pendingRuns',
2412
+ 'totalRuns',
2413
+ 'progressPct',
2414
+ 'startedAt',
2415
+ 'completedAt',
2416
+ 'items',
2417
+ ],
2418
+ additionalProperties: false,
2419
+ },
2420
+ },
2421
+ operationsList: {
2422
+ operationId: 'operationsList',
2423
+ method: 'GET',
2424
+ path: '/v1/operations',
2425
+ scope: 'workspace',
2426
+ bodySchema: null,
2427
+ querySchema: {
2428
+ type: 'object',
2429
+ properties: {
2430
+ kind: {
2431
+ type: 'string',
2432
+ enum: ['dataFlow', 'dataTable', 'report', 'dashboard'],
2433
+ },
2434
+ dataFlowId: {
2435
+ type: 'string',
2436
+ minLength: 1,
2437
+ },
2438
+ },
2439
+ required: [],
2440
+ additionalProperties: false,
2441
+ },
2442
+ responseSchema: {
2443
+ type: 'object',
2444
+ properties: {
2445
+ items: {
2446
+ type: 'array',
2447
+ items: {
2448
+ type: 'object',
2449
+ properties: {
2450
+ id: {
2451
+ type: 'string',
2452
+ },
2453
+ name: {
2454
+ type: 'string',
2455
+ },
2456
+ kind: {
2457
+ type: 'string',
2458
+ },
2459
+ instructions: {
2460
+ type: 'string',
2461
+ },
2462
+ dataSourceIds: {
2463
+ type: 'array',
2464
+ items: {
2465
+ type: 'string',
2466
+ },
2467
+ },
2468
+ parentDataFlowId: {
2469
+ type: 'string',
2470
+ nullable: true,
2471
+ },
2472
+ status: {
2473
+ type: 'string',
2474
+ },
2475
+ codeStale: {
2476
+ type: 'boolean',
2477
+ },
2478
+ schedule: {
2479
+ anyOf: [
2480
+ {
2481
+ anyOf: [
2482
+ {
2483
+ type: 'object',
2484
+ properties: {
2485
+ type: {
2486
+ type: 'string',
2487
+ enum: ['manual'],
2488
+ },
2489
+ },
2490
+ required: ['type'],
2491
+ additionalProperties: false,
2492
+ },
2493
+ {
2494
+ type: 'object',
2495
+ properties: {
2496
+ type: {
2497
+ type: 'string',
2498
+ enum: ['hourly'],
2499
+ },
2500
+ minute: {
2501
+ type: 'number',
2502
+ minimum: 0,
2503
+ maximum: 59,
2504
+ },
2505
+ },
2506
+ required: ['type', 'minute'],
2507
+ additionalProperties: false,
2508
+ },
2509
+ {
2510
+ type: 'object',
2511
+ properties: {
2512
+ type: {
2513
+ type: 'string',
2514
+ enum: ['daily'],
2515
+ },
2516
+ hour: {
2517
+ type: 'number',
2518
+ minimum: 0,
2519
+ maximum: 23,
2520
+ },
2521
+ minute: {
2522
+ type: 'number',
2523
+ minimum: 0,
2524
+ maximum: 59,
2525
+ },
2526
+ },
2527
+ required: ['type', 'hour', 'minute'],
2528
+ additionalProperties: false,
2529
+ },
2530
+ {
2531
+ type: 'object',
2532
+ properties: {
2533
+ type: {
2534
+ type: 'string',
2535
+ enum: ['weekly'],
2536
+ },
2537
+ hour: {
2538
+ type: 'number',
2539
+ minimum: 0,
2540
+ maximum: 23,
2541
+ },
2542
+ minute: {
2543
+ type: 'number',
2544
+ minimum: 0,
2545
+ maximum: 59,
2546
+ },
2547
+ dayOfWeek: {
2548
+ type: 'number',
2549
+ minimum: 0,
2550
+ maximum: 6,
2551
+ },
2552
+ },
2553
+ required: ['type', 'hour', 'minute', 'dayOfWeek'],
2554
+ additionalProperties: false,
2555
+ },
2556
+ {
2557
+ type: 'object',
2558
+ properties: {
2559
+ type: {
2560
+ type: 'string',
2561
+ enum: ['monthly'],
2562
+ },
2563
+ hour: {
2564
+ type: 'number',
2565
+ minimum: 0,
2566
+ maximum: 23,
2567
+ },
2568
+ minute: {
2569
+ type: 'number',
2570
+ minimum: 0,
2571
+ maximum: 59,
2572
+ },
2573
+ dayOfMonth: {
2574
+ type: 'number',
2575
+ minimum: 1,
2576
+ maximum: 31,
2577
+ },
2578
+ },
2579
+ required: ['type', 'hour', 'minute', 'dayOfMonth'],
2580
+ additionalProperties: false,
2581
+ },
2582
+ ],
2583
+ },
2584
+ {
2585
+ type: 'object',
2586
+ nullable: true,
2587
+ enum: [null],
2588
+ },
2589
+ ],
2590
+ },
2591
+ isEnabled: {
2592
+ type: 'boolean',
2593
+ },
2594
+ nextRunAt: {
2595
+ type: 'string',
2596
+ format: 'date-time',
2597
+ nullable: true,
2598
+ },
2599
+ draft: {
2600
+ type: 'object',
2601
+ properties: {
2602
+ revisionId: {
2603
+ type: 'string',
2604
+ minLength: 1,
2605
+ },
2606
+ sequence: {
2607
+ type: 'integer',
2608
+ exclusiveMinimum: 0,
2609
+ },
2610
+ },
2611
+ required: ['revisionId', 'sequence'],
2612
+ additionalProperties: false,
2613
+ nullable: true,
2614
+ },
2615
+ published: {
2616
+ type: 'object',
2617
+ properties: {
2618
+ revisionId: {
2619
+ type: 'string',
2620
+ minLength: 1,
2621
+ },
2622
+ sequence: {
2623
+ type: 'integer',
2624
+ exclusiveMinimum: 0,
2625
+ },
2626
+ },
2627
+ required: ['revisionId', 'sequence'],
2628
+ additionalProperties: false,
2629
+ nullable: true,
2630
+ },
2631
+ },
2632
+ required: [
2633
+ 'id',
2634
+ 'name',
2635
+ 'kind',
2636
+ 'instructions',
2637
+ 'dataSourceIds',
2638
+ 'parentDataFlowId',
2639
+ 'status',
2640
+ 'codeStale',
2641
+ 'schedule',
2642
+ 'isEnabled',
2643
+ 'nextRunAt',
2644
+ 'draft',
2645
+ 'published',
2646
+ ],
2647
+ additionalProperties: false,
2648
+ },
2649
+ },
2650
+ },
2651
+ required: ['items'],
2652
+ additionalProperties: false,
2653
+ },
2654
+ },
2655
+ operationsGet: {
2656
+ operationId: 'operationsGet',
2657
+ method: 'GET',
2658
+ path: '/v1/operations/{operationId}',
2659
+ scope: 'workspace',
2660
+ bodySchema: null,
2661
+ querySchema: null,
2662
+ responseSchema: {
2663
+ type: 'object',
2664
+ properties: {
2665
+ id: {
2666
+ type: 'string',
2667
+ },
2668
+ name: {
2669
+ type: 'string',
2670
+ },
2671
+ kind: {
2672
+ type: 'string',
2673
+ },
2674
+ instructions: {
2675
+ type: 'string',
2676
+ },
2677
+ dataSourceIds: {
2678
+ type: 'array',
2679
+ items: {
2680
+ type: 'string',
2681
+ },
2682
+ },
2683
+ parentDataFlowId: {
2684
+ type: 'string',
2685
+ nullable: true,
2686
+ },
2687
+ status: {
2688
+ type: 'string',
2689
+ },
2690
+ codeStale: {
2691
+ type: 'boolean',
2692
+ },
2693
+ schedule: {
2694
+ anyOf: [
2695
+ {
2696
+ anyOf: [
2697
+ {
2698
+ type: 'object',
2699
+ properties: {
2700
+ type: {
2701
+ type: 'string',
2702
+ enum: ['manual'],
2703
+ },
2704
+ },
2705
+ required: ['type'],
2706
+ additionalProperties: false,
2707
+ },
2708
+ {
2709
+ type: 'object',
2710
+ properties: {
2711
+ type: {
2712
+ type: 'string',
2713
+ enum: ['hourly'],
2714
+ },
2715
+ minute: {
2716
+ type: 'number',
2717
+ minimum: 0,
2718
+ maximum: 59,
2719
+ },
2720
+ },
2721
+ required: ['type', 'minute'],
2722
+ additionalProperties: false,
2723
+ },
2724
+ {
2725
+ type: 'object',
2726
+ properties: {
2727
+ type: {
2728
+ type: 'string',
2729
+ enum: ['daily'],
2730
+ },
2731
+ hour: {
2732
+ type: 'number',
2733
+ minimum: 0,
2734
+ maximum: 23,
2735
+ },
2736
+ minute: {
2737
+ type: 'number',
2738
+ minimum: 0,
2739
+ maximum: 59,
2740
+ },
2741
+ },
2742
+ required: ['type', 'hour', 'minute'],
2743
+ additionalProperties: false,
2744
+ },
2745
+ {
2746
+ type: 'object',
2747
+ properties: {
2748
+ type: {
2749
+ type: 'string',
2750
+ enum: ['weekly'],
2751
+ },
2752
+ hour: {
2753
+ type: 'number',
2754
+ minimum: 0,
2755
+ maximum: 23,
2756
+ },
2757
+ minute: {
2758
+ type: 'number',
2759
+ minimum: 0,
2760
+ maximum: 59,
2761
+ },
2762
+ dayOfWeek: {
2763
+ type: 'number',
2764
+ minimum: 0,
2765
+ maximum: 6,
2766
+ },
2767
+ },
2768
+ required: ['type', 'hour', 'minute', 'dayOfWeek'],
2769
+ additionalProperties: false,
2770
+ },
2771
+ {
2772
+ type: 'object',
2773
+ properties: {
2774
+ type: {
2775
+ type: 'string',
2776
+ enum: ['monthly'],
2777
+ },
2778
+ hour: {
2779
+ type: 'number',
2780
+ minimum: 0,
2781
+ maximum: 23,
2782
+ },
2783
+ minute: {
2784
+ type: 'number',
2785
+ minimum: 0,
2786
+ maximum: 59,
2787
+ },
2788
+ dayOfMonth: {
2789
+ type: 'number',
2790
+ minimum: 1,
2791
+ maximum: 31,
2792
+ },
2793
+ },
2794
+ required: ['type', 'hour', 'minute', 'dayOfMonth'],
2795
+ additionalProperties: false,
2796
+ },
2797
+ ],
2798
+ },
2799
+ {
2800
+ type: 'object',
2801
+ nullable: true,
2802
+ enum: [null],
2803
+ },
2804
+ ],
2805
+ },
2806
+ isEnabled: {
2807
+ type: 'boolean',
2808
+ },
2809
+ nextRunAt: {
2810
+ type: 'string',
2811
+ format: 'date-time',
2812
+ nullable: true,
2813
+ },
2814
+ draft: {
2815
+ type: 'object',
2816
+ properties: {
2817
+ revisionId: {
2818
+ type: 'string',
2819
+ minLength: 1,
2820
+ },
2821
+ sequence: {
2822
+ type: 'integer',
2823
+ exclusiveMinimum: 0,
2824
+ },
2825
+ },
2826
+ required: ['revisionId', 'sequence'],
2827
+ additionalProperties: false,
2828
+ nullable: true,
2829
+ },
2830
+ published: {
2831
+ type: 'object',
2832
+ properties: {
2833
+ revisionId: {
2834
+ type: 'string',
2835
+ minLength: 1,
2836
+ },
2837
+ sequence: {
2838
+ type: 'integer',
2839
+ exclusiveMinimum: 0,
2840
+ },
2841
+ },
2842
+ required: ['revisionId', 'sequence'],
2843
+ additionalProperties: false,
2844
+ nullable: true,
2845
+ },
2846
+ },
2847
+ required: [
2848
+ 'id',
2849
+ 'name',
2850
+ 'kind',
2851
+ 'instructions',
2852
+ 'dataSourceIds',
2853
+ 'parentDataFlowId',
2854
+ 'status',
2855
+ 'codeStale',
2856
+ 'schedule',
2857
+ 'isEnabled',
2858
+ 'nextRunAt',
2859
+ 'draft',
2860
+ 'published',
2861
+ ],
2862
+ additionalProperties: false,
2863
+ },
2864
+ },
2865
+ operationsUpdate: {
2866
+ operationId: 'operationsUpdate',
2867
+ method: 'PATCH',
2868
+ path: '/v1/operations/{operationId}',
2869
+ scope: 'workspace',
2870
+ bodySchema: {
2871
+ type: 'object',
2872
+ properties: {
2873
+ schedule: {
2874
+ anyOf: [
2875
+ {
2876
+ anyOf: [
2877
+ {
2878
+ type: 'object',
2879
+ properties: {
2880
+ type: {
2881
+ type: 'string',
2882
+ enum: ['manual'],
2883
+ },
2884
+ },
2885
+ required: ['type'],
2886
+ additionalProperties: false,
2887
+ },
2888
+ {
2889
+ type: 'object',
2890
+ properties: {
2891
+ type: {
2892
+ type: 'string',
2893
+ enum: ['hourly'],
2894
+ },
2895
+ minute: {
2896
+ type: 'number',
2897
+ minimum: 0,
2898
+ maximum: 59,
2899
+ },
2900
+ },
2901
+ required: ['type', 'minute'],
2902
+ additionalProperties: false,
2903
+ },
2904
+ {
2905
+ type: 'object',
2906
+ properties: {
2907
+ type: {
2908
+ type: 'string',
2909
+ enum: ['daily'],
2910
+ },
2911
+ hour: {
2912
+ type: 'number',
2913
+ minimum: 0,
2914
+ maximum: 23,
2915
+ },
2916
+ minute: {
2917
+ type: 'number',
2918
+ minimum: 0,
2919
+ maximum: 59,
2920
+ },
2921
+ },
2922
+ required: ['type', 'hour', 'minute'],
2923
+ additionalProperties: false,
2924
+ },
2925
+ {
2926
+ type: 'object',
2927
+ properties: {
2928
+ type: {
2929
+ type: 'string',
2930
+ enum: ['weekly'],
2931
+ },
2932
+ hour: {
2933
+ type: 'number',
2934
+ minimum: 0,
2935
+ maximum: 23,
2936
+ },
2937
+ minute: {
2938
+ type: 'number',
2939
+ minimum: 0,
2940
+ maximum: 59,
2941
+ },
2942
+ dayOfWeek: {
2943
+ type: 'number',
2944
+ minimum: 0,
2945
+ maximum: 6,
2946
+ },
2947
+ },
2948
+ required: ['type', 'hour', 'minute', 'dayOfWeek'],
2949
+ additionalProperties: false,
2950
+ },
2951
+ {
2952
+ type: 'object',
2953
+ properties: {
2954
+ type: {
2955
+ type: 'string',
2956
+ enum: ['monthly'],
2957
+ },
2958
+ hour: {
2959
+ type: 'number',
2960
+ minimum: 0,
2961
+ maximum: 23,
2962
+ },
2963
+ minute: {
2964
+ type: 'number',
2965
+ minimum: 0,
2966
+ maximum: 59,
2967
+ },
2968
+ dayOfMonth: {
2969
+ type: 'number',
2970
+ minimum: 1,
2971
+ maximum: 31,
2972
+ },
2973
+ },
2974
+ required: ['type', 'hour', 'minute', 'dayOfMonth'],
2975
+ additionalProperties: false,
2976
+ },
2977
+ ],
2978
+ },
2979
+ {
2980
+ type: 'object',
2981
+ nullable: true,
2982
+ enum: [null],
2983
+ },
2984
+ ],
2985
+ },
2986
+ isEnabled: {
2987
+ type: 'boolean',
2988
+ },
2989
+ },
2990
+ additionalProperties: false,
2991
+ },
2992
+ querySchema: null,
2993
+ responseSchema: {
2994
+ type: 'object',
2995
+ properties: {
2996
+ id: {
2997
+ type: 'string',
2998
+ },
2999
+ name: {
3000
+ type: 'string',
3001
+ },
3002
+ kind: {
3003
+ type: 'string',
3004
+ },
3005
+ instructions: {
3006
+ type: 'string',
3007
+ },
3008
+ dataSourceIds: {
3009
+ type: 'array',
3010
+ items: {
3011
+ type: 'string',
3012
+ },
3013
+ },
3014
+ parentDataFlowId: {
3015
+ type: 'string',
3016
+ nullable: true,
3017
+ },
3018
+ status: {
3019
+ type: 'string',
3020
+ },
3021
+ codeStale: {
3022
+ type: 'boolean',
3023
+ },
3024
+ schedule: {
3025
+ anyOf: [
3026
+ {
3027
+ anyOf: [
3028
+ {
3029
+ type: 'object',
3030
+ properties: {
3031
+ type: {
3032
+ type: 'string',
3033
+ enum: ['manual'],
3034
+ },
3035
+ },
3036
+ required: ['type'],
3037
+ additionalProperties: false,
3038
+ },
3039
+ {
3040
+ type: 'object',
3041
+ properties: {
3042
+ type: {
3043
+ type: 'string',
3044
+ enum: ['hourly'],
3045
+ },
3046
+ minute: {
3047
+ type: 'number',
3048
+ minimum: 0,
3049
+ maximum: 59,
3050
+ },
3051
+ },
3052
+ required: ['type', 'minute'],
3053
+ additionalProperties: false,
3054
+ },
3055
+ {
3056
+ type: 'object',
3057
+ properties: {
3058
+ type: {
3059
+ type: 'string',
3060
+ enum: ['daily'],
3061
+ },
3062
+ hour: {
3063
+ type: 'number',
3064
+ minimum: 0,
3065
+ maximum: 23,
3066
+ },
3067
+ minute: {
3068
+ type: 'number',
3069
+ minimum: 0,
3070
+ maximum: 59,
3071
+ },
3072
+ },
3073
+ required: ['type', 'hour', 'minute'],
3074
+ additionalProperties: false,
3075
+ },
3076
+ {
3077
+ type: 'object',
3078
+ properties: {
3079
+ type: {
3080
+ type: 'string',
3081
+ enum: ['weekly'],
3082
+ },
3083
+ hour: {
3084
+ type: 'number',
3085
+ minimum: 0,
3086
+ maximum: 23,
3087
+ },
3088
+ minute: {
3089
+ type: 'number',
3090
+ minimum: 0,
3091
+ maximum: 59,
3092
+ },
3093
+ dayOfWeek: {
3094
+ type: 'number',
3095
+ minimum: 0,
3096
+ maximum: 6,
3097
+ },
3098
+ },
3099
+ required: ['type', 'hour', 'minute', 'dayOfWeek'],
3100
+ additionalProperties: false,
3101
+ },
3102
+ {
3103
+ type: 'object',
3104
+ properties: {
3105
+ type: {
3106
+ type: 'string',
3107
+ enum: ['monthly'],
3108
+ },
3109
+ hour: {
3110
+ type: 'number',
3111
+ minimum: 0,
3112
+ maximum: 23,
3113
+ },
3114
+ minute: {
3115
+ type: 'number',
3116
+ minimum: 0,
3117
+ maximum: 59,
3118
+ },
3119
+ dayOfMonth: {
3120
+ type: 'number',
3121
+ minimum: 1,
3122
+ maximum: 31,
3123
+ },
3124
+ },
3125
+ required: ['type', 'hour', 'minute', 'dayOfMonth'],
3126
+ additionalProperties: false,
3127
+ },
3128
+ ],
3129
+ },
3130
+ {
3131
+ type: 'object',
3132
+ nullable: true,
3133
+ enum: [null],
3134
+ },
3135
+ ],
3136
+ },
3137
+ isEnabled: {
3138
+ type: 'boolean',
3139
+ },
3140
+ nextRunAt: {
3141
+ type: 'string',
3142
+ format: 'date-time',
3143
+ nullable: true,
3144
+ },
3145
+ draft: {
3146
+ type: 'object',
3147
+ properties: {
3148
+ revisionId: {
3149
+ type: 'string',
3150
+ minLength: 1,
3151
+ },
3152
+ sequence: {
3153
+ type: 'integer',
3154
+ exclusiveMinimum: 0,
3155
+ },
3156
+ },
3157
+ required: ['revisionId', 'sequence'],
3158
+ additionalProperties: false,
3159
+ nullable: true,
3160
+ },
3161
+ published: {
3162
+ type: 'object',
3163
+ properties: {
3164
+ revisionId: {
3165
+ type: 'string',
3166
+ minLength: 1,
3167
+ },
3168
+ sequence: {
3169
+ type: 'integer',
3170
+ exclusiveMinimum: 0,
3171
+ },
3172
+ },
3173
+ required: ['revisionId', 'sequence'],
3174
+ additionalProperties: false,
3175
+ nullable: true,
3176
+ },
3177
+ },
3178
+ required: [
3179
+ 'id',
3180
+ 'name',
3181
+ 'kind',
3182
+ 'instructions',
3183
+ 'dataSourceIds',
3184
+ 'parentDataFlowId',
3185
+ 'status',
3186
+ 'codeStale',
3187
+ 'schedule',
3188
+ 'isEnabled',
3189
+ 'nextRunAt',
3190
+ 'draft',
3191
+ 'published',
3192
+ ],
3193
+ additionalProperties: false,
3194
+ },
3195
+ },
3196
+ operationsSourceGet: {
3197
+ operationId: 'operationsSourceGet',
3198
+ method: 'GET',
3199
+ path: '/v1/operations/{operationId}/source',
3200
+ scope: 'workspace',
3201
+ bodySchema: null,
3202
+ querySchema: null,
3203
+ responseSchema: {
3204
+ type: 'object',
3205
+ properties: {
3206
+ operationId: {
3207
+ type: 'string',
3208
+ },
3209
+ source: {
3210
+ type: 'string',
3211
+ },
3212
+ revision: {
3213
+ type: 'object',
3214
+ properties: {
3215
+ revisionId: {
3216
+ type: 'string',
3217
+ minLength: 1,
3218
+ },
3219
+ sequence: {
3220
+ type: 'integer',
3221
+ exclusiveMinimum: 0,
3222
+ },
3223
+ },
3224
+ required: ['revisionId', 'sequence'],
3225
+ additionalProperties: false,
3226
+ nullable: true,
3227
+ },
3228
+ instructions: {
3229
+ type: 'string',
3230
+ },
3231
+ dataSourceIds: {
3232
+ type: 'array',
3233
+ items: {
3234
+ type: 'string',
3235
+ },
3236
+ },
3237
+ dependencyOperationIds: {
3238
+ type: 'array',
3239
+ items: {
3240
+ type: 'string',
3241
+ },
3242
+ },
3243
+ dataFlowRevision: {
3244
+ type: 'integer',
3245
+ minimum: 0,
3246
+ nullable: true,
3247
+ },
3248
+ updatedAt: {
3249
+ type: 'string',
3250
+ format: 'date-time',
3251
+ },
3252
+ },
3253
+ required: [
3254
+ 'operationId',
3255
+ 'source',
3256
+ 'revision',
3257
+ 'instructions',
3258
+ 'dataSourceIds',
3259
+ 'dependencyOperationIds',
3260
+ 'dataFlowRevision',
3261
+ 'updatedAt',
3262
+ ],
3263
+ additionalProperties: false,
3264
+ },
3265
+ },
3266
+ operationsSourceUpdate: {
3267
+ operationId: 'operationsSourceUpdate',
3268
+ method: 'PUT',
3269
+ path: '/v1/operations/{operationId}/source',
3270
+ scope: 'workspace',
3271
+ bodySchema: {
3272
+ type: 'object',
3273
+ properties: {
3274
+ source: {
3275
+ type: 'string',
3276
+ minLength: 1,
3277
+ maxLength: 1000000,
3278
+ },
3279
+ expectedRevision: {
3280
+ type: 'object',
3281
+ properties: {
3282
+ revisionId: {
3283
+ type: 'string',
3284
+ minLength: 1,
3285
+ },
3286
+ sequence: {
3287
+ type: 'integer',
3288
+ exclusiveMinimum: 0,
3289
+ },
3290
+ },
3291
+ required: ['revisionId', 'sequence'],
3292
+ additionalProperties: false,
3293
+ nullable: true,
3294
+ },
3295
+ expectedDataFlowRevision: {
3296
+ type: 'integer',
3297
+ minimum: 0,
3298
+ nullable: true,
3299
+ },
3300
+ expectedUpdatedAt: {
3301
+ type: 'string',
3302
+ format: 'date-time',
3303
+ },
3304
+ },
3305
+ required: ['source', 'expectedRevision', 'expectedDataFlowRevision', 'expectedUpdatedAt'],
3306
+ additionalProperties: false,
3307
+ },
3308
+ querySchema: null,
3309
+ responseSchema: {
3310
+ type: 'object',
3311
+ properties: {
3312
+ operationId: {
3313
+ type: 'string',
3314
+ },
3315
+ source: {
3316
+ type: 'string',
3317
+ },
3318
+ revision: {
3319
+ type: 'object',
3320
+ properties: {
3321
+ revisionId: {
3322
+ type: 'string',
3323
+ minLength: 1,
3324
+ },
3325
+ sequence: {
3326
+ type: 'integer',
3327
+ exclusiveMinimum: 0,
3328
+ },
3329
+ },
3330
+ required: ['revisionId', 'sequence'],
3331
+ additionalProperties: false,
3332
+ nullable: true,
3333
+ },
3334
+ instructions: {
3335
+ type: 'string',
3336
+ },
3337
+ dataSourceIds: {
3338
+ type: 'array',
3339
+ items: {
3340
+ type: 'string',
3341
+ },
3342
+ },
3343
+ dependencyOperationIds: {
3344
+ type: 'array',
3345
+ items: {
3346
+ type: 'string',
3347
+ },
3348
+ },
3349
+ dataFlowRevision: {
3350
+ type: 'integer',
3351
+ minimum: 0,
3352
+ nullable: true,
3353
+ },
3354
+ updatedAt: {
3355
+ type: 'string',
3356
+ format: 'date-time',
3357
+ },
3358
+ },
3359
+ required: [
3360
+ 'operationId',
3361
+ 'source',
3362
+ 'revision',
3363
+ 'instructions',
3364
+ 'dataSourceIds',
3365
+ 'dependencyOperationIds',
3366
+ 'dataFlowRevision',
3367
+ 'updatedAt',
3368
+ ],
3369
+ additionalProperties: false,
3370
+ },
3371
+ },
3372
+ operationsRunsList: {
3373
+ operationId: 'operationsRunsList',
3374
+ method: 'GET',
3375
+ path: '/v1/operations/{operationId}/runs',
3376
+ scope: 'workspace',
3377
+ bodySchema: null,
3378
+ querySchema: null,
3379
+ responseSchema: {
3380
+ type: 'object',
3381
+ properties: {
3382
+ items: {
3383
+ type: 'array',
3384
+ items: {
3385
+ type: 'object',
3386
+ properties: {
3387
+ id: {
3388
+ type: 'string',
3389
+ },
3390
+ workflowId: {
3391
+ type: 'string',
3392
+ },
3393
+ revisionId: {
3394
+ type: 'string',
3395
+ nullable: true,
3396
+ },
3397
+ status: {
3398
+ type: 'string',
3399
+ },
3400
+ createdAt: {
3401
+ type: 'string',
3402
+ format: 'date-time',
3403
+ },
3404
+ completedAt: {
3405
+ type: 'string',
3406
+ format: 'date-time',
3407
+ nullable: true,
3408
+ },
3409
+ error: {
3410
+ type: 'string',
3411
+ nullable: true,
3412
+ },
3413
+ outputDocId: {
3414
+ type: 'string',
3415
+ nullable: true,
3416
+ },
3417
+ },
3418
+ required: ['id', 'workflowId', 'revisionId', 'status', 'createdAt', 'completedAt', 'error', 'outputDocId'],
3419
+ additionalProperties: false,
3420
+ },
3421
+ },
3422
+ },
3423
+ required: ['items'],
3424
+ additionalProperties: false,
3425
+ },
3426
+ },
3427
+ operationsRun: {
3428
+ operationId: 'operationsRun',
3429
+ method: 'POST',
3430
+ path: '/v1/operations/{operationId}/runs',
3431
+ scope: 'workspace',
3432
+ bodySchema: {
3433
+ type: 'object',
3434
+ properties: {
3435
+ version: {
3436
+ type: 'string',
3437
+ enum: ['draft', 'published'],
3438
+ },
3439
+ },
3440
+ required: ['version'],
3441
+ additionalProperties: false,
3442
+ },
3443
+ querySchema: null,
3444
+ responseSchema: {
3445
+ type: 'object',
3446
+ properties: {
3447
+ workflowId: {
3448
+ type: 'string',
3449
+ },
3450
+ runId: {
3451
+ type: 'string',
3452
+ },
3453
+ },
3454
+ required: ['workflowId'],
3455
+ additionalProperties: false,
3456
+ },
3457
+ },
3458
+ operationsRunOutput: {
3459
+ operationId: 'operationsRunOutput',
3460
+ method: 'GET',
3461
+ path: '/v1/operations/{operationId}/runs/{runId}/output',
3462
+ scope: 'workspace',
3463
+ bodySchema: null,
3464
+ querySchema: null,
3465
+ responseSchema: {
3466
+ type: 'object',
3467
+ properties: {
3468
+ runId: {
3469
+ type: 'string',
3470
+ },
3471
+ revisionId: {
3472
+ type: 'string',
3473
+ nullable: true,
3474
+ },
3475
+ rowLimitPerTable: {
3476
+ type: 'number',
3477
+ enum: [1000],
3478
+ },
3479
+ tables: {
3480
+ type: 'object',
3481
+ additionalProperties: {
3482
+ type: 'array',
3483
+ items: {},
3484
+ },
3485
+ },
3486
+ names: {
3487
+ type: 'object',
3488
+ additionalProperties: {
3489
+ type: 'string',
3490
+ },
3491
+ },
3492
+ schemas: {
3493
+ type: 'object',
3494
+ additionalProperties: {},
3495
+ },
3496
+ },
3497
+ required: ['runId', 'revisionId', 'rowLimitPerTable', 'tables', 'names', 'schemas'],
3498
+ additionalProperties: false,
3499
+ },
3500
+ },
3501
+ dataFlowsCreate: {
3502
+ operationId: 'dataFlowsCreate',
3503
+ method: 'POST',
3504
+ path: '/v1/data-flows',
3505
+ scope: 'workspace',
3506
+ bodySchema: {
3507
+ type: 'object',
3508
+ properties: {
3509
+ name: {
3510
+ type: 'string',
3511
+ minLength: 1,
3512
+ maxLength: 255,
3513
+ },
3514
+ description: {
3515
+ type: 'string',
3516
+ default: '',
3517
+ },
3518
+ dataSourceIds: {
3519
+ type: 'array',
3520
+ items: {
3521
+ type: 'string',
3522
+ minLength: 1,
3523
+ },
3524
+ default: [],
3525
+ },
3526
+ },
3527
+ required: ['name'],
3528
+ additionalProperties: false,
3529
+ },
3530
+ querySchema: null,
3531
+ responseSchema: {
3532
+ type: 'object',
3533
+ properties: {
3534
+ operation: {
3535
+ type: 'object',
3536
+ properties: {
3537
+ id: {
3538
+ type: 'string',
3539
+ },
3540
+ name: {
3541
+ type: 'string',
3542
+ },
3543
+ kind: {
3544
+ type: 'string',
3545
+ },
3546
+ instructions: {
3547
+ type: 'string',
3548
+ },
3549
+ dataSourceIds: {
3550
+ type: 'array',
3551
+ items: {
3552
+ type: 'string',
3553
+ },
3554
+ },
3555
+ parentDataFlowId: {
3556
+ type: 'string',
3557
+ nullable: true,
3558
+ },
3559
+ status: {
3560
+ type: 'string',
3561
+ },
3562
+ codeStale: {
3563
+ type: 'boolean',
3564
+ },
3565
+ schedule: {
3566
+ anyOf: [
3567
+ {
3568
+ anyOf: [
3569
+ {
3570
+ type: 'object',
3571
+ properties: {
3572
+ type: {
3573
+ type: 'string',
3574
+ enum: ['manual'],
3575
+ },
3576
+ },
3577
+ required: ['type'],
3578
+ additionalProperties: false,
3579
+ },
3580
+ {
3581
+ type: 'object',
3582
+ properties: {
3583
+ type: {
3584
+ type: 'string',
3585
+ enum: ['hourly'],
3586
+ },
3587
+ minute: {
3588
+ type: 'number',
3589
+ minimum: 0,
3590
+ maximum: 59,
3591
+ },
3592
+ },
3593
+ required: ['type', 'minute'],
3594
+ additionalProperties: false,
3595
+ },
3596
+ {
3597
+ type: 'object',
3598
+ properties: {
3599
+ type: {
3600
+ type: 'string',
3601
+ enum: ['daily'],
3602
+ },
3603
+ hour: {
3604
+ type: 'number',
3605
+ minimum: 0,
3606
+ maximum: 23,
3607
+ },
3608
+ minute: {
3609
+ type: 'number',
3610
+ minimum: 0,
3611
+ maximum: 59,
3612
+ },
3613
+ },
3614
+ required: ['type', 'hour', 'minute'],
3615
+ additionalProperties: false,
3616
+ },
3617
+ {
3618
+ type: 'object',
3619
+ properties: {
3620
+ type: {
3621
+ type: 'string',
3622
+ enum: ['weekly'],
3623
+ },
3624
+ hour: {
3625
+ type: 'number',
3626
+ minimum: 0,
3627
+ maximum: 23,
3628
+ },
3629
+ minute: {
3630
+ type: 'number',
3631
+ minimum: 0,
3632
+ maximum: 59,
3633
+ },
3634
+ dayOfWeek: {
3635
+ type: 'number',
3636
+ minimum: 0,
3637
+ maximum: 6,
3638
+ },
3639
+ },
3640
+ required: ['type', 'hour', 'minute', 'dayOfWeek'],
3641
+ additionalProperties: false,
3642
+ },
3643
+ {
3644
+ type: 'object',
3645
+ properties: {
3646
+ type: {
3647
+ type: 'string',
3648
+ enum: ['monthly'],
3649
+ },
3650
+ hour: {
3651
+ type: 'number',
3652
+ minimum: 0,
3653
+ maximum: 23,
3654
+ },
3655
+ minute: {
3656
+ type: 'number',
3657
+ minimum: 0,
3658
+ maximum: 59,
3659
+ },
3660
+ dayOfMonth: {
3661
+ type: 'number',
3662
+ minimum: 1,
3663
+ maximum: 31,
3664
+ },
3665
+ },
3666
+ required: ['type', 'hour', 'minute', 'dayOfMonth'],
3667
+ additionalProperties: false,
3668
+ },
3669
+ ],
3670
+ },
3671
+ {
3672
+ type: 'object',
3673
+ nullable: true,
3674
+ enum: [null],
3675
+ },
3676
+ ],
3677
+ },
3678
+ isEnabled: {
3679
+ type: 'boolean',
3680
+ },
3681
+ nextRunAt: {
3682
+ type: 'string',
3683
+ format: 'date-time',
3684
+ nullable: true,
3685
+ },
3686
+ draft: {
3687
+ type: 'object',
3688
+ properties: {
3689
+ revisionId: {
3690
+ type: 'string',
3691
+ minLength: 1,
3692
+ },
3693
+ sequence: {
3694
+ type: 'integer',
3695
+ exclusiveMinimum: 0,
3696
+ },
3697
+ },
3698
+ required: ['revisionId', 'sequence'],
3699
+ additionalProperties: false,
3700
+ nullable: true,
3701
+ },
3702
+ published: {
3703
+ type: 'object',
3704
+ properties: {
3705
+ revisionId: {
3706
+ type: 'string',
3707
+ minLength: 1,
3708
+ },
3709
+ sequence: {
3710
+ type: 'integer',
3711
+ exclusiveMinimum: 0,
3712
+ },
3713
+ },
3714
+ required: ['revisionId', 'sequence'],
3715
+ additionalProperties: false,
3716
+ nullable: true,
3717
+ },
3718
+ },
3719
+ required: [
3720
+ 'id',
3721
+ 'name',
3722
+ 'kind',
3723
+ 'instructions',
3724
+ 'dataSourceIds',
3725
+ 'parentDataFlowId',
3726
+ 'status',
3727
+ 'codeStale',
3728
+ 'schedule',
3729
+ 'isEnabled',
3730
+ 'nextRunAt',
3731
+ 'draft',
3732
+ 'published',
3733
+ ],
3734
+ additionalProperties: false,
3735
+ },
3736
+ revision: {
3737
+ type: 'integer',
3738
+ minimum: 0,
3739
+ },
3740
+ draftVersion: {
3741
+ type: 'integer',
3742
+ exclusiveMinimum: 0,
3743
+ },
3744
+ publishedVersion: {
3745
+ type: 'integer',
3746
+ exclusiveMinimum: 0,
3747
+ nullable: true,
3748
+ },
3749
+ operationIds: {
3750
+ type: 'array',
3751
+ items: {
3752
+ type: 'string',
3753
+ },
3754
+ },
3755
+ sourceIds: {
3756
+ type: 'array',
3757
+ items: {
3758
+ type: 'string',
3759
+ },
3760
+ },
3761
+ edges: {
3762
+ type: 'array',
3763
+ items: {
3764
+ type: 'object',
3765
+ properties: {
3766
+ id: {
3767
+ type: 'string',
3768
+ },
3769
+ fromNodeId: {
3770
+ type: 'string',
3771
+ },
3772
+ toNodeId: {
3773
+ type: 'string',
3774
+ },
3775
+ },
3776
+ required: ['id', 'fromNodeId', 'toNodeId'],
3777
+ additionalProperties: false,
3778
+ },
3779
+ },
3780
+ },
3781
+ required: ['operation', 'revision', 'draftVersion', 'publishedVersion', 'operationIds', 'sourceIds', 'edges'],
3782
+ additionalProperties: false,
3783
+ },
3784
+ },
3785
+ dataFlowsGet: {
3786
+ operationId: 'dataFlowsGet',
3787
+ method: 'GET',
3788
+ path: '/v1/data-flows/{dataFlowId}',
3789
+ scope: 'workspace',
3790
+ bodySchema: null,
3791
+ querySchema: null,
3792
+ responseSchema: {
3793
+ type: 'object',
3794
+ properties: {
3795
+ operation: {
3796
+ type: 'object',
3797
+ properties: {
3798
+ id: {
3799
+ type: 'string',
3800
+ },
3801
+ name: {
3802
+ type: 'string',
3803
+ },
3804
+ kind: {
3805
+ type: 'string',
3806
+ },
3807
+ instructions: {
3808
+ type: 'string',
3809
+ },
3810
+ dataSourceIds: {
3811
+ type: 'array',
3812
+ items: {
3813
+ type: 'string',
3814
+ },
3815
+ },
3816
+ parentDataFlowId: {
3817
+ type: 'string',
3818
+ nullable: true,
3819
+ },
3820
+ status: {
3821
+ type: 'string',
3822
+ },
3823
+ codeStale: {
3824
+ type: 'boolean',
3825
+ },
3826
+ schedule: {
3827
+ anyOf: [
3828
+ {
3829
+ anyOf: [
3830
+ {
3831
+ type: 'object',
3832
+ properties: {
3833
+ type: {
3834
+ type: 'string',
3835
+ enum: ['manual'],
3836
+ },
3837
+ },
3838
+ required: ['type'],
3839
+ additionalProperties: false,
3840
+ },
3841
+ {
3842
+ type: 'object',
3843
+ properties: {
3844
+ type: {
3845
+ type: 'string',
3846
+ enum: ['hourly'],
3847
+ },
3848
+ minute: {
3849
+ type: 'number',
3850
+ minimum: 0,
3851
+ maximum: 59,
3852
+ },
3853
+ },
3854
+ required: ['type', 'minute'],
3855
+ additionalProperties: false,
3856
+ },
3857
+ {
3858
+ type: 'object',
3859
+ properties: {
3860
+ type: {
3861
+ type: 'string',
3862
+ enum: ['daily'],
3863
+ },
3864
+ hour: {
3865
+ type: 'number',
3866
+ minimum: 0,
3867
+ maximum: 23,
3868
+ },
3869
+ minute: {
3870
+ type: 'number',
3871
+ minimum: 0,
3872
+ maximum: 59,
3873
+ },
3874
+ },
3875
+ required: ['type', 'hour', 'minute'],
3876
+ additionalProperties: false,
3877
+ },
3878
+ {
3879
+ type: 'object',
3880
+ properties: {
3881
+ type: {
3882
+ type: 'string',
3883
+ enum: ['weekly'],
3884
+ },
3885
+ hour: {
3886
+ type: 'number',
3887
+ minimum: 0,
3888
+ maximum: 23,
3889
+ },
3890
+ minute: {
3891
+ type: 'number',
3892
+ minimum: 0,
3893
+ maximum: 59,
3894
+ },
3895
+ dayOfWeek: {
3896
+ type: 'number',
3897
+ minimum: 0,
3898
+ maximum: 6,
3899
+ },
3900
+ },
3901
+ required: ['type', 'hour', 'minute', 'dayOfWeek'],
3902
+ additionalProperties: false,
3903
+ },
3904
+ {
3905
+ type: 'object',
3906
+ properties: {
3907
+ type: {
3908
+ type: 'string',
3909
+ enum: ['monthly'],
3910
+ },
3911
+ hour: {
3912
+ type: 'number',
3913
+ minimum: 0,
3914
+ maximum: 23,
3915
+ },
3916
+ minute: {
3917
+ type: 'number',
3918
+ minimum: 0,
3919
+ maximum: 59,
3920
+ },
3921
+ dayOfMonth: {
3922
+ type: 'number',
3923
+ minimum: 1,
3924
+ maximum: 31,
3925
+ },
3926
+ },
3927
+ required: ['type', 'hour', 'minute', 'dayOfMonth'],
3928
+ additionalProperties: false,
3929
+ },
3930
+ ],
3931
+ },
3932
+ {
3933
+ type: 'object',
3934
+ nullable: true,
3935
+ enum: [null],
3936
+ },
3937
+ ],
3938
+ },
3939
+ isEnabled: {
3940
+ type: 'boolean',
3941
+ },
3942
+ nextRunAt: {
3943
+ type: 'string',
3944
+ format: 'date-time',
3945
+ nullable: true,
3946
+ },
3947
+ draft: {
3948
+ type: 'object',
3949
+ properties: {
3950
+ revisionId: {
3951
+ type: 'string',
3952
+ minLength: 1,
3953
+ },
3954
+ sequence: {
3955
+ type: 'integer',
3956
+ exclusiveMinimum: 0,
3957
+ },
3958
+ },
3959
+ required: ['revisionId', 'sequence'],
3960
+ additionalProperties: false,
3961
+ nullable: true,
3962
+ },
3963
+ published: {
3964
+ type: 'object',
3965
+ properties: {
3966
+ revisionId: {
3967
+ type: 'string',
3968
+ minLength: 1,
3969
+ },
3970
+ sequence: {
3971
+ type: 'integer',
3972
+ exclusiveMinimum: 0,
3973
+ },
3974
+ },
3975
+ required: ['revisionId', 'sequence'],
3976
+ additionalProperties: false,
3977
+ nullable: true,
3978
+ },
3979
+ },
3980
+ required: [
3981
+ 'id',
3982
+ 'name',
3983
+ 'kind',
3984
+ 'instructions',
3985
+ 'dataSourceIds',
3986
+ 'parentDataFlowId',
3987
+ 'status',
3988
+ 'codeStale',
3989
+ 'schedule',
3990
+ 'isEnabled',
3991
+ 'nextRunAt',
3992
+ 'draft',
3993
+ 'published',
3994
+ ],
3995
+ additionalProperties: false,
3996
+ },
3997
+ revision: {
3998
+ type: 'integer',
3999
+ minimum: 0,
4000
+ },
4001
+ draftVersion: {
4002
+ type: 'integer',
4003
+ exclusiveMinimum: 0,
4004
+ },
4005
+ publishedVersion: {
4006
+ type: 'integer',
4007
+ exclusiveMinimum: 0,
4008
+ nullable: true,
4009
+ },
4010
+ operationIds: {
4011
+ type: 'array',
4012
+ items: {
4013
+ type: 'string',
4014
+ },
4015
+ },
4016
+ sourceIds: {
4017
+ type: 'array',
4018
+ items: {
4019
+ type: 'string',
4020
+ },
4021
+ },
4022
+ edges: {
4023
+ type: 'array',
4024
+ items: {
4025
+ type: 'object',
4026
+ properties: {
4027
+ id: {
4028
+ type: 'string',
4029
+ },
4030
+ fromNodeId: {
4031
+ type: 'string',
4032
+ },
4033
+ toNodeId: {
4034
+ type: 'string',
4035
+ },
4036
+ },
4037
+ required: ['id', 'fromNodeId', 'toNodeId'],
4038
+ additionalProperties: false,
4039
+ },
4040
+ },
4041
+ },
4042
+ required: ['operation', 'revision', 'draftVersion', 'publishedVersion', 'operationIds', 'sourceIds', 'edges'],
4043
+ additionalProperties: false,
4044
+ },
4045
+ },
4046
+ dataFlowsCommand: {
4047
+ operationId: 'dataFlowsCommand',
4048
+ method: 'POST',
4049
+ path: '/v1/data-flows/{dataFlowId}/commands',
4050
+ scope: 'workspace',
4051
+ bodySchema: {
4052
+ type: 'object',
4053
+ properties: {
4054
+ command: {
4055
+ anyOf: [
4056
+ {
4057
+ type: 'object',
4058
+ properties: {
4059
+ expectedRevision: {
4060
+ type: 'integer',
4061
+ minimum: 0,
4062
+ },
4063
+ type: {
4064
+ type: 'string',
4065
+ enum: ['updateFlow'],
4066
+ },
4067
+ patch: {
4068
+ type: 'object',
4069
+ properties: {
4070
+ name: {
4071
+ type: 'string',
4072
+ minLength: 1,
4073
+ },
4074
+ description: {
4075
+ type: 'string',
4076
+ },
4077
+ },
4078
+ additionalProperties: false,
4079
+ },
4080
+ },
4081
+ required: ['expectedRevision', 'type', 'patch'],
4082
+ additionalProperties: false,
4083
+ },
4084
+ {
4085
+ type: 'object',
4086
+ properties: {
4087
+ expectedRevision: {
4088
+ type: 'integer',
4089
+ minimum: 0,
4090
+ },
4091
+ type: {
4092
+ type: 'string',
4093
+ enum: ['addTransform'],
4094
+ },
4095
+ input: {
4096
+ type: 'object',
4097
+ properties: {
4098
+ name: {
4099
+ type: 'string',
4100
+ minLength: 1,
4101
+ },
4102
+ instruction: {
4103
+ type: 'string',
4104
+ minLength: 1,
4105
+ },
4106
+ inputIds: {
4107
+ type: 'array',
4108
+ items: {
4109
+ type: 'string',
4110
+ minLength: 1,
4111
+ },
4112
+ minItems: 1,
4113
+ },
4114
+ position: {
4115
+ type: 'object',
4116
+ properties: {
4117
+ x: {
4118
+ type: 'number',
4119
+ },
4120
+ y: {
4121
+ type: 'number',
4122
+ },
4123
+ },
4124
+ required: ['x', 'y'],
4125
+ additionalProperties: false,
4126
+ },
4127
+ },
4128
+ required: ['name', 'instruction', 'inputIds'],
4129
+ additionalProperties: false,
4130
+ },
4131
+ },
4132
+ required: ['expectedRevision', 'type', 'input'],
4133
+ additionalProperties: false,
4134
+ },
4135
+ {
4136
+ type: 'object',
4137
+ properties: {
4138
+ expectedRevision: {
4139
+ type: 'integer',
4140
+ minimum: 0,
4141
+ },
4142
+ type: {
4143
+ type: 'string',
4144
+ enum: ['updateNode'],
4145
+ },
4146
+ nodeId: {
4147
+ type: 'string',
4148
+ minLength: 1,
4149
+ },
4150
+ patch: {
4151
+ type: 'object',
4152
+ properties: {
4153
+ name: {
4154
+ type: 'string',
4155
+ minLength: 1,
4156
+ },
4157
+ instruction: {
4158
+ type: 'string',
4159
+ minLength: 1,
4160
+ },
4161
+ locked: {
4162
+ type: 'boolean',
4163
+ },
4164
+ position: {
4165
+ type: 'object',
4166
+ properties: {
4167
+ x: {
4168
+ type: 'number',
4169
+ },
4170
+ y: {
4171
+ type: 'number',
4172
+ },
4173
+ },
4174
+ required: ['x', 'y'],
4175
+ additionalProperties: false,
4176
+ },
4177
+ },
4178
+ additionalProperties: false,
4179
+ },
4180
+ },
4181
+ required: ['expectedRevision', 'type', 'nodeId', 'patch'],
4182
+ additionalProperties: false,
4183
+ },
4184
+ {
4185
+ type: 'object',
4186
+ properties: {
4187
+ expectedRevision: {
4188
+ type: 'integer',
4189
+ minimum: 0,
4190
+ },
4191
+ type: {
4192
+ type: 'string',
4193
+ enum: ['deleteNode'],
4194
+ },
4195
+ nodeId: {
4196
+ type: 'string',
4197
+ minLength: 1,
4198
+ },
4199
+ },
4200
+ required: ['expectedRevision', 'type', 'nodeId'],
4201
+ additionalProperties: false,
4202
+ },
4203
+ {
4204
+ type: 'object',
4205
+ properties: {
4206
+ expectedRevision: {
4207
+ type: 'integer',
4208
+ minimum: 0,
4209
+ },
4210
+ type: {
4211
+ type: 'string',
4212
+ enum: ['connectNodes'],
4213
+ },
4214
+ fromNodeId: {
4215
+ type: 'string',
4216
+ minLength: 1,
4217
+ },
4218
+ toNodeId: {
4219
+ type: 'string',
4220
+ minLength: 1,
4221
+ },
4222
+ },
4223
+ required: ['expectedRevision', 'type', 'fromNodeId', 'toNodeId'],
4224
+ additionalProperties: false,
4225
+ },
4226
+ {
4227
+ type: 'object',
4228
+ properties: {
4229
+ expectedRevision: {
4230
+ type: 'integer',
4231
+ minimum: 0,
4232
+ },
4233
+ type: {
4234
+ type: 'string',
4235
+ enum: ['disconnectNodes'],
4236
+ },
4237
+ edgeId: {
4238
+ type: 'string',
4239
+ minLength: 1,
4240
+ },
4241
+ },
4242
+ required: ['expectedRevision', 'type', 'edgeId'],
4243
+ additionalProperties: false,
4244
+ },
4245
+ {
4246
+ type: 'object',
4247
+ properties: {
4248
+ expectedRevision: {
4249
+ type: 'integer',
4250
+ minimum: 0,
4251
+ },
4252
+ type: {
4253
+ type: 'string',
4254
+ enum: ['publish'],
4255
+ },
4256
+ },
4257
+ required: ['expectedRevision', 'type'],
4258
+ additionalProperties: false,
4259
+ },
4260
+ {
4261
+ type: 'object',
4262
+ properties: {
4263
+ expectedRevision: {
4264
+ type: 'integer',
4265
+ minimum: 0,
4266
+ },
4267
+ type: {
4268
+ type: 'string',
4269
+ enum: ['deleteFlow'],
4270
+ },
4271
+ },
4272
+ required: ['expectedRevision', 'type'],
4273
+ additionalProperties: false,
4274
+ },
4275
+ ],
4276
+ },
4277
+ },
4278
+ required: ['command'],
4279
+ additionalProperties: false,
4280
+ },
4281
+ querySchema: null,
4282
+ responseSchema: {
4283
+ type: 'object',
4284
+ properties: {
4285
+ dataFlowId: {
4286
+ type: 'string',
4287
+ },
4288
+ deleted: {
4289
+ type: 'boolean',
4290
+ },
4291
+ },
4292
+ required: ['dataFlowId', 'deleted'],
4293
+ additionalProperties: false,
4294
+ },
4295
+ },
4296
+ factsList: {
4297
+ operationId: 'factsList',
4298
+ method: 'GET',
4299
+ path: '/v1/facts',
4300
+ scope: 'organization',
4301
+ bodySchema: null,
4302
+ querySchema: null,
4303
+ responseSchema: {
4304
+ type: 'object',
4305
+ properties: {
4306
+ items: {
4307
+ type: 'array',
4308
+ items: {
4309
+ type: 'object',
4310
+ properties: {
4311
+ name: {
4312
+ type: 'string',
4313
+ minLength: 1,
4314
+ maxLength: 255,
4315
+ },
4316
+ definition: {
4317
+ type: 'string',
4318
+ maxLength: 2000,
4319
+ nullable: true,
4320
+ },
4321
+ aliases: {
4322
+ type: 'string',
4323
+ maxLength: 1000,
4324
+ nullable: true,
4325
+ },
4326
+ formula: {
4327
+ type: 'string',
4328
+ maxLength: 2000,
4329
+ nullable: true,
4330
+ },
4331
+ formulaType: {
4332
+ type: 'string',
4333
+ enum: ['math', 'sql', null],
4334
+ nullable: true,
4335
+ },
4336
+ usualValue: {
4337
+ type: 'number',
4338
+ nullable: true,
4339
+ },
4340
+ usualValueMin: {
4341
+ type: 'number',
4342
+ nullable: true,
4343
+ },
4344
+ usualValueMax: {
4345
+ type: 'number',
4346
+ nullable: true,
4347
+ },
4348
+ unit: {
4349
+ type: 'string',
4350
+ maxLength: 255,
4351
+ nullable: true,
4352
+ },
4353
+ startDate: {
4354
+ type: 'string',
4355
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4356
+ nullable: true,
4357
+ },
4358
+ endDate: {
4359
+ type: 'string',
4360
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4361
+ nullable: true,
4362
+ },
4363
+ scope: {
4364
+ type: 'string',
4365
+ maxLength: 255,
4366
+ nullable: true,
4367
+ },
4368
+ metadata: {
4369
+ type: 'object',
4370
+ additionalProperties: {},
4371
+ nullable: true,
4372
+ },
4373
+ id: {
4374
+ type: 'string',
4375
+ },
4376
+ organizationId: {
4377
+ type: 'string',
4378
+ },
4379
+ key: {
4380
+ type: 'string',
4381
+ },
4382
+ type: {
4383
+ type: 'string',
4384
+ enum: ['definition', 'alias', 'formula', 'baseline'],
4385
+ },
4386
+ ownerId: {
4387
+ type: 'string',
4388
+ },
4389
+ createdAt: {
4390
+ type: 'string',
4391
+ },
4392
+ updatedAt: {
4393
+ type: 'string',
4394
+ },
4395
+ },
4396
+ required: ['name', 'id', 'organizationId', 'key', 'type', 'ownerId', 'createdAt', 'updatedAt'],
4397
+ additionalProperties: false,
4398
+ },
4399
+ },
4400
+ },
4401
+ required: ['items'],
4402
+ additionalProperties: false,
4403
+ },
4404
+ },
4405
+ factsCreate: {
4406
+ operationId: 'factsCreate',
4407
+ method: 'POST',
4408
+ path: '/v1/facts',
4409
+ scope: 'organization',
4410
+ bodySchema: {
4411
+ type: 'object',
4412
+ properties: {
4413
+ name: {
4414
+ type: 'string',
4415
+ minLength: 1,
4416
+ maxLength: 255,
4417
+ },
4418
+ definition: {
4419
+ type: 'string',
4420
+ maxLength: 2000,
4421
+ nullable: true,
4422
+ },
4423
+ aliases: {
4424
+ type: 'string',
4425
+ maxLength: 1000,
4426
+ nullable: true,
4427
+ },
4428
+ formula: {
4429
+ type: 'string',
4430
+ maxLength: 2000,
4431
+ nullable: true,
4432
+ },
4433
+ formulaType: {
4434
+ type: 'string',
4435
+ enum: ['math', 'sql', null],
4436
+ nullable: true,
4437
+ },
4438
+ usualValue: {
4439
+ type: 'number',
4440
+ nullable: true,
4441
+ },
4442
+ usualValueMin: {
4443
+ type: 'number',
4444
+ nullable: true,
4445
+ },
4446
+ usualValueMax: {
4447
+ type: 'number',
4448
+ nullable: true,
4449
+ },
4450
+ unit: {
4451
+ type: 'string',
4452
+ maxLength: 255,
4453
+ nullable: true,
4454
+ },
4455
+ startDate: {
4456
+ type: 'string',
4457
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4458
+ nullable: true,
4459
+ },
4460
+ endDate: {
4461
+ type: 'string',
4462
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4463
+ nullable: true,
4464
+ },
4465
+ scope: {
4466
+ type: 'string',
4467
+ maxLength: 255,
4468
+ nullable: true,
4469
+ },
4470
+ metadata: {
4471
+ type: 'object',
4472
+ additionalProperties: {},
4473
+ nullable: true,
4474
+ },
4475
+ },
4476
+ required: ['name'],
4477
+ additionalProperties: false,
4478
+ },
4479
+ querySchema: null,
4480
+ responseSchema: {
4481
+ type: 'object',
4482
+ properties: {
4483
+ name: {
4484
+ type: 'string',
4485
+ minLength: 1,
4486
+ maxLength: 255,
4487
+ },
4488
+ definition: {
4489
+ type: 'string',
4490
+ maxLength: 2000,
4491
+ nullable: true,
4492
+ },
4493
+ aliases: {
4494
+ type: 'string',
4495
+ maxLength: 1000,
4496
+ nullable: true,
4497
+ },
4498
+ formula: {
4499
+ type: 'string',
4500
+ maxLength: 2000,
4501
+ nullable: true,
4502
+ },
4503
+ formulaType: {
4504
+ type: 'string',
4505
+ enum: ['math', 'sql', null],
4506
+ nullable: true,
4507
+ },
4508
+ usualValue: {
4509
+ type: 'number',
4510
+ nullable: true,
4511
+ },
4512
+ usualValueMin: {
4513
+ type: 'number',
4514
+ nullable: true,
4515
+ },
4516
+ usualValueMax: {
4517
+ type: 'number',
4518
+ nullable: true,
4519
+ },
4520
+ unit: {
4521
+ type: 'string',
4522
+ maxLength: 255,
4523
+ nullable: true,
4524
+ },
4525
+ startDate: {
4526
+ type: 'string',
4527
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4528
+ nullable: true,
4529
+ },
4530
+ endDate: {
4531
+ type: 'string',
4532
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4533
+ nullable: true,
4534
+ },
4535
+ scope: {
4536
+ type: 'string',
4537
+ maxLength: 255,
4538
+ nullable: true,
4539
+ },
4540
+ metadata: {
4541
+ type: 'object',
4542
+ additionalProperties: {},
4543
+ nullable: true,
4544
+ },
4545
+ id: {
4546
+ type: 'string',
4547
+ },
4548
+ organizationId: {
4549
+ type: 'string',
4550
+ },
4551
+ key: {
4552
+ type: 'string',
4553
+ },
4554
+ type: {
4555
+ type: 'string',
4556
+ enum: ['definition', 'alias', 'formula', 'baseline'],
4557
+ },
4558
+ ownerId: {
4559
+ type: 'string',
4560
+ },
4561
+ createdAt: {
4562
+ type: 'string',
4563
+ },
4564
+ updatedAt: {
4565
+ type: 'string',
4566
+ },
4567
+ },
4568
+ required: ['name', 'id', 'organizationId', 'key', 'type', 'ownerId', 'createdAt', 'updatedAt'],
4569
+ additionalProperties: false,
4570
+ },
4571
+ },
4572
+ factsGet: {
4573
+ operationId: 'factsGet',
4574
+ method: 'GET',
4575
+ path: '/v1/facts/{factId}',
4576
+ scope: 'organization',
4577
+ bodySchema: null,
4578
+ querySchema: null,
4579
+ responseSchema: {
4580
+ type: 'object',
4581
+ properties: {
4582
+ name: {
4583
+ type: 'string',
4584
+ minLength: 1,
4585
+ maxLength: 255,
4586
+ },
4587
+ definition: {
4588
+ type: 'string',
4589
+ maxLength: 2000,
4590
+ nullable: true,
4591
+ },
4592
+ aliases: {
4593
+ type: 'string',
4594
+ maxLength: 1000,
4595
+ nullable: true,
4596
+ },
4597
+ formula: {
4598
+ type: 'string',
4599
+ maxLength: 2000,
4600
+ nullable: true,
4601
+ },
4602
+ formulaType: {
4603
+ type: 'string',
4604
+ enum: ['math', 'sql', null],
4605
+ nullable: true,
4606
+ },
4607
+ usualValue: {
4608
+ type: 'number',
4609
+ nullable: true,
4610
+ },
4611
+ usualValueMin: {
4612
+ type: 'number',
4613
+ nullable: true,
4614
+ },
4615
+ usualValueMax: {
4616
+ type: 'number',
4617
+ nullable: true,
4618
+ },
4619
+ unit: {
4620
+ type: 'string',
4621
+ maxLength: 255,
4622
+ nullable: true,
4623
+ },
4624
+ startDate: {
4625
+ type: 'string',
4626
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4627
+ nullable: true,
4628
+ },
4629
+ endDate: {
4630
+ type: 'string',
4631
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4632
+ nullable: true,
4633
+ },
4634
+ scope: {
4635
+ type: 'string',
4636
+ maxLength: 255,
4637
+ nullable: true,
4638
+ },
4639
+ metadata: {
4640
+ type: 'object',
4641
+ additionalProperties: {},
4642
+ nullable: true,
4643
+ },
4644
+ id: {
4645
+ type: 'string',
4646
+ },
4647
+ organizationId: {
4648
+ type: 'string',
4649
+ },
4650
+ key: {
4651
+ type: 'string',
4652
+ },
4653
+ type: {
4654
+ type: 'string',
4655
+ enum: ['definition', 'alias', 'formula', 'baseline'],
4656
+ },
4657
+ ownerId: {
4658
+ type: 'string',
4659
+ },
4660
+ createdAt: {
4661
+ type: 'string',
4662
+ },
4663
+ updatedAt: {
4664
+ type: 'string',
4665
+ },
4666
+ },
4667
+ required: ['name', 'id', 'organizationId', 'key', 'type', 'ownerId', 'createdAt', 'updatedAt'],
4668
+ additionalProperties: false,
4669
+ },
4670
+ },
4671
+ factsUpdate: {
4672
+ operationId: 'factsUpdate',
4673
+ method: 'PUT',
4674
+ path: '/v1/facts/{factId}',
4675
+ scope: 'organization',
4676
+ bodySchema: {
4677
+ type: 'object',
4678
+ properties: {
4679
+ name: {
4680
+ type: 'string',
4681
+ minLength: 1,
4682
+ maxLength: 255,
4683
+ },
4684
+ definition: {
4685
+ type: 'string',
4686
+ maxLength: 2000,
4687
+ nullable: true,
4688
+ },
4689
+ aliases: {
4690
+ type: 'string',
4691
+ maxLength: 1000,
4692
+ nullable: true,
4693
+ },
4694
+ formula: {
4695
+ type: 'string',
4696
+ maxLength: 2000,
4697
+ nullable: true,
4698
+ },
4699
+ formulaType: {
4700
+ type: 'string',
4701
+ enum: ['math', 'sql', null],
4702
+ nullable: true,
4703
+ },
4704
+ usualValue: {
4705
+ type: 'number',
4706
+ nullable: true,
4707
+ },
4708
+ usualValueMin: {
4709
+ type: 'number',
4710
+ nullable: true,
4711
+ },
4712
+ usualValueMax: {
4713
+ type: 'number',
4714
+ nullable: true,
4715
+ },
4716
+ unit: {
4717
+ type: 'string',
4718
+ maxLength: 255,
4719
+ nullable: true,
4720
+ },
4721
+ startDate: {
4722
+ type: 'string',
4723
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4724
+ nullable: true,
4725
+ },
4726
+ endDate: {
4727
+ type: 'string',
4728
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4729
+ nullable: true,
4730
+ },
4731
+ scope: {
4732
+ type: 'string',
4733
+ maxLength: 255,
4734
+ nullable: true,
4735
+ },
4736
+ metadata: {
4737
+ type: 'object',
4738
+ additionalProperties: {},
4739
+ nullable: true,
4740
+ },
4741
+ },
4742
+ required: ['name'],
4743
+ additionalProperties: false,
4744
+ },
4745
+ querySchema: null,
4746
+ responseSchema: {
4747
+ type: 'object',
4748
+ properties: {
4749
+ name: {
4750
+ type: 'string',
4751
+ minLength: 1,
4752
+ maxLength: 255,
4753
+ },
4754
+ definition: {
4755
+ type: 'string',
4756
+ maxLength: 2000,
4757
+ nullable: true,
4758
+ },
4759
+ aliases: {
4760
+ type: 'string',
4761
+ maxLength: 1000,
4762
+ nullable: true,
4763
+ },
4764
+ formula: {
4765
+ type: 'string',
4766
+ maxLength: 2000,
4767
+ nullable: true,
4768
+ },
4769
+ formulaType: {
4770
+ type: 'string',
4771
+ enum: ['math', 'sql', null],
4772
+ nullable: true,
4773
+ },
4774
+ usualValue: {
4775
+ type: 'number',
4776
+ nullable: true,
4777
+ },
4778
+ usualValueMin: {
4779
+ type: 'number',
4780
+ nullable: true,
4781
+ },
4782
+ usualValueMax: {
4783
+ type: 'number',
4784
+ nullable: true,
4785
+ },
4786
+ unit: {
4787
+ type: 'string',
4788
+ maxLength: 255,
4789
+ nullable: true,
4790
+ },
4791
+ startDate: {
4792
+ type: 'string',
4793
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4794
+ nullable: true,
4795
+ },
4796
+ endDate: {
4797
+ type: 'string',
4798
+ pattern: '^\\d{4}-\\d{2}-\\d{2}$',
4799
+ nullable: true,
4800
+ },
4801
+ scope: {
4802
+ type: 'string',
4803
+ maxLength: 255,
4804
+ nullable: true,
4805
+ },
4806
+ metadata: {
4807
+ type: 'object',
4808
+ additionalProperties: {},
4809
+ nullable: true,
4810
+ },
4811
+ id: {
4812
+ type: 'string',
4813
+ },
4814
+ organizationId: {
4815
+ type: 'string',
4816
+ },
4817
+ key: {
4818
+ type: 'string',
4819
+ },
4820
+ type: {
4821
+ type: 'string',
4822
+ enum: ['definition', 'alias', 'formula', 'baseline'],
4823
+ },
4824
+ ownerId: {
4825
+ type: 'string',
4826
+ },
4827
+ createdAt: {
4828
+ type: 'string',
4829
+ },
4830
+ updatedAt: {
4831
+ type: 'string',
4832
+ },
4833
+ },
4834
+ required: ['name', 'id', 'organizationId', 'key', 'type', 'ownerId', 'createdAt', 'updatedAt'],
4835
+ additionalProperties: false,
4836
+ },
4837
+ },
4838
+ factsDelete: {
4839
+ operationId: 'factsDelete',
4840
+ method: 'DELETE',
4841
+ path: '/v1/facts/{factId}',
4842
+ scope: 'organization',
4843
+ bodySchema: null,
4844
+ querySchema: null,
4845
+ responseSchema: {
4846
+ type: 'object',
4847
+ properties: {
4848
+ success: {
4849
+ type: 'boolean',
4850
+ },
4851
+ message: {
4852
+ type: 'string',
4853
+ },
4854
+ },
4855
+ required: ['success', 'message'],
4856
+ additionalProperties: false,
4857
+ },
4858
+ },
4859
+ skillsList: {
4860
+ operationId: 'skillsList',
4861
+ method: 'GET',
4862
+ path: '/v1/skills',
4863
+ scope: 'workspace',
4864
+ bodySchema: null,
4865
+ querySchema: null,
4866
+ responseSchema: {
4867
+ type: 'object',
4868
+ properties: {
4869
+ items: {
4870
+ type: 'array',
4871
+ items: {
4872
+ type: 'object',
4873
+ properties: {
4874
+ file: {
4875
+ type: 'string',
4876
+ },
4877
+ lastModified: {
4878
+ type: 'string',
4879
+ nullable: true,
4880
+ },
4881
+ description: {
4882
+ type: 'string',
4883
+ nullable: true,
4884
+ },
4885
+ },
4886
+ required: ['file', 'lastModified', 'description'],
4887
+ additionalProperties: false,
4888
+ },
4889
+ },
4890
+ },
4891
+ required: ['items'],
4892
+ additionalProperties: false,
4893
+ },
4894
+ },
4895
+ skillsGet: {
4896
+ operationId: 'skillsGet',
4897
+ method: 'GET',
4898
+ path: '/v1/skills/{path}',
4899
+ scope: 'workspace',
4900
+ bodySchema: null,
4901
+ querySchema: null,
4902
+ responseSchema: {
4903
+ type: 'object',
4904
+ properties: {
4905
+ content: {
4906
+ type: 'string',
4907
+ },
4908
+ },
4909
+ required: ['content'],
4910
+ additionalProperties: false,
4911
+ },
4912
+ },
4913
+ skillsUpdate: {
4914
+ operationId: 'skillsUpdate',
4915
+ method: 'PUT',
4916
+ path: '/v1/skills/{path}',
4917
+ scope: 'workspace',
4918
+ bodySchema: {
4919
+ type: 'object',
4920
+ properties: {
4921
+ content: {
4922
+ type: 'string',
4923
+ },
4924
+ },
4925
+ required: ['content'],
4926
+ additionalProperties: false,
4927
+ },
4928
+ querySchema: null,
4929
+ responseSchema: {
4930
+ type: 'object',
4931
+ properties: {
4932
+ success: {
4933
+ type: 'boolean',
4934
+ },
4935
+ message: {
4936
+ type: 'string',
4937
+ },
4938
+ },
4939
+ required: ['success', 'message'],
4940
+ additionalProperties: false,
4941
+ },
4942
+ },
4943
+ skillsDelete: {
4944
+ operationId: 'skillsDelete',
4945
+ method: 'DELETE',
4946
+ path: '/v1/skills/{path}',
4947
+ scope: 'workspace',
4948
+ bodySchema: null,
4949
+ querySchema: null,
4950
+ responseSchema: {
4951
+ type: 'object',
4952
+ properties: {
4953
+ success: {
4954
+ type: 'boolean',
4955
+ },
4956
+ message: {
4957
+ type: 'string',
4958
+ },
4959
+ },
4960
+ required: ['success', 'message'],
4961
+ additionalProperties: false,
4962
+ },
4963
+ },
4964
+ organizationSkillsList: {
4965
+ operationId: 'organizationSkillsList',
4966
+ method: 'GET',
4967
+ path: '/v1/organization/skills',
4968
+ scope: 'organization',
4969
+ bodySchema: null,
4970
+ querySchema: null,
4971
+ responseSchema: {
4972
+ type: 'object',
4973
+ properties: {
4974
+ items: {
4975
+ type: 'array',
4976
+ items: {
4977
+ type: 'object',
4978
+ properties: {
4979
+ file: {
4980
+ type: 'string',
4981
+ },
4982
+ lastModified: {
4983
+ type: 'string',
4984
+ nullable: true,
4985
+ },
4986
+ description: {
4987
+ type: 'string',
4988
+ nullable: true,
4989
+ },
4990
+ },
4991
+ required: ['file', 'lastModified', 'description'],
4992
+ additionalProperties: false,
4993
+ },
4994
+ },
4995
+ },
4996
+ required: ['items'],
4997
+ additionalProperties: false,
4998
+ },
4999
+ },
5000
+ organizationSkillsGet: {
5001
+ operationId: 'organizationSkillsGet',
5002
+ method: 'GET',
5003
+ path: '/v1/organization/skills/{path}',
5004
+ scope: 'organization',
5005
+ bodySchema: null,
5006
+ querySchema: null,
5007
+ responseSchema: {
5008
+ type: 'object',
5009
+ properties: {
5010
+ content: {
5011
+ type: 'string',
5012
+ },
5013
+ },
5014
+ required: ['content'],
5015
+ additionalProperties: false,
5016
+ },
5017
+ },
5018
+ organizationSkillsUpdate: {
5019
+ operationId: 'organizationSkillsUpdate',
5020
+ method: 'PUT',
5021
+ path: '/v1/organization/skills/{path}',
5022
+ scope: 'organization',
5023
+ bodySchema: {
5024
+ type: 'object',
5025
+ properties: {
5026
+ content: {
5027
+ type: 'string',
5028
+ },
5029
+ },
5030
+ required: ['content'],
5031
+ additionalProperties: false,
5032
+ },
5033
+ querySchema: null,
5034
+ responseSchema: {
5035
+ type: 'object',
5036
+ properties: {
5037
+ success: {
5038
+ type: 'boolean',
5039
+ },
5040
+ message: {
5041
+ type: 'string',
5042
+ },
5043
+ },
5044
+ required: ['success', 'message'],
5045
+ additionalProperties: false,
5046
+ },
5047
+ },
5048
+ organizationSkillsDelete: {
5049
+ operationId: 'organizationSkillsDelete',
5050
+ method: 'DELETE',
5051
+ path: '/v1/organization/skills/{path}',
5052
+ scope: 'organization',
5053
+ bodySchema: null,
5054
+ querySchema: null,
5055
+ responseSchema: {
5056
+ type: 'object',
5057
+ properties: {
5058
+ success: {
5059
+ type: 'boolean',
5060
+ },
5061
+ message: {
5062
+ type: 'string',
5063
+ },
5064
+ },
5065
+ required: ['success', 'message'],
5066
+ additionalProperties: false,
5067
+ },
5068
+ },
5069
+ databasesList: {
5070
+ operationId: 'databasesList',
5071
+ method: 'GET',
5072
+ path: '/v1/databases',
5073
+ scope: 'workspace',
5074
+ bodySchema: null,
5075
+ querySchema: null,
5076
+ responseSchema: {
5077
+ type: 'object',
5078
+ properties: {
5079
+ items: {
5080
+ type: 'array',
5081
+ items: {
5082
+ type: 'object',
5083
+ properties: {
5084
+ id: {
5085
+ type: 'string',
5086
+ },
5087
+ workspaceId: {
5088
+ type: 'string',
5089
+ },
5090
+ name: {
5091
+ type: 'string',
5092
+ },
5093
+ key: {
5094
+ type: 'string',
5095
+ },
5096
+ status: {
5097
+ type: 'string',
5098
+ enum: ['provisioning', 'ready', 'deleting', 'failed', 'deleted'],
5099
+ },
5100
+ createdAt: {
5101
+ type: 'string',
5102
+ },
5103
+ updatedAt: {
5104
+ type: 'string',
5105
+ },
5106
+ },
5107
+ required: ['id', 'workspaceId', 'name', 'key', 'status', 'createdAt', 'updatedAt'],
5108
+ additionalProperties: false,
5109
+ },
5110
+ },
5111
+ },
5112
+ required: ['items'],
5113
+ additionalProperties: false,
5114
+ },
5115
+ },
5116
+ databasesCreate: {
5117
+ operationId: 'databasesCreate',
5118
+ method: 'POST',
5119
+ path: '/v1/databases',
5120
+ scope: 'workspace',
5121
+ bodySchema: {
5122
+ type: 'object',
5123
+ properties: {
5124
+ name: {
5125
+ type: 'string',
5126
+ minLength: 1,
5127
+ maxLength: 255,
5128
+ },
5129
+ key: {
5130
+ type: 'string',
5131
+ pattern: '^[a-zA-Z0-9_-]{1,128}$',
5132
+ },
5133
+ },
5134
+ required: ['name', 'key'],
5135
+ additionalProperties: false,
5136
+ },
5137
+ querySchema: null,
5138
+ responseSchema: {
5139
+ type: 'object',
5140
+ properties: {
5141
+ id: {
5142
+ type: 'string',
5143
+ },
5144
+ workspaceId: {
5145
+ type: 'string',
5146
+ },
5147
+ name: {
5148
+ type: 'string',
5149
+ },
5150
+ key: {
5151
+ type: 'string',
5152
+ },
5153
+ status: {
5154
+ type: 'string',
5155
+ enum: ['provisioning', 'ready', 'deleting', 'failed', 'deleted'],
5156
+ },
5157
+ createdAt: {
5158
+ type: 'string',
5159
+ },
5160
+ updatedAt: {
5161
+ type: 'string',
5162
+ },
5163
+ },
5164
+ required: ['id', 'workspaceId', 'name', 'key', 'status', 'createdAt', 'updatedAt'],
5165
+ additionalProperties: false,
5166
+ },
5167
+ },
5168
+ databasesGet: {
5169
+ operationId: 'databasesGet',
5170
+ method: 'GET',
5171
+ path: '/v1/databases/{databaseId}',
5172
+ scope: 'workspace',
5173
+ bodySchema: null,
5174
+ querySchema: null,
5175
+ responseSchema: {
5176
+ type: 'object',
5177
+ properties: {
5178
+ id: {
5179
+ type: 'string',
5180
+ },
5181
+ workspaceId: {
5182
+ type: 'string',
5183
+ },
5184
+ name: {
5185
+ type: 'string',
5186
+ },
5187
+ key: {
5188
+ type: 'string',
5189
+ },
5190
+ status: {
5191
+ type: 'string',
5192
+ enum: ['provisioning', 'ready', 'deleting', 'failed', 'deleted'],
5193
+ },
5194
+ createdAt: {
5195
+ type: 'string',
5196
+ },
5197
+ updatedAt: {
5198
+ type: 'string',
5199
+ },
5200
+ },
5201
+ required: ['id', 'workspaceId', 'name', 'key', 'status', 'createdAt', 'updatedAt'],
5202
+ additionalProperties: false,
5203
+ },
5204
+ },
5205
+ databasesDelete: {
5206
+ operationId: 'databasesDelete',
5207
+ method: 'DELETE',
5208
+ path: '/v1/databases/{databaseId}',
5209
+ scope: 'workspace',
5210
+ bodySchema: null,
5211
+ querySchema: null,
5212
+ responseSchema: {
5213
+ type: 'object',
5214
+ properties: {
5215
+ id: {
5216
+ type: 'string',
5217
+ },
5218
+ workspaceId: {
5219
+ type: 'string',
5220
+ },
5221
+ name: {
5222
+ type: 'string',
5223
+ },
5224
+ key: {
5225
+ type: 'string',
5226
+ },
5227
+ status: {
5228
+ type: 'string',
5229
+ enum: ['provisioning', 'ready', 'deleting', 'failed', 'deleted'],
5230
+ },
5231
+ createdAt: {
5232
+ type: 'string',
5233
+ },
5234
+ updatedAt: {
5235
+ type: 'string',
5236
+ },
5237
+ },
5238
+ required: ['id', 'workspaceId', 'name', 'key', 'status', 'createdAt', 'updatedAt'],
5239
+ additionalProperties: false,
5240
+ },
5241
+ },
5242
+ databaseTablesList: {
5243
+ operationId: 'databaseTablesList',
5244
+ method: 'GET',
5245
+ path: '/v1/databases/{databaseId}/tables',
5246
+ scope: 'workspace',
5247
+ bodySchema: null,
5248
+ querySchema: null,
5249
+ responseSchema: {
5250
+ type: 'object',
5251
+ properties: {
5252
+ items: {
5253
+ type: 'array',
5254
+ items: {
5255
+ type: 'object',
5256
+ properties: {
5257
+ schema: {
5258
+ type: 'string',
5259
+ },
5260
+ name: {
5261
+ type: 'string',
5262
+ },
5263
+ columns: {
5264
+ type: 'array',
5265
+ items: {
5266
+ type: 'object',
5267
+ properties: {
5268
+ name: {
5269
+ type: 'string',
5270
+ },
5271
+ type: {
5272
+ type: 'string',
5273
+ },
5274
+ nullable: {
5275
+ type: 'boolean',
5276
+ },
5277
+ },
5278
+ required: ['name', 'type', 'nullable'],
5279
+ additionalProperties: false,
5280
+ },
5281
+ },
5282
+ primaryKey: {
5283
+ type: 'array',
5284
+ items: {
5285
+ type: 'string',
5286
+ },
5287
+ },
5288
+ },
5289
+ required: ['schema', 'name', 'columns', 'primaryKey'],
5290
+ additionalProperties: false,
5291
+ },
5292
+ },
5293
+ },
5294
+ required: ['items'],
5295
+ additionalProperties: false,
5296
+ },
5297
+ },
5298
+ databaseTablesCreate: {
5299
+ operationId: 'databaseTablesCreate',
5300
+ method: 'POST',
5301
+ path: '/v1/databases/{databaseId}/tables',
5302
+ scope: 'workspace',
5303
+ bodySchema: {
5304
+ type: 'object',
5305
+ properties: {
5306
+ name: {
5307
+ type: 'string',
5308
+ pattern: '^[a-z][a-z0-9_]{0,62}$',
5309
+ },
5310
+ columns: {
5311
+ type: 'array',
5312
+ items: {
5313
+ type: 'object',
5314
+ properties: {
5315
+ name: {
5316
+ type: 'string',
5317
+ pattern: '^[a-z][a-z0-9_]{0,62}$',
5318
+ },
5319
+ type: {
5320
+ type: 'string',
5321
+ enum: ['text', 'boolean', 'bigint', 'numeric', 'uuid', 'date', 'timestamptz', 'jsonb'],
5322
+ },
5323
+ nullable: {
5324
+ type: 'boolean',
5325
+ default: false,
5326
+ },
5327
+ },
5328
+ required: ['name', 'type'],
5329
+ additionalProperties: false,
5330
+ },
5331
+ minItems: 1,
5332
+ maxItems: 100,
5333
+ },
5334
+ primaryKey: {
5335
+ type: 'array',
5336
+ items: {
5337
+ type: 'string',
5338
+ pattern: '^[a-z][a-z0-9_]{0,62}$',
5339
+ },
5340
+ minItems: 1,
5341
+ maxItems: 8,
5342
+ },
5343
+ },
5344
+ required: ['name', 'columns', 'primaryKey'],
5345
+ additionalProperties: false,
5346
+ },
5347
+ querySchema: null,
5348
+ responseSchema: {
5349
+ type: 'object',
5350
+ properties: {
5351
+ name: {
5352
+ type: 'string',
5353
+ },
5354
+ },
5355
+ required: ['name'],
5356
+ additionalProperties: false,
5357
+ },
5358
+ },
5359
+ databaseRecordsList: {
5360
+ operationId: 'databaseRecordsList',
5361
+ method: 'GET',
5362
+ path: '/v1/databases/{databaseId}/tables/{table}/records',
5363
+ scope: 'workspace',
5364
+ bodySchema: null,
5365
+ querySchema: {
5366
+ type: 'object',
5367
+ properties: {
5368
+ schema: {
5369
+ type: 'string',
5370
+ minLength: 1,
5371
+ maxLength: 63,
5372
+ },
5373
+ limit: {
5374
+ type: 'integer',
5375
+ minimum: 1,
5376
+ maximum: 1000,
5377
+ default: 100,
5378
+ },
5379
+ offset: {
5380
+ type: 'integer',
5381
+ minimum: 0,
5382
+ maximum: 100000,
5383
+ default: 0,
5384
+ },
5385
+ },
5386
+ required: [],
5387
+ additionalProperties: false,
5388
+ },
5389
+ responseSchema: {
5390
+ type: 'object',
5391
+ properties: {
5392
+ items: {
5393
+ type: 'array',
5394
+ items: {
5395
+ type: 'object',
5396
+ additionalProperties: {},
5397
+ },
5398
+ },
5399
+ },
5400
+ required: ['items'],
5401
+ additionalProperties: false,
5402
+ },
5403
+ },
5404
+ databaseTransactionsCreate: {
5405
+ operationId: 'databaseTransactionsCreate',
5406
+ method: 'POST',
5407
+ path: '/v1/databases/{databaseId}/transactions',
5408
+ scope: 'workspace',
5409
+ bodySchema: {
5410
+ type: 'object',
5411
+ properties: {
5412
+ requestId: {
5413
+ type: 'string',
5414
+ pattern: '^[a-zA-Z0-9_-]{1,128}$',
5415
+ },
5416
+ mutations: {
5417
+ type: 'array',
5418
+ items: {
5419
+ anyOf: [
5420
+ {
5421
+ type: 'object',
5422
+ properties: {
5423
+ type: {
5424
+ type: 'string',
5425
+ enum: ['insert'],
5426
+ },
5427
+ table: {
5428
+ type: 'string',
5429
+ pattern: '^[a-z][a-z0-9_]{0,62}$',
5430
+ },
5431
+ values: {
5432
+ type: 'object',
5433
+ additionalProperties: {},
5434
+ },
5435
+ },
5436
+ required: ['type', 'table', 'values'],
5437
+ additionalProperties: false,
5438
+ },
5439
+ {
5440
+ type: 'object',
5441
+ properties: {
5442
+ type: {
5443
+ type: 'string',
5444
+ enum: ['update'],
5445
+ },
5446
+ table: {
5447
+ type: 'string',
5448
+ pattern: '^[a-z][a-z0-9_]{0,62}$',
5449
+ },
5450
+ key: {
5451
+ type: 'object',
5452
+ additionalProperties: {},
5453
+ },
5454
+ expectedVersion: {
5455
+ type: 'string',
5456
+ format: 'uuid',
5457
+ },
5458
+ values: {
5459
+ type: 'object',
5460
+ additionalProperties: {},
5461
+ },
5462
+ },
5463
+ required: ['type', 'table', 'key', 'expectedVersion', 'values'],
5464
+ additionalProperties: false,
5465
+ },
5466
+ {
5467
+ type: 'object',
5468
+ properties: {
5469
+ type: {
5470
+ type: 'string',
5471
+ enum: ['delete'],
5472
+ },
5473
+ table: {
5474
+ type: 'string',
5475
+ pattern: '^[a-z][a-z0-9_]{0,62}$',
5476
+ },
5477
+ key: {
5478
+ type: 'object',
5479
+ additionalProperties: {},
5480
+ },
5481
+ expectedVersion: {
5482
+ type: 'string',
5483
+ format: 'uuid',
5484
+ },
5485
+ },
5486
+ required: ['type', 'table', 'key', 'expectedVersion'],
5487
+ additionalProperties: false,
5488
+ },
5489
+ ],
5490
+ },
5491
+ minItems: 1,
5492
+ maxItems: 100,
5493
+ },
5494
+ },
5495
+ required: ['requestId', 'mutations'],
5496
+ additionalProperties: false,
5497
+ },
5498
+ querySchema: null,
5499
+ responseSchema: {
5500
+ type: 'object',
5501
+ properties: {
5502
+ requestId: {
5503
+ type: 'string',
5504
+ },
5505
+ versions: {
5506
+ type: 'array',
5507
+ items: {
5508
+ type: 'string',
5509
+ format: 'uuid',
5510
+ },
5511
+ },
5512
+ },
5513
+ required: ['requestId', 'versions'],
5514
+ additionalProperties: false,
5515
+ },
5516
+ },
1757
5517
  };