@alpic-ai/api 1.96.1 → 1.98.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 +98 -2
- package/dist/index.mjs +62 -3
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -162,7 +162,7 @@ declare const contract: {
|
|
|
162
162
|
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
163
163
|
teamId: z.ZodOptional<z.ZodString>;
|
|
164
164
|
}, z.core.$strip>>, z.ZodObject<{
|
|
165
|
-
uploadUrl: z.
|
|
165
|
+
uploadUrl: z.ZodURL;
|
|
166
166
|
token: z.ZodString;
|
|
167
167
|
expiresAt: z.ZodCoercedDate<unknown>;
|
|
168
168
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -646,6 +646,79 @@ declare const contract: {
|
|
|
646
646
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
647
647
|
};
|
|
648
648
|
};
|
|
649
|
+
distribution: {
|
|
650
|
+
publish: {
|
|
651
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
652
|
+
projectId: z.ZodString;
|
|
653
|
+
domain: z.ZodString;
|
|
654
|
+
title: z.ZodString;
|
|
655
|
+
description: z.ZodString;
|
|
656
|
+
websiteUrl: z.ZodOptional<z.ZodURL>;
|
|
657
|
+
iconSrc: z.ZodOptional<z.ZodURL>;
|
|
658
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
659
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
660
|
+
serverFields: z.ZodObject<{
|
|
661
|
+
$schema: z.ZodString;
|
|
662
|
+
name: z.ZodString;
|
|
663
|
+
description: z.ZodString;
|
|
664
|
+
version: z.ZodOptional<z.ZodString>;
|
|
665
|
+
title: z.ZodOptional<z.ZodString>;
|
|
666
|
+
websiteUrl: z.ZodOptional<z.ZodURL>;
|
|
667
|
+
icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
668
|
+
src: z.ZodURL;
|
|
669
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
670
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
671
|
+
}, z.core.$strip>>>;
|
|
672
|
+
remotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
673
|
+
type: z.ZodString;
|
|
674
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
675
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
676
|
+
name: z.ZodString;
|
|
677
|
+
description: z.ZodString;
|
|
678
|
+
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
679
|
+
isSecret: z.ZodOptional<z.ZodBoolean>;
|
|
680
|
+
}, z.core.$strip>>>;
|
|
681
|
+
}, z.core.$strip>>>;
|
|
682
|
+
}, z.core.$strip>;
|
|
683
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
684
|
+
NOT_FOUND: {};
|
|
685
|
+
BAD_REQUEST: {};
|
|
686
|
+
}>, Record<never, never>>;
|
|
687
|
+
};
|
|
688
|
+
info: {
|
|
689
|
+
v1: _orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
690
|
+
projectId: z.ZodString;
|
|
691
|
+
domain: z.ZodString;
|
|
692
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
693
|
+
serverFields: z.ZodObject<{
|
|
694
|
+
$schema: z.ZodString;
|
|
695
|
+
name: z.ZodString;
|
|
696
|
+
description: z.ZodString;
|
|
697
|
+
version: z.ZodOptional<z.ZodString>;
|
|
698
|
+
title: z.ZodOptional<z.ZodString>;
|
|
699
|
+
websiteUrl: z.ZodOptional<z.ZodURL>;
|
|
700
|
+
icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
701
|
+
src: z.ZodURL;
|
|
702
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
703
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
704
|
+
}, z.core.$strip>>>;
|
|
705
|
+
remotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
706
|
+
type: z.ZodString;
|
|
707
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
708
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
709
|
+
name: z.ZodString;
|
|
710
|
+
description: z.ZodString;
|
|
711
|
+
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
712
|
+
isSecret: z.ZodOptional<z.ZodBoolean>;
|
|
713
|
+
}, z.core.$strip>>>;
|
|
714
|
+
}, z.core.$strip>>>;
|
|
715
|
+
}, z.core.$strip>;
|
|
716
|
+
}, z.core.$strip>, _orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
717
|
+
NOT_FOUND: {};
|
|
718
|
+
BAD_REQUEST: {};
|
|
719
|
+
}>, Record<never, never>>;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
649
722
|
};
|
|
650
723
|
type RouterInput = InferContractRouterInputs<typeof contract>;
|
|
651
724
|
type RouterOutput = InferContractRouterOutputs<typeof contract>;
|
|
@@ -680,5 +753,28 @@ declare const transportSchema: z.ZodEnum<{
|
|
|
680
753
|
streamablehttp: "streamablehttp";
|
|
681
754
|
}>;
|
|
682
755
|
type Transport = z.infer<typeof transportSchema>;
|
|
756
|
+
declare const serverFieldsSchema: z.ZodObject<{
|
|
757
|
+
$schema: z.ZodString;
|
|
758
|
+
name: z.ZodString;
|
|
759
|
+
description: z.ZodString;
|
|
760
|
+
version: z.ZodOptional<z.ZodString>;
|
|
761
|
+
title: z.ZodOptional<z.ZodString>;
|
|
762
|
+
websiteUrl: z.ZodOptional<z.ZodURL>;
|
|
763
|
+
icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
764
|
+
src: z.ZodURL;
|
|
765
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
766
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
767
|
+
}, z.core.$strip>>>;
|
|
768
|
+
remotes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
769
|
+
type: z.ZodString;
|
|
770
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
771
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
772
|
+
name: z.ZodString;
|
|
773
|
+
description: z.ZodString;
|
|
774
|
+
isRequired: z.ZodOptional<z.ZodBoolean>;
|
|
775
|
+
isSecret: z.ZodOptional<z.ZodBoolean>;
|
|
776
|
+
}, z.core.$strip>>>;
|
|
777
|
+
}, z.core.$strip>>>;
|
|
778
|
+
}, z.core.$strip>;
|
|
683
779
|
//#endregion
|
|
684
|
-
export { ApiContext, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
|
|
780
|
+
export { ApiContext, RouterInput, RouterOutput, Runtime, Transport, buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, serverFieldsSchema, transportSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -60,6 +60,29 @@ const transportSchema = z.enum([
|
|
|
60
60
|
"sse",
|
|
61
61
|
"streamablehttp"
|
|
62
62
|
]);
|
|
63
|
+
const serverFieldsSchema = z.object({
|
|
64
|
+
$schema: z.string(),
|
|
65
|
+
name: z.string(),
|
|
66
|
+
description: z.string(),
|
|
67
|
+
version: z.string().optional(),
|
|
68
|
+
title: z.string().optional(),
|
|
69
|
+
websiteUrl: z.url().optional(),
|
|
70
|
+
icons: z.array(z.object({
|
|
71
|
+
src: z.url(),
|
|
72
|
+
mimeType: z.string().optional(),
|
|
73
|
+
sizes: z.array(z.string()).optional()
|
|
74
|
+
})).optional(),
|
|
75
|
+
remotes: z.array(z.object({
|
|
76
|
+
type: z.string(),
|
|
77
|
+
url: z.url().optional(),
|
|
78
|
+
headers: z.array(z.object({
|
|
79
|
+
name: z.string(),
|
|
80
|
+
description: z.string(),
|
|
81
|
+
isRequired: z.boolean().optional(),
|
|
82
|
+
isSecret: z.boolean().optional()
|
|
83
|
+
})).optional()
|
|
84
|
+
})).optional()
|
|
85
|
+
});
|
|
63
86
|
//#endregion
|
|
64
87
|
//#region src/api.contract.ts
|
|
65
88
|
const deploymentStatusSchema = z.enum([
|
|
@@ -330,7 +353,7 @@ const uploadDeploymentArtifactContractV1 = oc.route({
|
|
|
330
353
|
tags: ["deployments"],
|
|
331
354
|
successDescription: "The presigned upload URL has been generated successfully"
|
|
332
355
|
}).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
|
|
333
|
-
uploadUrl: z.
|
|
356
|
+
uploadUrl: z.url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
|
|
334
357
|
token: z.string().describe("Token to identify the source archive"),
|
|
335
358
|
expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
|
|
336
359
|
}));
|
|
@@ -472,6 +495,38 @@ const getTunnelTicketContractV1 = oc.route({
|
|
|
472
495
|
ticket: z.string().describe("The signed tunnel ticket"),
|
|
473
496
|
tunnelHost: z.string().describe("The tunnel host to connect to")
|
|
474
497
|
}));
|
|
498
|
+
const publishServerContractV1 = oc.route({
|
|
499
|
+
path: "/v1/distribution/publish",
|
|
500
|
+
method: "POST",
|
|
501
|
+
summary: "Publish a server to the MCP registry",
|
|
502
|
+
tags: ["distribution"],
|
|
503
|
+
successDescription: "The server has been published successfully"
|
|
504
|
+
}).errors({
|
|
505
|
+
NOT_FOUND: {},
|
|
506
|
+
BAD_REQUEST: {}
|
|
507
|
+
}).input(z.object({
|
|
508
|
+
projectId: z.string(),
|
|
509
|
+
domain: z.string(),
|
|
510
|
+
title: z.string().min(1).max(100),
|
|
511
|
+
description: z.string().min(1).max(100),
|
|
512
|
+
websiteUrl: z.url().max(255).optional(),
|
|
513
|
+
iconSrc: z.url().max(255).optional(),
|
|
514
|
+
dryRun: z.boolean().optional()
|
|
515
|
+
})).output(z.object({ serverFields: serverFieldsSchema }));
|
|
516
|
+
const getServerInfoContractV1 = oc.route({
|
|
517
|
+
path: "/v1/distribution/info",
|
|
518
|
+
method: "GET",
|
|
519
|
+
summary: "Get server info",
|
|
520
|
+
description: "Get info about a server",
|
|
521
|
+
tags: ["distribution"],
|
|
522
|
+
successDescription: "The server info"
|
|
523
|
+
}).errors({
|
|
524
|
+
NOT_FOUND: {},
|
|
525
|
+
BAD_REQUEST: {}
|
|
526
|
+
}).input(z.object({
|
|
527
|
+
projectId: z.string(),
|
|
528
|
+
domain: z.string()
|
|
529
|
+
})).output(z.object({ serverFields: serverFieldsSchema }));
|
|
475
530
|
const contract = {
|
|
476
531
|
teams: { list: { v1: listTeamsContractV1 } },
|
|
477
532
|
analytics: { get: { v1: getProjectAnalyticsContractV1 } },
|
|
@@ -500,7 +555,11 @@ const contract = {
|
|
|
500
555
|
create: { v1: createProjectContractV1 },
|
|
501
556
|
delete: { v1: deleteProjectContractV1 }
|
|
502
557
|
},
|
|
503
|
-
tunnels: { getTicket: { v1: getTunnelTicketContractV1 } }
|
|
558
|
+
tunnels: { getTicket: { v1: getTunnelTicketContractV1 } },
|
|
559
|
+
distribution: {
|
|
560
|
+
publish: { v1: publishServerContractV1 },
|
|
561
|
+
info: { v1: getServerInfoContractV1 }
|
|
562
|
+
}
|
|
504
563
|
};
|
|
505
564
|
//#endregion
|
|
506
|
-
export { buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, transportSchema };
|
|
565
|
+
export { buildSettingsSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, runtimeSchema, serverFieldsSchema, transportSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.98.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.
|
|
20
|
+
"@orpc/contract": "^1.13.8",
|
|
21
21
|
"ms": "^2.1.3",
|
|
22
22
|
"zod": "^4.3.6"
|
|
23
23
|
},
|
|
@@ -25,16 +25,16 @@
|
|
|
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.
|
|
28
|
+
"tsdown": "^0.21.4",
|
|
29
29
|
"typescript": "^5.9.3",
|
|
30
30
|
"vitest": "^4.1.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "shx rm -rf dist && tsdown",
|
|
34
|
-
"format": "biome check --write --error-on-warnings",
|
|
34
|
+
"format": "biome check --write --error-on-warnings .",
|
|
35
35
|
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
36
36
|
"test:unit": "vitest run",
|
|
37
|
-
"test:format": "
|
|
37
|
+
"test:format": "biome check --error-on-warnings .",
|
|
38
38
|
"test:type": "tsc --noEmit",
|
|
39
39
|
"publish:npm": "pnpm publish --tag \"${NPM_TAG}\" --access public --no-git-checks"
|
|
40
40
|
}
|