@pdfvector/instance-contract 0.0.42 → 0.0.44

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.
Files changed (49) hide show
  1. package/.tsc/lib/fetchable-url-schema.d.ts +2 -0
  2. package/.tsc/lib/fetchable-url-schema.js +13 -0
  3. package/.tsc/lib/index.d.ts +3 -3
  4. package/.tsc/lib/index.js +3 -3
  5. package/.tsc/lib/pdfvector-model.d.ts +1 -1
  6. package/.tsc/lib/router/academic/fetch.d.ts +1 -1
  7. package/.tsc/lib/router/academic/fetch.js +1 -1
  8. package/.tsc/lib/router/academic/find-citations.d.ts +1 -1
  9. package/.tsc/lib/router/academic/find-citations.js +1 -1
  10. package/.tsc/lib/router/academic/index.d.ts +6 -6
  11. package/.tsc/lib/router/academic/index.js +6 -6
  12. package/.tsc/lib/router/academic/paper-graph.d.ts +1 -1
  13. package/.tsc/lib/router/academic/paper-graph.js +1 -1
  14. package/.tsc/lib/router/academic/search-grants.js +1 -1
  15. package/.tsc/lib/router/academic/search.d.ts +1 -1
  16. package/.tsc/lib/router/academic/search.js +1 -1
  17. package/.tsc/lib/router/academic/similar-papers.d.ts +1 -1
  18. package/.tsc/lib/router/academic/similar-papers.js +1 -1
  19. package/.tsc/lib/router/admin/index.d.ts +6 -6
  20. package/.tsc/lib/router/admin/index.js +6 -6
  21. package/.tsc/lib/router/authenticate/index.d.ts +1 -1
  22. package/.tsc/lib/router/authenticate/index.js +1 -1
  23. package/.tsc/lib/router/bankStatement/ask.js +6 -8
  24. package/.tsc/lib/router/bankStatement/extract.js +7 -9
  25. package/.tsc/lib/router/bankStatement/index.d.ts +3 -3
  26. package/.tsc/lib/router/bankStatement/index.js +3 -3
  27. package/.tsc/lib/router/bankStatement/parse.js +5 -7
  28. package/.tsc/lib/router/document/ask.js +6 -8
  29. package/.tsc/lib/router/document/extract.js +7 -9
  30. package/.tsc/lib/router/document/index.d.ts +3 -3
  31. package/.tsc/lib/router/document/index.js +3 -3
  32. package/.tsc/lib/router/document/parse.js +6 -8
  33. package/.tsc/lib/router/free/bank-statement-parse.js +3 -3
  34. package/.tsc/lib/router/free/index.d.ts +4 -4
  35. package/.tsc/lib/router/free/index.js +4 -4
  36. package/.tsc/lib/router/identity/ask.js +6 -8
  37. package/.tsc/lib/router/identity/extract.js +7 -9
  38. package/.tsc/lib/router/identity/index.d.ts +3 -3
  39. package/.tsc/lib/router/identity/index.js +3 -3
  40. package/.tsc/lib/router/identity/parse.js +5 -7
  41. package/.tsc/lib/router/index.d.ts +8 -8
  42. package/.tsc/lib/router/index.js +8 -8
  43. package/.tsc/lib/router/invoice/ask.js +6 -8
  44. package/.tsc/lib/router/invoice/extract.js +7 -9
  45. package/.tsc/lib/router/invoice/index.d.ts +3 -3
  46. package/.tsc/lib/router/invoice/index.js +3 -3
  47. package/.tsc/lib/router/invoice/parse.js +5 -7
  48. package/CHANGELOG.md +17 -0
  49. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import { z } from "zod";
