@alpic-ai/api 0.0.0-dev.cf38065
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.ts +314 -0
- package/dist/index.js +310 -0
- package/dist/index.js.map +1 -0
- package/package.json +40 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import * as _orpc_contract from '@orpc/contract';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
type ApiContext = {
|
|
5
|
+
request: Request & {
|
|
6
|
+
teamId: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare const createEnvironmentContractV1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
10
|
+
projectId: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
sourceBranch: z.ZodString;
|
|
13
|
+
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
14
|
+
key: z.ZodString;
|
|
15
|
+
value: z.ZodString;
|
|
16
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
17
|
+
}, z.core.$strip>>>;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
22
|
+
urls: z.ZodArray<z.ZodString>;
|
|
23
|
+
createdAt: z.ZodDate;
|
|
24
|
+
projectId: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
26
|
+
NOT_FOUND: {};
|
|
27
|
+
BAD_REQUEST: {};
|
|
28
|
+
}>, Record<never, never>>;
|
|
29
|
+
declare const contract: {
|
|
30
|
+
deployments: {
|
|
31
|
+
get: {
|
|
32
|
+
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
33
|
+
deploymentId: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
status: z.ZodEnum<{
|
|
37
|
+
ongoing: "ongoing";
|
|
38
|
+
deployed: "deployed";
|
|
39
|
+
failed: "failed";
|
|
40
|
+
canceled: "canceled";
|
|
41
|
+
}>;
|
|
42
|
+
sourceRef: z.ZodNullable<z.ZodString>;
|
|
43
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
44
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
45
|
+
authorUsername: z.ZodNullable<z.ZodString>;
|
|
46
|
+
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
47
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
48
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
49
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
50
|
+
NOT_FOUND: {};
|
|
51
|
+
}>, Record<never, never>>;
|
|
52
|
+
};
|
|
53
|
+
uploadArtifact: {
|
|
54
|
+
v1: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodObject<{
|
|
55
|
+
uploadUrl: z.ZodString;
|
|
56
|
+
token: z.ZodString;
|
|
57
|
+
expiresAt: z.ZodDate;
|
|
58
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
environments: {
|
|
62
|
+
create: {
|
|
63
|
+
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
64
|
+
projectId: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
sourceBranch: z.ZodString;
|
|
67
|
+
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
|
+
key: z.ZodString;
|
|
69
|
+
value: z.ZodString;
|
|
70
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
76
|
+
urls: z.ZodArray<z.ZodString>;
|
|
77
|
+
createdAt: z.ZodDate;
|
|
78
|
+
projectId: z.ZodString;
|
|
79
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
80
|
+
NOT_FOUND: {};
|
|
81
|
+
BAD_REQUEST: {};
|
|
82
|
+
}>, Record<never, never>>;
|
|
83
|
+
};
|
|
84
|
+
get: {
|
|
85
|
+
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
86
|
+
environmentId: z.ZodString;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
91
|
+
mcpServerUrl: z.ZodString;
|
|
92
|
+
domains: z.ZodArray<z.ZodURL>;
|
|
93
|
+
createdAt: z.ZodDate;
|
|
94
|
+
projectId: z.ZodString;
|
|
95
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
96
|
+
NOT_FOUND: {};
|
|
97
|
+
}>, Record<never, never>>;
|
|
98
|
+
};
|
|
99
|
+
deploy: {
|
|
100
|
+
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
101
|
+
environmentId: z.ZodString;
|
|
102
|
+
token: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
status: z.ZodEnum<{
|
|
106
|
+
ongoing: "ongoing";
|
|
107
|
+
deployed: "deployed";
|
|
108
|
+
failed: "failed";
|
|
109
|
+
canceled: "canceled";
|
|
110
|
+
}>;
|
|
111
|
+
sourceRef: z.ZodNullable<z.ZodString>;
|
|
112
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
113
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
114
|
+
authorUsername: z.ZodNullable<z.ZodString>;
|
|
115
|
+
authorAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
116
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
117
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
118
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
119
|
+
NOT_FOUND: {};
|
|
120
|
+
BAD_REQUEST: {};
|
|
121
|
+
}>, Record<never, never>>;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
projects: {
|
|
125
|
+
get: {
|
|
126
|
+
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
127
|
+
projectId: z.ZodString;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
teamId: z.ZodString;
|
|
132
|
+
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
133
|
+
runtime: z.ZodEnum<{
|
|
134
|
+
"python3.13": "python3.13";
|
|
135
|
+
node22: "node22";
|
|
136
|
+
node24: "node24";
|
|
137
|
+
}>;
|
|
138
|
+
transport: z.ZodNullable<z.ZodEnum<{
|
|
139
|
+
stdio: "stdio";
|
|
140
|
+
sse: "sse";
|
|
141
|
+
streamablehttp: "streamablehttp";
|
|
142
|
+
}>>;
|
|
143
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
144
|
+
buildCommand: z.ZodNullable<z.ZodString>;
|
|
145
|
+
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
146
|
+
installCommand: z.ZodNullable<z.ZodString>;
|
|
147
|
+
startCommand: z.ZodNullable<z.ZodString>;
|
|
148
|
+
createdAt: z.ZodDate;
|
|
149
|
+
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
150
|
+
id: z.ZodString;
|
|
151
|
+
name: z.ZodString;
|
|
152
|
+
mcpServerUrl: z.ZodString;
|
|
153
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
status: z.ZodEnum<{
|
|
156
|
+
ongoing: "ongoing";
|
|
157
|
+
deployed: "deployed";
|
|
158
|
+
failed: "failed";
|
|
159
|
+
canceled: "canceled";
|
|
160
|
+
}>;
|
|
161
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
162
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
163
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
name: z.ZodString;
|
|
169
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
170
|
+
mcpServerUrl: z.ZodString;
|
|
171
|
+
createdAt: z.ZodDate;
|
|
172
|
+
projectId: z.ZodString;
|
|
173
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
status: z.ZodEnum<{
|
|
176
|
+
ongoing: "ongoing";
|
|
177
|
+
deployed: "deployed";
|
|
178
|
+
failed: "failed";
|
|
179
|
+
canceled: "canceled";
|
|
180
|
+
}>;
|
|
181
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
182
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
183
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
187
|
+
NOT_FOUND: {};
|
|
188
|
+
}>, Record<never, never>>;
|
|
189
|
+
};
|
|
190
|
+
list: {
|
|
191
|
+
v1: _orpc_contract.ContractProcedureBuilderWithOutput<_orpc_contract.Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
name: z.ZodString;
|
|
194
|
+
teamId: z.ZodString;
|
|
195
|
+
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
196
|
+
runtime: z.ZodEnum<{
|
|
197
|
+
"python3.13": "python3.13";
|
|
198
|
+
node22: "node22";
|
|
199
|
+
node24: "node24";
|
|
200
|
+
}>;
|
|
201
|
+
transport: z.ZodNullable<z.ZodEnum<{
|
|
202
|
+
stdio: "stdio";
|
|
203
|
+
sse: "sse";
|
|
204
|
+
streamablehttp: "streamablehttp";
|
|
205
|
+
}>>;
|
|
206
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
207
|
+
buildCommand: z.ZodNullable<z.ZodString>;
|
|
208
|
+
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
209
|
+
installCommand: z.ZodNullable<z.ZodString>;
|
|
210
|
+
startCommand: z.ZodNullable<z.ZodString>;
|
|
211
|
+
createdAt: z.ZodDate;
|
|
212
|
+
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
213
|
+
id: z.ZodString;
|
|
214
|
+
name: z.ZodString;
|
|
215
|
+
mcpServerUrl: z.ZodString;
|
|
216
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
status: z.ZodEnum<{
|
|
219
|
+
ongoing: "ongoing";
|
|
220
|
+
deployed: "deployed";
|
|
221
|
+
failed: "failed";
|
|
222
|
+
canceled: "canceled";
|
|
223
|
+
}>;
|
|
224
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
225
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
226
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
233
|
+
mcpServerUrl: z.ZodString;
|
|
234
|
+
createdAt: z.ZodDate;
|
|
235
|
+
projectId: z.ZodString;
|
|
236
|
+
latestDeployment: z.ZodNullable<z.ZodObject<{
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
status: z.ZodEnum<{
|
|
239
|
+
ongoing: "ongoing";
|
|
240
|
+
deployed: "deployed";
|
|
241
|
+
failed: "failed";
|
|
242
|
+
canceled: "canceled";
|
|
243
|
+
}>;
|
|
244
|
+
sourceCommitId: z.ZodNullable<z.ZodString>;
|
|
245
|
+
sourceCommitMessage: z.ZodNullable<z.ZodString>;
|
|
246
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
250
|
+
};
|
|
251
|
+
create: {
|
|
252
|
+
v1: _orpc_contract.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
253
|
+
name: z.ZodString;
|
|
254
|
+
sourceRepository: z.ZodOptional<z.ZodString>;
|
|
255
|
+
branchName: z.ZodOptional<z.ZodString>;
|
|
256
|
+
runtime: z.ZodEnum<{
|
|
257
|
+
"python3.13": "python3.13";
|
|
258
|
+
node22: "node22";
|
|
259
|
+
node24: "node24";
|
|
260
|
+
}>;
|
|
261
|
+
transport: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
stdio: "stdio";
|
|
263
|
+
sse: "sse";
|
|
264
|
+
streamablehttp: "streamablehttp";
|
|
265
|
+
}>>;
|
|
266
|
+
rootDirectory: z.ZodOptional<z.ZodString>;
|
|
267
|
+
settings: z.ZodDefault<z.ZodObject<{
|
|
268
|
+
installCommand: z.ZodOptional<z.ZodString>;
|
|
269
|
+
buildCommand: z.ZodOptional<z.ZodString>;
|
|
270
|
+
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
271
|
+
startCommand: z.ZodOptional<z.ZodString>;
|
|
272
|
+
}, z.core.$strip>>;
|
|
273
|
+
environmentVariables: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
274
|
+
key: z.ZodString;
|
|
275
|
+
value: z.ZodString;
|
|
276
|
+
isSecret: z.ZodDefault<z.ZodBoolean>;
|
|
277
|
+
}, z.core.$strip>>>;
|
|
278
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
+
id: z.ZodString;
|
|
280
|
+
name: z.ZodString;
|
|
281
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
282
|
+
id: z.ZodString;
|
|
283
|
+
name: z.ZodString;
|
|
284
|
+
}, z.core.$strip>>;
|
|
285
|
+
productionEnvironment: z.ZodNullable<z.ZodObject<{
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
name: z.ZodString;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
sourceRepository: z.ZodNullable<z.ZodString>;
|
|
290
|
+
runtime: z.ZodEnum<{
|
|
291
|
+
"python3.13": "python3.13";
|
|
292
|
+
node22: "node22";
|
|
293
|
+
node24: "node24";
|
|
294
|
+
}>;
|
|
295
|
+
transport: z.ZodNullable<z.ZodEnum<{
|
|
296
|
+
stdio: "stdio";
|
|
297
|
+
sse: "sse";
|
|
298
|
+
streamablehttp: "streamablehttp";
|
|
299
|
+
}>>;
|
|
300
|
+
rootDirectory: z.ZodNullable<z.ZodString>;
|
|
301
|
+
buildCommand: z.ZodNullable<z.ZodString>;
|
|
302
|
+
buildOutputDir: z.ZodNullable<z.ZodString>;
|
|
303
|
+
installCommand: z.ZodNullable<z.ZodString>;
|
|
304
|
+
startCommand: z.ZodNullable<z.ZodString>;
|
|
305
|
+
createdAt: z.ZodDate;
|
|
306
|
+
}, z.core.$strip>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
307
|
+
NOT_FOUND: {};
|
|
308
|
+
BAD_REQUEST: {};
|
|
309
|
+
}>, Record<never, never>>;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export { type ApiContext, contract, createEnvironmentContractV1 };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
// src/api.contract.ts
|
|
2
|
+
import { oc } from "@orpc/contract";
|
|
3
|
+
import { z as z2 } from "zod";
|
|
4
|
+
|
|
5
|
+
// ../shared/schemas.ts
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
var RESERVED_KEYS = [
|
|
8
|
+
// AWS Lambda reserved keys - https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime
|
|
9
|
+
"_HANDLER",
|
|
10
|
+
"_X_AMZN_TRACE_ID",
|
|
11
|
+
"AWS_DEFAULT_REGION",
|
|
12
|
+
"AWS_REGION",
|
|
13
|
+
"AWS_EXECUTION_ENV",
|
|
14
|
+
"AWS_LAMBDA_FUNCTION_NAME",
|
|
15
|
+
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE",
|
|
16
|
+
"AWS_LAMBDA_FUNCTION_VERSION",
|
|
17
|
+
"AWS_LAMBDA_INITIALIZATION_TYPE",
|
|
18
|
+
"AWS_LAMBDA_LOG_GROUP_NAME",
|
|
19
|
+
"AWS_ACCESS_KEY",
|
|
20
|
+
"AWS_LAMBDA_RUNTIME_API",
|
|
21
|
+
"LAMBDA_TASK_ROOT",
|
|
22
|
+
"LAMBDA_RUNTIME_DIR",
|
|
23
|
+
// Alpic reserved keys
|
|
24
|
+
"START_COMMAND",
|
|
25
|
+
"ENVIRONMENT_ID",
|
|
26
|
+
"PROJECT_BUILD_IMAGES_REPOSITORY_URI",
|
|
27
|
+
"ENVIRONMENT_LAMBDA_FUNCTION_ARN",
|
|
28
|
+
"SOURCE_REPOSITORY",
|
|
29
|
+
"SOURCE_BRANCH",
|
|
30
|
+
"SOURCE_REPOSITORY_CREDENTIALS",
|
|
31
|
+
"RUNTIME",
|
|
32
|
+
"ROOT_DIRECTORY",
|
|
33
|
+
"BUILD_ARG_INSTALL_COMMAND",
|
|
34
|
+
"BUILD_ARG_BUILD_COMMAND",
|
|
35
|
+
"BUILD_ARG_BUILD_OUTPUT_DIR",
|
|
36
|
+
"BUILD_ARG_START_COMMAND",
|
|
37
|
+
"ALPIC_HOST"
|
|
38
|
+
];
|
|
39
|
+
var environmentVariableSchema = z.object({
|
|
40
|
+
key: z.string().min(2, "Key must be at least 2 characters").regex(
|
|
41
|
+
/^[a-zA-Z]([a-zA-Z0-9_])+$/,
|
|
42
|
+
"Key must start with a letter and contain only letters, numbers, and underscores"
|
|
43
|
+
).refine(
|
|
44
|
+
(key) => !RESERVED_KEYS.includes(key),
|
|
45
|
+
"This key is reserved and cannot be used as an environment variable key"
|
|
46
|
+
),
|
|
47
|
+
value: z.string().min(1, "Value is required"),
|
|
48
|
+
isSecret: z.boolean().default(false)
|
|
49
|
+
});
|
|
50
|
+
var environmentVariablesSchema = z.array(environmentVariableSchema);
|
|
51
|
+
var buildSettingsSchema = z.object({
|
|
52
|
+
installCommand: z.string().optional(),
|
|
53
|
+
buildCommand: z.string().optional(),
|
|
54
|
+
buildOutputDir: z.string().optional(),
|
|
55
|
+
startCommand: z.string().optional()
|
|
56
|
+
});
|
|
57
|
+
var runtimeSchema = z.enum(["python3.13", "node22", "node24"]);
|
|
58
|
+
var transportSchema = z.enum(["stdio", "sse", "streamablehttp"]);
|
|
59
|
+
|
|
60
|
+
// src/api.contract.ts
|
|
61
|
+
var deploymentStatusSchema = z2.enum(["ongoing", "deployed", "failed", "canceled"]);
|
|
62
|
+
var latestDeploymentSchema = z2.object({
|
|
63
|
+
id: z2.string(),
|
|
64
|
+
status: deploymentStatusSchema,
|
|
65
|
+
sourceCommitId: z2.string().nullable(),
|
|
66
|
+
sourceCommitMessage: z2.string().nullable(),
|
|
67
|
+
completedAt: z2.date().nullable()
|
|
68
|
+
});
|
|
69
|
+
var deploymentSchema = z2.object({
|
|
70
|
+
id: z2.string(),
|
|
71
|
+
status: deploymentStatusSchema,
|
|
72
|
+
sourceRef: z2.string().nullable(),
|
|
73
|
+
sourceCommitId: z2.string().nullable(),
|
|
74
|
+
sourceCommitMessage: z2.string().nullable(),
|
|
75
|
+
authorUsername: z2.string().nullable(),
|
|
76
|
+
authorAvatarUrl: z2.string().nullable(),
|
|
77
|
+
startedAt: z2.date().nullable(),
|
|
78
|
+
completedAt: z2.date().nullable()
|
|
79
|
+
});
|
|
80
|
+
var createEnvironmentContractV1 = oc.route({
|
|
81
|
+
path: "/v1/environments",
|
|
82
|
+
method: "POST",
|
|
83
|
+
summary: "Create an environment",
|
|
84
|
+
description: "Create an environment for a project",
|
|
85
|
+
tags: ["environments"],
|
|
86
|
+
successDescription: "The environment has been created successfully"
|
|
87
|
+
}).errors({
|
|
88
|
+
NOT_FOUND: {},
|
|
89
|
+
BAD_REQUEST: {}
|
|
90
|
+
}).input(
|
|
91
|
+
z2.object({
|
|
92
|
+
projectId: z2.string().describe("The ID of the project to create the environment for"),
|
|
93
|
+
name: z2.string().min(1).describe("The name of the environment"),
|
|
94
|
+
sourceBranch: z2.string().min(1).describe("The branch used to build the environment"),
|
|
95
|
+
environmentVariables: environmentVariablesSchema.default([])
|
|
96
|
+
})
|
|
97
|
+
).output(
|
|
98
|
+
z2.object({
|
|
99
|
+
id: z2.string(),
|
|
100
|
+
name: z2.string(),
|
|
101
|
+
sourceBranch: z2.string().nullable().describe("The branch used to build the environment"),
|
|
102
|
+
urls: z2.array(z2.string().url()).describe("The URLs of the MCP server"),
|
|
103
|
+
createdAt: z2.date(),
|
|
104
|
+
projectId: z2.string().describe("The ID of the project the environment belongs to")
|
|
105
|
+
})
|
|
106
|
+
);
|
|
107
|
+
var getEnvironmentContractV1 = oc.route({
|
|
108
|
+
path: "/v1/environments/:environmentId",
|
|
109
|
+
method: "GET",
|
|
110
|
+
summary: "Get an environment",
|
|
111
|
+
description: "Get an environment by ID",
|
|
112
|
+
tags: ["environments"],
|
|
113
|
+
successDescription: "The environment details"
|
|
114
|
+
}).errors({
|
|
115
|
+
NOT_FOUND: {}
|
|
116
|
+
}).input(
|
|
117
|
+
z2.object({
|
|
118
|
+
environmentId: z2.string().describe("The ID of the environment")
|
|
119
|
+
})
|
|
120
|
+
).output(
|
|
121
|
+
z2.object({
|
|
122
|
+
id: z2.string(),
|
|
123
|
+
name: z2.string(),
|
|
124
|
+
sourceBranch: z2.string().nullable(),
|
|
125
|
+
mcpServerUrl: z2.string(),
|
|
126
|
+
domains: z2.array(z2.url()),
|
|
127
|
+
createdAt: z2.date(),
|
|
128
|
+
projectId: z2.string()
|
|
129
|
+
})
|
|
130
|
+
);
|
|
131
|
+
var productionEnvironmentSchema = z2.object({
|
|
132
|
+
id: z2.string(),
|
|
133
|
+
name: z2.string(),
|
|
134
|
+
mcpServerUrl: z2.string(),
|
|
135
|
+
latestDeployment: latestDeploymentSchema.nullable()
|
|
136
|
+
});
|
|
137
|
+
var environmentSchema = z2.object({
|
|
138
|
+
id: z2.string(),
|
|
139
|
+
name: z2.string(),
|
|
140
|
+
sourceBranch: z2.string().nullable(),
|
|
141
|
+
mcpServerUrl: z2.string(),
|
|
142
|
+
createdAt: z2.date(),
|
|
143
|
+
projectId: z2.string(),
|
|
144
|
+
latestDeployment: latestDeploymentSchema.nullable()
|
|
145
|
+
});
|
|
146
|
+
var projectOutputSchema = z2.object({
|
|
147
|
+
id: z2.string(),
|
|
148
|
+
name: z2.string(),
|
|
149
|
+
teamId: z2.string(),
|
|
150
|
+
sourceRepository: z2.string().nullable(),
|
|
151
|
+
runtime: runtimeSchema,
|
|
152
|
+
transport: transportSchema.nullable(),
|
|
153
|
+
rootDirectory: z2.string().nullable(),
|
|
154
|
+
buildCommand: z2.string().nullable(),
|
|
155
|
+
buildOutputDir: z2.string().nullable(),
|
|
156
|
+
installCommand: z2.string().nullable(),
|
|
157
|
+
startCommand: z2.string().nullable(),
|
|
158
|
+
createdAt: z2.date(),
|
|
159
|
+
productionEnvironment: productionEnvironmentSchema.nullable(),
|
|
160
|
+
environments: z2.array(environmentSchema)
|
|
161
|
+
});
|
|
162
|
+
var getProjectContractV1 = oc.route({
|
|
163
|
+
path: "/v1/projects/:projectId",
|
|
164
|
+
method: "GET",
|
|
165
|
+
summary: "Get a project",
|
|
166
|
+
description: "Get a project by ID",
|
|
167
|
+
tags: ["projects"],
|
|
168
|
+
successDescription: "The project details"
|
|
169
|
+
}).errors({
|
|
170
|
+
NOT_FOUND: {}
|
|
171
|
+
}).input(
|
|
172
|
+
z2.object({
|
|
173
|
+
projectId: z2.string().describe("The ID of the project")
|
|
174
|
+
})
|
|
175
|
+
).output(projectOutputSchema);
|
|
176
|
+
var listProjectsContractV1 = oc.route({
|
|
177
|
+
path: "/v1/projects",
|
|
178
|
+
method: "GET",
|
|
179
|
+
summary: "List projects",
|
|
180
|
+
description: "List all projects for a team",
|
|
181
|
+
tags: ["projects"],
|
|
182
|
+
successDescription: "The list of projects"
|
|
183
|
+
}).output(z2.array(projectOutputSchema));
|
|
184
|
+
var createProjectContractV1 = oc.route({
|
|
185
|
+
path: "/v1/projects",
|
|
186
|
+
method: "POST",
|
|
187
|
+
summary: "Create a project",
|
|
188
|
+
description: "Create a project for a team",
|
|
189
|
+
tags: ["projects"],
|
|
190
|
+
successDescription: "The project has been created successfully"
|
|
191
|
+
}).errors({
|
|
192
|
+
NOT_FOUND: {},
|
|
193
|
+
BAD_REQUEST: {}
|
|
194
|
+
}).input(
|
|
195
|
+
z2.object({
|
|
196
|
+
name: z2.string().min(1).max(100),
|
|
197
|
+
sourceRepository: z2.string().optional(),
|
|
198
|
+
branchName: z2.string().min(1).optional(),
|
|
199
|
+
runtime: runtimeSchema,
|
|
200
|
+
transport: transportSchema.optional(),
|
|
201
|
+
rootDirectory: z2.string().optional(),
|
|
202
|
+
settings: buildSettingsSchema.default({}),
|
|
203
|
+
environmentVariables: environmentVariablesSchema.default([])
|
|
204
|
+
})
|
|
205
|
+
).output(
|
|
206
|
+
z2.object({
|
|
207
|
+
id: z2.string(),
|
|
208
|
+
name: z2.string(),
|
|
209
|
+
environments: z2.array(
|
|
210
|
+
z2.object({
|
|
211
|
+
id: z2.string(),
|
|
212
|
+
name: z2.string()
|
|
213
|
+
})
|
|
214
|
+
),
|
|
215
|
+
productionEnvironment: z2.object({
|
|
216
|
+
id: z2.string(),
|
|
217
|
+
name: z2.string()
|
|
218
|
+
}).nullable(),
|
|
219
|
+
sourceRepository: z2.string().nullable(),
|
|
220
|
+
runtime: runtimeSchema,
|
|
221
|
+
transport: transportSchema.nullable(),
|
|
222
|
+
rootDirectory: z2.string().nullable(),
|
|
223
|
+
buildCommand: z2.string().nullable(),
|
|
224
|
+
buildOutputDir: z2.string().nullable(),
|
|
225
|
+
installCommand: z2.string().nullable(),
|
|
226
|
+
startCommand: z2.string().nullable(),
|
|
227
|
+
createdAt: z2.date()
|
|
228
|
+
})
|
|
229
|
+
);
|
|
230
|
+
var deployEnvironmentContractV1 = oc.route({
|
|
231
|
+
path: "/v1/environments/:environmentId/deploy",
|
|
232
|
+
method: "POST",
|
|
233
|
+
summary: "Deploy an environment",
|
|
234
|
+
description: "Deploy an environment",
|
|
235
|
+
tags: ["environments"],
|
|
236
|
+
successDescription: "The environment has been deployed successfully"
|
|
237
|
+
}).errors({
|
|
238
|
+
NOT_FOUND: {},
|
|
239
|
+
BAD_REQUEST: {}
|
|
240
|
+
}).input(
|
|
241
|
+
z2.object({
|
|
242
|
+
environmentId: z2.string().describe("The ID of the environment to deploy"),
|
|
243
|
+
token: z2.string().describe("The token to identify the source archive").optional()
|
|
244
|
+
})
|
|
245
|
+
).output(deploymentSchema);
|
|
246
|
+
var uploadDeploymentArtifactContractV1 = oc.route({
|
|
247
|
+
path: "/v1/deployments/upload",
|
|
248
|
+
method: "POST",
|
|
249
|
+
summary: "Upload deployment artifacts",
|
|
250
|
+
description: "Return a presigned S3 URL to upload a deployment artifact",
|
|
251
|
+
tags: ["deployments"],
|
|
252
|
+
successDescription: "The presigned upload URL has been generated successfully"
|
|
253
|
+
}).output(
|
|
254
|
+
z2.object({
|
|
255
|
+
uploadUrl: z2.string().url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
|
|
256
|
+
token: z2.string().describe("Token to identify the source archive"),
|
|
257
|
+
expiresAt: z2.date().describe("Expiration date of the presigned URL")
|
|
258
|
+
})
|
|
259
|
+
);
|
|
260
|
+
var getDeploymentContractV1 = oc.route({
|
|
261
|
+
path: "/v1/deployments/:deploymentId",
|
|
262
|
+
method: "GET",
|
|
263
|
+
summary: "Get a deployment",
|
|
264
|
+
description: "Get a deployment by ID",
|
|
265
|
+
tags: ["deployments"],
|
|
266
|
+
successDescription: "The deployment details"
|
|
267
|
+
}).errors({
|
|
268
|
+
NOT_FOUND: {}
|
|
269
|
+
}).input(
|
|
270
|
+
z2.object({
|
|
271
|
+
deploymentId: z2.string().describe("The ID of the deployment")
|
|
272
|
+
})
|
|
273
|
+
).output(deploymentSchema);
|
|
274
|
+
var contract = {
|
|
275
|
+
deployments: {
|
|
276
|
+
get: {
|
|
277
|
+
v1: getDeploymentContractV1
|
|
278
|
+
},
|
|
279
|
+
uploadArtifact: {
|
|
280
|
+
v1: uploadDeploymentArtifactContractV1
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
environments: {
|
|
284
|
+
create: {
|
|
285
|
+
v1: createEnvironmentContractV1
|
|
286
|
+
},
|
|
287
|
+
get: {
|
|
288
|
+
v1: getEnvironmentContractV1
|
|
289
|
+
},
|
|
290
|
+
deploy: {
|
|
291
|
+
v1: deployEnvironmentContractV1
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
projects: {
|
|
295
|
+
get: {
|
|
296
|
+
v1: getProjectContractV1
|
|
297
|
+
},
|
|
298
|
+
list: {
|
|
299
|
+
v1: listProjectsContractV1
|
|
300
|
+
},
|
|
301
|
+
create: {
|
|
302
|
+
v1: createProjectContractV1
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
export {
|
|
307
|
+
contract,
|
|
308
|
+
createEnvironmentContractV1
|
|
309
|
+
};
|
|
310
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api.contract.ts","../../shared/schemas.ts"],"sourcesContent":["import { oc } from \"@orpc/contract\";\nimport { z } from \"zod\";\n\nimport {\n buildSettingsSchema,\n environmentVariablesSchema,\n runtimeSchema,\n transportSchema,\n} from \"@alpic-ai/shared/schemas.js\";\n\nexport type ApiContext = {\n request: Request & { teamId: string };\n};\n\nconst deploymentStatusSchema = z.enum([\"ongoing\", \"deployed\", \"failed\", \"canceled\"]);\n\nconst latestDeploymentSchema = z.object({\n id: z.string(),\n status: deploymentStatusSchema,\n sourceCommitId: z.string().nullable(),\n sourceCommitMessage: z.string().nullable(),\n completedAt: z.date().nullable(),\n});\n\nconst deploymentSchema = z.object({\n id: z.string(),\n status: deploymentStatusSchema,\n sourceRef: z.string().nullable(),\n sourceCommitId: z.string().nullable(),\n sourceCommitMessage: z.string().nullable(),\n authorUsername: z.string().nullable(),\n authorAvatarUrl: z.string().nullable(),\n startedAt: z.date().nullable(),\n completedAt: z.date().nullable(),\n});\n\nexport const createEnvironmentContractV1 = oc\n .route({\n path: \"/v1/environments\",\n method: \"POST\",\n summary: \"Create an environment\",\n description: \"Create an environment for a project\",\n tags: [\"environments\"],\n successDescription: \"The environment has been created successfully\",\n })\n .errors({\n NOT_FOUND: {},\n BAD_REQUEST: {},\n })\n .input(\n z.object({\n projectId: z.string().describe(\"The ID of the project to create the environment for\"),\n name: z.string().min(1).describe(\"The name of the environment\"),\n sourceBranch: z.string().min(1).describe(\"The branch used to build the environment\"),\n environmentVariables: environmentVariablesSchema.default([]),\n }),\n )\n .output(\n z.object({\n id: z.string(),\n name: z.string(),\n sourceBranch: z.string().nullable().describe(\"The branch used to build the environment\"),\n urls: z.array(z.string().url()).describe(\"The URLs of the MCP server\"),\n createdAt: z.date(),\n projectId: z.string().describe(\"The ID of the project the environment belongs to\"),\n }),\n );\n\nconst getEnvironmentContractV1 = oc\n .route({\n path: \"/v1/environments/:environmentId\",\n method: \"GET\",\n summary: \"Get an environment\",\n description: \"Get an environment by ID\",\n tags: [\"environments\"],\n successDescription: \"The environment details\",\n })\n .errors({\n NOT_FOUND: {},\n })\n .input(\n z.object({\n environmentId: z.string().describe(\"The ID of the environment\"),\n }),\n )\n .output(\n z.object({\n id: z.string(),\n name: z.string(),\n sourceBranch: z.string().nullable(),\n mcpServerUrl: z.string(),\n domains: z.array(z.url()),\n createdAt: z.date(),\n projectId: z.string(),\n }),\n );\n\nconst productionEnvironmentSchema = z.object({\n id: z.string(),\n name: z.string(),\n mcpServerUrl: z.string(),\n latestDeployment: latestDeploymentSchema.nullable(),\n});\n\nconst environmentSchema = z.object({\n id: z.string(),\n name: z.string(),\n sourceBranch: z.string().nullable(),\n mcpServerUrl: z.string(),\n createdAt: z.date(),\n projectId: z.string(),\n latestDeployment: latestDeploymentSchema.nullable(),\n});\n\nconst projectOutputSchema = z.object({\n id: z.string(),\n name: z.string(),\n teamId: z.string(),\n sourceRepository: z.string().nullable(),\n runtime: runtimeSchema,\n transport: transportSchema.nullable(),\n rootDirectory: z.string().nullable(),\n buildCommand: z.string().nullable(),\n buildOutputDir: z.string().nullable(),\n installCommand: z.string().nullable(),\n startCommand: z.string().nullable(),\n createdAt: z.date(),\n productionEnvironment: productionEnvironmentSchema.nullable(),\n environments: z.array(environmentSchema),\n});\n\nconst getProjectContractV1 = oc\n .route({\n path: \"/v1/projects/:projectId\",\n method: \"GET\",\n summary: \"Get a project\",\n description: \"Get a project by ID\",\n tags: [\"projects\"],\n successDescription: \"The project details\",\n })\n .errors({\n NOT_FOUND: {},\n })\n .input(\n z.object({\n projectId: z.string().describe(\"The ID of the project\"),\n }),\n )\n .output(projectOutputSchema);\n\nconst listProjectsContractV1 = oc\n .route({\n path: \"/v1/projects\",\n method: \"GET\",\n summary: \"List projects\",\n description: \"List all projects for a team\",\n tags: [\"projects\"],\n successDescription: \"The list of projects\",\n })\n .output(z.array(projectOutputSchema));\n\nconst createProjectContractV1 = oc\n .route({\n path: \"/v1/projects\",\n method: \"POST\",\n summary: \"Create a project\",\n description: \"Create a project for a team\",\n tags: [\"projects\"],\n successDescription: \"The project has been created successfully\",\n })\n .errors({\n NOT_FOUND: {},\n BAD_REQUEST: {},\n })\n .input(\n z.object({\n name: z.string().min(1).max(100),\n sourceRepository: z.string().optional(),\n branchName: z.string().min(1).optional(),\n runtime: runtimeSchema,\n transport: transportSchema.optional(),\n rootDirectory: z.string().optional(),\n settings: buildSettingsSchema.default({}),\n environmentVariables: environmentVariablesSchema.default([]),\n }),\n )\n .output(\n z.object({\n id: z.string(),\n name: z.string(),\n environments: z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n }),\n ),\n productionEnvironment: z\n .object({\n id: z.string(),\n name: z.string(),\n })\n .nullable(),\n sourceRepository: z.string().nullable(),\n runtime: runtimeSchema,\n transport: transportSchema.nullable(),\n rootDirectory: z.string().nullable(),\n buildCommand: z.string().nullable(),\n buildOutputDir: z.string().nullable(),\n installCommand: z.string().nullable(),\n startCommand: z.string().nullable(),\n createdAt: z.date(),\n }),\n );\n\nconst deployEnvironmentContractV1 = oc\n .route({\n path: \"/v1/environments/:environmentId/deploy\",\n method: \"POST\",\n summary: \"Deploy an environment\",\n description: \"Deploy an environment\",\n tags: [\"environments\"],\n successDescription: \"The environment has been deployed successfully\",\n })\n .errors({\n NOT_FOUND: {},\n BAD_REQUEST: {},\n })\n .input(\n z.object({\n environmentId: z.string().describe(\"The ID of the environment to deploy\"),\n token: z.string().describe(\"The token to identify the source archive\").optional(),\n }),\n )\n .output(deploymentSchema);\n\nconst uploadDeploymentArtifactContractV1 = oc\n .route({\n path: \"/v1/deployments/upload\",\n method: \"POST\",\n summary: \"Upload deployment artifacts\",\n description: \"Return a presigned S3 URL to upload a deployment artifact\",\n tags: [\"deployments\"],\n successDescription: \"The presigned upload URL has been generated successfully\",\n })\n .output(\n z.object({\n uploadUrl: z.string().url().describe(\"Presigned S3 URL to upload the source archive with HTTP PUT\"),\n token: z.string().describe(\"Token to identify the source archive\"),\n expiresAt: z.date().describe(\"Expiration date of the presigned URL\"),\n }),\n );\n\nconst getDeploymentContractV1 = oc\n .route({\n path: \"/v1/deployments/:deploymentId\",\n method: \"GET\",\n summary: \"Get a deployment\",\n description: \"Get a deployment by ID\",\n tags: [\"deployments\"],\n successDescription: \"The deployment details\",\n })\n .errors({\n NOT_FOUND: {},\n })\n .input(\n z.object({\n deploymentId: z.string().describe(\"The ID of the deployment\"),\n }),\n )\n .output(deploymentSchema);\n\nexport const contract = {\n deployments: {\n get: {\n v1: getDeploymentContractV1,\n },\n uploadArtifact: {\n v1: uploadDeploymentArtifactContractV1,\n },\n },\n environments: {\n create: {\n v1: createEnvironmentContractV1,\n },\n get: {\n v1: getEnvironmentContractV1,\n },\n deploy: {\n v1: deployEnvironmentContractV1,\n },\n },\n projects: {\n get: {\n v1: getProjectContractV1,\n },\n list: {\n v1: listProjectsContractV1,\n },\n create: {\n v1: createProjectContractV1,\n },\n },\n};\n","import { z } from \"zod\";\n\nconst RESERVED_KEYS = [\n // AWS Lambda reserved keys - https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime\n \"_HANDLER\",\n \"_X_AMZN_TRACE_ID\",\n \"AWS_DEFAULT_REGION\",\n \"AWS_REGION\",\n \"AWS_EXECUTION_ENV\",\n \"AWS_LAMBDA_FUNCTION_NAME\",\n \"AWS_LAMBDA_FUNCTION_MEMORY_SIZE\",\n \"AWS_LAMBDA_FUNCTION_VERSION\",\n \"AWS_LAMBDA_INITIALIZATION_TYPE\",\n \"AWS_LAMBDA_LOG_GROUP_NAME\",\n \"AWS_ACCESS_KEY\",\n \"AWS_LAMBDA_RUNTIME_API\",\n \"LAMBDA_TASK_ROOT\",\n \"LAMBDA_RUNTIME_DIR\",\n // Alpic reserved keys\n \"START_COMMAND\",\n \"ENVIRONMENT_ID\",\n \"PROJECT_BUILD_IMAGES_REPOSITORY_URI\",\n \"ENVIRONMENT_LAMBDA_FUNCTION_ARN\",\n \"SOURCE_REPOSITORY\",\n \"SOURCE_BRANCH\",\n \"SOURCE_REPOSITORY_CREDENTIALS\",\n \"RUNTIME\",\n \"ROOT_DIRECTORY\",\n \"BUILD_ARG_INSTALL_COMMAND\",\n \"BUILD_ARG_BUILD_COMMAND\",\n \"BUILD_ARG_BUILD_OUTPUT_DIR\",\n \"BUILD_ARG_START_COMMAND\",\n \"ALPIC_HOST\",\n];\n\nexport const environmentVariableSchema = z.object({\n key: z\n .string()\n .min(2, \"Key must be at least 2 characters\")\n .regex(\n /^[a-zA-Z]([a-zA-Z0-9_])+$/,\n \"Key must start with a letter and contain only letters, numbers, and underscores\",\n )\n .refine(\n (key) => !RESERVED_KEYS.includes(key),\n \"This key is reserved and cannot be used as an environment variable key\",\n ),\n value: z.string().min(1, \"Value is required\"),\n isSecret: z.boolean().default(false),\n});\n\nexport const environmentVariablesSchema = z.array(environmentVariableSchema);\n\nexport const buildSettingsSchema = z.object({\n installCommand: z.string().optional(),\n buildCommand: z.string().optional(),\n buildOutputDir: z.string().optional(),\n startCommand: z.string().optional(),\n});\n\nexport const runtimeSchema = z.enum([\"python3.13\", \"node22\", \"node24\"]);\n\nexport type Runtime = z.infer<typeof runtimeSchema>;\n\nexport const transportSchema = z.enum([\"stdio\", \"sse\", \"streamablehttp\"]);\n\nexport type Transport = z.infer<typeof transportSchema>;\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,KAAAA,UAAS;;;ACDlB,SAAS,SAAS;AAElB,IAAM,gBAAgB;AAAA;AAAA,EAEpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,KAAK;AAAA,MACH,IAAI;AAAA,IACN;AAAA,IACA,MAAM;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,QAAQ;AAAA,MACN,IAAI;AAAA,IACN;AAAA,EACF;AACF;","names":["z","z"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alpic-ai/api",
|
|
3
|
+
"version": "0.0.0-dev.cf38065",
|
|
4
|
+
"description": "Contract for the Alpic API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"author": "Alpic",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@orpc/contract": "^1.13.4",
|
|
21
|
+
"zod": "^4.3.6",
|
|
22
|
+
"@alpic-ai/shared": "0.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@total-typescript/tsconfig": "^1.0.4",
|
|
26
|
+
"biome": "^0.3.3",
|
|
27
|
+
"shx": "^0.4.0",
|
|
28
|
+
"tsup": "^8.5.0",
|
|
29
|
+
"typescript": "^5.9.3",
|
|
30
|
+
"vitest": "^4.0.18"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "shx rm -rf dist && tsup",
|
|
34
|
+
"format": "biome check --write --error-on-warnings",
|
|
35
|
+
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
36
|
+
"test:unit": "vitest run",
|
|
37
|
+
"test:format": "prettier --check .",
|
|
38
|
+
"test:type": "tsc --noEmit"
|
|
39
|
+
}
|
|
40
|
+
}
|