@pdfvector/util 0.0.31 → 0.1.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/.tsc/lib/api-source.d.ts +1 -1
- package/.tsc/lib/api-source.d.ts.map +1 -1
- package/.tsc/lib/api-source.js +1 -0
- package/.tsc/lib/contract/gateway/index.d.ts +7 -0
- package/.tsc/lib/contract/gateway/index.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/index.js +3 -0
- package/.tsc/lib/contract/gateway/mcp-account.d.ts +64 -0
- package/.tsc/lib/contract/gateway/mcp-account.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/mcp-account.js +38 -0
- package/.tsc/lib/contract/gateway/router/admin/billing.d.ts +50 -0
- package/.tsc/lib/contract/gateway/router/admin/billing.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/billing.js +51 -0
- package/.tsc/lib/contract/gateway/router/admin/blog.d.ts +38 -0
- package/.tsc/lib/contract/gateway/router/admin/blog.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/blog.js +36 -0
- package/.tsc/lib/contract/gateway/router/admin/feedback.d.ts +48 -0
- package/.tsc/lib/contract/gateway/router/admin/feedback.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/feedback.js +52 -0
- package/.tsc/lib/contract/gateway/router/admin/instances.d.ts +8 -0
- package/.tsc/lib/contract/gateway/router/admin/instances.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/instances.js +8 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/free.d.ts +108 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/free.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/free.js +86 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/index.d.ts +4 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/index.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/index.js +3 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/overview.d.ts +105 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/overview.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/overview.js +65 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/records.d.ts +72 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/records.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/usage/records.js +55 -0
- package/.tsc/lib/contract/gateway/router/admin/users.d.ts +93 -0
- package/.tsc/lib/contract/gateway/router/admin/users.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin/users.js +101 -0
- package/.tsc/lib/contract/gateway/router/admin.d.ts +7 -0
- package/.tsc/lib/contract/gateway/router/admin.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/admin.js +6 -0
- package/.tsc/lib/contract/gateway/router/billing.d.ts +17 -0
- package/.tsc/lib/contract/gateway/router/billing.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/billing.js +20 -0
- package/.tsc/lib/contract/gateway/router/blog.d.ts +35 -0
- package/.tsc/lib/contract/gateway/router/blog.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/blog.js +29 -0
- package/.tsc/lib/contract/gateway/router/feedback.d.ts +14 -0
- package/.tsc/lib/contract/gateway/router/feedback.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/feedback.js +15 -0
- package/.tsc/lib/contract/gateway/router/free-feedback.d.ts +19 -0
- package/.tsc/lib/contract/gateway/router/free-feedback.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/free-feedback.js +10 -0
- package/.tsc/lib/contract/gateway/router/greeting.d.ts +7 -0
- package/.tsc/lib/contract/gateway/router/greeting.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/greeting.js +11 -0
- package/.tsc/lib/contract/gateway/router/health.d.ts +5 -0
- package/.tsc/lib/contract/gateway/router/health.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/health.js +6 -0
- package/.tsc/lib/contract/gateway/router/index.d.ts +10 -0
- package/.tsc/lib/contract/gateway/router/index.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/index.js +9 -0
- package/.tsc/lib/contract/gateway/router/instance/api-keys.d.ts +30 -0
- package/.tsc/lib/contract/gateway/router/instance/api-keys.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/instance/api-keys.js +20 -0
- package/.tsc/lib/contract/gateway/router/instance/instances.d.ts +40 -0
- package/.tsc/lib/contract/gateway/router/instance/instances.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/instance/instances.js +24 -0
- package/.tsc/lib/contract/gateway/router/instance/proxy.d.ts +50 -0
- package/.tsc/lib/contract/gateway/router/instance/proxy.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/instance/proxy.js +55 -0
- package/.tsc/lib/contract/gateway/router/instance/usage.d.ts +205 -0
- package/.tsc/lib/contract/gateway/router/instance/usage.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/instance/usage.js +92 -0
- package/.tsc/lib/contract/gateway/router/instance.d.ts +5 -0
- package/.tsc/lib/contract/gateway/router/instance.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/instance.js +4 -0
- package/.tsc/lib/contract/gateway/router/workspace.d.ts +31 -0
- package/.tsc/lib/contract/gateway/router/workspace.d.ts.map +1 -0
- package/.tsc/lib/contract/gateway/router/workspace.js +30 -0
- package/.tsc/lib/contract/instance/fetchable-url-schema.d.ts +3 -0
- package/.tsc/lib/contract/instance/fetchable-url-schema.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/fetchable-url-schema.js +5 -0
- package/.tsc/lib/contract/instance/index.d.ts +12 -0
- package/.tsc/lib/contract/instance/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/index.js +7 -0
- package/.tsc/lib/contract/instance/json-schema-input.d.ts +3 -0
- package/.tsc/lib/contract/instance/json-schema-input.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/json-schema-input.js +23 -0
- package/.tsc/lib/contract/instance/page-markdown-schema.d.ts +6 -0
- package/.tsc/lib/contract/instance/page-markdown-schema.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/page-markdown-schema.js +9 -0
- package/.tsc/lib/contract/instance/pdfvector-model-schema.d.ts +8 -0
- package/.tsc/lib/contract/instance/pdfvector-model-schema.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/pdfvector-model-schema.js +4 -0
- package/.tsc/lib/contract/instance/pdfvector-model.d.ts +4 -0
- package/.tsc/lib/contract/instance/pdfvector-model.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/pdfvector-model.js +0 -0
- package/.tsc/lib/contract/instance/router/academic/fetch.d.ts +69 -0
- package/.tsc/lib/contract/instance/router/academic/fetch.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/fetch.js +119 -0
- package/.tsc/lib/contract/instance/router/academic/find-citations.d.ts +70 -0
- package/.tsc/lib/contract/instance/router/academic/find-citations.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/find-citations.js +116 -0
- package/.tsc/lib/contract/instance/router/academic/index.d.ts +8 -0
- package/.tsc/lib/contract/instance/router/academic/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/index.js +7 -0
- package/.tsc/lib/contract/instance/router/academic/paper-graph.d.ts +113 -0
- package/.tsc/lib/contract/instance/router/academic/paper-graph.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/paper-graph.js +144 -0
- package/.tsc/lib/contract/instance/router/academic/parse.d.ts +50 -0
- package/.tsc/lib/contract/instance/router/academic/parse.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/parse.js +146 -0
- package/.tsc/lib/contract/instance/router/academic/provider.d.ts +18 -0
- package/.tsc/lib/contract/instance/router/academic/provider.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/provider.js +16 -0
- package/.tsc/lib/contract/instance/router/academic/search-grants.d.ts +84 -0
- package/.tsc/lib/contract/instance/router/academic/search-grants.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/search-grants.js +171 -0
- package/.tsc/lib/contract/instance/router/academic/search.d.ts +83 -0
- package/.tsc/lib/contract/instance/router/academic/search.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/search.js +154 -0
- package/.tsc/lib/contract/instance/router/academic/similar-papers.d.ts +89 -0
- package/.tsc/lib/contract/instance/router/academic/similar-papers.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/academic/similar-papers.js +143 -0
- package/.tsc/lib/contract/instance/router/admin/get-environment.d.ts +5 -0
- package/.tsc/lib/contract/instance/router/admin/get-environment.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/get-environment.js +13 -0
- package/.tsc/lib/contract/instance/router/admin/get-free-usage-records.d.ts +44 -0
- package/.tsc/lib/contract/instance/router/admin/get-free-usage-records.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/get-free-usage-records.js +39 -0
- package/.tsc/lib/contract/instance/router/admin/get-provider-usage-records.d.ts +41 -0
- package/.tsc/lib/contract/instance/router/admin/get-provider-usage-records.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/get-provider-usage-records.js +50 -0
- package/.tsc/lib/contract/instance/router/admin/get-usage-records.d.ts +49 -0
- package/.tsc/lib/contract/instance/router/admin/get-usage-records.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/get-usage-records.js +44 -0
- package/.tsc/lib/contract/instance/router/admin/health-check.d.ts +5 -0
- package/.tsc/lib/contract/instance/router/admin/health-check.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/health-check.js +14 -0
- package/.tsc/lib/contract/instance/router/admin/index.d.ts +9 -0
- package/.tsc/lib/contract/instance/router/admin/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/index.js +8 -0
- package/.tsc/lib/contract/instance/router/admin/set-domain.d.ts +7 -0
- package/.tsc/lib/contract/instance/router/admin/set-domain.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/set-domain.js +20 -0
- package/.tsc/lib/contract/instance/router/admin/set-environment.d.ts +7 -0
- package/.tsc/lib/contract/instance/router/admin/set-environment.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/set-environment.js +41 -0
- package/.tsc/lib/contract/instance/router/admin/set-version.d.ts +7 -0
- package/.tsc/lib/contract/instance/router/admin/set-version.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/admin/set-version.js +21 -0
- package/.tsc/lib/contract/instance/router/authenticate/index.d.ts +2 -0
- package/.tsc/lib/contract/instance/router/authenticate/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/authenticate/index.js +1 -0
- package/.tsc/lib/contract/instance/router/authenticate/validate-credential.d.ts +7 -0
- package/.tsc/lib/contract/instance/router/authenticate/validate-credential.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/authenticate/validate-credential.js +20 -0
- package/.tsc/lib/contract/instance/router/bankStatement/ask.d.ts +32 -0
- package/.tsc/lib/contract/instance/router/bankStatement/ask.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/bankStatement/ask.js +88 -0
- package/.tsc/lib/contract/instance/router/bankStatement/extract.d.ts +33 -0
- package/.tsc/lib/contract/instance/router/bankStatement/extract.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/bankStatement/extract.js +113 -0
- package/.tsc/lib/contract/instance/router/bankStatement/get-default-spec.d.ts +2 -0
- package/.tsc/lib/contract/instance/router/bankStatement/get-default-spec.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/bankStatement/get-default-spec.js +19 -0
- package/.tsc/lib/contract/instance/router/bankStatement/index.d.ts +4 -0
- package/.tsc/lib/contract/instance/router/bankStatement/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/bankStatement/index.js +3 -0
- package/.tsc/lib/contract/instance/router/bankStatement/parse.d.ts +28 -0
- package/.tsc/lib/contract/instance/router/bankStatement/parse.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/bankStatement/parse.js +105 -0
- package/.tsc/lib/contract/instance/router/document/ask.d.ts +32 -0
- package/.tsc/lib/contract/instance/router/document/ask.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/document/ask.js +134 -0
- package/.tsc/lib/contract/instance/router/document/extract.d.ts +33 -0
- package/.tsc/lib/contract/instance/router/document/extract.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/document/extract.js +152 -0
- package/.tsc/lib/contract/instance/router/document/get-default-spec.d.ts +2 -0
- package/.tsc/lib/contract/instance/router/document/get-default-spec.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/document/get-default-spec.js +19 -0
- package/.tsc/lib/contract/instance/router/document/index.d.ts +4 -0
- package/.tsc/lib/contract/instance/router/document/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/document/index.js +3 -0
- package/.tsc/lib/contract/instance/router/document/parse.d.ts +40 -0
- package/.tsc/lib/contract/instance/router/document/parse.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/document/parse.js +142 -0
- package/.tsc/lib/contract/instance/router/free/bank-statement-parse.d.ts +16 -0
- package/.tsc/lib/contract/instance/router/free/bank-statement-parse.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/free/bank-statement-parse.js +87 -0
- package/.tsc/lib/contract/instance/router/free/generate-schema.d.ts +8 -0
- package/.tsc/lib/contract/instance/router/free/generate-schema.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/free/generate-schema.js +110 -0
- package/.tsc/lib/contract/instance/router/free/index.d.ts +5 -0
- package/.tsc/lib/contract/instance/router/free/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/free/index.js +4 -0
- package/.tsc/lib/contract/instance/router/free/publication-pdf-url.d.ts +12 -0
- package/.tsc/lib/contract/instance/router/free/publication-pdf-url.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/free/publication-pdf-url.js +86 -0
- package/.tsc/lib/contract/instance/router/free/rate-limit-status.d.ts +19 -0
- package/.tsc/lib/contract/instance/router/free/rate-limit-status.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/free/rate-limit-status.js +36 -0
- package/.tsc/lib/contract/instance/router/identity/ask.d.ts +32 -0
- package/.tsc/lib/contract/instance/router/identity/ask.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/identity/ask.js +95 -0
- package/.tsc/lib/contract/instance/router/identity/extract.d.ts +33 -0
- package/.tsc/lib/contract/instance/router/identity/extract.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/identity/extract.js +103 -0
- package/.tsc/lib/contract/instance/router/identity/get-default-spec.d.ts +2 -0
- package/.tsc/lib/contract/instance/router/identity/get-default-spec.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/identity/get-default-spec.js +19 -0
- package/.tsc/lib/contract/instance/router/identity/index.d.ts +4 -0
- package/.tsc/lib/contract/instance/router/identity/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/identity/index.js +3 -0
- package/.tsc/lib/contract/instance/router/identity/parse.d.ts +29 -0
- package/.tsc/lib/contract/instance/router/identity/parse.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/identity/parse.js +109 -0
- package/.tsc/lib/contract/instance/router/index.d.ts +9 -0
- package/.tsc/lib/contract/instance/router/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/index.js +8 -0
- package/.tsc/lib/contract/instance/router/invoice/ask.d.ts +32 -0
- package/.tsc/lib/contract/instance/router/invoice/ask.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/invoice/ask.js +85 -0
- package/.tsc/lib/contract/instance/router/invoice/extract.d.ts +33 -0
- package/.tsc/lib/contract/instance/router/invoice/extract.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/invoice/extract.js +109 -0
- package/.tsc/lib/contract/instance/router/invoice/get-default-spec.d.ts +2 -0
- package/.tsc/lib/contract/instance/router/invoice/get-default-spec.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/invoice/get-default-spec.js +19 -0
- package/.tsc/lib/contract/instance/router/invoice/index.d.ts +4 -0
- package/.tsc/lib/contract/instance/router/invoice/index.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/invoice/index.js +3 -0
- package/.tsc/lib/contract/instance/router/invoice/parse.d.ts +28 -0
- package/.tsc/lib/contract/instance/router/invoice/parse.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/router/invoice/parse.js +100 -0
- package/.tsc/lib/contract/instance/supported-mimes.d.ts +35 -0
- package/.tsc/lib/contract/instance/supported-mimes.d.ts.map +1 -0
- package/.tsc/lib/contract/instance/supported-mimes.js +130 -0
- package/.tsc/lib/date.d.ts.map +1 -1
- package/.tsc/lib/date.js +3 -5
- package/CHANGELOG.md +18 -0
- package/package.json +14 -2
package/.tsc/lib/api-source.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const apiSources: readonly ["make", "zapier", "n8n", "sdk", "playground", "api", "unknown"];
|
|
1
|
+
export declare const apiSources: readonly ["make", "zapier", "n8n", "sdk", "mcp", "playground", "api", "unknown"];
|
|
2
2
|
export type APISource = (typeof apiSources)[number];
|
|
3
3
|
//# sourceMappingURL=api-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-source.d.ts","sourceRoot":"","sources":["../../lib/api-source.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YACtB,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,YAAY,EACZ,KAAK,EACL,SAAS,CACA,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"api-source.d.ts","sourceRoot":"","sources":["../../lib/api-source.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YACtB,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,KAAK,EACL,YAAY,EACZ,KAAK,EACL,SAAS,CACA,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/.tsc/lib/api-source.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
|
|
2
|
+
import * as contract from "./router/index.js";
|
|
3
|
+
export * from "./mcp-account.js";
|
|
4
|
+
export { contract };
|
|
5
|
+
export type ContractInputs = InferContractRouterInputs<typeof contract>;
|
|
6
|
+
export type ContractOutputs = InferContractRouterOutputs<typeof contract>;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/contract/gateway/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,yBAAyB,EACzB,0BAA0B,EAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,MAAM,MAAM,cAAc,GAAG,yBAAyB,CAAC,OAAO,QAAQ,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,0BAA0B,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const mcpAccountRequestSchema: z.ZodObject<{
|
|
3
|
+
authentication: z.ZodEnum<{
|
|
4
|
+
"api-key": "api-key";
|
|
5
|
+
oauth: "oauth";
|
|
6
|
+
}>;
|
|
7
|
+
resource: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export declare const mcpAccountResponseSchema: z.ZodObject<{
|
|
10
|
+
workspace: z.ZodObject<{
|
|
11
|
+
id: z.ZodNumber;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
profile: z.ZodNullable<z.ZodObject<{
|
|
15
|
+
id: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
email: z.ZodString;
|
|
18
|
+
}, z.core.$strict>>;
|
|
19
|
+
plan: z.ZodObject<{
|
|
20
|
+
key: z.ZodString;
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
billing: z.ZodObject<{
|
|
24
|
+
planKey: z.ZodString;
|
|
25
|
+
interval: z.ZodNullable<z.ZodEnum<{
|
|
26
|
+
annual: "annual";
|
|
27
|
+
monthly: "monthly";
|
|
28
|
+
}>>;
|
|
29
|
+
asOf: z.ZodISODateTime;
|
|
30
|
+
source: z.ZodLiteral<"stripe">;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
credits: z.ZodObject<{
|
|
33
|
+
total: z.ZodNumber;
|
|
34
|
+
used: z.ZodNumber;
|
|
35
|
+
remaining: z.ZodNumber;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
asOf: z.ZodISODateTime;
|
|
38
|
+
accuracy: z.ZodLiteral<"cached">;
|
|
39
|
+
billingPermission: z.ZodBoolean;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export declare const mcpCheckoutRequestSchema: z.ZodObject<{
|
|
42
|
+
authentication: z.ZodEnum<{
|
|
43
|
+
"api-key": "api-key";
|
|
44
|
+
oauth: "oauth";
|
|
45
|
+
}>;
|
|
46
|
+
resource: z.ZodString;
|
|
47
|
+
plan: z.ZodObject<{
|
|
48
|
+
key: z.ZodEnum<{
|
|
49
|
+
basic: "basic";
|
|
50
|
+
pro: "pro";
|
|
51
|
+
}>;
|
|
52
|
+
annual: z.ZodBoolean;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
requestId: z.ZodUUID;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
export declare const mcpCheckoutResponseSchema: z.ZodObject<{
|
|
57
|
+
url: z.ZodString;
|
|
58
|
+
status: z.ZodEnum<{
|
|
59
|
+
checkout: "checkout";
|
|
60
|
+
upgrade_confirmation: "upgrade_confirmation";
|
|
61
|
+
}>;
|
|
62
|
+
paymentRequired: z.ZodLiteral<true>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
//# sourceMappingURL=mcp-account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-account.d.ts","sourceRoot":"","sources":["../../../../lib/contract/gateway/mcp-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;kBAGlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuBnC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;kBAGnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;kBAIpC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const mcpAccountRequestSchema = z.strictObject({
|
|
3
|
+
authentication: z.enum(["oauth", "api-key"]),
|
|
4
|
+
resource: z.string().url(),
|
|
5
|
+
});
|
|
6
|
+
export const mcpAccountResponseSchema = z.strictObject({
|
|
7
|
+
workspace: z.strictObject({
|
|
8
|
+
id: z.number().int().positive(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
}),
|
|
11
|
+
profile: z
|
|
12
|
+
.strictObject({ id: z.string(), name: z.string(), email: z.string() })
|
|
13
|
+
.nullable(),
|
|
14
|
+
plan: z.strictObject({ key: z.string(), label: z.string() }),
|
|
15
|
+
billing: z.strictObject({
|
|
16
|
+
planKey: z.string(),
|
|
17
|
+
interval: z.enum(["monthly", "annual"]).nullable(),
|
|
18
|
+
asOf: z.iso.datetime(),
|
|
19
|
+
source: z.literal("stripe"),
|
|
20
|
+
}),
|
|
21
|
+
credits: z.strictObject({
|
|
22
|
+
total: z.number(),
|
|
23
|
+
used: z.number(),
|
|
24
|
+
remaining: z.number(),
|
|
25
|
+
}),
|
|
26
|
+
asOf: z.iso.datetime(),
|
|
27
|
+
accuracy: z.literal("cached"),
|
|
28
|
+
billingPermission: z.boolean(),
|
|
29
|
+
});
|
|
30
|
+
export const mcpCheckoutRequestSchema = mcpAccountRequestSchema.extend({
|
|
31
|
+
plan: z.strictObject({ key: z.enum(["basic", "pro"]), annual: z.boolean() }),
|
|
32
|
+
requestId: z.uuid(),
|
|
33
|
+
});
|
|
34
|
+
export const mcpCheckoutResponseSchema = z.strictObject({
|
|
35
|
+
url: z.string().url(),
|
|
36
|
+
status: z.enum(["checkout", "upgrade_confirmation"]),
|
|
37
|
+
paymentRequired: z.literal(true),
|
|
38
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const listBilling: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
3
|
+
disableCache: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
|
+
users: z.ZodArray<z.ZodObject<{
|
|
6
|
+
stripeCustomerId: z.ZodString;
|
|
7
|
+
userName: z.ZodString;
|
|
8
|
+
userEmail: z.ZodString;
|
|
9
|
+
planKey: z.ZodString;
|
|
10
|
+
usedCredits: z.ZodNumber;
|
|
11
|
+
aggregatedCredits: z.ZodNumber;
|
|
12
|
+
subscriptionStatus: z.ZodNullable<z.ZodString>;
|
|
13
|
+
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
14
|
+
currentPeriodStart: z.ZodNullable<z.ZodDate>;
|
|
15
|
+
currentPeriodEnd: z.ZodNullable<z.ZodDate>;
|
|
16
|
+
cancelAtPeriodEnd: z.ZodBoolean;
|
|
17
|
+
openInvoiceCount: z.ZodNumber;
|
|
18
|
+
uncollectibleInvoiceCount: z.ZodNumber;
|
|
19
|
+
totalAmountDue: z.ZodNumber;
|
|
20
|
+
hasIssues: z.ZodBoolean;
|
|
21
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
22
|
+
oldestIssueDate: z.ZodNullable<z.ZodDate>;
|
|
23
|
+
createdAt: z.ZodDate;
|
|
24
|
+
invoices: z.ZodArray<z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
number: z.ZodNullable<z.ZodString>;
|
|
27
|
+
status: z.ZodString;
|
|
28
|
+
amountDue: z.ZodNumber;
|
|
29
|
+
amountPaid: z.ZodNumber;
|
|
30
|
+
amountRemaining: z.ZodNumber;
|
|
31
|
+
currency: z.ZodString;
|
|
32
|
+
dueDate: z.ZodNullable<z.ZodDate>;
|
|
33
|
+
created: z.ZodDate;
|
|
34
|
+
periodStart: z.ZodDate;
|
|
35
|
+
periodEnd: z.ZodDate;
|
|
36
|
+
billingReason: z.ZodNullable<z.ZodString>;
|
|
37
|
+
attemptCount: z.ZodNumber;
|
|
38
|
+
nextPaymentAttempt: z.ZodNullable<z.ZodDate>;
|
|
39
|
+
hostedInvoiceUrl: z.ZodNullable<z.ZodString>;
|
|
40
|
+
invoicePdf: z.ZodNullable<z.ZodString>;
|
|
41
|
+
paid: z.ZodBoolean;
|
|
42
|
+
collectionMethod: z.ZodString;
|
|
43
|
+
subtotal: z.ZodNumber;
|
|
44
|
+
total: z.ZodNumber;
|
|
45
|
+
tax: z.ZodNullable<z.ZodNumber>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
cachedAt: z.ZodNullable<z.ZodDate>;
|
|
49
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
50
|
+
//# sourceMappingURL=billing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/billing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AA0BzB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA6BtB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
const invoiceSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
number: z.string().nullable(),
|
|
6
|
+
status: z.string(),
|
|
7
|
+
amountDue: z.number(),
|
|
8
|
+
amountPaid: z.number(),
|
|
9
|
+
amountRemaining: z.number(),
|
|
10
|
+
currency: z.string(),
|
|
11
|
+
dueDate: z.date().nullable(),
|
|
12
|
+
created: z.date(),
|
|
13
|
+
periodStart: z.date(),
|
|
14
|
+
periodEnd: z.date(),
|
|
15
|
+
billingReason: z.string().nullable(),
|
|
16
|
+
attemptCount: z.number(),
|
|
17
|
+
nextPaymentAttempt: z.date().nullable(),
|
|
18
|
+
hostedInvoiceUrl: z.string().nullable(),
|
|
19
|
+
invoicePdf: z.string().nullable(),
|
|
20
|
+
paid: z.boolean(),
|
|
21
|
+
collectionMethod: z.string(),
|
|
22
|
+
subtotal: z.number(),
|
|
23
|
+
total: z.number(),
|
|
24
|
+
tax: z.number().nullable(),
|
|
25
|
+
});
|
|
26
|
+
export const listBilling = oc
|
|
27
|
+
.input(z.object({ disableCache: z.boolean().optional() }))
|
|
28
|
+
.output(z.object({
|
|
29
|
+
users: z.array(z.object({
|
|
30
|
+
stripeCustomerId: z.string(),
|
|
31
|
+
userName: z.string(),
|
|
32
|
+
userEmail: z.string(),
|
|
33
|
+
planKey: z.string(),
|
|
34
|
+
usedCredits: z.number(),
|
|
35
|
+
aggregatedCredits: z.number(),
|
|
36
|
+
subscriptionStatus: z.string().nullable(),
|
|
37
|
+
subscriptionId: z.string().nullable(),
|
|
38
|
+
currentPeriodStart: z.date().nullable(),
|
|
39
|
+
currentPeriodEnd: z.date().nullable(),
|
|
40
|
+
cancelAtPeriodEnd: z.boolean(),
|
|
41
|
+
openInvoiceCount: z.number(),
|
|
42
|
+
uncollectibleInvoiceCount: z.number(),
|
|
43
|
+
totalAmountDue: z.number(),
|
|
44
|
+
hasIssues: z.boolean(),
|
|
45
|
+
reasons: z.array(z.string()),
|
|
46
|
+
oldestIssueDate: z.date().nullable(),
|
|
47
|
+
createdAt: z.date(),
|
|
48
|
+
invoices: z.array(invoiceSchema),
|
|
49
|
+
})),
|
|
50
|
+
cachedAt: z.date().nullable(),
|
|
51
|
+
}));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const importBlogPosts: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
3
|
+
posts: z.ZodArray<z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
slug: z.ZodString;
|
|
6
|
+
keyword: z.ZodOptional<z.ZodString>;
|
|
7
|
+
content: z.ZodString;
|
|
8
|
+
metaDescription: z.ZodOptional<z.ZodString>;
|
|
9
|
+
coverImage: z.ZodOptional<z.ZodString>;
|
|
10
|
+
publishedAt: z.ZodString;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
imported: z.ZodNumber;
|
|
14
|
+
skipped: z.ZodNumber;
|
|
15
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
16
|
+
export declare const listBlogPosts: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
17
|
+
search: z.ZodOptional<z.ZodString>;
|
|
18
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
posts: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodNumber;
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
slug: z.ZodString;
|
|
25
|
+
keyword: z.ZodNullable<z.ZodString>;
|
|
26
|
+
metaDescription: z.ZodNullable<z.ZodString>;
|
|
27
|
+
coverImage: z.ZodNullable<z.ZodString>;
|
|
28
|
+
publishedAt: z.ZodDate;
|
|
29
|
+
createdAt: z.ZodDate;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
total: z.ZodNumber;
|
|
32
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
33
|
+
export declare const deleteBlogPost: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
34
|
+
id: z.ZodNumber;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
success: z.ZodBoolean;
|
|
37
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
38
|
+
//# sourceMappingURL=blog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/blog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAYzB,eAAO,MAAM,eAAe;;;;;;;;;;;;;8DAEqC,CAAC;AAElE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;8DAwBxB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;8DAEiB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
const blogPostImportSchema = z.object({
|
|
4
|
+
title: z.string(),
|
|
5
|
+
slug: z.string(),
|
|
6
|
+
keyword: z.string().optional(),
|
|
7
|
+
content: z.string(),
|
|
8
|
+
metaDescription: z.string().optional(),
|
|
9
|
+
coverImage: z.string().optional(),
|
|
10
|
+
publishedAt: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export const importBlogPosts = oc
|
|
13
|
+
.input(z.object({ posts: z.array(blogPostImportSchema) }))
|
|
14
|
+
.output(z.object({ imported: z.number(), skipped: z.number() }));
|
|
15
|
+
export const listBlogPosts = oc
|
|
16
|
+
.input(z.object({
|
|
17
|
+
search: z.string().optional(),
|
|
18
|
+
offset: z.number().int().min(0).default(0),
|
|
19
|
+
limit: z.number().int().min(1).max(100).default(15),
|
|
20
|
+
}))
|
|
21
|
+
.output(z.object({
|
|
22
|
+
posts: z.array(z.object({
|
|
23
|
+
id: z.number(),
|
|
24
|
+
title: z.string(),
|
|
25
|
+
slug: z.string(),
|
|
26
|
+
keyword: z.string().nullable(),
|
|
27
|
+
metaDescription: z.string().nullable(),
|
|
28
|
+
coverImage: z.string().nullable(),
|
|
29
|
+
publishedAt: z.date(),
|
|
30
|
+
createdAt: z.date(),
|
|
31
|
+
})),
|
|
32
|
+
total: z.number(),
|
|
33
|
+
}));
|
|
34
|
+
export const deleteBlogPost = oc
|
|
35
|
+
.input(z.object({ id: z.number() }))
|
|
36
|
+
.output(z.object({ success: z.boolean() }));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const resolveFeedback: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
resolved: z.ZodBoolean;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
success: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
8
|
+
export declare const listFeedback: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
9
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
11
|
+
type: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
feedback: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodNumber;
|
|
15
|
+
type: z.ZodString;
|
|
16
|
+
message: z.ZodString;
|
|
17
|
+
resolved: z.ZodBoolean;
|
|
18
|
+
userName: z.ZodString;
|
|
19
|
+
userEmail: z.ZodString;
|
|
20
|
+
createdAt: z.ZodDate;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
total: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
24
|
+
export declare const listFreeFeedback: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
25
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
type: z.ZodOptional<z.ZodString>;
|
|
28
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
feedback: z.ZodArray<z.ZodObject<{
|
|
31
|
+
id: z.ZodNumber;
|
|
32
|
+
tool: z.ZodString;
|
|
33
|
+
type: z.ZodString;
|
|
34
|
+
message: z.ZodString;
|
|
35
|
+
email: z.ZodString;
|
|
36
|
+
ip: z.ZodString;
|
|
37
|
+
resolved: z.ZodBoolean;
|
|
38
|
+
createdAt: z.ZodDate;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
total: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
42
|
+
export declare const resolveFreeFeedback: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
43
|
+
id: z.ZodNumber;
|
|
44
|
+
resolved: z.ZodBoolean;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
success: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
48
|
+
//# sourceMappingURL=feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/feedback.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,eAAe;;;;;8DAOgB,CAAC;AAE7C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;8DAuBvB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;8DAyB3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;8DAOY,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
export const resolveFeedback = oc
|
|
4
|
+
.input(z.object({
|
|
5
|
+
id: z.number(),
|
|
6
|
+
resolved: z.boolean(),
|
|
7
|
+
}))
|
|
8
|
+
.output(z.object({ success: z.boolean() }));
|
|
9
|
+
export const listFeedback = oc
|
|
10
|
+
.input(z.object({
|
|
11
|
+
offset: z.number().int().min(0).default(0),
|
|
12
|
+
limit: z.number().int().min(1).max(100).default(15),
|
|
13
|
+
type: z.string().optional(),
|
|
14
|
+
}))
|
|
15
|
+
.output(z.object({
|
|
16
|
+
feedback: z.array(z.object({
|
|
17
|
+
id: z.number(),
|
|
18
|
+
type: z.string(),
|
|
19
|
+
message: z.string(),
|
|
20
|
+
resolved: z.boolean(),
|
|
21
|
+
userName: z.string(),
|
|
22
|
+
userEmail: z.string(),
|
|
23
|
+
createdAt: z.date(),
|
|
24
|
+
})),
|
|
25
|
+
total: z.number(),
|
|
26
|
+
}));
|
|
27
|
+
export const listFreeFeedback = oc
|
|
28
|
+
.input(z.object({
|
|
29
|
+
offset: z.number().int().min(0).default(0),
|
|
30
|
+
limit: z.number().int().min(1).max(100).default(15),
|
|
31
|
+
type: z.string().optional(),
|
|
32
|
+
tool: z.string().optional(),
|
|
33
|
+
}))
|
|
34
|
+
.output(z.object({
|
|
35
|
+
feedback: z.array(z.object({
|
|
36
|
+
id: z.number(),
|
|
37
|
+
tool: z.string(),
|
|
38
|
+
type: z.string(),
|
|
39
|
+
message: z.string(),
|
|
40
|
+
email: z.string(),
|
|
41
|
+
ip: z.string(),
|
|
42
|
+
resolved: z.boolean(),
|
|
43
|
+
createdAt: z.date(),
|
|
44
|
+
})),
|
|
45
|
+
total: z.number(),
|
|
46
|
+
}));
|
|
47
|
+
export const resolveFreeFeedback = oc
|
|
48
|
+
.input(z.object({
|
|
49
|
+
id: z.number(),
|
|
50
|
+
resolved: z.boolean(),
|
|
51
|
+
}))
|
|
52
|
+
.output(z.object({ success: z.boolean() }));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const listInstances: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
domain: z.ZodString;
|
|
6
|
+
isGeneral: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strip>>, Record<never, never>, Record<never, never>>;
|
|
8
|
+
//# sourceMappingURL=instances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../../../../lib/contract/gateway/router/admin/instances.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,aAAa;;;;;+DASzB,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const syncFreeUsage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
3
|
+
success: z.ZodBoolean;
|
|
4
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
5
|
+
export declare const getFreeUsageOverview: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
totalRequests: z.ZodNumber;
|
|
7
|
+
successCount: z.ZodNumber;
|
|
8
|
+
userErrorCount: z.ZodNumber;
|
|
9
|
+
systemErrorCount: z.ZodNumber;
|
|
10
|
+
avgDuration: z.ZodNumber;
|
|
11
|
+
p95Duration: z.ZodNumber;
|
|
12
|
+
uniqueIps: z.ZodNumber;
|
|
13
|
+
avgPages: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
totalFileSize: z.ZodNumber;
|
|
15
|
+
daily: z.ZodArray<z.ZodObject<{
|
|
16
|
+
date: z.ZodString;
|
|
17
|
+
counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
dailyOperations: z.ZodArray<z.ZodString>;
|
|
20
|
+
byOperation: z.ZodArray<z.ZodObject<{
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
count: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
byIp: z.ZodArray<z.ZodObject<{
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
count: z.ZodNumber;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
byModel: z.ZodArray<z.ZodObject<{
|
|
29
|
+
label: z.ZodString;
|
|
30
|
+
count: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
byDocumentType: z.ZodArray<z.ZodObject<{
|
|
33
|
+
label: z.ZodString;
|
|
34
|
+
count: z.ZodNumber;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
topSystemErrors: z.ZodArray<z.ZodObject<{
|
|
37
|
+
message: z.ZodString;
|
|
38
|
+
count: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
topUserErrors: z.ZodArray<z.ZodObject<{
|
|
41
|
+
message: z.ZodString;
|
|
42
|
+
count: z.ZodNumber;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
45
|
+
export declare const listFreeUsage: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
46
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
47
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
49
|
+
all: "all";
|
|
50
|
+
success: "success";
|
|
51
|
+
system_error: "system_error";
|
|
52
|
+
user_error: "user_error";
|
|
53
|
+
}>>;
|
|
54
|
+
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
55
|
+
createdAt: "createdAt";
|
|
56
|
+
duration: "duration";
|
|
57
|
+
ip: "ip";
|
|
58
|
+
operation: "operation";
|
|
59
|
+
}>>;
|
|
60
|
+
sortOrder: z.ZodDefault<z.ZodEnum<{
|
|
61
|
+
asc: "asc";
|
|
62
|
+
desc: "desc";
|
|
63
|
+
}>>;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
items: z.ZodArray<z.ZodObject<{
|
|
66
|
+
id: z.ZodNumber;
|
|
67
|
+
instanceId: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
remoteId: z.ZodNumber;
|
|
69
|
+
operation: z.ZodString;
|
|
70
|
+
ip: z.ZodString;
|
|
71
|
+
source: z.ZodDefault<z.ZodEnum<{
|
|
72
|
+
api: "api";
|
|
73
|
+
make: "make";
|
|
74
|
+
mcp: "mcp";
|
|
75
|
+
n8n: "n8n";
|
|
76
|
+
playground: "playground";
|
|
77
|
+
sdk: "sdk";
|
|
78
|
+
unknown: "unknown";
|
|
79
|
+
zapier: "zapier";
|
|
80
|
+
}>>;
|
|
81
|
+
model: z.ZodNullable<z.ZodString>;
|
|
82
|
+
inputSource: z.ZodNullable<z.ZodString>;
|
|
83
|
+
inputRef: z.ZodNullable<z.ZodString>;
|
|
84
|
+
fileSize: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
documentType: z.ZodNullable<z.ZodString>;
|
|
86
|
+
pageCount: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
error: z.ZodNullable<z.ZodString>;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
success: "success";
|
|
90
|
+
system_error: "system_error";
|
|
91
|
+
user_error: "user_error";
|
|
92
|
+
}>;
|
|
93
|
+
errorStage: z.ZodNullable<z.ZodEnum<{
|
|
94
|
+
auth: "auth";
|
|
95
|
+
preprocessing: "preprocessing";
|
|
96
|
+
processing: "processing";
|
|
97
|
+
validation: "validation";
|
|
98
|
+
}>>;
|
|
99
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
100
|
+
duration: z.ZodNumber;
|
|
101
|
+
createdAt: z.ZodDate;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
total: z.ZodNumber;
|
|
104
|
+
successCount: z.ZodNumber;
|
|
105
|
+
userErrorCount: z.ZodNumber;
|
|
106
|
+
systemErrorCount: z.ZodNumber;
|
|
107
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
108
|
+
//# sourceMappingURL=free.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"free.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/free.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,aAAa;;8DAEkB,CAAC;AAE7C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DAuDhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA6CxB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { apiSources } from "@pdfvector/util";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
export const syncFreeUsage = oc
|
|
5
|
+
.input(z.object({}))
|
|
6
|
+
.output(z.object({ success: z.boolean() }));
|
|
7
|
+
export const getFreeUsageOverview = oc.input(z.object({})).output(z.object({
|
|
8
|
+
totalRequests: z.number(),
|
|
9
|
+
successCount: z.number(),
|
|
10
|
+
userErrorCount: z.number(),
|
|
11
|
+
systemErrorCount: z.number(),
|
|
12
|
+
avgDuration: z.number(),
|
|
13
|
+
p95Duration: z.number(),
|
|
14
|
+
uniqueIps: z.number(),
|
|
15
|
+
avgPages: z.number().nullable(),
|
|
16
|
+
totalFileSize: z.number(),
|
|
17
|
+
daily: z.array(z.object({
|
|
18
|
+
date: z.string(),
|
|
19
|
+
counts: z.record(z.string(), z.number()),
|
|
20
|
+
})),
|
|
21
|
+
dailyOperations: z.array(z.string()),
|
|
22
|
+
byOperation: z.array(z.object({
|
|
23
|
+
label: z.string(),
|
|
24
|
+
count: z.number(),
|
|
25
|
+
})),
|
|
26
|
+
byIp: z.array(z.object({
|
|
27
|
+
label: z.string(),
|
|
28
|
+
count: z.number(),
|
|
29
|
+
})),
|
|
30
|
+
byModel: z.array(z.object({
|
|
31
|
+
label: z.string(),
|
|
32
|
+
count: z.number(),
|
|
33
|
+
})),
|
|
34
|
+
byDocumentType: z.array(z.object({
|
|
35
|
+
label: z.string(),
|
|
36
|
+
count: z.number(),
|
|
37
|
+
})),
|
|
38
|
+
topSystemErrors: z.array(z.object({
|
|
39
|
+
message: z.string(),
|
|
40
|
+
count: z.number(),
|
|
41
|
+
})),
|
|
42
|
+
topUserErrors: z.array(z.object({
|
|
43
|
+
message: z.string(),
|
|
44
|
+
count: z.number(),
|
|
45
|
+
})),
|
|
46
|
+
}));
|
|
47
|
+
export const listFreeUsage = oc
|
|
48
|
+
.input(z.object({
|
|
49
|
+
page: z.number().int().min(1).default(1),
|
|
50
|
+
pageSize: z.number().int().min(1).max(100).default(20),
|
|
51
|
+
status: z
|
|
52
|
+
.enum(["all", "success", "user_error", "system_error"])
|
|
53
|
+
.default("all"),
|
|
54
|
+
sortBy: z
|
|
55
|
+
.enum(["createdAt", "operation", "ip", "duration"])
|
|
56
|
+
.default("createdAt"),
|
|
57
|
+
sortOrder: z.enum(["asc", "desc"]).default("desc"),
|
|
58
|
+
}))
|
|
59
|
+
.output(z.object({
|
|
60
|
+
items: z.array(z.object({
|
|
61
|
+
id: z.number(),
|
|
62
|
+
instanceId: z.number().nullable(),
|
|
63
|
+
remoteId: z.number(),
|
|
64
|
+
operation: z.string(),
|
|
65
|
+
ip: z.string(),
|
|
66
|
+
source: z.enum(apiSources).default("unknown"),
|
|
67
|
+
model: z.string().nullable(),
|
|
68
|
+
inputSource: z.string().nullable(),
|
|
69
|
+
inputRef: z.string().nullable(),
|
|
70
|
+
fileSize: z.number().nullable(),
|
|
71
|
+
documentType: z.string().nullable(),
|
|
72
|
+
pageCount: z.number().nullable(),
|
|
73
|
+
error: z.string().nullable(),
|
|
74
|
+
status: z.enum(["success", "user_error", "system_error"]),
|
|
75
|
+
errorStage: z
|
|
76
|
+
.enum(["auth", "validation", "preprocessing", "processing"])
|
|
77
|
+
.nullable(),
|
|
78
|
+
errorCode: z.string().nullable(),
|
|
79
|
+
duration: z.number(),
|
|
80
|
+
createdAt: z.date(),
|
|
81
|
+
})),
|
|
82
|
+
total: z.number(),
|
|
83
|
+
successCount: z.number(),
|
|
84
|
+
userErrorCount: z.number(),
|
|
85
|
+
systemErrorCount: z.number(),
|
|
86
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../lib/contract/gateway/router/admin/usage/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|