@alpic-ai/api 0.0.0-staging.gfab3fc8 → 0.0.0-staging.gfab86f0
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 +11 -1
- package/dist/index.mjs +19 -31
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
|
|
3
|
-
|
|
4
3
|
//#region src/api.contract.d.ts
|
|
5
4
|
type ApiContext = {
|
|
6
5
|
request: Request & {
|
|
@@ -225,6 +224,17 @@ declare const contract: {
|
|
|
225
224
|
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
226
225
|
environmentId: z.ZodString;
|
|
227
226
|
token: z.ZodOptional<z.ZodString>;
|
|
227
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
installCommand: z.ZodOptional<z.ZodString>;
|
|
229
|
+
buildCommand: z.ZodOptional<z.ZodString>;
|
|
230
|
+
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
231
|
+
startCommand: z.ZodOptional<z.ZodString>;
|
|
232
|
+
transport: z.ZodEnum<{
|
|
233
|
+
stdio: "stdio";
|
|
234
|
+
sse: "sse";
|
|
235
|
+
streamablehttp: "streamablehttp";
|
|
236
|
+
}>;
|
|
237
|
+
}, z.core.$strip>>;
|
|
228
238
|
}, z.core.$strip>, z.ZodObject<{
|
|
229
239
|
id: z.ZodString;
|
|
230
240
|
status: z.ZodEnum<{
|
package/dist/index.mjs
CHANGED
|
@@ -1544,7 +1544,8 @@ const deployEnvironmentContractV1 = oc.route({
|
|
|
1544
1544
|
BAD_REQUEST: {}
|
|
1545
1545
|
}).input(z.object({
|
|
1546
1546
|
environmentId: z.string().describe("The ID of the environment to deploy"),
|
|
1547
|
-
token: z.string().describe("The token to identify the source archive").optional()
|
|
1547
|
+
token: z.string().describe("The token to identify the source archive").optional(),
|
|
1548
|
+
settings: buildSettingsSchema.extend({ transport: transportSchema }).optional().describe("Project settings detected by the client from the source. When provided, the server skips downloading and extracting the source archive to detect them.")
|
|
1548
1549
|
})).output(deploymentSchema);
|
|
1549
1550
|
const uploadDeploymentArtifactContractV1 = oc.route({
|
|
1550
1551
|
path: "/v1/deployments/upload",
|
|
@@ -1581,6 +1582,21 @@ const getDeploymentContractV1 = oc.route({
|
|
|
1581
1582
|
tags: ["deployments"],
|
|
1582
1583
|
successDescription: "The deployment details"
|
|
1583
1584
|
}).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
|
|
1585
|
+
const logEntrySchema = z.object({
|
|
1586
|
+
timestamp: z.coerce.date(),
|
|
1587
|
+
type: z.enum([
|
|
1588
|
+
"START",
|
|
1589
|
+
"END",
|
|
1590
|
+
"INFO",
|
|
1591
|
+
"ERROR",
|
|
1592
|
+
"WARNING",
|
|
1593
|
+
"DEBUG"
|
|
1594
|
+
]),
|
|
1595
|
+
requestId: z.string(),
|
|
1596
|
+
content: z.string().optional(),
|
|
1597
|
+
method: z.string().optional(),
|
|
1598
|
+
durationInMs: z.number().optional()
|
|
1599
|
+
});
|
|
1584
1600
|
const getLogsContractV1 = oc.route({
|
|
1585
1601
|
path: "/v1/environments/{environmentId}/logs",
|
|
1586
1602
|
method: "GET",
|
|
@@ -1605,21 +1621,7 @@ const getLogsContractV1 = oc.route({
|
|
|
1605
1621
|
search: z.string().optional().describe("Filter pattern to search for in log content"),
|
|
1606
1622
|
nextToken: z.string().optional().describe("Pagination token from a previous response")
|
|
1607
1623
|
})).output(z.object({
|
|
1608
|
-
logs: z.array(
|
|
1609
|
-
timestamp: z.coerce.date(),
|
|
1610
|
-
type: z.enum([
|
|
1611
|
-
"START",
|
|
1612
|
-
"END",
|
|
1613
|
-
"INFO",
|
|
1614
|
-
"ERROR",
|
|
1615
|
-
"WARNING",
|
|
1616
|
-
"DEBUG"
|
|
1617
|
-
]),
|
|
1618
|
-
requestId: z.string(),
|
|
1619
|
-
content: z.string().optional(),
|
|
1620
|
-
method: z.string().optional(),
|
|
1621
|
-
durationInMs: z.number().optional()
|
|
1622
|
-
})),
|
|
1624
|
+
logs: z.array(logEntrySchema),
|
|
1623
1625
|
nextToken: z.string().nullable()
|
|
1624
1626
|
}));
|
|
1625
1627
|
const getLatestLogsContractV1 = oc.route({
|
|
@@ -1642,21 +1644,7 @@ const getLatestLogsContractV1 = oc.route({
|
|
|
1642
1644
|
"DEBUG"
|
|
1643
1645
|
])).optional().describe("Filter by log level"),
|
|
1644
1646
|
search: z.string().optional().describe("Filter pattern to search for in log content")
|
|
1645
|
-
})).output(z.object({ logs: z.array(
|
|
1646
|
-
timestamp: z.coerce.date(),
|
|
1647
|
-
type: z.enum([
|
|
1648
|
-
"START",
|
|
1649
|
-
"END",
|
|
1650
|
-
"INFO",
|
|
1651
|
-
"ERROR",
|
|
1652
|
-
"WARNING",
|
|
1653
|
-
"DEBUG"
|
|
1654
|
-
]),
|
|
1655
|
-
requestId: z.string(),
|
|
1656
|
-
content: z.string().optional(),
|
|
1657
|
-
method: z.string().optional(),
|
|
1658
|
-
durationInMs: z.number().optional()
|
|
1659
|
-
})) }));
|
|
1647
|
+
})).output(z.object({ logs: z.array(logEntrySchema) }));
|
|
1660
1648
|
const getDeploymentLogsContractV1 = oc.route({
|
|
1661
1649
|
path: "/v1/deployments/{deploymentId}/logs",
|
|
1662
1650
|
method: "GET",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-staging.
|
|
3
|
+
"version": "0.0.0-staging.gfab86f0",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"author": "Alpic",
|
|
34
34
|
"license": "ISC",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@orpc/contract": "^1.14.
|
|
36
|
+
"@orpc/contract": "^1.14.7",
|
|
37
37
|
"ms": "^2.1.3",
|
|
38
38
|
"zod": "^4.4.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@orpc/openapi": "^1.14.
|
|
42
|
-
"@orpc/zod": "^1.14.
|
|
41
|
+
"@orpc/openapi": "^1.14.7",
|
|
42
|
+
"@orpc/zod": "^1.14.7",
|
|
43
43
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
44
44
|
"@types/ms": "^2.1.0",
|
|
45
45
|
"shx": "^0.4.0",
|
|
46
|
-
"tsdown": "^0.22.
|
|
46
|
+
"tsdown": "^0.22.5",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
|
-
"vitest": "^4.1.
|
|
48
|
+
"vitest": "^4.1.10",
|
|
49
49
|
"@alpic-ai/domains": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
55
55
|
"test:unit": "vitest run",
|
|
56
56
|
"test:format": "biome check --error-on-warnings .",
|
|
57
|
-
"test:type": "
|
|
57
|
+
"test:type": "tsgo --noEmit",
|
|
58
58
|
"publish:npm": "pnpm publish --tag \"${NPM_TAG}\" --access public --no-git-checks"
|
|
59
59
|
}
|
|
60
60
|
}
|