@orpc/openapi-client 0.0.0-next.eae6003 → 0.0.0-next.eaec0b2

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
@@ -1,22 +1,25 @@
1
1
  <div align="center">
2
- <image align="center" src="https://orpc.unnoq.com/logo.webp" width=280 alt="oRPC logo" />
2
+ <image align="center" src="https://orpc.dev/logo.webp" width=280 alt="oRPC logo" />
3
3
  </div>
4
4
 
5
5
  <h1></h1>
6
6
 
7
7
  <div align="center">
8
- <a href="https://codecov.io/gh/unnoq/orpc">
9
- <img alt="codecov" src="https://codecov.io/gh/unnoq/orpc/branch/main/graph/badge.svg">
8
+ <a href="https://codecov.io/gh/middleapi/orpc">
9
+ <img alt="codecov" src="https://codecov.io/gh/middleapi/orpc/branch/main/graph/badge.svg">
10
10
  </a>
11
11
  <a href="https://www.npmjs.com/package/@orpc/openapi-client">
12
12
  <img alt="weekly downloads" src="https://img.shields.io/npm/dw/%40orpc%2Fopenapi-client?logo=npm" />
13
13
  </a>
14
- <a href="https://github.com/unnoq/orpc/blob/main/LICENSE">
15
- <img alt="MIT License" src="https://img.shields.io/github/license/unnoq/orpc?logo=open-source-initiative" />
14
+ <a href="https://github.com/middleapi/orpc/blob/main/LICENSE">
15
+ <img alt="MIT License" src="https://img.shields.io/github/license/middleapi/orpc?logo=open-source-initiative" />
16
16
  </a>
17
17
  <a href="https://discord.gg/TXEbwRBvQn">
18
18
  <img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" />
19
19
  </a>
20
+ <a href="https://deepwiki.com/middleapi/orpc">
21
+ <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
22
+ </a>
20
23
  </div>
21
24
 
22
25
  <h3 align="center">Typesafe APIs Made Simple 🪄</h3>
@@ -30,7 +33,8 @@
30
33
  - **🔗 End-to-End Type Safety**: Ensure type-safe inputs, outputs, and errors from client to server.
31
34
  - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
35
  - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
- - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
36
+ - **🔍 First-Class OpenTelemetry**: Seamlessly integrate with OpenTelemetry for observability.
37
+ - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), SWR, Pinia Colada, and more.
34
38
  - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
35
39
  - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
36
40
  - **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
@@ -38,25 +42,24 @@
38
42
  - **📡 SSE & Streaming**: Enjoy full type-safe support for SSE and streaming.
39
43
  - **🌍 Multi-Runtime Support**: Fast and lightweight on Cloudflare, Deno, Bun, Node.js, and beyond.
40
44
  - **🔌 Extendability**: Easily extend functionality with plugins, middleware, and interceptors.
41
- - **🛡️ Reliability**: Well-tested, TypeScript-based, production-ready, and MIT licensed.
42
45
 
43
46
  ## Documentation
44
47
 
