@temporary-name/server 1.9.3-alpha.ec3bfb9dce56198911349c322c970208b21b50db → 1.9.3-alpha.edd373b82156a10608d43b19a44b75ae72e72de7
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/adapters/aws-lambda/index.d.mts +2 -2
- package/dist/adapters/aws-lambda/index.d.ts +2 -2
- package/dist/adapters/aws-lambda/index.mjs +3 -3
- package/dist/adapters/fetch/index.d.mts +2 -2
- package/dist/adapters/fetch/index.d.ts +2 -2
- package/dist/adapters/fetch/index.mjs +3 -3
- package/dist/adapters/node/index.d.mts +2 -2
- package/dist/adapters/node/index.d.ts +2 -2
- package/dist/adapters/node/index.mjs +3 -3
- package/dist/adapters/standard/index.d.mts +2 -2
- package/dist/adapters/standard/index.d.ts +2 -2
- package/dist/adapters/standard/index.mjs +3 -3
- package/dist/index.d.mts +268 -16
- package/dist/index.d.ts +268 -16
- package/dist/index.mjs +379 -71
- package/dist/openapi/index.d.mts +11 -30
- package/dist/openapi/index.d.ts +11 -30
- package/dist/openapi/index.mjs +338 -295
- package/dist/shared/{server.Cza0RB3u.mjs → server.BCY45g2x.mjs} +1 -1
- package/dist/shared/{server.ChOv1yG3.mjs → server.BETu17rq.mjs} +1 -1
- package/dist/shared/server.B_oW_rPl.mjs +525 -0
- package/dist/shared/server.CjPiuQYH.d.mts +51 -0
- package/dist/shared/server.CjPiuQYH.d.ts +51 -0
- package/dist/shared/{server.CYa9puL2.mjs → server.Cq7SBLD5.mjs} +2 -2
- package/dist/shared/{server.CVhIyQ4x.d.mts → server.DGH2Bq4t.d.mts} +1 -1
- package/dist/shared/{server.D8RAzJ_p.d.ts → server.nQoUObAJ.d.ts} +1 -1
- package/dist/shared/{server.Cj3_Lp61.d.ts → server.zsKBRxsz.d.mts} +26 -11
- package/dist/shared/{server.Cj3_Lp61.d.mts → server.zsKBRxsz.d.ts} +26 -11
- package/package.json +8 -8
- package/dist/shared/server.YUvuxHty.mjs +0 -48
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as z from '@temporary-name/zod';
|
|
2
2
|
import { SchemaClass, core } from '@temporary-name/zod';
|
|
3
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
4
|
-
import {
|
|
4
|
+
import { $input, $output } from 'zod/v4/core';
|
|
5
|
+
import { ClientContext, Value, Promisable, Client, MaybeOptionalOptions, HTTPEndpoint as HTTPEndpoint$1, IntersectPick, HTTPPath, AsyncIteratorClass, ClientOptions, HTTPMethod } from '@temporary-name/shared';
|
|
5
6
|
export { AsyncIteratorClass, ClientContext, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, HTTPMethod, HTTPPath, IntersectPick, ORPCError, asyncIteratorToStream as eventIteratorToStream, isDefinedError, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
|
|
6
|
-
import { C as Context, S as Schemas, I as InferProcedureClientInputs, a as InferSchemaOutput, M as Meta, L as Lazyable, P as Procedure, b as Contract, A as AnyShape, c as MergedSchemas, W as WrapShape, U as UnionToIntersection, d as AnySchema, R as Route, e as Middleware, f as MergedCurrentContext, g as MergedInitialContext,
|
|
7
|
-
export {
|
|
7
|
+
import { C as Context, S as Schemas, I as InferProcedureClientInputs, a as InferSchemaOutput, M as Meta, L as Lazyable, P as Procedure, b as Contract, A as AnyShape, c as MergedSchemas, W as WrapShape, U as UnionToIntersection, d as AnySchema, R as Route, e as Middleware, f as MergedCurrentContext, g as MergedInitialContext, V as ValidatedAuthContext, h as AuthConfig, B as BuildContextWithAuth, i as ProcedureHandler, j as InferHandlerInputs, k as InferSchemaInput, E as EnhanceRouterOptions, l as Router, m as EnhancedRouter, n as MapInputMiddleware, o as ContractDef, p as SchemaIssue, q as Schema, r as AnyMiddleware, s as Lazy, t as AnyProcedure } from './shared/server.zsKBRxsz.js';
|
|
8
|
+
export { a5 as AccessibleLazyRouter, T as AnyContractDef, _ as AnyRouter, aa as ContractProcedureCallbackOptions, Z as ContractRouter, a1 as InferRouterCurrentContexts, $ as InferRouterInitialContext, a0 as InferRouterInitialContexts, a2 as InferRouterInputs, a3 as InferRouterOutputs, ai as InitialSchemas, v as LAZY_SYMBOL, w as LazyMeta, ab as LazyTraverseContractProceduresOptions, J as MiddlewareNextFn, N as MiddlewareOptions, K as MiddlewareOutputFn, H as MiddlewareResult, X as ProcedureDef, Q as ProcedureHandlerOptions, a9 as TraverseContractProcedureCallbackOptions, a8 as TraverseContractProceduresOptions, ag as TypeRest, ae as UnlaziedRouter, a6 as createAccessibleLazyRouter, a7 as enhanceRouter, D as getLazyMeta, a4 as getRouter, ah as initialSchemas, z as isLazy, Y as isProcedure, y as lazy, x as lazyInternal, u as mergeCurrentContext, G as mergeMeta, O as middlewareOutputFn, ad as resolveContractProcedures, ac as traverseContractProcedures, F as unlazy, af as unlazyRouter } from './shared/server.zsKBRxsz.js';
|
|
9
|
+
import * as Draft07 from '@temporary-name/interop/json-schema-typed/draft-07';
|
|
10
|
+
import * as Draft2019 from '@temporary-name/interop/json-schema-typed/draft-2019-09';
|
|
11
|
+
import * as Draft2020 from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
12
|
+
export { a as ZodToJsonSchemaConverter, Z as ZodToJsonSchemaConverterOptions } from './shared/server.CjPiuQYH.js';
|
|
13
|
+
import { JSONSchema } from '@temporary-name/server/openapi';
|
|
8
14
|
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
9
15
|
|
|
10
16
|
type ProcedureClient<TClientContext extends ClientContext, TSchemas extends Schemas> = Client<TClientContext, InferProcedureClientInputs<TSchemas>, InferSchemaOutput<TSchemas['outputSchema']>>;
|
|
@@ -82,7 +88,7 @@ declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext
|
|
|
82
88
|
*/
|
|
83
89
|
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>>(middleware: Middleware<TCurrentContext, UOutContext, unknown, unknown, TMeta>): ProcedureBuilder<TInitialContext, MergedCurrentContext<TCurrentContext, UOutContext>, TSchemas, TMeta, TGateName>;
|
|
84
90
|
use<UOutContext extends IntersectPick<TCurrentContext, UOutContext>, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, unknown, unknown, TMeta>): ProcedureBuilder<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TSchemas, TMeta, TGateName>;
|
|
85
|
-
useAuth<
|
|
91
|
+
useAuth<TAuthContext extends ValidatedAuthContext = false>(config: AuthConfig<TAuthContext, TCurrentContext, TMeta>): ProcedureBuilder<TInitialContext, BuildContextWithAuth<TCurrentContext, TAuthContext>, TSchemas, TMeta, TGateName>;
|
|
86
92
|
useGating<const TInferredGateName extends string>(gates: TInferredGateName[], isGateEnabled: (gate: TInferredGateName, ctx: TCurrentContext) => boolean): BuilderWithMiddlewares<MergedInitialContext<TInitialContext, Context, TCurrentContext>, MergedCurrentContext<TCurrentContext, {
|
|
87
93
|
isGateEnabled: typeof isGateEnabled;
|
|
88
94
|
}>, TSchemas, TMeta, TInferredGateName>;
|
|
@@ -187,6 +193,262 @@ interface EventIteratorSchemaDetails {
|
|
|
187
193
|
declare function eventIterator<TYieldIn, TYieldOut, TReturnIn = unknown, TReturnOut = unknown>(yields: Schema<TYieldIn, TYieldOut>, returns?: Schema<TReturnIn, TReturnOut>): Schema<AsyncIteratorObject<TYieldIn, TReturnIn, void>, AsyncIteratorClass<TYieldOut, TReturnOut, void>>;
|
|
188
194
|
declare function getEventIteratorSchemaDetails(schema: AnySchema | undefined): undefined | EventIteratorSchemaDetails;
|
|
189
195
|
|
|
196
|
+
type JsonSchema = Draft2020.JSONSchema | Draft2019.JSONSchema | Draft07.JSONSchema;
|
|
197
|
+
declare enum JsonSchemaXNativeType {
|
|
198
|
+
BigInt = "bigint",
|
|
199
|
+
RegExp = "regexp",
|
|
200
|
+
Date = "date",
|
|
201
|
+
Url = "url",
|
|
202
|
+
Set = "set",
|
|
203
|
+
Map = "map"
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
interface experimental_JsonSchemaCoerceOptions {
|
|
207
|
+
components?: Record<string, JsonSchema>;
|
|
208
|
+
}
|
|
209
|
+
declare class experimental_JsonSchemaCoercer {
|
|
210
|
+
#private;
|
|
211
|
+
coerce(schema: JsonSchema, value: unknown, options?: experimental_JsonSchemaCoerceOptions): unknown;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Zod registry for customizing generated JSON schema, can use both for .input and .output
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```ts
|
|
219
|
+
* import { JSON_SCHEMA_REGISTRY } from '@temporary-name/zod/zod4'
|
|
220
|
+
*
|
|
221
|
+
* const user = z.object({
|
|
222
|
+
* name: z.string(),
|
|
223
|
+
* age: z.number(),
|
|
224
|
+
* })
|
|
225
|
+
*
|
|
226
|
+
* JSON_SCHEMA_REGISTRY.add(user, {
|
|
227
|
+
* examples: [{ name: 'John', age: 20 }],
|
|
228
|
+
* })
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
declare const JSON_SCHEMA_REGISTRY: zod_v4_core.$ZodRegistry<{
|
|
232
|
+
$anchor?: string;
|
|
233
|
+
$comment?: string;
|
|
234
|
+
$defs?: Record<string, JSONSchema>;
|
|
235
|
+
$dynamicAnchor?: string;
|
|
236
|
+
$dynamicRef?: string;
|
|
237
|
+
$id?: string;
|
|
238
|
+
$ref?: string;
|
|
239
|
+
$schema?: string;
|
|
240
|
+
$vocabulary?: Record<string, string>;
|
|
241
|
+
additionalItems?: JSONSchema;
|
|
242
|
+
additionalProperties?: JSONSchema;
|
|
243
|
+
allOf?: (JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue>[]) | undefined;
|
|
244
|
+
anyOf?: (JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue>[]) | undefined;
|
|
245
|
+
const?: typeof $input | typeof $output | undefined;
|
|
246
|
+
contains?: JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue> | undefined;
|
|
247
|
+
contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
|
|
248
|
+
contentMediaType?: string;
|
|
249
|
+
contentSchema?: JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue> | undefined;
|
|
250
|
+
default?: typeof $input | typeof $output | undefined;
|
|
251
|
+
definitions?: Record<string, JSONSchema>;
|
|
252
|
+
dependencies?: Record<string, (string[] | readonly string[]) | JSONSchema>;
|
|
253
|
+
dependentRequired?: Record<string, string[] | readonly string[]>;
|
|
254
|
+
dependentSchemas?: Record<string, JSONSchema>;
|
|
255
|
+
deprecated?: boolean;
|
|
256
|
+
description?: string;
|
|
257
|
+
else?: JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue> | undefined;
|
|
258
|
+
enum?: ((typeof $input | typeof $output)[] | readonly (typeof $input | typeof $output)[]) | undefined;
|
|
259
|
+
examples?: ((typeof $input | typeof $output)[] | readonly (typeof $input | typeof $output)[]) | undefined;
|
|
260
|
+
exclusiveMaximum?: number;
|
|
261
|
+
exclusiveMinimum?: number;
|
|
262
|
+
format?: string;
|
|
263
|
+
if?: JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue> | undefined;
|
|
264
|
+
items?: JSONSchema;
|
|
265
|
+
maxContains?: number;
|
|
266
|
+
maximum?: number;
|
|
267
|
+
maxItems?: number;
|
|
268
|
+
maxLength?: number;
|
|
269
|
+
maxProperties?: number;
|
|
270
|
+
minContains?: number;
|
|
271
|
+
minimum?: number;
|
|
272
|
+
minItems?: number;
|
|
273
|
+
minLength?: number;
|
|
274
|
+
minProperties?: number;
|
|
275
|
+
multipleOf?: number;
|
|
276
|
+
not?: JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue> | undefined;
|
|
277
|
+
oneOf?: (JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue>[]) | undefined;
|
|
278
|
+
pattern?: string;
|
|
279
|
+
patternProperties?: Record<string, JSONSchema>;
|
|
280
|
+
prefixItems?: (JSONSchema<any, JSONSchema.TypeValue>[] | readonly JSONSchema<any, JSONSchema.TypeValue>[]) | JSONSchema;
|
|
281
|
+
properties?: Record<string, JSONSchema>;
|
|
282
|
+
propertyNames?: JSONSchema;
|
|
283
|
+
readOnly?: boolean;
|
|
284
|
+
required?: string[] | readonly string[];
|
|
285
|
+
then?: JSONSchema<typeof $input | typeof $output, JSONSchema.TypeValue> | undefined;
|
|
286
|
+
title?: string;
|
|
287
|
+
type?: JSONSchema.TypeValue | undefined;
|
|
288
|
+
unevaluatedItems?: JSONSchema;
|
|
289
|
+
unevaluatedProperties?: JSONSchema;
|
|
290
|
+
uniqueItems?: boolean;
|
|
291
|
+
writeOnly?: boolean;
|
|
292
|
+
}, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
|
|
293
|
+
/**
|
|
294
|
+
* Zod registry for customizing generated JSON schema, only useful for .input
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```ts
|
|
298
|
+
* import { JSON_SCHEMA_INPUT_REGISTRY } from '@temporary-name/zod/zod4'
|
|
299
|
+
*
|
|
300
|
+
* const user = z.object({
|
|
301
|
+
* name: z.string(),
|
|
302
|
+
* age: z.string().transform(v => Number(v)),
|
|
303
|
+
* })
|
|
304
|
+
*
|
|
305
|
+
* JSON_SCHEMA_REGISTRY.add(user, {
|
|
306
|
+
* examples: [{ name: 'John', age: "20" }],
|
|
307
|
+
* })
|
|
308
|
+
* ```
|
|
309
|
+
*/
|
|
310
|
+
declare const JSON_SCHEMA_INPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
|
|
311
|
+
$anchor?: string;
|
|
312
|
+
$comment?: string;
|
|
313
|
+
$defs?: Record<string, JSONSchema>;
|
|
314
|
+
$dynamicAnchor?: string;
|
|
315
|
+
$dynamicRef?: string;
|
|
316
|
+
$id?: string;
|
|
317
|
+
$ref?: string;
|
|
318
|
+
$schema?: string;
|
|
319
|
+
$vocabulary?: Record<string, string>;
|
|
320
|
+
additionalItems?: JSONSchema;
|
|
321
|
+
additionalProperties?: JSONSchema;
|
|
322
|
+
allOf?: (JSONSchema<typeof $input, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $input, JSONSchema.TypeValue>[]) | undefined;
|
|
323
|
+
anyOf?: (JSONSchema<typeof $input, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $input, JSONSchema.TypeValue>[]) | undefined;
|
|
324
|
+
const?: typeof $input | undefined;
|
|
325
|
+
contains?: JSONSchema<typeof $input, JSONSchema.TypeValue> | undefined;
|
|
326
|
+
contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
|
|
327
|
+
contentMediaType?: string;
|
|
328
|
+
contentSchema?: JSONSchema<typeof $input, JSONSchema.TypeValue> | undefined;
|
|
329
|
+
default?: typeof $input | undefined;
|
|
330
|
+
definitions?: Record<string, JSONSchema>;
|
|
331
|
+
dependencies?: Record<string, (string[] | readonly string[]) | JSONSchema>;
|
|
332
|
+
dependentRequired?: Record<string, string[] | readonly string[]>;
|
|
333
|
+
dependentSchemas?: Record<string, JSONSchema>;
|
|
334
|
+
deprecated?: boolean;
|
|
335
|
+
description?: string;
|
|
336
|
+
else?: JSONSchema<typeof $input, JSONSchema.TypeValue> | undefined;
|
|
337
|
+
enum?: ((typeof $input)[] | readonly (typeof $input)[]) | undefined;
|
|
338
|
+
examples?: ((typeof $input)[] | readonly (typeof $input)[]) | undefined;
|
|
339
|
+
exclusiveMaximum?: number;
|
|
340
|
+
exclusiveMinimum?: number;
|
|
341
|
+
format?: string;
|
|
342
|
+
if?: JSONSchema<typeof $input, JSONSchema.TypeValue> | undefined;
|
|
343
|
+
items?: JSONSchema;
|
|
344
|
+
maxContains?: number;
|
|
345
|
+
maximum?: number;
|
|
346
|
+
maxItems?: number;
|
|
347
|
+
maxLength?: number;
|
|
348
|
+
maxProperties?: number;
|
|
349
|
+
minContains?: number;
|
|
350
|
+
minimum?: number;
|
|
351
|
+
minItems?: number;
|
|
352
|
+
minLength?: number;
|
|
353
|
+
minProperties?: number;
|
|
354
|
+
multipleOf?: number;
|
|
355
|
+
not?: JSONSchema<typeof $input, JSONSchema.TypeValue> | undefined;
|
|
356
|
+
oneOf?: (JSONSchema<typeof $input, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $input, JSONSchema.TypeValue>[]) | undefined;
|
|
357
|
+
pattern?: string;
|
|
358
|
+
patternProperties?: Record<string, JSONSchema>;
|
|
359
|
+
prefixItems?: (JSONSchema<any, JSONSchema.TypeValue>[] | readonly JSONSchema<any, JSONSchema.TypeValue>[]) | JSONSchema;
|
|
360
|
+
properties?: Record<string, JSONSchema>;
|
|
361
|
+
propertyNames?: JSONSchema;
|
|
362
|
+
readOnly?: boolean;
|
|
363
|
+
required?: string[] | readonly string[];
|
|
364
|
+
then?: JSONSchema<typeof $input, JSONSchema.TypeValue> | undefined;
|
|
365
|
+
title?: string;
|
|
366
|
+
type?: JSONSchema.TypeValue | undefined;
|
|
367
|
+
unevaluatedItems?: JSONSchema;
|
|
368
|
+
unevaluatedProperties?: JSONSchema;
|
|
369
|
+
uniqueItems?: boolean;
|
|
370
|
+
writeOnly?: boolean;
|
|
371
|
+
}, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
|
|
372
|
+
/**
|
|
373
|
+
* Zod registry for customizing generated JSON schema, only useful for .input
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```ts
|
|
377
|
+
* import { JSON_SCHEMA_OUTPUT_REGISTRY } from '@temporary-name/zod/zod4'
|
|
378
|
+
*
|
|
379
|
+
* const user = z.object({
|
|
380
|
+
* name: z.string(),
|
|
381
|
+
* age: z.string().transform(v => Number(v)),
|
|
382
|
+
* })
|
|
383
|
+
*
|
|
384
|
+
* JSON_SCHEMA_OUTPUT_REGISTRY.add(user, {
|
|
385
|
+
* examples: [{ name: 'John', age: 20 }],
|
|
386
|
+
* })
|
|
387
|
+
* ```
|
|
388
|
+
*/
|
|
389
|
+
declare const JSON_SCHEMA_OUTPUT_REGISTRY: zod_v4_core.$ZodRegistry<{
|
|
390
|
+
$anchor?: string;
|
|
391
|
+
$comment?: string;
|
|
392
|
+
$defs?: Record<string, JSONSchema>;
|
|
393
|
+
$dynamicAnchor?: string;
|
|
394
|
+
$dynamicRef?: string;
|
|
395
|
+
$id?: string;
|
|
396
|
+
$ref?: string;
|
|
397
|
+
$schema?: string;
|
|
398
|
+
$vocabulary?: Record<string, string>;
|
|
399
|
+
additionalItems?: JSONSchema;
|
|
400
|
+
additionalProperties?: JSONSchema;
|
|
401
|
+
allOf?: (JSONSchema<typeof $output, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $output, JSONSchema.TypeValue>[]) | undefined;
|
|
402
|
+
anyOf?: (JSONSchema<typeof $output, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $output, JSONSchema.TypeValue>[]) | undefined;
|
|
403
|
+
const?: typeof $output | undefined;
|
|
404
|
+
contains?: JSONSchema<typeof $output, JSONSchema.TypeValue> | undefined;
|
|
405
|
+
contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token";
|
|
406
|
+
contentMediaType?: string;
|
|
407
|
+
contentSchema?: JSONSchema<typeof $output, JSONSchema.TypeValue> | undefined;
|
|
408
|
+
default?: typeof $output | undefined;
|
|
409
|
+
definitions?: Record<string, JSONSchema>;
|
|
410
|
+
dependencies?: Record<string, (string[] | readonly string[]) | JSONSchema>;
|
|
411
|
+
dependentRequired?: Record<string, string[] | readonly string[]>;
|
|
412
|
+
dependentSchemas?: Record<string, JSONSchema>;
|
|
413
|
+
deprecated?: boolean;
|
|
414
|
+
description?: string;
|
|
415
|
+
else?: JSONSchema<typeof $output, JSONSchema.TypeValue> | undefined;
|
|
416
|
+
enum?: ((typeof $output)[] | readonly (typeof $output)[]) | undefined;
|
|
417
|
+
examples?: ((typeof $output)[] | readonly (typeof $output)[]) | undefined;
|
|
418
|
+
exclusiveMaximum?: number;
|
|
419
|
+
exclusiveMinimum?: number;
|
|
420
|
+
format?: string;
|
|
421
|
+
if?: JSONSchema<typeof $output, JSONSchema.TypeValue> | undefined;
|
|
422
|
+
items?: JSONSchema;
|
|
423
|
+
maxContains?: number;
|
|
424
|
+
maximum?: number;
|
|
425
|
+
maxItems?: number;
|
|
426
|
+
maxLength?: number;
|
|
427
|
+
maxProperties?: number;
|
|
428
|
+
minContains?: number;
|
|
429
|
+
minimum?: number;
|
|
430
|
+
minItems?: number;
|
|
431
|
+
minLength?: number;
|
|
432
|
+
minProperties?: number;
|
|
433
|
+
multipleOf?: number;
|
|
434
|
+
not?: JSONSchema<typeof $output, JSONSchema.TypeValue> | undefined;
|
|
435
|
+
oneOf?: (JSONSchema<typeof $output, JSONSchema.TypeValue>[] | readonly JSONSchema<typeof $output, JSONSchema.TypeValue>[]) | undefined;
|
|
436
|
+
pattern?: string;
|
|
437
|
+
patternProperties?: Record<string, JSONSchema>;
|
|
438
|
+
prefixItems?: (JSONSchema<any, JSONSchema.TypeValue>[] | readonly JSONSchema<any, JSONSchema.TypeValue>[]) | JSONSchema;
|
|
439
|
+
properties?: Record<string, JSONSchema>;
|
|
440
|
+
propertyNames?: JSONSchema;
|
|
441
|
+
readOnly?: boolean;
|
|
442
|
+
required?: string[] | readonly string[];
|
|
443
|
+
then?: JSONSchema<typeof $output, JSONSchema.TypeValue> | undefined;
|
|
444
|
+
title?: string;
|
|
445
|
+
type?: JSONSchema.TypeValue | undefined;
|
|
446
|
+
unevaluatedItems?: JSONSchema;
|
|
447
|
+
unevaluatedProperties?: JSONSchema;
|
|
448
|
+
uniqueItems?: boolean;
|
|
449
|
+
writeOnly?: boolean;
|
|
450
|
+
}, zod_v4_core.$ZodType<unknown, unknown, zod_v4_core.$ZodTypeInternals<unknown, unknown>>>;
|
|
451
|
+
|
|
190
452
|
declare function isStartWithMiddlewares(middlewares: readonly AnyMiddleware[], compare: readonly AnyMiddleware[]): boolean;
|
|
191
453
|
declare function mergeMiddlewares(first: readonly AnyMiddleware[], second: readonly AnyMiddleware[], options: {
|
|
192
454
|
dedupeLeading: boolean;
|
|
@@ -206,16 +468,6 @@ declare function createAssertedLazyProcedure(lazied: Lazy<any>): Lazy<AnyProcedu
|
|
|
206
468
|
*/
|
|
207
469
|
declare function call<TInitialContext extends Context, TSchemas extends Schemas, TMeta extends Meta>(procedure: Lazyable<Procedure<TInitialContext, any, TSchemas, TMeta>>, input: InferProcedureClientInputs<TSchemas>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<TInitialContext, {}> & Omit<ClientOptions<{}>, 'context'>>): Promise<InferSchemaOutput<TSchemas['outputSchema']>>;
|
|
208
470
|
|
|
209
|
-
type RouterClient<TRouter extends AnyRouter, TClientContext extends ClientContext = {}> = TRouter extends Procedure<any, any, infer USchemas, any> ? ProcedureClient<TClientContext, USchemas> : {
|
|
210
|
-
[K in keyof TRouter]: TRouter[K] extends Lazyable<infer U extends AnyRouter> ? RouterClient<U, TClientContext> : never;
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Create Server-side client from a router.
|
|
214
|
-
*
|
|
215
|
-
* @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
|
|
216
|
-
*/
|
|
217
|
-
declare function createRouterClient<T extends AnyRouter, TClientContext extends ClientContext>(router: Lazyable<T | undefined>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<InferRouterInitialContext<T>, TClientContext>>): RouterClient<T, TClientContext>;
|
|
218
|
-
|
|
219
471
|
declare function isSchemaIssue(issue: unknown): issue is SchemaIssue;
|
|
220
472
|
|
|
221
473
|
type HTTPEndpoint = `${HTTPMethod} ${HTTPPath}`;
|
|
@@ -240,5 +492,5 @@ declare function parseEndpointDefinition(stringsOrEndpoint: TemplateStringsArray
|
|
|
240
492
|
pathSchema: AnySchema;
|
|
241
493
|
};
|
|
242
494
|
|
|
243
|
-
export { AnyMiddleware, AnyProcedure,
|
|
244
|
-
export type { BuilderDef, CreateProcedureClientOptions, DecoratedMiddleware, EventIteratorSchemaDetails, HTTPEndpoint, ProcedureClient, RouterBuilder,
|
|
495
|
+
export { AnyMiddleware, AnyProcedure, AnySchema, AnyShape, BuildContextWithAuth, Builder, BuilderWithMiddlewares, Context, Contract, ContractDef, DecoratedProcedure, EnhanceRouterOptions, EnhancedRouter, InferHandlerInputs, InferProcedureClientInputs, InferSchemaInput, InferSchemaOutput, JSON_SCHEMA_INPUT_REGISTRY, JSON_SCHEMA_OUTPUT_REGISTRY, JSON_SCHEMA_REGISTRY, JsonSchemaXNativeType, Lazy, Lazyable, MapInputMiddleware, MergedCurrentContext, MergedInitialContext, MergedSchemas, Meta, Middleware, Procedure, ProcedureBuilder, ProcedureHandler, Router, Schema, SchemaIssue, Schemas, UnionToIntersection, ValidationError, WrapShape, addMiddleware, baseApi, call, createAssertedLazyProcedure, createProcedureClient, decorateMiddleware, endpointRegex, eventIterator, experimental_JsonSchemaCoercer, getDynamicParams, getEventIteratorSchemaDetails, isSchemaIssue, isStartWithMiddlewares, mergeMiddlewares, parseEndpointDefinition, standardizeHTTPPath };
|
|
496
|
+
export type { BuilderDef, CreateProcedureClientOptions, DecoratedMiddleware, EventIteratorSchemaDetails, HTTPEndpoint, JsonSchema, ProcedureClient, RouterBuilder, ValidationErrorOptions, experimental_JsonSchemaCoerceOptions };
|