@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/dist/index.cjs CHANGED
@@ -1,15 +1,21 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  Array.isArray;
3
- // ../../node_modules/.bun/@orpc+shared@1.15.2+e40b0dfdd726a224/node_modules/@orpc/shared/dist/index.mjs
3
+ // ../../node_modules/.bun/@orpc+shared@1.16.2+e40b0dfdd726a224/node_modules/@orpc/shared/dist/index.mjs
4
4
  function resolveMaybeOptionalOptions(rest) {
5
5
  return rest[0] ?? {};
6
6
  }
7
7
  function toArray(value) {
8
8
  return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
9
9
  }
10
+ const DEFAULT_MAX_BIGINT_DIGITS = 4300;
11
+ const BIGINT_PATTERN = /^-?(?:0|[1-9]\d*)$/;
12
+ function parseBigIntString(value, maxDigits) {
13
+ if ((value.startsWith("-") ? value.length - 1 : value.length) > maxDigits || !BIGINT_PATTERN.test(value)) return;
14
+ return BigInt(value);
15
+ }
10
16
  const ORPC_NAME = "orpc";
11
17
  const ORPC_SHARED_PACKAGE_NAME = "@orpc/shared";
12
- const ORPC_SHARED_PACKAGE_VERSION = "1.15.2";
18
+ const ORPC_SHARED_PACKAGE_VERSION = "1.16.2";
13
19
  var AbortError = class extends Error {
14
20
  constructor(...rest) {
15
21
  super(...rest);
@@ -215,6 +221,25 @@ function isObject(value) {
215
221
  function isTypescriptObject(value) {
216
222
  return !!value && (typeof value === "object" || typeof value === "function");
217
223
  }
224
+ function setOwn(object, key, value) {
225
+ if (key === "__proto__") Object.defineProperty(object, key, {
226
+ value,
227
+ writable: true,
228
+ enumerable: true,
229
+ configurable: true
230
+ });
231
+ else object[key] = value;
232
+ }
233
+ function copyOnWrite(parent, key, original) {
234
+ const value = parent[key];
235
+ if (value !== original) return value;
236
+ let copy;
237
+ if (Array.isArray(value)) copy = value.slice();
238
+ else if (isObject(value)) copy = { ...value };
239
+ else return value;
240
+ setOwn(parent, key, copy);
241
+ return copy;
242
+ }
218
243
  function value(value2, ...args) {
219
244
  if (typeof value2 === "function") return value2(...args);
220
245
  return value2;
@@ -286,9 +311,9 @@ function tryDecodeURIComponent(value) {
286
311
  return value;
287
312
  }
288
313
  }
289
- // ../../node_modules/.bun/@orpc+client@1.15.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.t2tsjbV-.mjs
314
+ // ../../node_modules/.bun/@orpc+client@1.16.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.DeR0HTYb.mjs
290
315
  const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
291
- const ORPC_CLIENT_PACKAGE_VERSION = "1.15.2";
316
+ const ORPC_CLIENT_PACKAGE_VERSION = "1.16.2";
292
317
  const RECURSIVE_CLIENT_UNWRAP_KEYS = /* @__PURE__ */ new Set([
293
318
  "bind",
294
319
  "valueOf",
@@ -457,7 +482,7 @@ function createORPCErrorFromJson(json, options = {}) {
457
482
  ...json
458
483
  });
459
484
  }
460
- // ../../node_modules/.bun/@orpc+standard-server@1.15.2+e40b0dfdd726a224/node_modules/@orpc/standard-server/dist/index.mjs
485
+ // ../../node_modules/.bun/@orpc+standard-server@1.16.2+e40b0dfdd726a224/node_modules/@orpc/standard-server/dist/index.mjs
461
486
  var EventEncoderError = class extends TypeError {};
462
487
  var EventDecoderError = class extends TypeError {};
463
488
  var ErrorEvent = class extends Error {
@@ -658,7 +683,7 @@ function mergeStandardHeaders(a, b) {
658
683
  }
659
684
  return merged;
660
685
  }
661
- // ../../node_modules/.bun/@orpc+client@1.15.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.BLtwTQUg.mjs
686
+ // ../../node_modules/.bun/@orpc+client@1.16.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.BLtwTQUg.mjs
662
687
  function mapEventIterator(iterator, maps) {
663
688
  const mapError = async (error) => {
664
689
  let mappedError = await maps.error(error);
@@ -693,7 +718,7 @@ function mapEventIterator(iterator, maps) {
693
718
  }
694
719
  });
695
720
  }
696
- // ../../node_modules/.bun/@orpc+client@1.15.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/index.mjs
721
+ // ../../node_modules/.bun/@orpc+client@1.16.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/index.mjs
697
722
  function resolveFriendlyClientOptions(options) {
698
723
  return {
699
724
  ...options,
@@ -713,7 +738,7 @@ function createORPCClient(link, options = {}) {
713
738
  });
714
739
  } }));
