@orpc/client 0.0.0-next.df024bb → 0.0.0-next.e563486

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,45 @@
1
+ import { Interceptor } from '@orpc/shared';
2
+ import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
3
+ import { a as ClientContext, C as ClientOptionsOut, b as ClientLink } from './client.CupM8eRP.mjs';
4
+
5
+ interface StandardLinkCodec<T extends ClientContext> {
6
+ encode(path: readonly string[], input: unknown, options: ClientOptionsOut<any>): Promise<StandardRequest>;
7
+ decode(response: StandardLazyResponse, options: ClientOptionsOut<T>, path: readonly string[], input: unknown): Promise<unknown>;
8
+ }
9
+ interface StandardLinkClient<T extends ClientContext> {
10
+ call(request: StandardRequest, options: ClientOptionsOut<T>, path: readonly string[], input: unknown): Promise<StandardLazyResponse>;
11
+ }
12
+
13
+ declare class InvalidEventIteratorRetryResponse extends Error {
14
+ }
15
+ interface StandardLinkOptions<T extends ClientContext> {
16
+ interceptors?: Interceptor<{
17
+ path: readonly string[];
18
+ input: unknown;
19
+ options: ClientOptionsOut<T>;
20
+ }, unknown, unknown>[];
21
+ clientInterceptors?: Interceptor<{
22
+ request: StandardRequest;
23
+ }, StandardLazyResponse, unknown>[];
24
+ plugins?: ClientPlugin<T>[];
25
+ }
26
+ declare class StandardLink<T extends ClientContext> implements ClientLink<T> {
27
+ #private;
28
+ readonly codec: StandardLinkCodec<T>;
29
+ readonly sender: StandardLinkClient<T>;
30
+ private readonly interceptors;
31
+ private readonly clientInterceptors;
32
+ constructor(codec: StandardLinkCodec<T>, sender: StandardLinkClient<T>, options?: StandardLinkOptions<T>);
33
+ call(path: readonly string[], input: unknown, options: ClientOptionsOut<T>): Promise<unknown>;
34
+ }
35
+
36
+ interface ClientPlugin<T extends ClientContext> {
37
+ init?(options: StandardLinkOptions<T>): void;
38
+ }
39
+ declare class CompositeClientPlugin<T extends ClientContext> implements ClientPlugin<T> {
40
+ private readonly plugins;
41
+ constructor(plugins?: ClientPlugin<T>[]);
42
+ init(options: StandardLinkOptions<T>): void;
43
+ }
44
+
45
+ export { type ClientPlugin as C, InvalidEventIteratorRetryResponse as I, type StandardLinkOptions as S, CompositeClientPlugin as a, type StandardLinkClient as b, type StandardLinkCodec as c, StandardLink as d };
@@ -0,0 +1,45 @@
1
+ import { Interceptor } from '@orpc/shared';
2
+ import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
3
+ import { a as ClientContext, C as ClientOptionsOut, b as ClientLink } from './client.CupM8eRP.js';
4
+
5
+ interface StandardLinkCodec<T extends ClientContext> {
6
+ encode(path: readonly string[], input: unknown, options: ClientOptionsOut<any>): Promise<StandardRequest>;
7
+ decode(response: StandardLazyResponse, options: ClientOptionsOut<T>, path: readonly string[], input: unknown): Promise<unknown>;
8
+ }
9
+ interface StandardLinkClient<T extends ClientContext> {
10
+ call(request: StandardRequest, options: ClientOptionsOut<T>, path: readonly string[], input: unknown): Promise<StandardLazyResponse>;
11
+ }
12
+
13
+ declare class InvalidEventIteratorRetryResponse extends Error {
14
+ }
15
+ interface StandardLinkOptions<T extends ClientContext> {
16
+ interceptors?: Interceptor<{
17
+ path: readonly string[];
18
+ input: unknown;
19
+ options: ClientOptionsOut<T>;
20
+ }, unknown, unknown>[];
21
+ clientInterceptors?: Interceptor<{
22
+ request: StandardRequest;
23
+ }, StandardLazyResponse, unknown>[];
24
+ plugins?: ClientPlugin<T>[];
25
+ }
26
+ declare class StandardLink<T extends ClientContext> implements ClientLink<T> {
27
+ #private;
28
+ readonly codec: StandardLinkCodec<T>;
29
+ readonly sender: StandardLinkClient<T>;
30
+ private readonly interceptors;
31
+ private readonly clientInterceptors;
32
+ constructor(codec: StandardLinkCodec<T>, sender: StandardLinkClient<T>, options?: StandardLinkOptions<T>);
33
+ call(path: readonly string[], input: unknown, options: ClientOptionsOut<T>): Promise<unknown>;
34
+ }
35
+
36
+ interface ClientPlugin<T extends ClientContext> {
37
+ init?(options: StandardLinkOptions<T>): void;
38
+ }
39
+ declare class CompositeClientPlugin<T extends ClientContext> implements ClientPlugin<T> {
40
+ private readonly plugins;
41
+ constructor(plugins?: ClientPlugin<T>[]);
42
+ init(options: StandardLinkOptions<T>): void;
43
+ }
44
+
45
+ export { type ClientPlugin as C, InvalidEventIteratorRetryResponse as I, type StandardLinkOptions as S, CompositeClientPlugin as a, type StandardLinkClient as b, type StandardLinkCodec as c, StandardLink as d };
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.df024bb",
4
+ "version": "0.0.0-next.e563486",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -19,6 +19,11 @@
19
19
  "import": "./dist/index.mjs",
20
20
  "default": "./dist/index.mjs"
21
21
  },
22
+ "./plugins": {
23
+ "types": "./dist/plugins/index.d.mts",
24
+ "import": "./dist/plugins/index.mjs",
25
+ "default": "./dist/plugins/index.mjs"
26
+ },
22
27
  "./standard": {
23
28
  "types": "./dist/adapters/standard/index.d.mts",
24
29
  "import": "./dist/adapters/standard/index.mjs",
@@ -34,12 +39,12 @@
34
39
  "dist"
35
40
  ],
36
41
  "dependencies": {
37
- "@orpc/shared": "0.0.0-next.df024bb",
38
- "@orpc/standard-server": "0.0.0-next.df024bb",
39
- "@orpc/standard-server-fetch": "0.0.0-next.df024bb"
42
+ "@orpc/shared": "0.0.0-next.e563486",
43
+ "@orpc/standard-server": "0.0.0-next.e563486",
44
+ "@orpc/standard-server-fetch": "0.0.0-next.e563486"
40
45
  },
41
46
  "devDependencies": {
42
- "zod": "^3.24.1"
47
+ "zod": "^3.24.2"
43
48
  },
44
49
  "scripts": {
45
50
  "build": "unbuild",