@alpic-ai/api 0.0.0-staging.8ef93b7 → 0.0.0-staging.91388ff

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
@@ -7,6 +7,7 @@ type ApiContext = {
7
7
  request: Request & {
8
8
  teamIds: string[];
9
9
  defaultTeamId: string | undefined;
10
+ awsCognitoUserSub: string | undefined;
10
11
  };
11
12
  };
12
13
  declare const createEnvironmentContractV1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -37,7 +38,6 @@ declare const contract: {
37
38
  name: z.ZodString;
38
39
  createdAt: z.ZodCoercedDate<unknown>;
39
40
  hasStripeAccount: z.ZodBoolean;
40
- hasActiveSubscription: z.ZodBoolean;
41
41
  }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
42
42
  };
43
43
  };
@@ -259,6 +259,15 @@ declare const contract: {
259
259
  id: z.ZodString;
260
260
  name: z.ZodString;
261
261
  mcpServerUrl: z.ZodString;
262
+ domains: z.ZodArray<z.ZodObject<{
263
+ domain: z.ZodString;
264
+ status: z.ZodEnum<{
265
+ ongoing: "ongoing";
266
+ deployed: "deployed";
267
+ failed: "failed";
268
+ }>;
269
+ createdAt: z.ZodCoercedDate<unknown>;
270
+ }, z.core.$strip>>;
262
271
  latestDeployment: z.ZodNullable<z.ZodObject<{
263
272
  id: z.ZodString;
264
273
  status: z.ZodEnum<{
@@ -326,6 +335,15 @@ declare const contract: {
326
335
  id: z.ZodString;
327
336
  name: z.ZodString;
328
337
  mcpServerUrl: z.ZodString;
338
+ domains: z.ZodArray<z.ZodObject<{
339
+ domain: z.ZodString;
340
+ status: z.ZodEnum<{
341
+ ongoing: "ongoing";
342
+ deployed: "deployed";
343
+ failed: "failed";
344
+ }>;
345
+ createdAt: z.ZodCoercedDate<unknown>;
346
+ }, z.core.$strip>>;
329
347
  latestDeployment: z.ZodNullable<z.ZodObject<{
330
348
  id: z.ZodString;
331
349
  status: z.ZodEnum<{
@@ -392,6 +410,15 @@ declare const contract: {
392
410
  id: z.ZodString;
393
411
  name: z.ZodString;
394
412
  mcpServerUrl: z.ZodString;
413
+ domains: z.ZodArray<z.ZodObject<{
414
+ domain: z.ZodString;
415
+ status: z.ZodEnum<{
416
+ ongoing: "ongoing";
417
+ deployed: "deployed";
418
+ failed: "failed";
419
+ }>;
420
+ createdAt: z.ZodCoercedDate<unknown>;
421
+ }, z.core.$strip>>;
395
422
  latestDeployment: z.ZodNullable<z.ZodObject<{
396
423
  id: z.ZodString;
397
424
  status: z.ZodEnum<{
@@ -501,6 +528,15 @@ declare const contract: {
501
528
  }>, Record<never, never>>;
502
529
  };
503
530
  };
531
+ tunnels: {
532
+ getTicket: {
533
+ v1: _orpc_contract0.ContractProcedureBuilderWithOutput<_orpc_contract0.Schema<unknown, unknown>, z.ZodObject<{
534
+ subdomain: z.ZodString;
535
+ ticket: z.ZodString;
536
+ tunnelHost: z.ZodString;
537
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
538
+ };
539
+ };
504
540
  };
505
541
  type RouterInput = InferContractRouterInputs<typeof contract>;
506
542
  type RouterOutput = InferContractRouterOutputs<typeof contract>;
package/dist/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
-
4
3
  //#region src/schemas.ts
5
4
  const RESERVED_KEYS = [
6
5
  "_HANDLER",
@@ -34,7 +33,8 @@ const RESERVED_KEYS = [
34
33
  "BUILD_ARG_BUILD_COMMAND",
35
34
  "BUILD_ARG_BUILD_OUTPUT_DIR",
36
35
  "BUILD_ARG_START_COMMAND",
37
- "ALPIC_HOST"
36
+ "ALPIC_HOST",
37
+ "ALPIC_CUSTOM_DOMAINS"
38
38
  ];
39
39
  const environmentVariableSchema = z.object({
40
40
  key: z.string().min(2, "Key must be at least 2 characters").regex(/^[a-zA-Z]([a-zA-Z0-9_])+$/, "Key must start with a letter and contain only letters, numbers, and underscores").refine((key) => !RESERVED_KEYS.includes(key), "This key is reserved and cannot be used as an environment variable key"),
@@ -59,7 +59,6 @@ const transportSchema = z.enum([
59
59
  "sse",
60
60
  "streamablehttp"
61
61
  ]);
62
-
63
62
  //#endregion
64
63
  //#region src/api.contract.ts
65
64
  const deploymentStatusSchema = z.enum([
@@ -126,10 +125,20 @@ const getEnvironmentContractV1 = oc.route({
126
125
  createdAt: z.coerce.date(),
127
126
  projectId: z.string()
128
127
  }));
128
+ const domainSchema = z.object({
129
+ domain: z.string(),
130
+ status: z.enum([
131
+ "ongoing",
132
+ "deployed",
133
+ "failed"
134
+ ]),
135
+ createdAt: z.coerce.date()
136
+ });
129
137
  const productionEnvironmentSchema = z.object({
130
138
  id: z.string(),
131
139
  name: z.string(),
132
140
  mcpServerUrl: z.string(),
141
+ domains: z.array(domainSchema),
133
142
  latestDeployment: latestDeploymentSchema.nullable()
134
143
  });
135
144
  const environmentSchema = z.object({
@@ -346,9 +355,20 @@ const listTeamsContractV1 = oc.route({
346
355
  id: z.string(),
347
356
  name: z.string(),
348
357
  createdAt: z.coerce.date(),
349
- hasStripeAccount: z.boolean(),
350
- hasActiveSubscription: z.boolean()
358
+ hasStripeAccount: z.boolean()
351
359
  })));
360
+ const getTunnelTicketContractV1 = oc.route({
361
+ path: "/v1/tunnels/ticket",
362
+ method: "GET",
363
+ summary: "Get a tunnel ticket",
364
+ description: "Get a signed ticket for establishing a tunnel connection. Requires user authentication (API keys are not supported).",
365
+ tags: ["tunnels"],
366
+ successDescription: "The tunnel ticket"
367
+ }).output(z.object({
368
+ subdomain: z.string().describe("The subdomain assigned to the user"),
369
+ ticket: z.string().describe("The signed tunnel ticket"),
370
+ tunnelHost: z.string().describe("The tunnel host to connect to")
371
+ }));
352
372
  const contract = {
353
373
  teams: { list: { v1: listTeamsContractV1 } },
354
374
  analytics: { get: { v1: getProjectAnalyticsContractV1 } },
@@ -369,8 +389,8 @@ const contract = {
369
389
  list: { v1: listProjectsContractV1 },
370
390
  create: { v1: createProjectContractV1 },
371
391
  delete: { v1: deleteProjectContractV1 }
372
- }
392
+ },
393
+ tunnels: { getTicket: { v1: getTunnelTicketContractV1 } }
373
394
  };
374
-
375
395
  //#endregion
376
- export { buildSettingsSchema, contract, createEnvironmentContractV1, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
396
+ export { buildSettingsSchema, contract, createEnvironmentContractV1, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.8ef93b7",
3
+ "version": "0.0.0-staging.91388ff",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -17,13 +17,13 @@
17
17
  "author": "Alpic",
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
- "@orpc/contract": "^1.13.5",
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
25
  "shx": "^0.4.0",
26
- "tsdown": "^0.20.3",
26
+ "tsdown": "^0.21.1",
27
27
  "typescript": "^5.9.3",
28
28
  "vitest": "^4.0.18"
29
29
  },