@pdfvector/client 0.1.0 → 0.1.1
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 +6 -0
- package/dist/contract.cjs +155 -6
- package/dist/contract.d.cts +145 -1
- package/dist/contract.d.mts +145 -1
- package/dist/contract.mjs +155 -6
- 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,11 @@
|
|
|
1
1
|
# @pdfvector/client
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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).
|
|
8
|
+
|
|
3
9
|
## 0.1.0
|
|
4
10
|
|
|
5
11
|
### 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,
|
|
@@ -2430,7 +2430,7 @@ const search = oc.input(zod.z.object({
|
|
|
2430
2430
|
})).output(zod.z.object({
|
|
2431
2431
|
estimatedTotalResults: zod.z.number(),
|
|
2432
2432
|
results: zod.z.array(publicationSchema$1),
|
|
2433
|
-
errors: zod.z.array(providerErrorSchema$1).nullish(),
|
|
2433
|
+
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
2434
|
requestId: zod.z.number().int()
|
|
2435
2435
|
})).route({
|
|
2436
2436
|
summary: "Search academic papers",
|
|
@@ -2657,6 +2657,136 @@ var academic_exports = /* @__PURE__ */ __exportAll({
|
|
|
2657
2657
|
searchGrants: () => searchGrants,
|
|
2658
2658
|
similarPapers: () => similarPapers
|
|
2659
2659
|
});
|
|
2660
|
+
// ../util/lib/contract/instance/router/admin/retained-input-schema.ts
|
|
2661
|
+
const retainedInputUsageKinds = ["api", "free"];
|
|
2662
|
+
const retainedInputReasons = [
|
|
2663
|
+
"system_error",
|
|
2664
|
+
"user_error",
|
|
2665
|
+
"fallback_success"
|
|
2666
|
+
];
|
|
2667
|
+
const retainedInputFileStatuses = [
|
|
2668
|
+
"kept",
|
|
2669
|
+
"skipped",
|
|
2670
|
+
"deleted",
|
|
2671
|
+
"expired",
|
|
2672
|
+
"evicted"
|
|
2673
|
+
];
|
|
2674
|
+
const retainedInputSkipReasons = [
|
|
2675
|
+
"input_not_read",
|
|
2676
|
+
"password_protected",
|
|
2677
|
+
"too_large",
|
|
2678
|
+
"not_eligible",
|
|
2679
|
+
"storage_full",
|
|
2680
|
+
"storage_error"
|
|
2681
|
+
];
|
|
2682
|
+
const retainedInputActorTypes = [
|
|
2683
|
+
"admin",
|
|
2684
|
+
"workspace_owner",
|
|
2685
|
+
"account_deletion"
|
|
2686
|
+
];
|
|
2687
|
+
const retainedInputUsageKindSchema = zod.z.enum(retainedInputUsageKinds);
|
|
2688
|
+
const retainedInputActorSchema = zod.z.object({
|
|
2689
|
+
type: zod.z.enum(retainedInputActorTypes),
|
|
2690
|
+
userId: zod.z.string().min(1).max(200),
|
|
2691
|
+
email: zod.z.string().max(320).optional()
|
|
2692
|
+
});
|
|
2693
|
+
const providerChainEntrySchema = zod.z.object({
|
|
2694
|
+
provider: zod.z.string(),
|
|
2695
|
+
service: zod.z.string(),
|
|
2696
|
+
model: zod.z.string().nullable(),
|
|
2697
|
+
status: zod.z.string(),
|
|
2698
|
+
error: zod.z.string().nullable()
|
|
2699
|
+
});
|
|
2700
|
+
const inputDiagnosticsSchema = zod.z.object({
|
|
2701
|
+
errorCode: zod.z.string().nullable(),
|
|
2702
|
+
errorStage: zod.z.string().nullable(),
|
|
2703
|
+
errorStatus: zod.z.string().nullable(),
|
|
2704
|
+
providerChain: zod.z.array(providerChainEntrySchema),
|
|
2705
|
+
inputSource: zod.z.string().nullable(),
|
|
2706
|
+
declaredMime: zod.z.string().nullable(),
|
|
2707
|
+
detectedMime: zod.z.string().nullable(),
|
|
2708
|
+
detectedExtension: zod.z.string().nullable(),
|
|
2709
|
+
extension: zod.z.string().nullable(),
|
|
2710
|
+
documentType: zod.z.string().nullable(),
|
|
2711
|
+
sizeBytes: zod.z.number().nullable(),
|
|
2712
|
+
sha256: zod.z.string().nullable(),
|
|
2713
|
+
pageCount: zod.z.number().nullable(),
|
|
2714
|
+
pdf: zod.z.object({
|
|
2715
|
+
version: zod.z.string().nullable(),
|
|
2716
|
+
producer: zod.z.string().nullable(),
|
|
2717
|
+
creator: zod.z.string().nullable(),
|
|
2718
|
+
encrypted: zod.z.boolean(),
|
|
2719
|
+
hasForms: zod.z.boolean().nullable(),
|
|
2720
|
+
hasAttachments: zod.z.boolean().nullable(),
|
|
2721
|
+
pagesSampled: zod.z.number(),
|
|
2722
|
+
pagesWithoutText: zod.z.number(),
|
|
2723
|
+
scannedRatio: zod.z.number().nullable(),
|
|
2724
|
+
openError: zod.z.string().nullable()
|
|
2725
|
+
}).nullable(),
|
|
2726
|
+
image: zod.z.object({
|
|
2727
|
+
width: zod.z.number().nullable(),
|
|
2728
|
+
height: zod.z.number().nullable(),
|
|
2729
|
+
type: zod.z.string().nullable()
|
|
2730
|
+
}).nullable()
|
|
2731
|
+
});
|
|
2732
|
+
const retainedInputAuditEntrySchema = zod.z.object({
|
|
2733
|
+
action: zod.z.enum(["download", "delete"]),
|
|
2734
|
+
actorType: zod.z.enum(retainedInputActorTypes),
|
|
2735
|
+
actorId: zod.z.string(),
|
|
2736
|
+
actorEmail: zod.z.string().nullable(),
|
|
2737
|
+
createdAt: zod.z.number()
|
|
2738
|
+
});
|
|
2739
|
+
const retainedInputRecordSchema = zod.z.object({
|
|
2740
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2741
|
+
usageId: zod.z.number(),
|
|
2742
|
+
workspaceId: zod.z.number().nullable(),
|
|
2743
|
+
operation: zod.z.string(),
|
|
2744
|
+
reason: zod.z.enum(retainedInputReasons),
|
|
2745
|
+
fileStatus: zod.z.enum(retainedInputFileStatuses),
|
|
2746
|
+
skipReason: zod.z.enum(retainedInputSkipReasons).nullable(),
|
|
2747
|
+
inputBytes: zod.z.number().nullable(),
|
|
2748
|
+
expiresAt: zod.z.number().nullable(),
|
|
2749
|
+
deletedAt: zod.z.number().nullable(),
|
|
2750
|
+
diagnostics: inputDiagnosticsSchema,
|
|
2751
|
+
audit: zod.z.array(retainedInputAuditEntrySchema),
|
|
2752
|
+
createdAt: zod.z.number()
|
|
2753
|
+
});
|
|
2754
|
+
// ../util/lib/contract/instance/router/admin/delete-retained-inputs.ts
|
|
2755
|
+
const deleteRetainedInputs = oc.route({
|
|
2756
|
+
summary: "Delete retained inputs",
|
|
2757
|
+
description: "Deletes one request's kept input, or every kept input of a workspace; every deletion is audit-logged",
|
|
2758
|
+
tags: ["Admin"],
|
|
2759
|
+
spec: (op) => {
|
|
2760
|
+
op.security = [{ bearerAuth: [] }];
|
|
2761
|
+
return op;
|
|
2762
|
+
}
|
|
2763
|
+
}).input(zod.z.union([zod.z.object({
|
|
2764
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2765
|
+
usageId: zod.z.number().int().positive(),
|
|
2766
|
+
workspaceId: zod.z.number().int().optional(),
|
|
2767
|
+
actor: retainedInputActorSchema
|
|
2768
|
+
}), zod.z.object({
|
|
2769
|
+
workspaceId: zod.z.number().int(),
|
|
2770
|
+
actor: retainedInputActorSchema
|
|
2771
|
+
})])).output(zod.z.object({ deleted: zod.z.number() }));
|
|
2772
|
+
// ../util/lib/contract/instance/router/admin/download-retained-input.ts
|
|
2773
|
+
const downloadRetainedInput = oc.route({
|
|
2774
|
+
summary: "Download a retained input",
|
|
2775
|
+
description: "Decrypts and returns a failed request's kept input; every call is audit-logged",
|
|
2776
|
+
tags: ["Admin"],
|
|
2777
|
+
spec: (op) => {
|
|
2778
|
+
op.security = [{ bearerAuth: [] }];
|
|
2779
|
+
return op;
|
|
2780
|
+
}
|
|
2781
|
+
}).input(zod.z.object({
|
|
2782
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2783
|
+
usageId: zod.z.number().int().positive(),
|
|
2784
|
+
actor: retainedInputActorSchema
|
|
2785
|
+
})).output(zod.z.object({
|
|
2786
|
+
file: zod.z.instanceof(File),
|
|
2787
|
+
url: zod.z.string().nullable(),
|
|
2788
|
+
responseHeaders: zod.z.record(zod.z.string(), zod.z.string()).nullable()
|
|
2789
|
+
}));
|
|
2660
2790
|
// ../util/lib/contract/instance/router/admin/get-environment.ts
|
|
2661
2791
|
const getEnvironment = oc.route({
|
|
2662
2792
|
summary: "Get instance server's environment",
|
|
@@ -2746,6 +2876,22 @@ const getProviderUsageRecords = oc.route({
|
|
|
2746
2876
|
records: zod.z.array(providerUsageRecordSchema),
|
|
2747
2877
|
hasMore: zod.z.boolean()
|
|
2748
2878
|
}));
|
|
2879
|
+
// ../util/lib/contract/instance/router/admin/get-retained-inputs.ts
|
|
2880
|
+
const getRetainedInputs = oc.route({
|
|
2881
|
+
summary: "Get retained inputs",
|
|
2882
|
+
description: "Returns the diagnostics and retention state of failed requests' inputs",
|
|
2883
|
+
tags: ["Admin"],
|
|
2884
|
+
spec: (op) => {
|
|
2885
|
+
op.security = [{ bearerAuth: [] }];
|
|
2886
|
+
return op;
|
|
2887
|
+
}
|
|
2888
|
+
}).input(zod.z.object({
|
|
2889
|
+
usageKind: retainedInputUsageKindSchema,
|
|
2890
|
+
usageIds: zod.z.array(zod.z.number().int().positive()).min(1).max(200)
|
|
2891
|
+
})).output(zod.z.object({
|
|
2892
|
+
enabled: zod.z.boolean(),
|
|
2893
|
+
records: zod.z.array(retainedInputRecordSchema)
|
|
2894
|
+
}));
|
|
2749
2895
|
// ../util/lib/contract/instance/router/admin/get-usage-records.ts
|
|
2750
2896
|
const usageRecordSchema = zod.z.object({
|
|
2751
2897
|
id: zod.z.number(),
|
|
@@ -2843,9 +2989,12 @@ const setVersion = oc.route({
|
|
|
2843
2989
|
}).input(setVersionInputSchema).output(adminOutputSchema);
|
|
2844
2990
|
// ../util/lib/contract/instance/router/admin/index.ts
|
|
2845
2991
|
var admin_exports = /* @__PURE__ */ __exportAll({
|
|
2992
|
+
deleteRetainedInputs: () => deleteRetainedInputs,
|
|
2993
|
+
downloadRetainedInput: () => downloadRetainedInput,
|
|
2846
2994
|
getEnvironment: () => getEnvironment,
|
|
2847
2995
|
getFreeUsageRecords: () => getFreeUsageRecords,
|
|
2848
2996
|
getProviderUsageRecords: () => getProviderUsageRecords,
|
|
2997
|
+
getRetainedInputs: () => getRetainedInputs,
|
|
2849
2998
|
getUsageRecords: () => getUsageRecords,
|
|
2850
2999
|
healthCheck: () => healthCheck,
|
|
2851
3000
|
setDomain: () => setDomain,
|
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;
|
package/dist/contract.d.mts
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;
|