@pdfvector/client 0.1.0 → 0.1.2
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/CHANGELOG.md +12 -0
- package/dist/contract.cjs +173 -9
- package/dist/contract.d.cts +307 -1
- package/dist/contract.d.mts +307 -1
- package/dist/contract.mjs +163 -10
- package/dist/index.cjs +54 -17
- package/dist/index.d.cts +145 -1
- package/dist/index.d.mts +145 -1
- package/dist/index.mjs +54 -17
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @pdfvector/client
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#551](https://github.com/phuctm97/pdfvector/pull/551) [`913a258`](https://github.com/phuctm97/pdfvector/commit/913a2585885f8787bc4cd27ae84d2586dab75378) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Export the retained-input and diagnostics schemas from `@pdfvector/client/contract` (they stay off the main entry).
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#532](https://github.com/phuctm97/pdfvector/pull/532) [`ea63f1f`](https://github.com/phuctm97/pdfvector/commit/ea63f1f2fa69da5aadac35991fb4a143da361d8a) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Upgrade every dependency to its newest release within the current major, including security fixes: better-auth 1.7.19 (GHSA magic-link/OAuth-proxy sign-in as another user, fixed in 1.7.7), the MCP TypeScript SDK 2.4.0 (request size limits, cross-client message delivery), Zod 4.6.7 (memory exhaustion on oversized collections) and nodemailer 10.5. Scalar API reference 1.77.0, Bun 1.4.4 and LibreOffice 26.8.2 for installer builds (the 25.8.5 download had been removed upstream).
|
|
14
|
+
|
|
3
15
|
## 0.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/contract.cjs
CHANGED
|
@@ -12,7 +12,7 @@ var __exportAll = (all, flags) => {
|
|
|
12
12
|
};
|
|
13
13
|
let zod = require("zod");
|
|
14
14
|
Array.isArray;
|
|
15
|
-
// ../../node_modules/.bun/@orpc+shared@1.
|
|
15
|
+
// ../../node_modules/.bun/@orpc+shared@1.16.2+e40b0dfdd726a224/node_modules/@orpc/shared/dist/index.mjs
|
|
16
16
|
function resolveMaybeOptionalOptions(rest) {
|
|
17
17
|
return rest[0] ?? {};
|
|
18
18
|
}
|
|
@@ -23,9 +23,9 @@ function getConstructor(value) {
|
|
|
23
23
|
function isTypescriptObject(value) {
|
|
24
24
|
return !!value && (typeof value === "object" || typeof value === "function");
|
|
25
25
|
}
|
|
26
|
-
// ../../node_modules/.bun/@orpc+client@1.
|
|
26
|
+
// ../../node_modules/.bun/@orpc+client@1.16.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.DeR0HTYb.mjs
|
|
27
27
|
const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
28
|
-
const ORPC_CLIENT_PACKAGE_VERSION = "1.
|
|
28
|
+
const ORPC_CLIENT_PACKAGE_VERSION = "1.16.2";
|
|
29
29
|
const COMMON_ORPC_ERROR_DEFS = {
|
|
30
30
|
BAD_REQUEST: {
|
|
31
31
|
status: 400,
|
|
@@ -164,7 +164,7 @@ let globalORPCErrorConstructors;
|
|
|
164
164
|
function isORPCErrorStatus(status) {
|
|
165
165
|
return status < 200 || status >= 400;
|
|
166
166
|
}
|
|
167
|
-
// ../../node_modules/.bun/@orpc+contract@1.
|
|
167
|
+
// ../../node_modules/.bun/@orpc+contract@1.16.2+e40b0dfdd726a224/node_modules/@orpc/contract/dist/shared/contract.D_dZrO__.mjs
|
|
168
168
|
function mergeErrorMap(errorMap1, errorMap2) {
|
|
169
169
|
return {
|
|
170
170
|
...errorMap1,
|
|
@@ -186,7 +186,7 @@ function isContractProcedure(item) {
|
|
|
186
186
|
if (item instanceof ContractProcedure) return true;
|
|
187
187
|
return (typeof item === "object" || typeof item === "function") && item !== null && "~orpc" in item && typeof item["~orpc"] === "object" && item["~orpc"] !== null && "errorMap" in item["~orpc"] && "route" in item["~orpc"] && "meta" in item["~orpc"];
|
|
188
188
|
}
|
|
189
|
-
// ../../node_modules/.bun/@orpc+contract@1.
|
|
189
|
+
// ../../node_modules/.bun/@orpc+contract@1.16.2+e40b0dfdd726a224/node_modules/@orpc/contract/dist/index.mjs
|
|
190
190
|
function mergeMeta(meta1, meta2) {
|
|
191
191
|
return {
|
|
192
192
|
...meta1,
|
|
@@ -444,6 +444,7 @@ const allTierFormats = [
|
|
|
444
444
|
"Word (.docx)",
|
|
445
445
|
"Excel (.xlsx)",
|
|
446
446
|
"PowerPoint (.pptx)",
|
|
447
|
+
"Word, Excel and PowerPoint 97-2003 (.doc, .xls, .ppt)",
|
|
447
448
|
"CSV",
|
|
448
449
|
"Text (.txt, .md, .tsv, .xml)",
|
|
449
450
|
"HTML",
|
|
@@ -455,9 +456,9 @@ const allTierFormats = [
|
|
|
455
456
|
/** Formats added by the pro/max/auto tiers. */
|
|
456
457
|
const proTierAdditionalFormats = ["Image (PNG, JPG, TIFF, BMP, HEIF)"];
|
|
457
458
|
/** Short human-readable summary of all supported formats. */
|
|
458
|
-
const allSupportedFormatsShort = "PDF, DOCX, XLSX, PPTX, CSV, PNG, JPG, TIFF, BMP, HEIF, TXT, MD, TSV, XML, RTF, HTML, ODT, ODS, ODP, EPUB, BIB, RIS, NBIB, ENW";
|
|
459
|
+
const allSupportedFormatsShort = "PDF, DOCX, XLSX, PPTX, DOC, XLS, PPT, CSV, PNG, JPG, TIFF, BMP, HEIF, TXT, MD, TSV, XML, RTF, HTML, ODT, ODS, ODP, EPUB, BIB, RIS, NBIB, ENW";
|
|
459
460
|
/** Long human-readable summary of all supported formats. */
|
|
460
|
-
const allSupportedFormatsLong = "PDF, Word (.docx), Excel (.xlsx), PowerPoint (.pptx), CSV, Image (.png, .jpg, .tiff, .bmp, .heif), Plain Text (.txt, .md, .tsv, .xml), RTF, HTML, OpenDocument (.odt, .ods, .odp), EPUB, and Bibliography (.bib, .ris, .nbib, .enw) files";
|
|
461
|
+
const allSupportedFormatsLong = "PDF, Word (.docx, .doc), Excel (.xlsx, .xls), PowerPoint (.pptx, .ppt), CSV, Image (.png, .jpg, .tiff, .bmp, .heif), Plain Text (.txt, .md, .tsv, .xml), RTF, HTML, OpenDocument (.odt, .ods, .odp), EPUB, and Bibliography (.bib, .ris, .nbib, .enw) files";
|
|
461
462
|
/** Image dimension limits enforced by the underlying OCR engine (Azure Document Intelligence).
|
|
462
463
|
* Images outside this range are rejected with HTTP 400 before processing begins. */
|
|
463
464
|
const imageDimensionLimits = {
|
|
@@ -466,7 +467,7 @@ const imageDimensionLimits = {
|
|
|
466
467
|
};
|
|
467
468
|
/** Pre-built format note for API descriptions (used in contract model descriptions). */
|
|
468
469
|
const formatsByTierDescription = `Supported formats by tier:
|
|
469
|
-
- All tiers: ${allTierFormats.join(", ")}.\n- Pro/Max/Auto adds: ${proTierAdditionalFormats.join(", ")}. Image dimensions must be between ${imageDimensionLimits.minPixels}×${imageDimensionLimits.minPixels} and ${imageDimensionLimits.maxPixels}×${imageDimensionLimits.maxPixels} pixels.`;
|
|
470
|
+
- All tiers: ${allTierFormats.join(", ")}.\n- Pro/Max/Auto adds: ${proTierAdditionalFormats.join(", ")}. Image dimensions must be between ${imageDimensionLimits.minPixels}×${imageDimensionLimits.minPixels} and ${imageDimensionLimits.maxPixels}×${imageDimensionLimits.maxPixels} pixels.\nHow pages are counted: PDF and TIFF pages as they are; Word (.docx, .doc), RTF, OpenDocument text, HTML and EPUB: every 3,000 characters of text is one page; Excel (.xlsx, .xls) and OpenDocument spreadsheets: one page per worksheet; PowerPoint (.pptx, .ppt) and OpenDocument presentations: one page per slide; images: one page per image; CSV and plain text: every 3,000 characters is one page; bibliographies: every 10 entries is one page.`;
|
|
470
471
|
/** Academic/grant API: fixed credits per request */
|
|
471
472
|
const academicCreditCosts = {
|
|
472
473
|
academicSearch: 2,
|
|
@@ -2191,6 +2192,9 @@ const supportedFileMimes = [
|
|
|
2191
2192
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
2192
2193
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
2193
2194
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
2195
|
+
"application/msword",
|
|
2196
|
+
"application/vnd.ms-excel",
|
|
2197
|
+
"application/vnd.ms-powerpoint",
|
|
2194
2198
|
"text/csv",
|
|
2195
2199
|
"application/csv",
|
|
2196
2200
|
"image/png",
|
|
@@ -2430,7 +2434,7 @@ const search = oc.input(zod.z.object({
|
|
|
2430
2434
|
})).output(zod.z.object({
|
|
2431
2435
|
estimatedTotalResults: zod.z.number(),
|
|
2432
2436
|
results: zod.z.array(publicationSchema$1),
|
|
2433
|
-
errors: zod.z.array(providerErrorSchema$1).nullish(),
|
|
2437
|
+
errors: zod.z.array(providerErrorSchema$1).nullish().describe("Providers that failed for this request (for example rate limited or unavailable). When present, `results` only contain papers from the providers that succeeded, so treat the response as partial. Credits are the same either way."),
|
|
2434
2438
|
requestId: zod.z.number().int()
|
|
2435
2439
|
})).route({
|
|
2436
2440
|
summary: "Search academic papers",
|
|
@@ -2657,6 +2661,136 @@ var academic_exports = /* @__PURE__ */ __exportAll({
|
|
|
2657
2661
|
searchGrants: () => searchGrants,
|
|
2658
2662
|
similarPapers: () => similarPapers
|
|
2659
2663
|
});
|
|
2664
|
+
// ../util/lib/contract/instance/router/admin/retained-input-schema.ts
|
|
2665
|
+
const retainedInputUsageKinds = ["api", "free"];
|
|
2666
|
+
const retainedInputReasons = [
|
|
2667
|
+
"system_error",
|
|
2668
|
+
"user_error",
|
|
2669
|
+
"fallback_success"
|
|
2670
|
+
];
|
|
2671
|
+
const retainedInputFileStatuses = [
|
|
2672
|
+
"kept",
|
|
2673
|
+
"skipped",
|
|
2674
|
+
"deleted",
|
|
2675
|
+
"expired",
|
|
2676
|
+
"evicted"
|
|
2677
|
+
];
|
|
2678
|
+
const retainedInputSkipReasons = [
|
|
2679
|
+
"input_not_read",
|
|
2680
|
+
"password_protected",
|
|
2681
|
+
"too_large",
|
|
2682
|
+
"not_eligible",
|
|
2683
|
+
"storage_full",
|
|
2684
|
+
"storage_error"
|
|
2685
|
+
];
|
|
2686
|
+
const retainedInputActorTypes = [
|
|
2687
|
+
"admin",
|
|
2688
|
+
"workspace_owner",
|
|
2689
|
+
"account_deletion"
|
|
2690
|
+
];
|
|
2691
|
+
const retainedInputUsageKindSchema = zod.z.enum(retainedInputUsageKinds);
|
|
2692
|
+
const retainedInputActorSchema = zod.z.object({
|
|
2693
|
+
type: zod.z.enum(retainedInputActorTypes),
|
|
2694
|
+
userId: zod.z.string().min(1).max(200),
|
|
2695
|
+
email: zod.z.string().max(320).optional()
|
|
2696
|
+
});
|
|
2697
|
+
const providerChainEntrySchema = zod.z.object({
|
|
2698
|
+
provider: zod.z.string(),
|
|
2699
|
+
service: zod.z.string(),
|
|
2700
|
+
model: zod.z.string().nullable(),
|
|
2701
|
+
status: zod.z.string(),
|
|
2702
|
+
error: zod.z.string().nullable()
|
|
2703
|
+
});
|
|
2704
|
+
const inputDiagnosticsSchema = zod.z.object({
|
|
2705
|
+
errorCode: zod.z.string().nullable(),
|
|
2706
|
+
errorStage: zod.z.string().nullable(),
|
|
2707
|
+
errorStatus: zod.z.string().nullable(),
|
|
2708
|
+
providerChain: zod.z.array(providerChainEntrySchema),
|
|
2709
|
+
inputSource: zod.z.string().nullable(),
|
|
2710
|
+
declaredMime: zod.z.string().nullable(),
|
|
2711
|
+
detectedMime: zod.z.string().nullable(),
|
|
2712
|
+
detectedExtension: zod.z.string().nullable(),
|
|
2713
|
+
extension: zod.z.string().nullable(),
|
|
2714
|
+
documentType: zod.z.string().nullable(),
|
|
2715
|
+
sizeBytes: zod.z.number().nullable(),
|
|
2716
|
+
sha256: zod.z.string().nullable(),
|
|
2717
|
+
pageCount: zod.z.number().nullable(),
|
|
2718
|
+
pdf: zod.z.object({
|
|
2719
|
+
version: zod.z.string().nullable(),
|
|
2720
|
+
producer: zod.z.string().nullable(),
|
|
2721
|
+
creator: zod.z.string().nullable(),
|
|
2722
|
+
encrypted: zod.z.boolean(),
|
|
2723
|
+
hasForms: zod.z.boolean().nullable(),
|
|
2724
|
+
hasAttachments: zod.z.boolean().nullable(),
|
|
2725
|
+
pagesSampled: zod.z.number(),
|
|
2726
|
+
pagesWithoutText: zod.z.number(),
|
|
2727
|
+
scannedRatio: zod.z.number().nullable(),
|
|
2728
|
+
openError: zod.z.string().nullable()
|
|
2729
|
+
}).nullable(),
|
|
2730
|
+
image: zod.z.object({
|
|
2731
|
+
width: zod.z.number().nullable(),
|
|
2732
|
+
height: zod.z.number().nullable(),
|
|
2733
|
+
type: zod.z.string().nullable()
|
|
2734
|
+
}).nullable()
|
|
2735
|
+
});
|
|
2736
|
+
const retainedInputAuditEntrySchema = zod.z.object({
|
|
2737
|
+
action: zod.z.enum(["download", "delete"]),
|
|
2738
|
+
actorType: zod.z.enum(retainedInputActorTypes),
|
|
2739
|
+
actorId: zod.z.string(),
|
|
2740
|
+
actorEmail: zod.z.string().nullable(),
|
|
2741
|
+
createdAt: zod.z.number()
|
|
2742
|
+
});
|
|
2743
|
+
const retainedInputRecordSchema = zod.z.object({
|
|
2744
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2745
|
+
usageId: zod.z.number(),
|
|
2746
|
+
workspaceId: zod.z.number().nullable(),
|
|
2747
|
+
operation: zod.z.string(),
|
|
2748
|
+
reason: zod.z.enum(retainedInputReasons),
|
|
2749
|
+
fileStatus: zod.z.enum(retainedInputFileStatuses),
|
|
2750
|
+
skipReason: zod.z.enum(retainedInputSkipReasons).nullable(),
|
|
2751
|
+
inputBytes: zod.z.number().nullable(),
|
|
2752
|
+
expiresAt: zod.z.number().nullable(),
|
|
2753
|
+
deletedAt: zod.z.number().nullable(),
|
|
2754
|
+
diagnostics: inputDiagnosticsSchema,
|
|
2755
|
+
audit: zod.z.array(retainedInputAuditEntrySchema),
|
|
2756
|
+
createdAt: zod.z.number()
|
|
2757
|
+
});
|
|
2758
|
+
// ../util/lib/contract/instance/router/admin/delete-retained-inputs.ts
|
|
2759
|
+
const deleteRetainedInputs = oc.route({
|
|
2760
|
+
summary: "Delete retained inputs",
|
|
2761
|
+
description: "Deletes one request's kept input, or every kept input of a workspace; every deletion is audit-logged",
|
|
2762
|
+
tags: ["Admin"],
|
|
2763
|
+
spec: (op) => {
|
|
2764
|
+
op.security = [{ bearerAuth: [] }];
|
|
2765
|
+
return op;
|
|
2766
|
+
}
|
|
2767
|
+
}).input(zod.z.union([zod.z.object({
|
|
2768
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2769
|
+
usageId: zod.z.number().int().positive(),
|
|
2770
|
+
workspaceId: zod.z.number().int().optional(),
|
|
2771
|
+
actor: retainedInputActorSchema
|
|
2772
|
+
}), zod.z.object({
|
|
2773
|
+
workspaceId: zod.z.number().int(),
|
|
2774
|
+
actor: retainedInputActorSchema
|
|
2775
|
+
})])).output(zod.z.object({ deleted: zod.z.number() }));
|
|
2776
|
+
// ../util/lib/contract/instance/router/admin/download-retained-input.ts
|
|
2777
|
+
const downloadRetainedInput = oc.route({
|
|
2778
|
+
summary: "Download a retained input",
|
|
2779
|
+
description: "Decrypts and returns a failed request's kept input; every call is audit-logged",
|
|
2780
|
+
tags: ["Admin"],
|
|
2781
|
+
spec: (op) => {
|
|
2782
|
+
op.security = [{ bearerAuth: [] }];
|
|
2783
|
+
return op;
|
|
2784
|
+
}
|
|
2785
|
+
}).input(zod.z.object({
|
|
2786
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2787
|
+
usageId: zod.z.number().int().positive(),
|
|
2788
|
+
actor: retainedInputActorSchema
|
|
2789
|
+
})).output(zod.z.object({
|
|
2790
|
+
file: zod.z.instanceof(File),
|
|
2791
|
+
url: zod.z.string().nullable(),
|
|
2792
|
+
responseHeaders: zod.z.record(zod.z.string(), zod.z.string()).nullable()
|
|
2793
|
+
}));
|
|
2660
2794
|
// ../util/lib/contract/instance/router/admin/get-environment.ts
|
|
2661
2795
|
const getEnvironment = oc.route({
|
|
2662
2796
|
summary: "Get instance server's environment",
|
|
@@ -2746,6 +2880,22 @@ const getProviderUsageRecords = oc.route({
|
|
|
2746
2880
|
records: zod.z.array(providerUsageRecordSchema),
|
|
2747
2881
|
hasMore: zod.z.boolean()
|
|
2748
2882
|
}));
|
|
2883
|
+
// ../util/lib/contract/instance/router/admin/get-retained-inputs.ts
|
|
2884
|
+
const getRetainedInputs = oc.route({
|
|
2885
|
+
summary: "Get retained inputs",
|
|
2886
|
+
description: "Returns the diagnostics and retention state of failed requests' inputs",
|
|
2887
|
+
tags: ["Admin"],
|
|
2888
|
+
spec: (op) => {
|
|
2889
|
+
op.security = [{ bearerAuth: [] }];
|
|
2890
|
+
return op;
|
|
2891
|
+
}
|
|
2892
|
+
}).input(zod.z.object({
|
|
2893
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2894
|
+
usageIds: zod.z.array(zod.z.number().int().positive()).min(1).max(200)
|
|
2895
|
+
})).output(zod.z.object({
|
|
2896
|
+
enabled: zod.z.boolean(),
|
|
2897
|
+
records: zod.z.array(retainedInputRecordSchema)
|
|
2898
|
+
}));
|
|
2749
2899
|
// ../util/lib/contract/instance/router/admin/get-usage-records.ts
|
|
2750
2900
|
const usageRecordSchema = zod.z.object({
|
|
2751
2901
|
id: zod.z.number(),
|
|
@@ -2843,9 +2993,12 @@ const setVersion = oc.route({
|
|
|
2843
2993
|
}).input(setVersionInputSchema).output(adminOutputSchema);
|
|
2844
2994
|
// ../util/lib/contract/instance/router/admin/index.ts
|
|
2845
2995
|
var admin_exports = /* @__PURE__ */ __exportAll({
|
|
2996
|
+
deleteRetainedInputs: () => deleteRetainedInputs,
|
|
2997
|
+
downloadRetainedInput: () => downloadRetainedInput,
|
|
2846
2998
|
getEnvironment: () => getEnvironment,
|
|
2847
2999
|
getFreeUsageRecords: () => getFreeUsageRecords,
|
|
2848
3000
|
getProviderUsageRecords: () => getProviderUsageRecords,
|
|
3001
|
+
getRetainedInputs: () => getRetainedInputs,
|
|
2849
3002
|
getUsageRecords: () => getUsageRecords,
|
|
2850
3003
|
healthCheck: () => healthCheck,
|
|
2851
3004
|
setDomain: () => setDomain,
|
|
@@ -3959,4 +4112,15 @@ Object.defineProperty(exports, "contract", {
|
|
|
3959
4112
|
return router_exports;
|
|
3960
4113
|
}
|
|
3961
4114
|
});
|
|
4115
|
+
exports.inputDiagnosticsSchema = inputDiagnosticsSchema;
|
|
3962
4116
|
exports.pdfvectorModelSchema = pdfvectorModelSchema;
|
|
4117
|
+
exports.providerChainEntrySchema = providerChainEntrySchema;
|
|
4118
|
+
exports.retainedInputActorSchema = retainedInputActorSchema;
|
|
4119
|
+
exports.retainedInputActorTypes = retainedInputActorTypes;
|
|
4120
|
+
exports.retainedInputAuditEntrySchema = retainedInputAuditEntrySchema;
|
|
4121
|
+
exports.retainedInputFileStatuses = retainedInputFileStatuses;
|
|
4122
|
+
exports.retainedInputReasons = retainedInputReasons;
|
|
4123
|
+
exports.retainedInputRecordSchema = retainedInputRecordSchema;
|
|
4124
|
+
exports.retainedInputSkipReasons = retainedInputSkipReasons;
|
|
4125
|
+
exports.retainedInputUsageKindSchema = retainedInputUsageKindSchema;
|
|
4126
|
+
exports.retainedInputUsageKinds = retainedInputUsageKinds;
|
package/dist/contract.d.cts
CHANGED
|
@@ -1459,6 +1459,56 @@ declare const similarPapers: ContractProcedureBuilderWithInputOutput<z.ZodObject
|
|
|
1459
1459
|
declare namespace index_d_exports$8 {
|
|
1460
1460
|
export { fetch, findCitations, paperGraph, parse$4 as parse, search, searchGrants, similarPapers };
|
|
1461
1461
|
}
|
|
1462
|
+
declare const deleteRetainedInputs: ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
|
|
1463
|
+
usageKind: z.ZodEnum<{
|
|
1464
|
+
api: "api";
|
|
1465
|
+
free: "free";
|
|
1466
|
+
}>;
|
|
1467
|
+
usageId: z.ZodNumber;
|
|
1468
|
+
workspaceId: z.ZodOptional<z.ZodNumber>;
|
|
1469
|
+
actor: z.ZodObject<{
|
|
1470
|
+
type: z.ZodEnum<{
|
|
1471
|
+
account_deletion: "account_deletion";
|
|
1472
|
+
admin: "admin";
|
|
1473
|
+
workspace_owner: "workspace_owner";
|
|
1474
|
+
}>;
|
|
1475
|
+
userId: z.ZodString;
|
|
1476
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1477
|
+
}, z.core.$strip>;
|
|
1478
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1479
|
+
workspaceId: z.ZodNumber;
|
|
1480
|
+
actor: z.ZodObject<{
|
|
1481
|
+
type: z.ZodEnum<{
|
|
1482
|
+
account_deletion: "account_deletion";
|
|
1483
|
+
admin: "admin";
|
|
1484
|
+
workspace_owner: "workspace_owner";
|
|
1485
|
+
}>;
|
|
1486
|
+
userId: z.ZodString;
|
|
1487
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1488
|
+
}, z.core.$strip>;
|
|
1489
|
+
}, z.core.$strip>]>, z.ZodObject<{
|
|
1490
|
+
deleted: z.ZodNumber;
|
|
1491
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1492
|
+
declare const downloadRetainedInput: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1493
|
+
usageKind: z.ZodEnum<{
|
|
1494
|
+
api: "api";
|
|
1495
|
+
free: "free";
|
|
1496
|
+
}>;
|
|
1497
|
+
usageId: z.ZodNumber;
|
|
1498
|
+
actor: z.ZodObject<{
|
|
1499
|
+
type: z.ZodEnum<{
|
|
1500
|
+
account_deletion: "account_deletion";
|
|
1501
|
+
admin: "admin";
|
|
1502
|
+
workspace_owner: "workspace_owner";
|
|
1503
|
+
}>;
|
|
1504
|
+
userId: z.ZodString;
|
|
1505
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
}, z.core.$strip>;
|
|
1507
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1508
|
+
file: z.ZodInstanceOf<any>;
|
|
1509
|
+
url: z.ZodNullable<z.ZodString>;
|
|
1510
|
+
responseHeaders: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1511
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1462
1512
|
declare const getEnvironment: ContractProcedureBuilderWithOutput<Schema$1<unknown, unknown>, z.ZodObject<{
|
|
1463
1513
|
environment: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1464
1514
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -1544,6 +1594,100 @@ declare const getProviderUsageRecords: ContractProcedureBuilderWithInputOutput<z
|
|
|
1544
1594
|
}, z.core.$strip>>;
|
|
1545
1595
|
hasMore: z.ZodBoolean;
|
|
1546
1596
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1597
|
+
declare const getRetainedInputs: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1598
|
+
usageKind: z.ZodEnum<{
|
|
1599
|
+
api: "api";
|
|
1600
|
+
free: "free";
|
|
1601
|
+
}>;
|
|
1602
|
+
usageIds: z.ZodArray<z.ZodNumber>;
|
|
1603
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1604
|
+
enabled: z.ZodBoolean;
|
|
1605
|
+
records: z.ZodArray<z.ZodObject<{
|
|
1606
|
+
usageKind: z.ZodEnum<{
|
|
1607
|
+
api: "api";
|
|
1608
|
+
free: "free";
|
|
1609
|
+
}>;
|
|
1610
|
+
usageId: z.ZodNumber;
|
|
1611
|
+
workspaceId: z.ZodNullable<z.ZodNumber>;
|
|
1612
|
+
operation: z.ZodString;
|
|
1613
|
+
reason: z.ZodEnum<{
|
|
1614
|
+
fallback_success: "fallback_success";
|
|
1615
|
+
system_error: "system_error";
|
|
1616
|
+
user_error: "user_error";
|
|
1617
|
+
}>;
|
|
1618
|
+
fileStatus: z.ZodEnum<{
|
|
1619
|
+
deleted: "deleted";
|
|
1620
|
+
evicted: "evicted";
|
|
1621
|
+
expired: "expired";
|
|
1622
|
+
kept: "kept";
|
|
1623
|
+
skipped: "skipped";
|
|
1624
|
+
}>;
|
|
1625
|
+
skipReason: z.ZodNullable<z.ZodEnum<{
|
|
1626
|
+
input_not_read: "input_not_read";
|
|
1627
|
+
not_eligible: "not_eligible";
|
|
1628
|
+
password_protected: "password_protected";
|
|
1629
|
+
storage_error: "storage_error";
|
|
1630
|
+
storage_full: "storage_full";
|
|
1631
|
+
too_large: "too_large";
|
|
1632
|
+
}>>;
|
|
1633
|
+
inputBytes: z.ZodNullable<z.ZodNumber>;
|
|
1634
|
+
expiresAt: z.ZodNullable<z.ZodNumber>;
|
|
1635
|
+
deletedAt: z.ZodNullable<z.ZodNumber>;
|
|
1636
|
+
diagnostics: z.ZodObject<{
|
|
1637
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
1638
|
+
errorStage: z.ZodNullable<z.ZodString>;
|
|
1639
|
+
errorStatus: z.ZodNullable<z.ZodString>;
|
|
1640
|
+
providerChain: z.ZodArray<z.ZodObject<{
|
|
1641
|
+
provider: z.ZodString;
|
|
1642
|
+
service: z.ZodString;
|
|
1643
|
+
model: z.ZodNullable<z.ZodString>;
|
|
1644
|
+
status: z.ZodString;
|
|
1645
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1646
|
+
}, z.core.$strip>>;
|
|
1647
|
+
inputSource: z.ZodNullable<z.ZodString>;
|
|
1648
|
+
declaredMime: z.ZodNullable<z.ZodString>;
|
|
1649
|
+
detectedMime: z.ZodNullable<z.ZodString>;
|
|
1650
|
+
detectedExtension: z.ZodNullable<z.ZodString>;
|
|
1651
|
+
extension: z.ZodNullable<z.ZodString>;
|
|
1652
|
+
documentType: z.ZodNullable<z.ZodString>;
|
|
1653
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
1654
|
+
sha256: z.ZodNullable<z.ZodString>;
|
|
1655
|
+
pageCount: z.ZodNullable<z.ZodNumber>;
|
|
1656
|
+
pdf: z.ZodNullable<z.ZodObject<{
|
|
1657
|
+
version: z.ZodNullable<z.ZodString>;
|
|
1658
|
+
producer: z.ZodNullable<z.ZodString>;
|
|
1659
|
+
creator: z.ZodNullable<z.ZodString>;
|
|
1660
|
+
encrypted: z.ZodBoolean;
|
|
1661
|
+
hasForms: z.ZodNullable<z.ZodBoolean>;
|
|
1662
|
+
hasAttachments: z.ZodNullable<z.ZodBoolean>;
|
|
1663
|
+
pagesSampled: z.ZodNumber;
|
|
1664
|
+
pagesWithoutText: z.ZodNumber;
|
|
1665
|
+
scannedRatio: z.ZodNullable<z.ZodNumber>;
|
|
1666
|
+
openError: z.ZodNullable<z.ZodString>;
|
|
1667
|
+
}, z.core.$strip>>;
|
|
1668
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
1669
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
1670
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
1671
|
+
type: z.ZodNullable<z.ZodString>;
|
|
1672
|
+
}, z.core.$strip>>;
|
|
1673
|
+
}, z.core.$strip>;
|
|
1674
|
+
audit: z.ZodArray<z.ZodObject<{
|
|
1675
|
+
action: z.ZodEnum<{
|
|
1676
|
+
delete: "delete";
|
|
1677
|
+
download: "download";
|
|
1678
|
+
}>;
|
|
1679
|
+
actorType: z.ZodEnum<{
|
|
1680
|
+
account_deletion: "account_deletion";
|
|
1681
|
+
admin: "admin";
|
|
1682
|
+
workspace_owner: "workspace_owner";
|
|
1683
|
+
}>;
|
|
1684
|
+
actorId: z.ZodString;
|
|
1685
|
+
actorEmail: z.ZodNullable<z.ZodString>;
|
|
1686
|
+
createdAt: z.ZodNumber;
|
|
1687
|
+
}, z.core.$strip>>;
|
|
1688
|
+
createdAt: z.ZodNumber;
|
|
1689
|
+
}, z.core.$strip>>;
|
|
1690
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1547
1691
|
declare const getUsageRecords: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1548
1692
|
cursor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1549
1693
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -1611,7 +1755,7 @@ declare const setVersion: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
|
1611
1755
|
message: z.ZodString;
|
|
1612
1756
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1613
1757
|
declare namespace index_d_exports$7 {
|
|
1614
|
-
export { getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
|
|
1758
|
+
export { deleteRetainedInputs, downloadRetainedInput, getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getRetainedInputs, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
|
|
1615
1759
|
}
|
|
1616
1760
|
declare const validateCredential: ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
1617
1761
|
status: z.ZodString;
|
|
@@ -2079,6 +2223,168 @@ export declare const pdfvectorModelSchema: z.ZodEnum<{
|
|
|
2079
2223
|
pro: "pro";
|
|
2080
2224
|
}>;
|
|
2081
2225
|
type PDFVectorModel = z.infer<typeof pdfvectorModelSchema>;
|
|
2226
|
+
export declare const retainedInputUsageKinds: readonly ["api", "free"];
|
|
2227
|
+
export declare const retainedInputReasons: readonly ["system_error", "user_error", "fallback_success"];
|
|
2228
|
+
export declare const retainedInputFileStatuses: readonly ["kept", "skipped", "deleted", "expired", "evicted"];
|
|
2229
|
+
export declare const retainedInputSkipReasons: readonly ["input_not_read", "password_protected", "too_large", "not_eligible", "storage_full", "storage_error"];
|
|
2230
|
+
export declare const retainedInputActorTypes: readonly ["admin", "workspace_owner", "account_deletion"];
|
|
2231
|
+
export declare const retainedInputUsageKindSchema: z.ZodEnum<{
|
|
2232
|
+
api: "api";
|
|
2233
|
+
free: "free";
|
|
2234
|
+
}>;
|
|
2235
|
+
export declare const retainedInputActorSchema: z.ZodObject<{
|
|
2236
|
+
type: z.ZodEnum<{
|
|
2237
|
+
account_deletion: "account_deletion";
|
|
2238
|
+
admin: "admin";
|
|
2239
|
+
workspace_owner: "workspace_owner";
|
|
2240
|
+
}>;
|
|
2241
|
+
userId: z.ZodString;
|
|
2242
|
+
email: z.ZodOptional<z.ZodString>;
|
|
2243
|
+
}, z.core.$strip>;
|
|
2244
|
+
export declare const providerChainEntrySchema: z.ZodObject<{
|
|
2245
|
+
provider: z.ZodString;
|
|
2246
|
+
service: z.ZodString;
|
|
2247
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2248
|
+
status: z.ZodString;
|
|
2249
|
+
error: z.ZodNullable<z.ZodString>;
|
|
2250
|
+
}, z.core.$strip>;
|
|
2251
|
+
export declare const inputDiagnosticsSchema: z.ZodObject<{
|
|
2252
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
2253
|
+
errorStage: z.ZodNullable<z.ZodString>;
|
|
2254
|
+
errorStatus: z.ZodNullable<z.ZodString>;
|
|
2255
|
+
providerChain: z.ZodArray<z.ZodObject<{
|
|
2256
|
+
provider: z.ZodString;
|
|
2257
|
+
service: z.ZodString;
|
|
2258
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2259
|
+
status: z.ZodString;
|
|
2260
|
+
error: z.ZodNullable<z.ZodString>;
|
|
2261
|
+
}, z.core.$strip>>;
|
|
2262
|
+
inputSource: z.ZodNullable<z.ZodString>;
|
|
2263
|
+
declaredMime: z.ZodNullable<z.ZodString>;
|
|
2264
|
+
detectedMime: z.ZodNullable<z.ZodString>;
|
|
2265
|
+
detectedExtension: z.ZodNullable<z.ZodString>;
|
|
2266
|
+
extension: z.ZodNullable<z.ZodString>;
|
|
2267
|
+
documentType: z.ZodNullable<z.ZodString>;
|
|
2268
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
2269
|
+
sha256: z.ZodNullable<z.ZodString>;
|
|
2270
|
+
pageCount: z.ZodNullable<z.ZodNumber>;
|
|
2271
|
+
pdf: z.ZodNullable<z.ZodObject<{
|
|
2272
|
+
version: z.ZodNullable<z.ZodString>;
|
|
2273
|
+
producer: z.ZodNullable<z.ZodString>;
|
|
2274
|
+
creator: z.ZodNullable<z.ZodString>;
|
|
2275
|
+
encrypted: z.ZodBoolean;
|
|
2276
|
+
hasForms: z.ZodNullable<z.ZodBoolean>;
|
|
2277
|
+
hasAttachments: z.ZodNullable<z.ZodBoolean>;
|
|
2278
|
+
pagesSampled: z.ZodNumber;
|
|
2279
|
+
pagesWithoutText: z.ZodNumber;
|
|
2280
|
+
scannedRatio: z.ZodNullable<z.ZodNumber>;
|
|
2281
|
+
openError: z.ZodNullable<z.ZodString>;
|
|
2282
|
+
}, z.core.$strip>>;
|
|
2283
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
2284
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
2285
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
2286
|
+
type: z.ZodNullable<z.ZodString>;
|
|
2287
|
+
}, z.core.$strip>>;
|
|
2288
|
+
}, z.core.$strip>;
|
|
2289
|
+
export declare const retainedInputAuditEntrySchema: z.ZodObject<{
|
|
2290
|
+
action: z.ZodEnum<{
|
|
2291
|
+
delete: "delete";
|
|
2292
|
+
download: "download";
|
|
2293
|
+
}>;
|
|
2294
|
+
actorType: z.ZodEnum<{
|
|
2295
|
+
account_deletion: "account_deletion";
|
|
2296
|
+
admin: "admin";
|
|
2297
|
+
workspace_owner: "workspace_owner";
|
|
2298
|
+
}>;
|
|
2299
|
+
actorId: z.ZodString;
|
|
2300
|
+
actorEmail: z.ZodNullable<z.ZodString>;
|
|
2301
|
+
createdAt: z.ZodNumber;
|
|
2302
|
+
}, z.core.$strip>;
|
|
2303
|
+
export declare const retainedInputRecordSchema: z.ZodObject<{
|
|
2304
|
+
usageKind: z.ZodEnum<{
|
|
2305
|
+
api: "api";
|
|
2306
|
+
free: "free";
|
|
2307
|
+
}>;
|
|
2308
|
+
usageId: z.ZodNumber;
|
|
2309
|
+
workspaceId: z.ZodNullable<z.ZodNumber>;
|
|
2310
|
+
operation: z.ZodString;
|
|
2311
|
+
reason: z.ZodEnum<{
|
|
2312
|
+
fallback_success: "fallback_success";
|
|
2313
|
+
system_error: "system_error";
|
|
2314
|
+
user_error: "user_error";
|
|
2315
|
+
}>;
|
|
2316
|
+
fileStatus: z.ZodEnum<{
|
|
2317
|
+
deleted: "deleted";
|
|
2318
|
+
evicted: "evicted";
|
|
2319
|
+
expired: "expired";
|
|
2320
|
+
kept: "kept";
|
|
2321
|
+
skipped: "skipped";
|
|
2322
|
+
}>;
|
|
2323
|
+
skipReason: z.ZodNullable<z.ZodEnum<{
|
|
2324
|
+
input_not_read: "input_not_read";
|
|
2325
|
+
not_eligible: "not_eligible";
|
|
2326
|
+
password_protected: "password_protected";
|
|
2327
|
+
storage_error: "storage_error";
|
|
2328
|
+
storage_full: "storage_full";
|
|
2329
|
+
too_large: "too_large";
|
|
2330
|
+
}>>;
|
|
2331
|
+
inputBytes: z.ZodNullable<z.ZodNumber>;
|
|
2332
|
+
expiresAt: z.ZodNullable<z.ZodNumber>;
|
|
2333
|
+
deletedAt: z.ZodNullable<z.ZodNumber>;
|
|
2334
|
+
diagnostics: z.ZodObject<{
|
|
2335
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
2336
|
+
errorStage: z.ZodNullable<z.ZodString>;
|
|
2337
|
+
errorStatus: z.ZodNullable<z.ZodString>;
|
|
2338
|
+
providerChain: z.ZodArray<z.ZodObject<{
|
|
2339
|
+
provider: z.ZodString;
|
|
2340
|
+
service: z.ZodString;
|
|
2341
|
+
model: z.ZodNullable<z.ZodString>;
|
|
2342
|
+
status: z.ZodString;
|
|
2343
|
+
error: z.ZodNullable<z.ZodString>;
|
|
2344
|
+
}, z.core.$strip>>;
|
|
2345
|
+
inputSource: z.ZodNullable<z.ZodString>;
|
|
2346
|
+
declaredMime: z.ZodNullable<z.ZodString>;
|
|
2347
|
+
detectedMime: z.ZodNullable<z.ZodString>;
|
|
2348
|
+
detectedExtension: z.ZodNullable<z.ZodString>;
|
|
2349
|
+
extension: z.ZodNullable<z.ZodString>;
|
|
2350
|
+
documentType: z.ZodNullable<z.ZodString>;
|
|
2351
|
+
sizeBytes: z.ZodNullable<z.ZodNumber>;
|
|
2352
|
+
sha256: z.ZodNullable<z.ZodString>;
|
|
2353
|
+
pageCount: z.ZodNullable<z.ZodNumber>;
|
|
2354
|
+
pdf: z.ZodNullable<z.ZodObject<{
|
|
2355
|
+
version: z.ZodNullable<z.ZodString>;
|
|
2356
|
+
producer: z.ZodNullable<z.ZodString>;
|
|
2357
|
+
creator: z.ZodNullable<z.ZodString>;
|
|
2358
|
+
encrypted: z.ZodBoolean;
|
|
2359
|
+
hasForms: z.ZodNullable<z.ZodBoolean>;
|
|
2360
|
+
hasAttachments: z.ZodNullable<z.ZodBoolean>;
|
|
2361
|
+
pagesSampled: z.ZodNumber;
|
|
2362
|
+
pagesWithoutText: z.ZodNumber;
|
|
2363
|
+
scannedRatio: z.ZodNullable<z.ZodNumber>;
|
|
2364
|
+
openError: z.ZodNullable<z.ZodString>;
|
|
2365
|
+
}, z.core.$strip>>;
|
|
2366
|
+
image: z.ZodNullable<z.ZodObject<{
|
|
2367
|
+
width: z.ZodNullable<z.ZodNumber>;
|
|
2368
|
+
height: z.ZodNullable<z.ZodNumber>;
|
|
2369
|
+
type: z.ZodNullable<z.ZodString>;
|
|
2370
|
+
}, z.core.$strip>>;
|
|
2371
|
+
}, z.core.$strip>;
|
|
2372
|
+
audit: z.ZodArray<z.ZodObject<{
|
|
2373
|
+
action: z.ZodEnum<{
|
|
2374
|
+
delete: "delete";
|
|
2375
|
+
download: "download";
|
|
2376
|
+
}>;
|
|
2377
|
+
actorType: z.ZodEnum<{
|
|
2378
|
+
account_deletion: "account_deletion";
|
|
2379
|
+
admin: "admin";
|
|
2380
|
+
workspace_owner: "workspace_owner";
|
|
2381
|
+
}>;
|
|
2382
|
+
actorId: z.ZodString;
|
|
2383
|
+
actorEmail: z.ZodNullable<z.ZodString>;
|
|
2384
|
+
createdAt: z.ZodNumber;
|
|
2385
|
+
}, z.core.$strip>>;
|
|
2386
|
+
createdAt: z.ZodNumber;
|
|
2387
|
+
}, z.core.$strip>;
|
|
2082
2388
|
type ContractInputs = InferContractRouterInputs<typeof index_d_exports>;
|
|
2083
2389
|
type ContractOutputs = InferContractRouterOutputs<typeof index_d_exports>;
|
|
2084
2390
|
export { type ContractInputs, type ContractOutputs, type ContractRouterClient, type PDFVectorModel, index_d_exports as contract };
|