vibeusage 0.3.0 → 0.3.1
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.
- package/README.md +13 -7
- package/node_modules/@insforge/sdk/LICENSE +201 -201
- package/node_modules/@insforge/sdk/README.md +326 -259
- package/node_modules/@insforge/sdk/dist/index.d.mts +377 -182
- package/node_modules/@insforge/sdk/dist/index.d.ts +377 -182
- package/node_modules/@insforge/sdk/dist/index.js +1172 -677
- package/node_modules/@insforge/sdk/dist/index.js.map +1 -1
- package/node_modules/@insforge/sdk/dist/index.mjs +1171 -677
- package/node_modules/@insforge/sdk/dist/index.mjs.map +1 -1
- package/node_modules/@insforge/sdk/package.json +68 -68
- package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.d.ts +1120 -43
- package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.js +179 -5
- package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/ai.schema.d.ts +25 -25
- package/node_modules/@insforge/shared-schemas/dist/ai.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/ai.schema.js +2 -2
- package/node_modules/@insforge/shared-schemas/dist/ai.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.d.ts +197 -51
- package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.js +87 -23
- package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/auth.schema.d.ts +32 -3
- package/node_modules/@insforge/shared-schemas/dist/auth.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/auth.schema.js +21 -3
- package/node_modules/@insforge/shared-schemas/dist/auth.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.d.ts +380 -0
- package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.js +74 -0
- package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/database-api.schema.d.ts +13 -13
- package/node_modules/@insforge/shared-schemas/dist/database-api.schema.js +1 -1
- package/node_modules/@insforge/shared-schemas/dist/database-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/deployments-api.schema.d.ts +735 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments-api.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments-api.schema.js +209 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments-api.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments.schema.d.ts +37 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments.schema.js +25 -0
- package/node_modules/@insforge/shared-schemas/dist/deployments.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/docs.schema.d.ts +5 -1
- package/node_modules/@insforge/shared-schemas/dist/docs.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/docs.schema.js +34 -4
- package/node_modules/@insforge/shared-schemas/dist/docs.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/email-api.schema.js +1 -1
- package/node_modules/@insforge/shared-schemas/dist/email-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.d.ts +186 -6
- package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.js +21 -2
- package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/functions.schema.d.ts +5 -5
- package/node_modules/@insforge/shared-schemas/dist/functions.schema.js +1 -1
- package/node_modules/@insforge/shared-schemas/dist/functions.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/index.d.ts +24 -18
- package/node_modules/@insforge/shared-schemas/dist/index.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/index.js +24 -18
- package/node_modules/@insforge/shared-schemas/dist/index.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/logs-api.schema.js +1 -1
- package/node_modules/@insforge/shared-schemas/dist/logs-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/logs.schema.d.ts +43 -0
- package/node_modules/@insforge/shared-schemas/dist/logs.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/logs.schema.js +11 -0
- package/node_modules/@insforge/shared-schemas/dist/logs.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/metadata.schema.d.ts +229 -172
- package/node_modules/@insforge/shared-schemas/dist/metadata.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/metadata.schema.js +27 -7
- package/node_modules/@insforge/shared-schemas/dist/metadata.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/rate-limit-api.schema.d.ts +51 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit-api.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit-api.schema.js +31 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit-api.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit.schema.d.ts +31 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit.schema.js +12 -0
- package/node_modules/@insforge/shared-schemas/dist/rate-limit.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.d.ts +39 -20
- package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.js +5 -1
- package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/realtime.schema.d.ts +12 -4
- package/node_modules/@insforge/shared-schemas/dist/realtime.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/realtime.schema.js +6 -0
- package/node_modules/@insforge/shared-schemas/dist/realtime.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/schedules-api.schema.d.ts +287 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules-api.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules-api.schema.js +81 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules-api.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules.schema.d.ts +77 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules.schema.js +36 -0
- package/node_modules/@insforge/shared-schemas/dist/schedules.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets-api.schema.d.ts +113 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets-api.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets-api.schema.js +31 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets-api.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets.schema.d.ts +31 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets.schema.d.ts.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets.schema.js +13 -0
- package/node_modules/@insforge/shared-schemas/dist/secrets.schema.js.map +1 -0
- package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.d.ts +27 -2
- package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.js +9 -1
- package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/storage.schema.d.ts +17 -0
- package/node_modules/@insforge/shared-schemas/dist/storage.schema.d.ts.map +1 -1
- package/node_modules/@insforge/shared-schemas/dist/storage.schema.js +6 -0
- package/node_modules/@insforge/shared-schemas/dist/storage.schema.js.map +1 -1
- package/node_modules/@insforge/shared-schemas/package.json +2 -1
- package/package.json +2 -2
- package/src/commands/status.js +22 -0
- package/src/commands/sync.js +33 -22
- package/src/lib/diagnostics.js +34 -0
- package/src/lib/doctor.js +23 -0
- package/src/lib/insforge-client.js +13 -9
- package/src/lib/opencode-sqlite.js +113 -0
- package/src/lib/opencode-usage-audit.js +3 -2
- package/src/lib/rollout.js +227 -1
- package/src/lib/vibeusage-api.js +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments-api.schema.d.ts","sourceRoot":"","sources":["../src/deployments-api.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;EAGvB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;EAIzC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmB,CAAC;AAE9D,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH;;GAEG;A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;;;;;;EAYvC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqB,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqB,CAAC;AAEnE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { deploymentSchema } from './deployments.schema.js';
|
|
3
|
+
export const projectSettingsSchema = z.object({
|
|
4
|
+
buildCommand: z.string().nullable().optional(),
|
|
5
|
+
outputDirectory: z.string().nullable().optional(),
|
|
6
|
+
installCommand: z.string().nullable().optional(),
|
|
7
|
+
devCommand: z.string().nullable().optional(),
|
|
8
|
+
rootDirectory: z.string().nullable().optional(),
|
|
9
|
+
});
|
|
10
|
+
export const envVarSchema = z.object({
|
|
11
|
+
key: z.string(),
|
|
12
|
+
value: z.string(),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Response from creating a deployment - includes presigned upload info
|
|
16
|
+
*/
|
|
17
|
+
export const createDeploymentResponseSchema = z.object({
|
|
18
|
+
id: z.string().uuid(),
|
|
19
|
+
uploadUrl: z.string().url(),
|
|
20
|
+
uploadFields: z.record(z.string()), // Required for S3 presigned POST (policy, signature, key, etc.)
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Request to start a deployment (step 2)
|
|
24
|
+
* Triggers upload to Vercel and creates the actual deployment
|
|
25
|
+
*/
|
|
26
|
+
export const startDeploymentRequestSchema = z.object({
|
|
27
|
+
projectSettings: projectSettingsSchema.optional(),
|
|
28
|
+
envVars: z.array(envVarSchema).optional(),
|
|
29
|
+
meta: z.record(z.string()).optional(),
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* Response from starting a deployment
|
|
33
|
+
*/
|
|
34
|
+
export const startDeploymentResponseSchema = deploymentSchema;
|
|
35
|
+
export const listDeploymentsResponseSchema = z.object({
|
|
36
|
+
data: z.array(deploymentSchema),
|
|
37
|
+
pagination: z.object({
|
|
38
|
+
limit: z.number(),
|
|
39
|
+
offset: z.number(),
|
|
40
|
+
total: z.number(),
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Environment Variables Management API
|
|
45
|
+
// ============================================================================
|
|
46
|
+
/**
|
|
47
|
+
* Environment variable schema for list response (without value for security)
|
|
48
|
+
*/
|
|
49
|
+
export const deploymentEnvVarSchema = z.object({
|
|
50
|
+
id: z.string(), // Vercel env var ID (needed for delete/get)
|
|
51
|
+
key: z.string(),
|
|
52
|
+
type: z.enum(['plain', 'encrypted', 'secret', 'sensitive', 'system']),
|
|
53
|
+
updatedAt: z.number().optional(), // Unix timestamp (milliseconds)
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* Environment variable schema with decrypted value (for single env var fetch)
|
|
57
|
+
*/
|
|
58
|
+
export const deploymentEnvVarWithValueSchema = z.object({
|
|
59
|
+
id: z.string(),
|
|
60
|
+
key: z.string(),
|
|
61
|
+
value: z.string(),
|
|
62
|
+
type: z.enum(['plain', 'encrypted', 'secret', 'sensitive', 'system']),
|
|
63
|
+
updatedAt: z.number().optional(),
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Response from listing environment variables
|
|
67
|
+
*/
|
|
68
|
+
export const listEnvVarsResponseSchema = z.object({
|
|
69
|
+
envVars: z.array(deploymentEnvVarSchema),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Response from getting a single environment variable with value
|
|
73
|
+
*/
|
|
74
|
+
export const getEnvVarResponseSchema = z.object({
|
|
75
|
+
envVar: deploymentEnvVarWithValueSchema,
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* Request to create or update an environment variable
|
|
79
|
+
*/
|
|
80
|
+
export const upsertEnvVarRequestSchema = z.object({
|
|
81
|
+
key: z.string().trim().min(1, 'key is required'),
|
|
82
|
+
value: z.string(),
|
|
83
|
+
});
|
|
84
|
+
/**
|
|
85
|
+
* Request to create or update multiple environment variables
|
|
86
|
+
*/
|
|
87
|
+
export const upsertEnvVarsRequestSchema = z
|
|
88
|
+
.object({
|
|
89
|
+
envVars: z.array(upsertEnvVarRequestSchema).min(1),
|
|
90
|
+
})
|
|
91
|
+
.superRefine(({ envVars }, ctx) => {
|
|
92
|
+
const firstSeenByKey = new Map();
|
|
93
|
+
envVars.forEach((envVar, index) => {
|
|
94
|
+
const existingIndex = firstSeenByKey.get(envVar.key);
|
|
95
|
+
if (existingIndex !== undefined) {
|
|
96
|
+
ctx.addIssue({
|
|
97
|
+
code: z.ZodIssueCode.custom,
|
|
98
|
+
message: 'duplicate environment variable key',
|
|
99
|
+
path: ['envVars', index, 'key'],
|
|
100
|
+
});
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
firstSeenByKey.set(envVar.key, index);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* Response from upserting an environment variable
|
|
108
|
+
*/
|
|
109
|
+
export const upsertEnvVarResponseSchema = z.object({
|
|
110
|
+
success: z.literal(true),
|
|
111
|
+
message: z.string(),
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* Response from upserting multiple environment variables
|
|
115
|
+
*/
|
|
116
|
+
export const upsertEnvVarsResponseSchema = z.object({
|
|
117
|
+
success: z.literal(true),
|
|
118
|
+
message: z.string(),
|
|
119
|
+
count: z.number().int().positive(),
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* Response from deleting an environment variable
|
|
123
|
+
*/
|
|
124
|
+
export const deleteEnvVarResponseSchema = z.object({
|
|
125
|
+
success: z.literal(true),
|
|
126
|
+
message: z.string(),
|
|
127
|
+
});
|
|
128
|
+
// ============================================================================
|
|
129
|
+
// Custom Slug/Domain Management API
|
|
130
|
+
// ============================================================================
|
|
131
|
+
/**
|
|
132
|
+
* Request to update the custom slug
|
|
133
|
+
*/
|
|
134
|
+
export const updateSlugRequestSchema = z.object({
|
|
135
|
+
slug: z
|
|
136
|
+
.string()
|
|
137
|
+
.trim()
|
|
138
|
+
.min(3, 'slug must be at least 3 characters')
|
|
139
|
+
.max(63, 'slug must be at most 63 characters')
|
|
140
|
+
.regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/, 'slug must be lowercase alphanumeric with hyphens, not starting or ending with hyphen')
|
|
141
|
+
.nullable(),
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* Response from updating the custom slug
|
|
145
|
+
*/
|
|
146
|
+
export const updateSlugResponseSchema = z.object({
|
|
147
|
+
success: z.boolean(),
|
|
148
|
+
slug: z.string().nullable(),
|
|
149
|
+
domain: z.string().nullable(),
|
|
150
|
+
});
|
|
151
|
+
/**
|
|
152
|
+
* Response from getting deployment metadata
|
|
153
|
+
*/
|
|
154
|
+
export const deploymentMetadataResponseSchema = z.object({
|
|
155
|
+
currentDeploymentId: z.string().uuid().nullable(),
|
|
156
|
+
defaultDomainUrl: z.string().nullable(),
|
|
157
|
+
customDomainUrl: z.string().nullable(),
|
|
158
|
+
});
|
|
159
|
+
// ============================================================================
|
|
160
|
+
// Custom Domain Management API (user-owned domains)
|
|
161
|
+
// ============================================================================
|
|
162
|
+
/**
|
|
163
|
+
* Verification record returned by Vercel for a domain
|
|
164
|
+
*/
|
|
165
|
+
export const domainVerificationRecordSchema = z.object({
|
|
166
|
+
type: z.string(),
|
|
167
|
+
domain: z.string(),
|
|
168
|
+
value: z.string(),
|
|
169
|
+
});
|
|
170
|
+
/**
|
|
171
|
+
* A custom domain entry returned by Vercel project domain endpoints
|
|
172
|
+
*/
|
|
173
|
+
export const customDomainSchema = z.object({
|
|
174
|
+
domain: z.string(),
|
|
175
|
+
apexDomain: z.string(),
|
|
176
|
+
verified: z.boolean(),
|
|
177
|
+
misconfigured: z.boolean(),
|
|
178
|
+
verification: z.array(domainVerificationRecordSchema),
|
|
179
|
+
cnameTarget: z.string().nullable(),
|
|
180
|
+
aRecordValue: z.string().nullable(),
|
|
181
|
+
});
|
|
182
|
+
/**
|
|
183
|
+
* Request to add a custom domain
|
|
184
|
+
*/
|
|
185
|
+
export const addCustomDomainRequestSchema = z.object({
|
|
186
|
+
domain: z
|
|
187
|
+
.string()
|
|
188
|
+
.trim()
|
|
189
|
+
.min(1, 'Domain is required')
|
|
190
|
+
.regex(/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/i, 'Invalid domain format (e.g. myapp.com or www.myapp.com)')
|
|
191
|
+
.refine((domain) => !domain.toLowerCase().endsWith('.insforge.site'), {
|
|
192
|
+
message: 'Domains ending with .insforge.site are reserved by InsForge',
|
|
193
|
+
}),
|
|
194
|
+
});
|
|
195
|
+
/**
|
|
196
|
+
* Response from adding a custom domain
|
|
197
|
+
*/
|
|
198
|
+
export const addCustomDomainResponseSchema = customDomainSchema;
|
|
199
|
+
/**
|
|
200
|
+
* Response from listing custom domains
|
|
201
|
+
*/
|
|
202
|
+
export const listCustomDomainsResponseSchema = z.object({
|
|
203
|
+
domains: z.array(customDomainSchema),
|
|
204
|
+
});
|
|
205
|
+
/**
|
|
206
|
+
* Response from verifying a custom domain
|
|
207
|
+
*/
|
|
208
|
+
export const verifyCustomDomainResponseSchema = customDomainSchema;
|
|
209
|
+
//# sourceMappingURL=deployments-api.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments-api.schema.js","sourceRoot":"","sources":["../src/deployments-api.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC9C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,EAAE,EAAE,CA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|
|
6
|
+
export declare const deploymentStatusSchema: z.ZodEnum<["WAITING", "UPLOADING", "QUEUED", "BUILDING", "READY", "ERROR", "CANCELED"]>;
|
|
7
|
+
export type DeploymentStatusType = z.infer<typeof deploymentStatusSchema>;
|
|
8
|
+
export declare const deploymentSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
providerDeploymentId: z.ZodNullable<z.ZodString>;
|
|
11
|
+
provider: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<["WAITING", "UPLOADING", "QUEUED", "BUILDING", "READY", "ERROR", "CANCELED"]>;
|
|
13
|
+
url: z.ZodNullable<z.ZodString>;
|
|
14
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
+
createdAt: z.ZodString;
|
|
16
|
+
updatedAt: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
status: "WAITING" | "UPLOADING" | "QUEUED" | "BUILDING" | "READY" | "ERROR" | "CANCELED";
|
|
19
|
+
provider: string;
|
|
20
|
+
id: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
url: string | null;
|
|
23
|
+
metadata: Record<string, unknown> | null;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
providerDeploymentId: string | null;
|
|
26
|
+
}, {
|
|
27
|
+
status: "WAITING" | "UPLOADING" | "QUEUED" | "BUILDING" | "READY" | "ERROR" | "CANCELED";
|
|
28
|
+
provider: string;
|
|
29
|
+
id: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
url: string | null;
|
|
32
|
+
metadata: Record<string, unknown> | null;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
providerDeploymentId: string | null;
|
|
35
|
+
}>;
|
|
36
|
+
export type DeploymentSchema = z.infer<typeof deploymentSchema>;
|
|
37
|
+
//# sourceMappingURL=deployments.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.schema.d.ts","sourceRoot":"","sources":["../src/deployments.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,sBAAsB,yFAQjC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Deployment status enum schema
|
|
4
|
+
* WAITING -> UPLOADING -> (Vercel statuses: QUEUED/BUILDING/READY/ERROR/CANCELED)
|
|
5
|
+
*/
|
|
6
|
+
export const deploymentStatusSchema = z.enum([
|
|
7
|
+
'WAITING', // Record created, waiting for client to upload zip to S3
|
|
8
|
+
'UPLOADING', // Server is downloading from S3 and uploading to Vercel
|
|
9
|
+
'QUEUED', // Vercel: deployment queued
|
|
10
|
+
'BUILDING', // Vercel: deployment building
|
|
11
|
+
'READY', // Vercel: deployment ready
|
|
12
|
+
'ERROR', // Vercel: deployment failed
|
|
13
|
+
'CANCELED', // Vercel: deployment canceled
|
|
14
|
+
]);
|
|
15
|
+
export const deploymentSchema = z.object({
|
|
16
|
+
id: z.string().uuid(),
|
|
17
|
+
providerDeploymentId: z.string().nullable(), // Provider's deployment ID, null until deployment starts
|
|
18
|
+
provider: z.string(),
|
|
19
|
+
status: deploymentStatusSchema,
|
|
20
|
+
url: z.string().nullable(),
|
|
21
|
+
metadata: z.record(z.unknown()).nullable(),
|
|
22
|
+
createdAt: z.string().datetime(),
|
|
23
|
+
updatedAt: z.string().datetime(),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=deployments.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.schema.js","sourceRoot":"","sources":["../src/deployments.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,SAAS,EAAE,yDAAyD;IACpE,WAAW,EAAE,wDAAwD;IACrE,QAAQ,EAAE,4BAA4B;IACtC,UAAU,EAAE,8BAA8B;IAC1C,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,4BAA4B;IACrC,UAAU,EAAE,8BAA8B;CAC3C,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,yDAAyD;IACtG,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,sBAAsB;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const sdkFeatureSchema: z.ZodEnum<["db", "storage", "functions", "auth", "ai", "realtime"]>;
|
|
3
|
+
export type SdkFeatureSchema = z.infer<typeof sdkFeatureSchema>;
|
|
4
|
+
export declare const sdkLanguageSchema: z.ZodEnum<["typescript", "swift", "kotlin", "rest-api"]>;
|
|
5
|
+
export type SdkLanguageSchema = z.infer<typeof sdkLanguageSchema>;
|
|
6
|
+
export declare const docTypeSchema: z.ZodEnum<["instructions", "auth-sdk", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "real-time", "deployment"]>;
|
|
3
7
|
export type DocTypeSchema = z.infer<typeof docTypeSchema>;
|
|
4
8
|
//# sourceMappingURL=docs.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.schema.d.ts","sourceRoot":"","sources":["../src/docs.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"docs.schema.d.ts","sourceRoot":"","sources":["../src/docs.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,qEAa1B,CAAC;AAEJ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAiB,0DAiB3B,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,aAAa,oIAuBvB,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,22 +1,52 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export const sdkFeatureSchema = z
|
|
3
|
+
.enum(['db', 'storage', 'functions', 'auth', 'ai', 'realtime'])
|
|
4
|
+
.describe(`
|
|
5
|
+
SDK feature categories:
|
|
6
|
+
|
|
7
|
+
- "db" - Database operations
|
|
8
|
+
- "storage" - File storage
|
|
9
|
+
- "functions" - Edge functions
|
|
10
|
+
- "auth" - User authentication
|
|
11
|
+
- "ai" - AI features
|
|
12
|
+
- "realtime" - Real-time WebSockets
|
|
13
|
+
`);
|
|
14
|
+
export const sdkLanguageSchema = z
|
|
15
|
+
.enum([
|
|
16
|
+
'typescript',
|
|
17
|
+
'swift',
|
|
18
|
+
'kotlin',
|
|
19
|
+
// 'flutter',
|
|
20
|
+
'rest-api',
|
|
21
|
+
])
|
|
22
|
+
.describe(`
|
|
23
|
+
SDK languages:
|
|
24
|
+
|
|
25
|
+
- "typescript" - JavaScript/TypeScript SDK
|
|
26
|
+
- "swift" - Swift SDK
|
|
27
|
+
- "kotlin" - Kotlin SDK
|
|
28
|
+
- "rest-api" - REST API
|
|
29
|
+
`);
|
|
2
30
|
export const docTypeSchema = z
|
|
3
31
|
.enum([
|
|
4
32
|
'instructions',
|
|
33
|
+
'auth-sdk',
|
|
5
34
|
'db-sdk',
|
|
6
35
|
'storage-sdk',
|
|
7
36
|
'functions-sdk',
|
|
8
37
|
'ai-integration-sdk',
|
|
9
|
-
'auth-components-react',
|
|
10
38
|
'real-time',
|
|
39
|
+
'deployment',
|
|
11
40
|
])
|
|
12
41
|
.describe(`
|
|
13
|
-
Documentation type:
|
|
42
|
+
Documentation type:
|
|
14
43
|
"instructions" (essential backend setup - use FIRST),
|
|
15
44
|
"db-sdk" (database operations),
|
|
16
45
|
"storage-sdk" (file storage),
|
|
17
46
|
"functions-sdk" (edge functions),
|
|
18
|
-
"auth-
|
|
47
|
+
"auth-sdk" (direct SDK methods for custom auth flows),
|
|
19
48
|
"ai-integration-sdk" (AI features),
|
|
20
|
-
"real-time" (real-time pub/sub through WebSockets)
|
|
49
|
+
"real-time" (real-time pub/sub through WebSockets),
|
|
50
|
+
"deployment" (deploy frontend applications via MCP tool)
|
|
21
51
|
`);
|
|
22
52
|
//# sourceMappingURL=docs.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.schema.js","sourceRoot":"","sources":["../src/docs.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,IAAI,CAAC;IACJ,cAAc;IACd,QAAQ;IACR,aAAa;IACb,eAAe;IACf,oBAAoB;IACpB,
|
|
1
|
+
{"version":3,"file":"docs.schema.js","sourceRoot":"","sources":["../src/docs.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,IAAI,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;KAC9D,QAAQ,CACP;;;;;;;;;KASC,CACF,CAAC;AAIJ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,IAAI,CAAC;IACJ,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,aAAa;IACb,UAAU;CACX,CAAC;KACD,QAAQ,CACP;;;;;;;KAOC,CACF,CAAC;AAIJ,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,IAAI,CAAC;IACJ,cAAc;IACd,UAAU;IACV,QAAQ;IACR,aAAa;IACb,eAAe;IACf,oBAAoB;IACpB,WAAW;IACX,YAAY;CACb,CAAC;KACD,QAAQ,CACP;;;;;;;;;;KAUC,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-api.schema.js","sourceRoot":"","sources":["../src/email-api.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"email-api.schema.js","sourceRoot":"","sources":["../src/email-api.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5B,WAAW;IACX,CAAC;SACE,KAAK,CAAC,WAAW,CAAC;SAClB,GAAG,CAAC,CAAC,EAAE,gCAAgC,CAAC;SACxC,GAAG,CAAC,EAAE,EAAE,+BAA+B,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,aAAa;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACrF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;IAC1D,EAAE,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE;CACvE,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const uploadFunctionRequestSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
slug: z.ZodOptional<z.ZodString>;
|
|
5
5
|
code: z.ZodString;
|
|
@@ -9,16 +9,16 @@ export declare const functionUploadRequestSchema: z.ZodObject<{
|
|
|
9
9
|
code: string;
|
|
10
10
|
status: "draft" | "active";
|
|
11
11
|
name: string;
|
|
12
|
-
slug?: string | undefined;
|
|
13
12
|
description?: string | undefined;
|
|
13
|
+
slug?: string | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
code: string;
|
|
16
16
|
name: string;
|
|
17
17
|
status?: "draft" | "active" | undefined;
|
|
18
|
-
slug?: string | undefined;
|
|
19
18
|
description?: string | undefined;
|
|
19
|
+
slug?: string | undefined;
|
|
20
20
|
}>;
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const updateFunctionRequestSchema: z.ZodObject<{
|
|
22
22
|
name: z.ZodOptional<z.ZodString>;
|
|
23
23
|
code: z.ZodOptional<z.ZodString>;
|
|
24
24
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -34,6 +34,186 @@ export declare const functionUpdateRequestSchema: z.ZodObject<{
|
|
|
34
34
|
name?: string | undefined;
|
|
35
35
|
description?: string | undefined;
|
|
36
36
|
}>;
|
|
37
|
-
export
|
|
38
|
-
|
|
37
|
+
export declare const listFunctionsResponseSchema: z.ZodObject<{
|
|
38
|
+
functions: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
slug: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
description: z.ZodNullable<z.ZodString>;
|
|
43
|
+
code: z.ZodString;
|
|
44
|
+
status: z.ZodEnum<["draft", "active", "error"]>;
|
|
45
|
+
createdAt: z.ZodString;
|
|
46
|
+
updatedAt: z.ZodString;
|
|
47
|
+
deployedAt: z.ZodNullable<z.ZodString>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
code: string;
|
|
50
|
+
status: "error" | "draft" | "active";
|
|
51
|
+
id: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
name: string;
|
|
54
|
+
description: string | null;
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
slug: string;
|
|
57
|
+
deployedAt: string | null;
|
|
58
|
+
}, {
|
|
59
|
+
code: string;
|
|
60
|
+
status: "error" | "draft" | "active";
|
|
61
|
+
id: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
name: string;
|
|
64
|
+
description: string | null;
|
|
65
|
+
updatedAt: string;
|
|
66
|
+
slug: string;
|
|
67
|
+
deployedAt: string | null;
|
|
68
|
+
}>, "many">;
|
|
69
|
+
runtime: z.ZodObject<{
|
|
70
|
+
status: z.ZodEnum<["running", "unavailable"]>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
status: "running" | "unavailable";
|
|
73
|
+
}, {
|
|
74
|
+
status: "running" | "unavailable";
|
|
75
|
+
}>;
|
|
76
|
+
deploymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
functions: {
|
|
79
|
+
code: string;
|
|
80
|
+
status: "error" | "draft" | "active";
|
|
81
|
+
id: string;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
name: string;
|
|
84
|
+
description: string | null;
|
|
85
|
+
updatedAt: string;
|
|
86
|
+
slug: string;
|
|
87
|
+
deployedAt: string | null;
|
|
88
|
+
}[];
|
|
89
|
+
runtime: {
|
|
90
|
+
status: "running" | "unavailable";
|
|
91
|
+
};
|
|
92
|
+
deploymentUrl?: string | null | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
functions: {
|
|
95
|
+
code: string;
|
|
96
|
+
status: "error" | "draft" | "active";
|
|
97
|
+
id: string;
|
|
98
|
+
createdAt: string;
|
|
99
|
+
name: string;
|
|
100
|
+
description: string | null;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
slug: string;
|
|
103
|
+
deployedAt: string | null;
|
|
104
|
+
}[];
|
|
105
|
+
runtime: {
|
|
106
|
+
status: "running" | "unavailable";
|
|
107
|
+
};
|
|
108
|
+
deploymentUrl?: string | null | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
export declare const deploymentResultSchema: z.ZodObject<{
|
|
111
|
+
id: z.ZodString;
|
|
112
|
+
status: z.ZodEnum<["success", "failed"]>;
|
|
113
|
+
url: z.ZodNullable<z.ZodString>;
|
|
114
|
+
buildLogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
status: "success" | "failed";
|
|
117
|
+
id: string;
|
|
118
|
+
url: string | null;
|
|
119
|
+
buildLogs?: string[] | undefined;
|
|
120
|
+
}, {
|
|
121
|
+
status: "success" | "failed";
|
|
122
|
+
id: string;
|
|
123
|
+
url: string | null;
|
|
124
|
+
buildLogs?: string[] | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
export declare const functionResponseSchema: z.ZodObject<{
|
|
127
|
+
success: z.ZodBoolean;
|
|
128
|
+
function: z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
slug: z.ZodString;
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
description: z.ZodNullable<z.ZodString>;
|
|
133
|
+
code: z.ZodString;
|
|
134
|
+
status: z.ZodEnum<["draft", "active", "error"]>;
|
|
135
|
+
createdAt: z.ZodString;
|
|
136
|
+
updatedAt: z.ZodString;
|
|
137
|
+
deployedAt: z.ZodNullable<z.ZodString>;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
code: string;
|
|
140
|
+
status: "error" | "draft" | "active";
|
|
141
|
+
id: string;
|
|
142
|
+
createdAt: string;
|
|
143
|
+
name: string;
|
|
144
|
+
description: string | null;
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
slug: string;
|
|
147
|
+
deployedAt: string | null;
|
|
148
|
+
}, {
|
|
149
|
+
code: string;
|
|
150
|
+
status: "error" | "draft" | "active";
|
|
151
|
+
id: string;
|
|
152
|
+
createdAt: string;
|
|
153
|
+
name: string;
|
|
154
|
+
description: string | null;
|
|
155
|
+
updatedAt: string;
|
|
156
|
+
slug: string;
|
|
157
|
+
deployedAt: string | null;
|
|
158
|
+
}>;
|
|
159
|
+
deployment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
+
id: z.ZodString;
|
|
161
|
+
status: z.ZodEnum<["success", "failed"]>;
|
|
162
|
+
url: z.ZodNullable<z.ZodString>;
|
|
163
|
+
buildLogs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
status: "success" | "failed";
|
|
166
|
+
id: string;
|
|
167
|
+
url: string | null;
|
|
168
|
+
buildLogs?: string[] | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
status: "success" | "failed";
|
|
171
|
+
id: string;
|
|
172
|
+
url: string | null;
|
|
173
|
+
buildLogs?: string[] | undefined;
|
|
174
|
+
}>>>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
function: {
|
|
177
|
+
code: string;
|
|
178
|
+
status: "error" | "draft" | "active";
|
|
179
|
+
id: string;
|
|
180
|
+
createdAt: string;
|
|
181
|
+
name: string;
|
|
182
|
+
description: string | null;
|
|
183
|
+
updatedAt: string;
|
|
184
|
+
slug: string;
|
|
185
|
+
deployedAt: string | null;
|
|
186
|
+
};
|
|
187
|
+
success: boolean;
|
|
188
|
+
deployment?: {
|
|
189
|
+
status: "success" | "failed";
|
|
190
|
+
id: string;
|
|
191
|
+
url: string | null;
|
|
192
|
+
buildLogs?: string[] | undefined;
|
|
193
|
+
} | null | undefined;
|
|
194
|
+
}, {
|
|
195
|
+
function: {
|
|
196
|
+
code: string;
|
|
197
|
+
status: "error" | "draft" | "active";
|
|
198
|
+
id: string;
|
|
199
|
+
createdAt: string;
|
|
200
|
+
name: string;
|
|
201
|
+
description: string | null;
|
|
202
|
+
updatedAt: string;
|
|
203
|
+
slug: string;
|
|
204
|
+
deployedAt: string | null;
|
|
205
|
+
};
|
|
206
|
+
success: boolean;
|
|
207
|
+
deployment?: {
|
|
208
|
+
status: "success" | "failed";
|
|
209
|
+
id: string;
|
|
210
|
+
url: string | null;
|
|
211
|
+
buildLogs?: string[] | undefined;
|
|
212
|
+
} | null | undefined;
|
|
213
|
+
}>;
|
|
214
|
+
export type UploadFunctionRequest = z.infer<typeof uploadFunctionRequestSchema>;
|
|
215
|
+
export type UpdateFunctionRequest = z.infer<typeof updateFunctionRequestSchema>;
|
|
216
|
+
export type ListFunctionsResponse = z.infer<typeof listFunctionsResponseSchema>;
|
|
217
|
+
export type DeploymentResult = z.infer<typeof deploymentResultSchema>;
|
|
218
|
+
export type FunctionResponse = z.infer<typeof functionResponseSchema>;
|
|
39
219
|
//# sourceMappingURL=functions-api.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions-api.schema.d.ts","sourceRoot":"","sources":["../src/functions-api.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"functions-api.schema.d.ts","sourceRoot":"","sources":["../src/functions-api.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;EAYtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAKtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIjC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
2
|
+
import { functionSchema } from './functions.schema.js';
|
|
3
|
+
export const uploadFunctionRequestSchema = z.object({
|
|
3
4
|
name: z.string().min(1, 'Name is required'),
|
|
4
5
|
slug: z
|
|
5
6
|
.string()
|
|
@@ -9,10 +10,28 @@ export const functionUploadRequestSchema = z.object({
|
|
|
9
10
|
description: z.string().optional(),
|
|
10
11
|
status: z.enum(['draft', 'active']).optional().default('active'),
|
|
11
12
|
});
|
|
12
|
-
export const
|
|
13
|
+
export const updateFunctionRequestSchema = z.object({
|
|
13
14
|
name: z.string().optional(),
|
|
14
15
|
code: z.string().optional(),
|
|
15
16
|
description: z.string().optional(),
|
|
16
17
|
status: z.enum(['draft', 'active']).optional(),
|
|
17
18
|
});
|
|
19
|
+
export const listFunctionsResponseSchema = z.object({
|
|
20
|
+
functions: z.array(functionSchema),
|
|
21
|
+
runtime: z.object({
|
|
22
|
+
status: z.enum(['running', 'unavailable']),
|
|
23
|
+
}),
|
|
24
|
+
deploymentUrl: z.string().nullable().optional(),
|
|
25
|
+
});
|
|
26
|
+
export const deploymentResultSchema = z.object({
|
|
27
|
+
id: z.string(),
|
|
28
|
+
status: z.enum(['success', 'failed']),
|
|
29
|
+
url: z.string().nullable(),
|
|
30
|
+
buildLogs: z.array(z.string()).optional(),
|
|
31
|
+
});
|
|
32
|
+
export const functionResponseSchema = z.object({
|
|
33
|
+
success: z.boolean(),
|
|
34
|
+
function: functionSchema,
|
|
35
|
+
deployment: deploymentResultSchema.nullable().optional(),
|
|
36
|
+
});
|
|
18
37
|
//# sourceMappingURL=functions-api.schema.js.map
|