2
+ export declare const fetchableUrlSchema: z.ZodURL;
@@ -0,0 +1,13 @@
1
+ import { z } from "zod";
2
+ function isFetchableUrl(value) {
3
+ try {
4
+ const url = new URL(value);
5
+ return url.protocol === "http:" || url.protocol === "https:";
6
+ }
7
+ catch {
8
+ return false;
9
+ }
10
+ }
11
+ export const fetchableUrlSchema = z.url().refine(isFetchableUrl, {
12
+ message: "URL must use http or https",
13
+ });
@@ -1,11 +1,11 @@
1
1
  import type { InferContractRouterInputs, InferContractRouterOutputs } from "@orpc/contract";
2
- import * as contract from "./router";
2
+ import * as contract from "./router/index.js";
3
3
  export { contract };
4
4
  export type ContractInputs = InferContractRouterInputs<typeof contract>;
5
5
  export type ContractOutputs = InferContractRouterOutputs<typeof contract>;
6
6
  import { createORPCClient, ORPCError, onError } from "@orpc/client";
7
7
  import { RPCLink } from "@orpc/client/fetch";
8
8
  export type { ContractRouterClient } from "@orpc/contract";
9
- export * from "./pdfvector-model";
10
- export * from "./pdfvector-model-schema";
9
+ export * from "./pdfvector-model.js";
10
+ export * from "./pdfvector-model-schema.js";
11
11
  export { createORPCClient, ORPCError, onError, RPCLink };
package/.tsc/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import * as contract from "./router";
1
+ import * as contract from "./router/index.js";
2
2
  export { contract };
3
3
  import { createORPCClient, ORPCError, onError } from "@orpc/client";
4
4
  import { RPCLink } from "@orpc/client/fetch";
5
- export * from "./pdfvector-model";
6
- export * from "./pdfvector-model-schema";
5
+ export * from "./pdfvector-model.js";
6
+ export * from "./pdfvector-model-schema.js";
7
7
  export { createORPCClient, ORPCError, onError, RPCLink };
@@ -1,3 +1,3 @@
1
1
  import type { z } from "zod";
2
- import type { pdfvectorModelSchema } from "./pdfvector-model-schema";
2
+ import type { pdfvectorModelSchema } from "./pdfvector-model-schema.js";
3
3
  export type PDFVectorModel = z.infer<typeof pdfvectorModelSchema>;
@@ -2,8 +2,8 @@ import { z } from "zod";
2
2
  export declare const fetch: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
3
3
  ids: z.ZodArray<z.ZodString>;
4
4
  fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
5
- year: "year";
6
5
  url: "url";
6
+ year: "year";
7
7
  doi: "doi";
8
8
  title: "title";