45
- You can find the full documentation [here](https://orpc.unnoq.com).
48
+ You can find the full documentation [here](https://orpc.dev).
46
49
 
47
50
  ## Packages
48
51
 
49
52
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
50
53
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
51
54
  - [@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.
55
+ - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
56
+ - [@orpc/otel](https://www.npmjs.com/package/@orpc/otel): [OpenTelemetry](https://opentelemetry.io/) integration for observability.
57
+ - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
53
58
  - [@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).
59
+ - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
60
+ - [@orpc/experimental-react-swr](https://www.npmjs.com/package/@orpc/experimental-react-swr): [SWR](https://swr.vercel.app/) integration.
58
61
  - [@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.
62
+ - [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
60
63
  - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
61
64
  - [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot): OpenAPI spec generation from [Valibot](https://valibot.dev/).
62
65
  - [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype): OpenAPI spec generation from [ArkType](https://arktype.io/).
@@ -75,4 +78,4 @@ Provides core serializer for OpenAPI requests and responses.
75
78
 
76
79
  ## License
77
80
 
78
- Distributed under the MIT License. See [LICENSE](https://github.com/unnoq/orpc/blob/main/LICENSE) for more information.
81
+ Distributed under the MIT License. See [LICENSE](https://github.com/middleapi/orpc/blob/main/LICENSE) for more information.
@@ -1,17 +1,17 @@
1
1
  import { ClientContext } from '@orpc/client';
2
2
  import { LinkFetchClientOptions } from '@orpc/client/fetch';
3
3
  import { AnyContractRouter } from '@orpc/contract';
4
- import { f as StandardOpenAPILinkOptions, g as StandardOpenAPILink } from '../../shared/openapi-client.D_hC2pAM.mjs';
4
+ import { g as StandardOpenAPILinkOptions, h as StandardOpenAPILink } from '../../shared/openapi-client.Dx4REA6z.mjs';
5
5
  import '@orpc/client/standard';
6
6
  import '@orpc/shared';
7
7
  import '@orpc/standard-server';
8
8
 
9
- interface OpenAPILinkOptions<T extends ClientContext> extends StandardOpenAPILinkOptions<T>, LinkFetchClientOptions<T> {
9
+ interface OpenAPILinkOptions<T extends ClientContext> extends LinkFetchClientOptions<T>, Omit<StandardOpenAPILinkOptions<T>, 'plugins'> {
10
10
  }
11
11
  /**
12
12
  * The OpenAPI Link for fetch runtime communicates with the server that follow the OpenAPI specification.
13
13
  *
14
- * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
14
+ * @see {@link https://orpc.dev/docs/openapi/client/openapi-link OpenAPI Link Docs}
15
15
  * @see {@link https://swagger.io/specification/ OpenAPI Specification}
16
16
  */
17
17
  declare class OpenAPILink<T extends ClientContext> extends StandardOpenAPILink<T> {
@@ -1,17 +1,17 @@
1
1
  import { ClientContext } from '@orpc/client';
2
2
  import { LinkFetchClientOptions } from '@orpc/client/fetch';
3
3
  import { AnyContractRouter } from '@orpc/contract';
4
- import { f as StandardOpenAPILinkOptions, g as StandardOpenAPILink } from '../../shared/openapi-client.D_hC2pAM.js';
4
+ import { g as StandardOpenAPILinkOptions, h as StandardOpenAPILink } from '../../shared/openapi-client.Dx4REA6z.js';
5
5
  import '@orpc/client/standard';
6
6
  import '@orpc/shared';
7
7
  import '@orpc/standard-server';
8
8
 
9
- interface OpenAPILinkOptions<T extends ClientContext> extends StandardOpenAPILinkOptions<T>, LinkFetchClientOptions<T> {
9
+ interface OpenAPILinkOptions<T extends ClientContext> extends LinkFetchClientOptions<T>, Omit<StandardOpenAPILinkOptions<T>, 'plugins'> {
10
10
  }
11
11
  /**
12
12
  * The OpenAPI Link for fetch runtime communicates with the server that follow the OpenAPI specification.
13
13
  *
14
- * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
14
+ * @see {@link https://orpc.dev/docs/openapi/client/openapi-link OpenAPI Link Docs}
15
15
  * @see {@link https://swagger.io/specification/ OpenAPI Specification}
16
16
  */
17
17
  declare class OpenAPILink<T extends ClientContext> extends StandardOpenAPILink<T> {
@@ -1,10 +1,11 @@
1
1
  import { LinkFetchClient } from '@orpc/client/fetch';
2
2
  import '@orpc/shared';
3
- import { b as StandardOpenAPILink } from '../../shared/openapi-client.BwEwVdZl.mjs';
3
+ import '@orpc/contract';
4
+ import { a as StandardOpenAPILink } from '../../shared/openapi-client.B2Q9qU5m.mjs';
4
5
  import '@orpc/client';
5
6
  import '@orpc/client/standard';
6
- import '@orpc/contract';
7
7
  import '@orpc/standard-server';
8
+ import '../../shared/openapi-client.t9fCAe3x.mjs';
8
9
 
9
10
  class OpenAPILink extends StandardOpenAPILink {
10
11
  constructor(contract, options) {
@@ -1,4 +1,5 @@
1
- export { S as StandardBracketNotationSerialized, a as StandardBracketNotationSerializer, c as StandardOpenAPICustomJsonSerializer, b as StandardOpenAPIJsonSerialized, e as StandardOpenAPIJsonSerializer, d as StandardOpenAPIJsonSerializerOptions, g as StandardOpenAPILink, f as StandardOpenAPILinkOptions, j as StandardOpenAPISerializeOptions, k as StandardOpenAPISerializer, i as StandardOpenapiLinkCodec, h as StandardOpenapiLinkCodecOptions } from '../../shared/openapi-client.D_hC2pAM.mjs';
1
+ export { S as StandardBracketNotationSerialized, b as StandardBracketNotationSerializer, a as StandardBracketNotationSerializerOptions, d as StandardOpenAPICustomJsonSerializer, c as StandardOpenAPIJsonSerialized, f as StandardOpenAPIJsonSerializer, e as StandardOpenAPIJsonSerializerOptions, h as StandardOpenAPILink, g as StandardOpenAPILinkOptions, k as StandardOpenAPISerializeOptions, l as StandardOpenAPISerializer, j as StandardOpenapiLinkCodec, i as StandardOpenapiLinkCodecOptions } from '../../shared/openapi-client.Dx4REA6z.mjs';
2
+ export { getIssueMessage, parseFormData } from '../../helpers/index.mjs';
2
3
  import { HTTPPath } from '@orpc/client';
3
4
  import '@orpc/client/standard';
4
5
  import '@orpc/contract';
@@ -1,4 +1,5 @@
1
- export { S as StandardBracketNotationSerialized, a as StandardBracketNotationSerializer, c as StandardOpenAPICustomJsonSerializer, b as StandardOpenAPIJsonSerialized, e as StandardOpenAPIJsonSerializer, d as StandardOpenAPIJsonSerializerOptions, g as StandardOpenAPILink, f as StandardOpenAPILinkOptions, j as StandardOpenAPISerializeOptions, k as StandardOpenAPISerializer, i as StandardOpenapiLinkCodec, h as StandardOpenapiLinkCodecOptions } from '../../shared/openapi-client.D_hC2pAM.js';
1
+ export { S as StandardBracketNotationSerialized, b as StandardBracketNotationSerializer, a as StandardBracketNotationSerializerOptions, d as StandardOpenAPICustomJsonSerializer, c as StandardOpenAPIJsonSerialized, f as StandardOpenAPIJsonSerializer, e as StandardOpenAPIJsonSerializerOptions, h as StandardOpenAPILink, g as StandardOpenAPILinkOptions, k as StandardOpenAPISerializeOptions, l as StandardOpenAPISerializer, j as StandardOpenapiLinkCodec, i as StandardOpenapiLinkCodecOptions } from '../../shared/openapi-client.Dx4REA6z.js';
2
+ export { getIssueMessage, parseFormData } from '../../helpers/index.js';
2
3
  import { HTTPPath } from '@orpc/client';
3
4
  import '@orpc/client/standard';
4
5
  import '@orpc/contract';
@@ -1,6 +1,8 @@
1
- export { S as StandardBracketNotationSerializer, a as StandardOpenAPIJsonSerializer, b as StandardOpenAPILink, d as StandardOpenAPISerializer, c as StandardOpenapiLinkCodec, g as getDynamicParams, s as standardizeHTTPPath } from '../../shared/openapi-client.BwEwVdZl.mjs';
2
- import '@orpc/client/standard';
1
+ export { S as StandardBracketNotationSerializer } from '../../shared/openapi-client.t9fCAe3x.mjs';
2
+ export { g as getIssueMessage, p as parseFormData } from '../../shared/openapi-client.Dgl8z2tb.mjs';
3
+ export { S as StandardOpenAPIJsonSerializer, a as StandardOpenAPILink, c as StandardOpenAPISerializer, b as StandardOpenapiLinkCodec, g as getDynamicParams, s as standardizeHTTPPath } from '../../shared/openapi-client.B2Q9qU5m.mjs';
3
4
  import '@orpc/shared';
4
- import '@orpc/client';
5
5
  import '@orpc/contract';
6
+ import '@orpc/client/standard';
7
+ import '@orpc/client';
6
8
  import '@orpc/standard-server';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * parse a form data with bracket notation
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * const form = new FormData()
7
+ * form.append('a', '1')
8
+ * form.append('user[name]', 'John')
9
+ * form.append('user[age]', '20')
10
+ * form.append('user[friends][]', 'Bob')
11
+ * form.append('user[friends][]', 'Alice')
12
+ * form.append('user[friends][]', 'Charlie')
13
+ * form.append('thumb', new Blob(['hello']), 'thumb.png')
14
+ *
15
+ * parseFormData(form)
16
+ * // {
17
+ * // a: '1',
18
+ * // user: {
19
+ * // name: 'John',
20
+ * // age: '20',
21
+ * // friends: ['Bob', 'Alice', 'Charlie'],
22
+ * // },
23
+ * // thumb: form.get('thumb'),
24
+ * // }
25
+ * ```
26
+ *
27
+ * @see {@link https://orpc.dev/docs/openapi/bracket-notation Bracket Notation Docs}
28
+ */
29
+ declare function parseFormData(form: FormData): any;
30
+ /**
31
+ * Get the issue message from the error.
32
+ *
33
+ * @param error - The error (can be anything) can contain `data.issues` (standard schema issues)
34
+ * @param path - The path of the field that has the issue follow [bracket notation](https://orpc.dev/docs/openapi/bracket-notation)
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * const { error, data, execute } = useServerAction(someAction)
39
+ *
40
+ * return <form action={(form) => execute(parseFormData(form))}>
41
+ * <input name="user[name]" type="text" />
42
+ * <p>{getIssueMessage(error, 'user[name]')}</p>
43
+ *
44
+ * <input name="user[age]" type="number" />
45
+ * <p>{getIssueMessage(error, 'user[age]')}</p>
46
+ *
47
+ * <input name="images[]" type="file" />
48
+ * <p>{getIssueMessage(error, 'images[]')}</p>
49
+ * </form>
50
+ *
51
+ */
52
+ declare function getIssueMessage(error: unknown, path: string): string | undefined;
53
+
54
+ export { getIssueMessage, parseFormData };
@@ -0,0 +1,54 @@
1
+ /**
2
+ * parse a form data with bracket notation
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * const form = new FormData()
7
+ * form.append('a', '1')
8
+ * form.append('user[name]', 'John')
9
+ * form.append('user[age]', '20')
10
+ * form.append('user[friends][]', 'Bob')
11
+ * form.append('user[friends][]', 'Alice')
12
+ * form.append('user[friends][]', 'Charlie')
13
+ * form.append('thumb', new Blob(['hello']), 'thumb.png')
14
+ *
15
+ * parseFormData(form)
16
+ * // {
17
+ * // a: '1',
18
+ * // user: {
19
+ * // name: 'John',
20
+ * // age: '20',
21
+ * // friends: ['Bob', 'Alice', 'Charlie'],
22
+ * // },
23
+ * // thumb: form.get('thumb'),
24
+ * // }
25
+ * ```
26
+ *
27
+ * @see {@link https://orpc.dev/docs/openapi/bracket-notation Bracket Notation Docs}
28
+ */
29
+ declare function parseFormData(form: FormData): any;
30
+ /**
31
+ * Get the issue message from the error.
32
+ *
33
+ * @param error - The error (can be anything) can contain `data.issues` (standard schema issues)
34
+ * @param path - The path of the field that has the issue follow [bracket notation](https://orpc.dev/docs/openapi/bracket-notation)
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * const { error, data, execute } = useServerAction(someAction)
39
+ *
40
+ * return <form action={(form) => execute(parseFormData(form))}>
41
+ * <input name="user[name]" type="text" />
42
+ * <p>{getIssueMessage(error, 'user[name]')}</p>
43
+ *
44
+ * <input name="user[age]" type="number" />
45
+ * <p>{getIssueMessage(error, 'user[age]')}</p>
46
+ *
47
+ * <input name="images[]" type="file" />
48
+ * <p>{getIssueMessage(error, 'images[]')}</p>
49
+ * </form>
50
+ *
51
+ */
52
+ declare function getIssueMessage(error: unknown, path: string): string | undefined;
53
+
54
+ export { getIssueMessage, parseFormData };
@@ -0,0 +1,7 @@
1
+ import '@orpc/shared';
2
+ export { g as getIssueMessage, p as parseFormData } from '../shared/openapi-client.Dgl8z2tb.mjs';
3
+ import '@orpc/client/standard';
4
+ import '@orpc/client';
5
+ import '@orpc/contract';
6
+ import '@orpc/standard-server';
7
+ import '../shared/openapi-client.t9fCAe3x.mjs';
package/dist/index.d.mts CHANGED
@@ -7,7 +7,7 @@ type JsonifiedArray<T extends Array<unknown>> = T extends readonly [] ? [] : T e
7
7
  /**
8
8
  * Convert types that JSON not support to corresponding json types
9
9
  *
10
- * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
10
+ * @see {@link https://orpc.dev/docs/openapi/client/openapi-link OpenAPI Link Docs}
11
11
  */
12
12
  type JsonifiedClient<T extends NestedClient<any>> = T extends Client<infer UClientContext, infer UInput, infer UOutput, infer UError> ? Client<UClientContext, UInput, JsonifiedValue<UOutput>, UError extends ORPCError<infer UCode, infer UData> ? ORPCError<UCode, JsonifiedValue<UData>> : UError> : {
13
13
  [K in keyof T]: T[K] extends NestedClient<any> ? JsonifiedClient<T[K]> : T[K];
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ type JsonifiedArray<T extends Array<unknown>> = T extends readonly [] ? [] : T e
7
7
  /**
8
8
  * Convert types that JSON not support to corresponding json types
9
9
  *
10
- * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
10
+ * @see {@link https://orpc.dev/docs/openapi/client/openapi-link OpenAPI Link Docs}
11
11
  */
12
12
  type JsonifiedClient<T extends NestedClient<any>> = T extends Client<infer UClientContext, infer UInput, infer UOutput, infer UError> ? Client<UClientContext, UInput, JsonifiedValue<UOutput>, UError extends ORPCError<infer UCode, infer UData> ? ORPCError<UCode, JsonifiedValue<UData>> : UError> : {
13
13
  [K in keyof T]: T[K] extends NestedClient<any> ? JsonifiedClient<T[K]> : T[K];
@@ -1,128 +1,10 @@
1
- import { toHttpPath, getMalformedResponseErrorCode, StandardLink } from '@orpc/client/standard';
1
+ import { toStandardHeaders, toHttpPath, getMalformedResponseErrorCode, StandardLink } from '@orpc/client/standard';
2
+ import { S as StandardBracketNotationSerializer } from './openapi-client.t9fCAe3x.mjs';
2
3
  import { isObject, value, get, isAsyncIteratorObject } from '@orpc/shared';
3
4
  import { isORPCErrorStatus, isORPCErrorJson, createORPCErrorFromJson, mapEventIterator, toORPCError } from '@orpc/client';
4
5
  import { isContractProcedure, fallbackContractConfig, ORPCError } from '@orpc/contract';
5
6
  import { mergeStandardHeaders, ErrorEvent } from '@orpc/standard-server';
6
7
 
7
- class StandardBracketNotationSerializer {
8
- serialize(data, segments = [], result = []) {
9
- if (Array.isArray(data)) {
10
- data.forEach((item, i) => {
11
- this.serialize(item, [...segments, i], result);
12
- });
13
- } else if (isObject(data)) {
14
- for (const key in data) {
15
- this.serialize(data[key], [...segments, key], result);
16
- }
17
- } else {
18
- result.push([this.stringifyPath(segments), data]);
19
- }
20
- return result;
21
- }
22
- deserialize(serialized) {
23
- if (serialized.length === 0) {
24
- return {};
25
- }
26
- const arrayPushStyles = /* @__PURE__ */ new WeakSet();
27
- const ref = { value: [] };
28
- for (const [path, value] of serialized) {
29
- const segments = this.parsePath(path);
30
- let currentRef = ref;
31
- let nextSegment = "value";
32
- segments.forEach((segment, i) => {
33
- if (!Array.isArray(currentRef[nextSegment]) && !isObject(currentRef[nextSegment])) {
34
- currentRef[nextSegment] = [];
35
- }
36
- if (i !== segments.length - 1) {
37
- if (Array.isArray(currentRef[nextSegment]) && !isValidArrayIndex(segment)) {
38
- currentRef[nextSegment] = { ...currentRef[nextSegment] };
39
- }
40
- } else {
41
- if (Array.isArray(currentRef[nextSegment])) {
42
- if (segment === "") {
43
- if (currentRef[nextSegment].length && !arrayPushStyles.has(currentRef[nextSegment])) {
44
- currentRef[nextSegment] = { ...currentRef[nextSegment] };
45
- }
46
- } else {
47
- if (arrayPushStyles.has(currentRef[nextSegment])) {
48
- currentRef[nextSegment] = { "": currentRef[nextSegment].at(-1) };
49
- } else if (!isValidArrayIndex(segment)) {
50
- currentRef[nextSegment] = { ...currentRef[nextSegment] };
51
- }
52
- }
53
- }
54
- }
55
- currentRef = currentRef[nextSegment];
56
- nextSegment = segment;
57
- });
58
- if (Array.isArray(currentRef)) {
59
- if (nextSegment === "") {
60
- arrayPushStyles.add(currentRef);
61
- currentRef.push(value);
62
- } else {
63
- currentRef[Number(nextSegment)] = value;
64
- }
65
- } else {
66
- currentRef[nextSegment] = value;
67
- }
68
- }
69
- return ref.value;
70
- }
71
- stringifyPath(segments) {
72
- return segments.map((segment) => {
73
- return segment.toString().replace(/[\\[\]]/g, (match) => {
74
- switch (match) {
75
- case "\\":
76
- return "\\\\";
77
- case "[":
78
- return "\\[";
79
- case "]":
80
- return "\\]";
81
- /* v8 ignore next 2 */
82
- default:
83
- return match;
84
- }
85
- });
86
- }).reduce((result, segment, i) => {
87
- if (i === 0) {
88
- return segment;
89
- }
90
- return `${result}[${segment}]`;
91
- }, "");
92
- }
93
- parsePath(path) {
94
- const segments = [];
95
- let inBrackets = false;
96
- let currentSegment = "";
97
- let backslashCount = 0;
98
- for (let i = 0; i < path.length; i++) {
99
- const char = path[i];
100
- const nextChar = path[i + 1];
101
- if (inBrackets && char === "]" && (nextChar === void 0 || nextChar === "[") && backslashCount % 2 === 0) {
102
- if (nextChar === void 0) {
103
- inBrackets = false;
104
- }
105
- segments.push(currentSegment);
106
- currentSegment = "";
107
- i++;
108
- } else if (segments.length === 0 && char === "[" && backslashCount % 2 === 0) {
109
- inBrackets = true;
110
- segments.push(currentSegment);
111
- currentSegment = "";
112
- } else if (char === "\\") {
113
- backslashCount++;
114
- } else {
115
- currentSegment += "\\".repeat(backslashCount / 2) + char;
116
- backslashCount = 0;
117
- }
118
- }
119
- return inBrackets || segments.length === 0 ? [path] : segments;
120
- }
121
- }
122
- function isValidArrayIndex(value) {
123
- return /^0$|^[1-9]\d*$/.test(value);
124
- }
125
-
126
8
  class StandardOpenAPIJsonSerializer {
127
9
  customSerializers;
128
10
  constructor(options = {}) {
@@ -188,15 +70,17 @@ class StandardOpenapiLinkCodec {
188
70
  this.serializer = serializer;
189
71
  this.baseUrl = options.url;
190
72
  this.headers = options.headers ?? {};
73
+ this.customErrorResponseBodyDecoder = options.customErrorResponseBodyDecoder;
191
74
  }
192
75
  baseUrl;
193
76
  headers;
77
+ customErrorResponseBodyDecoder;
194
78
  async encode(path, input, options) {
195
- const baseUrl = await value(this.baseUrl, options, path, input);
196
- let headers = await value(this.headers, options, path, input);
79
+ let headers = toStandardHeaders(await value(this.headers, options, path, input));
197
80
  if (options.lastEventId !== void 0) {
198
81
  headers = mergeStandardHeaders(headers, { "last-event-id": options.lastEventId });
199
82
  }
83
+ const baseUrl = await value(this.baseUrl, options, path, input);
200
84
  const procedure = get(this.contract, path);
201
85
  if (!isContractProcedure(procedure)) {
202
86
  throw new Error(`[StandardOpenapiLinkCodec] expect a contract procedure at ${path.join(".")}`);
@@ -312,6 +196,10 @@ class StandardOpenapiLinkCodec {
312
196
  }
313
197
  })();
314
198
  if (!isOk) {
199
+ const error = this.customErrorResponseBodyDecoder?.(deserialized, response);
200
+ if (error !== null && error !== void 0) {
201
+ throw error;
202
+ }
315
203
  if (isORPCErrorJson(deserialized)) {
316
204
  throw createORPCErrorFromJson(deserialized);
317
205
  }
@@ -404,11 +292,11 @@ class StandardOpenAPISerializer {
404
292
  class StandardOpenAPILink extends StandardLink {
405
293
  constructor(contract, linkClient, options) {
406
294
  const jsonSerializer = new StandardOpenAPIJsonSerializer(options);
407
- const bracketNotationSerializer = new StandardBracketNotationSerializer();
295
+ const bracketNotationSerializer = new StandardBracketNotationSerializer({ maxBracketNotationArrayIndex: 4294967294 });
408
296
  const serializer = new StandardOpenAPISerializer(jsonSerializer, bracketNotationSerializer);
409
297
  const linkCodec = new StandardOpenapiLinkCodec(contract, serializer, options);
410
298
  super(linkCodec, linkClient, options);
411
299
  }
412
300
  }
413
301
 
414
- export { StandardBracketNotationSerializer as S, StandardOpenAPIJsonSerializer as a, StandardOpenAPILink as b, StandardOpenapiLinkCodec as c, StandardOpenAPISerializer as d, getDynamicParams as g, standardizeHTTPPath as s };
302
+ export { StandardOpenAPIJsonSerializer as S, StandardOpenAPILink as a, StandardOpenapiLinkCodec as b, StandardOpenAPISerializer as c, getDynamicParams as g, standardizeHTTPPath as s };
@@ -0,0 +1,39 @@
1
+ import { isSchemaIssue } from '@orpc/contract';
2
+ import { isTypescriptObject } from '@orpc/shared';
3
+ import { S as StandardBracketNotationSerializer } from './openapi-client.t9fCAe3x.mjs';
4
+
5
+ function parseFormData(form) {
6
+ const serializer = new StandardBracketNotationSerializer();
7
+ return serializer.deserialize(Array.from(form.entries()));
8
+ }
9
+ function getIssueMessage(error, path) {
10
+ if (!isTypescriptObject(error) || !isTypescriptObject(error.data) || !Array.isArray(error.data.issues)) {
11
+ return void 0;
12
+ }
13
+ const serializer = new StandardBracketNotationSerializer();
14
+ for (const issue of error.data.issues) {
15
+ if (!isSchemaIssue(issue)) {
16
+ continue;
17
+ }
18
+ if (issue.path === void 0) {
19
+ if (path === "") {
20
+ return issue.message;
21
+ }
22
+ continue;
23
+ }
24
+ const issuePath = serializer.stringifyPath(
25
+ issue.path.map((segment) => typeof segment === "object" ? segment.key.toString() : segment.toString())
26
+ );
27
+ if (issuePath === path) {
28
+ return issue.message;
29
+ }
30
+ if (path.endsWith("[]") && issuePath.replace(/\[(?:0|[1-9]\d*)\]$/, "[]") === path) {
31
+ return issue.message;
32
+ }
33
+ if (path === "" && issuePath.match(/(?:0|[1-9]\d*)$/)) {
34
+ return issue.message;
35
+ }
36
+ }
37
+ }
38
+
39
+ export { getIssueMessage as g, parseFormData as p };
@@ -1,11 +1,29 @@
1
1
  import { ClientContext, ClientOptions } from '@orpc/client';
2
2
  import { StandardLinkCodec, StandardLinkOptions, StandardLink, StandardLinkClient } from '@orpc/client/standard';
3
- import { AnyContractRouter } from '@orpc/contract';
4
- import { Segment, Value } from '@orpc/shared';
5
- import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
3
+ import { ORPCError, AnyContractRouter } from '@orpc/contract';
4
+ import { Segment, Value, Promisable } from '@orpc/shared';
5
+ import { StandardHeaders, StandardLazyResponse, StandardRequest } from '@orpc/standard-server';
6
6
 
7
7
  type StandardBracketNotationSerialized = [string, unknown][];
8
+ interface StandardBracketNotationSerializerOptions {
9
+ /**
10
+ * Maximum allowed array index for bracket notation deserialization.
11
+ *
12
+ * This helps protect against memory exhaustion attacks where malicious input
13
+ * uses extremely large array indices (e.g., `?arr[4294967296]=value`).
14
+ *
15
+ * While bracket notation creates sparse arrays that handle large indices efficiently,
16
+ * downstream code might inadvertently convert these sparse arrays to dense arrays,
17
+ * potentially creating millions of undefined elements and causing memory issues.
18
+ *
19
+ * @note Only applies to deserialization.
20
+ * @default 9_999 (array with 10,000 elements)
21
+ */
22
+ maxBracketNotationArrayIndex?: number;
23
+ }
8
24
  declare class StandardBracketNotationSerializer {
25
+ private readonly maxArrayIndex;
26
+ constructor(options?: StandardBracketNotationSerializerOptions);
9
27
  serialize(data: unknown, segments?: Segment[], result?: StandardBracketNotationSerialized): StandardBracketNotationSerialized;
10
28
  deserialize(serialized: StandardBracketNotationSerialized): Record<string, unknown> | unknown[];
11
29
  stringifyPath(segments: readonly Segment[]): string;
@@ -44,7 +62,7 @@ interface StandardOpenapiLinkCodecOptions<T extends ClientContext> {
44
62
  /**
45
63
  * Base url for all requests.
46
64
  */
47
- url: Value<string | URL, [
65
+ url: Value<Promisable<string | URL>, [
48
66
  options: ClientOptions<T>,
49
67
  path: readonly string[],
50
68
  input: unknown
@@ -52,11 +70,20 @@ interface StandardOpenapiLinkCodecOptions<T extends ClientContext> {
52
70
  /**
53
71
  * Inject headers to the request.
54
72
  */
55
- headers?: Value<StandardHeaders, [
73
+ headers?: Value<Promisable<StandardHeaders | Headers>, [
56
74
  options: ClientOptions<T>,
57
75
  path: readonly string[],
58
76
  input: unknown
59
77
  ]>;
78
+ /**
79
+ * Customize how a response body is decoded into an ORPC error.
80
+ * Useful when the default decoder cannot fully interpret
81
+ * your server's error format.
82
+ *
83
+ * @remarks
84
+ * - Return `null | undefined` to fallback to default behavior.
85
+ */
86
+ customErrorResponseBodyDecoder?: (deserializedBody: unknown, response: StandardLazyResponse) => ORPCError<any, any> | null | undefined;
60
87
  }
61
88
  declare class StandardOpenapiLinkCodec<T extends ClientContext> implements StandardLinkCodec<T> {
62
89
  #private;
@@ -64,6 +91,7 @@ declare class StandardOpenapiLinkCodec<T extends ClientContext> implements Stand
64
91
  private readonly serializer;
65
92
  private readonly baseUrl;
66
93
  private readonly headers;
94
+ private readonly customErrorResponseBodyDecoder;
67
95
  constructor(contract: AnyContractRouter, serializer: StandardOpenAPISerializer, options: StandardOpenapiLinkCodecOptions<T>);
68
96
  encode(path: readonly string[], input: unknown, options: ClientOptions<T>): Promise<StandardRequest>;
69
97
  decode(response: StandardLazyResponse, _options: ClientOptions<T>, path: readonly string[]): Promise<unknown>;
@@ -75,5 +103,5 @@ declare class StandardOpenAPILink<T extends ClientContext> extends StandardLink<
75
103
  constructor(contract: AnyContractRouter, linkClient: StandardLinkClient<T>, options: StandardOpenAPILinkOptions<T>);
76
104
  }
77
105
 
78
- export { StandardBracketNotationSerializer as a, StandardOpenAPIJsonSerializer as e, StandardOpenAPILink as g, StandardOpenapiLinkCodec as i, StandardOpenAPISerializer as k };
79
- export type { StandardBracketNotationSerialized as S, StandardOpenAPIJsonSerialized as b, StandardOpenAPICustomJsonSerializer as c, StandardOpenAPIJsonSerializerOptions as d, StandardOpenAPILinkOptions as f, StandardOpenapiLinkCodecOptions as h, StandardOpenAPISerializeOptions as j };
106
+ export { StandardBracketNotationSerializer as b, StandardOpenAPIJsonSerializer as f, StandardOpenAPILink as h, StandardOpenapiLinkCodec as j, StandardOpenAPISerializer as l };
107
+ export type { StandardBracketNotationSerialized as S, StandardBracketNotationSerializerOptions as a, StandardOpenAPIJsonSerialized as c, StandardOpenAPICustomJsonSerializer as d, StandardOpenAPIJsonSerializerOptions as e, StandardOpenAPILinkOptions as g, StandardOpenapiLinkCodecOptions as i, StandardOpenAPISerializeOptions as k };
@@ -1,11 +1,29 @@
1
1
  import { ClientContext, ClientOptions } from '@orpc/client';
2
2
  import { StandardLinkCodec, StandardLinkOptions, StandardLink, StandardLinkClient } from '@orpc/client/standard';
3
- import { AnyContractRouter } from '@orpc/contract';
4
- import { Segment, Value } from '@orpc/shared';
5
- import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
3
+ import { ORPCError, AnyContractRouter } from '@orpc/contract';
4
+ import { Segment, Value, Promisable } from '@orpc/shared';
5
+ import { StandardHeaders, StandardLazyResponse, StandardRequest } from '@orpc/standard-server';
6
6
 
7
7
  type StandardBracketNotationSerialized = [string, unknown][];
8
+ interface StandardBracketNotationSerializerOptions {
9
+ /**
10
+ * Maximum allowed array index for bracket notation deserialization.
11
+ *
12
+ * This helps protect against memory exhaustion attacks where malicious input
13
+ * uses extremely large array indices (e.g., `?arr[4294967296]=value`).
14
+ *
15
+ * While bracket notation creates sparse arrays that handle large indices efficiently,
16
+ * downstream code might inadvertently convert these sparse arrays to dense arrays,
17
+ * potentially creating millions of undefined elements and causing memory issues.
18
+ *
19
+ * @note Only applies to deserialization.
20
+ * @default 9_999 (array with 10,000 elements)
21
+ */
22
+ maxBracketNotationArrayIndex?: number;
23
+ }
8
24
  declare class StandardBracketNotationSerializer {
25
+ private readonly maxArrayIndex;
26
+ constructor(options?: StandardBracketNotationSerializerOptions);
9
27
  serialize(data: unknown, segments?: Segment[], result?: StandardBracketNotationSerialized): StandardBracketNotationSerialized;
10
28
  deserialize(serialized: StandardBracketNotationSerialized): Record<string, unknown> | unknown[];
11
29
  stringifyPath(segments: readonly Segment[]): string;
@@ -44,7 +62,7 @@ interface StandardOpenapiLinkCodecOptions<T extends ClientContext> {
44
62
  /**
45
63
  * Base url for all requests.
46
64
  */
47
- url: Value<string | URL, [
65
+ url: Value<Promisable<string | URL>, [
48
66
  options: ClientOptions<T>,
49
67
  path: readonly string[],
50
68
  input: unknown
@@ -52,11 +70,20 @@ interface StandardOpenapiLinkCodecOptions<T extends ClientContext> {
52
70
  /**
53
71
  * Inject headers to the request.
54
72
  */
55
- headers?: Value<StandardHeaders, [
73
+ headers?: Value<Promisable<StandardHeaders | Headers>, [
56
74
  options: ClientOptions<T>,
57
75
  path: readonly string[],
58
76
  input: unknown
59
77
  ]>;
78
+ /**
79
+ * Customize how a response body is decoded into an ORPC error.
80
+ * Useful when the default decoder cannot fully interpret
81
+ * your server's error format.
82
+ *
83
+ * @remarks
84
+ * - Return `null | undefined` to fallback to default behavior.
85
+ */
86
+ customErrorResponseBodyDecoder?: (deserializedBody: unknown, response: StandardLazyResponse) => ORPCError<any, any> | null | undefined;
60
87
  }
61
88
  declare class StandardOpenapiLinkCodec<T extends ClientContext> implements StandardLinkCodec<T> {
62
89
  #private;
@@ -64,6 +91,7 @@ declare class StandardOpenapiLinkCodec<T extends ClientContext> implements Stand
64
91
  private readonly serializer;
65
92
  private readonly baseUrl;
66
93
  private readonly headers;
94
+ private readonly customErrorResponseBodyDecoder;
67
95
  constructor(contract: AnyContractRouter, serializer: StandardOpenAPISerializer, options: StandardOpenapiLinkCodecOptions<T>);
68
96
  encode(path: readonly string[], input: unknown, options: ClientOptions<T>): Promise<StandardRequest>;
69
97
  decode(response: StandardLazyResponse, _options: ClientOptions<T>, path: readonly string[]): Promise<unknown>;
@@ -75,5 +103,5 @@ declare class StandardOpenAPILink<T extends ClientContext> extends StandardLink<
75
103
  constructor(contract: AnyContractRouter, linkClient: StandardLinkClient<T>, options: StandardOpenAPILinkOptions<T>);
76
104
  }
77
105
 
78
- export { StandardBracketNotationSerializer as a, StandardOpenAPIJsonSerializer as e, StandardOpenAPILink as g, StandardOpenapiLinkCodec as i, StandardOpenAPISerializer as k };
79
- export type { StandardBracketNotationSerialized as S, StandardOpenAPIJsonSerialized as b, StandardOpenAPICustomJsonSerializer as c, StandardOpenAPIJsonSerializerOptions as d, StandardOpenAPILinkOptions as f, StandardOpenapiLinkCodecOptions as h, StandardOpenAPISerializeOptions as j };
106
+ export { StandardBracketNotationSerializer as b, StandardOpenAPIJsonSerializer as f, StandardOpenAPILink as h, StandardOpenapiLinkCodec as j, StandardOpenAPISerializer as l };
107
+ export type { StandardBracketNotationSerialized as S, StandardBracketNotationSerializerOptions as a, StandardOpenAPIJsonSerialized as c, StandardOpenAPICustomJsonSerializer as d, StandardOpenAPIJsonSerializerOptions as e, StandardOpenAPILinkOptions as g, StandardOpenapiLinkCodecOptions as i, StandardOpenAPISerializeOptions as k };
@@ -0,0 +1,146 @@
1
+ import { isObject, NullProtoObj } from '@orpc/shared';
2
+
3
+ class StandardBracketNotationSerializer {
4
+ maxArrayIndex;
5
+ constructor(options = {}) {
6
+ this.maxArrayIndex = options.maxBracketNotationArrayIndex ?? 9999;
7
+ }
8
+ serialize(data, segments = [], result = []) {
9
+ if (Array.isArray(data)) {
10
+ data.forEach((item, i) => {
11
+ this.serialize(item, [...segments, i], result);
12
+ });
13
+ } else if (isObject(data)) {
14
+ for (const key in data) {
15
+ this.serialize(data[key], [...segments, key], result);
16
+ }
17
+ } else {
18
+ result.push([this.stringifyPath(segments), data]);
19
+ }
20
+ return result;
21
+ }
22
+ deserialize(serialized) {
23
+ if (serialized.length === 0) {
24
+ return {};
25
+ }
26
+ const arrayPushStyles = /* @__PURE__ */ new WeakSet();
27
+ const ref = { value: [] };
28
+ for (const [path, value] of serialized) {
29
+ const segments = this.parsePath(path);
30
+ let currentRef = ref;
31
+ let nextSegment = "value";
32
+ segments.forEach((segment, i) => {
33
+ if (!Array.isArray(currentRef[nextSegment]) && !isObject(currentRef[nextSegment])) {
34
+ currentRef[nextSegment] = [];
35
+ }
36
+ if (i !== segments.length - 1) {
37
+ if (Array.isArray(currentRef[nextSegment]) && !isValidArrayIndex(segment, this.maxArrayIndex)) {
38
+ if (arrayPushStyles.has(currentRef[nextSegment])) {
39
+ arrayPushStyles.delete(currentRef[nextSegment]);
40
+ currentRef[nextSegment] = pushStyleArrayToObject(currentRef[nextSegment]);
41
+ } else {
42
+ currentRef[nextSegment] = arrayToObject(currentRef[nextSegment]);
43
+ }
44
+ }
45
+ } else {
46
+ if (Array.isArray(currentRef[nextSegment])) {
47
+ if (segment === "") {
48
+ if (currentRef[nextSegment].length && !arrayPushStyles.has(currentRef[nextSegment])) {
49
+ currentRef[nextSegment] = arrayToObject(currentRef[nextSegment]);
50
+ }
51
+ } else {
52
+ if (arrayPushStyles.has(currentRef[nextSegment])) {
53
+ arrayPushStyles.delete(currentRef[nextSegment]);
54
+ currentRef[nextSegment] = pushStyleArrayToObject(currentRef[nextSegment]);
55
+ } else if (!isValidArrayIndex(segment, this.maxArrayIndex)) {
56
+ currentRef[nextSegment] = arrayToObject(currentRef[nextSegment]);
57
+ }
58
+ }
59
+ }
60
+ }
61
+ currentRef = currentRef[nextSegment];
62
+ nextSegment = segment;
63
+ });
64
+ if (Array.isArray(currentRef) && nextSegment === "") {
65
+ arrayPushStyles.add(currentRef);
66
+ currentRef.push(value);
67
+ } else if (nextSegment in currentRef) {
68
+ if (Array.isArray(currentRef[nextSegment])) {
69
+ currentRef[nextSegment].push(value);
70
+ } else {
71
+ currentRef[nextSegment] = [currentRef[nextSegment], value];
72
+ }
73
+ } else {
74
+ currentRef[nextSegment] = value;
75
+ }
76
+ }
77
+ return ref.value;
78
+ }
79
+ stringifyPath(segments) {
80
+ return segments.map((segment) => {
81
+ return segment.toString().replace(/[\\[\]]/g, (match) => {
82
+ switch (match) {
83
+ case "\\":
84
+ return "\\\\";
85
+ case "[":
86
+ return "\\[";
87
+ case "]":
88
+ return "\\]";
89
+ /* v8 ignore next 2 */
90
+ default:
91
+ return match;
92
+ }
93
+ });
94
+ }).reduce((result, segment, i) => {
95
+ if (i === 0) {
96
+ return segment;
97
+ }
98
+ return `${result}[${segment}]`;
99
+ }, "");
100
+ }
101
+ parsePath(path) {
102
+ const segments = [];
103
+ let inBrackets = false;
104
+ let currentSegment = "";
105
+ let backslashCount = 0;
106
+ for (let i = 0; i < path.length; i++) {
107
+ const char = path[i];
108
+ const nextChar = path[i + 1];
109
+ if (inBrackets && char === "]" && (nextChar === void 0 || nextChar === "[") && backslashCount % 2 === 0) {
110
+ if (nextChar === void 0) {
111
+ inBrackets = false;
112
+ }
113
+ segments.push(currentSegment);
114
+ currentSegment = "";
115
+ i++;
116
+ } else if (segments.length === 0 && char === "[" && backslashCount % 2 === 0) {
117
+ inBrackets = true;
118
+ segments.push(currentSegment);
119
+ currentSegment = "";
120
+ } else if (char === "\\") {
121
+ backslashCount++;
122
+ } else {
123
+ currentSegment += "\\".repeat(backslashCount / 2) + char;
124
+ backslashCount = 0;
125
+ }
126
+ }
127
+ return inBrackets || segments.length === 0 ? [path] : segments;
128
+ }
129
+ }
130
+ function isValidArrayIndex(value, maxIndex) {
131
+ return /^0$|^[1-9]\d*$/.test(value) && Number(value) <= maxIndex;
132
+ }
133
+ function arrayToObject(array) {
134
+ const obj = new NullProtoObj();
135
+ array.forEach((item, i) => {
136
+ obj[i] = item;
137
+ });
138
+ return obj;
139
+ }
140
+ function pushStyleArrayToObject(array) {
141
+ const obj = new NullProtoObj();
142
+ obj[""] = array.length === 1 ? array[0] : array;
143
+ return obj;
144
+ }
145
+
146
+ export { StandardBracketNotationSerializer as S };
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@orpc/openapi-client",
3
3
  "type": "module",
4
- "version": "0.0.0-next.eae6003",
4
+ "version": "0.0.0-next.eaec0b2",
5
5
  "license": "MIT",
6
- "homepage": "https://orpc.unnoq.com",
6
+ "homepage": "https://orpc.dev",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git+https://github.com/unnoq/orpc.git",
9
+ "url": "git+https://github.com/middleapi/orpc.git",
10
10
  "directory": "packages/openapi-client"
11
11
  },
12
12
  "keywords": [
13
- "unnoq",
14
13
  "orpc"
15
14
  ],
16
15
  "exports": {
@@ -19,6 +18,11 @@
19
18
  "import": "./dist/index.mjs",
20
19
  "default": "./dist/index.mjs"
21
20
  },
21
+ "./helpers": {
22
+ "types": "./dist/helpers/index.d.mts",
23
+ "import": "./dist/helpers/index.mjs",
24
+ "default": "./dist/helpers/index.mjs"
25
+ },
22
26
  "./standard": {
23
27
  "types": "./dist/adapters/standard/index.d.mts",
24
28
  "import": "./dist/adapters/standard/index.mjs",
@@ -34,13 +38,13 @@
34
38
  "dist"
35
39
  ],
36
40
  "dependencies": {
37
- "@orpc/client": "0.0.0-next.eae6003",
38
- "@orpc/contract": "0.0.0-next.eae6003",
39
- "@orpc/shared": "0.0.0-next.eae6003",
40
- "@orpc/standard-server": "0.0.0-next.eae6003"
41
+ "@orpc/client": "0.0.0-next.eaec0b2",
42
+ "@orpc/shared": "0.0.0-next.eaec0b2",
43
+ "@orpc/standard-server": "0.0.0-next.eaec0b2",
44
+ "@orpc/contract": "0.0.0-next.eaec0b2"
41
45
  },
42
46
  "devDependencies": {
43
- "@orpc/server": "0.0.0-next.eae6003"
47
+ "@orpc/server": "0.0.0-next.eaec0b2"
44
48
  },
45
49
  "scripts": {
46
50
  "build": "unbuild",