@kya-os/contracts 1.6.17 → 1.6.19

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,1001 @@
1
+ /**
2
+ * One-Click Deployment Zod Validation Schemas
3
+ *
4
+ * Runtime validation schemas for the AgentShield One-Click Deployment API.
5
+ * These schemas ensure request/response validation at API boundaries.
6
+ *
7
+ * @package @kya-os/contracts/deploy
8
+ */
9
+ import { z } from "zod";
10
+ /**
11
+ * Valid template types for deployment
12
+ */
13
+ export declare const templateTypeSchema: z.ZodEnum<["blank", "ecommerce", "hardware-world"]>;
14
+ /**
15
+ * Valid deployment platforms
16
+ */
17
+ export declare const deployPlatformSchema: z.ZodEnum<["cloudflare", "vercel"]>;
18
+ /**
19
+ * GitHub account type schema
20
+ */
21
+ export declare const gitHubAccountTypeSchema: z.ZodEnum<["User", "Organization"]>;
22
+ /**
23
+ * GitHub installation schema
24
+ */
25
+ export declare const gitHubInstallationSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ installationId: z.ZodNumber;
28
+ account: z.ZodObject<{
29
+ login: z.ZodString;
30
+ avatarUrl: z.ZodString;
31
+ type: z.ZodEnum<["User", "Organization"]>;
32
+ id: z.ZodNumber;
33
+ }, "strip", z.ZodTypeAny, {
34
+ id: number;
35
+ type: "User" | "Organization";
36
+ login: string;
37
+ avatarUrl: string;
38
+ }, {
39
+ id: number;
40
+ type: "User" | "Organization";
41
+ login: string;
42
+ avatarUrl: string;
43
+ }>;
44
+ permissions: z.ZodArray<z.ZodString, "many">;
45
+ suspendedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ createdAt: z.ZodString;
47
+ updatedAt: z.ZodString;
48
+ }, "strip", z.ZodTypeAny, {
49
+ id: string;
50
+ installationId: number;
51
+ account: {
52
+ id: number;
53
+ type: "User" | "Organization";
54
+ login: string;
55
+ avatarUrl: string;
56
+ };
57
+ permissions: string[];
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ suspendedAt?: string | null | undefined;
61
+ }, {
62
+ id: string;
63
+ installationId: number;
64
+ account: {
65
+ id: number;
66
+ type: "User" | "Organization";
67
+ login: string;
68
+ avatarUrl: string;
69
+ };
70
+ permissions: string[];
71
+ createdAt: string;
72
+ updatedAt: string;
73
+ suspendedAt?: string | null | undefined;
74
+ }>;
75
+ /**
76
+ * GitHub repository schema
77
+ */
78
+ export declare const gitHubRepositorySchema: z.ZodObject<{
79
+ name: z.ZodString;
80
+ fullName: z.ZodString;
81
+ private: z.ZodBoolean;
82
+ url: z.ZodString;
83
+ defaultBranch: z.ZodString;
84
+ }, "strip", z.ZodTypeAny, {
85
+ name: string;
86
+ fullName: string;
87
+ private: boolean;
88
+ url: string;
89
+ defaultBranch: string;
90
+ }, {
91
+ name: string;
92
+ fullName: string;
93
+ private: boolean;
94
+ url: string;
95
+ defaultBranch: string;
96
+ }>;
97
+ /**
98
+ * GitHub install initiation response schema
99
+ */
100
+ export declare const gitHubInstallInitResponseSchema: z.ZodObject<{
101
+ success: z.ZodLiteral<true>;
102
+ installationUrl: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ success: true;
105
+ installationUrl: string;
106
+ }, {
107
+ success: true;
108
+ installationUrl: string;
109
+ }>;
110
+ /**
111
+ * GitHub callback query schema
112
+ */
113
+ export declare const gitHubCallbackQuerySchema: z.ZodObject<{
114
+ installation_id: z.ZodString;
115
+ setup_action: z.ZodEnum<["install", "update"]>;
116
+ code: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ installation_id: string;
119
+ setup_action: "install" | "update";
120
+ code?: string | undefined;
121
+ }, {
122
+ installation_id: string;
123
+ setup_action: "install" | "update";
124
+ code?: string | undefined;
125
+ }>;
126
+ /**
127
+ * GitHub callback response schema
128
+ */
129
+ export declare const gitHubCallbackResponseSchema: z.ZodObject<{
130
+ success: z.ZodLiteral<true>;
131
+ installation: z.ZodObject<{
132
+ id: z.ZodString;
133
+ installationId: z.ZodNumber;
134
+ account: z.ZodObject<{
135
+ login: z.ZodString;
136
+ avatarUrl: z.ZodString;
137
+ type: z.ZodEnum<["User", "Organization"]>;
138
+ id: z.ZodNumber;
139
+ }, "strip", z.ZodTypeAny, {
140
+ id: number;
141
+ type: "User" | "Organization";
142
+ login: string;
143
+ avatarUrl: string;
144
+ }, {
145
+ id: number;
146
+ type: "User" | "Organization";
147
+ login: string;
148
+ avatarUrl: string;
149
+ }>;
150
+ permissions: z.ZodArray<z.ZodString, "many">;
151
+ suspendedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
+ createdAt: z.ZodString;
153
+ updatedAt: z.ZodString;
154
+ }, "strip", z.ZodTypeAny, {
155
+ id: string;
156
+ installationId: number;
157
+ account: {
158
+ id: number;
159
+ type: "User" | "Organization";
160
+ login: string;
161
+ avatarUrl: string;
162
+ };
163
+ permissions: string[];
164
+ createdAt: string;
165
+ updatedAt: string;
166
+ suspendedAt?: string | null | undefined;
167
+ }, {
168
+ id: string;
169
+ installationId: number;
170
+ account: {
171
+ id: number;
172
+ type: "User" | "Organization";
173
+ login: string;
174
+ avatarUrl: string;
175
+ };
176
+ permissions: string[];
177
+ createdAt: string;
178
+ updatedAt: string;
179
+ suspendedAt?: string | null | undefined;
180
+ }>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ success: true;
183
+ installation: {
184
+ id: string;
185
+ installationId: number;
186
+ account: {
187
+ id: number;
188
+ type: "User" | "Organization";
189
+ login: string;
190
+ avatarUrl: string;
191
+ };
192
+ permissions: string[];
193
+ createdAt: string;
194
+ updatedAt: string;
195
+ suspendedAt?: string | null | undefined;
196
+ };
197
+ }, {
198
+ success: true;
199
+ installation: {
200
+ id: string;
201
+ installationId: number;
202
+ account: {
203
+ id: number;
204
+ type: "User" | "Organization";
205
+ login: string;
206
+ avatarUrl: string;
207
+ };
208
+ permissions: string[];
209
+ createdAt: string;
210
+ updatedAt: string;
211
+ suspendedAt?: string | null | undefined;
212
+ };
213
+ }>;
214
+ /**
215
+ * GitHub status response schema
216
+ */
217
+ export declare const gitHubStatusResponseSchema: z.ZodObject<{
218
+ success: z.ZodLiteral<true>;
219
+ data: z.ZodObject<{
220
+ connected: z.ZodBoolean;
221
+ installation: z.ZodOptional<z.ZodObject<{
222
+ id: z.ZodString;
223
+ installationId: z.ZodNumber;
224
+ account: z.ZodObject<{
225
+ login: z.ZodString;
226
+ avatarUrl: z.ZodString;
227
+ type: z.ZodEnum<["User", "Organization"]>;
228
+ id: z.ZodNumber;
229
+ }, "strip", z.ZodTypeAny, {
230
+ id: number;
231
+ type: "User" | "Organization";
232
+ login: string;
233
+ avatarUrl: string;
234
+ }, {
235
+ id: number;
236
+ type: "User" | "Organization";
237
+ login: string;
238
+ avatarUrl: string;
239
+ }>;
240
+ permissions: z.ZodArray<z.ZodString, "many">;
241
+ suspendedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ createdAt: z.ZodString;
243
+ updatedAt: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ id: string;
246
+ installationId: number;
247
+ account: {
248
+ id: number;
249
+ type: "User" | "Organization";
250
+ login: string;
251
+ avatarUrl: string;
252
+ };
253
+ permissions: string[];
254
+ createdAt: string;
255
+ updatedAt: string;
256
+ suspendedAt?: string | null | undefined;
257
+ }, {
258
+ id: string;
259
+ installationId: number;
260
+ account: {
261
+ id: number;
262
+ type: "User" | "Organization";
263
+ login: string;
264
+ avatarUrl: string;
265
+ };
266
+ permissions: string[];
267
+ createdAt: string;
268
+ updatedAt: string;
269
+ suspendedAt?: string | null | undefined;
270
+ }>>;
271
+ repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
272
+ name: z.ZodString;
273
+ fullName: z.ZodString;
274
+ private: z.ZodBoolean;
275
+ url: z.ZodString;
276
+ defaultBranch: z.ZodString;
277
+ }, "strip", z.ZodTypeAny, {
278
+ name: string;
279
+ fullName: string;
280
+ private: boolean;
281
+ url: string;
282
+ defaultBranch: string;
283
+ }, {
284
+ name: string;
285
+ fullName: string;
286
+ private: boolean;
287
+ url: string;
288
+ defaultBranch: string;
289
+ }>, "many">>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ connected: boolean;
292
+ installation?: {
293
+ id: string;
294
+ installationId: number;
295
+ account: {
296
+ id: number;
297
+ type: "User" | "Organization";
298
+ login: string;
299
+ avatarUrl: string;
300
+ };
301
+ permissions: string[];
302
+ createdAt: string;
303
+ updatedAt: string;
304
+ suspendedAt?: string | null | undefined;
305
+ } | undefined;
306
+ repositories?: {
307
+ name: string;
308
+ fullName: string;
309
+ private: boolean;
310
+ url: string;
311
+ defaultBranch: string;
312
+ }[] | undefined;
313
+ }, {
314
+ connected: boolean;
315
+ installation?: {
316
+ id: string;
317
+ installationId: number;
318
+ account: {
319
+ id: number;
320
+ type: "User" | "Organization";
321
+ login: string;
322
+ avatarUrl: string;
323
+ };
324
+ permissions: string[];
325
+ createdAt: string;
326
+ updatedAt: string;
327
+ suspendedAt?: string | null | undefined;
328
+ } | undefined;
329
+ repositories?: {
330
+ name: string;
331
+ fullName: string;
332
+ private: boolean;
333
+ url: string;
334
+ defaultBranch: string;
335
+ }[] | undefined;
336
+ }>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ data: {
339
+ connected: boolean;
340
+ installation?: {
341
+ id: string;
342
+ installationId: number;
343
+ account: {
344
+ id: number;
345
+ type: "User" | "Organization";
346
+ login: string;
347
+ avatarUrl: string;
348
+ };
349
+ permissions: string[];
350
+ createdAt: string;
351
+ updatedAt: string;
352
+ suspendedAt?: string | null | undefined;
353
+ } | undefined;
354
+ repositories?: {
355
+ name: string;
356
+ fullName: string;
357
+ private: boolean;
358
+ url: string;
359
+ defaultBranch: string;
360
+ }[] | undefined;
361
+ };
362
+ success: true;
363
+ }, {
364
+ data: {
365
+ connected: boolean;
366
+ installation?: {
367
+ id: string;
368
+ installationId: number;
369
+ account: {
370
+ id: number;
371
+ type: "User" | "Organization";
372
+ login: string;
373
+ avatarUrl: string;
374
+ };
375
+ permissions: string[];
376
+ createdAt: string;
377
+ updatedAt: string;
378
+ suspendedAt?: string | null | undefined;
379
+ } | undefined;
380
+ repositories?: {
381
+ name: string;
382
+ fullName: string;
383
+ private: boolean;
384
+ url: string;
385
+ defaultBranch: string;
386
+ }[] | undefined;
387
+ };
388
+ success: true;
389
+ }>;
390
+ /**
391
+ * GitHub disconnect response schema
392
+ */
393
+ export declare const gitHubDisconnectResponseSchema: z.ZodObject<{
394
+ success: z.ZodLiteral<true>;
395
+ disconnected: z.ZodBoolean;
396
+ }, "strip", z.ZodTypeAny, {
397
+ success: true;
398
+ disconnected: boolean;
399
+ }, {
400
+ success: true;
401
+ disconnected: boolean;
402
+ }>;
403
+ /**
404
+ * Deploy error code schema
405
+ */
406
+ export declare const deployErrorCodeSchema: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "TEMPLATE_NOT_FOUND", "GITHUB_API_ERROR", "SCAFFOLDER_ERROR", "PROJECT_CREATION_ERROR", "SECRETS_ERROR", "INTERNAL_ERROR"]>;
407
+ /**
408
+ * Repository name validation
409
+ * - Must be lowercase alphanumeric with hyphens
410
+ * - Cannot start or end with hyphen
411
+ * - Length 1-100 characters
412
+ */
413
+ export declare const repoNameSchema: z.ZodString;
414
+ /**
415
+ * Deploy to GitHub request schema
416
+ */
417
+ export declare const deployToGitHubRequestSchema: z.ZodObject<{
418
+ repoName: z.ZodString;
419
+ template: z.ZodEnum<["blank", "ecommerce", "hardware-world"]>;
420
+ platform: z.ZodEnum<["cloudflare", "vercel"]>;
421
+ isPrivate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
422
+ description: z.ZodOptional<z.ZodString>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ repoName: string;
425
+ template: "blank" | "ecommerce" | "hardware-world";
426
+ platform: "cloudflare" | "vercel";
427
+ isPrivate: boolean;
428
+ description?: string | undefined;
429
+ }, {
430
+ repoName: string;
431
+ template: "blank" | "ecommerce" | "hardware-world";
432
+ platform: "cloudflare" | "vercel";
433
+ isPrivate?: boolean | undefined;
434
+ description?: string | undefined;
435
+ }>;
436
+ /**
437
+ * Deployed project schema
438
+ */
439
+ export declare const deployedProjectSchema: z.ZodObject<{
440
+ id: z.ZodString;
441
+ friendlyId: z.ZodString;
442
+ apiKey: z.ZodString;
443
+ }, "strip", z.ZodTypeAny, {
444
+ id: string;
445
+ friendlyId: string;
446
+ apiKey: string;
447
+ }, {
448
+ id: string;
449
+ friendlyId: string;
450
+ apiKey: string;
451
+ }>;
452
+ /**
453
+ * Deploy to GitHub data schema
454
+ */
455
+ export declare const deployToGitHubDataSchema: z.ZodObject<{
456
+ repoUrl: z.ZodString;
457
+ repoFullName: z.ZodString;
458
+ project: z.ZodObject<{
459
+ id: z.ZodString;
460
+ friendlyId: z.ZodString;
461
+ apiKey: z.ZodString;
462
+ }, "strip", z.ZodTypeAny, {
463
+ id: string;
464
+ friendlyId: string;
465
+ apiKey: string;
466
+ }, {
467
+ id: string;
468
+ friendlyId: string;
469
+ apiKey: string;
470
+ }>;
471
+ deployUrl: z.ZodString;
472
+ nextSteps: z.ZodArray<z.ZodString, "many">;
473
+ }, "strip", z.ZodTypeAny, {
474
+ repoUrl: string;
475
+ repoFullName: string;
476
+ project: {
477
+ id: string;
478
+ friendlyId: string;
479
+ apiKey: string;
480
+ };
481
+ deployUrl: string;
482
+ nextSteps: string[];
483
+ }, {
484
+ repoUrl: string;
485
+ repoFullName: string;
486
+ project: {
487
+ id: string;
488
+ friendlyId: string;
489
+ apiKey: string;
490
+ };
491
+ deployUrl: string;
492
+ nextSteps: string[];
493
+ }>;
494
+ /**
495
+ * Deploy success response schema
496
+ */
497
+ export declare const deployToGitHubResponseSchema: z.ZodObject<{
498
+ success: z.ZodLiteral<true>;
499
+ data: z.ZodObject<{
500
+ repoUrl: z.ZodString;
501
+ repoFullName: z.ZodString;
502
+ project: z.ZodObject<{
503
+ id: z.ZodString;
504
+ friendlyId: z.ZodString;
505
+ apiKey: z.ZodString;
506
+ }, "strip", z.ZodTypeAny, {
507
+ id: string;
508
+ friendlyId: string;
509
+ apiKey: string;
510
+ }, {
511
+ id: string;
512
+ friendlyId: string;
513
+ apiKey: string;
514
+ }>;
515
+ deployUrl: z.ZodString;
516
+ nextSteps: z.ZodArray<z.ZodString, "many">;
517
+ }, "strip", z.ZodTypeAny, {
518
+ repoUrl: string;
519
+ repoFullName: string;
520
+ project: {
521
+ id: string;
522
+ friendlyId: string;
523
+ apiKey: string;
524
+ };
525
+ deployUrl: string;
526
+ nextSteps: string[];
527
+ }, {
528
+ repoUrl: string;
529
+ repoFullName: string;
530
+ project: {
531
+ id: string;
532
+ friendlyId: string;
533
+ apiKey: string;
534
+ };
535
+ deployUrl: string;
536
+ nextSteps: string[];
537
+ }>;
538
+ }, "strip", z.ZodTypeAny, {
539
+ data: {
540
+ repoUrl: string;
541
+ repoFullName: string;
542
+ project: {
543
+ id: string;
544
+ friendlyId: string;
545
+ apiKey: string;
546
+ };
547
+ deployUrl: string;
548
+ nextSteps: string[];
549
+ };
550
+ success: true;
551
+ }, {
552
+ data: {
553
+ repoUrl: string;
554
+ repoFullName: string;
555
+ project: {
556
+ id: string;
557
+ friendlyId: string;
558
+ apiKey: string;
559
+ };
560
+ deployUrl: string;
561
+ nextSteps: string[];
562
+ };
563
+ success: true;
564
+ }>;
565
+ /**
566
+ * Deploy error response schema
567
+ */
568
+ export declare const deployErrorResponseSchema: z.ZodObject<{
569
+ success: z.ZodLiteral<false>;
570
+ error: z.ZodObject<{
571
+ code: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "TEMPLATE_NOT_FOUND", "GITHUB_API_ERROR", "SCAFFOLDER_ERROR", "PROJECT_CREATION_ERROR", "SECRETS_ERROR", "INTERNAL_ERROR"]>;
572
+ message: z.ZodString;
573
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
574
+ }, "strip", z.ZodTypeAny, {
575
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
576
+ message: string;
577
+ details?: Record<string, unknown> | undefined;
578
+ }, {
579
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
580
+ message: string;
581
+ details?: Record<string, unknown> | undefined;
582
+ }>;
583
+ }, "strip", z.ZodTypeAny, {
584
+ success: false;
585
+ error: {
586
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
587
+ message: string;
588
+ details?: Record<string, unknown> | undefined;
589
+ };
590
+ }, {
591
+ success: false;
592
+ error: {
593
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
594
+ message: string;
595
+ details?: Record<string, unknown> | undefined;
596
+ };
597
+ }>;
598
+ /**
599
+ * Deploy result union schema
600
+ */
601
+ export declare const deployToGitHubResultSchema: z.ZodDiscriminatedUnion<"success", [z.ZodObject<{
602
+ success: z.ZodLiteral<true>;
603
+ data: z.ZodObject<{
604
+ repoUrl: z.ZodString;
605
+ repoFullName: z.ZodString;
606
+ project: z.ZodObject<{
607
+ id: z.ZodString;
608
+ friendlyId: z.ZodString;
609
+ apiKey: z.ZodString;
610
+ }, "strip", z.ZodTypeAny, {
611
+ id: string;
612
+ friendlyId: string;
613
+ apiKey: string;
614
+ }, {
615
+ id: string;
616
+ friendlyId: string;
617
+ apiKey: string;
618
+ }>;
619
+ deployUrl: z.ZodString;
620
+ nextSteps: z.ZodArray<z.ZodString, "many">;
621
+ }, "strip", z.ZodTypeAny, {
622
+ repoUrl: string;
623
+ repoFullName: string;
624
+ project: {
625
+ id: string;
626
+ friendlyId: string;
627
+ apiKey: string;
628
+ };
629
+ deployUrl: string;
630
+ nextSteps: string[];
631
+ }, {
632
+ repoUrl: string;
633
+ repoFullName: string;
634
+ project: {
635
+ id: string;
636
+ friendlyId: string;
637
+ apiKey: string;
638
+ };
639
+ deployUrl: string;
640
+ nextSteps: string[];
641
+ }>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ data: {
644
+ repoUrl: string;
645
+ repoFullName: string;
646
+ project: {
647
+ id: string;
648
+ friendlyId: string;
649
+ apiKey: string;
650
+ };
651
+ deployUrl: string;
652
+ nextSteps: string[];
653
+ };
654
+ success: true;
655
+ }, {
656
+ data: {
657
+ repoUrl: string;
658
+ repoFullName: string;
659
+ project: {
660
+ id: string;
661
+ friendlyId: string;
662
+ apiKey: string;
663
+ };
664
+ deployUrl: string;
665
+ nextSteps: string[];
666
+ };
667
+ success: true;
668
+ }>, z.ZodObject<{
669
+ success: z.ZodLiteral<false>;
670
+ error: z.ZodObject<{
671
+ code: z.ZodEnum<["GITHUB_NOT_CONNECTED", "REPO_NAME_TAKEN", "REPO_NAME_INVALID", "RATE_LIMIT_EXCEEDED", "PLAN_LIMIT_EXCEEDED", "TEMPLATE_NOT_FOUND", "GITHUB_API_ERROR", "SCAFFOLDER_ERROR", "PROJECT_CREATION_ERROR", "SECRETS_ERROR", "INTERNAL_ERROR"]>;
672
+ message: z.ZodString;
673
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
674
+ }, "strip", z.ZodTypeAny, {
675
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
676
+ message: string;
677
+ details?: Record<string, unknown> | undefined;
678
+ }, {
679
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
680
+ message: string;
681
+ details?: Record<string, unknown> | undefined;
682
+ }>;
683
+ }, "strip", z.ZodTypeAny, {
684
+ success: false;
685
+ error: {
686
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
687
+ message: string;
688
+ details?: Record<string, unknown> | undefined;
689
+ };
690
+ }, {
691
+ success: false;
692
+ error: {
693
+ code: "GITHUB_NOT_CONNECTED" | "REPO_NAME_TAKEN" | "REPO_NAME_INVALID" | "RATE_LIMIT_EXCEEDED" | "PLAN_LIMIT_EXCEEDED" | "TEMPLATE_NOT_FOUND" | "GITHUB_API_ERROR" | "SCAFFOLDER_ERROR" | "PROJECT_CREATION_ERROR" | "SECRETS_ERROR" | "INTERNAL_ERROR";
694
+ message: string;
695
+ details?: Record<string, unknown> | undefined;
696
+ };
697
+ }>]>;
698
+ /**
699
+ * Deployed repository schema
700
+ */
701
+ export declare const deployedRepositorySchema: z.ZodObject<{
702
+ id: z.ZodString;
703
+ userId: z.ZodString;
704
+ projectId: z.ZodString;
705
+ installationId: z.ZodString;
706
+ repoFullName: z.ZodString;
707
+ repoUrl: z.ZodString;
708
+ template: z.ZodEnum<["blank", "ecommerce", "hardware-world"]>;
709
+ platform: z.ZodEnum<["cloudflare", "vercel"]>;
710
+ cloudflareDeployed: z.ZodBoolean;
711
+ cloudflareUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
712
+ createdAt: z.ZodString;
713
+ updatedAt: z.ZodString;
714
+ }, "strip", z.ZodTypeAny, {
715
+ id: string;
716
+ installationId: string;
717
+ createdAt: string;
718
+ updatedAt: string;
719
+ template: "blank" | "ecommerce" | "hardware-world";
720
+ platform: "cloudflare" | "vercel";
721
+ repoUrl: string;
722
+ repoFullName: string;
723
+ userId: string;
724
+ projectId: string;
725
+ cloudflareDeployed: boolean;
726
+ cloudflareUrl?: string | null | undefined;
727
+ }, {
728
+ id: string;
729
+ installationId: string;
730
+ createdAt: string;
731
+ updatedAt: string;
732
+ template: "blank" | "ecommerce" | "hardware-world";
733
+ platform: "cloudflare" | "vercel";
734
+ repoUrl: string;
735
+ repoFullName: string;
736
+ userId: string;
737
+ projectId: string;
738
+ cloudflareDeployed: boolean;
739
+ cloudflareUrl?: string | null | undefined;
740
+ }>;
741
+ /**
742
+ * List deployed repositories response schema
743
+ */
744
+ export declare const listDeployedRepositoriesResponseSchema: z.ZodObject<{
745
+ success: z.ZodLiteral<true>;
746
+ data: z.ZodArray<z.ZodObject<{
747
+ id: z.ZodString;
748
+ userId: z.ZodString;
749
+ projectId: z.ZodString;
750
+ installationId: z.ZodString;
751
+ repoFullName: z.ZodString;
752
+ repoUrl: z.ZodString;
753
+ template: z.ZodEnum<["blank", "ecommerce", "hardware-world"]>;
754
+ platform: z.ZodEnum<["cloudflare", "vercel"]>;
755
+ cloudflareDeployed: z.ZodBoolean;
756
+ cloudflareUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
757
+ createdAt: z.ZodString;
758
+ updatedAt: z.ZodString;
759
+ }, "strip", z.ZodTypeAny, {
760
+ id: string;
761
+ installationId: string;
762
+ createdAt: string;
763
+ updatedAt: string;
764
+ template: "blank" | "ecommerce" | "hardware-world";
765
+ platform: "cloudflare" | "vercel";
766
+ repoUrl: string;
767
+ repoFullName: string;
768
+ userId: string;
769
+ projectId: string;
770
+ cloudflareDeployed: boolean;
771
+ cloudflareUrl?: string | null | undefined;
772
+ }, {
773
+ id: string;
774
+ installationId: string;
775
+ createdAt: string;
776
+ updatedAt: string;
777
+ template: "blank" | "ecommerce" | "hardware-world";
778
+ platform: "cloudflare" | "vercel";
779
+ repoUrl: string;
780
+ repoFullName: string;
781
+ userId: string;
782
+ projectId: string;
783
+ cloudflareDeployed: boolean;
784
+ cloudflareUrl?: string | null | undefined;
785
+ }>, "many">;
786
+ }, "strip", z.ZodTypeAny, {
787
+ data: {
788
+ id: string;
789
+ installationId: string;
790
+ createdAt: string;
791
+ updatedAt: string;
792
+ template: "blank" | "ecommerce" | "hardware-world";
793
+ platform: "cloudflare" | "vercel";
794
+ repoUrl: string;
795
+ repoFullName: string;
796
+ userId: string;
797
+ projectId: string;
798
+ cloudflareDeployed: boolean;
799
+ cloudflareUrl?: string | null | undefined;
800
+ }[];
801
+ success: true;
802
+ }, {
803
+ data: {
804
+ id: string;
805
+ installationId: string;
806
+ createdAt: string;
807
+ updatedAt: string;
808
+ template: "blank" | "ecommerce" | "hardware-world";
809
+ platform: "cloudflare" | "vercel";
810
+ repoUrl: string;
811
+ repoFullName: string;
812
+ userId: string;
813
+ projectId: string;
814
+ cloudflareDeployed: boolean;
815
+ cloudflareUrl?: string | null | undefined;
816
+ }[];
817
+ success: true;
818
+ }>;
819
+ /**
820
+ * Generated file schema
821
+ */
822
+ export declare const generatedFileSchema: z.ZodObject<{
823
+ path: z.ZodString;
824
+ content: z.ZodString;
825
+ isBase64: z.ZodOptional<z.ZodBoolean>;
826
+ }, "strip", z.ZodTypeAny, {
827
+ path: string;
828
+ content: string;
829
+ isBase64?: boolean | undefined;
830
+ }, {
831
+ path: string;
832
+ content: string;
833
+ isBase64?: boolean | undefined;
834
+ }>;
835
+ /**
836
+ * Scaffolder options schema
837
+ */
838
+ export declare const scaffolderOptionsSchema: z.ZodObject<{
839
+ projectName: z.ZodString;
840
+ template: z.ZodEnum<["blank", "ecommerce", "hardware-world"]>;
841
+ platform: z.ZodEnum<["cloudflare", "vercel"]>;
842
+ agentShieldProjectId: z.ZodOptional<z.ZodString>;
843
+ agentShieldApiKey: z.ZodOptional<z.ZodString>;
844
+ skipIdentity: z.ZodOptional<z.ZodBoolean>;
845
+ }, "strip", z.ZodTypeAny, {
846
+ template: "blank" | "ecommerce" | "hardware-world";
847
+ platform: "cloudflare" | "vercel";
848
+ projectName: string;
849
+ agentShieldProjectId?: string | undefined;
850
+ agentShieldApiKey?: string | undefined;
851
+ skipIdentity?: boolean | undefined;
852
+ }, {
853
+ template: "blank" | "ecommerce" | "hardware-world";
854
+ platform: "cloudflare" | "vercel";
855
+ projectName: string;
856
+ agentShieldProjectId?: string | undefined;
857
+ agentShieldApiKey?: string | undefined;
858
+ skipIdentity?: boolean | undefined;
859
+ }>;
860
+ /**
861
+ * Scaffolder result schema
862
+ */
863
+ export declare const scaffolderResultSchema: z.ZodObject<{
864
+ success: z.ZodBoolean;
865
+ files: z.ZodArray<z.ZodObject<{
866
+ path: z.ZodString;
867
+ content: z.ZodString;
868
+ isBase64: z.ZodOptional<z.ZodBoolean>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ path: string;
871
+ content: string;
872
+ isBase64?: boolean | undefined;
873
+ }, {
874
+ path: string;
875
+ content: string;
876
+ isBase64?: boolean | undefined;
877
+ }>, "many">;
878
+ identity: z.ZodOptional<z.ZodObject<{
879
+ did: z.ZodString;
880
+ publicKey: z.ZodString;
881
+ privateKey: z.ZodString;
882
+ }, "strip", z.ZodTypeAny, {
883
+ did: string;
884
+ publicKey: string;
885
+ privateKey: string;
886
+ }, {
887
+ did: string;
888
+ publicKey: string;
889
+ privateKey: string;
890
+ }>>;
891
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
892
+ }, "strip", z.ZodTypeAny, {
893
+ success: boolean;
894
+ files: {
895
+ path: string;
896
+ content: string;
897
+ isBase64?: boolean | undefined;
898
+ }[];
899
+ identity?: {
900
+ did: string;
901
+ publicKey: string;
902
+ privateKey: string;
903
+ } | undefined;
904
+ warnings?: string[] | undefined;
905
+ }, {
906
+ success: boolean;
907
+ files: {
908
+ path: string;
909
+ content: string;
910
+ isBase64?: boolean | undefined;
911
+ }[];
912
+ identity?: {
913
+ did: string;
914
+ publicKey: string;
915
+ privateKey: string;
916
+ } | undefined;
917
+ warnings?: string[] | undefined;
918
+ }>;
919
+ /**
920
+ * Deploy step status schema
921
+ */
922
+ export declare const deployStepStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
923
+ /**
924
+ * Deploy step schema
925
+ */
926
+ export declare const deployStepSchema: z.ZodObject<{
927
+ id: z.ZodString;
928
+ name: z.ZodString;
929
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
930
+ message: z.ZodOptional<z.ZodString>;
931
+ startedAt: z.ZodOptional<z.ZodString>;
932
+ completedAt: z.ZodOptional<z.ZodString>;
933
+ }, "strip", z.ZodTypeAny, {
934
+ id: string;
935
+ status: "pending" | "in_progress" | "completed" | "failed";
936
+ name: string;
937
+ message?: string | undefined;
938
+ startedAt?: string | undefined;
939
+ completedAt?: string | undefined;
940
+ }, {
941
+ id: string;
942
+ status: "pending" | "in_progress" | "completed" | "failed";
943
+ name: string;
944
+ message?: string | undefined;
945
+ startedAt?: string | undefined;
946
+ completedAt?: string | undefined;
947
+ }>;
948
+ /**
949
+ * Deployment progress schema
950
+ */
951
+ export declare const deploymentProgressSchema: z.ZodObject<{
952
+ steps: z.ZodArray<z.ZodObject<{
953
+ id: z.ZodString;
954
+ name: z.ZodString;
955
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
956
+ message: z.ZodOptional<z.ZodString>;
957
+ startedAt: z.ZodOptional<z.ZodString>;
958
+ completedAt: z.ZodOptional<z.ZodString>;
959
+ }, "strip", z.ZodTypeAny, {
960
+ id: string;
961
+ status: "pending" | "in_progress" | "completed" | "failed";
962
+ name: string;
963
+ message?: string | undefined;
964
+ startedAt?: string | undefined;
965
+ completedAt?: string | undefined;
966
+ }, {
967
+ id: string;
968
+ status: "pending" | "in_progress" | "completed" | "failed";
969
+ name: string;
970
+ message?: string | undefined;
971
+ startedAt?: string | undefined;
972
+ completedAt?: string | undefined;
973
+ }>, "many">;
974
+ currentStep: z.ZodNumber;
975
+ totalSteps: z.ZodNumber;
976
+ overallStatus: z.ZodEnum<["pending", "in_progress", "completed", "failed"]>;
977
+ }, "strip", z.ZodTypeAny, {
978
+ steps: {
979
+ id: string;
980
+ status: "pending" | "in_progress" | "completed" | "failed";
981
+ name: string;
982
+ message?: string | undefined;
983
+ startedAt?: string | undefined;
984
+ completedAt?: string | undefined;
985
+ }[];
986
+ currentStep: number;
987
+ totalSteps: number;
988
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
989
+ }, {
990
+ steps: {
991
+ id: string;
992
+ status: "pending" | "in_progress" | "completed" | "failed";
993
+ name: string;
994
+ message?: string | undefined;
995
+ startedAt?: string | undefined;
996
+ completedAt?: string | undefined;
997
+ }[];
998
+ currentStep: number;
999
+ totalSteps: number;
1000
+ overallStatus: "pending" | "in_progress" | "completed" | "failed";
1001
+ }>;