@orpc/hey-api 0.0.0 → 1.4.1
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/index.d.mts +9 -3
- package/dist/index.d.ts +9 -3
- package/package.json +7 -9
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { RequestResult } from '@hey-api/client-fetch';
|
|
2
1
|
import { Client, ThrowableError } from '@orpc/client';
|
|
3
2
|
|
|
4
3
|
type experimental_ToORPCClientResult<T extends Record<string, any>> = {
|
|
5
|
-
[K in keyof T]: T[K] extends (options: infer UInput extends Record<any, any> | undefined) =>
|
|
6
|
-
body:
|
|
4
|
+
[K in keyof T]: T[K] extends (options: infer UInput extends Record<any, any> | undefined) => Promise<infer UResult> ? Client<Record<never, never>, UInput, {
|
|
5
|
+
body: UResult extends {
|
|
6
|
+
data: infer USuccess;
|
|
7
|
+
} ? Exclude<USuccess, undefined> : never;
|
|
7
8
|
request: Request;
|
|
8
9
|
response: Response;
|
|
9
10
|
}, ThrowableError> : never;
|
|
10
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Convert a Hey API SDK to an oRPC client.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/hey-api Hey API Docs}
|
|
16
|
+
*/
|
|
11
17
|
declare function experimental_toORPCClient<T extends Record<string, any>>(sdk: T): experimental_ToORPCClientResult<T>;
|
|
12
18
|
|
|
13
19
|
export { experimental_toORPCClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { RequestResult } from '@hey-api/client-fetch';
|
|
2
1
|
import { Client, ThrowableError } from '@orpc/client';
|
|
3
2
|
|
|
4
3
|
type experimental_ToORPCClientResult<T extends Record<string, any>> = {
|
|
5
|
-
[K in keyof T]: T[K] extends (options: infer UInput extends Record<any, any> | undefined) =>
|
|
6
|
-
body:
|
|
4
|
+
[K in keyof T]: T[K] extends (options: infer UInput extends Record<any, any> | undefined) => Promise<infer UResult> ? Client<Record<never, never>, UInput, {
|
|
5
|
+
body: UResult extends {
|
|
6
|
+
data: infer USuccess;
|
|
7
|
+
} ? Exclude<USuccess, undefined> : never;
|
|
7
8
|
request: Request;
|
|
8
9
|
response: Response;
|
|
9
10
|
}, ThrowableError> : never;
|
|
10
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Convert a Hey API SDK to an oRPC client.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/hey-api Hey API Docs}
|
|
16
|
+
*/
|
|
11
17
|
declare function experimental_toORPCClient<T extends Record<string, any>>(sdk: T): experimental_ToORPCClientResult<T>;
|
|
12
18
|
|
|
13
19
|
export { experimental_toORPCClient };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/hey-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"unnoq",
|
|
14
|
-
"orpc"
|
|
14
|
+
"orpc",
|
|
15
|
+
"Hey API"
|
|
15
16
|
],
|
|
16
17
|
"exports": {
|
|
17
18
|
".": {
|
|
@@ -23,16 +24,13 @@
|
|
|
23
24
|
"files": [
|
|
24
25
|
"dist"
|
|
25
26
|
],
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"@hey-api/client-fetch": "*"
|
|
28
|
-
},
|
|
29
27
|
"dependencies": {
|
|
30
|
-
"@orpc/client": "1.
|
|
31
|
-
"@orpc/shared": "1.
|
|
28
|
+
"@orpc/client": "1.4.1",
|
|
29
|
+
"@orpc/shared": "1.4.1"
|
|
32
30
|
},
|
|
33
31
|
"devDependencies": {
|
|
34
|
-
"@hey-api/client-fetch": "^0.
|
|
35
|
-
"@hey-api/openapi-ts": "^0.
|
|
32
|
+
"@hey-api/client-fetch": "^0.11.0",
|
|
33
|
+
"@hey-api/openapi-ts": "^0.69.2"
|
|
36
34
|
},
|
|
37
35
|
"scripts": {
|
|
38
36
|
"build": "unbuild",
|