@alpic-ai/api 0.0.0-dev.cf38065 → 0.0.0-dev.e3f6325
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/dist/index.d.mts +354 -0
- package/dist/index.mjs +264 -0
- package/package.json +8 -9
- package/dist/index.d.ts +0 -314
- package/dist/index.js +0 -310
- package/dist/index.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import * as _orpc_contract0 from "@orpc/contract";
|
|
2
|
+
import { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/api.contract.d.ts
|
|
6
|
+
type ApiContext = {
|
|
7
|
+
request: Request & {
|
|
8
|
+
teamId: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
declare const createEnvironmentContractV1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
12
|
+
projectId: z.ZodString;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
sourceBranch: z.ZodString;
|
|
15
|
+
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
16
|
+
key: z.ZodString;
|
|
17
|
+
value: z.ZodString;
|
|
18
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
24
|
+
urls: z.ZodArray<z.ZodString>;
|
|
25
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
26
|
+
projectId: z.ZodString;
|
|
27
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
28
|
+
NOT_FOUND: {};
|
|
29
|
+
BAD_REQUEST: {};
|
|
30
|
+
}>, Record<never, never>>;
|
|
31
|
+
declare const contract: {
|
|
32
|
+
deployments: {
|
|
33
|
+
get: {
|
|
34
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
35
|
+
deploymentId: z.ZodString;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
status: z.ZodEnum<{
|
|
39
|
+
ongoing: "ongoing";
|
|
40
|
+
deployed: "deployed";
|
|
41
|
+
failed: "failed";
|
|
42
|
+
canceled: "canceled";
|
|
43
|
+
}>;
|
|
44
|
+
sourceRef: z.ZodNullable<z.ZodString>;
|
|
45
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
46
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
47
|
+
authorUsername: z.ZodNullable<z.ZodString>;
|
|
48
|
+
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
49
|
+
startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
50
|
+
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
51
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
52
|
+
NOT_FOUND: {};
|
|
53
|
+
}>, Record<never, never>>;
|
|
54
|
+
};
|
|
55
|
+
uploadArtifact: {
|
|
56
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithOutput<_orpc_contract0.Schema<unknown, unknown>, z.ZodObject<{
|
|
57
|
+
uploadUrl: z.ZodString;
|
|
58
|
+
token: z.ZodString;
|
|
59
|
+
expiresAt: z.ZodCoercedDate<unknown>;
|
|
60
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
environments: {
|
|
64
|
+
create: {
|
|
65
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
66
|
+
projectId: z.ZodString;
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
sourceBranch: z.ZodString;
|
|
69
|
+
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
70
|
+
key: z.ZodString;
|
|
71
|
+
value: z.ZodString;
|
|
72
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
73
|
+
}, z.core.$strip>>>;
|
|
74
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
78
|
+
urls: z.ZodArray<z.ZodString>;
|
|
79
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
80
|
+
projectId: z.ZodString;
|
|
81
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
82
|
+
NOT_FOUND: {};
|
|
83
|
+
BAD_REQUEST: {};
|
|
84
|
+
}>, Record<never, never>>;
|
|
85
|
+
};
|
|
86
|
+
get: {
|
|
87
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
88
|
+
environmentId: z.ZodString;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
93
|
+
mcpServerUrl: z.ZodString;
|
|
94
|
+
domains: z.ZodArray<z.ZodURL>;
|
|
95
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
96
|
+
projectId: z.ZodString;
|
|
97
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
98
|
+
NOT_FOUND: {};
|
|
99
|
+
}>, Record<never, never>>;
|
|
100
|
+
};
|
|
101
|
+
deploy: {
|
|
102
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
103
|
+
environmentId: z.ZodString;
|
|
104
|
+
token: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
status: z.ZodEnum<{
|
|
108
|
+
ongoing: "ongoing";
|
|
109
|
+
deployed: "deployed";
|
|
110
|
+
failed: "failed";
|
|
111
|
+
canceled: "canceled";
|
|
112
|
+
}>;
|
|
113
|
+
sourceRef: z.ZodNullable<z.ZodString>;
|
|
114
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
115
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
116
|
+
authorUsername: z.ZodNullable<z.ZodString>;
|
|
117
|
+
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
118
|
+
startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
119
|
+
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
120
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
121
|
+
NOT_FOUND: {};
|
|
122
|
+
BAD_REQUEST: {};
|
|
123
|
+
}>, Record<never, never>>;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
projects: {
|
|
127
|
+
get: {
|
|
128
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
129
|
+
projectId: z.ZodString;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
teamId: z.ZodString;
|
|
134
|
+
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
135
|
+
runtime: z.ZodEnum<{
|
|
136
|
+
"python3.13": "python3.13";
|
|
137
|
+
"python3.14": "python3.14";
|
|
138
|
+
node22: "node22";
|
|
139
|
+
node24: "node24";
|
|
140
|
+
}>;
|
|
141
|
+
transport: z.ZodNullable<z.ZodEnum<{
|
|
142
|
+
stdio: "stdio";
|
|
143
|
+
sse: "sse";
|
|
144
|
+
streamablehttp: "streamablehttp";
|
|
145
|
+
}>>;
|
|
146
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
147
|
+
buildCommand: z.ZodNullable<z.ZodString>;
|
|
148
|
+
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
149
|
+
installCommand: z.ZodNullable<z.ZodString>;
|
|
150
|
+
startCommand: z.ZodNullable<z.ZodString>;
|
|
151
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
152
|
+
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
name: z.ZodString;
|
|
155
|
+
mcpServerUrl: z.ZodString;
|
|
156
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
status: z.ZodEnum<{
|
|
159
|
+
ongoing: "ongoing";
|
|
160
|
+
deployed: "deployed";
|
|
161
|
+
failed: "failed";
|
|
162
|
+
canceled: "canceled";
|
|
163
|
+
}>;
|
|
164
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
165
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
166
|
+
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
167
|
+
}, z.core.$strip>>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
173
|
+
mcpServerUrl: z.ZodString;
|
|
174
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
175
|
+
projectId: z.ZodString;
|
|
176
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
177
|
+
id: z.ZodString;
|
|
178
|
+
status: z.ZodEnum<{
|
|
179
|
+
ongoing: "ongoing";
|
|
180
|
+
deployed: "deployed";
|
|
181
|
+
failed: "failed";
|
|
182
|
+
canceled: "canceled";
|
|
183
|
+
}>;
|
|
184
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
186
|
+
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
190
|
+
NOT_FOUND: {};
|
|
191
|
+
}>, Record<never, never>>;
|
|
192
|
+
};
|
|
193
|
+
list: {
|
|
194
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithOutput<_orpc_contract0.Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
name: z.ZodString;
|
|
197
|
+
teamId: z.ZodString;
|
|
198
|
+
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
199
|
+
runtime: z.ZodEnum<{
|
|
200
|
+
"python3.13": "python3.13";
|
|
201
|
+
"python3.14": "python3.14";
|
|
202
|
+
node22: "node22";
|
|
203
|
+
node24: "node24";
|
|
204
|
+
}>;
|
|
205
|
+
transport: z.ZodNullable<z.ZodEnum<{
|
|
206
|
+
stdio: "stdio";
|
|
207
|
+
sse: "sse";
|
|
208
|
+
streamablehttp: "streamablehttp";
|
|
209
|
+
}>>;
|
|
210
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
211
|
+
buildCommand: z.ZodNullable<z.ZodString>;
|
|
212
|
+
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
213
|
+
installCommand: z.ZodNullable<z.ZodString>;
|
|
214
|
+
startCommand: z.ZodNullable<z.ZodString>;
|
|
215
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
216
|
+
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
name: z.ZodString;
|
|
219
|
+
mcpServerUrl: z.ZodString;
|
|
220
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
221
|
+
id: z.ZodString;
|
|
222
|
+
status: z.ZodEnum<{
|
|
223
|
+
ongoing: "ongoing";
|
|
224
|
+
deployed: "deployed";
|
|
225
|
+
failed: "failed";
|
|
226
|
+
canceled: "canceled";
|
|
227
|
+
}>;
|
|
228
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
229
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
230
|
+
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
231
|
+
}, z.core.$strip>>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
237
|
+
mcpServerUrl: z.ZodString;
|
|
238
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
239
|
+
projectId: z.ZodString;
|
|
240
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
241
|
+
id: z.ZodString;
|
|
242
|
+
status: z.ZodEnum<{
|
|
243
|
+
ongoing: "ongoing";
|
|
244
|
+
deployed: "deployed";
|
|
245
|
+
failed: "failed";
|
|
246
|
+
canceled: "canceled";
|
|
247
|
+
}>;
|
|
248
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
249
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
250
|
+
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
251
|
+
}, z.core.$strip>>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
254
|
+
};
|
|
255
|
+
create: {
|
|
256
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
257
|
+
name: z.ZodString;
|
|
258
|
+
sourceRepository: z.ZodOptional<z.ZodString>;
|
|
259
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
260
|
+
runtime: z.ZodEnum<{
|
|
261
|
+
"python3.13": "python3.13";
|
|
262
|
+
"python3.14": "python3.14";
|
|
263
|
+
node22: "node22";
|
|
264
|
+
node24: "node24";
|
|
265
|
+
}>;
|
|
266
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
stdio: "stdio";
|
|
268
|
+
sse: "sse";
|
|
269
|
+
streamablehttp: "streamablehttp";
|
|
270
|
+
}>>;
|
|
271
|
+
rootDirectory: z.ZodOptional<z.ZodString>;
|
|
272
|
+
settings: z.ZodDefault<z.ZodObject<{
|
|
273
|
+
installCommand: z.ZodOptional<z.ZodString>;
|
|
274
|
+
buildCommand: z.ZodOptional<z.ZodString>;
|
|
275
|
+
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
276
|
+
startCommand: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
279
|
+
key: z.ZodString;
|
|
280
|
+
value: z.ZodString;
|
|
281
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
282
|
+
}, z.core.$strip>>>;
|
|
283
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
+
id: z.ZodString;
|
|
285
|
+
name: z.ZodString;
|
|
286
|
+
teamId: z.ZodString;
|
|
287
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
name: z.ZodString;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
296
|
+
runtime: z.ZodEnum<{
|
|
297
|
+
"python3.13": "python3.13";
|
|
298
|
+
"python3.14": "python3.14";
|
|
299
|
+
node22: "node22";
|
|
300
|
+
node24: "node24";
|
|
301
|
+
}>;
|
|
302
|
+
transport: z.ZodNullable<z.ZodEnum<{
|
|
303
|
+
stdio: "stdio";
|
|
304
|
+
sse: "sse";
|
|
305
|
+
streamablehttp: "streamablehttp";
|
|
306
|
+
}>>;
|
|
307
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
308
|
+
buildCommand: z.ZodNullable<z.ZodString>;
|
|
309
|
+
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
310
|
+
installCommand: z.ZodNullable<z.ZodString>;
|
|
311
|
+
startCommand: z.ZodNullable<z.ZodString>;
|
|
312
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
313
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
314
|
+
NOT_FOUND: {};
|
|
315
|
+
BAD_REQUEST: {};
|
|
316
|
+
}>, Record<never, never>>;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
type RouterInput = InferContractRouterInputs<typeof contract>;
|
|
321
|
+
type RouterOutput = InferContractRouterOutputs<typeof contract>;
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/schemas.d.ts
|
|
324
|
+
declare const environmentVariableSchema: z.ZodObject<{
|
|
325
|
+
key: z.ZodString;
|
|
326
|
+
value: z.ZodString;
|
|
327
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
declare const environmentVariablesSchema: z.ZodArray<z.ZodObject<{
|
|
330
|
+
key: z.ZodString;
|
|
331
|
+
value: z.ZodString;
|
|
332
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
333
|
+
}, z.core.$strip>>;
|
|
334
|
+
declare const buildSettingsSchema: z.ZodObject<{
|
|
335
|
+
installCommand: z.ZodOptional<z.ZodString>;
|
|
336
|
+
buildCommand: z.ZodOptional<z.ZodString>;
|
|
337
|
+
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
338
|
+
startCommand: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
declare const runtimeSchema: z.ZodEnum<{
|
|
341
|
+
"python3.13": "python3.13";
|
|
342
|
+
"python3.14": "python3.14";
|
|
343
|
+
node22: "node22";
|
|
344
|
+
node24: "node24";
|
|
345
|
+
}>;
|
|
346
|
+
type Runtime = z.infer<typeof runtimeSchema>;
|
|
347
|
+
declare const transportSchema: z.ZodEnum<{
|
|
348
|
+
stdio: "stdio";
|
|
349
|
+
sse: "sse";
|
|
350
|
+
streamablehttp: "streamablehttp";
|
|
351
|
+
}>;
|
|
352
|
+
type Transport = z.infer<typeof transportSchema>;
|
|
353
|
+
//#endregion
|
|
354
|
+
export { ApiContext, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/schemas.ts
|
|
5
|
+
const RESERVED_KEYS = [
|
|
6
|
+
"_HANDLER",
|
|
7
|
+
"_X_AMZN_TRACE_ID",
|
|
8
|
+
"AWS_DEFAULT_REGION",
|
|
9
|
+
"AWS_REGION",
|
|
10
|
+
"AWS_EXECUTION_ENV",
|
|
11
|
+
"AWS_LAMBDA_FUNCTION_NAME",
|
|
12
|
+
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE",
|
|
13
|
+
"AWS_LAMBDA_FUNCTION_VERSION",
|
|
14
|
+
"AWS_LAMBDA_INITIALIZATION_TYPE",
|
|
15
|
+
"AWS_LAMBDA_LOG_GROUP_NAME",
|
|
16
|
+
"AWS_ACCESS_KEY",
|
|
17
|
+
"AWS_LAMBDA_RUNTIME_API",
|
|
18
|
+
"LAMBDA_TASK_ROOT",
|
|
19
|
+
"LAMBDA_RUNTIME_DIR",
|
|
20
|
+
"START_COMMAND",
|
|
21
|
+
"ENVIRONMENT_ID",
|
|
22
|
+
"PROJECT_BUILD_IMAGES_REPOSITORY_URI",
|
|
23
|
+
"ENVIRONMENT_LAMBDA_FUNCTION_ARN",
|
|
24
|
+
"SOURCE_REPOSITORY",
|
|
25
|
+
"SOURCE_BRANCH",
|
|
26
|
+
"SOURCE_REPOSITORY_CREDENTIALS",
|
|
27
|
+
"RUNTIME",
|
|
28
|
+
"ROOT_DIRECTORY",
|
|
29
|
+
"BUILD_ARG_INSTALL_COMMAND",
|
|
30
|
+
"BUILD_ARG_BUILD_COMMAND",
|
|
31
|
+
"BUILD_ARG_BUILD_OUTPUT_DIR",
|
|
32
|
+
"BUILD_ARG_START_COMMAND",
|
|
33
|
+
"ALPIC_HOST"
|
|
34
|
+
];
|
|
35
|
+
const environmentVariableSchema = z.object({
|
|
36
|
+
key: z.string().min(2, "Key must be at least 2 characters").regex(/^[a-zA-Z]([a-zA-Z0-9_])+$/, "Key must start with a letter and contain only letters, numbers, and underscores").refine((key) => !RESERVED_KEYS.includes(key), "This key is reserved and cannot be used as an environment variable key"),
|
|
37
|
+
value: z.string().min(1, "Value is required"),
|
|
38
|
+
isSecret: z.boolean().default(false)
|
|
39
|
+
});
|
|
40
|
+
const environmentVariablesSchema = z.array(environmentVariableSchema);
|
|
41
|
+
const buildSettingsSchema = z.object({
|
|
42
|
+
installCommand: z.string().optional(),
|
|
43
|
+
buildCommand: z.string().optional(),
|
|
44
|
+
buildOutputDir: z.string().optional(),
|
|
45
|
+
startCommand: z.string().optional()
|
|
46
|
+
});
|
|
47
|
+
const runtimeSchema = z.enum([
|
|
48
|
+
"python3.13",
|
|
49
|
+
"python3.14",
|
|
50
|
+
"node22",
|
|
51
|
+
"node24"
|
|
52
|
+
]);
|
|
53
|
+
const transportSchema = z.enum([
|
|
54
|
+
"stdio",
|
|
55
|
+
"sse",
|
|
56
|
+
"streamablehttp"
|
|
57
|
+
]);
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/api.contract.ts
|
|
61
|
+
const deploymentStatusSchema = z.enum([
|
|
62
|
+
"ongoing",
|
|
63
|
+
"deployed",
|
|
64
|
+
"failed",
|
|
65
|
+
"canceled"
|
|
66
|
+
]);
|
|
67
|
+
const latestDeploymentSchema = z.object({
|
|
68
|
+
id: z.string(),
|
|
69
|
+
status: deploymentStatusSchema,
|
|
70
|
+
sourceCommitId: z.string().nullable(),
|
|
71
|
+
sourceCommitMessage: z.string().nullable(),
|
|
72
|
+
completedAt: z.coerce.date().nullable()
|
|
73
|
+
});
|
|
74
|
+
const deploymentSchema = z.object({
|
|
75
|
+
id: z.string(),
|
|
76
|
+
status: deploymentStatusSchema,
|
|
77
|
+
sourceRef: z.string().nullable(),
|
|
78
|
+
sourceCommitId: z.string().nullable(),
|
|
79
|
+
sourceCommitMessage: z.string().nullable(),
|
|
80
|
+
authorUsername: z.string().nullable(),
|
|
81
|
+
authorAvatarUrl: z.string().nullable(),
|
|
82
|
+
startedAt: z.coerce.date().nullable(),
|
|
83
|
+
completedAt: z.coerce.date().nullable()
|
|
84
|
+
});
|
|
85
|
+
const createEnvironmentContractV1 = oc.route({
|
|
86
|
+
path: "/v1/environments",
|
|
87
|
+
method: "POST",
|
|
88
|
+
summary: "Create an environment",
|
|
89
|
+
description: "Create an environment for a project",
|
|
90
|
+
tags: ["environments"],
|
|
91
|
+
successDescription: "The environment has been created successfully"
|
|
92
|
+
}).errors({
|
|
93
|
+
NOT_FOUND: {},
|
|
94
|
+
BAD_REQUEST: {}
|
|
95
|
+
}).input(z.object({
|
|
96
|
+
projectId: z.string().describe("The ID of the project to create the environment for"),
|
|
97
|
+
name: z.string().min(1).describe("The name of the environment"),
|
|
98
|
+
sourceBranch: z.string().min(1).describe("The branch used to build the environment"),
|
|
99
|
+
environmentVariables: environmentVariablesSchema.default([])
|
|
100
|
+
})).output(z.object({
|
|
101
|
+
id: z.string(),
|
|
102
|
+
name: z.string(),
|
|
103
|
+
sourceBranch: z.string().nullable().describe("The branch used to build the environment"),
|
|
104
|
+
urls: z.array(z.string().url()).describe("The URLs of the MCP server"),
|
|
105
|
+
createdAt: z.coerce.date(),
|
|
106
|
+
projectId: z.string().describe("The ID of the project the environment belongs to")
|
|
107
|
+
}));
|
|
108
|
+
const getEnvironmentContractV1 = oc.route({
|
|
109
|
+
path: "/v1/environments/:environmentId",
|
|
110
|
+
method: "GET",
|
|
111
|
+
summary: "Get an environment",
|
|
112
|
+
description: "Get an environment by ID",
|
|
113
|
+
tags: ["environments"],
|
|
114
|
+
successDescription: "The environment details"
|
|
115
|
+
}).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(z.object({
|
|
116
|
+
id: z.string(),
|
|
117
|
+
name: z.string(),
|
|
118
|
+
sourceBranch: z.string().nullable(),
|
|
119
|
+
mcpServerUrl: z.string(),
|
|
120
|
+
domains: z.array(z.url()),
|
|
121
|
+
createdAt: z.coerce.date(),
|
|
122
|
+
projectId: z.string()
|
|
123
|
+
}));
|
|
124
|
+
const productionEnvironmentSchema = z.object({
|
|
125
|
+
id: z.string(),
|
|
126
|
+
name: z.string(),
|
|
127
|
+
mcpServerUrl: z.string(),
|
|
128
|
+
latestDeployment: latestDeploymentSchema.nullable()
|
|
129
|
+
});
|
|
130
|
+
const environmentSchema = z.object({
|
|
131
|
+
id: z.string(),
|
|
132
|
+
name: z.string(),
|
|
133
|
+
sourceBranch: z.string().nullable(),
|
|
134
|
+
mcpServerUrl: z.string(),
|
|
135
|
+
createdAt: z.coerce.date(),
|
|
136
|
+
projectId: z.string(),
|
|
137
|
+
latestDeployment: latestDeploymentSchema.nullable()
|
|
138
|
+
});
|
|
139
|
+
const projectOutputSchema = z.object({
|
|
140
|
+
id: z.string(),
|
|
141
|
+
name: z.string(),
|
|
142
|
+
teamId: z.string(),
|
|
143
|
+
sourceRepository: z.string().nullable(),
|
|
144
|
+
runtime: runtimeSchema,
|
|
145
|
+
transport: transportSchema.nullable(),
|
|
146
|
+
rootDirectory: z.string().nullable(),
|
|
147
|
+
buildCommand: z.string().nullable(),
|
|
148
|
+
buildOutputDir: z.string().nullable(),
|
|
149
|
+
installCommand: z.string().nullable(),
|
|
150
|
+
startCommand: z.string().nullable(),
|
|
151
|
+
createdAt: z.coerce.date(),
|
|
152
|
+
productionEnvironment: productionEnvironmentSchema.nullable(),
|
|
153
|
+
environments: z.array(environmentSchema)
|
|
154
|
+
});
|
|
155
|
+
const getProjectContractV1 = oc.route({
|
|
156
|
+
path: "/v1/projects/:projectId",
|
|
157
|
+
method: "GET",
|
|
158
|
+
summary: "Get a project",
|
|
159
|
+
description: "Get a project by ID",
|
|
160
|
+
tags: ["projects"],
|
|
161
|
+
successDescription: "The project details"
|
|
162
|
+
}).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(projectOutputSchema);
|
|
163
|
+
const listProjectsContractV1 = oc.route({
|
|
164
|
+
path: "/v1/projects",
|
|
165
|
+
method: "GET",
|
|
166
|
+
summary: "List projects",
|
|
167
|
+
description: "List all projects for a team",
|
|
168
|
+
tags: ["projects"],
|
|
169
|
+
successDescription: "The list of projects"
|
|
170
|
+
}).output(z.array(projectOutputSchema));
|
|
171
|
+
const createProjectContractV1 = oc.route({
|
|
172
|
+
path: "/v1/projects",
|
|
173
|
+
method: "POST",
|
|
174
|
+
summary: "Create a project",
|
|
175
|
+
description: "Create a project for a team",
|
|
176
|
+
tags: ["projects"],
|
|
177
|
+
successDescription: "The project has been created successfully"
|
|
178
|
+
}).errors({
|
|
179
|
+
NOT_FOUND: {},
|
|
180
|
+
BAD_REQUEST: {}
|
|
181
|
+
}).input(z.object({
|
|
182
|
+
name: z.string().min(1).max(100),
|
|
183
|
+
sourceRepository: z.string().optional(),
|
|
184
|
+
branchName: z.string().min(1).optional(),
|
|
185
|
+
runtime: runtimeSchema,
|
|
186
|
+
transport: transportSchema.optional(),
|
|
187
|
+
rootDirectory: z.string().optional(),
|
|
188
|
+
settings: buildSettingsSchema.default({}),
|
|
189
|
+
environmentVariables: environmentVariablesSchema.default([])
|
|
190
|
+
})).output(z.object({
|
|
191
|
+
id: z.string(),
|
|
192
|
+
name: z.string(),
|
|
193
|
+
teamId: z.string(),
|
|
194
|
+
environments: z.array(z.object({
|
|
195
|
+
id: z.string(),
|
|
196
|
+
name: z.string()
|
|
197
|
+
})),
|
|
198
|
+
productionEnvironment: z.object({
|
|
199
|
+
id: z.string(),
|
|
200
|
+
name: z.string()
|
|
201
|
+
}).nullable(),
|
|
202
|
+
sourceRepository: z.string().nullable(),
|
|
203
|
+
runtime: runtimeSchema,
|
|
204
|
+
transport: transportSchema.nullable(),
|
|
205
|
+
rootDirectory: z.string().nullable(),
|
|
206
|
+
buildCommand: z.string().nullable(),
|
|
207
|
+
buildOutputDir: z.string().nullable(),
|
|
208
|
+
installCommand: z.string().nullable(),
|
|
209
|
+
startCommand: z.string().nullable(),
|
|
210
|
+
createdAt: z.coerce.date()
|
|
211
|
+
}));
|
|
212
|
+
const deployEnvironmentContractV1 = oc.route({
|
|
213
|
+
path: "/v1/environments/:environmentId/deploy",
|
|
214
|
+
method: "POST",
|
|
215
|
+
summary: "Deploy an environment",
|
|
216
|
+
description: "Deploy an environment",
|
|
217
|
+
tags: ["environments"],
|
|
218
|
+
successDescription: "The environment has been deployed successfully"
|
|
219
|
+
}).errors({
|
|
220
|
+
NOT_FOUND: {},
|
|
221
|
+
BAD_REQUEST: {}
|
|
222
|
+
}).input(z.object({
|
|
223
|
+
environmentId: z.string().describe("The ID of the environment to deploy"),
|
|
224
|
+
token: z.string().describe("The token to identify the source archive").optional()
|
|
225
|
+
})).output(deploymentSchema);
|
|
226
|
+
const uploadDeploymentArtifactContractV1 = oc.route({
|
|
227
|
+
path: "/v1/deployments/upload",
|
|
228
|
+
method: "POST",
|
|
229
|
+
summary: "Upload deployment artifacts",
|
|
230
|
+
description: "Return a presigned S3 URL to upload a deployment artifact",
|
|
231
|
+
tags: ["deployments"],
|
|
232
|
+
successDescription: "The presigned upload URL has been generated successfully"
|
|
233
|
+
}).output(z.object({
|
|
234
|
+
uploadUrl: z.string().url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
|
|
235
|
+
token: z.string().describe("Token to identify the source archive"),
|
|
236
|
+
expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
|
|
237
|
+
}));
|
|
238
|
+
const getDeploymentContractV1 = oc.route({
|
|
239
|
+
path: "/v1/deployments/:deploymentId",
|
|
240
|
+
method: "GET",
|
|
241
|
+
summary: "Get a deployment",
|
|
242
|
+
description: "Get a deployment by ID",
|
|
243
|
+
tags: ["deployments"],
|
|
244
|
+
successDescription: "The deployment details"
|
|
245
|
+
}).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
|
|
246
|
+
const contract = {
|
|
247
|
+
deployments: {
|
|
248
|
+
get: { v1: getDeploymentContractV1 },
|
|
249
|
+
uploadArtifact: { v1: uploadDeploymentArtifactContractV1 }
|
|
250
|
+
},
|
|
251
|
+
environments: {
|
|
252
|
+
create: { v1: createEnvironmentContractV1 },
|
|
253
|
+
get: { v1: getEnvironmentContractV1 },
|
|
254
|
+
deploy: { v1: deployEnvironmentContractV1 }
|
|
255
|
+
},
|
|
256
|
+
projects: {
|
|
257
|
+
get: { v1: getProjectContractV1 },
|
|
258
|
+
list: { v1: listProjectsContractV1 },
|
|
259
|
+
create: { v1: createProjectContractV1 }
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
//#endregion
|
|
264
|
+
export { buildSettingsSchema, contract, createEnvironmentContractV1, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.e3f6325",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.
|
|
7
|
-
"types": "./dist/index.d.
|
|
6
|
+
"main": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.mts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./dist/index.d.
|
|
11
|
-
"default": "./dist/index.
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"default": "./dist/index.mjs"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
@@ -18,19 +18,18 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@orpc/contract": "^1.13.4",
|
|
21
|
-
"zod": "^4.3.6"
|
|
22
|
-
"@alpic-ai/shared": "0.0.0"
|
|
21
|
+
"zod": "^4.3.6"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
24
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
26
25
|
"biome": "^0.3.3",
|
|
27
26
|
"shx": "^0.4.0",
|
|
28
|
-
"
|
|
27
|
+
"tsdown": "^0.20.3",
|
|
29
28
|
"typescript": "^5.9.3",
|
|
30
29
|
"vitest": "^4.0.18"
|
|
31
30
|
},
|
|
32
31
|
"scripts": {
|
|
33
|
-
"build": "shx rm -rf dist &&
|
|
32
|
+
"build": "shx rm -rf dist && tsdown",
|
|
34
33
|
"format": "biome check --write --error-on-warnings",
|
|
35
34
|
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
36
35
|
"test:unit": "vitest run",
|
package/dist/index.d.ts
DELETED
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
import * as _orpc_contract from '@orpc/contract';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
type ApiContext = {
|
|
5
|
-
request: Request & {
|
|
6
|
-
teamId: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
declare const createEnvironmentContractV1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
10
|
-
projectId: z.ZodString;
|
|
11
|
-
name: z.ZodString;
|
|
12
|
-
sourceBranch: z.ZodString;
|
|
13
|
-
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
14
|
-
key: z.ZodString;
|
|
15
|
-
value: z.ZodString;
|
|
16
|
-
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
17
|
-
}, z.core.$strip>>>;
|
|
18
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
-
id: z.ZodString;
|
|
20
|
-
name: z.ZodString;
|
|
21
|
-
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
22
|
-
urls: z.ZodArray<z.ZodString>;
|
|
23
|
-
createdAt: z.ZodDate;
|
|
24
|
-
projectId: z.ZodString;
|
|
25
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
26
|
-
NOT_FOUND: {};
|
|
27
|
-
BAD_REQUEST: {};
|
|
28
|
-
}>, Record<never, never>>;
|
|
29
|
-
declare const contract: {
|
|
30
|
-
deployments: {
|
|
31
|
-
get: {
|
|
32
|
-
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
33
|
-
deploymentId: z.ZodString;
|
|
34
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
-
id: z.ZodString;
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
ongoing: "ongoing";
|
|
38
|
-
deployed: "deployed";
|
|
39
|
-
failed: "failed";
|
|
40
|
-
canceled: "canceled";
|
|
41
|
-
}>;
|
|
42
|
-
sourceRef: z.ZodNullable<z.ZodString>;
|
|
43
|
-
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
44
|
-
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
45
|
-
authorUsername: z.ZodNullable<z.ZodString>;
|
|
46
|
-
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
47
|
-
startedAt: z.ZodNullable<z.ZodDate>;
|
|
48
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
49
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
50
|
-
NOT_FOUND: {};
|
|
51
|
-
}>, Record<never, never>>;
|
|
52
|
-
};
|
|
53
|
-
uploadArtifact: {
|
|
54
|
-
v1: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodObject<{
|
|
55
|
-
uploadUrl: z.ZodString;
|
|
56
|
-
token: z.ZodString;
|
|
57
|
-
expiresAt: z.ZodDate;
|
|
58
|
-
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
environments: {
|
|
62
|
-
create: {
|
|
63
|
-
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
64
|
-
projectId: z.ZodString;
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
sourceBranch: z.ZodString;
|
|
67
|
-
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
|
-
key: z.ZodString;
|
|
69
|
-
value: z.ZodString;
|
|
70
|
-
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
71
|
-
}, z.core.$strip>>>;
|
|
72
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
-
id: z.ZodString;
|
|
74
|
-
name: z.ZodString;
|
|
75
|
-
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
76
|
-
urls: z.ZodArray<z.ZodString>;
|
|
77
|
-
createdAt: z.ZodDate;
|
|
78
|
-
projectId: z.ZodString;
|
|
79
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
80
|
-
NOT_FOUND: {};
|
|
81
|
-
BAD_REQUEST: {};
|
|
82
|
-
}>, Record<never, never>>;
|
|
83
|
-
};
|
|
84
|
-
get: {
|
|
85
|
-
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
86
|
-
environmentId: z.ZodString;
|
|
87
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
-
id: z.ZodString;
|
|
89
|
-
name: z.ZodString;
|
|
90
|
-
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
91
|
-
mcpServerUrl: z.ZodString;
|
|
92
|
-
domains: z.ZodArray<z.ZodURL>;
|
|
93
|
-
createdAt: z.ZodDate;
|
|
94
|
-
projectId: z.ZodString;
|
|
95
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
96
|
-
NOT_FOUND: {};
|
|
97
|
-
}>, Record<never, never>>;
|
|
98
|
-
};
|
|
99
|
-
deploy: {
|
|
100
|
-
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
101
|
-
environmentId: z.ZodString;
|
|
102
|
-
token: z.ZodOptional<z.ZodString>;
|
|
103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
-
id: z.ZodString;
|
|
105
|
-
status: z.ZodEnum<{
|
|
106
|
-
ongoing: "ongoing";
|
|
107
|
-
deployed: "deployed";
|
|
108
|
-
failed: "failed";
|
|
109
|
-
canceled: "canceled";
|
|
110
|
-
}>;
|
|
111
|
-
sourceRef: z.ZodNullable<z.ZodString>;
|
|
112
|
-
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
113
|
-
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
114
|
-
authorUsername: z.ZodNullable<z.ZodString>;
|
|
115
|
-
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
116
|
-
startedAt: z.ZodNullable<z.ZodDate>;
|
|
117
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
118
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
119
|
-
NOT_FOUND: {};
|
|
120
|
-
BAD_REQUEST: {};
|
|
121
|
-
}>, Record<never, never>>;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
projects: {
|
|
125
|
-
get: {
|
|
126
|
-
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
127
|
-
projectId: z.ZodString;
|
|
128
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
-
id: z.ZodString;
|
|
130
|
-
name: z.ZodString;
|
|
131
|
-
teamId: z.ZodString;
|
|
132
|
-
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
133
|
-
runtime: z.ZodEnum<{
|
|
134
|
-
"python3.13": "python3.13";
|
|
135
|
-
node22: "node22";
|
|
136
|
-
node24: "node24";
|
|
137
|
-
}>;
|
|
138
|
-
transport: z.ZodNullable<z.ZodEnum<{
|
|
139
|
-
stdio: "stdio";
|
|
140
|
-
sse: "sse";
|
|
141
|
-
streamablehttp: "streamablehttp";
|
|
142
|
-
}>>;
|
|
143
|
-
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
144
|
-
buildCommand: z.ZodNullable<z.ZodString>;
|
|
145
|
-
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
146
|
-
installCommand: z.ZodNullable<z.ZodString>;
|
|
147
|
-
startCommand: z.ZodNullable<z.ZodString>;
|
|
148
|
-
createdAt: z.ZodDate;
|
|
149
|
-
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
150
|
-
id: z.ZodString;
|
|
151
|
-
name: z.ZodString;
|
|
152
|
-
mcpServerUrl: z.ZodString;
|
|
153
|
-
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
154
|
-
id: z.ZodString;
|
|
155
|
-
status: z.ZodEnum<{
|
|
156
|
-
ongoing: "ongoing";
|
|
157
|
-
deployed: "deployed";
|
|
158
|
-
failed: "failed";
|
|
159
|
-
canceled: "canceled";
|
|
160
|
-
}>;
|
|
161
|
-
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
162
|
-
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
163
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
164
|
-
}, z.core.$strip>>;
|
|
165
|
-
}, z.core.$strip>>;
|
|
166
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
167
|
-
id: z.ZodString;
|
|
168
|
-
name: z.ZodString;
|
|
169
|
-
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
170
|
-
mcpServerUrl: z.ZodString;
|
|
171
|
-
createdAt: z.ZodDate;
|
|
172
|
-
projectId: z.ZodString;
|
|
173
|
-
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
174
|
-
id: z.ZodString;
|
|
175
|
-
status: z.ZodEnum<{
|
|
176
|
-
ongoing: "ongoing";
|
|
177
|
-
deployed: "deployed";
|
|
178
|
-
failed: "failed";
|
|
179
|
-
canceled: "canceled";
|
|
180
|
-
}>;
|
|
181
|
-
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
182
|
-
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
183
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
184
|
-
}, z.core.$strip>>;
|
|
185
|
-
}, z.core.$strip>>;
|
|
186
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
187
|
-
NOT_FOUND: {};
|
|
188
|
-
}>, Record<never, never>>;
|
|
189
|
-
};
|
|
190
|
-
list: {
|
|
191
|
-
v1: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
192
|
-
id: z.ZodString;
|
|
193
|
-
name: z.ZodString;
|
|
194
|
-
teamId: z.ZodString;
|
|
195
|
-
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
196
|
-
runtime: z.ZodEnum<{
|
|
197
|
-
"python3.13": "python3.13";
|
|
198
|
-
node22: "node22";
|
|
199
|
-
node24: "node24";
|
|
200
|
-
}>;
|
|
201
|
-
transport: z.ZodNullable<z.ZodEnum<{
|
|
202
|
-
stdio: "stdio";
|
|
203
|
-
sse: "sse";
|
|
204
|
-
streamablehttp: "streamablehttp";
|
|
205
|
-
}>>;
|
|
206
|
-
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
207
|
-
buildCommand: z.ZodNullable<z.ZodString>;
|
|
208
|
-
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
209
|
-
installCommand: z.ZodNullable<z.ZodString>;
|
|
210
|
-
startCommand: z.ZodNullable<z.ZodString>;
|
|
211
|
-
createdAt: z.ZodDate;
|
|
212
|
-
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
213
|
-
id: z.ZodString;
|
|
214
|
-
name: z.ZodString;
|
|
215
|
-
mcpServerUrl: z.ZodString;
|
|
216
|
-
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
217
|
-
id: z.ZodString;
|
|
218
|
-
status: z.ZodEnum<{
|
|
219
|
-
ongoing: "ongoing";
|
|
220
|
-
deployed: "deployed";
|
|
221
|
-
failed: "failed";
|
|
222
|
-
canceled: "canceled";
|
|
223
|
-
}>;
|
|
224
|
-
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
225
|
-
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
226
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
227
|
-
}, z.core.$strip>>;
|
|
228
|
-
}, z.core.$strip>>;
|
|
229
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
230
|
-
id: z.ZodString;
|
|
231
|
-
name: z.ZodString;
|
|
232
|
-
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
233
|
-
mcpServerUrl: z.ZodString;
|
|
234
|
-
createdAt: z.ZodDate;
|
|
235
|
-
projectId: z.ZodString;
|
|
236
|
-
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
237
|
-
id: z.ZodString;
|
|
238
|
-
status: z.ZodEnum<{
|
|
239
|
-
ongoing: "ongoing";
|
|
240
|
-
deployed: "deployed";
|
|
241
|
-
failed: "failed";
|
|
242
|
-
canceled: "canceled";
|
|
243
|
-
}>;
|
|
244
|
-
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
245
|
-
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
246
|
-
completedAt: z.ZodNullable<z.ZodDate>;
|
|
247
|
-
}, z.core.$strip>>;
|
|
248
|
-
}, z.core.$strip>>;
|
|
249
|
-
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
250
|
-
};
|
|
251
|
-
create: {
|
|
252
|
-
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
253
|
-
name: z.ZodString;
|
|
254
|
-
sourceRepository: z.ZodOptional<z.ZodString>;
|
|
255
|
-
branchName: z.ZodOptional<z.ZodString>;
|
|
256
|
-
runtime: z.ZodEnum<{
|
|
257
|
-
"python3.13": "python3.13";
|
|
258
|
-
node22: "node22";
|
|
259
|
-
node24: "node24";
|
|
260
|
-
}>;
|
|
261
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
262
|
-
stdio: "stdio";
|
|
263
|
-
sse: "sse";
|
|
264
|
-
streamablehttp: "streamablehttp";
|
|
265
|
-
}>>;
|
|
266
|
-
rootDirectory: z.ZodOptional<z.ZodString>;
|
|
267
|
-
settings: z.ZodDefault<z.ZodObject<{
|
|
268
|
-
installCommand: z.ZodOptional<z.ZodString>;
|
|
269
|
-
buildCommand: z.ZodOptional<z.ZodString>;
|
|
270
|
-
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
271
|
-
startCommand: z.ZodOptional<z.ZodString>;
|
|
272
|
-
}, z.core.$strip>>;
|
|
273
|
-
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
274
|
-
key: z.ZodString;
|
|
275
|
-
value: z.ZodString;
|
|
276
|
-
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
277
|
-
}, z.core.$strip>>>;
|
|
278
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
-
id: z.ZodString;
|
|
280
|
-
name: z.ZodString;
|
|
281
|
-
environments: z.ZodArray<z.ZodObject<{
|
|
282
|
-
id: z.ZodString;
|
|
283
|
-
name: z.ZodString;
|
|
284
|
-
}, z.core.$strip>>;
|
|
285
|
-
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
286
|
-
id: z.ZodString;
|
|
287
|
-
name: z.ZodString;
|
|
288
|
-
}, z.core.$strip>>;
|
|
289
|
-
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
290
|
-
runtime: z.ZodEnum<{
|
|
291
|
-
"python3.13": "python3.13";
|
|
292
|
-
node22: "node22";
|
|
293
|
-
node24: "node24";
|
|
294
|
-
}>;
|
|
295
|
-
transport: z.ZodNullable<z.ZodEnum<{
|
|
296
|
-
stdio: "stdio";
|
|
297
|
-
sse: "sse";
|
|
298
|
-
streamablehttp: "streamablehttp";
|
|
299
|
-
}>>;
|
|
300
|
-
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
301
|
-
buildCommand: z.ZodNullable<z.ZodString>;
|
|
302
|
-
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
303
|
-
installCommand: z.ZodNullable<z.ZodString>;
|
|
304
|
-
startCommand: z.ZodNullable<z.ZodString>;
|
|
305
|
-
createdAt: z.ZodDate;
|
|
306
|
-
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
307
|
-
NOT_FOUND: {};
|
|
308
|
-
BAD_REQUEST: {};
|
|
309
|
-
}>, Record<never, never>>;
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
export { type ApiContext, contract, createEnvironmentContractV1 };
|
package/dist/index.js
DELETED
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
// src/api.contract.ts
|
|
2
|
-
import { oc } from "@orpc/contract";
|
|
3
|
-
import { z as z2 } from "zod";
|
|
4
|
-
|
|
5
|
-
// ../shared/schemas.ts
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
var RESERVED_KEYS = [
|
|
8
|
-
// AWS Lambda reserved keys - https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime
|
|
9
|
-
"_HANDLER",
|
|
10
|
-
"_X_AMZN_TRACE_ID",
|
|
11
|
-
"AWS_DEFAULT_REGION",
|
|
12
|
-
"AWS_REGION",
|
|
13
|
-
"AWS_EXECUTION_ENV",
|
|
14
|
-
"AWS_LAMBDA_FUNCTION_NAME",
|
|
15
|
-
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE",
|
|
16
|
-
"AWS_LAMBDA_FUNCTION_VERSION",
|
|
17
|
-
"AWS_LAMBDA_INITIALIZATION_TYPE",
|
|
18
|
-
"AWS_LAMBDA_LOG_GROUP_NAME",
|
|
19
|
-
"AWS_ACCESS_KEY",
|
|
20
|
-
"AWS_LAMBDA_RUNTIME_API",
|
|
21
|
-
"LAMBDA_TASK_ROOT",
|
|
22
|
-
"LAMBDA_RUNTIME_DIR",
|
|
23
|
-
// Alpic reserved keys
|
|
24
|
-
"START_COMMAND",
|
|
25
|
-
"ENVIRONMENT_ID",
|
|
26
|
-
"PROJECT_BUILD_IMAGES_REPOSITORY_URI",
|
|
27
|
-
"ENVIRONMENT_LAMBDA_FUNCTION_ARN",
|
|
28
|
-
"SOURCE_REPOSITORY",
|
|
29
|
-
"SOURCE_BRANCH",
|
|
30
|
-
"SOURCE_REPOSITORY_CREDENTIALS",
|
|
31
|
-
"RUNTIME",
|
|
32
|
-
"ROOT_DIRECTORY",
|
|
33
|
-
"BUILD_ARG_INSTALL_COMMAND",
|
|
34
|
-
"BUILD_ARG_BUILD_COMMAND",
|
|
35
|
-
"BUILD_ARG_BUILD_OUTPUT_DIR",
|
|
36
|
-
"BUILD_ARG_START_COMMAND",
|
|
37
|
-
"ALPIC_HOST"
|
|
38
|
-
];
|
|
39
|
-
var environmentVariableSchema = z.object({
|
|
40
|
-
key: z.string().min(2, "Key must be at least 2 characters").regex(
|
|
41
|
-
/^[a-zA-Z]([a-zA-Z0-9_])+$/,
|
|
42
|
-
"Key must start with a letter and contain only letters, numbers, and underscores"
|
|
43
|
-
).refine(
|
|
44
|
-
(key) => !RESERVED_KEYS.includes(key),
|
|
45
|
-
"This key is reserved and cannot be used as an environment variable key"
|
|
46
|
-
),
|
|
47
|
-
value: z.string().min(1, "Value is required"),
|
|
48
|
-
isSecret: z.boolean().default(false)
|
|
49
|
-
});
|
|
50
|
-
var environmentVariablesSchema = z.array(environmentVariableSchema);
|
|
51
|
-
var buildSettingsSchema = z.object({
|
|
52
|
-
installCommand: z.string().optional(),
|
|
53
|
-
buildCommand: z.string().optional(),
|
|
54
|
-
buildOutputDir: z.string().optional(),
|
|
55
|
-
startCommand: z.string().optional()
|
|
56
|
-
});
|
|
57
|
-
var runtimeSchema = z.enum(["python3.13", "node22", "node24"]);
|
|
58
|
-
var transportSchema = z.enum(["stdio", "sse", "streamablehttp"]);
|
|
59
|
-
|
|
60
|
-
// src/api.contract.ts
|
|
61
|
-
var deploymentStatusSchema = z2.enum(["ongoing", "deployed", "failed", "canceled"]);
|
|
62
|
-
var latestDeploymentSchema = z2.object({
|
|
63
|
-
id: z2.string(),
|
|
64
|
-
status: deploymentStatusSchema,
|
|
65
|
-
sourceCommitId: z2.string().nullable(),
|
|
66
|
-
sourceCommitMessage: z2.string().nullable(),
|
|
67
|
-
completedAt: z2.date().nullable()
|
|
68
|
-
});
|
|
69
|
-
var deploymentSchema = z2.object({
|
|
70
|
-
id: z2.string(),
|
|
71
|
-
status: deploymentStatusSchema,
|
|
72
|
-
sourceRef: z2.string().nullable(),
|
|
73
|
-
sourceCommitId: z2.string().nullable(),
|
|
74
|
-
sourceCommitMessage: z2.string().nullable(),
|
|
75
|
-
authorUsername: z2.string().nullable(),
|
|
76
|
-
authorAvatarUrl: z2.string().nullable(),
|
|
77
|
-
startedAt: z2.date().nullable(),
|
|
78
|
-
completedAt: z2.date().nullable()
|
|
79
|
-
});
|
|
80
|
-
var createEnvironmentContractV1 = oc.route({
|
|
81
|
-
path: "/v1/environments",
|
|
82
|
-
method: "POST",
|
|
83
|
-
summary: "Create an environment",
|
|
84
|
-
description: "Create an environment for a project",
|
|
85
|
-
tags: ["environments"],
|
|
86
|
-
successDescription: "The environment has been created successfully"
|
|
87
|
-
}).errors({
|
|
88
|
-
NOT_FOUND: {},
|
|
89
|
-
BAD_REQUEST: {}
|
|
90
|
-
}).input(
|
|
91
|
-
z2.object({
|
|
92
|
-
projectId: z2.string().describe("The ID of the project to create the environment for"),
|
|
93
|
-
name: z2.string().min(1).describe("The name of the environment"),
|
|
94
|
-
sourceBranch: z2.string().min(1).describe("The branch used to build the environment"),
|
|
95
|
-
environmentVariables: environmentVariablesSchema.default([])
|
|
96
|
-
})
|
|
97
|
-
).output(
|
|
98
|
-
z2.object({
|
|
99
|
-
id: z2.string(),
|
|
100
|
-
name: z2.string(),
|
|
101
|
-
sourceBranch: z2.string().nullable().describe("The branch used to build the environment"),
|
|
102
|
-
urls: z2.array(z2.string().url()).describe("The URLs of the MCP server"),
|
|
103
|
-
createdAt: z2.date(),
|
|
104
|
-
projectId: z2.string().describe("The ID of the project the environment belongs to")
|
|
105
|
-
})
|
|
106
|
-
);
|
|
107
|
-
var getEnvironmentContractV1 = oc.route({
|
|
108
|
-
path: "/v1/environments/:environmentId",
|
|
109
|
-
method: "GET",
|
|
110
|
-
summary: "Get an environment",
|
|
111
|
-
description: "Get an environment by ID",
|
|
112
|
-
tags: ["environments"],
|
|
113
|
-
successDescription: "The environment details"
|
|
114
|
-
}).errors({
|
|
115
|
-
NOT_FOUND: {}
|
|
116
|
-
}).input(
|
|
117
|
-
z2.object({
|
|
118
|
-
environmentId: z2.string().describe("The ID of the environment")
|
|
119
|
-
})
|
|
120
|
-
).output(
|
|
121
|
-
z2.object({
|
|
122
|
-
id: z2.string(),
|
|
123
|
-
name: z2.string(),
|
|
124
|
-
sourceBranch: z2.string().nullable(),
|
|
125
|
-
mcpServerUrl: z2.string(),
|
|
126
|
-
domains: z2.array(z2.url()),
|
|
127
|
-
createdAt: z2.date(),
|
|
128
|
-
projectId: z2.string()
|
|
129
|
-
})
|
|
130
|
-
);
|
|
131
|
-
var productionEnvironmentSchema = z2.object({
|
|
132
|
-
id: z2.string(),
|
|
133
|
-
name: z2.string(),
|
|
134
|
-
mcpServerUrl: z2.string(),
|
|
135
|
-
latestDeployment: latestDeploymentSchema.nullable()
|
|
136
|
-
});
|
|
137
|
-
var environmentSchema = z2.object({
|
|
138
|
-
id: z2.string(),
|
|
139
|
-
name: z2.string(),
|
|
140
|
-
sourceBranch: z2.string().nullable(),
|
|
141
|
-
mcpServerUrl: z2.string(),
|
|
142
|
-
createdAt: z2.date(),
|
|
143
|
-
projectId: z2.string(),
|
|
144
|
-
latestDeployment: latestDeploymentSchema.nullable()
|
|
145
|
-
});
|
|
146
|
-
var projectOutputSchema = z2.object({
|
|
147
|
-
id: z2.string(),
|
|
148
|
-
name: z2.string(),
|
|
149
|
-
teamId: z2.string(),
|
|
150
|
-
sourceRepository: z2.string().nullable(),
|
|
151
|
-
runtime: runtimeSchema,
|
|
152
|
-
transport: transportSchema.nullable(),
|
|
153
|
-
rootDirectory: z2.string().nullable(),
|
|
154
|
-
buildCommand: z2.string().nullable(),
|
|
155
|
-
buildOutputDir: z2.string().nullable(),
|
|
156
|
-
installCommand: z2.string().nullable(),
|
|
157
|
-
startCommand: z2.string().nullable(),
|
|
158
|
-
createdAt: z2.date(),
|
|
159
|
-
productionEnvironment: productionEnvironmentSchema.nullable(),
|
|
160
|
-
environments: z2.array(environmentSchema)
|
|
161
|
-
});
|
|
162
|
-
var getProjectContractV1 = oc.route({
|
|
163
|
-
path: "/v1/projects/:projectId",
|
|
164
|
-
method: "GET",
|
|
165
|
-
summary: "Get a project",
|
|
166
|
-
description: "Get a project by ID",
|
|
167
|
-
tags: ["projects"],
|
|
168
|
-
successDescription: "The project details"
|
|
169
|
-
}).errors({
|
|
170
|
-
NOT_FOUND: {}
|
|
171
|
-
}).input(
|
|
172
|
-
z2.object({
|
|
173
|
-
projectId: z2.string().describe("The ID of the project")
|
|
174
|
-
})
|
|
175
|
-
).output(projectOutputSchema);
|
|
176
|
-
var listProjectsContractV1 = oc.route({
|
|
177
|
-
path: "/v1/projects",
|
|
178
|
-
method: "GET",
|
|
179
|
-
summary: "List projects",
|
|
180
|
-
description: "List all projects for a team",
|
|
181
|
-
tags: ["projects"],
|
|
182
|
-
successDescription: "The list of projects"
|
|
183
|
-
}).output(z2.array(projectOutputSchema));
|
|
184
|
-
var createProjectContractV1 = oc.route({
|
|
185
|
-
path: "/v1/projects",
|
|
186
|
-
method: "POST",
|
|
187
|
-
summary: "Create a project",
|
|
188
|
-
description: "Create a project for a team",
|
|
189
|
-
tags: ["projects"],
|
|
190
|
-
successDescription: "The project has been created successfully"
|
|
191
|
-
}).errors({
|
|
192
|
-
NOT_FOUND: {},
|
|
193
|
-
BAD_REQUEST: {}
|
|
194
|
-
}).input(
|
|
195
|
-
z2.object({
|
|
196
|
-
name: z2.string().min(1).max(100),
|
|
197
|
-
sourceRepository: z2.string().optional(),
|
|
198
|
-
branchName: z2.string().min(1).optional(),
|
|
199
|
-
runtime: runtimeSchema,
|
|
200
|
-
transport: transportSchema.optional(),
|
|
201
|
-
rootDirectory: z2.string().optional(),
|
|
202
|
-
settings: buildSettingsSchema.default({}),
|
|
203
|
-
environmentVariables: environmentVariablesSchema.default([])
|
|
204
|
-
})
|
|
205
|
-
).output(
|
|
206
|
-
z2.object({
|
|
207
|
-
id: z2.string(),
|
|
208
|
-
name: z2.string(),
|
|
209
|
-
environments: z2.array(
|
|
210
|
-
z2.object({
|
|
211
|
-
id: z2.string(),
|
|
212
|
-
name: z2.string()
|
|
213
|
-
})
|
|
214
|
-
),
|
|
215
|
-
productionEnvironment: z2.object({
|
|
216
|
-
id: z2.string(),
|
|
217
|
-
name: z2.string()
|
|
218
|
-
}).nullable(),
|
|
219
|
-
sourceRepository: z2.string().nullable(),
|
|
220
|
-
runtime: runtimeSchema,
|
|
221
|
-
transport: transportSchema.nullable(),
|
|
222
|
-
rootDirectory: z2.string().nullable(),
|
|
223
|
-
buildCommand: z2.string().nullable(),
|
|
224
|
-
buildOutputDir: z2.string().nullable(),
|
|
225
|
-
installCommand: z2.string().nullable(),
|
|
226
|
-
startCommand: z2.string().nullable(),
|
|
227
|
-
createdAt: z2.date()
|
|
228
|
-
})
|
|
229
|
-
);
|
|
230
|
-
var deployEnvironmentContractV1 = oc.route({
|
|
231
|
-
path: "/v1/environments/:environmentId/deploy",
|
|
232
|
-
method: "POST",
|
|
233
|
-
summary: "Deploy an environment",
|
|
234
|
-
description: "Deploy an environment",
|
|
235
|
-
tags: ["environments"],
|
|
236
|
-
successDescription: "The environment has been deployed successfully"
|
|
237
|
-
}).errors({
|
|
238
|
-
NOT_FOUND: {},
|
|
239
|
-
BAD_REQUEST: {}
|
|
240
|
-
}).input(
|
|
241
|
-
z2.object({
|
|
242
|
-
environmentId: z2.string().describe("The ID of the environment to deploy"),
|
|
243
|
-
token: z2.string().describe("The token to identify the source archive").optional()
|
|
244
|
-
})
|
|
245
|
-
).output(deploymentSchema);
|
|
246
|
-
var uploadDeploymentArtifactContractV1 = oc.route({
|
|
247
|
-
path: "/v1/deployments/upload",
|
|
248
|
-
method: "POST",
|
|
249
|
-
summary: "Upload deployment artifacts",
|
|
250
|
-
description: "Return a presigned S3 URL to upload a deployment artifact",
|
|
251
|
-
tags: ["deployments"],
|
|
252
|
-
successDescription: "The presigned upload URL has been generated successfully"
|
|
253
|
-
}).output(
|
|
254
|
-
z2.object({
|
|
255
|
-
uploadUrl: z2.string().url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
|
|
256
|
-
token: z2.string().describe("Token to identify the source archive"),
|
|
257
|
-
expiresAt: z2.date().describe("Expiration date of the presigned URL")
|
|
258
|
-
})
|
|
259
|
-
);
|
|
260
|
-
var getDeploymentContractV1 = oc.route({
|
|
261
|
-
path: "/v1/deployments/:deploymentId",
|
|
262
|
-
method: "GET",
|
|
263
|
-
summary: "Get a deployment",
|
|
264
|
-
description: "Get a deployment by ID",
|
|
265
|
-
tags: ["deployments"],
|
|
266
|
-
successDescription: "The deployment details"
|
|
267
|
-
}).errors({
|
|
268
|
-
NOT_FOUND: {}
|
|
269
|
-
}).input(
|
|
270
|
-
z2.object({
|
|
271
|
-
deploymentId: z2.string().describe("The ID of the deployment")
|
|
272
|
-
})
|
|
273
|
-
).output(deploymentSchema);
|
|
274
|
-
var contract = {
|
|
275
|
-
deployments: {
|
|
276
|
-
get: {
|
|
277
|
-
v1: getDeploymentContractV1
|
|
278
|
-
},
|
|
279
|
-
uploadArtifact: {
|
|
280
|
-
v1: uploadDeploymentArtifactContractV1
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
environments: {
|
|
284
|
-
create: {
|
|
285
|
-
v1: createEnvironmentContractV1
|
|
286
|
-
},
|
|
287
|
-
get: {
|
|
288
|
-
v1: getEnvironmentContractV1
|
|
289
|
-
},
|
|
290
|
-
deploy: {
|
|
291
|
-
v1: deployEnvironmentContractV1
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
projects: {
|
|
295
|
-
get: {
|
|
296
|
-
v1: getProjectContractV1
|
|
297
|
-
},
|
|
298
|
-
list: {
|
|
299
|
-
v1: listProjectsContractV1
|
|
300
|
-
},
|
|
301
|
-
create: {
|
|
302
|
-
v1: createProjectContractV1
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
export {
|
|
307
|
-
contract,
|
|
308
|
-
createEnvironmentContractV1
|
|
309
|
-
};
|
|
310
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api.contract.ts","../../shared/schemas.ts"],"sourcesContent":["import { oc } from \"@orpc/contract\";\nimport { z } from \"zod\";\n\nimport {\n buildSettingsSchema,\n environmentVariablesSchema,\n runtimeSchema,\n transportSchema,\n} from \"@alpic-ai/shared/schemas.js\";\n\nexport type ApiContext = {\n request: Request & { teamId: string };\n};\n\nconst deploymentStatusSchema = z.enum([\"ongoing\", \"deployed\", \"failed\", \"canceled\"]);\n\nconst latestDeploymentSchema = z.object({\n id: z.string(),\n status: deploymentStatusSchema,\n sourceCommitId: z.string().nullable(),\n sourceCommitMessage: z.string().nullable(),\n completedAt: z.date().nullable(),\n});\n\nconst deploymentSchema = z.object({\n id: z.string(),\n status: deploymentStatusSchema,\n sourceRef: z.string().nullable(),\n sourceCommitId: z.string().nullable(),\n sourceCommitMessage: z.string().nullable(),\n authorUsername: z.string().nullable(),\n authorAvatarUrl: z.string().nullable(),\n startedAt: z.date().nullable(),\n completedAt: z.date().nullable(),\n});\n\nexport const createEnvironmentContractV1 = oc\n .route({\n path: \"/v1/environments\",\n method: \"POST\",\n summary: \"Create an environment\",\n description: \"Create an environment for a project\",\n tags: [\"environments\"],\n successDescription: \"The environment has been created successfully\",\n })\n .errors({\n NOT_FOUND: {},\n BAD_REQUEST: {},\n })\n .input(\n z.object({\n projectId: z.string().describe(\"The ID of the project to create the environment for\"),\n name: z.string().min(1).describe(\"The name of the environment\"),\n sourceBranch: z.string().min(1).describe(\"The branch used to build the environment\"),\n environmentVariables: environmentVariablesSchema.default([]),\n }),\n )\n .output(\n z.object({\n id: z.string(),\n name: z.string(),\n sourceBranch: z.string().nullable().describe(\"The branch used to build the environment\"),\n urls: z.array(z.string().url()).describe(\"The URLs of the MCP server\"),\n createdAt: z.date(),\n projectId: z.string().describe(\"The ID of the project the environment belongs to\"),\n }),\n );\n\nconst getEnvironmentContractV1 = oc\n .route({\n path: \"/v1/environments/:environmentId\",\n method: \"GET\",\n summary: \"Get an environment\",\n description: \"Get an environment by ID\",\n tags: [\"environments\"],\n successDescription: \"The environment details\",\n })\n .errors({\n NOT_FOUND: {},\n })\n .input(\n z.object({\n environmentId: z.string().describe(\"The ID of the environment\"),\n }),\n )\n .output(\n z.object({\n id: z.string(),\n name: z.string(),\n sourceBranch: z.string().nullable(),\n mcpServerUrl: z.string(),\n domains: z.array(z.url()),\n createdAt: z.date(),\n projectId: z.string(),\n }),\n );\n\nconst productionEnvironmentSchema = z.object({\n id: z.string(),\n name: z.string(),\n mcpServerUrl: z.string(),\n latestDeployment: latestDeploymentSchema.nullable(),\n});\n\nconst environmentSchema = z.object({\n id: z.string(),\n name: z.string(),\n sourceBranch: z.string().nullable(),\n mcpServerUrl: z.string(),\n createdAt: z.date(),\n projectId: z.string(),\n latestDeployment: latestDeploymentSchema.nullable(),\n});\n\nconst projectOutputSchema = z.object({\n id: z.string(),\n name: z.string(),\n teamId: z.string(),\n sourceRepository: z.string().nullable(),\n runtime: runtimeSchema,\n transport: transportSchema.nullable(),\n rootDirectory: z.string().nullable(),\n buildCommand: z.string().nullable(),\n buildOutputDir: z.string().nullable(),\n installCommand: z.string().nullable(),\n startCommand: z.string().nullable(),\n createdAt: z.date(),\n productionEnvironment: productionEnvironmentSchema.nullable(),\n environments: z.array(environmentSchema),\n});\n\nconst getProjectContractV1 = oc\n .route({\n path: \"/v1/projects/:projectId\",\n method: \"GET\",\n summary: \"Get a project\",\n description: \"Get a project by ID\",\n tags: [\"projects\"],\n successDescription: \"The project details\",\n })\n .errors({\n NOT_FOUND: {},\n })\n .input(\n z.object({\n projectId: z.string().describe(\"The ID of the project\"),\n }),\n )\n .output(projectOutputSchema);\n\nconst listProjectsContractV1 = oc\n .route({\n path: \"/v1/projects\",\n method: \"GET\",\n summary: \"List projects\",\n description: \"List all projects for a team\",\n tags: [\"projects\"],\n successDescription: \"The list of projects\",\n })\n .output(z.array(projectOutputSchema));\n\nconst createProjectContractV1 = oc\n .route({\n path: \"/v1/projects\",\n method: \"POST\",\n summary: \"Create a project\",\n description: \"Create a project for a team\",\n tags: [\"projects\"],\n successDescription: \"The project has been created successfully\",\n })\n .errors({\n NOT_FOUND: {},\n BAD_REQUEST: {},\n })\n .input(\n z.object({\n name: z.string().min(1).max(100),\n sourceRepository: z.string().optional(),\n branchName: z.string().min(1).optional(),\n runtime: runtimeSchema,\n transport: transportSchema.optional(),\n rootDirectory: z.string().optional(),\n settings: buildSettingsSchema.default({}),\n environmentVariables: environmentVariablesSchema.default([]),\n }),\n )\n .output(\n z.object({\n id: z.string(),\n name: z.string(),\n environments: z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n }),\n ),\n productionEnvironment: z\n .object({\n id: z.string(),\n name: z.string(),\n })\n .nullable(),\n sourceRepository: z.string().nullable(),\n runtime: runtimeSchema,\n transport: transportSchema.nullable(),\n rootDirectory: z.string().nullable(),\n buildCommand: z.string().nullable(),\n buildOutputDir: z.string().nullable(),\n installCommand: z.string().nullable(),\n startCommand: z.string().nullable(),\n createdAt: z.date(),\n }),\n );\n\nconst deployEnvironmentContractV1 = oc\n .route({\n path: \"/v1/environments/:environmentId/deploy\",\n method: \"POST\",\n summary: \"Deploy an environment\",\n description: \"Deploy an environment\",\n tags: [\"environments\"],\n successDescription: \"The environment has been deployed successfully\",\n })\n .errors({\n NOT_FOUND: {},\n BAD_REQUEST: {},\n })\n .input(\n z.object({\n environmentId: z.string().describe(\"The ID of the environment to deploy\"),\n token: z.string().describe(\"The token to identify the source archive\").optional(),\n }),\n )\n .output(deploymentSchema);\n\nconst uploadDeploymentArtifactContractV1 = oc\n .route({\n path: \"/v1/deployments/upload\",\n method: \"POST\",\n summary: \"Upload deployment artifacts\",\n description: \"Return a presigned S3 URL to upload a deployment artifact\",\n tags: [\"deployments\"],\n successDescription: \"The presigned upload URL has been generated successfully\",\n })\n .output(\n z.object({\n uploadUrl: z.string().url().describe(\"Presigned S3 URL to upload the source archive with HTTP PUT\"),\n token: z.string().describe(\"Token to identify the source archive\"),\n expiresAt: z.date().describe(\"Expiration date of the presigned URL\"),\n }),\n );\n\nconst getDeploymentContractV1 = oc\n .route({\n path: \"/v1/deployments/:deploymentId\",\n method: \"GET\",\n summary: \"Get a deployment\",\n description: \"Get a deployment by ID\",\n tags: [\"deployments\"],\n successDescription: \"The deployment details\",\n })\n .errors({\n NOT_FOUND: {},\n })\n .input(\n z.object({\n deploymentId: z.string().describe(\"The ID of the deployment\"),\n }),\n )\n .output(deploymentSchema);\n\nexport const contract = {\n deployments: {\n get: {\n v1: getDeploymentContractV1,\n },\n uploadArtifact: {\n v1: uploadDeploymentArtifactContractV1,\n },\n },\n environments: {\n create: {\n v1: createEnvironmentContractV1,\n },\n get: {\n v1: getEnvironmentContractV1,\n },\n deploy: {\n v1: deployEnvironmentContractV1,\n },\n },\n projects: {\n get: {\n v1: getProjectContractV1,\n },\n list: {\n v1: listProjectsContractV1,\n },\n create: {\n v1: createProjectContractV1,\n },\n },\n};\n","import { z } from \"zod\";\n\nconst RESERVED_KEYS = [\n // AWS Lambda reserved keys - https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime\n \"_HANDLER\",\n \"_X_AMZN_TRACE_ID\",\n \"AWS_DEFAULT_REGION\",\n \"AWS_REGION\",\n \"AWS_EXECUTION_ENV\",\n \"AWS_LAMBDA_FUNCTION_NAME\",\n \"AWS_LAMBDA_FUNCTION_MEMORY_SIZE\",\n \"AWS_LAMBDA_FUNCTION_VERSION\",\n \"AWS_LAMBDA_INITIALIZATION_TYPE\",\n \"AWS_LAMBDA_LOG_GROUP_NAME\",\n \"AWS_ACCESS_KEY\",\n \"AWS_LAMBDA_RUNTIME_API\",\n \"LAMBDA_TASK_ROOT\",\n \"LAMBDA_RUNTIME_DIR\",\n // Alpic reserved keys\n \"START_COMMAND\",\n \"ENVIRONMENT_ID\",\n \"PROJECT_BUILD_IMAGES_REPOSITORY_URI\",\n \"ENVIRONMENT_LAMBDA_FUNCTION_ARN\",\n \"SOURCE_REPOSITORY\",\n \"SOURCE_BRANCH\",\n \"SOURCE_REPOSITORY_CREDENTIALS\",\n \"RUNTIME\",\n \"ROOT_DIRECTORY\",\n \"BUILD_ARG_INSTALL_COMMAND\",\n \"BUILD_ARG_BUILD_COMMAND\",\n \"BUILD_ARG_BUILD_OUTPUT_DIR\",\n \"BUILD_ARG_START_COMMAND\",\n \"ALPIC_HOST\",\n];\n\nexport const environmentVariableSchema = z.object({\n key: z\n .string()\n .min(2, \"Key must be at least 2 characters\")\n .regex(\n /^[a-zA-Z]([a-zA-Z0-9_])+$/,\n \"Key must start with a letter and contain only letters, numbers, and underscores\",\n )\n .refine(\n (key) => !RESERVED_KEYS.includes(key),\n \"This key is reserved and cannot be used as an environment variable key\",\n ),\n value: z.string().min(1, \"Value is required\"),\n isSecret: z.boolean().default(false),\n});\n\nexport const environmentVariablesSchema = z.array(environmentVariableSchema);\n\nexport const buildSettingsSchema = z.object({\n installCommand: z.string().optional(),\n buildCommand: z.string().optional(),\n buildOutputDir: z.string().optional(),\n startCommand: z.string().optional(),\n});\n\nexport const runtimeSchema = z.enum([\"python3.13\", \"node22\", \"node24\"]);\n\nexport type Runtime = z.infer<typeof runtimeSchema>;\n\nexport const transportSchema = z.enum([\"stdio\", \"sse\", \"streamablehttp\"]);\n\nexport type Transport = z.infer<typeof transportSchema>;\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,KAAAA,UAAS;;;ACDlB,SAAS,SAAS;AAElB,IAAM,gBAAgB;AAAA;AAAA,EAEpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,4BAA4B,EAAE,OAAO;AAAA,EAChD,KAAK,EACF,OAAO,EACP,IAAI,GAAG,mCAAmC,EAC1C;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC,CAAC,QAAQ,CAAC,cAAc,SAAS,GAAG;AAAA,IACpC;AAAA,EACF;AAAA,EACF,OAAO,EAAE,OAAO,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