@alpic-ai/api 1.88.0 → 1.90.0

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 CHANGED
@@ -228,6 +228,7 @@ declare const contract: {
228
228
  update: {
229
229
  v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
230
230
  projectId: z.ZodString;
231
+ name: z.ZodOptional<z.ZodString>;
231
232
  sourceRepository: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
233
  }, z.core.$strip>, z.ZodObject<{
233
234
  id: z.ZodString;
@@ -485,6 +486,15 @@ declare const contract: {
485
486
  BAD_REQUEST: {};
486
487
  }>, Record<never, never>>;
487
488
  };
489
+ delete: {
490
+ v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
491
+ projectId: z.ZodString;
492
+ }, z.core.$strip>, z.ZodObject<{
493
+ success: z.ZodLiteral<true>;
494
+ }, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
495
+ NOT_FOUND: {};
496
+ }>, Record<never, never>>;
497
+ };
488
498
  };
489
499
  };
490
500
  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/:environmentId",
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/:projectId",
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 updateProjectContractV1 = oc.route({
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",
@@ -222,10 +230,11 @@ const updateProjectContractV1 = oc.route({
222
230
  BAD_REQUEST: {}
223
231
  }).input(z.object({
224
232
  projectId: z.string().describe("The ID of the project"),
233
+ name: z.string().min(1).max(100).optional().describe("The new name for the project"),
225
234
  sourceRepository: z.string().nullable().optional().describe("The source repository to connect to the project")
226
235
  })).output(projectOutputSchema);
227
236
  const deployEnvironmentContractV1 = oc.route({
228
- path: "/v1/environments/:environmentId/deploy",
237
+ path: "/v1/environments/{environmentId}/deploy",
229
238
  method: "POST",
230
239
  summary: "Deploy an environment",
231
240
  description: "Deploy an environment",
@@ -251,7 +260,7 @@ const uploadDeploymentArtifactContractV1 = oc.route({
251
260
  expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
252
261
  }));
253
262
  const listProjectDeploymentsContractV1 = oc.route({
254
- path: "/v1/projects/:projectId/deployments",
263
+ path: "/v1/projects/{projectId}/deployments",
255
264
  method: "GET",
256
265
  summary: "List project deployments",
257
266
  description: "List all deployments for a project",
@@ -262,7 +271,7 @@ const listProjectDeploymentsContractV1 = oc.route({
262
271
  environmentId: z.string()
263
272
  })));
264
273
  const getDeploymentContractV1 = oc.route({
265
- path: "/v1/deployments/:deploymentId",
274
+ path: "/v1/deployments/{deploymentId}",
266
275
  method: "GET",
267
276
  summary: "Get a deployment",
268
277
  description: "Get a deployment by ID",
@@ -270,7 +279,7 @@ const getDeploymentContractV1 = oc.route({
270
279
  successDescription: "The deployment details"
271
280
  }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
272
281
  const getDeploymentLogsContractV1 = oc.route({
273
- path: "/v1/deployments/:deploymentId/logs",
282
+ path: "/v1/deployments/{deploymentId}/logs",
274
283
  method: "GET",
275
284
  summary: "Get deployment logs",
276
285
  description: "Get the logs for a deployment",
@@ -297,7 +306,7 @@ const analyticsTimeSeriesSchema = z.object({
297
306
  task_count: z.array(analyticsDataPointSchema)
298
307
  });
299
308
  const getProjectAnalyticsContractV1 = oc.route({
300
- path: "/v1/analytics/:projectId",
309
+ path: "/v1/analytics/{projectId}",
301
310
  method: "GET",
302
311
  summary: "Get project analytics",
303
312
  description: "Get analytics data for a project over a time range",
@@ -353,7 +362,8 @@ const contract = {
353
362
  update: { v1: updateProjectContractV1 },
354
363
  get: { v1: getProjectContractV1 },
355
364
  list: { v1: listProjectsContractV1 },
356
- create: { v1: createProjectContractV1 }
365
+ create: { v1: createProjectContractV1 },
366
+ delete: { v1: deleteProjectContractV1 }
357
367
  }
358
368
  };
359
369
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.88.0",
3
+ "version": "1.90.0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",