@orpc/client 0.0.0-next.ee0aeaf → 0.0.0-next.ee46dab
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/README.md +101 -0
- package/dist/adapters/fetch/index.d.mts +26 -0
- package/dist/adapters/fetch/index.d.ts +26 -0
- package/dist/adapters/fetch/index.mjs +32 -0
- package/dist/adapters/standard/index.d.mts +10 -0
- package/dist/adapters/standard/index.d.ts +10 -0
- package/dist/adapters/standard/index.mjs +4 -0
- package/dist/index.d.mts +155 -0
- package/dist/index.d.ts +155 -0
- package/dist/index.mjs +65 -0
- package/dist/plugins/index.d.mts +65 -0
- package/dist/plugins/index.d.ts +65 -0
- package/dist/plugins/index.mjs +131 -0
- package/dist/shared/client.5813Ufvs.d.mts +39 -0
- package/dist/shared/client.Bt94sjrK.d.mts +103 -0
- package/dist/shared/client.C0lT7w02.d.mts +30 -0
- package/dist/shared/client.C0lT7w02.d.ts +30 -0
- package/dist/shared/client.D-jrSuDb.d.ts +103 -0
- package/dist/shared/client.DSPm2IGZ.mjs +337 -0
- package/dist/shared/client.grRbC25r.d.ts +39 -0
- package/dist/shared/client.jKEwIsRd.mjs +175 -0
- package/package.json +23 -17
- package/dist/index.js +0 -86
- package/dist/src/index.d.ts +0 -7
- package/dist/src/procedure.d.ts +0 -24
- package/dist/src/router.d.ts +0 -9
package/dist/src/index.d.ts
DELETED
package/dist/src/procedure.d.ts
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
import type { Caller } from '@orpc/server';
|
2
|
-
import type { Promisable } from '@orpc/shared';
|
3
|
-
export interface CreateProcedureClientOptions {
|
4
|
-
/**
|
5
|
-
* The base url of the server.
|
6
|
-
*/
|
7
|
-
baseURL: string;
|
8
|
-
/**
|
9
|
-
* The fetch function used to make the request.
|
10
|
-
* @default global fetch
|
11
|
-
*/
|
12
|
-
fetch?: typeof fetch;
|
13
|
-
/**
|
14
|
-
* The headers used to make the request.
|
15
|
-
* Invoked before the request is made.
|
16
|
-
*/
|
17
|
-
headers?: (input: unknown) => Promisable<Headers | Record<string, string>>;
|
18
|
-
/**
|
19
|
-
* The path of the procedure on server.
|
20
|
-
*/
|
21
|
-
path: string[];
|
22
|
-
}
|
23
|
-
export declare function createProcedureClient<TInput, TOutput>(options: CreateProcedureClientOptions): Caller<TInput, TOutput>;
|
24
|
-
//# sourceMappingURL=procedure.d.ts.map
|
package/dist/src/router.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { ContractProcedure, ContractRouter, SchemaInput, SchemaOutput } from '@orpc/contract';
|
2
|
-
import type { Caller, Lazy, Procedure, Router } from '@orpc/server';
|
3
|
-
import type { SetOptional } from '@orpc/shared';
|
4
|
-
import type { CreateProcedureClientOptions } from './procedure';
|
5
|
-
export type RouterClient<T extends Router<any> | ContractRouter> = {
|
6
|
-
[K in keyof T]: T[K] extends ContractProcedure<infer UInputSchema, infer UOutputSchema> | Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput> | Lazy<Procedure<any, any, infer UInputSchema, infer UOutputSchema, infer UFuncOutput>> ? Caller<SchemaInput<UInputSchema>, SchemaOutput<UOutputSchema, UFuncOutput>> : T[K] extends Router<any> | ContractRouter ? RouterClient<T[K]> : never;
|
7
|
-
};
|
8
|
-
export declare function createRouterClient<T extends Router<any> | ContractRouter>(options: SetOptional<CreateProcedureClientOptions, 'path'>): RouterClient<T>;
|
9
|
-
//# sourceMappingURL=router.d.ts.map
|