9
9
  providerURL: "providerURL";
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { academicCreditCosts } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
- import { providerSchema } from "./provider";
4
+ import { providerSchema } from "./provider.js";
5
5
  const authorSchema = z.object({
6
6
  name: z.string(),
7
7
  url: z.string().nullish(),
@@ -12,8 +12,8 @@ export declare const findCitations: import("@orpc/contract").ContractProcedureBu
12
12
  crossref: "crossref";
13
13
  }>>>;
14
14
  fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
15
- year: "year";
16
15
  url: "url";
16
+ year: "year";
17
17
  doi: "doi";
18
18
  title: "title";
19
19
  providerURL: "providerURL";
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { academicCreditCosts } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
- import { providerSchema } from "./provider";
4
+ import { providerSchema } from "./provider.js";
5
5
  const authorSchema = z.object({
6
6
  name: z.string(),
7
7
  url: z.string().nullish(),
@@ -1,6 +1,6 @@
1
- export * from "./fetch";
2
- export * from "./find-citations";
3
- export * from "./paper-graph";
4
- export * from "./search";
5
- export * from "./search-grants";
6
- export * from "./similar-papers";
1
+ export * from "./fetch.js";
2
+ export * from "./find-citations.js";
3
+ export * from "./paper-graph.js";
4
+ export * from "./search.js";
5
+ export * from "./search-grants.js";
6
+ export * from "./similar-papers.js";
@@ -1,6 +1,6 @@
1
- export * from "./fetch";
2
- export * from "./find-citations";
3
- export * from "./paper-graph";
4
- export * from "./search";
5
- export * from "./search-grants";
6
- export * from "./similar-papers";
1
+ export * from "./fetch.js";
2
+ export * from "./find-citations.js";
3
+ export * from "./paper-graph.js";
4
+ export * from "./search.js";
5
+ export * from "./search-grants.js";
6
+ export * from "./similar-papers.js";
@@ -6,8 +6,8 @@ export declare const paperGraph: import("@orpc/contract").ContractProcedureBuild
6
6
  citationsOffset: z.ZodDefault<z.ZodNumber>;
7
7
  referencesOffset: z.ZodDefault<z.ZodNumber>;
8
8
  fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
9
- year: "year";
10
9
  url: "url";
10
+ year: "year";
11
11
  doi: "doi";
12
12
  title: "title";
13
13
  providerURL: "providerURL";
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { academicCreditCosts } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
- import { providerSchema } from "./provider";
4
+ import { providerSchema } from "./provider.js";
5
5
  const authorSchema = z.object({
6
6
  name: z.string(),
7
7
  url: z.string().nullish(),
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { academicCreditCosts } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
- import { grantProviderSchema } from "./provider";
4
+ import { grantProviderSchema } from "./provider.js";
5
5
  const grantSchema = z.object({
6
6
  sourceId: z.string().nullish(),
7
7
  title: z.string().nullish(),
@@ -16,8 +16,8 @@ export declare const search: import("@orpc/contract").ContractProcedureBuilderWi
16
16
  yearFrom: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
17
17
  yearTo: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
18
18
  fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
19
- year: "year";
20
19
  url: "url";
20
+ year: "year";
21
21
  doi: "doi";
22
22
  title: "title";
23
23
  providerURL: "providerURL";
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { academicCreditCosts } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
- import { providerSchema } from "./provider";
4
+ import { providerSchema } from "./provider.js";
5
5
  const authorSchema = z.object({
6
6
  name: z.string(),
7
7
  url: z.string().nullish(),
@@ -4,8 +4,8 @@ export declare const similarPapers: import("@orpc/contract").ContractProcedureBu
4
4
  limit: z.ZodDefault<z.ZodNumber>;
5
5
  includeEdges: z.ZodDefault<z.ZodBoolean>;
6
6
  fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
7
- year: "year";
8
7
  url: "url";
8
+ year: "year";
9
9
  doi: "doi";
10
10
  title: "title";
11
11
  providerURL: "providerURL";
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { academicCreditCosts } from "@pdfvector/util";
3
3
  import { z } from "zod";
4
- import { providerSchema } from "./provider";
4
+ import { providerSchema } from "./provider.js";
5
5
  const authorSchema = z.object({
6
6
  name: z.string(),
7
7
  url: z.string().nullish(),
@@ -1,6 +1,6 @@
1
- export * from "./get-free-usage-records";
2
- export * from "./get-usage-records";
3
- export * from "./health-check";
4
- export * from "./set-domain";
5
- export * from "./set-environment";
6
- export * from "./set-version";
1
+ export * from "./get-free-usage-records.js";
2
+ export * from "./get-usage-records.js";
3
+ export * from "./health-check.js";
4
+ export * from "./set-domain.js";
5
+ export * from "./set-environment.js";
6
+ export * from "./set-version.js";
@@ -1,6 +1,6 @@
1
- export * from "./get-free-usage-records";
2
- export * from "./get-usage-records";
3
- export * from "./health-check";
4
- export * from "./set-domain";
5
- export * from "./set-environment";
6
- export * from "./set-version";
1
+ export * from "./get-free-usage-records.js";
2
+ export * from "./get-usage-records.js";
3
+ export * from "./health-check.js";
4
+ export * from "./set-domain.js";
5
+ export * from "./set-environment.js";
6
+ export * from "./set-version.js";
@@ -1 +1 @@
1
- export * from "./validate-credential";
1
+ export * from "./validate-credential.js";
@@ -1 +1 @@
1
- export * from "./validate-credential";
1
+ export * from "./validate-credential.js";
@@ -1,14 +1,14 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
4
- import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
5
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
5
+ import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
6
+ import { getDefaultSpec } from "./get-default-spec.js";
6
7
  const specializedModelSchema = z
7
8
  .enum(["auto", ...pdfvectorModelSchema.options])
8
9
  .default("auto");
9
10
  const askInputSchema = z.object({
10
- url: z
11
- .url()
11
+ url: fetchableUrlSchema
12
12
  .optional()
13
13
  .describe("URL of the bank statement file to fetch and parse"),
14
14
  file: z
@@ -27,9 +27,7 @@ const askInputSchema = z.object({
27
27
  model: specializedModelSchema.describe(specializedAskModelDescription),
28
28
  callback: z
29
29
  .object({
30
- url: z
31
- .url()
32
- .describe("Webhook URL where results will be POSTed when processing completes"),
30
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
33
31
  type: z
34
32
  .string()
35
33
  .optional()
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { jsonSchemaInput } from "../../json-schema-input";
4
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
5
- import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
6
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { jsonSchemaInput } from "../../json-schema-input.js";
5
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
6
+ import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
7
+ import { getDefaultSpec } from "./get-default-spec.js";
7
8
  const specializedModelSchema = z
8
9
  .enum(["auto", ...pdfvectorModelSchema.options])
9
10
  .default("auto");
10
11
  const extractInputSchema = z.object({
11
- url: z
12
- .url()
12
+ url: fetchableUrlSchema
13
13
  .optional()
14
14
  .describe("URL of the bank statement file to fetch and parse"),
15
15
  file: z
@@ -29,9 +29,7 @@ const extractInputSchema = z.object({
29
29
  model: specializedModelSchema.describe(specializedExtractModelDescription),
30
30
  callback: z
31
31
  .object({
32
- url: z
33
- .url()
34
- .describe("Webhook URL where results will be POSTed when processing completes"),
32
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
35
33
  type: z
36
34
  .string()
37
35
  .optional()
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
4
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
5
+ import { getDefaultSpec } from "./get-default-spec.js";
5
6
  const specializedParseModelSchema = z
6
7
  .enum(["pro", "max", "auto"], {
7
8
  message: "model must be one of: pro, max, auto",
8
9
  })
9
10
  .default("auto");
10
11
  const parseInputSchema = z.object({
11
- url: z
12
- .url()
12
+ url: fetchableUrlSchema
13
13
  .optional()
14
14
  .describe("URL of the bank statement file to fetch and parse"),
15
15
  file: z
@@ -24,9 +24,7 @@ const parseInputSchema = z.object({
24
24
  model: specializedParseModelSchema.describe(specializedParseModelDescription("bank statement")),
25
25
  callback: z
26
26
  .object({
27
- url: z
28
- .url()
29
- .describe("Webhook URL where results will be POSTed when processing completes"),
27
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
30
28
  type: z
31
29
  .string()
32
30
  .optional()
@@ -1,11 +1,11 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
4
- import { documentAskModelDescription, outputAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
5
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
5
+ import { documentAskModelDescription, outputAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
6
+ import { getDefaultSpec } from "./get-default-spec.js";
6
7
  const askInputSchema = z.object({
7
- url: z
8
- .url()
8
+ url: fetchableUrlSchema
9
9
  .optional()
10
10
  .describe("URL of the document file to fetch and parse"),
11
11
  file: z
@@ -28,9 +28,7 @@ const askInputSchema = z.object({
28
28
  .describe(documentAskModelDescription),
29
29
  callback: z
30
30
  .object({
31
- url: z
32
- .url()
33
- .describe("Webhook URL where results will be POSTed when processing completes"),
31
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
34
32
  type: z
35
33
  .string()
36
34
  .optional()
@@ -1,12 +1,12 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { jsonSchemaInput } from "../../json-schema-input";
4
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
5
- import { documentExtractModelDescription, outputExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
6
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { jsonSchemaInput } from "../../json-schema-input.js";
5
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
6
+ import { documentExtractModelDescription, outputExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
7
+ import { getDefaultSpec } from "./get-default-spec.js";
7
8
  const extractInputSchema = z.object({
8
- url: z
9
- .url()
9
+ url: fetchableUrlSchema
10
10
  .optional()
11
11
  .describe("URL of the document file to fetch and parse"),
12
12
  file: z
@@ -30,9 +30,7 @@ const extractInputSchema = z.object({
30
30
  .describe(documentExtractModelDescription),
31
31
  callback: z
32
32
  .object({
33
- url: z
34
- .url()
35
- .describe("Webhook URL where results will be POSTed when processing completes"),
33
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
36
34
  type: z
37
35
  .string()
38
36
  .optional()
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,11 +1,11 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
4
- import { documentParseModelDescription, outputModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
5
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
5
+ import { documentParseModelDescription, outputModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
6
+ import { getDefaultSpec } from "./get-default-spec.js";
6
7
  const parseInputSchema = z.object({
7
- url: z
8
- .url()
8
+ url: fetchableUrlSchema
9
9
  .optional()
10
10
  .describe("URL of the document file to fetch and parse"),
11
11
  file: z
@@ -24,9 +24,7 @@ const parseInputSchema = z.object({
24
24
  .describe(documentParseModelDescription),
25
25
  callback: z
26
26
  .object({
27
- url: z
28
- .url()
29
- .describe("Webhook URL where results will be POSTed when processing completes"),
27
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
30
28
  type: z
31
29
  .string()
32
30
  .optional()
@@ -1,9 +1,9 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
4
5
  const inputSchema = z.object({
5
- url: z
6
- .url()
6
+ url: fetchableUrlSchema
7
7
  .optional()
8
8
  .describe("URL of the bank statement file to fetch and parse"),
9
9
  file: z
@@ -1,4 +1,4 @@
1
- export { bankStatementParse } from "./bank-statement-parse";
2
- export { generateSchema } from "./generate-schema";
3
- export { publicationPdfUrl } from "./publication-pdf-url";
4
- export { rateLimitStatus } from "./rate-limit-status";
1
+ export { bankStatementParse } from "./bank-statement-parse.js";
2
+ export { generateSchema } from "./generate-schema.js";
3
+ export { publicationPdfUrl } from "./publication-pdf-url.js";
4
+ export { rateLimitStatus } from "./rate-limit-status.js";
@@ -1,4 +1,4 @@
1
- export { bankStatementParse } from "./bank-statement-parse";
2
- export { generateSchema } from "./generate-schema";
3
- export { publicationPdfUrl } from "./publication-pdf-url";
4
- export { rateLimitStatus } from "./rate-limit-status";
1
+ export { bankStatementParse } from "./bank-statement-parse.js";
2
+ export { generateSchema } from "./generate-schema.js";
3
+ export { publicationPdfUrl } from "./publication-pdf-url.js";
4
+ export { rateLimitStatus } from "./rate-limit-status.js";
@@ -1,14 +1,14 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
4
- import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
5
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
5
+ import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
6
+ import { getDefaultSpec } from "./get-default-spec.js";
6
7
  const specializedModelSchema = z
7
8
  .enum(["auto", ...pdfvectorModelSchema.options])
8
9
  .default("auto");
9
10
  const askInputSchema = z.object({
10
- url: z
11
- .url()
11
+ url: fetchableUrlSchema
12
12
  .optional()
13
13
  .describe("URL of the identity document file to fetch and parse"),
14
14
  file: z
@@ -27,9 +27,7 @@ const askInputSchema = z.object({
27
27
  model: specializedModelSchema.describe(specializedAskModelDescription),
28
28
  callback: z
29
29
  .object({
30
- url: z
31
- .url()
32
- .describe("Webhook URL where results will be POSTed when processing completes"),
30
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
33
31
  type: z
34
32
  .string()
35
33
  .optional()
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { jsonSchemaInput } from "../../json-schema-input";
4
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
5
- import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
6
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { jsonSchemaInput } from "../../json-schema-input.js";
5
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
6
+ import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
7
+ import { getDefaultSpec } from "./get-default-spec.js";
7
8
  const specializedModelSchema = z
8
9
  .enum(["auto", ...pdfvectorModelSchema.options])
9
10
  .default("auto");
10
11
  const extractInputSchema = z.object({
11
- url: z
12
- .url()
12
+ url: fetchableUrlSchema
13
13
  .optional()
14
14
  .describe("URL of the identity document file to fetch and parse"),
15
15
  file: z
@@ -29,9 +29,7 @@ const extractInputSchema = z.object({
29
29
  model: specializedModelSchema.describe(specializedExtractModelDescription),
30
30
  callback: z
31
31
  .object({
32
- url: z
33
- .url()
34
- .describe("Webhook URL where results will be POSTed when processing completes"),
32
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
35
33
  type: z
36
34
  .string()
37
35
  .optional()
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
4
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
5
+ import { getDefaultSpec } from "./get-default-spec.js";
5
6
  const specializedParseModelSchema = z
6
7
  .enum(["pro", "max", "auto"], {
7
8
  message: "model must be one of: pro, max, auto",
8
9
  })
9
10
  .default("auto");
10
11
  const parseInputSchema = z.object({
11
- url: z
12
- .url()
12
+ url: fetchableUrlSchema
13
13
  .optional()
14
14
  .describe("URL of the identity document file to fetch and parse"),
15
15
  file: z
@@ -24,9 +24,7 @@ const parseInputSchema = z.object({
24
24
  model: specializedParseModelSchema.describe(specializedParseModelDescription("identity document")),
25
25
  callback: z
26
26
  .object({
27
- url: z
28
- .url()
29
- .describe("Webhook URL where results will be POSTed when processing completes"),
27
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
30
28
  type: z
31
29
  .string()
32
30
  .optional()
@@ -1,8 +1,8 @@
1
- export * as academic from "./academic";
2
- export * as admin from "./admin";
3
- export * as authenticate from "./authenticate";
4
- export * as bankStatement from "./bankStatement";
5
- export * as document from "./document";
6
- export * as free from "./free";
7
- export * as identity from "./identity";
8
- export * as invoice from "./invoice";
1
+ export * as academic from "./academic/index.js";
2
+ export * as admin from "./admin/index.js";
3
+ export * as authenticate from "./authenticate/index.js";
4
+ export * as bankStatement from "./bankStatement/index.js";
5
+ export * as document from "./document/index.js";
6
+ export * as free from "./free/index.js";
7
+ export * as identity from "./identity/index.js";
8
+ export * as invoice from "./invoice/index.js";
@@ -1,8 +1,8 @@
1
- export * as academic from "./academic";
2
- export * as admin from "./admin";
3
- export * as authenticate from "./authenticate";
4
- export * as bankStatement from "./bankStatement";
5
- export * as document from "./document";
6
- export * as free from "./free";
7
- export * as identity from "./identity";
8
- export * as invoice from "./invoice";
1
+ export * as academic from "./academic/index.js";
2
+ export * as admin from "./admin/index.js";
3
+ export * as authenticate from "./authenticate/index.js";
4
+ export * as bankStatement from "./bankStatement/index.js";
5
+ export * as document from "./document/index.js";
6
+ export * as free from "./free/index.js";
7
+ export * as identity from "./identity/index.js";
8
+ export * as invoice from "./invoice/index.js";
@@ -1,14 +1,14 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
4
- import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
5
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
5
+ import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
6
+ import { getDefaultSpec } from "./get-default-spec.js";
6
7
  const specializedModelSchema = z
7
8
  .enum(["auto", ...pdfvectorModelSchema.options])
8
9
  .default("auto");
9
10
  const askInputSchema = z.object({
10
- url: z
11
- .url()
11
+ url: fetchableUrlSchema
12
12
  .optional()
13
13
  .describe("URL of the invoice file to fetch and parse"),
14
14
  file: z
@@ -24,9 +24,7 @@ const askInputSchema = z.object({
24
24
  model: specializedModelSchema.describe(specializedAskModelDescription),
25
25
  callback: z
26
26
  .object({
27
- url: z
28
- .url()
29
- .describe("Webhook URL where results will be POSTed when processing completes"),
27
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
30
28
  type: z
31
29
  .string()
32
30
  .optional()
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { jsonSchemaInput } from "../../json-schema-input";
4
- import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
5
- import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
6
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { jsonSchemaInput } from "../../json-schema-input.js";
5
+ import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
6
+ import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
7
+ import { getDefaultSpec } from "./get-default-spec.js";
7
8
  const specializedModelSchema = z
8
9
  .enum(["auto", ...pdfvectorModelSchema.options])
9
10
  .default("auto");
10
11
  const extractInputSchema = z.object({
11
- url: z
12
- .url()
12
+ url: fetchableUrlSchema
13
13
  .optional()
14
14
  .describe("URL of the invoice file to fetch and parse"),
15
15
  file: z
@@ -26,9 +26,7 @@ const extractInputSchema = z.object({
26
26
  model: specializedModelSchema.describe(specializedExtractModelDescription),
27
27
  callback: z
28
28
  .object({
29
- url: z
30
- .url()
31
- .describe("Webhook URL where results will be POSTed when processing completes"),
29
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
32
30
  type: z
33
31
  .string()
34
32
  .optional()
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,3 +1,3 @@
1
- export * from "./ask";
2
- export * from "./extract";
3
- export * from "./parse";
1
+ export * from "./ask.js";
2
+ export * from "./extract.js";
3
+ export * from "./parse.js";
@@ -1,15 +1,15 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
4
- import { getDefaultSpec } from "./get-default-spec";
3
+ import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
4
+ import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
5
+ import { getDefaultSpec } from "./get-default-spec.js";
5
6
  const specializedParseModelSchema = z
6
7
  .enum(["pro", "max", "auto"], {
7
8
  message: "model must be one of: pro, max, auto",
8
9
  })
9
10
  .default("auto");
10
11
  const parseInputSchema = z.object({
11
- url: z
12
- .url()
12
+ url: fetchableUrlSchema
13
13
  .optional()
14
14
  .describe("URL of the invoice file to fetch and parse"),
15
15
  file: z
@@ -21,9 +21,7 @@ const parseInputSchema = z.object({
21
21
  model: specializedParseModelSchema.describe(specializedParseModelDescription("invoice")),
22
22
  callback: z
23
23
  .object({
24
- url: z
25
- .url()
26
- .describe("Webhook URL where results will be POSTed when processing completes"),
24
+ url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
27
25
  type: z
28
26
  .string()
29
27
  .optional()
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @pdfvector/instance-contract
2
2
 
3
+ ## 0.0.44
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#232](https://github.com/phuctm97/pdfvector/pull/232) [`9baa3b9`](https://github.com/phuctm97/pdfvector/commit/9baa3b96ac3b6884eaf28aa466f04397e65fc43a) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Fix non-HTTP document URL validation
9
+
10
+ ## 0.0.43
11
+ ### Patch Changes
12
+
13
+
14
+
15
+ - [#226](https://github.com/phuctm97/pdfvector/pull/226) [`216ba54`](https://github.com/phuctm97/pdfvector/commit/216ba5427a32de5eb3346f0b3ff8d60f01fb8751) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Fix published ESM artifact import paths and bump zapier and make
16
+
17
+ - Updated dependencies [[`216ba54`](https://github.com/phuctm97/pdfvector/commit/216ba5427a32de5eb3346f0b3ff8d60f01fb8751)]:
18
+ - @pdfvector/util@0.0.22
19
+
3
20
  ## 0.0.42
4
21
  ### Patch Changes
5
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfvector/instance-contract",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "type": "module",
5
5
  "description": "API contract definitions for PDF Vector instance server",
6
6
  "license": "MIT",