@alpic-ai/api 0.0.0-staging.22149cf → 0.0.0-staging.2333207

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
@@ -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;
@@ -485,6 +488,15 @@ declare const contract: {
485
488
  BAD_REQUEST: {};
486
489
  }>, Record<never, never>>;
487
490
  };
491
+ delete: {
492
+ v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
493
+ projectId: z.ZodString;
494
+ }, z.core.$strip>, z.ZodObject<{
495
+ success: z.ZodLiteral<true>;
496
+ }, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
497
+ NOT_FOUND: {};
498
+ }>, Record<never, never>>;
499
+ };
488
500
  };
489
501
  };
490
502
  type RouterInput = InferContractRouterInputs<typeof contract>;
package/dist/index.mjs CHANGED
@@ -82,6 +82,7 @@ const deploymentSchema = z.object({
82
82
  startedAt: z.coerce.date().nullable(),
83
83
  completedAt: z.coerce.date().nullable()
84
84
  });
85
+ const deploymentWithPageUrlSchema = deploymentSchema.extend({ deploymentPageUrl: z.url().nullable() });
85
86
  const createEnvironmentContractV1 = oc.route({
86
87
  path: "/v1/environments",
87
88
  method: "POST",
@@ -180,7 +181,7 @@ const createProjectContractV1 = oc.route({
180
181
  BAD_REQUEST: {}
181
182
  }).input(z.object({
182
183
  teamId: z.string().optional(),
183
- name: z.string().min(1).max(100),
184
+ name: z.string().trim().min(1).max(100),
184
185
  sourceRepository: z.string().optional(),
185
186
  branchName: z.string().min(1).optional(),
186
187
  runtime: runtimeSchema,
@@ -210,6 +211,14 @@ const createProjectContractV1 = oc.route({
210
211
  startCommand: z.string().nullable(),
211
212
  createdAt: z.coerce.date()
212
213
  }));
214
+ const deleteProjectContractV1 = oc.route({
215
+ path: "/v1/projects/:projectId",
216
+ method: "DELETE",
217
+ summary: "Delete a project",
218
+ description: "Delete a project and all its environments",
219
+ tags: ["projects"],
220
+ successDescription: "The project has been deleted successfully"
221
+ }).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(z.object({ success: z.literal(true) }));
213
222
  const updateProjectContractV1 = oc.route({
214
223
  path: "/v1/projects/{projectId}",
215
224
  method: "PATCH",
@@ -222,6 +231,7 @@ const updateProjectContractV1 = oc.route({
222
231
  BAD_REQUEST: {}
223
232
  }).input(z.object({
224
233
  projectId: z.string().describe("The ID of the project"),
234
+ name: z.string().min(1).max(100).optional().describe("The new name for the project"),
225
235
  sourceRepository: z.string().nullable().optional().describe("The source repository to connect to the project")
226
236
  })).output(projectOutputSchema);
227
237
  const deployEnvironmentContractV1 = oc.route({
@@ -237,7 +247,7 @@ const deployEnvironmentContractV1 = oc.route({
237
247
  }).input(z.object({
238
248
  environmentId: z.string().describe("The ID of the environment to deploy"),
239
249
  token: z.string().describe("The token to identify the source archive").optional()
240
- })).output(deploymentSchema);
250
+ })).output(deploymentWithPageUrlSchema);
241
251
  const uploadDeploymentArtifactContractV1 = oc.route({
242
252
  path: "/v1/deployments/upload",
243
253
  method: "POST",
@@ -268,7 +278,7 @@ const getDeploymentContractV1 = oc.route({
268
278
  description: "Get a deployment by ID",
269
279
  tags: ["deployments"],
270
280
  successDescription: "The deployment details"
271
- }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
281
+ }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentWithPageUrlSchema);
272
282
  const getDeploymentLogsContractV1 = oc.route({
273
283
  path: "/v1/deployments/{deploymentId}/logs",
274
284
  method: "GET",
@@ -353,7 +363,8 @@ const contract = {
353
363
  update: { v1: updateProjectContractV1 },
354
364
  get: { v1: getProjectContractV1 },
355
365
  list: { v1: listProjectsContractV1 },
356
- create: { v1: createProjectContractV1 }
366
+ create: { v1: createProjectContractV1 },
367
+ delete: { v1: deleteProjectContractV1 }
357
368
  }
358
369
  };
359
370
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.22149cf",
3
+ "version": "0.0.0-staging.2333207",
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.4",
20
+ "@orpc/contract": "^1.13.5",
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",