@pdfvector/client 0.0.53 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2084 @@
1
+ import { z } from "zod";
2
+ type MaybeOptionalOptions<TOptions> = Record<never, never> extends TOptions ? [options?: TOptions] : [options: TOptions];
3
+ type PromiseWithError<T, TError> = Promise<T> & {
4
+ __error?: {
5
+ type: TError;
6
+ };
7
+ };
8
+ /**
9
+ * The place where you can config the orpc types.
10
+ *
11
+ * - `throwableError` the error type that represent throwable errors should be `Error` or `null | undefined | {}` if you want more strict.
12
+ */
13
+ interface Registry {}
14
+ type ThrowableError = Registry extends {
15
+ throwableError: infer T;
16
+ } ? T : Error;
17
+ type HTTPPath = `/${string}`;
18
+ type HTTPMethod = 'HEAD' | 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
19
+ type ClientContext = Record<PropertyKey, any>;
20
+ interface ClientOptions<T extends ClientContext> {
21
+ signal?: AbortSignal;
22
+ lastEventId?: string | undefined;
23
+ context: T;
24
+ }
25
+ type FriendlyClientOptions<T extends ClientContext> = Omit<ClientOptions<T>, 'context'> & (Record<never, never> extends T ? {
26
+ context?: T;
27
+ } : {
28
+ context: T;
29
+ });
30
+ type ClientRest<TClientContext extends ClientContext, TInput> = Record<never, never> extends TClientContext ? undefined extends TInput ? [input?: TInput, options?: FriendlyClientOptions<TClientContext>] : [input: TInput, options?: FriendlyClientOptions<TClientContext>] : [input: TInput, options: FriendlyClientOptions<TClientContext>];
31
+ type ClientPromiseResult<TOutput, TError> = PromiseWithError<TOutput, TError>;
32
+ interface Client<TClientContext extends ClientContext, TInput, TOutput, TError> {
33
+ (...rest: ClientRest<TClientContext, TInput>): ClientPromiseResult<TOutput, TError>;
34
+ }
35
+ declare const COMMON_ORPC_ERROR_DEFS: {
36
+ readonly BAD_REQUEST: {
37
+ readonly status: 400;
38
+ readonly message: "Bad Request";
39
+ };
40
+ readonly UNAUTHORIZED: {
41
+ readonly status: 401;
42
+ readonly message: "Unauthorized";
43
+ };
44
+ readonly FORBIDDEN: {
45
+ readonly status: 403;
46
+ readonly message: "Forbidden";
47
+ };
48
+ readonly NOT_FOUND: {
49
+ readonly status: 404;
50
+ readonly message: "Not Found";
51
+ };
52
+ readonly METHOD_NOT_SUPPORTED: {
53
+ readonly status: 405;
54
+ readonly message: "Method Not Supported";
55
+ };
56
+ readonly NOT_ACCEPTABLE: {
57
+ readonly status: 406;
58
+ readonly message: "Not Acceptable";
59
+ };
60
+ readonly TIMEOUT: {
61
+ readonly status: 408;
62
+ readonly message: "Request Timeout";
63
+ };
64
+ readonly CONFLICT: {
65
+ readonly status: 409;
66
+ readonly message: "Conflict";
67
+ };
68
+ readonly PRECONDITION_FAILED: {
69
+ readonly status: 412;
70
+ readonly message: "Precondition Failed";
71
+ };
72
+ readonly PAYLOAD_TOO_LARGE: {
73
+ readonly status: 413;
74
+ readonly message: "Payload Too Large";
75
+ };
76
+ readonly UNSUPPORTED_MEDIA_TYPE: {
77
+ readonly status: 415;
78
+ readonly message: "Unsupported Media Type";
79
+ };
80
+ readonly UNPROCESSABLE_CONTENT: {
81
+ readonly status: 422;
82
+ readonly message: "Unprocessable Content";
83
+ };
84
+ readonly TOO_MANY_REQUESTS: {
85
+ readonly status: 429;
86
+ readonly message: "Too Many Requests";
87
+ };
88
+ readonly CLIENT_CLOSED_REQUEST: {
89
+ readonly status: 499;
90
+ readonly message: "Client Closed Request";
91
+ };
92
+ readonly INTERNAL_SERVER_ERROR: {
93
+ readonly status: 500;
94
+ readonly message: "Internal Server Error";
95
+ };
96
+ readonly NOT_IMPLEMENTED: {
97
+ readonly status: 501;
98
+ readonly message: "Not Implemented";
99
+ };
100
+ readonly BAD_GATEWAY: {
101
+ readonly status: 502;
102
+ readonly message: "Bad Gateway";
103
+ };
104
+ readonly SERVICE_UNAVAILABLE: {
105
+ readonly status: 503;
106
+ readonly message: "Service Unavailable";
107
+ };
108
+ readonly GATEWAY_TIMEOUT: {
109
+ readonly status: 504;
110
+ readonly message: "Gateway Timeout";
111
+ };
112
+ };
113
+ type CommonORPCErrorCode = keyof typeof COMMON_ORPC_ERROR_DEFS;
114
+ type ORPCErrorCode = CommonORPCErrorCode | (string & {});
115
+ type ORPCErrorOptions<TData> = ErrorOptions & {
116
+ defined?: boolean;
117
+ status?: number;
118
+ message?: string;
119
+ } & (undefined extends TData ? {
120
+ data?: TData;
121
+ } : {
122
+ data: TData;
123
+ });
124
+ declare class ORPCError<TCode extends ORPCErrorCode, TData> extends Error {
125
+ readonly defined: boolean;
126
+ readonly code: TCode;
127
+ readonly status: number;
128
+ readonly data: TData;
129
+ constructor(code: TCode, ...rest: MaybeOptionalOptions<ORPCErrorOptions<TData>>);
130
+ toJSON(): ORPCErrorJSON<TCode, TData>;
131
+ /**
132
+ * Workaround for Next.js where different contexts use separate
133
+ * dependency graphs, causing multiple ORPCError constructors existing and breaking
134
+ * `instanceof` checks across contexts.
135
+ *
136
+ * This is particularly problematic with "Optimized SSR", where orpc-client
137
+ * executes in one context but is invoked from another. When an error is thrown
138
+ * in the execution context, `instanceof ORPCError` checks fail in the
139
+ * invocation context due to separate class constructors.
140
+ *
141
+ * @todo Remove this and related code if Next.js resolves the multiple dependency graph issue.
142
+ */
143
+ static [Symbol.hasInstance](instance: unknown): boolean;
144
+ }
145
+ type ORPCErrorJSON<TCode extends string, TData> = Pick<ORPCError<TCode, TData>, 'defined' | 'code' | 'status' | 'message' | 'data'>;
146
+ /** The Standard Typed interface. This is a base type extended by other specs. */
147
+ interface StandardTypedV1<Input = unknown, Output = Input> {
148
+ /** The Standard properties. */
149
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
150
+ }
151
+ declare namespace StandardTypedV1 {
152
+ /** The Standard Typed properties interface. */
153
+ interface Props<Input = unknown, Output = Input> {
154
+ /** The version number of the standard. */
155
+ readonly version: 1;
156
+ /** The vendor name of the schema library. */
157
+ readonly vendor: string;
158
+ /** Inferred types associated with the schema. */
159
+ readonly types?: Types<Input, Output> | undefined;
160
+ }
161
+ /** The Standard Typed types interface. */
162
+ interface Types<Input = unknown, Output = Input> {
163
+ /** The input type of the schema. */
164
+ readonly input: Input;
165
+ /** The output type of the schema. */
166
+ readonly output: Output;
167
+ }
168
+ /** Infers the input type of a Standard Typed. */
169
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
170
+ /** Infers the output type of a Standard Typed. */
171
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
172
+ }
173
+ /** The Standard Schema interface. */
174
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
175
+ /** The Standard Schema properties. */
176
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
177
+ }
178
+ declare namespace StandardSchemaV1 {
179
+ /** The Standard Schema properties interface. */
180
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
181
+ /** Validates unknown input values. */
182
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
183
+ }
184
+ /** The result interface of the validate function. */
185
+ type Result<Output> = SuccessResult<Output> | FailureResult;
186
+ /** The result interface if validation succeeds. */
187
+ interface SuccessResult<Output> {
188
+ /** The typed output value. */
189
+ readonly value: Output;
190
+ /** A falsy value for `issues` indicates success. */
191
+ readonly issues?: undefined;
192
+ }
193
+ interface Options {
194
+ /** Explicit support for additional vendor-specific parameters, if needed. */
195
+ readonly libraryOptions?: Record<string, unknown> | undefined;
196
+ }
197
+ /** The result interface if validation fails. */
198
+ interface FailureResult {
199
+ /** The issues of failed validation. */
200
+ readonly issues: ReadonlyArray<Issue>;
201
+ }
202
+ /** The issue interface of the failure output. */
203
+ interface Issue {
204
+ /** The error message of the issue. */
205
+ readonly message: string;
206
+ /** The path of the issue, if any. */
207
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
208
+ }
209
+ /** The path segment interface of the issue. */
210
+ interface PathSegment {
211
+ /** The key representing a path segment. */
212
+ readonly key: PropertyKey;
213
+ }
214
+ /** The Standard types interface. */
215
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {}
216
+ /** Infers the input type of a Standard. */
217
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
218
+ /** Infers the output type of a Standard. */
219
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
220
+ }
221
+ declare namespace OpenAPIV3_1 {
222
+ type Modify<T, R> = Omit<T, keyof R> & R;
223
+ type PathsWebhooksComponents<T extends {} = {}> = {
224
+ paths: PathsObject<T>;
225
+ webhooks: Record<string, PathItemObject | ReferenceObject>;
226
+ components: ComponentsObject;
227
+ };
228
+ export type Document<T extends {} = {}> = Modify<Omit<OpenAPIV3.Document<T>, 'paths' | 'components'>, {
229
+ info: InfoObject;
230
+ jsonSchemaDialect?: string;
231
+ servers?: ServerObject[];
232
+ } & ((Pick<PathsWebhooksComponents<T>, 'paths'> & Omit<Partial<PathsWebhooksComponents<T>>, 'paths'>) | (Pick<PathsWebhooksComponents<T>, 'webhooks'> & Omit<Partial<PathsWebhooksComponents<T>>, 'webhooks'>) | (Pick<PathsWebhooksComponents<T>, 'components'> & Omit<Partial<PathsWebhooksComponents<T>>, 'components'>))>;
233
+ export type InfoObject = Modify<OpenAPIV3.InfoObject, {
234
+ summary?: string;
235
+ license?: LicenseObject;
236
+ }>;
237
+ export type ContactObject = OpenAPIV3.ContactObject;
238
+ export type LicenseObject = Modify<OpenAPIV3.LicenseObject, {
239
+ identifier?: string;
240
+ }>;
241
+ export type ServerObject = Modify<OpenAPIV3.ServerObject, {
242
+ url: string;
243
+ description?: string;
244
+ variables?: Record<string, ServerVariableObject>;
245
+ }>;
246
+ export type ServerVariableObject = Modify<OpenAPIV3.ServerVariableObject, {
247
+ enum?: [string, ...string[]];
248
+ }>;
249
+ export type PathsObject<T extends {} = {}, P extends {} = {}> = Record<string, (PathItemObject<T> & P) | undefined>;
250
+ export type HttpMethods = OpenAPIV3.HttpMethods;
251
+ export type PathItemObject<T extends {} = {}> = Modify<OpenAPIV3.PathItemObject<T>, {
252
+ servers?: ServerObject[];
253
+ parameters?: (ReferenceObject | ParameterObject)[];
254
+ }> & { [method in HttpMethods]?: OperationObject<T>; };
255
+ export type OperationObject<T extends {} = {}> = Modify<OpenAPIV3.OperationObject<T>, {
256
+ parameters?: (ReferenceObject | ParameterObject)[];
257
+ requestBody?: ReferenceObject | RequestBodyObject;
258
+ responses?: ResponsesObject;
259
+ callbacks?: Record<string, ReferenceObject | CallbackObject>;
260
+ servers?: ServerObject[];
261
+ }> & T;
262
+ export type ExternalDocumentationObject = OpenAPIV3.ExternalDocumentationObject;
263
+ export type ParameterObject = OpenAPIV3.ParameterObject;
264
+ export type HeaderObject = OpenAPIV3.HeaderObject;
265
+ export type ParameterBaseObject = OpenAPIV3.ParameterBaseObject;
266
+ export type NonArraySchemaObjectType = OpenAPIV3.NonArraySchemaObjectType | 'null';
267
+ export type ArraySchemaObjectType = OpenAPIV3.ArraySchemaObjectType;
268
+ /**
269
+ * There is no way to tell typescript to require items when type is either 'array' or array containing 'array' type
270
+ * 'items' will be always visible as optional
271
+ * Casting schema object to ArraySchemaObject or NonArraySchemaObject will work fine
272
+ */
273
+ export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | MixedSchemaObject;
274
+ export interface ArraySchemaObject extends BaseSchemaObject {
275
+ type: ArraySchemaObjectType;
276
+ items: ReferenceObject | SchemaObject;
277
+ }
278
+ export interface NonArraySchemaObject extends BaseSchemaObject {
279
+ type?: NonArraySchemaObjectType;
280
+ }
281
+ interface MixedSchemaObject extends BaseSchemaObject {
282
+ type?: (ArraySchemaObjectType | NonArraySchemaObjectType)[];
283
+ items?: ReferenceObject | SchemaObject;
284
+ }
285
+ export type BaseSchemaObject = Modify<Omit<OpenAPIV3.BaseSchemaObject, 'nullable'>, {
286
+ examples?: OpenAPIV3.BaseSchemaObject['example'][];
287
+ exclusiveMinimum?: boolean | number;
288
+ exclusiveMaximum?: boolean | number;
289
+ contentMediaType?: string;
290
+ $schema?: string;
291
+ additionalProperties?: boolean | ReferenceObject | SchemaObject;
292
+ properties?: {
293
+ [name: string]: ReferenceObject | SchemaObject;
294
+ };
295
+ allOf?: (ReferenceObject | SchemaObject)[];
296
+ oneOf?: (ReferenceObject | SchemaObject)[];
297
+ anyOf?: (ReferenceObject | SchemaObject)[];
298
+ not?: ReferenceObject | SchemaObject;
299
+ discriminator?: DiscriminatorObject;
300
+ externalDocs?: ExternalDocumentationObject;
301
+ xml?: XMLObject;
302
+ const?: any;
303
+ }>;
304
+ export type DiscriminatorObject = OpenAPIV3.DiscriminatorObject;
305
+ export type XMLObject = OpenAPIV3.XMLObject;
306
+ export type ReferenceObject = Modify<OpenAPIV3.ReferenceObject, {
307
+ summary?: string;
308
+ description?: string;
309
+ }>;
310
+ export type ExampleObject = OpenAPIV3.ExampleObject;
311
+ export type MediaTypeObject = Modify<OpenAPIV3.MediaTypeObject, {
312
+ schema?: SchemaObject | ReferenceObject;
313
+ examples?: Record<string, ReferenceObject | ExampleObject>;
314
+ }>;
315
+ export type EncodingObject = OpenAPIV3.EncodingObject;
316
+ export type RequestBodyObject = Modify<OpenAPIV3.RequestBodyObject, {
317
+ content: {
318
+ [media: string]: MediaTypeObject;
319
+ };
320
+ }>;
321
+ export type ResponsesObject = Record<string, ReferenceObject | ResponseObject>;
322
+ export type ResponseObject = Modify<OpenAPIV3.ResponseObject, {
323
+ headers?: {
324
+ [header: string]: ReferenceObject | HeaderObject;
325
+ };
326
+ content?: {
327
+ [media: string]: MediaTypeObject;
328
+ };
329
+ links?: {
330
+ [link: string]: ReferenceObject | LinkObject;
331
+ };
332
+ }>;
333
+ export type LinkObject = Modify<OpenAPIV3.LinkObject, {
334
+ server?: ServerObject;
335
+ }>;
336
+ export type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
337
+ export type SecurityRequirementObject = OpenAPIV3.SecurityRequirementObject;
338
+ export type ComponentsObject = Modify<OpenAPIV3.ComponentsObject, {
339
+ schemas?: Record<string, SchemaObject>;
340
+ responses?: Record<string, ReferenceObject | ResponseObject>;
341
+ parameters?: Record<string, ReferenceObject | ParameterObject>;
342
+ examples?: Record<string, ReferenceObject | ExampleObject>;
343
+ requestBodies?: Record<string, ReferenceObject | RequestBodyObject>;
344
+ headers?: Record<string, ReferenceObject | HeaderObject>;
345
+ securitySchemes?: Record<string, ReferenceObject | SecuritySchemeObject>;
346
+ links?: Record<string, ReferenceObject | LinkObject>;
347
+ callbacks?: Record<string, ReferenceObject | CallbackObject>;
348
+ pathItems?: Record<string, ReferenceObject | PathItemObject>;
349
+ }>;
350
+ export type SecuritySchemeObject = OpenAPIV3.SecuritySchemeObject;
351
+ export type HttpSecurityScheme = OpenAPIV3.HttpSecurityScheme;
352
+ export type ApiKeySecurityScheme = OpenAPIV3.ApiKeySecurityScheme;
353
+ export type OAuth2SecurityScheme = OpenAPIV3.OAuth2SecurityScheme;
354
+ export type OpenIdSecurityScheme = OpenAPIV3.OpenIdSecurityScheme;
355
+ export type TagObject = OpenAPIV3.TagObject;
356
+ export {};
357
+ }
358
+ declare namespace OpenAPIV3 {
359
+ interface Document<T extends {} = {}> {
360
+ openapi: string;
361
+ info: InfoObject;
362
+ servers?: ServerObject[];
363
+ paths: PathsObject<T>;
364
+ components?: ComponentsObject;
365
+ security?: SecurityRequirementObject[];
366
+ tags?: TagObject[];
367
+ externalDocs?: ExternalDocumentationObject;
368
+ 'x-express-openapi-additional-middleware'?: (((request: any, response: any, next: any) => Promise<void>) | ((request: any, response: any, next: any) => void))[];
369
+ 'x-express-openapi-validation-strict'?: boolean;
370
+ }
371
+ interface InfoObject {
372
+ title: string;
373
+ description?: string;
374
+ termsOfService?: string;
375
+ contact?: ContactObject;
376
+ license?: LicenseObject;
377
+ version: string;
378
+ }
379
+ interface ContactObject {
380
+ name?: string;
381
+ url?: string;
382
+ email?: string;
383
+ }
384
+ interface LicenseObject {
385
+ name: string;
386
+ url?: string;
387
+ }
388
+ interface ServerObject {
389
+ url: string;
390
+ description?: string;
391
+ variables?: {
392
+ [variable: string]: ServerVariableObject;
393
+ };
394
+ }
395
+ interface ServerVariableObject {
396
+ enum?: string[];
397
+ default: string;
398
+ description?: string;
399
+ }
400
+ interface PathsObject<T extends {} = {}, P extends {} = {}> {
401
+ [pattern: string]: (PathItemObject<T> & P) | undefined;
402
+ }
403
+ enum HttpMethods {
404
+ GET = "get",
405
+ PUT = "put",
406
+ POST = "post",
407
+ DELETE = "delete",
408
+ OPTIONS = "options",
409
+ HEAD = "head",
410
+ PATCH = "patch",
411
+ TRACE = "trace"
412
+ }
413
+ type PathItemObject<T extends {} = {}> = {
414
+ $ref?: string;
415
+ summary?: string;
416
+ description?: string;
417
+ servers?: ServerObject[];
418
+ parameters?: (ReferenceObject | ParameterObject)[];
419
+ } & { [method in HttpMethods]?: OperationObject<T>; };
420
+ type OperationObject<T extends {} = {}> = {
421
+ tags?: string[];
422
+ summary?: string;
423
+ description?: string;
424
+ externalDocs?: ExternalDocumentationObject;
425
+ operationId?: string;
426
+ parameters?: (ReferenceObject | ParameterObject)[];
427
+ requestBody?: ReferenceObject | RequestBodyObject;
428
+ responses: ResponsesObject;
429
+ callbacks?: {
430
+ [callback: string]: ReferenceObject | CallbackObject;
431
+ };
432
+ deprecated?: boolean;
433
+ security?: SecurityRequirementObject[];
434
+ servers?: ServerObject[];
435
+ } & T;
436
+ interface ExternalDocumentationObject {
437
+ description?: string;
438
+ url: string;
439
+ }
440
+ interface ParameterObject extends ParameterBaseObject {
441
+ name: string;
442
+ in: string;
443
+ }
444
+ interface HeaderObject extends ParameterBaseObject {}
445
+ interface ParameterBaseObject {
446
+ description?: string;
447
+ required?: boolean;
448
+ deprecated?: boolean;
449
+ allowEmptyValue?: boolean;
450
+ style?: string;
451
+ explode?: boolean;
452
+ allowReserved?: boolean;
453
+ schema?: ReferenceObject | SchemaObject;
454
+ example?: any;
455
+ examples?: {
456
+ [media: string]: ReferenceObject | ExampleObject;
457
+ };
458
+ content?: {
459
+ [media: string]: MediaTypeObject;
460
+ };
461
+ }
462
+ type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer';
463
+ type ArraySchemaObjectType = 'array';
464
+ type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
465
+ interface ArraySchemaObject extends BaseSchemaObject {
466
+ type: ArraySchemaObjectType;
467
+ items: ReferenceObject | SchemaObject;
468
+ }
469
+ interface NonArraySchemaObject extends BaseSchemaObject {
470
+ type?: NonArraySchemaObjectType;
471
+ }
472
+ interface BaseSchemaObject {
473
+ title?: string;
474
+ description?: string;
475
+ format?: string;
476
+ default?: any;
477
+ multipleOf?: number;
478
+ maximum?: number;
479
+ exclusiveMaximum?: boolean;
480
+ minimum?: number;
481
+ exclusiveMinimum?: boolean;
482
+ maxLength?: number;
483
+ minLength?: number;
484
+ pattern?: string;
485
+ additionalProperties?: boolean | ReferenceObject | SchemaObject;
486
+ maxItems?: number;
487
+ minItems?: number;
488
+ uniqueItems?: boolean;
489
+ maxProperties?: number;
490
+ minProperties?: number;
491
+ required?: string[];
492
+ enum?: any[];
493
+ properties?: {
494
+ [name: string]: ReferenceObject | SchemaObject;
495
+ };
496
+ allOf?: (ReferenceObject | SchemaObject)[];
497
+ oneOf?: (ReferenceObject | SchemaObject)[];
498
+ anyOf?: (ReferenceObject | SchemaObject)[];
499
+ not?: ReferenceObject | SchemaObject;
500
+ nullable?: boolean;
501
+ discriminator?: DiscriminatorObject;
502
+ readOnly?: boolean;
503
+ writeOnly?: boolean;
504
+ xml?: XMLObject;
505
+ externalDocs?: ExternalDocumentationObject;
506
+ example?: any;
507
+ deprecated?: boolean;
508
+ }
509
+ interface DiscriminatorObject {
510
+ propertyName: string;
511
+ mapping?: {
512
+ [value: string]: string;
513
+ };
514
+ }
515
+ interface XMLObject {
516
+ name?: string;
517
+ namespace?: string;
518
+ prefix?: string;
519
+ attribute?: boolean;
520
+ wrapped?: boolean;
521
+ }
522
+ interface ReferenceObject {
523
+ $ref: string;
524
+ }
525
+ interface ExampleObject {
526
+ summary?: string;
527
+ description?: string;
528
+ value?: any;
529
+ externalValue?: string;
530
+ }
531
+ interface MediaTypeObject {
532
+ schema?: ReferenceObject | SchemaObject;
533
+ example?: any;
534
+ examples?: {
535
+ [media: string]: ReferenceObject | ExampleObject;
536
+ };
537
+ encoding?: {
538
+ [media: string]: EncodingObject;
539
+ };
540
+ }
541
+ interface EncodingObject {
542
+ contentType?: string;
543
+ headers?: {
544
+ [header: string]: ReferenceObject | HeaderObject;
545
+ };
546
+ style?: string;
547
+ explode?: boolean;
548
+ allowReserved?: boolean;
549
+ }
550
+ interface RequestBodyObject {
551
+ description?: string;
552
+ content: {
553
+ [media: string]: MediaTypeObject;
554
+ };
555
+ required?: boolean;
556
+ }
557
+ interface ResponsesObject {
558
+ [code: string]: ReferenceObject | ResponseObject;
559
+ }
560
+ interface ResponseObject {
561
+ description: string;
562
+ headers?: {
563
+ [header: string]: ReferenceObject | HeaderObject;
564
+ };
565
+ content?: {
566
+ [media: string]: MediaTypeObject;
567
+ };
568
+ links?: {
569
+ [link: string]: ReferenceObject | LinkObject;
570
+ };
571
+ }
572
+ interface LinkObject {
573
+ operationRef?: string;
574
+ operationId?: string;
575
+ parameters?: {
576
+ [parameter: string]: any;
577
+ };
578
+ requestBody?: any;
579
+ description?: string;
580
+ server?: ServerObject;
581
+ }
582
+ interface CallbackObject {
583
+ [url: string]: PathItemObject;
584
+ }
585
+ interface SecurityRequirementObject {
586
+ [name: string]: string[];
587
+ }
588
+ interface ComponentsObject {
589
+ schemas?: {
590
+ [key: string]: ReferenceObject | SchemaObject;
591
+ };
592
+ responses?: {
593
+ [key: string]: ReferenceObject | ResponseObject;
594
+ };
595
+ parameters?: {
596
+ [key: string]: ReferenceObject | ParameterObject;
597
+ };
598
+ examples?: {
599
+ [key: string]: ReferenceObject | ExampleObject;
600
+ };
601
+ requestBodies?: {
602
+ [key: string]: ReferenceObject | RequestBodyObject;
603
+ };
604
+ headers?: {
605
+ [key: string]: ReferenceObject | HeaderObject;
606
+ };
607
+ securitySchemes?: {
608
+ [key: string]: ReferenceObject | SecuritySchemeObject;
609
+ };
610
+ links?: {
611
+ [key: string]: ReferenceObject | LinkObject;
612
+ };
613
+ callbacks?: {
614
+ [key: string]: ReferenceObject | CallbackObject;
615
+ };
616
+ }
617
+ type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme;
618
+ interface HttpSecurityScheme {
619
+ type: 'http';
620
+ description?: string;
621
+ scheme: string;
622
+ bearerFormat?: string;
623
+ }
624
+ interface ApiKeySecurityScheme {
625
+ type: 'apiKey';
626
+ description?: string;
627
+ name: string;
628
+ in: string;
629
+ }
630
+ interface OAuth2SecurityScheme {
631
+ type: 'oauth2';
632
+ description?: string;
633
+ flows: {
634
+ implicit?: {
635
+ authorizationUrl: string;
636
+ refreshUrl?: string;
637
+ scopes: {
638
+ [scope: string]: string;
639
+ };
640
+ };
641
+ password?: {
642
+ tokenUrl: string;
643
+ refreshUrl?: string;
644
+ scopes: {
645
+ [scope: string]: string;
646
+ };
647
+ };
648
+ clientCredentials?: {
649
+ tokenUrl: string;
650
+ refreshUrl?: string;
651
+ scopes: {
652
+ [scope: string]: string;
653
+ };
654
+ };
655
+ authorizationCode?: {
656
+ authorizationUrl: string;
657
+ tokenUrl: string;
658
+ refreshUrl?: string;
659
+ scopes: {
660
+ [scope: string]: string;
661
+ };
662
+ };
663
+ };
664
+ }
665
+ interface OpenIdSecurityScheme {
666
+ type: 'openIdConnect';
667
+ description?: string;
668
+ openIdConnectUrl: string;
669
+ }
670
+ interface TagObject {
671
+ name: string;
672
+ description?: string;
673
+ externalDocs?: ExternalDocumentationObject;
674
+ }
675
+ }
676
+ type Schema$1<TInput, TOutput> = StandardSchemaV1<TInput, TOutput>;
677
+ type AnySchema = Schema$1<any, any>;
678
+ type InferSchemaInput<T extends AnySchema> = T extends StandardSchemaV1<infer UInput, any> ? UInput : never;
679
+ type InferSchemaOutput<T extends AnySchema> = T extends StandardSchemaV1<any, infer UOutput> ? UOutput : never;
680
+ interface ErrorMapItem<TDataSchema extends AnySchema> {
681
+ status?: number;
682
+ message?: string;
683
+ data?: TDataSchema;
684
+ }
685
+ type ErrorMap = { [key in ORPCErrorCode]?: ErrorMapItem<AnySchema>; };
686
+ type MergedErrorMap<T1 extends ErrorMap, T2 extends ErrorMap> = Omit<T1, keyof T2> & T2;
687
+ type ORPCErrorFromErrorMap<TErrorMap extends ErrorMap> = { [K in keyof TErrorMap]: K extends string ? TErrorMap[K] extends ErrorMapItem<infer TDataSchema extends Schema$1<unknown, unknown>> ? ORPCError<K, InferSchemaOutput<TDataSchema>> : never : never; }[keyof TErrorMap];
688
+ type ErrorFromErrorMap<TErrorMap extends ErrorMap> = ORPCErrorFromErrorMap<TErrorMap> | ThrowableError;
689
+ type Meta = Record<string, any>;
690
+ type InputStructure = 'compact' | 'detailed';
691
+ type OutputStructure = 'compact' | 'detailed';
692
+ interface Route {
693
+ /**
694
+ * The HTTP method of the procedure.
695
+ * This option is typically relevant when integrating with OpenAPI.
696
+ *
697
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
698
+ */
699
+ method?: HTTPMethod;
700
+ /**
701
+ * The HTTP path of the procedure.
702
+ * This option is typically relevant when integrating with OpenAPI.
703
+ *
704
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
705
+ */
706
+ path?: HTTPPath;
707
+ /**
708
+ * The operation ID of the endpoint.
709
+ * This option is typically relevant when integrating with OpenAPI.
710
+ *
711
+ * @default Concatenation of router segments
712
+ */
713
+ operationId?: string;
714
+ /**
715
+ * The summary of the procedure.
716
+ * This option is typically relevant when integrating with OpenAPI.
717
+ *
718
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
719
+ */
720
+ summary?: string;
721
+ /**
722
+ * The description of the procedure.
723
+ * This option is typically relevant when integrating with OpenAPI.
724
+ *
725
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
726
+ */
727
+ description?: string;
728
+ /**
729
+ * Marks the procedure as deprecated.
730
+ * This option is typically relevant when integrating with OpenAPI.
731
+ *
732
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
733
+ */
734
+ deprecated?: boolean;
735
+ /**
736
+ * The tags of the procedure.
737
+ * This option is typically relevant when integrating with OpenAPI.
738
+ *
739
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
740
+ */
741
+ tags?: readonly string[];
742
+ /**
743
+ * The status code of the response when the procedure is successful.
744
+ * The status code must be in the 200-399 range.
745
+ * This option is typically relevant when integrating with OpenAPI.
746
+ *
747
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
748
+ * @default 200
749
+ */
750
+ successStatus?: number;
751
+ /**
752
+ * The description of the response when the procedure is successful.
753
+ * This option is typically relevant when integrating with OpenAPI.
754
+ *
755
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
756
+ * @default 'OK'
757
+ */
758
+ successDescription?: string;
759
+ /**
760
+ * Determines how the input should be structured based on `params`, `query`, `headers`, and `body`.
761
+ *
762
+ * @option 'compact'
763
+ * Combines `params` and either `query` or `body` (depending on the HTTP method) into a single object.
764
+ *
765
+ * @option 'detailed'
766
+ * Keeps each part of the request (`params`, `query`, `headers`, and `body`) as separate fields in the input object.
767
+ *
768
+ * Example:
769
+ * ```ts
770
+ * const input = {
771
+ * params: { id: 1 },
772
+ * query: { search: 'hello' },
773
+ * headers: { 'Content-Type': 'application/json' },
774
+ * body: { name: 'John' },
775
+ * }
776
+ * ```
777
+ *
778
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
779
+ * @default 'compact'
780
+ */
781
+ inputStructure?: InputStructure;
782
+ /**
783
+ * Determines how the response should be structured based on the output.
784
+ *
785
+ * @option 'compact'
786
+ * The output data is directly returned as the response body.
787
+ *
788
+ * @option 'detailed'
789
+ * Return an object with optional properties:
790
+ * - `status`: The response status (must be in 200-399 range) if not set fallback to `successStatus`.
791
+ * - `headers`: Custom headers to merge with the response headers (`Record<string, string | string[] | undefined>`)
792
+ * - `body`: The response body.
793
+ *
794
+ * Example:
795
+ * ```ts
796
+ * const output = {
797
+ * status: 201,
798
+ * headers: { 'x-custom-header': 'value' },
799
+ * body: { message: 'Hello, world!' },
800
+ * };
801
+ * ```
802
+ *
803
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
804
+ * @default 'compact'
805
+ */
806
+ outputStructure?: OutputStructure;
807
+ /**
808
+ * Override entire auto-generated OpenAPI Operation Object Specification.
809
+ *
810
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata Operation Metadata Docs}
811
+ */
812
+ spec?: OpenAPIV3_1.OperationObject | ((current: OpenAPIV3_1.OperationObject) => OpenAPIV3_1.OperationObject);
813
+ }
814
+ interface ContractProcedureDef<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> {
815
+ meta: TMeta;
816
+ route: Route;
817
+ inputSchema?: TInputSchema;
818
+ outputSchema?: TOutputSchema;
819
+ errorMap: TErrorMap;
820
+ }
821
+ /**
822
+ * This class represents a contract procedure.
823
+ *
824
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#procedure-contract Contract Procedure Docs}
825
+ */
826
+ declare class ContractProcedure<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> {
827
+ /**
828
+ * This property holds the defined options for the contract procedure.
829
+ */
830
+ '~orpc': ContractProcedureDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
831
+ constructor(def: ContractProcedureDef<TInputSchema, TOutputSchema, TErrorMap, TMeta>);
832
+ }
833
+ /**
834
+ * Represents a contract router, which defines a hierarchical structure of contract procedures.
835
+ *
836
+ * @info A contract procedure is a contract router too.
837
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#contract-router Contract Router Docs}
838
+ */
839
+ type ContractRouter<TMeta extends Meta> = ContractProcedure<any, any, any, TMeta> | {
840
+ [k: string]: ContractRouter<TMeta>;
841
+ };
842
+ type AnyContractRouter = ContractRouter<any>;
843
+ /**
844
+ * Infer all inputs of the contract router.
845
+ *
846
+ * @info A contract procedure is a contract router too.
847
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#utilities Contract Utilities Docs}
848
+ */
849
+ type InferContractRouterInputs<T extends AnyContractRouter> = T extends ContractProcedure<infer UInputSchema, any, any, any> ? InferSchemaInput<UInputSchema> : { [K in keyof T]: T[K] extends AnyContractRouter ? InferContractRouterInputs<T[K]> : never; };
850
+ /**
851
+ * Infer all outputs of the contract router.
852
+ *
853
+ * @info A contract procedure is a contract router too.
854
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#utilities Contract Utilities Docs}
855
+ */
856
+ type InferContractRouterOutputs<T extends AnyContractRouter> = T extends ContractProcedure<any, infer UOutputSchema, any, any> ? InferSchemaOutput<UOutputSchema> : { [K in keyof T]: T[K] extends AnyContractRouter ? InferContractRouterOutputs<T[K]> : never; };
857
+ interface ContractProcedureBuilderWithOutput<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> extends ContractProcedure<TInputSchema, TOutputSchema, TErrorMap, TMeta> {
858
+ /**
859
+ * Adds type-safe custom errors to the contract.
860
+ * The provided errors are spared-merged with any existing errors in the contract.
861
+ *
862
+ * @see {@link https://orpc.dev/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
863
+ */
864
+ errors<U extends ErrorMap>(errors: U): ContractProcedureBuilderWithOutput<TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta>;
865
+ /**
866
+ * Sets or updates the metadata for the contract.
867
+ * The provided metadata is spared-merged with any existing metadata in the contract.
868
+ *
869
+ * @see {@link https://orpc.dev/docs/metadata Metadata Docs}
870
+ */
871
+ meta(meta: TMeta): ContractProcedureBuilderWithOutput<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
872
+ /**
873
+ * Sets or updates the route definition for the contract.
874
+ * The provided route is spared-merged with any existing route in the contract.
875
+ * This option is typically relevant when integrating with OpenAPI.
876
+ *
877
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
878
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
879
+ */
880
+ route(route: Route): ContractProcedureBuilderWithOutput<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
881
+ /**
882
+ * Defines the input validation schema for the contract.
883
+ *
884
+ * @see {@link https://orpc.dev/docs/procedure#input-output-validation Input Validation Docs}
885
+ */
886
+ input<U extends AnySchema>(schema: U): ContractProcedureBuilderWithInputOutput<U, TOutputSchema, TErrorMap, TMeta>;
887
+ }
888
+ interface ContractProcedureBuilderWithInputOutput<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> extends ContractProcedure<TInputSchema, TOutputSchema, TErrorMap, TMeta> {
889
+ /**
890
+ * Adds type-safe custom errors to the contract.
891
+ * The provided errors are spared-merged with any existing errors in the contract.
892
+ *
893
+ * @see {@link https://orpc.dev/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
894
+ */
895
+ errors<U extends ErrorMap>(errors: U): ContractProcedureBuilderWithInputOutput<TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta>;
896
+ /**
897
+ * Sets or updates the metadata for the contract.
898
+ * The provided metadata is spared-merged with any existing metadata in the contract.
899
+ *
900
+ * @see {@link https://orpc.dev/docs/metadata Metadata Docs}
901
+ */
902
+ meta(meta: TMeta): ContractProcedureBuilderWithInputOutput<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
903
+ /**
904
+ * Sets or updates the route definition for the contract.
905
+ * The provided route is spared-merged with any existing route in the contract.
906
+ * This option is typically relevant when integrating with OpenAPI.
907
+ *
908
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
909
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
910
+ */
911
+ route(route: Route): ContractProcedureBuilderWithInputOutput<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
912
+ }
913
+ type ContractProcedureClient<TClientContext extends ClientContext, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap> = Client<TClientContext, InferSchemaInput<TInputSchema>, InferSchemaOutput<TOutputSchema>, ErrorFromErrorMap<TErrorMap>>;
914
+ type ContractRouterClient<TRouter extends AnyContractRouter, TClientContext extends ClientContext = Record<never, never>> = TRouter extends ContractProcedure<infer UInputSchema, infer UOutputSchema, infer UErrorMap, any> ? ContractProcedureClient<TClientContext, UInputSchema, UOutputSchema, UErrorMap> : { [K in keyof TRouter]: TRouter[K] extends AnyContractRouter ? ContractRouterClient<TRouter[K], TClientContext> : never; };
915
+ declare const fetch: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
916
+ ids: z.ZodArray<z.ZodString>;
917
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
918
+ abstract: "abstract";
919
+ authors: "authors";
920
+ date: "date";
921
+ doi: "doi";
922
+ pdfURL: "pdfURL";
923
+ provider: "provider";
924
+ providerData: "providerData";
925
+ providerURL: "providerURL";
926
+ title: "title";
927
+ totalCitations: "totalCitations";
928
+ totalReferences: "totalReferences";
929
+ url: "url";
930
+ year: "year";
931
+ }>>>>;
932
+ callback: z.ZodOptional<z.ZodObject<{
933
+ url: z.ZodURL;
934
+ type: z.ZodOptional<z.ZodString>;
935
+ }, z.core.$strip>>;
936
+ }, z.core.$strip>, z.ZodObject<{
937
+ results: z.ZodArray<z.ZodObject<{
938
+ id: z.ZodString;
939
+ detectedProvider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
940
+ arxiv: "arxiv";
941
+ crossref: "crossref";
942
+ eric: "eric";
943
+ "europe-pmc": "europe-pmc";
944
+ "google-scholar": "google-scholar";
945
+ openalex: "openalex";
946
+ pubmed: "pubmed";
947
+ "semantic-scholar": "semantic-scholar";
948
+ }>>>;
949
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
950
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
951
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
952
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
953
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
954
+ name: z.ZodString;
955
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
956
+ }, z.core.$strip>>>>;
957
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
958
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
959
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
960
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
961
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
963
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
964
+ arxiv: "arxiv";
965
+ crossref: "crossref";
966
+ eric: "eric";
967
+ "europe-pmc": "europe-pmc";
968
+ "google-scholar": "google-scholar";
969
+ openalex: "openalex";
970
+ pubmed: "pubmed";
971
+ "semantic-scholar": "semantic-scholar";
972
+ }>>>;
973
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
974
+ }, z.core.$strip>>;
975
+ errors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
976
+ id: z.ZodString;
977
+ error: z.ZodString;
978
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
979
+ }, z.core.$strip>>>>;
980
+ requestId: z.ZodNumber;
981
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
982
+ declare const findCitations: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
983
+ paragraph: z.ZodString;
984
+ providers: z.ZodDefault<z.ZodArray<z.ZodEnum<{
985
+ arxiv: "arxiv";
986
+ crossref: "crossref";
987
+ eric: "eric";
988
+ "europe-pmc": "europe-pmc";
989
+ "google-scholar": "google-scholar";
990
+ openalex: "openalex";
991
+ pubmed: "pubmed";
992
+ "semantic-scholar": "semantic-scholar";
993
+ }>>>;
994
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
995
+ abstract: "abstract";
996
+ authors: "authors";
997
+ date: "date";
998
+ doi: "doi";
999
+ pdfURL: "pdfURL";
1000
+ provider: "provider";
1001
+ providerData: "providerData";
1002
+ providerURL: "providerURL";
1003
+ title: "title";
1004
+ totalCitations: "totalCitations";
1005
+ totalReferences: "totalReferences";
1006
+ url: "url";
1007
+ year: "year";
1008
+ }>>>>;
1009
+ callback: z.ZodOptional<z.ZodObject<{
1010
+ url: z.ZodURL;
1011
+ type: z.ZodOptional<z.ZodString>;
1012
+ }, z.core.$strip>>;
1013
+ }, z.core.$strip>, z.ZodObject<{
1014
+ results: z.ZodArray<z.ZodObject<{
1015
+ sentence: z.ZodString;
1016
+ citations: z.ZodArray<z.ZodObject<{
1017
+ score: z.ZodNumber;
1018
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1019
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1020
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1021
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1022
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1023
+ name: z.ZodString;
1024
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1025
+ }, z.core.$strip>>>>;
1026
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1027
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1028
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1029
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1030
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1031
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1032
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1033
+ arxiv: "arxiv";
1034
+ crossref: "crossref";
1035
+ eric: "eric";
1036
+ "europe-pmc": "europe-pmc";
1037
+ "google-scholar": "google-scholar";
1038
+ openalex: "openalex";
1039
+ pubmed: "pubmed";
1040
+ "semantic-scholar": "semantic-scholar";
1041
+ }>>>;
1042
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1043
+ }, z.core.$strip>>;
1044
+ }, z.core.$strip>>;
1045
+ sentenceCount: z.ZodNumber;
1046
+ totalCitations: z.ZodNumber;
1047
+ errors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1048
+ requestId: z.ZodNumber;
1049
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1050
+ declare const paperGraph: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1051
+ id: z.ZodString;
1052
+ citationsLimit: z.ZodDefault<z.ZodNumber>;
1053
+ referencesLimit: z.ZodDefault<z.ZodNumber>;
1054
+ citationsOffset: z.ZodDefault<z.ZodNumber>;
1055
+ referencesOffset: z.ZodDefault<z.ZodNumber>;
1056
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
1057
+ abstract: "abstract";
1058
+ authors: "authors";
1059
+ date: "date";
1060
+ doi: "doi";
1061
+ pdfURL: "pdfURL";
1062
+ provider: "provider";
1063
+ providerData: "providerData";
1064
+ providerURL: "providerURL";
1065
+ title: "title";
1066
+ totalCitations: "totalCitations";
1067
+ totalReferences: "totalReferences";
1068
+ url: "url";
1069
+ year: "year";
1070
+ }>>>>;
1071
+ callback: z.ZodOptional<z.ZodObject<{
1072
+ url: z.ZodURL;
1073
+ type: z.ZodOptional<z.ZodString>;
1074
+ }, z.core.$strip>>;
1075
+ }, z.core.$strip>, z.ZodObject<{
1076
+ paper: z.ZodObject<{
1077
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1078
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1079
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1080
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1081
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1082
+ name: z.ZodString;
1083
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1084
+ }, z.core.$strip>>>>;
1085
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1086
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1087
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1088
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1089
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1090
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1091
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1092
+ arxiv: "arxiv";
1093
+ crossref: "crossref";
1094
+ eric: "eric";
1095
+ "europe-pmc": "europe-pmc";
1096
+ "google-scholar": "google-scholar";
1097
+ openalex: "openalex";
1098
+ pubmed: "pubmed";
1099
+ "semantic-scholar": "semantic-scholar";
1100
+ }>>>;
1101
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1102
+ }, z.core.$strip>;
1103
+ citations: z.ZodArray<z.ZodObject<{
1104
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1105
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1106
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1107
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1108
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1109
+ name: z.ZodString;
1110
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1111
+ }, z.core.$strip>>>>;
1112
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1113
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1114
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1115
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1116
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1117
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1118
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1119
+ arxiv: "arxiv";
1120
+ crossref: "crossref";
1121
+ eric: "eric";
1122
+ "europe-pmc": "europe-pmc";
1123
+ "google-scholar": "google-scholar";
1124
+ openalex: "openalex";
1125
+ pubmed: "pubmed";
1126
+ "semantic-scholar": "semantic-scholar";
1127
+ }>>>;
1128
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1129
+ }, z.core.$strip>>;
1130
+ references: z.ZodArray<z.ZodObject<{
1131
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1132
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1133
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1134
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1135
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1136
+ name: z.ZodString;
1137
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1138
+ }, z.core.$strip>>>>;
1139
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1140
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1141
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1142
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1143
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1144
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1145
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1146
+ arxiv: "arxiv";
1147
+ crossref: "crossref";
1148
+ eric: "eric";
1149
+ "europe-pmc": "europe-pmc";
1150
+ "google-scholar": "google-scholar";
1151
+ openalex: "openalex";
1152
+ pubmed: "pubmed";
1153
+ "semantic-scholar": "semantic-scholar";
1154
+ }>>>;
1155
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1156
+ }, z.core.$strip>>;
1157
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1158
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1159
+ requestId: z.ZodNumber;
1160
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1161
+ declare const parse$4: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1162
+ id: z.ZodOptional<z.ZodString>;
1163
+ url: z.ZodOptional<z.ZodURL>;
1164
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1165
+ auto: "auto";
1166
+ max: "max";
1167
+ mini: "mini";
1168
+ nano: "nano";
1169
+ pro: "pro";
1170
+ }>>>;
1171
+ includePages: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1172
+ callback: z.ZodOptional<z.ZodObject<{
1173
+ url: z.ZodURL;
1174
+ type: z.ZodOptional<z.ZodString>;
1175
+ }, z.core.$strip>>;
1176
+ }, z.core.$strip>, z.ZodObject<{
1177
+ id: z.ZodString;
1178
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1179
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1180
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1181
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1182
+ pdfURL: z.ZodString;
1183
+ detectedProvider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1184
+ arxiv: "arxiv";
1185
+ crossref: "crossref";
1186
+ eric: "eric";
1187
+ "europe-pmc": "europe-pmc";
1188
+ "google-scholar": "google-scholar";
1189
+ openalex: "openalex";
1190
+ pubmed: "pubmed";
1191
+ "semantic-scholar": "semantic-scholar";
1192
+ }>>>;
1193
+ markdown: z.ZodString;
1194
+ pageCount: z.ZodNumber;
1195
+ model: z.ZodEnum<{
1196
+ max: "max";
1197
+ mini: "mini";
1198
+ nano: "nano";
1199
+ pro: "pro";
1200
+ }>;
1201
+ credits: z.ZodNumber;
1202
+ requestId: z.ZodNumber;
1203
+ html: z.ZodOptional<z.ZodString>;
1204
+ pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1205
+ pageNumber: z.ZodNumber;
1206
+ markdown: z.ZodString;
1207
+ }, z.core.$strip>>>;
1208
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1209
+ declare const search: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1210
+ query: z.ZodString;
1211
+ providers: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1212
+ arxiv: "arxiv";
1213
+ crossref: "crossref";
1214
+ eric: "eric";
1215
+ "europe-pmc": "europe-pmc";
1216
+ "google-scholar": "google-scholar";
1217
+ openalex: "openalex";
1218
+ pubmed: "pubmed";
1219
+ "semantic-scholar": "semantic-scholar";
1220
+ }>>>;
1221
+ offset: z.ZodDefault<z.ZodNumber>;
1222
+ limit: z.ZodDefault<z.ZodNumber>;
1223
+ yearFrom: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1224
+ yearTo: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1225
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
1226
+ abstract: "abstract";
1227
+ authors: "authors";
1228
+ date: "date";
1229
+ doi: "doi";
1230
+ pdfURL: "pdfURL";
1231
+ provider: "provider";
1232
+ providerData: "providerData";
1233
+ providerURL: "providerURL";
1234
+ title: "title";
1235
+ totalCitations: "totalCitations";
1236
+ totalReferences: "totalReferences";
1237
+ url: "url";
1238
+ year: "year";
1239
+ }>>>>;
1240
+ callback: z.ZodOptional<z.ZodObject<{
1241
+ url: z.ZodURL;
1242
+ type: z.ZodOptional<z.ZodString>;
1243
+ }, z.core.$strip>>;
1244
+ }, z.core.$strip>, z.ZodObject<{
1245
+ estimatedTotalResults: z.ZodNumber;
1246
+ results: z.ZodArray<z.ZodObject<{
1247
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1248
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1249
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1250
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1251
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1252
+ name: z.ZodString;
1253
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1254
+ }, z.core.$strip>>>>;
1255
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1256
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1257
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1258
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1259
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1260
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1261
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1262
+ arxiv: "arxiv";
1263
+ crossref: "crossref";
1264
+ eric: "eric";
1265
+ "europe-pmc": "europe-pmc";
1266
+ "google-scholar": "google-scholar";
1267
+ openalex: "openalex";
1268
+ pubmed: "pubmed";
1269
+ "semantic-scholar": "semantic-scholar";
1270
+ }>>>;
1271
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1272
+ }, z.core.$strip>>;
1273
+ errors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1274
+ provider: z.ZodEnum<{
1275
+ arxiv: "arxiv";
1276
+ crossref: "crossref";
1277
+ eric: "eric";
1278
+ "europe-pmc": "europe-pmc";
1279
+ "google-scholar": "google-scholar";
1280
+ openalex: "openalex";
1281
+ pubmed: "pubmed";
1282
+ "semantic-scholar": "semantic-scholar";
1283
+ }>;
1284
+ message: z.ZodString;
1285
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1286
+ details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1287
+ }, z.core.$strip>>>>;
1288
+ requestId: z.ZodNumber;
1289
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1290
+ declare const searchGrants: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1291
+ query: z.ZodString;
1292
+ providers: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1293
+ cordis: "cordis";
1294
+ "grants-gov": "grants-gov";
1295
+ "nih-reporter": "nih-reporter";
1296
+ ukri: "ukri";
1297
+ }>>>;
1298
+ offset: z.ZodDefault<z.ZodNumber>;
1299
+ limit: z.ZodDefault<z.ZodNumber>;
1300
+ deadlineFrom: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1301
+ deadlineTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1302
+ fundingMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1303
+ fundingMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1304
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
1305
+ agency: "agency";
1306
+ closeDate: "closeDate";
1307
+ currency: "currency";
1308
+ deadlineDate: "deadlineDate";
1309
+ description: "description";
1310
+ eligibility: "eligibility";
1311
+ fundingAmountMax: "fundingAmountMax";
1312
+ fundingAmountMin: "fundingAmountMin";
1313
+ grantType: "grantType";
1314
+ keywords: "keywords";
1315
+ openDate: "openDate";
1316
+ organizationName: "organizationName";
1317
+ piName: "piName";
1318
+ program: "program";
1319
+ provider: "provider";
1320
+ providerData: "providerData";
1321
+ region: "region";
1322
+ sourceId: "sourceId";
1323
+ title: "title";
1324
+ url: "url";
1325
+ }>>>>;
1326
+ callback: z.ZodOptional<z.ZodObject<{
1327
+ url: z.ZodURL;
1328
+ type: z.ZodOptional<z.ZodString>;
1329
+ }, z.core.$strip>>;
1330
+ }, z.core.$strip>, z.ZodObject<{
1331
+ estimatedTotalResults: z.ZodNumber;
1332
+ results: z.ZodArray<z.ZodObject<{
1333
+ sourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1334
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1335
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1336
+ agency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1337
+ program: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1338
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1339
+ eligibility: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1340
+ fundingAmountMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1341
+ fundingAmountMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1342
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1343
+ deadlineDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1344
+ openDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1345
+ closeDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1346
+ grantType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1347
+ region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1348
+ keywords: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1349
+ piName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1350
+ organizationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1351
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1352
+ cordis: "cordis";
1353
+ "grants-gov": "grants-gov";
1354
+ "nih-reporter": "nih-reporter";
1355
+ ukri: "ukri";
1356
+ }>>>;
1357
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1358
+ }, z.core.$strip>>;
1359
+ errors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1360
+ provider: z.ZodEnum<{
1361
+ cordis: "cordis";
1362
+ "grants-gov": "grants-gov";
1363
+ "nih-reporter": "nih-reporter";
1364
+ ukri: "ukri";
1365
+ }>;
1366
+ message: z.ZodString;
1367
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1368
+ details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1369
+ }, z.core.$strip>>>>;
1370
+ requestId: z.ZodNumber;
1371
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1372
+ declare const similarPapers: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1373
+ id: z.ZodString;
1374
+ limit: z.ZodDefault<z.ZodNumber>;
1375
+ includeEdges: z.ZodDefault<z.ZodBoolean>;
1376
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
1377
+ abstract: "abstract";
1378
+ authors: "authors";
1379
+ date: "date";
1380
+ doi: "doi";
1381
+ pdfURL: "pdfURL";
1382
+ provider: "provider";
1383
+ providerData: "providerData";
1384
+ providerURL: "providerURL";
1385
+ title: "title";
1386
+ totalCitations: "totalCitations";
1387
+ totalReferences: "totalReferences";
1388
+ url: "url";
1389
+ year: "year";
1390
+ }>>>>;
1391
+ callback: z.ZodOptional<z.ZodObject<{
1392
+ url: z.ZodURL;
1393
+ type: z.ZodOptional<z.ZodString>;
1394
+ }, z.core.$strip>>;
1395
+ }, z.core.$strip>, z.ZodObject<{
1396
+ seed: z.ZodObject<{
1397
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1398
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1399
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1400
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1401
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1402
+ name: z.ZodString;
1403
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1404
+ }, z.core.$strip>>>>;
1405
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1406
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1407
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1408
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1409
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1410
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1411
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1412
+ arxiv: "arxiv";
1413
+ crossref: "crossref";
1414
+ eric: "eric";
1415
+ "europe-pmc": "europe-pmc";
1416
+ "google-scholar": "google-scholar";
1417
+ openalex: "openalex";
1418
+ pubmed: "pubmed";
1419
+ "semantic-scholar": "semantic-scholar";
1420
+ }>>>;
1421
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1422
+ }, z.core.$strip>;
1423
+ results: z.ZodArray<z.ZodObject<{
1424
+ publication: z.ZodObject<{
1425
+ doi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1426
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1427
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1428
+ providerURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1429
+ authors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1430
+ name: z.ZodString;
1431
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1432
+ }, z.core.$strip>>>>;
1433
+ date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1434
+ year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1435
+ totalCitations: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1436
+ totalReferences: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1437
+ abstract: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1438
+ pdfURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1439
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1440
+ arxiv: "arxiv";
1441
+ crossref: "crossref";
1442
+ eric: "eric";
1443
+ "europe-pmc": "europe-pmc";
1444
+ "google-scholar": "google-scholar";
1445
+ openalex: "openalex";
1446
+ pubmed: "pubmed";
1447
+ "semantic-scholar": "semantic-scholar";
1448
+ }>>>;
1449
+ providerData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1450
+ }, z.core.$strip>;
1451
+ similarity: z.ZodNumber;
1452
+ pageRank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1453
+ distance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1454
+ citingIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1455
+ citedByIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1456
+ }, z.core.$strip>>;
1457
+ requestId: z.ZodNumber;
1458
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1459
+ declare namespace index_d_exports$8 {
1460
+ export { fetch, findCitations, paperGraph, parse$4 as parse, search, searchGrants, similarPapers };
1461
+ }
1462
+ declare const getEnvironment: ContractProcedureBuilderWithOutput<Schema$1<unknown, unknown>, z.ZodObject<{
1463
+ environment: z.ZodRecord<z.ZodString, z.ZodString>;
1464
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1465
+ declare const getFreeUsageRecords: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1466
+ cursor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1467
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1468
+ }, z.core.$strip>, z.ZodObject<{
1469
+ records: z.ZodArray<z.ZodObject<{
1470
+ id: z.ZodNumber;
1471
+ operation: z.ZodString;
1472
+ ip: z.ZodString;
1473
+ source: z.ZodDefault<z.ZodEnum<{
1474
+ api: "api";
1475
+ internal: "internal";
1476
+ make: "make";
1477
+ mcp: "mcp";
1478
+ n8n: "n8n";
1479
+ playground: "playground";
1480
+ sdk: "sdk";
1481
+ unknown: "unknown";
1482
+ zapier: "zapier";
1483
+ }>>;
1484
+ model: z.ZodNullable<z.ZodString>;
1485
+ inputSource: z.ZodNullable<z.ZodString>;
1486
+ inputRef: z.ZodNullable<z.ZodString>;
1487
+ fileSize: z.ZodNullable<z.ZodNumber>;
1488
+ documentType: z.ZodNullable<z.ZodString>;
1489
+ pageCount: z.ZodNullable<z.ZodNumber>;
1490
+ error: z.ZodNullable<z.ZodString>;
1491
+ status: z.ZodEnum<{
1492
+ success: "success";
1493
+ system_error: "system_error";
1494
+ user_error: "user_error";
1495
+ }>;
1496
+ errorStage: z.ZodNullable<z.ZodEnum<{
1497
+ auth: "auth";
1498
+ preprocessing: "preprocessing";
1499
+ processing: "processing";
1500
+ validation: "validation";
1501
+ }>>;
1502
+ errorCode: z.ZodNullable<z.ZodString>;
1503
+ duration: z.ZodNumber;
1504
+ createdAt: z.ZodNumber;
1505
+ }, z.core.$strip>>;
1506
+ hasMore: z.ZodBoolean;
1507
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1508
+ declare const getProviderUsageRecords: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1509
+ cursor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1510
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1511
+ }, z.core.$strip>, z.ZodObject<{
1512
+ records: z.ZodArray<z.ZodObject<{
1513
+ id: z.ZodNumber;
1514
+ apiUsageId: z.ZodNullable<z.ZodNumber>;
1515
+ operation: z.ZodString;
1516
+ phase: z.ZodString;
1517
+ provider: z.ZodString;
1518
+ service: z.ZodString;
1519
+ providerModel: z.ZodNullable<z.ZodString>;
1520
+ providerRegion: z.ZodNullable<z.ZodString>;
1521
+ providerResource: z.ZodNullable<z.ZodString>;
1522
+ documentType: z.ZodNullable<z.ZodString>;
1523
+ fileSize: z.ZodNullable<z.ZodNumber>;
1524
+ pageCount: z.ZodNullable<z.ZodNumber>;
1525
+ inputTokens: z.ZodNullable<z.ZodNumber>;
1526
+ uncachedInputTokens: z.ZodNullable<z.ZodNumber>;
1527
+ cachedInputTokens: z.ZodNullable<z.ZodNumber>;
1528
+ cacheWriteTokens: z.ZodNullable<z.ZodNumber>;
1529
+ outputTokens: z.ZodNullable<z.ZodNumber>;
1530
+ reasoningTokens: z.ZodNullable<z.ZodNumber>;
1531
+ totalTokens: z.ZodNullable<z.ZodNumber>;
1532
+ featuresJson: z.ZodNullable<z.ZodString>;
1533
+ status: z.ZodEnum<{
1534
+ success: "success";
1535
+ system_error: "system_error";
1536
+ user_error: "user_error";
1537
+ }>;
1538
+ error: z.ZodNullable<z.ZodString>;
1539
+ duration: z.ZodNumber;
1540
+ estimatedCostUsdMicro: z.ZodNullable<z.ZodNumber>;
1541
+ pricingVersion: z.ZodNullable<z.ZodString>;
1542
+ rawUsageJson: z.ZodNullable<z.ZodString>;
1543
+ createdAt: z.ZodNumber;
1544
+ }, z.core.$strip>>;
1545
+ hasMore: z.ZodBoolean;
1546
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1547
+ declare const getUsageRecords: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1548
+ cursor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1549
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1550
+ }, z.core.$strip>, z.ZodObject<{
1551
+ records: z.ZodArray<z.ZodObject<{
1552
+ id: z.ZodNumber;
1553
+ credits: z.ZodNumber;
1554
+ model: z.ZodNullable<z.ZodString>;
1555
+ inputSource: z.ZodString;
1556
+ inputRef: z.ZodNullable<z.ZodString>;
1557
+ fileSize: z.ZodNumber;
1558
+ documentType: z.ZodString;
1559
+ documentId: z.ZodNullable<z.ZodString>;
1560
+ error: z.ZodNullable<z.ZodString>;
1561
+ status: z.ZodEnum<{
1562
+ success: "success";
1563
+ system_error: "system_error";
1564
+ user_error: "user_error";
1565
+ }>;
1566
+ errorStage: z.ZodNullable<z.ZodEnum<{
1567
+ auth: "auth";
1568
+ preprocessing: "preprocessing";
1569
+ processing: "processing";
1570
+ validation: "validation";
1571
+ }>>;
1572
+ errorCode: z.ZodNullable<z.ZodString>;
1573
+ duration: z.ZodNumber;
1574
+ operation: z.ZodString;
1575
+ pageCount: z.ZodNullable<z.ZodNumber>;
1576
+ requestedModel: z.ZodString;
1577
+ actualModel: z.ZodNullable<z.ZodString>;
1578
+ apiKey: z.ZodNullable<z.ZodString>;
1579
+ workspaceId: z.ZodNullable<z.ZodNumber>;
1580
+ source: z.ZodDefault<z.ZodEnum<{
1581
+ api: "api";
1582
+ internal: "internal";
1583
+ make: "make";
1584
+ mcp: "mcp";
1585
+ n8n: "n8n";
1586
+ playground: "playground";
1587
+ sdk: "sdk";
1588
+ unknown: "unknown";
1589
+ zapier: "zapier";
1590
+ }>>;
1591
+ createdAt: z.ZodNumber;
1592
+ }, z.core.$strip>>;
1593
+ hasMore: z.ZodBoolean;
1594
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1595
+ declare const healthCheck: ContractProcedureBuilderWithOutput<Schema$1<unknown, unknown>, z.ZodObject<{
1596
+ message: z.ZodString;
1597
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1598
+ declare const setDomain: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1599
+ domain: z.ZodString;
1600
+ }, z.core.$strip>, z.ZodObject<{
1601
+ message: z.ZodString;
1602
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1603
+ declare const setEnvironment: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1604
+ environment: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
1605
+ }, z.core.$strip>, z.ZodObject<{
1606
+ message: z.ZodString;
1607
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1608
+ declare const setVersion: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1609
+ version: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"LATEST">]>;
1610
+ }, z.core.$strip>, z.ZodObject<{
1611
+ message: z.ZodString;
1612
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1613
+ declare namespace index_d_exports$7 {
1614
+ export { getEnvironment, getFreeUsageRecords, getProviderUsageRecords, getUsageRecords, healthCheck, setDomain, setEnvironment, setVersion };
1615
+ }
1616
+ declare const validateCredential: ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
1617
+ status: z.ZodString;
1618
+ version: z.ZodString;
1619
+ timestamp: z.ZodString;
1620
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1621
+ declare namespace index_d_exports$6 {
1622
+ export { validateCredential };
1623
+ }
1624
+ declare const ask$3: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1625
+ url: z.ZodOptional<z.ZodURL>;
1626
+ file: z.ZodOptional<z.ZodFile>;
1627
+ base64: z.ZodOptional<z.ZodString>;
1628
+ question: z.ZodString;
1629
+ model: z.ZodDefault<z.ZodEnum<{
1630
+ auto: "auto";
1631
+ max: "max";
1632
+ mini: "mini";
1633
+ nano: "nano";
1634
+ pro: "pro";
1635
+ }>>;
1636
+ documentId: z.ZodOptional<z.ZodString>;
1637
+ callback: z.ZodOptional<z.ZodObject<{
1638
+ url: z.ZodURL;
1639
+ type: z.ZodOptional<z.ZodString>;
1640
+ }, z.core.$strip>>;
1641
+ }, z.core.$strip>, z.ZodObject<{
1642
+ markdown: z.ZodString;
1643
+ pageCount: z.ZodNumber;
1644
+ model: z.ZodEnum<{
1645
+ max: "max";
1646
+ mini: "mini";
1647
+ nano: "nano";
1648
+ pro: "pro";
1649
+ }>;
1650
+ credits: z.ZodNumber;
1651
+ requestId: z.ZodNumber;
1652
+ documentId: z.ZodOptional<z.ZodString>;
1653
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1654
+ declare const extract$3: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1655
+ url: z.ZodOptional<z.ZodURL>;
1656
+ file: z.ZodOptional<z.ZodFile>;
1657
+ base64: z.ZodOptional<z.ZodString>;
1658
+ prompt: z.ZodString;
1659
+ schema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
1660
+ model: z.ZodDefault<z.ZodEnum<{
1661
+ auto: "auto";
1662
+ max: "max";
1663
+ mini: "mini";
1664
+ nano: "nano";
1665
+ pro: "pro";
1666
+ }>>;
1667
+ documentId: z.ZodOptional<z.ZodString>;
1668
+ callback: z.ZodOptional<z.ZodObject<{
1669
+ url: z.ZodURL;
1670
+ type: z.ZodOptional<z.ZodString>;
1671
+ }, z.core.$strip>>;
1672
+ }, z.core.$strip>, z.ZodObject<{
1673
+ data: z.ZodUnknown;
1674
+ pageCount: z.ZodNumber;
1675
+ model: z.ZodEnum<{
1676
+ max: "max";
1677
+ mini: "mini";
1678
+ nano: "nano";
1679
+ pro: "pro";
1680
+ }>;
1681
+ credits: z.ZodNumber;
1682
+ requestId: z.ZodNumber;
1683
+ documentId: z.ZodOptional<z.ZodString>;
1684
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1685
+ declare const parse$3: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1686
+ url: z.ZodOptional<z.ZodURL>;
1687
+ file: z.ZodOptional<z.ZodFile>;
1688
+ base64: z.ZodOptional<z.ZodString>;
1689
+ model: z.ZodDefault<z.ZodEnum<{
1690
+ auto: "auto";
1691
+ max: "max";
1692
+ pro: "pro";
1693
+ }>>;
1694
+ documentId: z.ZodOptional<z.ZodString>;
1695
+ callback: z.ZodOptional<z.ZodObject<{
1696
+ url: z.ZodURL;
1697
+ type: z.ZodOptional<z.ZodString>;
1698
+ }, z.core.$strip>>;
1699
+ }, z.core.$strip>, z.ZodObject<{
1700
+ markdown: z.ZodString;
1701
+ pageCount: z.ZodNumber;
1702
+ model: z.ZodEnum<{
1703
+ max: "max";
1704
+ pro: "pro";
1705
+ }>;
1706
+ credits: z.ZodNumber;
1707
+ requestId: z.ZodNumber;
1708
+ html: z.ZodOptional<z.ZodString>;
1709
+ documentId: z.ZodOptional<z.ZodString>;
1710
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1711
+ declare namespace index_d_exports$5 {
1712
+ export { ask$3 as ask, extract$3 as extract, parse$3 as parse };
1713
+ }
1714
+ declare const ask$2: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1715
+ url: z.ZodOptional<z.ZodURL>;
1716
+ file: z.ZodOptional<z.ZodFile>;
1717
+ base64: z.ZodOptional<z.ZodString>;
1718
+ question: z.ZodString;
1719
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1720
+ auto: "auto";
1721
+ max: "max";
1722
+ mini: "mini";
1723
+ nano: "nano";
1724
+ pro: "pro";
1725
+ }>>>;
1726
+ documentId: z.ZodOptional<z.ZodString>;
1727
+ callback: z.ZodOptional<z.ZodObject<{
1728
+ url: z.ZodURL;
1729
+ type: z.ZodOptional<z.ZodString>;
1730
+ }, z.core.$strip>>;
1731
+ }, z.core.$strip>, z.ZodObject<{
1732
+ markdown: z.ZodString;
1733
+ pageCount: z.ZodNumber;
1734
+ model: z.ZodEnum<{
1735
+ max: "max";
1736
+ mini: "mini";
1737
+ nano: "nano";
1738
+ pro: "pro";
1739
+ }>;
1740
+ credits: z.ZodNumber;
1741
+ requestId: z.ZodNumber;
1742
+ documentId: z.ZodOptional<z.ZodString>;
1743
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1744
+ declare const extract$2: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1745
+ url: z.ZodOptional<z.ZodURL>;
1746
+ file: z.ZodOptional<z.ZodFile>;
1747
+ base64: z.ZodOptional<z.ZodString>;
1748
+ prompt: z.ZodString;
1749
+ schema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
1750
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1751
+ auto: "auto";
1752
+ max: "max";
1753
+ mini: "mini";
1754
+ nano: "nano";
1755
+ pro: "pro";
1756
+ }>>>;
1757
+ documentId: z.ZodOptional<z.ZodString>;
1758
+ callback: z.ZodOptional<z.ZodObject<{
1759
+ url: z.ZodURL;
1760
+ type: z.ZodOptional<z.ZodString>;
1761
+ }, z.core.$strip>>;
1762
+ }, z.core.$strip>, z.ZodObject<{
1763
+ data: z.ZodUnknown;
1764
+ pageCount: z.ZodNumber;
1765
+ model: z.ZodEnum<{
1766
+ max: "max";
1767
+ mini: "mini";
1768
+ nano: "nano";
1769
+ pro: "pro";
1770
+ }>;
1771
+ credits: z.ZodNumber;
1772
+ requestId: z.ZodNumber;
1773
+ documentId: z.ZodOptional<z.ZodString>;
1774
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1775
+ declare const parse$2: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1776
+ url: z.ZodOptional<z.ZodURL>;
1777
+ file: z.ZodOptional<z.ZodFile>;
1778
+ base64: z.ZodOptional<z.ZodString>;
1779
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
1780
+ auto: "auto";
1781
+ max: "max";
1782
+ mini: "mini";
1783
+ nano: "nano";
1784
+ pro: "pro";
1785
+ }>>>;
1786
+ includePages: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
1787
+ false: "false";
1788
+ true: "true";
1789
+ }>, z.ZodTransform<boolean, "false" | "true">>]>>>;
1790
+ documentId: z.ZodOptional<z.ZodString>;
1791
+ callback: z.ZodOptional<z.ZodObject<{
1792
+ url: z.ZodURL;
1793
+ type: z.ZodOptional<z.ZodString>;
1794
+ }, z.core.$strip>>;
1795
+ }, z.core.$strip>, z.ZodObject<{
1796
+ documentFormat: z.ZodOptional<z.ZodEnum<{
1797
+ csv: "csv";
1798
+ docx: "docx";
1799
+ html: "html";
1800
+ json: "json";
1801
+ md: "md";
1802
+ odp: "odp";
1803
+ ods: "ods";
1804
+ odt: "odt";
1805
+ pdf: "pdf";
1806
+ pptx: "pptx";
1807
+ rtf: "rtf";
1808
+ tsv: "tsv";
1809
+ txt: "txt";
1810
+ vtt: "vtt";
1811
+ xlsx: "xlsx";
1812
+ xml: "xml";
1813
+ }>>;
1814
+ pageUnit: z.ZodOptional<z.ZodEnum<{
1815
+ chunk: "chunk";
1816
+ page: "page";
1817
+ sheet: "sheet";
1818
+ slide: "slide";
1819
+ }>>;
1820
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1821
+ markdown: z.ZodString;
1822
+ pageCount: z.ZodNumber;
1823
+ model: z.ZodEnum<{
1824
+ max: "max";
1825
+ mini: "mini";
1826
+ nano: "nano";
1827
+ pro: "pro";
1828
+ }>;
1829
+ credits: z.ZodNumber;
1830
+ requestId: z.ZodNumber;
1831
+ html: z.ZodOptional<z.ZodString>;
1832
+ documentId: z.ZodOptional<z.ZodString>;
1833
+ pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1834
+ pageNumber: z.ZodNumber;
1835
+ markdown: z.ZodString;
1836
+ }, z.core.$strip>>>;
1837
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1838
+ declare namespace index_d_exports$4 {
1839
+ export { ask$2 as ask, extract$2 as extract, parse$2 as parse };
1840
+ }
1841
+ declare const bankStatementParse: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1842
+ url: z.ZodOptional<z.ZodURL>;
1843
+ file: z.ZodOptional<z.ZodFile>;
1844
+ base64: z.ZodOptional<z.ZodString>;
1845
+ }, z.core.$strip>, z.ZodObject<{
1846
+ markdown: z.ZodString;
1847
+ pageCount: z.ZodNumber;
1848
+ model: z.ZodEnum<{
1849
+ max: "max";
1850
+ pro: "pro";
1851
+ }>;
1852
+ requestId: z.ZodNumber;
1853
+ html: z.ZodOptional<z.ZodString>;
1854
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1855
+ declare const generateSchema: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1856
+ instruction: z.ZodString;
1857
+ }, z.core.$strip>, z.ZodObject<{
1858
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1859
+ requestId: z.ZodNumber;
1860
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1861
+ declare const publicationPdfUrl: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1862
+ ids: z.ZodArray<z.ZodString>;
1863
+ }, z.core.$strip>, z.ZodObject<{
1864
+ results: z.ZodArray<z.ZodObject<{
1865
+ id: z.ZodString;
1866
+ pdfUrl: z.ZodOptional<z.ZodString>;
1867
+ title: z.ZodOptional<z.ZodString>;
1868
+ }, z.core.$strip>>;
1869
+ requestId: z.ZodNumber;
1870
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1871
+ declare const rateLimitStatus: ContractProcedureBuilderWithOutput<Schema$1<unknown, unknown>, z.ZodObject<{
1872
+ bankStatementParse: z.ZodObject<{
1873
+ limit: z.ZodNumber;
1874
+ used: z.ZodNumber;
1875
+ remaining: z.ZodNumber;
1876
+ }, z.core.$strip>;
1877
+ generateSchema: z.ZodObject<{
1878
+ limit: z.ZodNumber;
1879
+ used: z.ZodNumber;
1880
+ remaining: z.ZodNumber;
1881
+ }, z.core.$strip>;
1882
+ publicationPdfUrl: z.ZodObject<{
1883
+ limit: z.ZodNumber;
1884
+ used: z.ZodNumber;
1885
+ remaining: z.ZodNumber;
1886
+ }, z.core.$strip>;
1887
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1888
+ declare namespace index_d_exports$3 {
1889
+ export { bankStatementParse, generateSchema, publicationPdfUrl, rateLimitStatus };
1890
+ }
1891
+ declare const ask$1: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1892
+ url: z.ZodOptional<z.ZodURL>;
1893
+ file: z.ZodOptional<z.ZodFile>;
1894
+ base64: z.ZodOptional<z.ZodString>;
1895
+ question: z.ZodString;
1896
+ model: z.ZodDefault<z.ZodEnum<{
1897
+ auto: "auto";
1898
+ max: "max";
1899
+ mini: "mini";
1900
+ nano: "nano";
1901
+ pro: "pro";
1902
+ }>>;
1903
+ documentId: z.ZodOptional<z.ZodString>;
1904
+ callback: z.ZodOptional<z.ZodObject<{
1905
+ url: z.ZodURL;
1906
+ type: z.ZodOptional<z.ZodString>;
1907
+ }, z.core.$strip>>;
1908
+ }, z.core.$strip>, z.ZodObject<{
1909
+ markdown: z.ZodString;
1910
+ pageCount: z.ZodNumber;
1911
+ model: z.ZodEnum<{
1912
+ max: "max";
1913
+ mini: "mini";
1914
+ nano: "nano";
1915
+ pro: "pro";
1916
+ }>;
1917
+ credits: z.ZodNumber;
1918
+ requestId: z.ZodNumber;
1919
+ documentId: z.ZodOptional<z.ZodString>;
1920
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1921
+ declare const extract$1: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1922
+ url: z.ZodOptional<z.ZodURL>;
1923
+ file: z.ZodOptional<z.ZodFile>;
1924
+ base64: z.ZodOptional<z.ZodString>;
1925
+ prompt: z.ZodString;
1926
+ schema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
1927
+ model: z.ZodDefault<z.ZodEnum<{
1928
+ auto: "auto";
1929
+ max: "max";
1930
+ mini: "mini";
1931
+ nano: "nano";
1932
+ pro: "pro";
1933
+ }>>;
1934
+ documentId: z.ZodOptional<z.ZodString>;
1935
+ callback: z.ZodOptional<z.ZodObject<{
1936
+ url: z.ZodURL;
1937
+ type: z.ZodOptional<z.ZodString>;
1938
+ }, z.core.$strip>>;
1939
+ }, z.core.$strip>, z.ZodObject<{
1940
+ data: z.ZodUnknown;
1941
+ pageCount: z.ZodNumber;
1942
+ model: z.ZodEnum<{
1943
+ max: "max";
1944
+ mini: "mini";
1945
+ nano: "nano";
1946
+ pro: "pro";
1947
+ }>;
1948
+ credits: z.ZodNumber;
1949
+ requestId: z.ZodNumber;
1950
+ documentId: z.ZodOptional<z.ZodString>;
1951
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1952
+ declare const parse$1: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1953
+ url: z.ZodOptional<z.ZodURL>;
1954
+ file: z.ZodOptional<z.ZodFile>;
1955
+ base64: z.ZodOptional<z.ZodString>;
1956
+ model: z.ZodDefault<z.ZodEnum<{
1957
+ auto: "auto";
1958
+ max: "max";
1959
+ pro: "pro";
1960
+ }>>;
1961
+ documentId: z.ZodOptional<z.ZodString>;
1962
+ callback: z.ZodOptional<z.ZodObject<{
1963
+ url: z.ZodURL;
1964
+ type: z.ZodOptional<z.ZodString>;
1965
+ }, z.core.$strip>>;
1966
+ }, z.core.$strip>, z.ZodObject<{
1967
+ markdown: z.ZodString;
1968
+ pageCount: z.ZodNumber;
1969
+ model: z.ZodEnum<{
1970
+ max: "max";
1971
+ pro: "pro";
1972
+ }>;
1973
+ documentType: z.ZodOptional<z.ZodString>;
1974
+ html: z.ZodOptional<z.ZodString>;
1975
+ credits: z.ZodNumber;
1976
+ requestId: z.ZodNumber;
1977
+ documentId: z.ZodOptional<z.ZodString>;
1978
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
1979
+ declare namespace index_d_exports$2 {
1980
+ export { ask$1 as ask, extract$1 as extract, parse$1 as parse };
1981
+ }
1982
+ declare const ask: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1983
+ url: z.ZodOptional<z.ZodURL>;
1984
+ file: z.ZodOptional<z.ZodFile>;
1985
+ base64: z.ZodOptional<z.ZodString>;
1986
+ question: z.ZodString;
1987
+ model: z.ZodDefault<z.ZodEnum<{
1988
+ auto: "auto";
1989
+ max: "max";
1990
+ mini: "mini";
1991
+ nano: "nano";
1992
+ pro: "pro";
1993
+ }>>;
1994
+ documentId: z.ZodOptional<z.ZodString>;
1995
+ callback: z.ZodOptional<z.ZodObject<{
1996
+ url: z.ZodURL;
1997
+ type: z.ZodOptional<z.ZodString>;
1998
+ }, z.core.$strip>>;
1999
+ }, z.core.$strip>, z.ZodObject<{
2000
+ markdown: z.ZodString;
2001
+ pageCount: z.ZodNumber;
2002
+ model: z.ZodEnum<{
2003
+ max: "max";
2004
+ mini: "mini";
2005
+ nano: "nano";
2006
+ pro: "pro";
2007
+ }>;
2008
+ credits: z.ZodNumber;
2009
+ requestId: z.ZodNumber;
2010
+ documentId: z.ZodOptional<z.ZodString>;
2011
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
2012
+ declare const extract: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2013
+ url: z.ZodOptional<z.ZodURL>;
2014
+ file: z.ZodOptional<z.ZodFile>;
2015
+ base64: z.ZodOptional<z.ZodString>;
2016
+ prompt: z.ZodString;
2017
+ schema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<unknown, string>>, z.ZodRecord<z.ZodString, z.ZodUnknown>>]>;
2018
+ model: z.ZodDefault<z.ZodEnum<{
2019
+ auto: "auto";
2020
+ max: "max";
2021
+ mini: "mini";
2022
+ nano: "nano";
2023
+ pro: "pro";
2024
+ }>>;
2025
+ documentId: z.ZodOptional<z.ZodString>;
2026
+ callback: z.ZodOptional<z.ZodObject<{
2027
+ url: z.ZodURL;
2028
+ type: z.ZodOptional<z.ZodString>;
2029
+ }, z.core.$strip>>;
2030
+ }, z.core.$strip>, z.ZodObject<{
2031
+ data: z.ZodUnknown;
2032
+ pageCount: z.ZodNumber;
2033
+ model: z.ZodEnum<{
2034
+ max: "max";
2035
+ mini: "mini";
2036
+ nano: "nano";
2037
+ pro: "pro";
2038
+ }>;
2039
+ credits: z.ZodNumber;
2040
+ requestId: z.ZodNumber;
2041
+ documentId: z.ZodOptional<z.ZodString>;
2042
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
2043
+ declare const parse: ContractProcedureBuilderWithInputOutput<z.ZodObject<{
2044
+ url: z.ZodOptional<z.ZodURL>;
2045
+ file: z.ZodOptional<z.ZodFile>;
2046
+ base64: z.ZodOptional<z.ZodString>;
2047
+ model: z.ZodDefault<z.ZodEnum<{
2048
+ auto: "auto";
2049
+ max: "max";
2050
+ pro: "pro";
2051
+ }>>;
2052
+ documentId: z.ZodOptional<z.ZodString>;
2053
+ callback: z.ZodOptional<z.ZodObject<{
2054
+ url: z.ZodURL;
2055
+ type: z.ZodOptional<z.ZodString>;
2056
+ }, z.core.$strip>>;
2057
+ }, z.core.$strip>, z.ZodObject<{
2058
+ markdown: z.ZodString;
2059
+ pageCount: z.ZodNumber;
2060
+ model: z.ZodEnum<{
2061
+ max: "max";
2062
+ pro: "pro";
2063
+ }>;
2064
+ credits: z.ZodNumber;
2065
+ requestId: z.ZodNumber;
2066
+ html: z.ZodOptional<z.ZodString>;
2067
+ documentId: z.ZodOptional<z.ZodString>;
2068
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
2069
+ declare namespace index_d_exports$1 {
2070
+ export { ask, extract, parse };
2071
+ }
2072
+ declare namespace index_d_exports {
2073
+ export { index_d_exports$8 as academic, index_d_exports$7 as admin, index_d_exports$6 as authenticate, index_d_exports$5 as bankStatement, index_d_exports$4 as document, index_d_exports$3 as free, index_d_exports$2 as identity, index_d_exports$1 as invoice };
2074
+ }
2075
+ export declare const pdfvectorModelSchema: z.ZodEnum<{
2076
+ max: "max";
2077
+ mini: "mini";
2078
+ nano: "nano";
2079
+ pro: "pro";
2080
+ }>;
2081
+ type PDFVectorModel = z.infer<typeof pdfvectorModelSchema>;
2082
+ type ContractInputs = InferContractRouterInputs<typeof index_d_exports>;
2083
+ type ContractOutputs = InferContractRouterOutputs<typeof index_d_exports>;
2084
+ export { type ContractInputs, type ContractOutputs, type ContractRouterClient, type PDFVectorModel, index_d_exports as contract };