@orpc/client 0.0.0-next.b4fc1d9 → 0.0.0-next.b5b7502
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 +9 -0
- package/dist/adapters/fetch/index.d.mts +9 -13
- package/dist/adapters/fetch/index.d.ts +9 -13
- package/dist/adapters/fetch/index.mjs +5 -10
- package/dist/adapters/standard/index.d.mts +8 -103
- package/dist/adapters/standard/index.d.ts +8 -103
- package/dist/adapters/standard/index.mjs +2 -3
- package/dist/index.d.mts +16 -11
- package/dist/index.d.ts +16 -11
- package/dist/index.mjs +34 -32
- package/dist/plugins/index.d.mts +12 -9
- package/dist/plugins/index.d.ts +12 -9
- package/dist/plugins/index.mjs +7 -3
- package/dist/shared/{client.aGal-uGY.d.ts → client.5813Ufvs.d.mts} +14 -20
- 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.3Q53fveR.mjs → client.DhAxdT4W.mjs} +23 -21
- package/dist/shared/{client.DrOAzyMB.d.mts → client.grRbC25r.d.ts} +14 -20
- package/dist/shared/{client.BacCdg3F.mjs → client.jKEwIsRd.mjs} +6 -3
- package/package.json +4 -4
- package/dist/shared/client.CupM8eRP.d.mts +0 -30
- package/dist/shared/client.CupM8eRP.d.ts +0 -30
- package/dist/shared/client.CvnV7_uV.mjs +0 -12
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/client",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next.
|
4
|
+
"version": "0.0.0-next.b5b7502",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -39,9 +39,9 @@
|
|
39
39
|
"dist"
|
40
40
|
],
|
41
41
|
"dependencies": {
|
42
|
-
"@orpc/shared": "0.0.0-next.
|
43
|
-
"@orpc/standard-server": "0.0.0-next.
|
44
|
-
"@orpc/standard-server-fetch": "0.0.0-next.
|
42
|
+
"@orpc/shared": "0.0.0-next.b5b7502",
|
43
|
+
"@orpc/standard-server": "0.0.0-next.b5b7502",
|
44
|
+
"@orpc/standard-server-fetch": "0.0.0-next.b5b7502"
|
45
45
|
},
|
46
46
|
"devDependencies": {
|
47
47
|
"zod": "^3.24.2"
|
@@ -1,30 +0,0 @@
|
|
1
|
-
type ClientContext = Record<string, any>;
|
2
|
-
type ClientOptions<TClientContext extends ClientContext> = {
|
3
|
-
signal?: AbortSignal;
|
4
|
-
lastEventId?: string | undefined;
|
5
|
-
} & (Record<never, never> extends TClientContext ? {
|
6
|
-
context?: TClientContext;
|
7
|
-
} : {
|
8
|
-
context: TClientContext;
|
9
|
-
});
|
10
|
-
type ClientRest<TClientContext extends ClientContext, TInput> = Record<never, never> extends TClientContext ? undefined extends TInput ? [input?: TInput, options?: ClientOptions<TClientContext>] : [input: TInput, options?: ClientOptions<TClientContext>] : [input: TInput, options: ClientOptions<TClientContext>];
|
11
|
-
type ClientPromiseResult<TOutput, TError extends Error> = Promise<TOutput> & {
|
12
|
-
__error?: {
|
13
|
-
type: TError;
|
14
|
-
};
|
15
|
-
};
|
16
|
-
interface Client<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
|
17
|
-
(...rest: ClientRest<TClientContext, TInput>): ClientPromiseResult<TOutput, TError>;
|
18
|
-
}
|
19
|
-
type NestedClient<TClientContext extends ClientContext> = Client<TClientContext, any, any, any> | {
|
20
|
-
[k: string]: NestedClient<TClientContext>;
|
21
|
-
};
|
22
|
-
type InferClientContext<T extends NestedClient<any>> = T extends NestedClient<infer U> ? U : never;
|
23
|
-
type ClientOptionsOut<TClientContext extends ClientContext> = ClientOptions<TClientContext> & {
|
24
|
-
context: TClientContext;
|
25
|
-
};
|
26
|
-
interface ClientLink<TClientContext extends ClientContext> {
|
27
|
-
call: (path: readonly string[], input: unknown, options: ClientOptionsOut<TClientContext>) => Promise<unknown>;
|
28
|
-
}
|
29
|
-
|
30
|
-
export type { ClientOptionsOut as C, InferClientContext as I, NestedClient as N, ClientContext as a, ClientLink as b, ClientPromiseResult as c, ClientOptions as d, ClientRest as e, Client as f };
|
@@ -1,30 +0,0 @@
|
|
1
|
-
type ClientContext = Record<string, any>;
|
2
|
-
type ClientOptions<TClientContext extends ClientContext> = {
|
3
|
-
signal?: AbortSignal;
|
4
|
-
lastEventId?: string | undefined;
|
5
|
-
} & (Record<never, never> extends TClientContext ? {
|
6
|
-
context?: TClientContext;
|
7
|
-
} : {
|
8
|
-
context: TClientContext;
|
9
|
-
});
|
10
|
-
type ClientRest<TClientContext extends ClientContext, TInput> = Record<never, never> extends TClientContext ? undefined extends TInput ? [input?: TInput, options?: ClientOptions<TClientContext>] : [input: TInput, options?: ClientOptions<TClientContext>] : [input: TInput, options: ClientOptions<TClientContext>];
|
11
|
-
type ClientPromiseResult<TOutput, TError extends Error> = Promise<TOutput> & {
|
12
|
-
__error?: {
|
13
|
-
type: TError;
|
14
|
-
};
|
15
|
-
};
|
16
|
-
interface Client<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
|
17
|
-
(...rest: ClientRest<TClientContext, TInput>): ClientPromiseResult<TOutput, TError>;
|
18
|
-
}
|
19
|
-
type NestedClient<TClientContext extends ClientContext> = Client<TClientContext, any, any, any> | {
|
20
|
-
[k: string]: NestedClient<TClientContext>;
|
21
|
-
};
|
22
|
-
type InferClientContext<T extends NestedClient<any>> = T extends NestedClient<infer U> ? U : never;
|
23
|
-
type ClientOptionsOut<TClientContext extends ClientContext> = ClientOptions<TClientContext> & {
|
24
|
-
context: TClientContext;
|
25
|
-
};
|
26
|
-
interface ClientLink<TClientContext extends ClientContext> {
|
27
|
-
call: (path: readonly string[], input: unknown, options: ClientOptionsOut<TClientContext>) => Promise<unknown>;
|
28
|
-
}
|
29
|
-
|
30
|
-
export type { ClientOptionsOut as C, InferClientContext as I, NestedClient as N, ClientContext as a, ClientLink as b, ClientPromiseResult as c, ClientOptions as d, ClientRest as e, Client as f };
|