@runnee/sdk 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1279 @@
1
+ export declare const contracts: {
2
+ readonly schemas: {
3
+ readonly Error: {
4
+ readonly type: "object";
5
+ readonly properties: {
6
+ readonly statusCode: {
7
+ readonly type: "integer";
8
+ };
9
+ readonly message: {
10
+ readonly anyOf: readonly [{
11
+ readonly type: "string";
12
+ }, {
13
+ readonly type: "array";
14
+ readonly items: {
15
+ readonly type: "string";
16
+ };
17
+ }];
18
+ };
19
+ readonly error: {
20
+ readonly type: "string";
21
+ };
22
+ readonly code: {
23
+ readonly type: "string";
24
+ };
25
+ };
26
+ readonly required: readonly [];
27
+ readonly additionalProperties: true;
28
+ };
29
+ readonly ExecuteRequest: {
30
+ readonly type: "object";
31
+ readonly properties: {
32
+ readonly code: {
33
+ readonly type: "string";
34
+ readonly minLength: 1;
35
+ readonly maxLength: 6000;
36
+ };
37
+ readonly mode: {
38
+ readonly type: "string";
39
+ readonly enum: readonly ["dry-run", "live"];
40
+ };
41
+ readonly event: {
42
+ readonly type: "object";
43
+ readonly additionalProperties: true;
44
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
45
+ };
46
+ readonly retainSource: {
47
+ readonly type: "boolean";
48
+ };
49
+ readonly scriptName: {
50
+ readonly type: "string";
51
+ readonly maxLength: 80;
52
+ };
53
+ readonly secretNames: {
54
+ readonly type: "array";
55
+ readonly items: {
56
+ readonly type: "string";
57
+ readonly pattern: "^[A-Z][A-Z0-9_]{0,63}$";
58
+ };
59
+ readonly maxItems: 16;
60
+ readonly uniqueItems: true;
61
+ readonly description: "Explicit secret grant; requires secrets:use in addition to scripts:execute. Policies are enforced server-side.";
62
+ };
63
+ readonly scriptId: {
64
+ readonly type: "string";
65
+ readonly format: "uuid";
66
+ };
67
+ };
68
+ readonly required: readonly ["code"];
69
+ readonly additionalProperties: false;
70
+ };
71
+ readonly Diagnostic: {
72
+ readonly type: "object";
73
+ readonly properties: {
74
+ readonly code: {
75
+ readonly type: "string";
76
+ };
77
+ readonly message: {
78
+ readonly type: "string";
79
+ };
80
+ readonly line: {
81
+ readonly type: "integer";
82
+ };
83
+ readonly column: {
84
+ readonly type: "integer";
85
+ };
86
+ readonly filename: {
87
+ readonly type: "string";
88
+ };
89
+ readonly snippet: {
90
+ readonly type: "string";
91
+ };
92
+ };
93
+ readonly required: readonly ["message"];
94
+ readonly additionalProperties: true;
95
+ };
96
+ readonly Timings: {
97
+ readonly type: "object";
98
+ readonly additionalProperties: {
99
+ readonly type: "number";
100
+ };
101
+ };
102
+ readonly ExecutionResult: {
103
+ readonly type: "object";
104
+ readonly properties: {
105
+ readonly durationMs: {
106
+ readonly type: "number";
107
+ };
108
+ readonly instructions: {
109
+ readonly type: "integer";
110
+ };
111
+ readonly returnValue: {};
112
+ readonly replies: {
113
+ readonly type: "object";
114
+ readonly properties: {
115
+ readonly count: {
116
+ readonly type: "integer";
117
+ };
118
+ readonly lastPayload: {};
119
+ };
120
+ readonly required: readonly ["count"];
121
+ readonly additionalProperties: false;
122
+ };
123
+ readonly counters: {
124
+ readonly type: "object";
125
+ readonly properties: {
126
+ readonly dbOps: {
127
+ readonly type: "integer";
128
+ };
129
+ readonly httpCalls: {
130
+ readonly type: "integer";
131
+ };
132
+ };
133
+ readonly required: readonly ["dbOps", "httpCalls"];
134
+ readonly additionalProperties: false;
135
+ };
136
+ readonly explain: {
137
+ readonly type: "object";
138
+ readonly additionalProperties: true;
139
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
140
+ };
141
+ };
142
+ readonly required: readonly ["durationMs", "instructions", "replies"];
143
+ readonly additionalProperties: false;
144
+ };
145
+ readonly ExecuteResponse: {
146
+ readonly type: "object";
147
+ readonly properties: {
148
+ readonly success: {
149
+ readonly type: "boolean";
150
+ };
151
+ readonly mocked: {
152
+ readonly type: "boolean";
153
+ };
154
+ readonly error: {
155
+ readonly $ref: "#/components/schemas/Diagnostic";
156
+ };
157
+ readonly executionResult: {
158
+ readonly $ref: "#/components/schemas/ExecutionResult";
159
+ };
160
+ readonly replies: {
161
+ readonly type: "array";
162
+ readonly items: {};
163
+ };
164
+ readonly metrics: {
165
+ readonly type: "object";
166
+ readonly additionalProperties: true;
167
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
168
+ };
169
+ readonly telemetryRecorded: {
170
+ readonly type: "boolean";
171
+ };
172
+ readonly executionId: {
173
+ readonly anyOf: readonly [{
174
+ readonly type: "string";
175
+ }, {
176
+ readonly type: "null";
177
+ }];
178
+ };
179
+ readonly replayed: {
180
+ readonly type: "boolean";
181
+ };
182
+ readonly originalResultOmitted: {
183
+ readonly type: "boolean";
184
+ };
185
+ };
186
+ readonly required: readonly ["success"];
187
+ readonly additionalProperties: true;
188
+ };
189
+ readonly Policy: {
190
+ readonly type: "object";
191
+ readonly additionalProperties: true;
192
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
193
+ };
194
+ readonly Execution: {
195
+ readonly type: "object";
196
+ readonly properties: {
197
+ readonly id: {
198
+ readonly type: "string";
199
+ };
200
+ readonly scriptName: {
201
+ readonly anyOf: readonly [{
202
+ readonly type: "string";
203
+ }, {
204
+ readonly type: "null";
205
+ }];
206
+ };
207
+ readonly mode: {
208
+ readonly type: "string";
209
+ };
210
+ readonly status: {
211
+ readonly type: "string";
212
+ };
213
+ readonly durationMs: {
214
+ readonly type: "number";
215
+ };
216
+ readonly instructionsUsed: {
217
+ readonly type: "integer";
218
+ };
219
+ readonly errorCode: {
220
+ readonly anyOf: readonly [{
221
+ readonly type: "string";
222
+ }, {
223
+ readonly type: "null";
224
+ }];
225
+ };
226
+ readonly httpCalls: {
227
+ readonly type: "integer";
228
+ };
229
+ readonly dbOps: {
230
+ readonly type: "integer";
231
+ };
232
+ readonly errorMessage: {
233
+ readonly anyOf: readonly [{
234
+ readonly type: "string";
235
+ }, {
236
+ readonly type: "null";
237
+ }];
238
+ };
239
+ readonly hasSource: {
240
+ readonly type: "boolean";
241
+ };
242
+ readonly timings: {
243
+ readonly $ref: "#/components/schemas/Timings";
244
+ };
245
+ readonly createdAt: {
246
+ readonly type: "string";
247
+ readonly format: "date-time";
248
+ };
249
+ readonly expiresAt: {
250
+ readonly type: "string";
251
+ readonly format: "date-time";
252
+ };
253
+ };
254
+ readonly required: readonly ["id", "mode", "status", "durationMs", "instructionsUsed", "createdAt"];
255
+ readonly additionalProperties: true;
256
+ };
257
+ readonly ExecutionDetail: {
258
+ readonly type: "object";
259
+ readonly properties: {
260
+ readonly id: {
261
+ readonly type: "string";
262
+ };
263
+ readonly scriptName: {
264
+ readonly anyOf: readonly [{
265
+ readonly type: "string";
266
+ }, {
267
+ readonly type: "null";
268
+ }];
269
+ };
270
+ readonly mode: {
271
+ readonly type: "string";
272
+ };
273
+ readonly status: {
274
+ readonly type: "string";
275
+ };
276
+ readonly durationMs: {
277
+ readonly type: "number";
278
+ };
279
+ readonly instructionsUsed: {
280
+ readonly type: "integer";
281
+ };
282
+ readonly errorCode: {
283
+ readonly anyOf: readonly [{
284
+ readonly type: "string";
285
+ }, {
286
+ readonly type: "null";
287
+ }];
288
+ };
289
+ readonly httpCalls: {
290
+ readonly type: "integer";
291
+ };
292
+ readonly dbOps: {
293
+ readonly type: "integer";
294
+ };
295
+ readonly errorMessage: {
296
+ readonly anyOf: readonly [{
297
+ readonly type: "string";
298
+ }, {
299
+ readonly type: "null";
300
+ }];
301
+ };
302
+ readonly hasSource: {
303
+ readonly type: "boolean";
304
+ };
305
+ readonly timings: {
306
+ readonly $ref: "#/components/schemas/Timings";
307
+ };
308
+ readonly createdAt: {
309
+ readonly type: "string";
310
+ readonly format: "date-time";
311
+ };
312
+ readonly expiresAt: {
313
+ readonly type: "string";
314
+ readonly format: "date-time";
315
+ };
316
+ readonly sourceCode: {
317
+ readonly anyOf: readonly [{
318
+ readonly type: "string";
319
+ }, {
320
+ readonly type: "null";
321
+ }];
322
+ };
323
+ readonly outputPreview: {
324
+ readonly anyOf: readonly [{
325
+ readonly type: "string";
326
+ }, {
327
+ readonly type: "null";
328
+ }];
329
+ };
330
+ };
331
+ readonly required: readonly ["id", "mode", "status", "durationMs", "instructionsUsed", "createdAt"];
332
+ readonly additionalProperties: true;
333
+ };
334
+ readonly ExecutionPage: {
335
+ readonly type: "object";
336
+ readonly properties: {
337
+ readonly items: {
338
+ readonly type: "array";
339
+ readonly items: {
340
+ readonly $ref: "#/components/schemas/Execution";
341
+ };
342
+ };
343
+ readonly nextCursor: {
344
+ readonly anyOf: readonly [{
345
+ readonly type: "string";
346
+ }, {
347
+ readonly type: "null";
348
+ }];
349
+ };
350
+ readonly policy: {
351
+ readonly $ref: "#/components/schemas/Policy";
352
+ };
353
+ };
354
+ readonly required: readonly ["items", "nextCursor", "policy"];
355
+ readonly additionalProperties: false;
356
+ };
357
+ readonly Script: {
358
+ readonly type: "object";
359
+ readonly properties: {
360
+ readonly id: {
361
+ readonly type: "string";
362
+ readonly format: "uuid";
363
+ };
364
+ readonly name: {
365
+ readonly type: "string";
366
+ };
367
+ readonly currentVersion: {
368
+ readonly type: "integer";
369
+ };
370
+ readonly createdAt: {
371
+ readonly type: "string";
372
+ readonly format: "date-time";
373
+ };
374
+ readonly updatedAt: {
375
+ readonly type: "string";
376
+ readonly format: "date-time";
377
+ };
378
+ };
379
+ readonly required: readonly ["id", "name", "currentVersion", "createdAt", "updatedAt"];
380
+ readonly additionalProperties: false;
381
+ };
382
+ readonly ScriptDetail: {
383
+ readonly type: "object";
384
+ readonly properties: {
385
+ readonly id: {
386
+ readonly type: "string";
387
+ readonly format: "uuid";
388
+ };
389
+ readonly name: {
390
+ readonly type: "string";
391
+ };
392
+ readonly currentVersion: {
393
+ readonly type: "integer";
394
+ };
395
+ readonly createdAt: {
396
+ readonly type: "string";
397
+ readonly format: "date-time";
398
+ };
399
+ readonly updatedAt: {
400
+ readonly type: "string";
401
+ readonly format: "date-time";
402
+ };
403
+ readonly code: {
404
+ readonly type: "string";
405
+ };
406
+ readonly versions: {
407
+ readonly type: "array";
408
+ readonly items: {
409
+ readonly type: "object";
410
+ readonly properties: {
411
+ readonly version: {
412
+ readonly type: "integer";
413
+ };
414
+ readonly createdAt: {
415
+ readonly type: "string";
416
+ readonly format: "date-time";
417
+ };
418
+ readonly bytes: {
419
+ readonly type: "integer";
420
+ };
421
+ };
422
+ readonly required: readonly ["version", "createdAt", "bytes"];
423
+ readonly additionalProperties: false;
424
+ };
425
+ };
426
+ };
427
+ readonly required: readonly ["id", "name", "currentVersion", "createdAt", "updatedAt", "code", "versions"];
428
+ readonly additionalProperties: true;
429
+ };
430
+ readonly ScriptList: {
431
+ readonly type: "object";
432
+ readonly properties: {
433
+ readonly items: {
434
+ readonly type: "array";
435
+ readonly items: {
436
+ readonly $ref: "#/components/schemas/Script";
437
+ };
438
+ };
439
+ readonly policy: {
440
+ readonly $ref: "#/components/schemas/Policy";
441
+ };
442
+ };
443
+ readonly required: readonly ["items", "policy"];
444
+ readonly additionalProperties: false;
445
+ };
446
+ readonly ScriptCreate: {
447
+ readonly type: "object";
448
+ readonly properties: {
449
+ readonly name: {
450
+ readonly type: "string";
451
+ readonly minLength: 1;
452
+ readonly maxLength: 80;
453
+ readonly pattern: "\\S";
454
+ };
455
+ readonly code: {
456
+ readonly type: "string";
457
+ readonly minLength: 1;
458
+ readonly maxLength: 6000;
459
+ };
460
+ };
461
+ readonly required: readonly ["name", "code"];
462
+ readonly additionalProperties: false;
463
+ };
464
+ readonly ScriptUpdate: {
465
+ readonly type: "object";
466
+ readonly properties: {
467
+ readonly name: {
468
+ readonly type: "string";
469
+ readonly minLength: 1;
470
+ readonly maxLength: 80;
471
+ readonly pattern: "\\S";
472
+ };
473
+ readonly code: {
474
+ readonly type: "string";
475
+ readonly minLength: 1;
476
+ readonly maxLength: 6000;
477
+ };
478
+ readonly expectedVersion: {
479
+ readonly type: "integer";
480
+ readonly minimum: 1;
481
+ readonly maximum: 2147483646;
482
+ };
483
+ };
484
+ readonly required: readonly ["name", "code", "expectedVersion"];
485
+ readonly additionalProperties: false;
486
+ };
487
+ readonly ScriptRestore: {
488
+ readonly type: "object";
489
+ readonly properties: {
490
+ readonly version: {
491
+ readonly type: "integer";
492
+ readonly minimum: 1;
493
+ readonly maximum: 2147483646;
494
+ };
495
+ readonly expectedVersion: {
496
+ readonly type: "integer";
497
+ readonly minimum: 1;
498
+ readonly maximum: 2147483646;
499
+ };
500
+ };
501
+ readonly required: readonly ["version", "expectedVersion"];
502
+ readonly additionalProperties: false;
503
+ };
504
+ readonly ScriptVersion: {
505
+ readonly type: "object";
506
+ readonly properties: {
507
+ readonly version: {
508
+ readonly type: "integer";
509
+ };
510
+ readonly code: {
511
+ readonly type: "string";
512
+ };
513
+ readonly createdAt: {
514
+ readonly type: "string";
515
+ readonly format: "date-time";
516
+ };
517
+ };
518
+ readonly required: readonly ["version", "code", "createdAt"];
519
+ readonly additionalProperties: false;
520
+ };
521
+ readonly Deleted: {
522
+ readonly type: "object";
523
+ readonly properties: {
524
+ readonly deleted: {
525
+ readonly type: "boolean";
526
+ };
527
+ };
528
+ readonly required: readonly ["deleted"];
529
+ readonly additionalProperties: false;
530
+ };
531
+ readonly Storage: {
532
+ readonly type: "object";
533
+ readonly properties: {
534
+ readonly policy: {
535
+ readonly $ref: "#/components/schemas/Policy";
536
+ };
537
+ readonly history: {
538
+ readonly type: "object";
539
+ readonly properties: {
540
+ readonly count: {
541
+ readonly type: "integer";
542
+ };
543
+ readonly bytes: {
544
+ readonly type: "integer";
545
+ };
546
+ };
547
+ readonly required: readonly ["count", "bytes"];
548
+ readonly additionalProperties: false;
549
+ };
550
+ readonly scripts: {
551
+ readonly type: "object";
552
+ readonly properties: {
553
+ readonly count: {
554
+ readonly type: "integer";
555
+ };
556
+ readonly versions: {
557
+ readonly type: "integer";
558
+ };
559
+ readonly bytes: {
560
+ readonly type: "integer";
561
+ };
562
+ };
563
+ readonly required: readonly ["count", "versions", "bytes"];
564
+ readonly additionalProperties: false;
565
+ };
566
+ };
567
+ readonly required: readonly ["policy", "history", "scripts"];
568
+ readonly additionalProperties: false;
569
+ };
570
+ readonly Secret: {
571
+ readonly type: "object";
572
+ readonly properties: {
573
+ readonly name: {
574
+ readonly type: "string";
575
+ readonly pattern: "^[A-Z][A-Z0-9_]{0,63}$";
576
+ };
577
+ readonly allowInline: {
578
+ readonly type: "boolean";
579
+ };
580
+ readonly scriptIds: {
581
+ readonly type: "array";
582
+ readonly items: {
583
+ readonly type: "string";
584
+ readonly format: "uuid";
585
+ };
586
+ };
587
+ readonly version: {
588
+ readonly type: "integer";
589
+ };
590
+ readonly createdAt: {
591
+ readonly type: "string";
592
+ readonly format: "date-time";
593
+ };
594
+ readonly updatedAt: {
595
+ readonly type: "string";
596
+ readonly format: "date-time";
597
+ };
598
+ };
599
+ readonly required: readonly ["name", "allowInline", "scriptIds", "version", "createdAt", "updatedAt"];
600
+ readonly additionalProperties: false;
601
+ };
602
+ readonly SecretList: {
603
+ readonly type: "object";
604
+ readonly properties: {
605
+ readonly items: {
606
+ readonly type: "array";
607
+ readonly items: {
608
+ readonly $ref: "#/components/schemas/Secret";
609
+ };
610
+ };
611
+ };
612
+ readonly required: readonly ["items"];
613
+ readonly additionalProperties: false;
614
+ };
615
+ readonly SecretCreate: {
616
+ readonly type: "object";
617
+ readonly properties: {
618
+ readonly name: {
619
+ readonly type: "string";
620
+ readonly pattern: "^[A-Z][A-Z0-9_]{0,63}$";
621
+ };
622
+ readonly value: {
623
+ readonly type: "string";
624
+ readonly minLength: 8;
625
+ readonly maxLength: 4096;
626
+ readonly writeOnly: true;
627
+ readonly description: "Write-only credential: 8–4096 UTF-8 bytes; never returned. No null characters or malformed Unicode.";
628
+ };
629
+ readonly allowInline: {
630
+ readonly type: "boolean";
631
+ readonly default: false;
632
+ };
633
+ readonly scriptIds: {
634
+ readonly type: "array";
635
+ readonly items: {
636
+ readonly type: "string";
637
+ readonly format: "uuid";
638
+ };
639
+ readonly maxItems: 10;
640
+ readonly uniqueItems: true;
641
+ };
642
+ };
643
+ readonly required: readonly ["name", "value"];
644
+ readonly additionalProperties: false;
645
+ };
646
+ readonly SecretUpdate: {
647
+ readonly type: "object";
648
+ readonly properties: {
649
+ readonly value: {
650
+ readonly type: "string";
651
+ readonly minLength: 8;
652
+ readonly maxLength: 4096;
653
+ readonly writeOnly: true;
654
+ readonly description: "Write-only credential: 8–4096 UTF-8 bytes; never returned. No null characters or malformed Unicode.";
655
+ };
656
+ readonly allowInline: {
657
+ readonly type: "boolean";
658
+ };
659
+ readonly scriptIds: {
660
+ readonly type: "array";
661
+ readonly items: {
662
+ readonly type: "string";
663
+ readonly format: "uuid";
664
+ };
665
+ readonly maxItems: 10;
666
+ readonly uniqueItems: true;
667
+ };
668
+ };
669
+ readonly required: readonly [];
670
+ readonly additionalProperties: false;
671
+ readonly minProperties: 1;
672
+ };
673
+ readonly SandboxLimits: {
674
+ readonly type: "object";
675
+ readonly properties: {
676
+ readonly timeoutMs: {
677
+ readonly type: "integer";
678
+ };
679
+ readonly maxInstructions: {
680
+ readonly type: "integer";
681
+ };
682
+ readonly maxMemoryMb: {
683
+ readonly type: "integer";
684
+ };
685
+ };
686
+ readonly required: readonly ["timeoutMs", "maxInstructions", "maxMemoryMb"];
687
+ readonly additionalProperties: false;
688
+ };
689
+ readonly Sandbox: {
690
+ readonly type: "object";
691
+ readonly properties: {
692
+ readonly plan: {
693
+ readonly type: "string";
694
+ };
695
+ readonly configurable: {
696
+ readonly type: "boolean";
697
+ };
698
+ readonly limits: {
699
+ readonly $ref: "#/components/schemas/SandboxLimits";
700
+ };
701
+ readonly defaults: {
702
+ readonly $ref: "#/components/schemas/SandboxLimits";
703
+ };
704
+ readonly maxLimits: {
705
+ readonly $ref: "#/components/schemas/SandboxLimits";
706
+ };
707
+ };
708
+ readonly required: readonly ["plan", "configurable", "limits", "defaults", "maxLimits"];
709
+ readonly additionalProperties: false;
710
+ };
711
+ readonly Plan: {
712
+ readonly type: "object";
713
+ readonly properties: {
714
+ readonly id: {
715
+ readonly type: "string";
716
+ };
717
+ readonly configurable: {
718
+ readonly type: "boolean";
719
+ };
720
+ readonly limits: {
721
+ readonly $ref: "#/components/schemas/SandboxLimits";
722
+ };
723
+ readonly maxLimits: {
724
+ readonly $ref: "#/components/schemas/SandboxLimits";
725
+ };
726
+ readonly name: {
727
+ readonly type: "string";
728
+ };
729
+ readonly monthlyUsd: {
730
+ readonly anyOf: readonly [{
731
+ readonly type: "number";
732
+ }, {
733
+ readonly type: "null";
734
+ }];
735
+ };
736
+ readonly yearlyMonthlyUsd: {
737
+ readonly anyOf: readonly [{
738
+ readonly type: "number";
739
+ }, {
740
+ readonly type: "null";
741
+ }];
742
+ };
743
+ readonly usageUsdPer1k: {
744
+ readonly type: "number";
745
+ };
746
+ readonly executionsPerMonth: {
747
+ readonly anyOf: readonly [{
748
+ readonly type: "integer";
749
+ }, {
750
+ readonly type: "null";
751
+ }];
752
+ };
753
+ readonly timeoutMs: {
754
+ readonly type: "integer";
755
+ };
756
+ readonly features: {
757
+ readonly type: "array";
758
+ readonly items: {
759
+ readonly type: "string";
760
+ };
761
+ };
762
+ };
763
+ readonly required: readonly ["id", "name", "limits", "executionsPerMonth"];
764
+ readonly additionalProperties: true;
765
+ };
766
+ readonly Plans: {
767
+ readonly type: "object";
768
+ readonly properties: {
769
+ readonly configured: {
770
+ readonly type: "boolean";
771
+ };
772
+ readonly plans: {
773
+ readonly type: "array";
774
+ readonly items: {
775
+ readonly $ref: "#/components/schemas/Plan";
776
+ };
777
+ };
778
+ };
779
+ readonly required: readonly ["configured", "plans"];
780
+ readonly additionalProperties: false;
781
+ };
782
+ readonly BillingStatus: {
783
+ readonly type: "object";
784
+ readonly properties: {
785
+ readonly configured: {
786
+ readonly type: "boolean";
787
+ };
788
+ readonly plan: {
789
+ readonly $ref: "#/components/schemas/Plan";
790
+ };
791
+ readonly subscription: {
792
+ readonly anyOf: readonly [{
793
+ readonly type: "object";
794
+ readonly properties: {
795
+ readonly status: {
796
+ readonly type: "string";
797
+ };
798
+ readonly interval: {
799
+ readonly anyOf: readonly [{
800
+ readonly type: "string";
801
+ }, {
802
+ readonly type: "null";
803
+ }];
804
+ };
805
+ readonly currentPeriodEnd: {
806
+ readonly anyOf: readonly [{
807
+ readonly type: "string";
808
+ readonly format: "date-time";
809
+ }, {
810
+ readonly type: "null";
811
+ }];
812
+ };
813
+ readonly cancelAtPeriodEnd: {
814
+ readonly type: "boolean";
815
+ };
816
+ readonly hasCustomer: {
817
+ readonly type: "boolean";
818
+ };
819
+ };
820
+ readonly required: readonly [];
821
+ readonly additionalProperties: true;
822
+ }, {
823
+ readonly type: "null";
824
+ }];
825
+ };
826
+ readonly usage: {
827
+ readonly type: "object";
828
+ readonly properties: {
829
+ readonly executions: {
830
+ readonly type: "integer";
831
+ };
832
+ readonly limit: {
833
+ readonly anyOf: readonly [{
834
+ readonly type: "integer";
835
+ }, {
836
+ readonly type: "null";
837
+ }];
838
+ };
839
+ readonly resetsAt: {
840
+ readonly type: "string";
841
+ readonly format: "date-time";
842
+ };
843
+ };
844
+ readonly required: readonly ["executions", "limit", "resetsAt"];
845
+ readonly additionalProperties: false;
846
+ };
847
+ };
848
+ readonly required: readonly ["configured", "plan", "subscription", "usage"];
849
+ readonly additionalProperties: false;
850
+ };
851
+ readonly UsageSummary: {
852
+ readonly type: "object";
853
+ readonly properties: {
854
+ readonly windowDays: {
855
+ readonly type: "integer";
856
+ };
857
+ readonly totalExecutions: {
858
+ readonly type: "integer";
859
+ };
860
+ readonly successfulExecutions: {
861
+ readonly type: "integer";
862
+ };
863
+ readonly failedExecutions: {
864
+ readonly type: "integer";
865
+ };
866
+ readonly averageDurationMs: {
867
+ readonly type: "number";
868
+ };
869
+ readonly latest: {
870
+ readonly type: "array";
871
+ readonly items: {
872
+ readonly type: "object";
873
+ readonly additionalProperties: true;
874
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
875
+ };
876
+ };
877
+ };
878
+ readonly required: readonly ["windowDays", "totalExecutions", "successfulExecutions", "failedExecutions", "averageDurationMs", "latest"];
879
+ readonly additionalProperties: false;
880
+ };
881
+ readonly UsageHistory: {
882
+ readonly type: "object";
883
+ readonly properties: {
884
+ readonly days: {
885
+ readonly type: "integer";
886
+ };
887
+ readonly total: {
888
+ readonly type: "integer";
889
+ };
890
+ readonly success: {
891
+ readonly type: "integer";
892
+ };
893
+ readonly failed: {
894
+ readonly type: "integer";
895
+ };
896
+ readonly successRate: {
897
+ readonly type: "number";
898
+ };
899
+ readonly daily: {
900
+ readonly type: "array";
901
+ readonly items: {
902
+ readonly type: "object";
903
+ readonly properties: {
904
+ readonly date: {
905
+ readonly type: "string";
906
+ };
907
+ readonly total: {
908
+ readonly type: "integer";
909
+ };
910
+ readonly success: {
911
+ readonly type: "integer";
912
+ };
913
+ readonly failed: {
914
+ readonly type: "integer";
915
+ };
916
+ readonly avgDurationMs: {
917
+ readonly type: "number";
918
+ };
919
+ };
920
+ readonly required: readonly ["date", "total", "success", "failed", "avgDurationMs"];
921
+ readonly additionalProperties: false;
922
+ };
923
+ };
924
+ readonly topScripts: {
925
+ readonly type: "array";
926
+ readonly items: {
927
+ readonly type: "object";
928
+ readonly properties: {
929
+ readonly name: {
930
+ readonly type: "string";
931
+ };
932
+ readonly count: {
933
+ readonly type: "integer";
934
+ };
935
+ };
936
+ readonly required: readonly ["name", "count"];
937
+ readonly additionalProperties: false;
938
+ };
939
+ };
940
+ readonly topScriptsSample: {
941
+ readonly type: "object";
942
+ readonly properties: {
943
+ readonly days: {
944
+ readonly type: "integer";
945
+ };
946
+ readonly limit: {
947
+ readonly type: "integer";
948
+ };
949
+ };
950
+ readonly required: readonly ["days", "limit"];
951
+ readonly additionalProperties: false;
952
+ };
953
+ readonly apiKeys: {
954
+ readonly type: "object";
955
+ readonly properties: {
956
+ readonly active: {
957
+ readonly type: "integer";
958
+ };
959
+ readonly lastUsedAt: {
960
+ readonly anyOf: readonly [{
961
+ readonly type: "string";
962
+ readonly format: "date-time";
963
+ }, {
964
+ readonly type: "null";
965
+ }];
966
+ };
967
+ };
968
+ readonly required: readonly ["active", "lastUsedAt"];
969
+ readonly additionalProperties: false;
970
+ };
971
+ };
972
+ readonly required: readonly ["days", "total", "success", "failed", "successRate", "daily", "topScripts", "topScriptsSample", "apiKeys"];
973
+ readonly additionalProperties: false;
974
+ };
975
+ readonly TelemetryExecution: {
976
+ readonly type: "object";
977
+ readonly properties: {
978
+ readonly scriptName: {
979
+ readonly type: "string";
980
+ readonly maxLength: 200;
981
+ };
982
+ readonly mode: {
983
+ readonly type: "string";
984
+ readonly maxLength: 40;
985
+ };
986
+ readonly status: {
987
+ readonly type: "string";
988
+ readonly maxLength: 40;
989
+ };
990
+ readonly durationMs: {
991
+ readonly type: "integer";
992
+ readonly minimum: 0;
993
+ readonly maximum: 86400000;
994
+ };
995
+ readonly instructionsUsed: {
996
+ readonly type: "integer";
997
+ readonly minimum: 0;
998
+ };
999
+ readonly memoryUsageKb: {
1000
+ readonly type: "integer";
1001
+ readonly minimum: 0;
1002
+ };
1003
+ readonly errorCode: {
1004
+ readonly type: "string";
1005
+ readonly maxLength: 100;
1006
+ };
1007
+ readonly metadata: {
1008
+ readonly type: "object";
1009
+ readonly additionalProperties: true;
1010
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
1011
+ };
1012
+ };
1013
+ readonly required: readonly ["status", "durationMs", "instructionsUsed"];
1014
+ readonly additionalProperties: false;
1015
+ };
1016
+ readonly TelemetryEvent: {
1017
+ readonly type: "object";
1018
+ readonly properties: {
1019
+ readonly eventName: {
1020
+ readonly type: "string";
1021
+ readonly maxLength: 80;
1022
+ };
1023
+ readonly pagePath: {
1024
+ readonly type: "string";
1025
+ readonly maxLength: 300;
1026
+ };
1027
+ readonly sessionId: {
1028
+ readonly type: "string";
1029
+ readonly maxLength: 100;
1030
+ };
1031
+ readonly fingerprintHash: {
1032
+ readonly type: "string";
1033
+ readonly maxLength: 128;
1034
+ };
1035
+ readonly properties: {
1036
+ readonly type: "object";
1037
+ readonly additionalProperties: {
1038
+ readonly anyOf: readonly [{
1039
+ readonly type: "string";
1040
+ }, {
1041
+ readonly type: "number";
1042
+ }, {
1043
+ readonly type: "boolean";
1044
+ }, {
1045
+ readonly type: "null";
1046
+ }];
1047
+ };
1048
+ };
1049
+ };
1050
+ readonly required: readonly ["eventName"];
1051
+ readonly additionalProperties: false;
1052
+ };
1053
+ readonly TelemetryRecorded: {
1054
+ readonly anyOf: readonly [{
1055
+ readonly type: "object";
1056
+ readonly additionalProperties: true;
1057
+ readonly description: "JSON execution input, at most 8 KiB encoded. Available as ctx.input.";
1058
+ }, {
1059
+ readonly type: "string";
1060
+ }, {
1061
+ readonly type: "null";
1062
+ }];
1063
+ };
1064
+ readonly Accepted: {
1065
+ readonly type: "object";
1066
+ readonly properties: {
1067
+ readonly accepted: {
1068
+ readonly type: "boolean";
1069
+ };
1070
+ };
1071
+ readonly required: readonly ["accepted"];
1072
+ readonly additionalProperties: false;
1073
+ };
1074
+ readonly Health: {
1075
+ readonly type: "object";
1076
+ readonly properties: {
1077
+ readonly status: {
1078
+ readonly type: "string";
1079
+ readonly enum: readonly ["operational", "degraded"];
1080
+ };
1081
+ readonly timestamp: {
1082
+ readonly type: "string";
1083
+ readonly format: "date-time";
1084
+ };
1085
+ readonly services: {
1086
+ readonly type: "array";
1087
+ readonly items: {
1088
+ readonly type: "object";
1089
+ readonly properties: {
1090
+ readonly id: {
1091
+ readonly type: "string";
1092
+ };
1093
+ readonly name: {
1094
+ readonly type: "string";
1095
+ };
1096
+ readonly status: {
1097
+ readonly type: "string";
1098
+ readonly enum: readonly ["operational", "degraded"];
1099
+ };
1100
+ };
1101
+ readonly required: readonly ["id", "name", "status"];
1102
+ readonly additionalProperties: false;
1103
+ };
1104
+ };
1105
+ };
1106
+ readonly required: readonly ["status", "timestamp", "services"];
1107
+ readonly additionalProperties: false;
1108
+ };
1109
+ };
1110
+ readonly operations: readonly [{
1111
+ readonly id: "execute";
1112
+ readonly method: "POST";
1113
+ readonly path: "/api/runtime/execute";
1114
+ readonly request: "ExecuteRequest";
1115
+ readonly response: "ExecuteResponse";
1116
+ readonly scope: "scripts:execute";
1117
+ }, {
1118
+ readonly id: "executions.list";
1119
+ readonly method: "GET";
1120
+ readonly path: "/api/workspace/history";
1121
+ readonly request: null;
1122
+ readonly response: "ExecutionPage";
1123
+ readonly scope: "executions:read";
1124
+ }, {
1125
+ readonly id: "executions.get";
1126
+ readonly method: "GET";
1127
+ readonly path: "/api/workspace/history/{id}";
1128
+ readonly request: null;
1129
+ readonly response: "ExecutionDetail";
1130
+ readonly scope: "executions:read";
1131
+ }, {
1132
+ readonly id: "scripts.list";
1133
+ readonly method: "GET";
1134
+ readonly path: "/api/workspace/scripts";
1135
+ readonly request: null;
1136
+ readonly response: "ScriptList";
1137
+ readonly scope: "scripts:read";
1138
+ }, {
1139
+ readonly id: "scripts.create";
1140
+ readonly method: "POST";
1141
+ readonly path: "/api/workspace/scripts";
1142
+ readonly request: "ScriptCreate";
1143
+ readonly response: "Script";
1144
+ readonly scope: "scripts:write";
1145
+ }, {
1146
+ readonly id: "scripts.get";
1147
+ readonly method: "GET";
1148
+ readonly path: "/api/workspace/scripts/{id}";
1149
+ readonly request: null;
1150
+ readonly response: "ScriptDetail";
1151
+ readonly scope: "scripts:read";
1152
+ }, {
1153
+ readonly id: "scripts.update";
1154
+ readonly method: "PATCH";
1155
+ readonly path: "/api/workspace/scripts/{id}";
1156
+ readonly request: "ScriptUpdate";
1157
+ readonly response: "Script";
1158
+ readonly scope: "scripts:write";
1159
+ }, {
1160
+ readonly id: "scripts.delete";
1161
+ readonly method: "DELETE";
1162
+ readonly path: "/api/workspace/scripts/{id}";
1163
+ readonly request: null;
1164
+ readonly response: "Deleted";
1165
+ readonly scope: "scripts:write";
1166
+ }, {
1167
+ readonly id: "scripts.getVersion";
1168
+ readonly method: "GET";
1169
+ readonly path: "/api/workspace/scripts/{id}/versions/{version}";
1170
+ readonly request: null;
1171
+ readonly response: "ScriptVersion";
1172
+ readonly scope: "scripts:read";
1173
+ }, {
1174
+ readonly id: "scripts.restore";
1175
+ readonly method: "POST";
1176
+ readonly path: "/api/workspace/scripts/{id}/restore";
1177
+ readonly request: "ScriptRestore";
1178
+ readonly response: "Script";
1179
+ readonly scope: "scripts:write";
1180
+ }, {
1181
+ readonly id: "scripts.storage";
1182
+ readonly method: "GET";
1183
+ readonly path: "/api/workspace/storage";
1184
+ readonly request: null;
1185
+ readonly response: "Storage";
1186
+ readonly scope: "scripts:read";
1187
+ }, {
1188
+ readonly id: "secrets.list";
1189
+ readonly method: "GET";
1190
+ readonly path: "/api/secrets";
1191
+ readonly request: null;
1192
+ readonly response: "SecretList";
1193
+ readonly scope: "secrets:read";
1194
+ }, {
1195
+ readonly id: "secrets.create";
1196
+ readonly method: "POST";
1197
+ readonly path: "/api/secrets";
1198
+ readonly request: "SecretCreate";
1199
+ readonly response: "Secret";
1200
+ readonly scope: "secrets:write";
1201
+ }, {
1202
+ readonly id: "secrets.get";
1203
+ readonly method: "GET";
1204
+ readonly path: "/api/secrets/{name}";
1205
+ readonly request: null;
1206
+ readonly response: "Secret";
1207
+ readonly scope: "secrets:read";
1208
+ }, {
1209
+ readonly id: "secrets.update";
1210
+ readonly method: "PATCH";
1211
+ readonly path: "/api/secrets/{name}";
1212
+ readonly request: "SecretUpdate";
1213
+ readonly response: "Secret";
1214
+ readonly scope: "secrets:write";
1215
+ }, {
1216
+ readonly id: "secrets.delete";
1217
+ readonly method: "DELETE";
1218
+ readonly path: "/api/secrets/{name}";
1219
+ readonly request: null;
1220
+ readonly response: "Deleted";
1221
+ readonly scope: "secrets:write";
1222
+ }, {
1223
+ readonly id: "usage.get";
1224
+ readonly method: "GET";
1225
+ readonly path: "/api/billing/status";
1226
+ readonly request: null;
1227
+ readonly response: "BillingStatus";
1228
+ readonly scope: "usage:read";
1229
+ }, {
1230
+ readonly id: "usage.summary";
1231
+ readonly method: "GET";
1232
+ readonly path: "/api/telemetry/summary";
1233
+ readonly request: null;
1234
+ readonly response: "UsageSummary";
1235
+ readonly scope: "usage:read";
1236
+ }, {
1237
+ readonly id: "usage.history";
1238
+ readonly method: "GET";
1239
+ readonly path: "/api/telemetry/usage";
1240
+ readonly request: null;
1241
+ readonly response: "UsageHistory";
1242
+ readonly scope: "usage:read";
1243
+ }, {
1244
+ readonly id: "sandbox.get";
1245
+ readonly method: "GET";
1246
+ readonly path: "/api/billing/sandbox";
1247
+ readonly request: null;
1248
+ readonly response: "Sandbox";
1249
+ readonly scope: "scripts:read";
1250
+ }, {
1251
+ readonly id: "billing.plans";
1252
+ readonly method: "GET";
1253
+ readonly path: "/api/billing/plans";
1254
+ readonly request: null;
1255
+ readonly response: "Plans";
1256
+ readonly scope: null;
1257
+ }, {
1258
+ readonly id: "telemetry.recordExecution";
1259
+ readonly method: "POST";
1260
+ readonly path: "/api/telemetry/executions";
1261
+ readonly request: "TelemetryExecution";
1262
+ readonly response: "TelemetryRecorded";
1263
+ readonly scope: "telemetry:write";
1264
+ }, {
1265
+ readonly id: "telemetry.recordEvent";
1266
+ readonly method: "POST";
1267
+ readonly path: "/api/telemetry/events";
1268
+ readonly request: "TelemetryEvent";
1269
+ readonly response: "Accepted";
1270
+ readonly scope: "telemetry:write";
1271
+ }, {
1272
+ readonly id: "health.get";
1273
+ readonly method: "GET";
1274
+ readonly path: "/api/health";
1275
+ readonly request: null;
1276
+ readonly response: "Health";
1277
+ readonly scope: null;
1278
+ }];
1279
+ };