@orpc/hey-api 0.0.0-next.e565b64 → 0.0.0-next.e7896e2

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 CHANGED
@@ -49,14 +49,12 @@ You can find the full documentation [here](https://orpc.unnoq.com).
49
49
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
50
50
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
51
51
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
52
- - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with NestJS.
52
+ - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
53
+ - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
53
54
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
54
- - [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
55
- - [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
56
- - [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
57
- - [@orpc/svelte-query](https://www.npmjs.com/package/@orpc/svelte-query): Integration with [Svelte Query](https://tanstack.com/query/latest/docs/framework/svelte/overview).
55
+ - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
58
56
  - [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
59
- - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
57
+ - [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
60
58
  - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
61
59
  - [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot): OpenAPI spec generation from [Valibot](https://valibot.dev/).
62
60
  - [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype): OpenAPI spec generation from [ArkType](https://arktype.io/).
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) => RequestResult<infer UOutput, any, any> ? Client<Record<never, never>, UInput, {
6
- body: Exclude<UOutput, undefined>;
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) => RequestResult<infer UOutput, any, any> ? Client<Record<never, never>, UInput, {
6
- body: Exclude<UOutput, undefined>;
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": "0.0.0-next.e565b64",
4
+ "version": "0.0.0-next.e7896e2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -24,16 +24,13 @@
24
24
  "files": [
25
25
  "dist"
26
26
  ],
27
- "peerDependencies": {
28
- "@hey-api/client-fetch": "*"
29
- },
30
27
  "dependencies": {
31
- "@orpc/client": "0.0.0-next.e565b64",
32
- "@orpc/shared": "0.0.0-next.e565b64"
28
+ "@orpc/client": "0.0.0-next.e7896e2",
29
+ "@orpc/shared": "0.0.0-next.e7896e2"
33
30
  },
34
31
  "devDependencies": {
35
- "@hey-api/client-fetch": "^0.10.1",
36
- "@hey-api/openapi-ts": "^0.67.6"
32
+ "@hey-api/client-fetch": "^0.12.0",
33
+ "@hey-api/openapi-ts": "^0.70.0"
37
34
  },
38
35
  "scripts": {
39
36
  "build": "unbuild",