715
740
  }
716
- // ../../node_modules/.bun/@orpc+standard-server-fetch@1.15.2+e40b0dfdd726a224/node_modules/@orpc/standard-server-fetch/dist/index.mjs
741
+ // ../../node_modules/.bun/@orpc+standard-server-fetch@1.16.2+e40b0dfdd726a224/node_modules/@orpc/standard-server-fetch/dist/index.mjs
717
742
  function toEventIterator(stream, options = {}) {
718
743
  const reader = (stream?.pipeThrough(new TextDecoderStream()).pipeThrough(new EventDecoderStream()))?.getReader();
719
744
  let span;
@@ -734,7 +759,7 @@ function toEventIterator(stream, options = {}) {
734
759
  value: void 0
735
760
  };
736
761
  }
737
- switch (value.event) {
762
+ switch (value.event ?? (value.data !== void 0 ? "message" : void 0)) {
738
763
  case "message": {
739
764
  let message = parseEmptyableJSON(value.data);
740
765
  if (isTypescriptObject(message)) message = withEventMeta(message, value);
@@ -750,7 +775,8 @@ function toEventIterator(stream, options = {}) {
750
775
  span?.addEvent("error");
751
776
  throw error;
752
777
  }
753
- case "done": {
778
+ case "done":
779
+ case "close": {
754
780
  let done2 = parseEmptyableJSON(value.data);
755
781
  if (isTypescriptObject(done2)) done2 = withEventMeta(done2, value);
756
782
  span?.addEvent("done");
@@ -939,7 +965,7 @@ function toStandardLazyResponse(response, options = {}) {
939
965
  }
940
966
  };
941
967
  }
942
- // ../../node_modules/.bun/@orpc+client@1.15.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.BKdRDdCe.mjs
968
+ // ../../node_modules/.bun/@orpc+client@1.16.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/shared/client.BmCiDGqJ.mjs
943
969
  var CompositeStandardLinkPlugin = class {
944
970
  plugins;
945
971
  constructor(plugins = []) {
@@ -1147,24 +1173,31 @@ var StandardRPCJsonSerializer = class {
1147
1173
  }
1148
1174
  deserialize(json, meta, maps, getBlob) {
1149
1175
  const ref = { data: json };
1176
+ const input = { data: json };
1150
1177
  if (maps && getBlob) maps.forEach((segments, i) => {
1178
+ const blob = getBlob(i);
1179
+ if (!(blob instanceof Blob)) throw invalidSerializedData(`blob ${i} is not a Blob.`);
1180
+ let original = input;
1151
1181
  let currentRef = ref;
1152
1182
  let preSegment = "data";
1153
1183
  segments.forEach((segment) => {
1154
- currentRef = currentRef[preSegment];
1184
+ original = original[preSegment];
1185
+ currentRef = copyOnWrite(currentRef, preSegment, original);
1155
1186
  preSegment = segment;
1156
1187
  if (!Object.hasOwn(currentRef, preSegment)) throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
1157
1188
  });
1158
- currentRef[preSegment] = getBlob(i);
1189
+ currentRef[preSegment] = blob;
1159
1190
  });
1160
1191
  for (const item of meta) {
1161
1192
  const type = item[0];
1162
1193
  const custom = this.customSerializers.find((custom2) => custom2.type === type);
1163
1194
  if (custom === void 0 && !BUILT_IN_TYPES.has(type)) continue;
1195
+ let original = input;
1164
1196
  let currentRef = ref;
1165
1197
  let preSegment = "data";
1166
1198
  for (let i = 1; i < item.length; i++) {
1167
- currentRef = currentRef[preSegment];
1199
+ original = original[preSegment];
1200
+ currentRef = copyOnWrite(currentRef, preSegment, original);
1168
1201
  preSegment = item[i];
1169
1202
  if (!Object.hasOwn(currentRef, preSegment)) throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
1170
1203
  }
@@ -1174,10 +1207,13 @@ var StandardRPCJsonSerializer = class {
1174
1207
  }
1175
1208
  const serialized = currentRef[preSegment];
1176
1209
  switch (type) {
1177
- case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.BIGINT:
1210
+ case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.BIGINT: {
1178
1211
  if (typeof serialized !== "string") throw invalidSerializedType(type, "bigint", "a string");
1179
- currentRef[preSegment] = BigInt(serialized);
1212
+ const value = parseBigIntString(serialized, DEFAULT_MAX_BIGINT_DIGITS);
1213
+ if (value === void 0) throw invalidSerializedType(type, "bigint", `a decimal integer string of at most ${DEFAULT_MAX_BIGINT_DIGITS} digits`);
1214
+ currentRef[preSegment] = value;
1180
1215
  break;
1216
+ }
1181
1217
  case STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES.DATE:
1182
1218
  if (typeof serialized !== "string" && serialized !== null) throw invalidSerializedType(type, "date", "a string or null");
1183
1219
  currentRef[preSegment] = new Date(serialized ?? NaN);
@@ -1266,6 +1302,7 @@ var StandardRPCLinkCodec = class {
1266
1302
  };
1267
1303
  }
1268
1304
  async decode(response) {
1305
+ if (response.status >= 300 && response.status < 400) throw new Error(`Unexpected redirect response (status ${response.status}): RPCLink does not follow redirects.`);
1269
1306
  const isOk = !isORPCErrorStatus(response.status);
1270
1307
  const deserialized = await (async () => {
1271
1308
  let isBodyOk = false;
@@ -1353,7 +1390,7 @@ var StandardRPCLink = class extends StandardLink {
1353
1390
  super(linkCodec, linkClient, options);
1354
1391
  }
1355
1392
  };
1356
- // ../../node_modules/.bun/@orpc+client@1.15.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/adapters/fetch/index.mjs
1393
+ // ../../node_modules/.bun/@orpc+client@1.16.2+e40b0dfdd726a224/node_modules/@orpc/client/dist/adapters/fetch/index.mjs
1357
1394
  var CompositeLinkFetchPlugin = class extends CompositeStandardLinkPlugin {
1358
1395
  initRuntimeAdapter(options) {
1359
1396
  for (const plugin of this.plugins) plugin.initRuntimeAdapter?.(options);
package/dist/index.d.cts CHANGED
@@ -1544,6 +1544,56 @@ declare const similarPapers: ContractProcedureBuilderWithInputOutput<z.ZodObject
1544
1544
  declare namespace index_d_exports$8 {
1545
1545
  export { fetch, findCitations, paperGraph, parse$4 as parse, search, searchGrants, similarPapers };
1546
1546
  }
1547
+ declare const deleteRetainedInputs: ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
1548
+ usageKind: z.ZodEnum<{
1549
+ api: "api";
1550
+ free: "free";
1551
+ }>;
1552
+ usageId: z.ZodNumber;
1553
+ workspaceId: z.ZodOptional<z.ZodNumber>;
1554
+ actor: z.ZodObject<{
1555
+ type: z.ZodEnum<{
1556
+ account_deletion: "account_deletion";
1557
+ admin: "admin";
1558
+ workspace_owner: "workspace_owner";
1559
+ }>;
1560
+ userId: z.ZodString;
1561
+ email: z.ZodOptional<z.ZodString>;
1562
+ }, z.core.$strip>;
1563
+ }, z.core.$strip>, z.ZodObject<{
1564
+ workspaceId: z.ZodNumber;
1565
+ actor: z.ZodObject<{
1566
+ type: z.ZodEnum<{
1567
+ account_deletion: "account_deletion";
1568
+ admin: "admin";
1569
+ workspace_owner: "workspace_owner";
1570
+ }>;
1571
+ userId: z.ZodString;
1572
+ email: z.ZodOptional<z.ZodString>;
1573
+ }, z.core.$strip>;
1574
+ }, z.core.$strip>]>, z.ZodObject<{
1575
+ deleted: z.ZodNumber;
1576
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1577
+ declare const downloadRetainedInput: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1578
+ usageKind: z.ZodEnum<{
1579
+ api: "api";
1580
+ free: "free";
1581
+ }>;
1582
+ usageId: z.ZodNumber;
1583
+ actor: z.ZodObject<{
1584
+ type: z.ZodEnum<{
1585
+ account_deletion: "account_deletion";
1586
+ admin: "admin";
1587
+ workspace_owner: "workspace_owner";
1588
+ }>;
1589
+ userId: z.ZodString;
1590
+ email: z.ZodOptional<z.ZodString>;
1591
+ }, z.core.$strip>;
1592
+ }, z.core.$strip>, z.ZodObject<{
1593
+ file: z.ZodInstanceOf<any>;
1594
+ url: z.ZodNullable<z.ZodString>;
1595
+ responseHeaders: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
1596
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1547
1597
  declare const getEnvironment: ContractProcedureBuilderWithOutput<Schema$1<unknown, unknown>, z.ZodObject<{
1548
1598
  environment: z.ZodRecord<z.ZodString, z.ZodString>;
1549
1599
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
@@ -1629,6 +1679,100 @@ declare const getProviderUsageRecords: ContractProcedureBuilderWithInputOutput<z
1629
1679
  }, z.core.$strip>>;
1630
1680
  hasMore: z.ZodBoolean;
1631
1681
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1682
+ declare const getRetainedInputs: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1683
+ usageKind: z.ZodEnum<{
1684
+ api: "api";
1685
+ free: "free";
1686
+ }>;
1687
+ usageIds: z.ZodArray<z.ZodNumber>;
1688
+ }, z.core.$strip>, z.ZodObject<{
1689
+ enabled: z.ZodBoolean;
1690
+ records: z.ZodArray<z.ZodObject<{
1691
+ usageKind: z.ZodEnum<{
1692
+ api: "api";
1693
+ free: "free";
1694
+ }>;
1695
+ usageId: z.ZodNumber;
1696
+ workspaceId: z.ZodNullable<z.ZodNumber>;
1697
+ operation: z.ZodString;
1698
+ reason: z.ZodEnum<{
1699
+ fallback_success: "fallback_success";
1700
+ system_error: "system_error";
1701
+ user_error: "user_error";
1702
+ }>;
1703
+ fileStatus: z.ZodEnum<{
1704
+ deleted: "deleted";
1705
+ evicted: "evicted";
1706
+ expired: "expired";
1707
+ kept: "kept";
1708
+ skipped: "skipped";
1709
+ }>;
1710
+ skipReason: z.ZodNullable<z.ZodEnum<{
1711
+ input_not_read: "input_not_read";
1712
+ not_eligible: "not_eligible";
1713
+ password_protected: "password_protected";
1714
+ storage_error: "storage_error";
1715
+ storage_full: "storage_full";
1716
+ too_large: "too_large";
1717
+ }>>;
1718
+ inputBytes: z.ZodNullable<z.ZodNumber>;
1719
+ expiresAt: z.ZodNullable<z.ZodNumber>;
1720
+ deletedAt: z.ZodNullable<z.ZodNumber>;
1721
+ diagnostics: z.ZodObject<{
1722
+ errorCode: z.ZodNullable<z.ZodString>;
1723
+ errorStage: z.ZodNullable<z.ZodString>;
1724
+ errorStatus: z.ZodNullable<z.ZodString>;
1725
+ providerChain: z.ZodArray<z.ZodObject<{
1726
+ provider: z.ZodString;
1727
+ service: z.ZodString;
1728
+ model: z.ZodNullable<z.ZodString>;
1729
+ status: z.ZodString;
1730
+ error: z.ZodNullable<z.ZodString>;
1731
+ }, z.core.$strip>>;
1732
+ inputSource: z.ZodNullable<z.ZodString>;
1733
+ declaredMime: z.ZodNullable<z.ZodString>;
1734
+ detectedMime: z.ZodNullable<z.ZodString>;
1735
+ detectedExtension: z.ZodNullable<z.ZodString>;
1736
+ extension: z.ZodNullable<z.ZodString>;
1737
+ documentType: z.ZodNullable<z.ZodString>;
1738
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1739
+ sha256: z.ZodNullable<z.ZodString>;
1740
+ pageCount: z.ZodNullable<z.ZodNumber>;
1741
+ pdf: z.ZodNullable<z.ZodObject<{
1742
+ version: z.ZodNullable<z.ZodString>;
1743
+ producer: z.ZodNullable<z.ZodString>;
1744
+ creator: z.ZodNullable<z.ZodString>;
1745
+ encrypted: z.ZodBoolean;
1746
+ hasForms: z.ZodNullable<z.ZodBoolean>;
1747
+ hasAttachments: z.ZodNullable<z.ZodBoolean>;
1748
+ pagesSampled: z.ZodNumber;
1749
+ pagesWithoutText: z.ZodNumber;
1750
+ scannedRatio: z.ZodNullable<z.ZodNumber>;
1751
+ openError: z.ZodNullable<z.ZodString>;
1752
+ }, z.core.$strip>>;
1753
+ image: z.ZodNullable<z.ZodObject<{
1754
+ width: z.ZodNullable<z.ZodNumber>;
1755
+ height: z.ZodNullable<z.ZodNumber>;
1756
+ type: z.ZodNullable<z.ZodString>;
1757
+ }, z.core.$strip>>;
1758
+ }, z.core.$strip>;
1759
+ audit: z.ZodArray<z.ZodObject<{
1760
+ action: z.ZodEnum<{
1761
+ delete: "delete";
1762
+ download: "download";
1763
+ }>;
1764
+ actorType: z.ZodEnum<{
1765
+ account_deletion: "account_deletion";
1766
+ admin: "admin";
1767
+ workspace_owner: "workspace_owner";
1768
+ }>;
1769
+ actorId: z.ZodString;
1770
+ actorEmail: z.ZodNullable<z.ZodString>;
1771
+ createdAt: z.ZodNumber;
1772
+ }, z.core.$strip>>;
1773
+ createdAt: z.ZodNumber;
1774
+ }, z.core.$strip>>;
1775
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1632
1776
  declare const getUsageRecords: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1633
1777
  cursor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1634
1778
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1696,7 +1840,7 @@ declare const setVersion: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1696
1840
  message: z.ZodString;
1697
1841
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1698
1842
  declare namespace index_d_exports$7 {
1699
- export { getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
1843
+ export { deleteRetainedInputs, downloadRetainedInput, getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getRetainedInputs, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
1700
1844
  }
1701
1845
  declare const validateCredential: ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
1702
1846
  status: z.ZodString;
package/dist/index.d.mts CHANGED
@@ -1544,6 +1544,56 @@ declare const similarPapers: ContractProcedureBuilderWithInputOutput<z.ZodObject
1544
1544
  declare namespace index_d_exports$8 {
1545
1545
  export { fetch, findCitations, paperGraph, parse$4 as parse, search, searchGrants, similarPapers };
1546
1546
  }
1547
+ declare const deleteRetainedInputs: ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
1548
+ usageKind: z.ZodEnum<{
1549
+ api: "api";
1550
+ free: "free";
1551
+ }>;
1552
+ usageId: z.ZodNumber;
1553
+ workspaceId: z.ZodOptional<z.ZodNumber>;
1554
+ actor: z.ZodObject<{
1555
+ type: z.ZodEnum<{
1556
+ account_deletion: "account_deletion";
1557
+ admin: "admin";
1558
+ workspace_owner: "workspace_owner";
1559
+ }>;
1560
+ userId: z.ZodString;
1561
+ email: z.ZodOptional<z.ZodString>;
1562
+ }, z.core.$strip>;
1563
+ }, z.core.$strip>, z.ZodObject<{
1564
+ workspaceId: z.ZodNumber;
1565
+ actor: z.ZodObject<{
1566
+ type: z.ZodEnum<{
1567
+ account_deletion: "account_deletion";
1568
+ admin: "admin";
1569
+ workspace_owner: "workspace_owner";
1570
+ }>;
1571
+ userId: z.ZodString;
1572
+ email: z.ZodOptional<z.ZodString>;
1573
+ }, z.core.$strip>;
1574
+ }, z.core.$strip>]>, z.ZodObject<{
1575
+ deleted: z.ZodNumber;
1576
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1577
+ declare const downloadRetainedInput: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1578
+ usageKind: z.ZodEnum<{
1579
+ api: "api";
1580
+ free: "free";
1581
+ }>;
1582
+ usageId: z.ZodNumber;
1583
+ actor: z.ZodObject<{
1584
+ type: z.ZodEnum<{
1585
+ account_deletion: "account_deletion";
1586
+ admin: "admin";
1587
+ workspace_owner: "workspace_owner";
1588
+ }>;
1589
+ userId: z.ZodString;
1590
+ email: z.ZodOptional<z.ZodString>;
1591
+ }, z.core.$strip>;
1592
+ }, z.core.$strip>, z.ZodObject<{
1593
+ file: z.ZodInstanceOf<any>;
1594
+ url: z.ZodNullable<z.ZodString>;
1595
+ responseHeaders: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
1596
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1547
1597
  declare const getEnvironment: ContractProcedureBuilderWithOutput<Schema$1<unknown, unknown>, z.ZodObject<{
1548
1598
  environment: z.ZodRecord<z.ZodString, z.ZodString>;
1549
1599
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
@@ -1629,6 +1679,100 @@ declare const getProviderUsageRecords: ContractProcedureBuilderWithInputOutput<z
1629
1679
  }, z.core.$strip>>;
1630
1680
  hasMore: z.ZodBoolean;
1631
1681
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1682
+ declare const getRetainedInputs: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1683
+ usageKind: z.ZodEnum<{
1684
+ api: "api";
1685
+ free: "free";
1686
+ }>;
1687
+ usageIds: z.ZodArray<z.ZodNumber>;
1688
+ }, z.core.$strip>, z.ZodObject<{
1689
+ enabled: z.ZodBoolean;
1690
+ records: z.ZodArray<z.ZodObject<{
1691
+ usageKind: z.ZodEnum<{
1692
+ api: "api";
1693
+ free: "free";
1694
+ }>;
1695
+ usageId: z.ZodNumber;
1696
+ workspaceId: z.ZodNullable<z.ZodNumber>;
1697
+ operation: z.ZodString;
1698
+ reason: z.ZodEnum<{
1699
+ fallback_success: "fallback_success";
1700
+ system_error: "system_error";
1701
+ user_error: "user_error";
1702
+ }>;
1703
+ fileStatus: z.ZodEnum<{
1704
+ deleted: "deleted";
1705
+ evicted: "evicted";
1706
+ expired: "expired";
1707
+ kept: "kept";
1708
+ skipped: "skipped";
1709
+ }>;
1710
+ skipReason: z.ZodNullable<z.ZodEnum<{
1711
+ input_not_read: "input_not_read";
1712
+ not_eligible: "not_eligible";
1713
+ password_protected: "password_protected";
1714
+ storage_error: "storage_error";
1715
+ storage_full: "storage_full";
1716
+ too_large: "too_large";
1717
+ }>>;
1718
+ inputBytes: z.ZodNullable<z.ZodNumber>;
1719
+ expiresAt: z.ZodNullable<z.ZodNumber>;
1720
+ deletedAt: z.ZodNullable<z.ZodNumber>;
1721
+ diagnostics: z.ZodObject<{
1722
+ errorCode: z.ZodNullable<z.ZodString>;
1723
+ errorStage: z.ZodNullable<z.ZodString>;
1724
+ errorStatus: z.ZodNullable<z.ZodString>;
1725
+ providerChain: z.ZodArray<z.ZodObject<{
1726
+ provider: z.ZodString;
1727
+ service: z.ZodString;
1728
+ model: z.ZodNullable<z.ZodString>;
1729
+ status: z.ZodString;
1730
+ error: z.ZodNullable<z.ZodString>;
1731
+ }, z.core.$strip>>;
1732
+ inputSource: z.ZodNullable<z.ZodString>;
1733
+ declaredMime: z.ZodNullable<z.ZodString>;
1734
+ detectedMime: z.ZodNullable<z.ZodString>;
1735
+ detectedExtension: z.ZodNullable<z.ZodString>;
1736
+ extension: z.ZodNullable<z.ZodString>;
1737
+ documentType: z.ZodNullable<z.ZodString>;
1738
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
1739
+ sha256: z.ZodNullable<z.ZodString>;
1740
+ pageCount: z.ZodNullable<z.ZodNumber>;
1741
+ pdf: z.ZodNullable<z.ZodObject<{
1742
+ version: z.ZodNullable<z.ZodString>;
1743
+ producer: z.ZodNullable<z.ZodString>;
1744
+ creator: z.ZodNullable<z.ZodString>;
1745
+ encrypted: z.ZodBoolean;
1746
+ hasForms: z.ZodNullable<z.ZodBoolean>;
1747
+ hasAttachments: z.ZodNullable<z.ZodBoolean>;
1748
+ pagesSampled: z.ZodNumber;
1749
+ pagesWithoutText: z.ZodNumber;
1750
+ scannedRatio: z.ZodNullable<z.ZodNumber>;
1751
+ openError: z.ZodNullable<z.ZodString>;
1752
+ }, z.core.$strip>>;
1753
+ image: z.ZodNullable<z.ZodObject<{
1754
+ width: z.ZodNullable<z.ZodNumber>;
1755
+ height: z.ZodNullable<z.ZodNumber>;
1756
+ type: z.ZodNullable<z.ZodString>;
1757
+ }, z.core.$strip>>;
1758
+ }, z.core.$strip>;
1759
+ audit: z.ZodArray<z.ZodObject<{
1760
+ action: z.ZodEnum<{
1761
+ delete: "delete";
1762
+ download: "download";
1763
+ }>;
1764
+ actorType: z.ZodEnum<{
1765
+ account_deletion: "account_deletion";
1766
+ admin: "admin";
1767
+ workspace_owner: "workspace_owner";
1768
+ }>;
1769
+ actorId: z.ZodString;
1770
+ actorEmail: z.ZodNullable<z.ZodString>;
1771
+ createdAt: z.ZodNumber;
1772
+ }, z.core.$strip>>;
1773
+ createdAt: z.ZodNumber;
1774
+ }, z.core.$strip>>;
1775
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1632
1776
  declare const getUsageRecords: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1633
1777
  cursor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1634
1778
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1696,7 +1840,7 @@ declare const setVersion: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1696
1840
  message: z.ZodString;
1697
1841
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1698
1842
  declare namespace index_d_exports$7 {
1699
- export { getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
1843
+ export { deleteRetainedInputs, downloadRetainedInput, getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getRetainedInputs, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
1700
1844
  }
1701
1845
  declare const validateCredential: ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
1702
1846
  status: z.ZodString;