@alpic-ai/api 0.0.0-staging.g704b24d → 0.0.0-staging.g70a39d6
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 +40 -0
- package/dist/index.mjs +25 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -47,6 +47,26 @@ declare const contract: {
|
|
|
47
47
|
BAD_REQUEST: {};
|
|
48
48
|
}>, Record<never, never>>;
|
|
49
49
|
};
|
|
50
|
+
getUsage: {
|
|
51
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
52
|
+
teamId: z.ZodString;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
teamId: z.ZodString;
|
|
55
|
+
plan: z.ZodNullable<z.ZodEnum<{
|
|
56
|
+
pro: "pro";
|
|
57
|
+
business: "business";
|
|
58
|
+
enterprise: "enterprise";
|
|
59
|
+
}>>;
|
|
60
|
+
periodStart: z.ZodCoercedDate<unknown>;
|
|
61
|
+
periodEnd: z.ZodCoercedDate<unknown>;
|
|
62
|
+
requestCount: z.ZodNumber;
|
|
63
|
+
includedRequests: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
65
|
+
BAD_REQUEST: {};
|
|
66
|
+
}>, {
|
|
67
|
+
NOT_FOUND: {};
|
|
68
|
+
}>, Record<never, never>>;
|
|
69
|
+
};
|
|
50
70
|
};
|
|
51
71
|
analytics: {
|
|
52
72
|
get: {
|
|
@@ -1079,6 +1099,26 @@ declare const contractForDocs: {
|
|
|
1079
1099
|
BAD_REQUEST: {};
|
|
1080
1100
|
}>, Record<never, never>>;
|
|
1081
1101
|
};
|
|
1102
|
+
getUsage: {
|
|
1103
|
+
v1: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1104
|
+
teamId: z.ZodString;
|
|
1105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1106
|
+
teamId: z.ZodString;
|
|
1107
|
+
plan: z.ZodNullable<z.ZodEnum<{
|
|
1108
|
+
pro: "pro";
|
|
1109
|
+
business: "business";
|
|
1110
|
+
enterprise: "enterprise";
|
|
1111
|
+
}>>;
|
|
1112
|
+
periodStart: z.ZodCoercedDate<unknown>;
|
|
1113
|
+
periodEnd: z.ZodCoercedDate<unknown>;
|
|
1114
|
+
requestCount: z.ZodNumber;
|
|
1115
|
+
includedRequests: z.ZodNullable<z.ZodNumber>;
|
|
1116
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1117
|
+
BAD_REQUEST: {};
|
|
1118
|
+
}>, {
|
|
1119
|
+
NOT_FOUND: {};
|
|
1120
|
+
}>, Record<never, never>>;
|
|
1121
|
+
};
|
|
1082
1122
|
};
|
|
1083
1123
|
analytics: {
|
|
1084
1124
|
get: {
|
package/dist/index.mjs
CHANGED
|
@@ -1398,6 +1398,12 @@ const chatgptSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
|
|
|
1398
1398
|
});
|
|
1399
1399
|
z.discriminatedUnion("platform", [claudeSubmissionSchemaInternal, chatgptSubmissionSchemaInternal]);
|
|
1400
1400
|
z.union([claudeSubmissionDraftSchema, chatgptSubmissionDraftSchema]);
|
|
1401
|
+
({
|
|
1402
|
+
free: 1e4,
|
|
1403
|
+
pro: 2e5,
|
|
1404
|
+
business: 2e6,
|
|
1405
|
+
enterprise: null
|
|
1406
|
+
}).free;
|
|
1401
1407
|
const subscriptionPlanSchema = z.enum([
|
|
1402
1408
|
"pro",
|
|
1403
1409
|
"business",
|
|
@@ -1922,6 +1928,21 @@ const listTeamsContractV1 = base.route({
|
|
|
1922
1928
|
createdAt: z.coerce.date(),
|
|
1923
1929
|
hasStripeAccount: z.boolean()
|
|
1924
1930
|
})));
|
|
1931
|
+
const getTeamUsageContractV1 = base.route({
|
|
1932
|
+
path: "/v1/teams/{teamId}/usage",
|
|
1933
|
+
method: "GET",
|
|
1934
|
+
summary: "Get team usage",
|
|
1935
|
+
description: "Get the MCP request usage of a team for its current billing window. A team that has made no request in the window reports zero.",
|
|
1936
|
+
tags: ["teams"],
|
|
1937
|
+
successDescription: "The current billing window usage"
|
|
1938
|
+
}).errors({ NOT_FOUND: {} }).input(z.object({ teamId: z.string().describe("The ID of the team") })).output(z.object({
|
|
1939
|
+
teamId: z.string(),
|
|
1940
|
+
plan: subscriptionPlanSchema.nullable().describe("The plan in force for the window, null on the Free plan"),
|
|
1941
|
+
periodStart: z.coerce.date().describe("Start of the current billing window"),
|
|
1942
|
+
periodEnd: z.coerce.date().describe("End of the current billing window"),
|
|
1943
|
+
requestCount: z.number().int().describe("MCP requests settled during the current billing window"),
|
|
1944
|
+
includedRequests: z.number().int().nullable().describe("Requests included in the plan for one window, null when the allowance is contract-specific")
|
|
1945
|
+
}));
|
|
1925
1946
|
const getTunnelTicketContractV1 = base.route({
|
|
1926
1947
|
path: "/v1/tunnels/ticket",
|
|
1927
1948
|
method: "GET",
|
|
@@ -2030,7 +2051,10 @@ const getBeaconContractV1 = base.route({
|
|
|
2030
2051
|
report: auditReportWithScreenshotsSchema.nullable()
|
|
2031
2052
|
}));
|
|
2032
2053
|
const contract = {
|
|
2033
|
-
teams: {
|
|
2054
|
+
teams: {
|
|
2055
|
+
list: { v1: listTeamsContractV1 },
|
|
2056
|
+
getUsage: { v1: getTeamUsageContractV1 }
|
|
2057
|
+
},
|
|
2034
2058
|
analytics: { get: { v1: getProjectAnalyticsContractV1 } },
|
|
2035
2059
|
deployments: {
|
|
2036
2060
|
list: { v1: listDeploymentsContractV1 },
|