@alpic-ai/api 0.0.0-staging.1492155 → 0.0.0-staging.1759cad
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 +34 -2
- package/dist/index.mjs +21 -6
- package/package.json +2 -3
package/dist/index.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ import { z } from "zod";
|
|
|
6
6
|
type ApiContext = {
|
|
7
7
|
request: Request & {
|
|
8
8
|
teamIds: string[];
|
|
9
|
+
defaultTeamId: string | undefined;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
12
|
declare const createEnvironmentContractV1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -36,7 +37,6 @@ declare const contract: {
|
|
|
36
37
|
name: z.ZodString;
|
|
37
38
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
38
39
|
hasStripeAccount: z.ZodBoolean;
|
|
39
|
-
hasActiveSubscription: z.ZodBoolean;
|
|
40
40
|
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -134,6 +134,7 @@ declare const contract: {
|
|
|
134
134
|
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
135
135
|
startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
136
136
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
137
|
+
deploymentPageUrl: z.ZodNullable<z.ZodURL>;
|
|
137
138
|
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
138
139
|
NOT_FOUND: {};
|
|
139
140
|
}>, Record<never, never>>;
|
|
@@ -218,6 +219,7 @@ declare const contract: {
|
|
|
218
219
|
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
219
220
|
startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
220
221
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
222
|
+
deploymentPageUrl: z.ZodNullable<z.ZodURL>;
|
|
221
223
|
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
222
224
|
NOT_FOUND: {};
|
|
223
225
|
BAD_REQUEST: {};
|
|
@@ -228,6 +230,7 @@ declare const contract: {
|
|
|
228
230
|
update: {
|
|
229
231
|
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
230
232
|
projectId: z.ZodString;
|
|
233
|
+
name: z.ZodOptional<z.ZodString>;
|
|
231
234
|
sourceRepository: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
235
|
}, z.core.$strip>, z.ZodObject<{
|
|
233
236
|
id: z.ZodString;
|
|
@@ -255,6 +258,15 @@ declare const contract: {
|
|
|
255
258
|
id: z.ZodString;
|
|
256
259
|
name: z.ZodString;
|
|
257
260
|
mcpServerUrl: z.ZodString;
|
|
261
|
+
domains: z.ZodArray<z.ZodObject<{
|
|
262
|
+
domain: z.ZodString;
|
|
263
|
+
status: z.ZodEnum<{
|
|
264
|
+
ongoing: "ongoing";
|
|
265
|
+
deployed: "deployed";
|
|
266
|
+
failed: "failed";
|
|
267
|
+
}>;
|
|
268
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
269
|
+
}, z.core.$strip>>;
|
|
258
270
|
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
259
271
|
id: z.ZodString;
|
|
260
272
|
status: z.ZodEnum<{
|
|
@@ -322,6 +334,15 @@ declare const contract: {
|
|
|
322
334
|
id: z.ZodString;
|
|
323
335
|
name: z.ZodString;
|
|
324
336
|
mcpServerUrl: z.ZodString;
|
|
337
|
+
domains: z.ZodArray<z.ZodObject<{
|
|
338
|
+
domain: z.ZodString;
|
|
339
|
+
status: z.ZodEnum<{
|
|
340
|
+
ongoing: "ongoing";
|
|
341
|
+
deployed: "deployed";
|
|
342
|
+
failed: "failed";
|
|
343
|
+
}>;
|
|
344
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
345
|
+
}, z.core.$strip>>;
|
|
325
346
|
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
326
347
|
id: z.ZodString;
|
|
327
348
|
status: z.ZodEnum<{
|
|
@@ -360,7 +381,9 @@ declare const contract: {
|
|
|
360
381
|
}>, Record<never, never>>;
|
|
361
382
|
};
|
|
362
383
|
list: {
|
|
363
|
-
v1: _orpc_contract0.
|
|
384
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
385
|
+
teamId: z.ZodOptional<z.ZodString>;
|
|
386
|
+
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
364
387
|
id: z.ZodString;
|
|
365
388
|
name: z.ZodString;
|
|
366
389
|
teamId: z.ZodString;
|
|
@@ -386,6 +409,15 @@ declare const contract: {
|
|
|
386
409
|
id: z.ZodString;
|
|
387
410
|
name: z.ZodString;
|
|
388
411
|
mcpServerUrl: z.ZodString;
|
|
412
|
+
domains: z.ZodArray<z.ZodObject<{
|
|
413
|
+
domain: z.ZodString;
|
|
414
|
+
status: z.ZodEnum<{
|
|
415
|
+
ongoing: "ongoing";
|
|
416
|
+
deployed: "deployed";
|
|
417
|
+
failed: "failed";
|
|
418
|
+
}>;
|
|
419
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
420
|
+
}, z.core.$strip>>;
|
|
389
421
|
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
390
422
|
id: z.ZodString;
|
|
391
423
|
status: z.ZodEnum<{
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,11 @@ const RESERVED_KEYS = [
|
|
|
13
13
|
"AWS_LAMBDA_FUNCTION_VERSION",
|
|
14
14
|
"AWS_LAMBDA_INITIALIZATION_TYPE",
|
|
15
15
|
"AWS_LAMBDA_LOG_GROUP_NAME",
|
|
16
|
+
"AWS_LAMBDA_LOG_STREAM_NAME",
|
|
16
17
|
"AWS_ACCESS_KEY",
|
|
18
|
+
"AWS_ACCESS_KEY_ID",
|
|
19
|
+
"AWS_SECRET_ACCESS_KEY",
|
|
20
|
+
"AWS_SESSION_TOKEN",
|
|
17
21
|
"AWS_LAMBDA_RUNTIME_API",
|
|
18
22
|
"LAMBDA_TASK_ROOT",
|
|
19
23
|
"LAMBDA_RUNTIME_DIR",
|
|
@@ -82,6 +86,7 @@ const deploymentSchema = z.object({
|
|
|
82
86
|
startedAt: z.coerce.date().nullable(),
|
|
83
87
|
completedAt: z.coerce.date().nullable()
|
|
84
88
|
});
|
|
89
|
+
const deploymentWithPageUrlSchema = deploymentSchema.extend({ deploymentPageUrl: z.url().nullable() });
|
|
85
90
|
const createEnvironmentContractV1 = oc.route({
|
|
86
91
|
path: "/v1/environments",
|
|
87
92
|
method: "POST",
|
|
@@ -121,10 +126,20 @@ const getEnvironmentContractV1 = oc.route({
|
|
|
121
126
|
createdAt: z.coerce.date(),
|
|
122
127
|
projectId: z.string()
|
|
123
128
|
}));
|
|
129
|
+
const domainSchema = z.object({
|
|
130
|
+
domain: z.string(),
|
|
131
|
+
status: z.enum([
|
|
132
|
+
"ongoing",
|
|
133
|
+
"deployed",
|
|
134
|
+
"failed"
|
|
135
|
+
]),
|
|
136
|
+
createdAt: z.coerce.date()
|
|
137
|
+
});
|
|
124
138
|
const productionEnvironmentSchema = z.object({
|
|
125
139
|
id: z.string(),
|
|
126
140
|
name: z.string(),
|
|
127
141
|
mcpServerUrl: z.string(),
|
|
142
|
+
domains: z.array(domainSchema),
|
|
128
143
|
latestDeployment: latestDeploymentSchema.nullable()
|
|
129
144
|
});
|
|
130
145
|
const environmentSchema = z.object({
|
|
@@ -167,7 +182,7 @@ const listProjectsContractV1 = oc.route({
|
|
|
167
182
|
description: "List all projects for a team",
|
|
168
183
|
tags: ["projects"],
|
|
169
184
|
successDescription: "The list of projects"
|
|
170
|
-
}).output(z.array(projectOutputSchema));
|
|
185
|
+
}).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
|
|
171
186
|
const createProjectContractV1 = oc.route({
|
|
172
187
|
path: "/v1/projects",
|
|
173
188
|
method: "POST",
|
|
@@ -180,7 +195,7 @@ const createProjectContractV1 = oc.route({
|
|
|
180
195
|
BAD_REQUEST: {}
|
|
181
196
|
}).input(z.object({
|
|
182
197
|
teamId: z.string().optional(),
|
|
183
|
-
name: z.string().min(1).max(100),
|
|
198
|
+
name: z.string().trim().min(1).max(100),
|
|
184
199
|
sourceRepository: z.string().optional(),
|
|
185
200
|
branchName: z.string().min(1).optional(),
|
|
186
201
|
runtime: runtimeSchema,
|
|
@@ -230,6 +245,7 @@ const updateProjectContractV1 = oc.route({
|
|
|
230
245
|
BAD_REQUEST: {}
|
|
231
246
|
}).input(z.object({
|
|
232
247
|
projectId: z.string().describe("The ID of the project"),
|
|
248
|
+
name: z.string().min(1).max(100).optional().describe("The new name for the project"),
|
|
233
249
|
sourceRepository: z.string().nullable().optional().describe("The source repository to connect to the project")
|
|
234
250
|
})).output(projectOutputSchema);
|
|
235
251
|
const deployEnvironmentContractV1 = oc.route({
|
|
@@ -245,7 +261,7 @@ const deployEnvironmentContractV1 = oc.route({
|
|
|
245
261
|
}).input(z.object({
|
|
246
262
|
environmentId: z.string().describe("The ID of the environment to deploy"),
|
|
247
263
|
token: z.string().describe("The token to identify the source archive").optional()
|
|
248
|
-
})).output(
|
|
264
|
+
})).output(deploymentWithPageUrlSchema);
|
|
249
265
|
const uploadDeploymentArtifactContractV1 = oc.route({
|
|
250
266
|
path: "/v1/deployments/upload",
|
|
251
267
|
method: "POST",
|
|
@@ -276,7 +292,7 @@ const getDeploymentContractV1 = oc.route({
|
|
|
276
292
|
description: "Get a deployment by ID",
|
|
277
293
|
tags: ["deployments"],
|
|
278
294
|
successDescription: "The deployment details"
|
|
279
|
-
}).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(
|
|
295
|
+
}).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentWithPageUrlSchema);
|
|
280
296
|
const getDeploymentLogsContractV1 = oc.route({
|
|
281
297
|
path: "/v1/deployments/{deploymentId}/logs",
|
|
282
298
|
method: "GET",
|
|
@@ -340,8 +356,7 @@ const listTeamsContractV1 = oc.route({
|
|
|
340
356
|
id: z.string(),
|
|
341
357
|
name: z.string(),
|
|
342
358
|
createdAt: z.coerce.date(),
|
|
343
|
-
hasStripeAccount: z.boolean()
|
|
344
|
-
hasActiveSubscription: z.boolean()
|
|
359
|
+
hasStripeAccount: z.boolean()
|
|
345
360
|
})));
|
|
346
361
|
const contract = {
|
|
347
362
|
teams: { list: { v1: listTeamsContractV1 } },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-staging.
|
|
3
|
+
"version": "0.0.0-staging.1759cad",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
"author": "Alpic",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@orpc/contract": "^1.13.
|
|
20
|
+
"@orpc/contract": "^1.13.6",
|
|
21
21
|
"zod": "^4.3.6"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
25
|
-
"biome": "^0.3.3",
|
|
26
25
|
"shx": "^0.4.0",
|
|
27
26
|
"tsdown": "^0.20.3",
|
|
28
27
|
"typescript": "^5.9.3",
|