@highstate/backend 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/{index.mjs → index.js} +1254 -915
  2. package/dist/library/source-resolution-worker.js +55 -0
  3. package/dist/library/worker/main.js +207 -0
  4. package/dist/{terminal-CqIsctlZ.mjs → library-BW5oPM7V.js} +210 -87
  5. package/dist/shared/index.js +6 -0
  6. package/dist/utils-ByadNcv4.js +102 -0
  7. package/package.json +14 -18
  8. package/src/common/index.ts +3 -0
  9. package/src/common/local.ts +22 -0
  10. package/src/common/pulumi.ts +230 -0
  11. package/src/common/utils.ts +137 -0
  12. package/src/config.ts +40 -0
  13. package/src/index.ts +6 -0
  14. package/src/library/abstractions.ts +83 -0
  15. package/src/library/factory.ts +20 -0
  16. package/src/library/index.ts +2 -0
  17. package/src/library/local.ts +404 -0
  18. package/src/library/source-resolution-worker.ts +96 -0
  19. package/src/library/worker/evaluator.ts +119 -0
  20. package/src/library/worker/loader.ts +93 -0
  21. package/src/library/worker/main.ts +82 -0
  22. package/src/library/worker/protocol.ts +38 -0
  23. package/src/orchestrator/index.ts +1 -0
  24. package/src/orchestrator/manager.ts +165 -0
  25. package/src/orchestrator/operation-workset.ts +483 -0
  26. package/src/orchestrator/operation.ts +647 -0
  27. package/src/preferences/shared.ts +1 -0
  28. package/src/project/abstractions.ts +89 -0
  29. package/src/project/factory.ts +11 -0
  30. package/src/project/index.ts +4 -0
  31. package/src/project/local.ts +412 -0
  32. package/src/project/lock.ts +39 -0
  33. package/src/project/manager.ts +374 -0
  34. package/src/runner/abstractions.ts +146 -0
  35. package/src/runner/factory.ts +22 -0
  36. package/src/runner/index.ts +2 -0
  37. package/src/runner/local.ts +698 -0
  38. package/src/secret/abstractions.ts +59 -0
  39. package/src/secret/factory.ts +22 -0
  40. package/src/secret/index.ts +2 -0
  41. package/src/secret/local.ts +152 -0
  42. package/src/services.ts +133 -0
  43. package/src/shared/index.ts +10 -0
  44. package/src/shared/library.ts +77 -0
  45. package/src/shared/operation.ts +85 -0
  46. package/src/shared/project.ts +62 -0
  47. package/src/shared/resolvers/graph-resolver.ts +111 -0
  48. package/src/shared/resolvers/input-hash.ts +77 -0
  49. package/src/shared/resolvers/input.ts +314 -0
  50. package/src/shared/resolvers/registry.ts +10 -0
  51. package/src/shared/resolvers/validation.ts +94 -0
  52. package/src/shared/state.ts +262 -0
  53. package/src/shared/terminal.ts +13 -0
  54. package/src/state/abstractions.ts +222 -0
  55. package/src/state/factory.ts +22 -0
  56. package/src/state/index.ts +3 -0
  57. package/src/state/local.ts +605 -0
  58. package/src/state/manager.ts +33 -0
  59. package/src/terminal/docker.ts +90 -0
  60. package/src/terminal/factory.ts +20 -0
  61. package/src/terminal/index.ts +3 -0
  62. package/src/terminal/manager.ts +330 -0
  63. package/src/terminal/run.sh.ts +37 -0
  64. package/src/terminal/shared.ts +50 -0
  65. package/src/workspace/abstractions.ts +41 -0
  66. package/src/workspace/factory.ts +14 -0
  67. package/src/workspace/index.ts +2 -0
  68. package/src/workspace/local.ts +54 -0
  69. package/dist/index.d.ts +0 -760
  70. package/dist/library/worker/main.mjs +0 -164
  71. package/dist/runner/source-resolution-worker.mjs +0 -22
  72. package/dist/shared/index.d.ts +0 -85
  73. package/dist/shared/index.mjs +0 -54
  74. package/dist/terminal-Cm2WqcyB.d.ts +0 -1589
