@alpic-ai/api 0.0.0-staging.c5df9aa → 0.0.0-staging.d097869
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 +9 -0
- package/dist/index.mjs +18 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -485,6 +485,15 @@ declare const contract: {
|
|
|
485
485
|
BAD_REQUEST: {};
|
|
486
486
|
}>, Record<never, never>>;
|
|
487
487
|
};
|
|
488
|
+
delete: {
|
|
489
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
490
|
+
projectId: z.ZodString;
|
|
491
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
492
|
+
success: z.ZodLiteral<true>;
|
|
493
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
494
|
+
NOT_FOUND: {};
|
|
495
|
+
}>, Record<never, never>>;
|
|
496
|
+
};
|
|
488
497
|
};
|
|
489
498
|
};
|
|
490
499
|
type RouterInput = InferContractRouterInputs<typeof contract>;
|
package/dist/index.mjs
CHANGED
|
@@ -106,7 +106,7 @@ const createEnvironmentContractV1 = oc.route({
|
|
|
106
106
|
projectId: z.string().describe("The ID of the project the environment belongs to")
|
|
107
107
|
}));
|
|
108
108
|
const getEnvironmentContractV1 = oc.route({
|
|
109
|
-
path: "/v1/environments
|
|
109
|
+
path: "/v1/environments/{environmentId}",
|
|
110
110
|
method: "GET",
|
|
111
111
|
summary: "Get an environment",
|
|
112
112
|
description: "Get an environment by ID",
|
|
@@ -153,7 +153,7 @@ const projectOutputSchema = z.object({
|
|
|
153
153
|
environments: z.array(environmentSchema)
|
|
154
154
|
});
|
|
155
155
|
const getProjectContractV1 = oc.route({
|
|
156
|
-
path: "/v1/projects
|
|
156
|
+
path: "/v1/projects/{projectId}",
|
|
157
157
|
method: "GET",
|
|
158
158
|
summary: "Get a project",
|
|
159
159
|
description: "Get a project by ID",
|
|
@@ -210,8 +210,16 @@ const createProjectContractV1 = oc.route({
|
|
|
210
210
|
startCommand: z.string().nullable(),
|
|
211
211
|
createdAt: z.coerce.date()
|
|
212
212
|
}));
|
|
213
|
-
const
|
|
213
|
+
const deleteProjectContractV1 = oc.route({
|
|
214
214
|
path: "/v1/projects/:projectId",
|
|
215
|
+
method: "DELETE",
|
|
216
|
+
summary: "Delete a project",
|
|
217
|
+
description: "Delete a project and all its environments",
|
|
218
|
+
tags: ["projects"],
|
|
219
|
+
successDescription: "The project has been deleted successfully"
|
|
220
|
+
}).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(z.object({ success: z.literal(true) }));
|
|
221
|
+
const updateProjectContractV1 = oc.route({
|
|
222
|
+
path: "/v1/projects/{projectId}",
|
|
215
223
|
method: "PATCH",
|
|
216
224
|
summary: "Update a project",
|
|
217
225
|
description: "Update project settings",
|
|
@@ -225,7 +233,7 @@ const updateProjectContractV1 = oc.route({
|
|
|
225
233
|
sourceRepository: z.string().nullable().optional().describe("The source repository to connect to the project")
|
|
226
234
|
})).output(projectOutputSchema);
|
|
227
235
|
const deployEnvironmentContractV1 = oc.route({
|
|
228
|
-
path: "/v1/environments
|
|
236
|
+
path: "/v1/environments/{environmentId}/deploy",
|
|
229
237
|
method: "POST",
|
|
230
238
|
summary: "Deploy an environment",
|
|
231
239
|
description: "Deploy an environment",
|
|
@@ -251,7 +259,7 @@ const uploadDeploymentArtifactContractV1 = oc.route({
|
|
|
251
259
|
expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
|
|
252
260
|
}));
|
|
253
261
|
const listProjectDeploymentsContractV1 = oc.route({
|
|
254
|
-
path: "/v1/projects
|
|
262
|
+
path: "/v1/projects/{projectId}/deployments",
|
|
255
263
|
method: "GET",
|
|
256
264
|
summary: "List project deployments",
|
|
257
265
|
description: "List all deployments for a project",
|
|
@@ -262,7 +270,7 @@ const listProjectDeploymentsContractV1 = oc.route({
|
|
|
262
270
|
environmentId: z.string()
|
|
263
271
|
})));
|
|
264
272
|
const getDeploymentContractV1 = oc.route({
|
|
265
|
-
path: "/v1/deployments
|
|
273
|
+
path: "/v1/deployments/{deploymentId}",
|
|
266
274
|
method: "GET",
|
|
267
275
|
summary: "Get a deployment",
|
|
268
276
|
description: "Get a deployment by ID",
|
|
@@ -270,7 +278,7 @@ const getDeploymentContractV1 = oc.route({
|
|
|
270
278
|
successDescription: "The deployment details"
|
|
271
279
|
}).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
|
|
272
280
|
const getDeploymentLogsContractV1 = oc.route({
|
|
273
|
-
path: "/v1/deployments
|
|
281
|
+
path: "/v1/deployments/{deploymentId}/logs",
|
|
274
282
|
method: "GET",
|
|
275
283
|
summary: "Get deployment logs",
|
|
276
284
|
description: "Get the logs for a deployment",
|
|
@@ -297,7 +305,7 @@ const analyticsTimeSeriesSchema = z.object({
|
|
|
297
305
|
task_count: z.array(analyticsDataPointSchema)
|
|
298
306
|
});
|
|
299
307
|
const getProjectAnalyticsContractV1 = oc.route({
|
|
300
|
-
path: "/v1/analytics
|
|
308
|
+
path: "/v1/analytics/{projectId}",
|
|
301
309
|
method: "GET",
|
|
302
310
|
summary: "Get project analytics",
|
|
303
311
|
description: "Get analytics data for a project over a time range",
|
|
@@ -353,7 +361,8 @@ const contract = {
|
|
|
353
361
|
update: { v1: updateProjectContractV1 },
|
|
354
362
|
get: { v1: getProjectContractV1 },
|
|
355
363
|
list: { v1: listProjectsContractV1 },
|
|
356
|
-
create: { v1: createProjectContractV1 }
|
|
364
|
+
create: { v1: createProjectContractV1 },
|
|
365
|
+
delete: { v1: deleteProjectContractV1 }
|
|
357
366
|
}
|
|
358
367
|
};
|
|
359
368
|
|