@alpic-ai/api 1.96.0 → 1.97.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
@@ -10,6 +10,12 @@ type ApiContext = {
10
10
  awsCognitoUserSub: string | undefined;
11
11
  };
12
12
  };
13
+ declare const deploymentStatusSchema: z.ZodEnum<{
14
+ ongoing: "ongoing";
15
+ deployed: "deployed";
16
+ failed: "failed";
17
+ canceled: "canceled";
18
+ }>;
13
19
  declare const createEnvironmentContractV1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
14
20
  projectId: z.ZodString;
15
21
  name: z.ZodString;
@@ -96,6 +102,13 @@ declare const contract: {
96
102
  list: {
97
103
  v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
98
104
  projectId: z.ZodString;
105
+ status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
106
+ ongoing: "ongoing";
107
+ deployed: "deployed";
108
+ failed: "failed";
109
+ canceled: "canceled";
110
+ }>>>;
111
+ environmentId: z.ZodOptional<z.ZodString>;
99
112
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
100
113
  id: z.ZodString;
101
114
  status: z.ZodEnum<{
@@ -111,8 +124,10 @@ declare const contract: {
111
124
  authorAvatarUrl: z.ZodNullable<z.ZodString>;
112
125
  startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
113
126
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
114
- isCurrent: z.ZodBoolean;
115
127
  environmentId: z.ZodString;
128
+ environmentName: z.ZodString;
129
+ isCurrent: z.ZodBoolean;
130
+ deploymentPageUrl: z.ZodNullable<z.ZodURL>;
116
131
  }, z.core.$strip>>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
117
132
  NOT_FOUND: {};
118
133
  }>, Record<never, never>>;
@@ -135,6 +150,9 @@ declare const contract: {
135
150
  authorAvatarUrl: z.ZodNullable<z.ZodString>;
136
151
  startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
137
152
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
153
+ environmentId: z.ZodString;
154
+ environmentName: z.ZodString;
155
+ isCurrent: z.ZodBoolean;
138
156
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
139
157
  }, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
140
158
  NOT_FOUND: {};
@@ -220,6 +238,9 @@ declare const contract: {
220
238
  authorAvatarUrl: z.ZodNullable<z.ZodString>;
221
239
  startedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
222
240
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
241
+ environmentId: z.ZodString;
242
+ environmentName: z.ZodString;
243
+ isCurrent: z.ZodBoolean;
223
244
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
224
245
  }, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
225
246
  NOT_FOUND: {};
@@ -660,4 +681,4 @@ declare const transportSchema: z.ZodEnum<{
660
681
  }>;
661
682
  type Transport = z.infer<typeof transportSchema>;
662
683
  //#endregion
663
- export { ApiContext, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
684
+ export { ApiContext, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
package/dist/index.mjs CHANGED
@@ -84,9 +84,12 @@ const deploymentSchema = z.object({
84
84
  authorUsername: z.string().nullable(),
85
85
  authorAvatarUrl: z.string().nullable(),
86
86
  startedAt: z.coerce.date().nullable(),
87
- completedAt: z.coerce.date().nullable()
87
+ completedAt: z.coerce.date().nullable(),
88
+ environmentId: z.string(),
89
+ environmentName: z.string(),
90
+ isCurrent: z.boolean(),
91
+ deploymentPageUrl: z.url().nullable()
88
92
  });
89
- const deploymentWithPageUrlSchema = deploymentSchema.extend({ deploymentPageUrl: z.url().nullable() });
90
93
  const isValidLogTimeInput = (value) => {
91
94
  if (ms(value) !== void 0) return true;
92
95
  return !Number.isNaN(new Date(value).getTime());
@@ -318,7 +321,7 @@ const deployEnvironmentContractV1 = oc.route({
318
321
  }).input(z.object({
319
322
  environmentId: z.string().describe("The ID of the environment to deploy"),
320
323
  token: z.string().describe("The token to identify the source archive").optional()
321
- })).output(deploymentWithPageUrlSchema);
324
+ })).output(deploymentSchema);
322
325
  const uploadDeploymentArtifactContractV1 = oc.route({
323
326
  path: "/v1/deployments/upload",
324
327
  method: "POST",
@@ -331,17 +334,18 @@ const uploadDeploymentArtifactContractV1 = oc.route({
331
334
  token: z.string().describe("Token to identify the source archive"),
332
335
  expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
333
336
  }));
334
- const listProjectDeploymentsContractV1 = oc.route({
337
+ const listDeploymentsContractV1 = oc.route({
335
338
  path: "/v1/projects/{projectId}/deployments",
336
339
  method: "GET",
337
340
  summary: "List project deployments",
338
341
  description: "List all deployments for a project",
339
342
  tags: ["deployments"],
340
343
  successDescription: "The list of deployments"
341
- }).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(z.array(deploymentSchema.extend({
342
- isCurrent: z.boolean(),
343
- environmentId: z.string()
344
- })));
344
+ }).errors({ NOT_FOUND: {} }).input(z.object({
345
+ projectId: z.string().describe("The ID of the project"),
346
+ status: z.array(deploymentStatusSchema).optional().describe("Filter by one or more statuses"),
347
+ environmentId: z.string().optional().describe("Filter by environment ID")
348
+ })).output(z.array(deploymentSchema));
345
349
  const getDeploymentContractV1 = oc.route({
346
350
  path: "/v1/deployments/{deploymentId}",
347
351
  method: "GET",
@@ -349,7 +353,7 @@ const getDeploymentContractV1 = oc.route({
349
353
  description: "Get a deployment by ID",
350
354
  tags: ["deployments"],
351
355
  successDescription: "The deployment details"
352
- }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentWithPageUrlSchema);
356
+ }).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
353
357
  const getLogsContractV1 = oc.route({
354
358
  path: "/v1/environments/{environmentId}/logs",
355
359
  method: "GET",
@@ -472,7 +476,7 @@ const contract = {
472
476
  teams: { list: { v1: listTeamsContractV1 } },
473
477
  analytics: { get: { v1: getProjectAnalyticsContractV1 } },
474
478
  deployments: {
475
- list: { v1: listProjectDeploymentsContractV1 },
479
+ list: { v1: listDeploymentsContractV1 },
476
480
  get: { v1: getDeploymentContractV1 },
477
481
  uploadArtifact: { v1: uploadDeploymentArtifactContractV1 },
478
482
  getLogs: { v1: getDeploymentLogsContractV1 }
@@ -499,4 +503,4 @@ const contract = {
499
503
  tunnels: { getTicket: { v1: getTunnelTicketContractV1 } }
500
504
  };
501
505
  //#endregion
502
- export { buildSettingsSchema, contract, createEnvironmentContractV1, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
506
+ export { buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.96.0",
3
+ "version": "1.97.0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -17,7 +17,7 @@
17
17
  "author": "Alpic",
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
- "@orpc/contract": "^1.13.7",
20
+ "@orpc/contract": "^1.13.8",
21
21
  "ms": "^2.1.3",
22
22
  "zod": "^4.3.6"
23
23
  },
@@ -25,7 +25,7 @@
25
25
  "@total-typescript/tsconfig": "^1.0.4",
26
26
  "@types/ms": "^2.1.0",
27
27
  "shx": "^0.4.0",
28
- "tsdown": "^0.21.3",
28
+ "tsdown": "^0.21.4",
29
29
  "typescript": "^5.9.3",
30
30
  "vitest": "^4.1.0"
31
31
  },