@@ -1,1589 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const positionSchema: z.ZodObject<{
4
- x: z.ZodNumber;
5
- y: z.ZodNumber;
6
- }, "strip", z.ZodTypeAny, {
7
- x: number;
8
- y: number;
9
- }, {
10
- x: number;
11
- y: number;
12
- }>;
13
- declare const instanceInputSchema: z.ZodObject<{
14
- instanceId: z.ZodString;
15
- output: z.ZodString;
16
- }, "strip", z.ZodTypeAny, {
17
- instanceId: string;
18
- output: string;
19
- }, {
20
- instanceId: string;
21
- output: string;
22
- }>;
23
- declare const hubInstanceInputSchema: z.ZodObject<{
24
- hubId: z.ZodString;
25
- }, "strip", z.ZodTypeAny, {
26
- hubId: string;
27
- }, {
28
- hubId: string;
29
- }>;
30
- declare const instanceModelPatchSchema: z.ZodObject<{
31
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
32
- inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
33
- instanceId: z.ZodString;
34
- output: z.ZodString;
35
- }, "strip", z.ZodTypeAny, {
36
- instanceId: string;
37
- output: string;
38
- }, {
39
- instanceId: string;
40
- output: string;
41
- }>, "many">>>;
42
- hubInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
43
- hubId: z.ZodString;
44
- }, "strip", z.ZodTypeAny, {
45
- hubId: string;
46
- }, {
47
- hubId: string;
48
- }>, "many">>>;
49
- injectionInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
50
- hubId: z.ZodString;
51
- }, "strip", z.ZodTypeAny, {
52
- hubId: string;
53
- }, {
54
- hubId: string;
55
- }>, "many">>;
56
- position: z.ZodOptional<z.ZodObject<{
57
- x: z.ZodNumber;
58
- y: z.ZodNumber;
59
- }, "strip", z.ZodTypeAny, {
60
- x: number;
61
- y: number;
62
- }, {
63
- x: number;
64
- y: number;
65
- }>>;
66
- }, "strip", z.ZodTypeAny, {
67
- args?: Record<string, unknown> | undefined;
68
- inputs?: Record<string, {
69
- instanceId: string;
70
- output: string;
71
- }[]> | undefined;
72
- hubInputs?: Record<string, {
73
- hubId: string;
74
- }[]> | undefined;
75
- injectionInputs?: {
76
- hubId: string;
77
- }[] | undefined;
78
- position?: {
79
- x: number;
80
- y: number;
81
- } | undefined;
82
- }, {
83
- args?: Record<string, unknown> | undefined;
84
- inputs?: Record<string, {
85
- instanceId: string;
86
- output: string;
87
- }[]> | undefined;
88
- hubInputs?: Record<string, {
89
- hubId: string;
90
- }[]> | undefined;
91
- injectionInputs?: {
92
- hubId: string;
93
- }[] | undefined;
94
- position?: {
95
- x: number;
96
- y: number;
97
- } | undefined;
98
- }>;
99
- declare const instanceModelSchema: z.ZodObject<{
100
- parentId: z.ZodOptional<z.ZodString>;
101
- outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
102
- instanceId: z.ZodString;
103
- output: z.ZodString;
104
- }, "strip", z.ZodTypeAny, {
105
- instanceId: string;
106
- output: string;
107
- }, {
108
- instanceId: string;
109
- output: string;
110
- }>, "many">>>;
111
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
112
- inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
113
- instanceId: z.ZodString;
114
- output: z.ZodString;
115
- }, "strip", z.ZodTypeAny, {
116
- instanceId: string;
117
- output: string;
118
- }, {
119
- instanceId: string;
120
- output: string;
121
- }>, "many">>>;
122
- hubInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
123
- hubId: z.ZodString;
124
- }, "strip", z.ZodTypeAny, {
125
- hubId: string;
126
- }, {
127
- hubId: string;
128
- }>, "many">>>;
129
- injectionInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
- hubId: z.ZodString;
131
- }, "strip", z.ZodTypeAny, {
132
- hubId: string;
133
- }, {
134
- hubId: string;
135
- }>, "many">>;
136
- position: z.ZodOptional<z.ZodObject<{
137
- x: z.ZodNumber;
138
- y: z.ZodNumber;
139
- }, "strip", z.ZodTypeAny, {
140
- x: number;
141
- y: number;
142
- }, {
143
- x: number;
144
- y: number;
145
- }>>;
146
- id: z.ZodString;
147
- type: z.ZodString;
148
- name: z.ZodString;
149
- }, "strip", z.ZodTypeAny, {
150
- name: string;
151
- type: string;
152
- id: string;
153
- args?: Record<string, unknown> | undefined;
154
- inputs?: Record<string, {
155
- instanceId: string;
156
- output: string;
157
- }[]> | undefined;
158
- hubInputs?: Record<string, {
159
- hubId: string;
160
- }[]> | undefined;
161
- injectionInputs?: {
162
- hubId: string;
163
- }[] | undefined;
164
- position?: {
165
- x: number;
166
- y: number;
167
- } | undefined;
168
- parentId?: string | undefined;
169
- outputs?: Record<string, {
170
- instanceId: string;
171
- output: string;
172
- }[]> | undefined;
173
- }, {
174
- name: string;
175
- type: string;
176
- id: string;
177
- args?: Record<string, unknown> | undefined;
178
- inputs?: Record<string, {
179
- instanceId: string;
180
- output: string;
181
- }[]> | undefined;
182
- hubInputs?: Record<string, {
183
- hubId: string;
184
- }[]> | undefined;
185
- injectionInputs?: {
186
- hubId: string;
187
- }[] | undefined;
188
- position?: {
189
- x: number;
190
- y: number;
191
- } | undefined;
192
- parentId?: string | undefined;
193
- outputs?: Record<string, {
194
- instanceId: string;
195
- output: string;
196
- }[]> | undefined;
197
- }>;
198
- declare const compositeInstanceSchema: z.ZodObject<{
199
- instance: z.ZodObject<{
200
- parentId: z.ZodOptional<z.ZodString>;
201
- outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
202
- instanceId: z.ZodString;
203
- output: z.ZodString;
204
- }, "strip", z.ZodTypeAny, {
205
- instanceId: string;
206
- output: string;
207
- }, {
208
- instanceId: string;
209
- output: string;
210
- }>, "many">>>;
211
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
212
- inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
213
- instanceId: z.ZodString;
214
- output: z.ZodString;
215
- }, "strip", z.ZodTypeAny, {
216
- instanceId: string;
217
- output: string;
218
- }, {
219
- instanceId: string;
220
- output: string;
221
- }>, "many">>>;
222
- hubInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
223
- hubId: z.ZodString;
224
- }, "strip", z.ZodTypeAny, {
225
- hubId: string;
226
- }, {
227
- hubId: string;
228
- }>, "many">>>;
229
- injectionInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
230
- hubId: z.ZodString;
231
- }, "strip", z.ZodTypeAny, {
232
- hubId: string;
233
- }, {
234
- hubId: string;
235
- }>, "many">>;
236
- position: z.ZodOptional<z.ZodObject<{
237
- x: z.ZodNumber;
238
- y: z.ZodNumber;
239
- }, "strip", z.ZodTypeAny, {
240
- x: number;
241
- y: number;
242
- }, {
243
- x: number;
244
- y: number;
245
- }>>;
246
- id: z.ZodString;
247
- type: z.ZodString;
248
- name: z.ZodString;
249
- }, "strip", z.ZodTypeAny, {
250
- name: string;
251
- type: string;
252
- id: string;
253
- args?: Record<string, unknown> | undefined;
254
- inputs?: Record<string, {
255
- instanceId: string;
256
- output: string;
257
- }[]> | undefined;
258
- hubInputs?: Record<string, {
259
- hubId: string;
260
- }[]> | undefined;
261
- injectionInputs?: {
262
- hubId: string;
263
- }[] | undefined;
264
- position?: {
265
- x: number;
266
- y: number;
267
- } | undefined;
268
- parentId?: string | undefined;
269
- outputs?: Record<string, {
270
- instanceId: string;
271
- output: string;
272
- }[]> | undefined;
273
- }, {
274
- name: string;
275
- type: string;
276
- id: string;
277
- args?: Record<string, unknown> | undefined;
278
- inputs?: Record<string, {
279
- instanceId: string;
280
- output: string;
281
- }[]> | undefined;
282
- hubInputs?: Record<string, {
283
- hubId: string;
284
- }[]> | undefined;
285
- injectionInputs?: {
286
- hubId: string;
287
- }[] | undefined;
288
- position?: {
289
- x: number;
290
- y: number;
291
- } | undefined;
292
- parentId?: string | undefined;
293
- outputs?: Record<string, {
294
- instanceId: string;
295
- output: string;
296
- }[]> | undefined;
297
- }>;
298
- children: z.ZodArray<z.ZodObject<{
299
- parentId: z.ZodOptional<z.ZodString>;
300
- outputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
301
- instanceId: z.ZodString;
302
- output: z.ZodString;
303
- }, "strip", z.ZodTypeAny, {
304
- instanceId: string;
305
- output: string;
306
- }, {
307
- instanceId: string;
308
- output: string;
309
- }>, "many">>>;
310
- args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
311
- inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
312
- instanceId: z.ZodString;
313
- output: z.ZodString;
314
- }, "strip", z.ZodTypeAny, {
315
- instanceId: string;
316
- output: string;
317
- }, {
318
- instanceId: string;
319
- output: string;
320
- }>, "many">>>;
321
- hubInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
322
- hubId: z.ZodString;
323
- }, "strip", z.ZodTypeAny, {
324
- hubId: string;
325
- }, {
326
- hubId: string;
327
- }>, "many">>>;
328
- injectionInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
- hubId: z.ZodString;
330
- }, "strip", z.ZodTypeAny, {
331
- hubId: string;
332
- }, {
333
- hubId: string;
334
- }>, "many">>;
335
- position: z.ZodOptional<z.ZodObject<{
336
- x: z.ZodNumber;
337
- y: z.ZodNumber;
338
- }, "strip", z.ZodTypeAny, {
339
- x: number;
340
- y: number;
341
- }, {
342
- x: number;
343
- y: number;
344
- }>>;
345
- id: z.ZodString;
346
- type: z.ZodString;
347
- name: z.ZodString;
348
- }, "strip", z.ZodTypeAny, {
349
- name: string;
350
- type: string;
351
- id: string;
352
- args?: Record<string, unknown> | undefined;
353
- inputs?: Record<string, {
354
- instanceId: string;
355
- output: string;
356
- }[]> | undefined;
357
- hubInputs?: Record<string, {
358
- hubId: string;
359
- }[]> | undefined;
360
- injectionInputs?: {
361
- hubId: string;
362
- }[] | undefined;
363
- position?: {
364
- x: number;
365
- y: number;
366
- } | undefined;
367
- parentId?: string | undefined;
368
- outputs?: Record<string, {
369
- instanceId: string;
370
- output: string;
371
- }[]> | undefined;
372
- }, {
373
- name: string;
374
- type: string;
375
- id: string;
376
- args?: Record<string, unknown> | undefined;
377
- inputs?: Record<string, {
378
- instanceId: string;
379
- output: string;
380
- }[]> | undefined;
381
- hubInputs?: Record<string, {
382
- hubId: string;
383
- }[]> | undefined;
384
- injectionInputs?: {
385
- hubId: string;
386
- }[] | undefined;
387
- position?: {
388
- x: number;
389
- y: number;
390
- } | undefined;
391
- parentId?: string | undefined;
392
- outputs?: Record<string, {
393
- instanceId: string;
394
- output: string;
395
- }[]> | undefined;
396
- }>, "many">;
397
- }, "strip", z.ZodTypeAny, {
398
- instance: {
399
- name: string;
400
- type: string;
401
- id: string;
402
- args?: Record<string, unknown> | undefined;
403
- inputs?: Record<string, {
404
- instanceId: string;
405
- output: string;
406
- }[]> | undefined;
407
- hubInputs?: Record<string, {
408
- hubId: string;
409
- }[]> | undefined;
410
- injectionInputs?: {
411
- hubId: string;
412
- }[] | undefined;
413
- position?: {
414
- x: number;
415
- y: number;
416
- } | undefined;
417
- parentId?: string | undefined;
418
- outputs?: Record<string, {
419
- instanceId: string;
420
- output: string;
421
- }[]> | undefined;
422
- };
423
- children: {
424
- name: string;
425
- type: string;
426
- id: string;
427
- args?: Record<string, unknown> | undefined;
428
- inputs?: Record<string, {
429
- instanceId: string;
430
- output: string;
431
- }[]> | undefined;
432
- hubInputs?: Record<string, {
433
- hubId: string;
434
- }[]> | undefined;
435
- injectionInputs?: {
436
- hubId: string;
437
- }[] | undefined;
438
- position?: {
439
- x: number;
440
- y: number;
441
- } | undefined;
442
- parentId?: string | undefined;
443
- outputs?: Record<string, {
444
- instanceId: string;
445
- output: string;
446
- }[]> | undefined;
447
- }[];
448
- }, {
449
- instance: {
450
- name: string;
451
- type: string;
452
- id: string;
453
- args?: Record<string, unknown> | undefined;
454
- inputs?: Record<string, {
455
- instanceId: string;
456
- output: string;
457
- }[]> | undefined;
458
- hubInputs?: Record<string, {
459
- hubId: string;
460
- }[]> | undefined;
461
- injectionInputs?: {
462
- hubId: string;
463
- }[] | undefined;
464
- position?: {
465
- x: number;
466
- y: number;
467
- } | undefined;
468
- parentId?: string | undefined;
469
- outputs?: Record<string, {
470
- instanceId: string;
471
- output: string;
472
- }[]> | undefined;
473
- };
474
- children: {
475
- name: string;
476
- type: string;
477
- id: string;
478
- args?: Record<string, unknown> | undefined;
479
- inputs?: Record<string, {
480
- instanceId: string;
481
- output: string;
482
- }[]> | undefined;
483
- hubInputs?: Record<string, {
484
- hubId: string;
485
- }[]> | undefined;
486
- injectionInputs?: {
487
- hubId: string;
488
- }[] | undefined;
489
- position?: {
490
- x: number;
491
- y: number;
492
- } | undefined;
493
- parentId?: string | undefined;
494
- outputs?: Record<string, {
495
- instanceId: string;
496
- output: string;
497
- }[]> | undefined;
498
- }[];
499
- }>;
500
- declare const hubModelPatchSchema: z.ZodObject<{
501
- position: z.ZodOptional<z.ZodObject<{
502
- x: z.ZodNumber;
503
- y: z.ZodNumber;
504
- }, "strip", z.ZodTypeAny, {
505
- x: number;
506
- y: number;
507
- }, {
508
- x: number;
509
- y: number;
510
- }>>;
511
- inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
512
- instanceId: z.ZodString;
513
- output: z.ZodString;
514
- }, "strip", z.ZodTypeAny, {
515
- instanceId: string;
516
- output: string;
517
- }, {
518
- instanceId: string;
519
- output: string;
520
- }>, "many">>;
521
- injectionInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
522
- hubId: z.ZodString;
523
- }, "strip", z.ZodTypeAny, {
524
- hubId: string;
525
- }, {
526
- hubId: string;
527
- }>, "many">>;
528
- }, "strip", z.ZodTypeAny, {
529
- inputs?: {
530
- instanceId: string;
531
- output: string;
532
- }[] | undefined;
533
- injectionInputs?: {
534
- hubId: string;
535
- }[] | undefined;
536
- position?: {
537
- x: number;
538
- y: number;
539
- } | undefined;
540
- }, {
541
- inputs?: {
542
- instanceId: string;
543
- output: string;
544
- }[] | undefined;
545
- injectionInputs?: {
546
- hubId: string;
547
- }[] | undefined;
548
- position?: {
549
- x: number;
550
- y: number;
551
- } | undefined;
552
- }>;
553
- declare const hubModelSchema: z.ZodObject<{
554
- id: z.ZodString;
555
- position: z.ZodObject<{
556
- x: z.ZodNumber;
557
- y: z.ZodNumber;
558
- }, "strip", z.ZodTypeAny, {
559
- x: number;
560
- y: number;
561
- }, {
562
- x: number;
563
- y: number;
564
- }>;
565
- inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
566
- instanceId: z.ZodString;
567
- output: z.ZodString;
568
- }, "strip", z.ZodTypeAny, {
569
- instanceId: string;
570
- output: string;
571
- }, {
572
- instanceId: string;
573
- output: string;
574
- }>, "many">>;
575
- injectionInputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
576
- hubId: z.ZodString;
577
- }, "strip", z.ZodTypeAny, {
578
- hubId: string;
579
- }, {
580
- hubId: string;
581
- }>, "many">>;
582
- }, "strip", z.ZodTypeAny, {
583
- position: {
584
- x: number;
585
- y: number;
586
- };
587
- id: string;
588
- inputs?: {
589
- instanceId: string;
590
- output: string;
591
- }[] | undefined;
592
- injectionInputs?: {
593
- hubId: string;
594
- }[] | undefined;
595
- }, {
596
- position: {
597
- x: number;
598
- y: number;
599
- };
600
- id: string;
601
- inputs?: {
602
- instanceId: string;
603
- output: string;
604
- }[] | undefined;
605
- injectionInputs?: {
606
- hubId: string;
607
- }[] | undefined;
608
- }>;
609
- type InstanceModelPatch = z.infer<typeof instanceModelPatchSchema>;
610
- type CompositeInstance = z.infer<typeof compositeInstanceSchema>;
611
- type HubModel = z.infer<typeof hubModelSchema>;
612
- type HubModelPatch = z.infer<typeof hubModelPatchSchema>;
613
-
614
- declare const instanceStatusSchema: z.ZodEnum<["not_created", "updating", "previewing", "destroying", "refreshing", "created", "error", "pending", "unknown"]>;
615
- declare const instanceStatusFieldSchema: z.ZodObject<{
616
- name: z.ZodString;
617
- value: z.ZodOptional<z.ZodString>;
618
- displayName: z.ZodOptional<z.ZodString>;
619
- sensitive: z.ZodOptional<z.ZodBoolean>;
620
- url: z.ZodOptional<z.ZodString>;
621
- }, "strip", z.ZodTypeAny, {
622
- name: string;
623
- value?: string | undefined;
624
- displayName?: string | undefined;
625
- sensitive?: boolean | undefined;
626
- url?: string | undefined;
627
- }, {
628
- name: string;
629
- value?: string | undefined;
630
- displayName?: string | undefined;
631
- sensitive?: boolean | undefined;
632
- url?: string | undefined;
633
- }>;
634
- declare const instanceFileMetaSchema: z.ZodObject<{
635
- name: z.ZodString;
636
- contentType: z.ZodString;
637
- isBinary: z.ZodOptional<z.ZodBoolean>;
638
- }, "strip", z.ZodTypeAny, {
639
- name: string;
640
- contentType: string;
641
- isBinary?: boolean | undefined;
642
- }, {
643
- name: string;
644
- contentType: string;
645
- isBinary?: boolean | undefined;
646
- }>;
647
- declare const instanceFileSchema: z.ZodObject<{
648
- content: z.ZodString;
649
- name: z.ZodString;
650
- contentType: z.ZodString;
651
- isBinary: z.ZodOptional<z.ZodBoolean>;
652
- }, "strip", z.ZodTypeAny, {
653
- name: string;
654
- contentType: string;
655
- content: string;
656
- isBinary?: boolean | undefined;
657
- }, {
658
- name: string;
659
- contentType: string;
660
- content: string;
661
- isBinary?: boolean | undefined;
662
- }>;
663
- declare const instancePageBlockSchema: z.ZodUnion<[z.ZodObject<{
664
- type: z.ZodLiteral<"markdown">;
665
- content: z.ZodString;
666
- }, "strip", z.ZodTypeAny, {
667
- type: "markdown";
668
- content: string;
669
- }, {
670
- type: "markdown";
671
- content: string;
672
- }>, z.ZodObject<{
673
- type: z.ZodLiteral<"qr">;
674
- content: z.ZodString;
675
- showContent: z.ZodBoolean;
676
- language: z.ZodOptional<z.ZodString>;
677
- }, "strip", z.ZodTypeAny, {
678
- type: "qr";
679
- content: string;
680
- showContent: boolean;
681
- language?: string | undefined;
682
- }, {
683
- type: "qr";
684
- content: string;
685
- showContent: boolean;
686
- language?: string | undefined;
687
- }>, z.ZodObject<{
688
- type: z.ZodLiteral<"file">;
689
- fileMeta: z.ZodObject<{
690
- name: z.ZodString;
691
- contentType: z.ZodString;
692
- isBinary: z.ZodOptional<z.ZodBoolean>;
693
- }, "strip", z.ZodTypeAny, {
694
- name: string;
695
- contentType: string;
696
- isBinary?: boolean | undefined;
697
- }, {
698
- name: string;
699
- contentType: string;
700
- isBinary?: boolean | undefined;
701
- }>;
702
- }, "strip", z.ZodTypeAny, {
703
- type: "file";
704
- fileMeta: {
705
- name: string;
706
- contentType: string;
707
- isBinary?: boolean | undefined;
708
- };
709
- }, {
710
- type: "file";
711
- fileMeta: {
712
- name: string;
713
- contentType: string;
714
- isBinary?: boolean | undefined;
715
- };
716
- }>]>;
717
- declare const instancePageMetaSchema: z.ZodObject<{
718
- name: z.ZodString;
719
- title: z.ZodString;
720
- }, "strip", z.ZodTypeAny, {
721
- name: string;
722
- title: string;
723
- }, {
724
- name: string;
725
- title: string;
726
- }>;
727
- declare const instancePageSchema: z.ZodObject<{
728
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
729
- type: z.ZodLiteral<"markdown">;
730
- content: z.ZodString;
731
- }, "strip", z.ZodTypeAny, {
732
- type: "markdown";
733
- content: string;
734
- }, {
735
- type: "markdown";
736
- content: string;
737
- }>, z.ZodObject<{
738
- type: z.ZodLiteral<"qr">;
739
- content: z.ZodString;
740
- showContent: z.ZodBoolean;
741
- language: z.ZodOptional<z.ZodString>;
742
- }, "strip", z.ZodTypeAny, {
743
- type: "qr";
744
- content: string;
745
- showContent: boolean;
746
- language?: string | undefined;
747
- }, {
748
- type: "qr";
749
- content: string;
750
- showContent: boolean;
751
- language?: string | undefined;
752
- }>, z.ZodObject<{
753
- type: z.ZodLiteral<"file">;
754
- fileMeta: z.ZodObject<{
755
- name: z.ZodString;
756
- contentType: z.ZodString;
757
- isBinary: z.ZodOptional<z.ZodBoolean>;
758
- }, "strip", z.ZodTypeAny, {
759
- name: string;
760
- contentType: string;
761
- isBinary?: boolean | undefined;
762
- }, {
763
- name: string;
764
- contentType: string;
765
- isBinary?: boolean | undefined;
766
- }>;
767
- }, "strip", z.ZodTypeAny, {
768
- type: "file";
769
- fileMeta: {
770
- name: string;
771
- contentType: string;
772
- isBinary?: boolean | undefined;
773
- };
774
- }, {
775
- type: "file";
776
- fileMeta: {
777
- name: string;
778
- contentType: string;
779
- isBinary?: boolean | undefined;
780
- };
781
- }>]>, "many">;
782
- name: z.ZodString;
783
- title: z.ZodString;
784
- }, "strip", z.ZodTypeAny, {
785
- name: string;
786
- content: ({
787
- type: "markdown";
788
- content: string;
789
- } | {
790
- type: "qr";
791
- content: string;
792
- showContent: boolean;
793
- language?: string | undefined;
794
- } | {
795
- type: "file";
796
- fileMeta: {
797
- name: string;
798
- contentType: string;
799
- isBinary?: boolean | undefined;
800
- };
801
- })[];
802
- title: string;
803
- }, {
804
- name: string;
805
- content: ({
806
- type: "markdown";
807
- content: string;
808
- } | {
809
- type: "qr";
810
- content: string;
811
- showContent: boolean;
812
- language?: string | undefined;
813
- } | {
814
- type: "file";
815
- fileMeta: {
816
- name: string;
817
- contentType: string;
818
- isBinary?: boolean | undefined;
819
- };
820
- })[];
821
- title: string;
822
- }>;
823
- declare const instanceTerminalMetaSchema: z.ZodObject<{
824
- name: z.ZodString;
825
- title: z.ZodString;
826
- description: z.ZodOptional<z.ZodString>;
827
- }, "strip", z.ZodTypeAny, {
828
- name: string;
829
- title: string;
830
- description?: string | undefined;
831
- }, {
832
- name: string;
833
- title: string;
834
- description?: string | undefined;
835
- }>;
836
- declare const instanceTerminalFileSchema: z.ZodObject<{
837
- content: z.ZodOptional<z.ZodString>;
838
- isBinary: z.ZodOptional<z.ZodBoolean>;
839
- mode: z.ZodOptional<z.ZodNumber>;
840
- }, "strip", z.ZodTypeAny, {
841
- isBinary?: boolean | undefined;
842
- content?: string | undefined;
843
- mode?: number | undefined;
844
- }, {
845
- isBinary?: boolean | undefined;
846
- content?: string | undefined;
847
- mode?: number | undefined;
848
- }>;
849
- declare const instanceTerminalSchema: z.ZodObject<{
850
- image: z.ZodString;
851
- command: z.ZodArray<z.ZodString, "many">;
852
- cwd: z.ZodOptional<z.ZodString>;
853
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
854
- files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
855
- content: z.ZodOptional<z.ZodString>;
856
- isBinary: z.ZodOptional<z.ZodBoolean>;
857
- mode: z.ZodOptional<z.ZodNumber>;
858
- }, "strip", z.ZodTypeAny, {
859
- isBinary?: boolean | undefined;
860
- content?: string | undefined;
861
- mode?: number | undefined;
862
- }, {
863
- isBinary?: boolean | undefined;
864
- content?: string | undefined;
865
- mode?: number | undefined;
866
- }>>>;
867
- name: z.ZodString;
868
- title: z.ZodString;
869
- description: z.ZodOptional<z.ZodString>;
870
- }, "strip", z.ZodTypeAny, {
871
- name: string;
872
- title: string;
873
- image: string;
874
- command: string[];
875
- description?: string | undefined;
876
- cwd?: string | undefined;
877
- env?: Record<string, string> | undefined;
878
- files?: Record<string, {
879
- isBinary?: boolean | undefined;
880
- content?: string | undefined;
881
- mode?: number | undefined;
882
- }> | undefined;
883
- }, {
884
- name: string;
885
- title: string;
886
- image: string;
887
- command: string[];
888
- description?: string | undefined;
889
- cwd?: string | undefined;
890
- env?: Record<string, string> | undefined;
891
- files?: Record<string, {
892
- isBinary?: boolean | undefined;
893
- content?: string | undefined;
894
- mode?: number | undefined;
895
- }> | undefined;
896
- }>;
897
- declare const instanceTriggerSpecSchema: z.ZodUnion<[z.ZodObject<{
898
- type: z.ZodLiteral<"before-destroy">;
899
- }, "strip", z.ZodTypeAny, {
900
- type: "before-destroy";
901
- }, {
902
- type: "before-destroy";
903
- }>, z.ZodObject<{
904
- type: z.ZodLiteral<"schedule">;
905
- schedule: z.ZodString;
906
- }, "strip", z.ZodTypeAny, {
907
- type: "schedule";
908
- schedule: string;
909
- }, {
910
- type: "schedule";
911
- schedule: string;
912
- }>]>;
913
- declare const instanceTriggerSchema: z.ZodObject<{
914
- name: z.ZodString;
915
- title: z.ZodString;
916
- description: z.ZodOptional<z.ZodString>;
917
- spec: z.ZodUnion<[z.ZodObject<{
918
- type: z.ZodLiteral<"before-destroy">;
919
- }, "strip", z.ZodTypeAny, {
920
- type: "before-destroy";
921
- }, {
922
- type: "before-destroy";
923
- }>, z.ZodObject<{
924
- type: z.ZodLiteral<"schedule">;
925
- schedule: z.ZodString;
926
- }, "strip", z.ZodTypeAny, {
927
- type: "schedule";
928
- schedule: string;
929
- }, {
930
- type: "schedule";
931
- schedule: string;
932
- }>]>;
933
- }, "strip", z.ZodTypeAny, {
934
- name: string;
935
- title: string;
936
- spec: {
937
- type: "before-destroy";
938
- } | {
939
- type: "schedule";
940
- schedule: string;
941
- };
942
- description?: string | undefined;
943
- }, {
944
- name: string;
945
- title: string;
946
- spec: {
947
- type: "before-destroy";
948
- } | {
949
- type: "schedule";
950
- schedule: string;
951
- };
952
- description?: string | undefined;
953
- }>;
954
- declare const instanceTriggerInvocationSchema: z.ZodObject<{
955
- name: z.ZodString;
956
- }, "strip", z.ZodTypeAny, {
957
- name: string;
958
- }, {
959
- name: string;
960
- }>;
961
- declare const instanceStateSchema: z.ZodObject<{
962
- id: z.ZodString;
963
- parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
964
- status: z.ZodEnum<["not_created", "updating", "previewing", "destroying", "refreshing", "created", "error", "pending", "unknown"]>;
965
- dependencyIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
966
- latestOperationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
967
- currentResourceCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
968
- totalResourceCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
969
- inputHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
970
- outputHash: z.ZodDefault<z.ZodNullable<z.ZodString>>;
971
- error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
972
- statusFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
973
- name: z.ZodString;
974
- value: z.ZodOptional<z.ZodString>;
975
- displayName: z.ZodOptional<z.ZodString>;
976
- sensitive: z.ZodOptional<z.ZodBoolean>;
977
- url: z.ZodOptional<z.ZodString>;
978
- }, "strip", z.ZodTypeAny, {
979
- name: string;
980
- value?: string | undefined;
981
- displayName?: string | undefined;
982
- sensitive?: boolean | undefined;
983
- url?: string | undefined;
984
- }, {
985
- name: string;
986
- value?: string | undefined;
987
- displayName?: string | undefined;
988
- sensitive?: boolean | undefined;
989
- url?: string | undefined;
990
- }>, "many">>;
991
- files: z.ZodDefault<z.ZodArray<z.ZodObject<{
992
- name: z.ZodString;
993
- contentType: z.ZodString;
994
- isBinary: z.ZodOptional<z.ZodBoolean>;
995
- }, "strip", z.ZodTypeAny, {
996
- name: string;
997
- contentType: string;
998
- isBinary?: boolean | undefined;
999
- }, {
1000
- name: string;
1001
- contentType: string;
1002
- isBinary?: boolean | undefined;
1003
- }>, "many">>;
1004
- pages: z.ZodDefault<z.ZodArray<z.ZodObject<{
1005
- name: z.ZodString;
1006
- title: z.ZodString;
1007
- }, "strip", z.ZodTypeAny, {
1008
- name: string;
1009
- title: string;
1010
- }, {
1011
- name: string;
1012
- title: string;
1013
- }>, "many">>;
1014
- terminals: z.ZodDefault<z.ZodArray<z.ZodObject<{
1015
- name: z.ZodString;
1016
- title: z.ZodString;
1017
- description: z.ZodOptional<z.ZodString>;
1018
- }, "strip", z.ZodTypeAny, {
1019
- name: string;
1020
- title: string;
1021
- description?: string | undefined;
1022
- }, {
1023
- name: string;
1024
- title: string;
1025
- description?: string | undefined;
1026
- }>, "many">>;
1027
- triggers: z.ZodDefault<z.ZodArray<z.ZodObject<{
1028
- name: z.ZodString;
1029
- title: z.ZodString;
1030
- description: z.ZodOptional<z.ZodString>;
1031
- spec: z.ZodUnion<[z.ZodObject<{
1032
- type: z.ZodLiteral<"before-destroy">;
1033
- }, "strip", z.ZodTypeAny, {
1034
- type: "before-destroy";
1035
- }, {
1036
- type: "before-destroy";
1037
- }>, z.ZodObject<{
1038
- type: z.ZodLiteral<"schedule">;
1039
- schedule: z.ZodString;
1040
- }, "strip", z.ZodTypeAny, {
1041
- type: "schedule";
1042
- schedule: string;
1043
- }, {
1044
- type: "schedule";
1045
- schedule: string;
1046
- }>]>;
1047
- }, "strip", z.ZodTypeAny, {
1048
- name: string;
1049
- title: string;
1050
- spec: {
1051
- type: "before-destroy";
1052
- } | {
1053
- type: "schedule";
1054
- schedule: string;
1055
- };
1056
- description?: string | undefined;
1057
- }, {
1058
- name: string;
1059
- title: string;
1060
- spec: {
1061
- type: "before-destroy";
1062
- } | {
1063
- type: "schedule";
1064
- schedule: string;
1065
- };
1066
- description?: string | undefined;
1067
- }>, "many">>;
1068
- }, "strip", z.ZodTypeAny, {
1069
- error: string | null;
1070
- status: "error" | "unknown" | "not_created" | "updating" | "previewing" | "destroying" | "refreshing" | "created" | "pending";
1071
- id: string;
1072
- parentId: string | null;
1073
- files: {
1074
- name: string;
1075
- contentType: string;
1076
- isBinary?: boolean | undefined;
1077
- }[];
1078
- dependencyIds: string[];
1079
- latestOperationId: string | null;
1080
- currentResourceCount: number | null;
1081
- totalResourceCount: number | null;
1082
- inputHash: string | null;
1083
- outputHash: string | null;
1084
- statusFields: {
1085
- name: string;
1086
- value?: string | undefined;
1087
- displayName?: string | undefined;
1088
- sensitive?: boolean | undefined;
1089
- url?: string | undefined;
1090
- }[];
1091
- pages: {
1092
- name: string;
1093
- title: string;
1094
- }[];
1095
- terminals: {
1096
- name: string;
1097
- title: string;
1098
- description?: string | undefined;
1099
- }[];
1100
- triggers: {
1101
- name: string;
1102
- title: string;
1103
- spec: {
1104
- type: "before-destroy";
1105
- } | {
1106
- type: "schedule";
1107
- schedule: string;
1108
- };
1109
- description?: string | undefined;
1110
- }[];
1111
- }, {
1112
- status: "error" | "unknown" | "not_created" | "updating" | "previewing" | "destroying" | "refreshing" | "created" | "pending";
1113
- id: string;
1114
- error?: string | null | undefined;
1115
- parentId?: string | null | undefined;
1116
- files?: {
1117
- name: string;
1118
- contentType: string;
1119
- isBinary?: boolean | undefined;
1120
- }[] | undefined;
1121
- dependencyIds?: string[] | undefined;
1122
- latestOperationId?: string | null | undefined;
1123
- currentResourceCount?: number | null | undefined;
1124
- totalResourceCount?: number | null | undefined;
1125
- inputHash?: string | null | undefined;
1126
- outputHash?: string | null | undefined;
1127
- statusFields?: {
1128
- name: string;
1129
- value?: string | undefined;
1130
- displayName?: string | undefined;
1131
- sensitive?: boolean | undefined;
1132
- url?: string | undefined;
1133
- }[] | undefined;
1134
- pages?: {
1135
- name: string;
1136
- title: string;
1137
- }[] | undefined;
1138
- terminals?: {
1139
- name: string;
1140
- title: string;
1141
- description?: string | undefined;
1142
- }[] | undefined;
1143
- triggers?: {
1144
- name: string;
1145
- title: string;
1146
- spec: {
1147
- type: "before-destroy";
1148
- } | {
1149
- type: "schedule";
1150
- schedule: string;
1151
- };
1152
- description?: string | undefined;
1153
- }[] | undefined;
1154
- }>;
1155
- declare const instanceStatePatchSchema: z.ZodObject<{
1156
- secrets: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1157
- logLine: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1158
- id: z.ZodOptional<z.ZodString>;
1159
- parentId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1160
- status: z.ZodOptional<z.ZodEnum<["not_created", "updating", "previewing", "destroying", "refreshing", "created", "error", "pending", "unknown"]>>;
1161
- dependencyIds: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1162
- latestOperationId: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1163
- currentResourceCount: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
1164
- totalResourceCount: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
1165
- inputHash: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1166
- outputHash: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1167
- error: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
1168
- statusFields: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
1169
- name: z.ZodString;
1170
- value: z.ZodOptional<z.ZodString>;
1171
- displayName: z.ZodOptional<z.ZodString>;
1172
- sensitive: z.ZodOptional<z.ZodBoolean>;
1173
- url: z.ZodOptional<z.ZodString>;
1174
- }, "strip", z.ZodTypeAny, {
1175
- name: string;
1176
- value?: string | undefined;
1177
- displayName?: string | undefined;
1178
- sensitive?: boolean | undefined;
1179
- url?: string | undefined;
1180
- }, {
1181
- name: string;
1182
- value?: string | undefined;
1183
- displayName?: string | undefined;
1184
- sensitive?: boolean | undefined;
1185
- url?: string | undefined;
1186
- }>, "many">>>;
1187
- files: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
1188
- name: z.ZodString;
1189
- contentType: z.ZodString;
1190
- isBinary: z.ZodOptional<z.ZodBoolean>;
1191
- }, "strip", z.ZodTypeAny, {
1192
- name: string;
1193
- contentType: string;
1194
- isBinary?: boolean | undefined;
1195
- }, {
1196
- name: string;
1197
- contentType: string;
1198
- isBinary?: boolean | undefined;
1199
- }>, "many">>>;
1200
- pages: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
1201
- name: z.ZodString;
1202
- title: z.ZodString;
1203
- }, "strip", z.ZodTypeAny, {
1204
- name: string;
1205
- title: string;
1206
- }, {
1207
- name: string;
1208
- title: string;
1209
- }>, "many">>>;
1210
- terminals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
1211
- name: z.ZodString;
1212
- title: z.ZodString;
1213
- description: z.ZodOptional<z.ZodString>;
1214
- }, "strip", z.ZodTypeAny, {
1215
- name: string;
1216
- title: string;
1217
- description?: string | undefined;
1218
- }, {
1219
- name: string;
1220
- title: string;
1221
- description?: string | undefined;
1222
- }>, "many">>>;
1223
- triggers: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
1224
- name: z.ZodString;
1225
- title: z.ZodString;
1226
- description: z.ZodOptional<z.ZodString>;
1227
- spec: z.ZodUnion<[z.ZodObject<{
1228
- type: z.ZodLiteral<"before-destroy">;
1229
- }, "strip", z.ZodTypeAny, {
1230
- type: "before-destroy";
1231
- }, {
1232
- type: "before-destroy";
1233
- }>, z.ZodObject<{
1234
- type: z.ZodLiteral<"schedule">;
1235
- schedule: z.ZodString;
1236
- }, "strip", z.ZodTypeAny, {
1237
- type: "schedule";
1238
- schedule: string;
1239
- }, {
1240
- type: "schedule";
1241
- schedule: string;
1242
- }>]>;
1243
- }, "strip", z.ZodTypeAny, {
1244
- name: string;
1245
- title: string;
1246
- spec: {
1247
- type: "before-destroy";
1248
- } | {
1249
- type: "schedule";
1250
- schedule: string;
1251
- };
1252
- description?: string | undefined;
1253
- }, {
1254
- name: string;
1255
- title: string;
1256
- spec: {
1257
- type: "before-destroy";
1258
- } | {
1259
- type: "schedule";
1260
- schedule: string;
1261
- };
1262
- description?: string | undefined;
1263
- }>, "many">>>;
1264
- }, "strip", z.ZodTypeAny, {
1265
- error?: string | null | undefined;
1266
- status?: "error" | "unknown" | "not_created" | "updating" | "previewing" | "destroying" | "refreshing" | "created" | "pending" | undefined;
1267
- id?: string | undefined;
1268
- parentId?: string | null | undefined;
1269
- files?: {
1270
- name: string;
1271
- contentType: string;
1272
- isBinary?: boolean | undefined;
1273
- }[] | undefined;
1274
- dependencyIds?: string[] | undefined;
1275
- latestOperationId?: string | null | undefined;
1276
- currentResourceCount?: number | null | undefined;
1277
- totalResourceCount?: number | null | undefined;
1278
- inputHash?: string | null | undefined;
1279
- outputHash?: string | null | undefined;
1280
- statusFields?: {
1281
- name: string;
1282
- value?: string | undefined;
1283
- displayName?: string | undefined;
1284
- sensitive?: boolean | undefined;
1285
- url?: string | undefined;
1286
- }[] | undefined;
1287
- pages?: {
1288
- name: string;
1289
- title: string;
1290
- }[] | undefined;
1291
- terminals?: {
1292
- name: string;
1293
- title: string;
1294
- description?: string | undefined;
1295
- }[] | undefined;
1296
- triggers?: {
1297
- name: string;
1298
- title: string;
1299
- spec: {
1300
- type: "before-destroy";
1301
- } | {
1302
- type: "schedule";
1303
- schedule: string;
1304
- };
1305
- description?: string | undefined;
1306
- }[] | undefined;
1307
- secrets?: Record<string, string> | null | undefined;
1308
- logLine?: string | null | undefined;
1309
- }, {
1310
- error?: string | null | undefined;
1311
- status?: "error" | "unknown" | "not_created" | "updating" | "previewing" | "destroying" | "refreshing" | "created" | "pending" | undefined;
1312
- id?: string | undefined;
1313
- parentId?: string | null | undefined;
1314
- files?: {
1315
- name: string;
1316
- contentType: string;
1317
- isBinary?: boolean | undefined;
1318
- }[] | undefined;
1319
- dependencyIds?: string[] | undefined;
1320
- latestOperationId?: string | null | undefined;
1321
- currentResourceCount?: number | null | undefined;
1322
- totalResourceCount?: number | null | undefined;
1323
- inputHash?: string | null | undefined;
1324
- outputHash?: string | null | undefined;
1325
- statusFields?: {
1326
- name: string;
1327
- value?: string | undefined;
1328
- displayName?: string | undefined;
1329
- sensitive?: boolean | undefined;
1330
- url?: string | undefined;
1331
- }[] | undefined;
1332
- pages?: {
1333
- name: string;
1334
- title: string;
1335
- }[] | undefined;
1336
- terminals?: {
1337
- name: string;
1338
- title: string;
1339
- description?: string | undefined;
1340
- }[] | undefined;
1341
- triggers?: {
1342
- name: string;
1343
- title: string;
1344
- spec: {
1345
- type: "before-destroy";
1346
- } | {
1347
- type: "schedule";
1348
- schedule: string;
1349
- };
1350
- description?: string | undefined;
1351
- }[] | undefined;
1352
- secrets?: Record<string, string> | null | undefined;
1353
- logLine?: string | null | undefined;
1354
- }>;
1355
- type InstanceStatusField = z.infer<typeof instanceStatusFieldSchema>;
1356
- type InstanceTerminal = z.infer<typeof instanceTerminalSchema>;
1357
- type InstanceStatus = z.infer<typeof instanceStatusSchema>;
1358
- type InstanceState = z.infer<typeof instanceStateSchema>;
1359
- type InstanceStatePatch = z.infer<typeof instanceStatePatchSchema>;
1360
- type InstancePageBlock = z.infer<typeof instancePageBlockSchema>;
1361
- type InstancePageMeta = z.infer<typeof instancePageMetaSchema>;
1362
- type InstanceFileMeta = z.infer<typeof instanceFileMetaSchema>;
1363
- type InstanceTriggerSpec = z.infer<typeof instanceTriggerSpecSchema>;
1364
- type InstanceTrigger = z.infer<typeof instanceTriggerSchema>;
1365
- type InstanceTriggerInvocation = z.infer<typeof instanceTriggerInvocationSchema>;
1366
- declare function createInstanceState(id: string, status?: InstanceStatus, fields?: Partial<InstanceState>): InstanceState;
1367
- declare function applyPartialInstanceState(states: Map<string, InstanceState>, patch: Partial<InstanceState>): InstanceState;
1368
- declare function createInstanceStateFrontendPatch(patch: InstanceStatePatch): Partial<InstanceState>;
1369
- /**
1370
- * Builds a map where instance id -> instance state ids that directly depend on the instance.
1371
- *
1372
- * @param instanceStates The instance states to build the map from.
1373
- */
1374
- declare function buildDependentInstanceStateMap(instanceStates: Map<string, InstanceState>): Map<string, string[]>;
1375
- /**
1376
- * Gets all instance ids that depend on the given instance id (including recursively).
1377
- * The instance id itself is not included in the result.
1378
- *
1379
- * @param dependentMap The dependent map.
1380
- * @param instanceId The instance id to get all dependent instance ids.
1381
- */
1382
- declare function getAllDependentInstanceIds(dependentMap: Map<string, string[]>, instanceId: string): string[];
1383
-
1384
- declare const operationTypeSchema: z.ZodEnum<["update", "preview", "destroy", "recreate", "refresh", "evaluate"]>;
1385
- declare const operationStatusSchema: z.ZodEnum<["pending", "evaluating", "running", "completed", "failed", "cancelled"]>;
1386
- declare const operationOptionsSchema: z.ZodObject<{
1387
- /**
1388
- * Whether to force update all dependencies of the instances even if they are not changed.
1389
- *
1390
- * Only applicable for `update`, `preview`, `recreate`, and `refresh` operations.
1391
- * By default, `false`.
1392
- */
1393
- forceUpdateDependencies: z.ZodDefault<z.ZodBoolean>;
1394
- /**
1395
- * Whether to destroy all dependents of the instances when destroying them.
1396
- *
1397
- * Only applicable for `destroy`.
1398
- * By default, `true`.
1399
- */
1400
- destroyDependentInstances: z.ZodDefault<z.ZodBoolean>;
1401
- /**
1402
- * Whether to invoke destroy triggers when destroying the instances.
1403
- *
1404
- * Only applicable for `destroy`.
1405
- * By default, `true`.
1406
- */
1407
- invokeDestroyTriggers: z.ZodDefault<z.ZodBoolean>;
1408
- /**
1409
- * Whether to delete unreachable resources when updating or destroying the instances.
1410
- * This is potentially dangerous and should be used with caution.
1411
- *
1412
- * By default, `false`.
1413
- */
1414
- deleteUnreachableResources: z.ZodDefault<z.ZodBoolean>;
1415
- /**
1416
- * Whether to refresh the state before running the operation.
1417
- *
1418
- * By default, `false`.
1419
- */
1420
- refresh: z.ZodDefault<z.ZodBoolean>;
1421
- }, "strip", z.ZodTypeAny, {
1422
- refresh: boolean;
1423
- forceUpdateDependencies: boolean;
1424
- destroyDependentInstances: boolean;
1425
- invokeDestroyTriggers: boolean;
1426
- deleteUnreachableResources: boolean;
1427
- }, {
1428
- refresh?: boolean | undefined;
1429
- forceUpdateDependencies?: boolean | undefined;
1430
- destroyDependentInstances?: boolean | undefined;
1431
- invokeDestroyTriggers?: boolean | undefined;
1432
- deleteUnreachableResources?: boolean | undefined;
1433
- }>;
1434
- declare const projectOperationRequestSchema: z.ZodObject<{
1435
- projectId: z.ZodString;
1436
- type: z.ZodEnum<["update", "preview", "destroy", "recreate", "refresh", "evaluate"]>;
1437
- instanceIds: z.ZodArray<z.ZodString, "many">;
1438
- options: z.ZodOptional<z.ZodObject<{
1439
- forceUpdateDependencies: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1440
- destroyDependentInstances: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1441
- invokeDestroyTriggers: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1442
- deleteUnreachableResources: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1443
- refresh: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1444
- }, "strip", z.ZodTypeAny, {
1445
- refresh?: boolean | undefined;
1446
- forceUpdateDependencies?: boolean | undefined;
1447
- destroyDependentInstances?: boolean | undefined;
1448
- invokeDestroyTriggers?: boolean | undefined;
1449
- deleteUnreachableResources?: boolean | undefined;
1450
- }, {
1451
- refresh?: boolean | undefined;
1452
- forceUpdateDependencies?: boolean | undefined;
1453
- destroyDependentInstances?: boolean | undefined;
1454
- invokeDestroyTriggers?: boolean | undefined;
1455
- deleteUnreachableResources?: boolean | undefined;
1456
- }>>;
1457
- }, "strip", z.ZodTypeAny, {
1458
- projectId: string;
1459
- type: "update" | "refresh" | "preview" | "destroy" | "recreate" | "evaluate";
1460
- instanceIds: string[];
1461
- options?: {
1462
- refresh?: boolean | undefined;
1463
- forceUpdateDependencies?: boolean | undefined;
1464
- destroyDependentInstances?: boolean | undefined;
1465
- invokeDestroyTriggers?: boolean | undefined;
1466
- deleteUnreachableResources?: boolean | undefined;
1467
- } | undefined;
1468
- }, {
1469
- projectId: string;
1470
- type: "update" | "refresh" | "preview" | "destroy" | "recreate" | "evaluate";
1471
- instanceIds: string[];
1472
- options?: {
1473
- refresh?: boolean | undefined;
1474
- forceUpdateDependencies?: boolean | undefined;
1475
- destroyDependentInstances?: boolean | undefined;
1476
- invokeDestroyTriggers?: boolean | undefined;
1477
- deleteUnreachableResources?: boolean | undefined;
1478
- } | undefined;
1479
- }>;
1480
- declare const projectOperationSchema: z.ZodObject<{
1481
- id: z.ZodString;
1482
- status: z.ZodEnum<["pending", "evaluating", "running", "completed", "failed", "cancelled"]>;
1483
- projectId: z.ZodString;
1484
- type: z.ZodEnum<["update", "preview", "destroy", "recreate", "refresh", "evaluate"]>;
1485
- instanceIds: z.ZodArray<z.ZodString, "many">;
1486
- options: z.ZodDefault<z.ZodObject<{
1487
- /**
1488
- * Whether to force update all dependencies of the instances even if they are not changed.
1489
- *
1490
- * Only applicable for `update`, `preview`, `recreate`, and `refresh` operations.
1491
- * By default, `false`.
1492
- */
1493
- forceUpdateDependencies: z.ZodDefault<z.ZodBoolean>;
1494
- /**
1495
- * Whether to destroy all dependents of the instances when destroying them.
1496
- *
1497
- * Only applicable for `destroy`.
1498
- * By default, `true`.
1499
- */
1500
- destroyDependentInstances: z.ZodDefault<z.ZodBoolean>;
1501
- /**
1502
- * Whether to invoke destroy triggers when destroying the instances.
1503
- *
1504
- * Only applicable for `destroy`.
1505
- * By default, `true`.
1506
- */
1507
- invokeDestroyTriggers: z.ZodDefault<z.ZodBoolean>;
1508
- /**
1509
- * Whether to delete unreachable resources when updating or destroying the instances.
1510
- * This is potentially dangerous and should be used with caution.
1511
- *
1512
- * By default, `false`.
1513
- */
1514
- deleteUnreachableResources: z.ZodDefault<z.ZodBoolean>;
1515
- /**
1516
- * Whether to refresh the state before running the operation.
1517
- *
1518
- * By default, `false`.
1519
- */
1520
- refresh: z.ZodDefault<z.ZodBoolean>;
1521
- }, "strip", z.ZodTypeAny, {
1522
- refresh: boolean;
1523
- forceUpdateDependencies: boolean;
1524
- destroyDependentInstances: boolean;
1525
- invokeDestroyTriggers: boolean;
1526
- deleteUnreachableResources: boolean;
1527
- }, {
1528
- refresh?: boolean | undefined;
1529
- forceUpdateDependencies?: boolean | undefined;
1530
- destroyDependentInstances?: boolean | undefined;
1531
- invokeDestroyTriggers?: boolean | undefined;
1532
- deleteUnreachableResources?: boolean | undefined;
1533
- }>>;
1534
- error: z.ZodNullable<z.ZodString>;
1535
- startedAt: z.ZodNumber;
1536
- completedAt: z.ZodNullable<z.ZodNumber>;
1537
- }, "strip", z.ZodTypeAny, {
1538
- error: string | null;
1539
- projectId: string;
1540
- options: {
1541
- refresh: boolean;
1542
- forceUpdateDependencies: boolean;
1543
- destroyDependentInstances: boolean;
1544
- invokeDestroyTriggers: boolean;
1545
- deleteUnreachableResources: boolean;
1546
- };
1547
- type: "update" | "refresh" | "preview" | "destroy" | "recreate" | "evaluate";
1548
- status: "pending" | "evaluating" | "running" | "completed" | "failed" | "cancelled";
1549
- instanceIds: string[];
1550
- id: string;
1551
- startedAt: number;
1552
- completedAt: number | null;
1553
- }, {
1554
- error: string | null;
1555
- projectId: string;
1556
- type: "update" | "refresh" | "preview" | "destroy" | "recreate" | "evaluate";
1557
- status: "pending" | "evaluating" | "running" | "completed" | "failed" | "cancelled";
1558
- instanceIds: string[];
1559
- id: string;
1560
- startedAt: number;
1561
- completedAt: number | null;
1562
- options?: {
1563
- refresh?: boolean | undefined;
1564
- forceUpdateDependencies?: boolean | undefined;
1565
- destroyDependentInstances?: boolean | undefined;
1566
- invokeDestroyTriggers?: boolean | undefined;
1567
- deleteUnreachableResources?: boolean | undefined;
1568
- } | undefined;
1569
- }>;
1570
- type OperationType = z.infer<typeof operationTypeSchema>;
1571
- type OperationStatus = z.infer<typeof operationStatusSchema>;
1572
- type ProjectOperation = z.infer<typeof projectOperationSchema>;
1573
- type ProjectOperationRequest = z.infer<typeof projectOperationRequestSchema>;
1574
- type OperationOptions = z.infer<typeof operationOptionsSchema>;
1575
- declare function isFinalOperationStatus(status: OperationStatus): boolean;
1576
-
1577
- declare const terminalSessionSchema: z.ZodObject<{
1578
- id: z.ZodString;
1579
- terminalName: z.ZodString;
1580
- }, "strip", z.ZodTypeAny, {
1581
- id: string;
1582
- terminalName: string;
1583
- }, {
1584
- id: string;
1585
- terminalName: string;
1586
- }>;
1587
- type TerminalSession = z.infer<typeof terminalSessionSchema>;
1588
-
1589
- export { type OperationOptions as $, instanceTriggerSchema as A, instanceTriggerInvocationSchema as B, type CompositeInstance as C, instanceStateSchema as D, instanceStatePatchSchema as E, type InstanceStatusField as F, type InstancePageMeta as G, type HubModel as H, type InstanceModelPatch as I, type InstanceFileMeta as J, type InstanceTriggerSpec as K, type InstanceTrigger as L, type InstanceTriggerInvocation as M, createInstanceState as N, applyPartialInstanceState as O, type ProjectOperation as P, createInstanceStateFrontendPatch as Q, buildDependentInstanceStateMap as R, getAllDependentInstanceIds as S, type TerminalSession as T, operationTypeSchema as U, operationStatusSchema as V, operationOptionsSchema as W, projectOperationRequestSchema as X, projectOperationSchema as Y, type OperationType as Z, type OperationStatus as _, type HubModelPatch as a, isFinalOperationStatus as a0, terminalSessionSchema as a1, type InstanceState as b, type InstanceStatus as c, type InstanceStatePatch as d, type InstancePageBlock as e, type InstanceTerminal as f, type ProjectOperationRequest as g, hubInstanceInputSchema as h, instanceInputSchema as i, instanceModelPatchSchema as j, instanceModelSchema as k, compositeInstanceSchema as l, hubModelPatchSchema as m, hubModelSchema as n, instanceStatusSchema as o, positionSchema as p, instanceStatusFieldSchema as q, instanceFileMetaSchema as r, instanceFileSchema as s, instancePageBlockSchema as t, instancePageMetaSchema as u, instancePageSchema as v, instanceTerminalMetaSchema as w, instanceTerminalFileSchema as x, instanceTerminalSchema as y, instanceTriggerSpecSchema as z };