@alpic-ai/api 0.0.0-dev.gdd3ad6d → 0.0.0-dev.gdd6b1fa
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 +12 -1
- package/dist/index.mjs +139 -53
- package/package.json +23 -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<{
|
|
@@ -247,6 +257,7 @@ declare const contract: {
|
|
|
247
257
|
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
248
258
|
NOT_FOUND: {};
|
|
249
259
|
BAD_REQUEST: {};
|
|
260
|
+
CONFLICT: {};
|
|
250
261
|
}>, Record<never, never>>;
|
|
251
262
|
};
|
|
252
263
|
getLogs: {
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import * as z$1 from "zod/v4";
|
|
3
3
|
import { oc } from "@orpc/contract";
|
|
4
4
|
import ms from "ms";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
5
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
6
6
|
/**
|
|
7
7
|
* Reusable URL validation that disallows javascript: scheme
|
|
8
8
|
*/
|
|
@@ -169,11 +169,21 @@ z$1.object({
|
|
|
169
169
|
token: z$1.string(),
|
|
170
170
|
token_type_hint: z$1.string().optional()
|
|
171
171
|
}).strip();
|
|
172
|
-
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region ../domains/dist/index.mjs
|
|
174
|
+
const AI_PLATFORMS = ["chatgpt", "claudeai"];
|
|
175
|
+
const platformSchema = z.enum(AI_PLATFORMS);
|
|
173
176
|
const PLATFORM_LABELS = {
|
|
174
177
|
chatgpt: "ChatGPT",
|
|
175
178
|
claudeai: "Claude.ai"
|
|
176
179
|
};
|
|
180
|
+
const WAF_PLATFORMS = [
|
|
181
|
+
"akamai",
|
|
182
|
+
"cloudflare",
|
|
183
|
+
"fastly"
|
|
184
|
+
];
|
|
185
|
+
const ALLOWED_PLATFORMS = [...AI_PLATFORMS, ...WAF_PLATFORMS];
|
|
186
|
+
const allowedPlatformSchema = z.enum(ALLOWED_PLATFORMS);
|
|
177
187
|
const auditStatusSchema = z.enum([
|
|
178
188
|
"pending",
|
|
179
189
|
"partial",
|
|
@@ -276,11 +286,11 @@ const deploymentSummarySchema = z.object({
|
|
|
276
286
|
/**
|
|
277
287
|
* Public environment
|
|
278
288
|
*
|
|
279
|
-
*
|
|
289
|
+
* Answers anonymously and exposes no OAuth metadata.
|
|
280
290
|
*/
|
|
281
291
|
const publicEnvironmentSchema = z.object({
|
|
282
|
-
|
|
283
|
-
oAuthMetadata: z.
|
|
292
|
+
allowsAnonymous: z.literal(true),
|
|
293
|
+
oAuthMetadata: z.strictObject({})
|
|
284
294
|
});
|
|
285
295
|
/**
|
|
286
296
|
* Protected environment with an external resource metadata URL
|
|
@@ -289,7 +299,7 @@ const publicEnvironmentSchema = z.object({
|
|
|
289
299
|
* Everything that follows is handled outside of the MCP server scope.
|
|
290
300
|
*/
|
|
291
301
|
const externalResourceMetadataEnvironmentSchema = z.object({
|
|
292
|
-
|
|
302
|
+
allowsAnonymous: z.boolean(),
|
|
293
303
|
oAuthMetadata: z.object({ externalResourceMetadataUrl: z.url() }),
|
|
294
304
|
scope: z.string().optional()
|
|
295
305
|
});
|
|
@@ -301,7 +311,7 @@ const externalResourceMetadataEnvironmentSchema = z.object({
|
|
|
301
311
|
* Everything that follows is handled outside of the MCP server scope.
|
|
302
312
|
*/
|
|
303
313
|
const externalAuthorizationServerEnvironmentSchema = z.object({
|
|
304
|
-
|
|
314
|
+
allowsAnonymous: z.boolean(),
|
|
305
315
|
oAuthMetadata: z.object({
|
|
306
316
|
externalAuthorizationServerUrl: z.url(),
|
|
307
317
|
resourceMetadata: OAuthProtectedResourceMetadataSchema.optional()
|
|
@@ -315,7 +325,7 @@ const externalAuthorizationServerEnvironmentSchema = z.object({
|
|
|
315
325
|
* The server itself exposes the /.well-known/oauth-authorization-server endpoint.
|
|
316
326
|
*/
|
|
317
327
|
const standaloneEnvironmentSchema = z.object({
|
|
318
|
-
|
|
328
|
+
allowsAnonymous: z.boolean(),
|
|
319
329
|
oAuthMetadata: z.object({
|
|
320
330
|
authorizationServerMetadata: z.union([OAuthMetadataSchema, OpenIdProviderDiscoveryMetadataSchema]),
|
|
321
331
|
resourceMetadata: OAuthProtectedResourceMetadataSchema.optional()
|
|
@@ -330,6 +340,36 @@ const standaloneEnvironmentSchema = z.object({
|
|
|
330
340
|
* are advertised. Clients must obtain credentials out-of-band.
|
|
331
341
|
*/
|
|
332
342
|
const protectedWithoutDiscoveryEnvironmentSchema = z.object({
|
|
343
|
+
allowsAnonymous: z.literal(false),
|
|
344
|
+
oAuthMetadata: z.strictObject({}),
|
|
345
|
+
scope: z.string().optional()
|
|
346
|
+
});
|
|
347
|
+
const legacyPublicEnvironmentSchema = z.object({
|
|
348
|
+
isPublic: z.literal(true),
|
|
349
|
+
oAuthMetadata: z.undefined().optional()
|
|
350
|
+
});
|
|
351
|
+
const legacyExternalResourceMetadataEnvironmentSchema = z.object({
|
|
352
|
+
isPublic: z.literal(false),
|
|
353
|
+
oAuthMetadata: z.object({ externalResourceMetadataUrl: z.url() }),
|
|
354
|
+
scope: z.string().optional()
|
|
355
|
+
});
|
|
356
|
+
const legacyExternalAuthorizationServerEnvironmentSchema = z.object({
|
|
357
|
+
isPublic: z.literal(false),
|
|
358
|
+
oAuthMetadata: z.object({
|
|
359
|
+
externalAuthorizationServerUrl: z.url(),
|
|
360
|
+
resourceMetadata: OAuthProtectedResourceMetadataSchema.optional()
|
|
361
|
+
}),
|
|
362
|
+
scope: z.string().optional()
|
|
363
|
+
});
|
|
364
|
+
const legacyStandaloneEnvironmentSchema = z.object({
|
|
365
|
+
isPublic: z.literal(false),
|
|
366
|
+
oAuthMetadata: z.object({
|
|
367
|
+
authorizationServerMetadata: z.union([OAuthMetadataSchema, OpenIdProviderDiscoveryMetadataSchema]),
|
|
368
|
+
resourceMetadata: OAuthProtectedResourceMetadataSchema.optional()
|
|
369
|
+
}),
|
|
370
|
+
scope: z.string().optional()
|
|
371
|
+
});
|
|
372
|
+
const legacyProtectedWithoutDiscoveryEnvironmentSchema = z.object({
|
|
333
373
|
isPublic: z.literal(false),
|
|
334
374
|
oAuthMetadata: z.strictObject({}),
|
|
335
375
|
scope: z.string().optional()
|
|
@@ -339,11 +379,21 @@ z.union([
|
|
|
339
379
|
externalResourceMetadataEnvironmentSchema,
|
|
340
380
|
externalAuthorizationServerEnvironmentSchema,
|
|
341
381
|
standaloneEnvironmentSchema,
|
|
342
|
-
protectedWithoutDiscoveryEnvironmentSchema
|
|
382
|
+
protectedWithoutDiscoveryEnvironmentSchema,
|
|
383
|
+
legacyPublicEnvironmentSchema,
|
|
384
|
+
legacyExternalResourceMetadataEnvironmentSchema,
|
|
385
|
+
legacyExternalAuthorizationServerEnvironmentSchema,
|
|
386
|
+
legacyStandaloneEnvironmentSchema,
|
|
387
|
+
legacyProtectedWithoutDiscoveryEnvironmentSchema
|
|
388
|
+
]);
|
|
389
|
+
const playgroundModelSchema = z.enum([
|
|
390
|
+
"global.anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
391
|
+
"global.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
392
|
+
"openai.gpt-5.4",
|
|
393
|
+
"openai.gpt-5.5"
|
|
343
394
|
]);
|
|
344
|
-
const allowedPlatformSchema = platformSchema;
|
|
345
395
|
const environmentDomainSchema = z.object({
|
|
346
|
-
|
|
396
|
+
name: z.string(),
|
|
347
397
|
status: z.enum([
|
|
348
398
|
"ongoing",
|
|
349
399
|
"deployed",
|
|
@@ -361,6 +411,7 @@ const environmentSchema$1 = z.object({
|
|
|
361
411
|
latestDeployment: deploymentSummarySchema.optional(),
|
|
362
412
|
openaiAppsChallenge: z.string().nullable().optional(),
|
|
363
413
|
isPlaygroundEnabled: z.boolean(),
|
|
414
|
+
playgroundModel: playgroundModelSchema,
|
|
364
415
|
isIpWhitelistEnabled: z.boolean(),
|
|
365
416
|
ipAllowlist: z.array(z.string()).nullable(),
|
|
366
417
|
allowedPlatforms: z.array(allowedPlatformSchema),
|
|
@@ -373,7 +424,9 @@ z.object({
|
|
|
373
424
|
sessionReplayEnabled: z.boolean(),
|
|
374
425
|
collectRequestPayload: z.boolean(),
|
|
375
426
|
collectResponsePayload: z.boolean(),
|
|
376
|
-
collectErrorMessage: z.boolean()
|
|
427
|
+
collectErrorMessage: z.boolean(),
|
|
428
|
+
collectUserData: z.boolean(),
|
|
429
|
+
identityTraitKey: z.string().min(1).max(200).nullable()
|
|
377
430
|
});
|
|
378
431
|
z.object({
|
|
379
432
|
id: z.string(),
|
|
@@ -508,15 +561,27 @@ z.object({
|
|
|
508
561
|
environments: z.array(environmentWithDomainsSchema),
|
|
509
562
|
productionEnvironment: environmentWithDomainsSchema.nullable()
|
|
510
563
|
});
|
|
564
|
+
const domainFailureReasonSchema = z.enum([
|
|
565
|
+
"caa",
|
|
566
|
+
"dns",
|
|
567
|
+
"invalid_domain",
|
|
568
|
+
"other"
|
|
569
|
+
]);
|
|
570
|
+
const projectDomainMappingSchema = z.object({
|
|
571
|
+
pathPrefix: z.string(),
|
|
572
|
+
environment: environmentSchema$1
|
|
573
|
+
});
|
|
511
574
|
z.object({
|
|
512
|
-
|
|
575
|
+
name: z.string(),
|
|
513
576
|
createdAt: z.coerce.date(),
|
|
514
577
|
status: z.enum([
|
|
515
578
|
"ongoing",
|
|
516
579
|
"deployed",
|
|
517
580
|
"failed"
|
|
518
581
|
]),
|
|
519
|
-
|
|
582
|
+
failureReason: domainFailureReasonSchema.nullable(),
|
|
583
|
+
environment: environmentSchema$1,
|
|
584
|
+
mappings: z.array(projectDomainMappingSchema)
|
|
520
585
|
});
|
|
521
586
|
const serverFieldsSchema$1 = z.object({
|
|
522
587
|
$schema: z.string(),
|
|
@@ -580,8 +645,9 @@ const positiveTestCaseSchema = z.object({
|
|
|
580
645
|
}).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
|
|
581
646
|
const screenshotEntrySchema = z.object({
|
|
582
647
|
prompt: z.string(),
|
|
583
|
-
url: z.url()
|
|
648
|
+
url: z.url()
|
|
584
649
|
}).describe("Each screenshot: the user prompt that produced it + the image URL.");
|
|
650
|
+
const screenshotDraftEntrySchema = screenshotEntrySchema.extend({ url: z.string() });
|
|
585
651
|
/** Accepts either a valid email or URL. */
|
|
586
652
|
const supportChannelSchema = z.string().refine((value) => z.email().safeParse(value).success || z.url().safeParse(value).success, { error: "Must be a valid email or URL" });
|
|
587
653
|
/** A URL field whose error spells out that the scheme is required. */
|
|
@@ -940,6 +1006,17 @@ const chatgptSubmissionFormDataSchema = z.object({
|
|
|
940
1006
|
allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
|
|
941
1007
|
releaseNotes: z.string().describe("Publicly displayed on the app details page.")
|
|
942
1008
|
});
|
|
1009
|
+
const chatgptSubmissionDraftSchema = chatgptSubmissionFormDataSchema.partial().extend({
|
|
1010
|
+
tagline: z.string().optional(),
|
|
1011
|
+
companyUrl: z.string().optional(),
|
|
1012
|
+
supportChannel: z.string().optional(),
|
|
1013
|
+
privacyPolicyUrl: z.string().optional(),
|
|
1014
|
+
termsOfServiceUrl: z.string().optional(),
|
|
1015
|
+
demoRecordingUrl: z.string().optional(),
|
|
1016
|
+
serverUrl: z.string().optional(),
|
|
1017
|
+
screenshots: z.array(screenshotDraftEntrySchema).optional(),
|
|
1018
|
+
translations: z.array(chatgptTranslationSchema.extend({ tagline: z.string() })).optional()
|
|
1019
|
+
});
|
|
943
1020
|
chatgptSubmissionFormDataSchema.pick({
|
|
944
1021
|
appName: true,
|
|
945
1022
|
developerName: true,
|
|
@@ -1018,8 +1095,8 @@ phrases like 'The best MCP server for...'. Example: 'Manage tasks and projects i
|
|
|
1018
1095
|
description: z.string().max(2e3).describe(`A description of what your connector does and its key features, shown on the connector's detail page in
|
|
1019
1096
|
claude.ai. Write it from a user perspective and be specific. Max 2000 characters.`),
|
|
1020
1097
|
categories: z.array(claudeCategorySchema).max(5).describe(claudeCategoryDescription),
|
|
1021
|
-
iconUrl: z.url().optional().describe(`Optional custom icon
|
|
1022
|
-
|
|
1098
|
+
iconUrl: z.url().optional().describe(`Optional custom icon for the directory listing — a square SVG. By default the favicon from your MCP URL is used
|
|
1099
|
+
(recommended); upload a custom icon only to override it.`),
|
|
1023
1100
|
documentation: z.url().describe(`A public URL pointing to documentation that helps users understand and use your connector. Must be publicly
|
|
1024
1101
|
accessible without login. IT admins often review these when deciding whether to approve a server. Required to be live
|
|
1025
1102
|
by your publish date.`),
|
|
@@ -1027,6 +1104,8 @@ by your publish date.`),
|
|
|
1027
1104
|
used to notify you of security or compliance issues, so make sure it's actively monitored.`),
|
|
1028
1105
|
privacyPolicy: z.url().describe(`URL to your privacy policy. Mandatory and displayed in the directory listing. Must be publicly accessible and cover
|
|
1029
1106
|
what data you collect, how you use and store it, and whether you share it with third parties.`),
|
|
1107
|
+
screenshots: z.array(screenshotEntrySchema).optional().describe(`Carousel images shown on your connector's directory page (PNG). Each is paired with the user prompt that produced
|
|
1108
|
+
it. This is editable on the directory page only after the connector is submitted — optional here so you can prepare it.`),
|
|
1030
1109
|
primaryUseCases: z.string().describe(`Describe the main tasks users will accomplish with this connector, and include a few example prompts a user might
|
|
1031
1110
|
type. These may be shown publicly but are primarily used for internal review — reviewers test your server using them.`),
|
|
1032
1111
|
connectionRequirements: z.string().describe(`What accounts, permissions, or setup a user needs before connecting (e.g. 'Requires a paid Acme account with admin
|
|
@@ -1064,6 +1143,21 @@ fully populated account.`),
|
|
|
1064
1143
|
submission. Each is an attestation you are legally agreeing to by submitting.`),
|
|
1065
1144
|
additionalNotes: z.string().optional().describe("Anything else the review team should know about your connector. Optional.")
|
|
1066
1145
|
});
|
|
1146
|
+
const claudeSubmissionDraftSchema = claudeSubmissionFormDataSchema.partial().extend({
|
|
1147
|
+
serverUrl: z.string().optional(),
|
|
1148
|
+
name: z.string().optional(),
|
|
1149
|
+
slug: z.string().optional(),
|
|
1150
|
+
oneLiner: z.string().optional(),
|
|
1151
|
+
description: z.string().optional(),
|
|
1152
|
+
iconUrl: z.string().optional(),
|
|
1153
|
+
documentation: z.string().optional(),
|
|
1154
|
+
support: z.string().optional(),
|
|
1155
|
+
privacyPolicy: z.string().optional(),
|
|
1156
|
+
companyWebsite: z.string().optional(),
|
|
1157
|
+
primaryContactEmail: z.string().optional(),
|
|
1158
|
+
categories: z.array(claudeCategorySchema).optional(),
|
|
1159
|
+
screenshots: z.array(screenshotDraftEntrySchema).optional()
|
|
1160
|
+
});
|
|
1067
1161
|
claudeSubmissionFormDataSchema.pick({
|
|
1068
1162
|
serverUrl: true,
|
|
1069
1163
|
name: true,
|
|
@@ -1104,14 +1198,14 @@ const submissionMetaFieldsSchema = z.object({
|
|
|
1104
1198
|
});
|
|
1105
1199
|
const claudeSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
|
|
1106
1200
|
platform: z.literal("claudeai"),
|
|
1107
|
-
formData:
|
|
1201
|
+
formData: claudeSubmissionDraftSchema
|
|
1108
1202
|
});
|
|
1109
1203
|
const chatgptSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
|
|
1110
1204
|
platform: z.literal("chatgpt"),
|
|
1111
|
-
formData:
|
|
1205
|
+
formData: chatgptSubmissionDraftSchema
|
|
1112
1206
|
});
|
|
1113
1207
|
z.discriminatedUnion("platform", [claudeSubmissionSchemaInternal, chatgptSubmissionSchemaInternal]);
|
|
1114
|
-
z.union([
|
|
1208
|
+
z.union([claudeSubmissionDraftSchema, chatgptSubmissionDraftSchema]);
|
|
1115
1209
|
const subscriptionPlanSchema = z.enum([
|
|
1116
1210
|
"pro",
|
|
1117
1211
|
"business",
|
|
@@ -1176,7 +1270,10 @@ const RESERVED_KEYS = [
|
|
|
1176
1270
|
"BUILD_ARG_START_COMMAND",
|
|
1177
1271
|
"ALPIC_HOST",
|
|
1178
1272
|
"ALPIC_CUSTOM_DOMAINS",
|
|
1179
|
-
"ALPIC_INTENT_META_KEY"
|
|
1273
|
+
"ALPIC_INTENT_META_KEY",
|
|
1274
|
+
"ALPIC_FEEDBACK_META_KEY",
|
|
1275
|
+
"ALPIC_EVENTS_META_KEY",
|
|
1276
|
+
"ALPIC_IDENTIFY_META_KEY"
|
|
1180
1277
|
];
|
|
1181
1278
|
const environmentVariableSchema = z.object({
|
|
1182
1279
|
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"),
|
|
@@ -1492,10 +1589,12 @@ const deployEnvironmentContractV1 = oc.route({
|
|
|
1492
1589
|
successDescription: "The environment has been deployed successfully"
|
|
1493
1590
|
}).errors({
|
|
1494
1591
|
NOT_FOUND: {},
|
|
1495
|
-
BAD_REQUEST: {}
|
|
1592
|
+
BAD_REQUEST: {},
|
|
1593
|
+
CONFLICT: {}
|
|
1496
1594
|
}).input(z.object({
|
|
1497
1595
|
environmentId: z.string().describe("The ID of the environment to deploy"),
|
|
1498
|
-
token: z.string().describe("The token to identify the source archive").optional()
|
|
1596
|
+
token: z.string().describe("The token to identify the source archive").optional(),
|
|
1597
|
+
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.")
|
|
1499
1598
|
})).output(deploymentSchema);
|
|
1500
1599
|
const uploadDeploymentArtifactContractV1 = oc.route({
|
|
1501
1600
|
path: "/v1/deployments/upload",
|
|
@@ -1532,6 +1631,21 @@ const getDeploymentContractV1 = oc.route({
|
|
|
1532
1631
|
tags: ["deployments"],
|
|
1533
1632
|
successDescription: "The deployment details"
|
|
1534
1633
|
}).errors({ NOT_FOUND: {} }).input(z.object({ deploymentId: z.string().describe("The ID of the deployment") })).output(deploymentSchema);
|
|
1634
|
+
const logEntrySchema = z.object({
|
|
1635
|
+
timestamp: z.coerce.date(),
|
|
1636
|
+
type: z.enum([
|
|
1637
|
+
"START",
|
|
1638
|
+
"END",
|
|
1639
|
+
"INFO",
|
|
1640
|
+
"ERROR",
|
|
1641
|
+
"WARNING",
|
|
1642
|
+
"DEBUG"
|
|
1643
|
+
]),
|
|
1644
|
+
requestId: z.string(),
|
|
1645
|
+
content: z.string().optional(),
|
|
1646
|
+
method: z.string().optional(),
|
|
1647
|
+
durationInMs: z.number().optional()
|
|
1648
|
+
});
|
|
1535
1649
|
const getLogsContractV1 = oc.route({
|
|
1536
1650
|
path: "/v1/environments/{environmentId}/logs",
|
|
1537
1651
|
method: "GET",
|
|
@@ -1556,21 +1670,7 @@ const getLogsContractV1 = oc.route({
|
|
|
1556
1670
|
search: z.string().optional().describe("Filter pattern to search for in log content"),
|
|
1557
1671
|
nextToken: z.string().optional().describe("Pagination token from a previous response")
|
|
1558
1672
|
})).output(z.object({
|
|
1559
|
-
logs: z.array(
|
|
1560
|
-
timestamp: z.coerce.date(),
|
|
1561
|
-
type: z.enum([
|
|
1562
|
-
"START",
|
|
1563
|
-
"END",
|
|
1564
|
-
"INFO",
|
|
1565
|
-
"ERROR",
|
|
1566
|
-
"WARNING",
|
|
1567
|
-
"DEBUG"
|
|
1568
|
-
]),
|
|
1569
|
-
requestId: z.string(),
|
|
1570
|
-
content: z.string().optional(),
|
|
1571
|
-
method: z.string().optional(),
|
|
1572
|
-
durationInMs: z.number().optional()
|
|
1573
|
-
})),
|
|
1673
|
+
logs: z.array(logEntrySchema),
|
|
1574
1674
|
nextToken: z.string().nullable()
|
|
1575
1675
|
}));
|
|
1576
1676
|
const getLatestLogsContractV1 = oc.route({
|
|
@@ -1593,21 +1693,7 @@ const getLatestLogsContractV1 = oc.route({
|
|
|
1593
1693
|
"DEBUG"
|
|
1594
1694
|
])).optional().describe("Filter by log level"),
|
|
1595
1695
|
search: z.string().optional().describe("Filter pattern to search for in log content")
|
|
1596
|
-
})).output(z.object({ logs: z.array(
|
|
1597
|
-
timestamp: z.coerce.date(),
|
|
1598
|
-
type: z.enum([
|
|
1599
|
-
"START",
|
|
1600
|
-
"END",
|
|
1601
|
-
"INFO",
|
|
1602
|
-
"ERROR",
|
|
1603
|
-
"WARNING",
|
|
1604
|
-
"DEBUG"
|
|
1605
|
-
]),
|
|
1606
|
-
requestId: z.string(),
|
|
1607
|
-
content: z.string().optional(),
|
|
1608
|
-
method: z.string().optional(),
|
|
1609
|
-
durationInMs: z.number().optional()
|
|
1610
|
-
})) }));
|
|
1696
|
+
})).output(z.object({ logs: z.array(logEntrySchema) }));
|
|
1611
1697
|
const getDeploymentLogsContractV1 = oc.route({
|
|
1612
1698
|
path: "/v1/deployments/{deploymentId}/logs",
|
|
1613
1699
|
method: "GET",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.gdd6b1fa",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -14,22 +14,38 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
+
"nx": {
|
|
18
|
+
"targets": {
|
|
19
|
+
"build": {
|
|
20
|
+
"cache": true,
|
|
21
|
+
"inputs": [
|
|
22
|
+
"{projectRoot}/src/**/*",
|
|
23
|
+
"{projectRoot}/tsdown.config.ts",
|
|
24
|
+
"{projectRoot}/tsconfig.json",
|
|
25
|
+
"^default"
|
|
26
|
+
],
|
|
27
|
+
"outputs": [
|
|
28
|
+
"{projectRoot}/dist"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
17
33
|
"author": "Alpic",
|
|
18
34
|
"license": "ISC",
|
|
19
35
|
"dependencies": {
|
|
20
|
-
"@orpc/contract": "^1.14.
|
|
36
|
+
"@orpc/contract": "^1.14.10",
|
|
21
37
|
"ms": "^2.1.3",
|
|
22
38
|
"zod": "^4.4.3"
|
|
23
39
|
},
|
|
24
40
|
"devDependencies": {
|
|
25
|
-
"@orpc/openapi": "^1.14.
|
|
26
|
-
"@orpc/zod": "^1.14.
|
|
41
|
+
"@orpc/openapi": "^1.14.10",
|
|
42
|
+
"@orpc/zod": "^1.14.10",
|
|
27
43
|
"@total-typescript/tsconfig": "^1.0.4",
|
|
28
44
|
"@types/ms": "^2.1.0",
|
|
29
45
|
"shx": "^0.4.0",
|
|
30
|
-
"tsdown": "^0.22.
|
|
46
|
+
"tsdown": "^0.22.14",
|
|
31
47
|
"typescript": "^6.0.3",
|
|
32
|
-
"vitest": "^4.1.
|
|
48
|
+
"vitest": "^4.1.10",
|
|
33
49
|
"@alpic-ai/domains": "0.0.0"
|
|
34
50
|
},
|
|
35
51
|
"scripts": {
|
|
@@ -38,7 +54,7 @@
|
|
|
38
54
|
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
39
55
|
"test:unit": "vitest run",
|
|
40
56
|
"test:format": "biome check --error-on-warnings .",
|
|
41
|
-
"test:type": "
|
|
57
|
+
"test:type": "tsgo --noEmit",
|
|
42
58
|
"publish:npm": "pnpm publish --tag \"${NPM_TAG}\" --access public --no-git-checks"
|
|
43
59
|
}
|
|
44
60
|
}
|