@orpc/openapi-client 0.0.0-next.f538070 → 0.0.0-next.f81b4a2

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.
@@ -1,15 +1,22 @@
1
1
  import { ClientContext } from '@orpc/client';
2
- import { AnyContractRouter } from '@orpc/contract';
3
2
  import { LinkFetchClientOptions } from '@orpc/client/fetch';
4
- import { f as StandardOpenAPILinkOptions, g as StandardOpenAPILink } from '../../shared/openapi-client.DArKvaqp.mjs';
3
+ import { AnyContractRouter } from '@orpc/contract';
4
+ import { f as StandardOpenAPILinkOptions, g as StandardOpenAPILink } from '../../shared/openapi-client.D_hC2pAM.mjs';
5
5
  import '@orpc/client/standard';
6
- import '@orpc/standard-server';
7
6
  import '@orpc/shared';
7
+ import '@orpc/standard-server';
8
8
 
9
9
  interface OpenAPILinkOptions<T extends ClientContext> extends StandardOpenAPILinkOptions<T>, LinkFetchClientOptions<T> {
10
10
  }
11
+ /**
12
+ * The OpenAPI Link for fetch runtime communicates with the server that follow the OpenAPI specification.
13
+ *
14
+ * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
15
+ * @see {@link https://swagger.io/specification/ OpenAPI Specification}
16
+ */
11
17
  declare class OpenAPILink<T extends ClientContext> extends StandardOpenAPILink<T> {
12
18
  constructor(contract: AnyContractRouter, options: OpenAPILinkOptions<T>);
13
19
  }
14
20
 
15
- export { OpenAPILink, type OpenAPILinkOptions };
21
+ export { OpenAPILink };
22
+ export type { OpenAPILinkOptions };
@@ -1,15 +1,22 @@
1
1
  import { ClientContext } from '@orpc/client';
2
- import { AnyContractRouter } from '@orpc/contract';
3
2
  import { LinkFetchClientOptions } from '@orpc/client/fetch';
4
- import { f as StandardOpenAPILinkOptions, g as StandardOpenAPILink } from '../../shared/openapi-client.DArKvaqp.js';
3
+ import { AnyContractRouter } from '@orpc/contract';
4
+ import { f as StandardOpenAPILinkOptions, g as StandardOpenAPILink } from '../../shared/openapi-client.D_hC2pAM.js';
5
5
  import '@orpc/client/standard';
6
- import '@orpc/standard-server';
7
6
  import '@orpc/shared';
7
+ import '@orpc/standard-server';
8
8
 
9
9
  interface OpenAPILinkOptions<T extends ClientContext> extends StandardOpenAPILinkOptions<T>, LinkFetchClientOptions<T> {
10
10
  }
11
+ /**
12
+ * The OpenAPI Link for fetch runtime communicates with the server that follow the OpenAPI specification.
13
+ *
14
+ * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
15
+ * @see {@link https://swagger.io/specification/ OpenAPI Specification}
16
+ */
11
17
  declare class OpenAPILink<T extends ClientContext> extends StandardOpenAPILink<T> {
12
18
  constructor(contract: AnyContractRouter, options: OpenAPILinkOptions<T>);
13
19
  }
14
20
 
15
- export { OpenAPILink, type OpenAPILinkOptions };
21
+ export { OpenAPILink };
22
+ export type { OpenAPILinkOptions };
@@ -1,9 +1,9 @@
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.DArKvaqp.mjs';
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';
2
2
  import { HTTPPath } from '@orpc/client';
3
- import '@orpc/contract';
4
3
  import '@orpc/client/standard';
5
- import '@orpc/standard-server';
4
+ import '@orpc/contract';
6
5
  import '@orpc/shared';
6
+ import '@orpc/standard-server';
7
7
 
8
8
  /**
9
9
  * @internal
@@ -1,9 +1,9 @@
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.DArKvaqp.js';
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';
2
2
  import { HTTPPath } from '@orpc/client';
3
- import '@orpc/contract';
4
3
  import '@orpc/client/standard';
5
- import '@orpc/standard-server';
4
+ import '@orpc/contract';
6
5
  import '@orpc/shared';
6
+ import '@orpc/standard-server';
7
7
 
8
8
  /**
9
9
  * @internal
package/dist/index.d.mts CHANGED
@@ -4,6 +4,11 @@ type JsonifiedValue<T> = T extends string ? T : T extends number ? T : T extends
4
4
  [K in keyof T]: JsonifiedValue<T[K]>;
5
5
  } : T extends Date ? string : T extends bigint ? string : T extends File ? File : T extends Blob ? Blob : T extends RegExp ? string : T extends URL ? string : T extends Map<infer K, infer V> ? JsonifiedArray<[K, V][]> : T extends Set<infer U> ? JsonifiedArray<U[]> : T extends AsyncIteratorObject<infer U, infer V> ? AsyncIteratorObject<JsonifiedValue<U>, JsonifiedValue<V>> : unknown;
6
6
  type JsonifiedArray<T extends Array<unknown>> = T extends readonly [] ? [] : T extends readonly [infer U, ...infer V] ? [U extends undefined ? null : JsonifiedValue<U>, ...JsonifiedArray<V>] : T extends Array<infer U> ? Array<JsonifiedValue<U>> : unknown;
7
+ /**
8
+ * Convert types that JSON not support to corresponding json types
9
+ *
10
+ * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
11
+ */
7
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> : {
8
13
  [K in keyof T]: T[K] extends NestedClient<any> ? JsonifiedClient<T[K]> : T[K];
9
14
  };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,11 @@ type JsonifiedValue<T> = T extends string ? T : T extends number ? T : T extends
4
4
  [K in keyof T]: JsonifiedValue<T[K]>;
5
5
  } : T extends Date ? string : T extends bigint ? string : T extends File ? File : T extends Blob ? Blob : T extends RegExp ? string : T extends URL ? string : T extends Map<infer K, infer V> ? JsonifiedArray<[K, V][]> : T extends Set<infer U> ? JsonifiedArray<U[]> : T extends AsyncIteratorObject<infer U, infer V> ? AsyncIteratorObject<JsonifiedValue<U>, JsonifiedValue<V>> : unknown;
6
6
  type JsonifiedArray<T extends Array<unknown>> = T extends readonly [] ? [] : T extends readonly [infer U, ...infer V] ? [U extends undefined ? null : JsonifiedValue<U>, ...JsonifiedArray<V>] : T extends Array<infer U> ? Array<JsonifiedValue<U>> : unknown;
7
+ /**
8
+ * Convert types that JSON not support to corresponding json types
9
+ *
10
+ * @see {@link https://orpc.unnoq.com/docs/openapi/client/openapi-link OpenAPI Link Docs}
11
+ */
7
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> : {
8
13
  [K in keyof T]: T[K] extends NestedClient<any> ? JsonifiedClient<T[K]> : T[K];
9
14
  };
@@ -1,8 +1,8 @@
1
1
  import { ClientContext, ClientOptions } from '@orpc/client';
2
- import { AnyContractRouter } from '@orpc/contract';
3
2
  import { StandardLinkCodec, StandardLinkOptions, StandardLink, StandardLinkClient } from '@orpc/client/standard';
4
- import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
3
+ import { AnyContractRouter } from '@orpc/contract';
5
4
  import { Segment, Value } from '@orpc/shared';
5
+ import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
6
6
 
7
7
  type StandardBracketNotationSerialized = [string, unknown][];
8
8
  declare class StandardBracketNotationSerializer {
@@ -75,4 +75,5 @@ declare class StandardOpenAPILink<T extends ClientContext> extends StandardLink<
75
75
  constructor(contract: AnyContractRouter, linkClient: StandardLinkClient<T>, options: StandardOpenAPILinkOptions<T>);
76
76
  }
77
77
 
78
- export { type StandardBracketNotationSerialized as S, StandardBracketNotationSerializer as a, type StandardOpenAPIJsonSerialized as b, type StandardOpenAPICustomJsonSerializer as c, type StandardOpenAPIJsonSerializerOptions as d, StandardOpenAPIJsonSerializer as e, type StandardOpenAPILinkOptions as f, StandardOpenAPILink as g, type StandardOpenapiLinkCodecOptions as h, StandardOpenapiLinkCodec as i, type StandardOpenAPISerializeOptions as j, StandardOpenAPISerializer as k };
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 };
@@ -1,8 +1,8 @@
1
1
  import { ClientContext, ClientOptions } from '@orpc/client';
2
- import { AnyContractRouter } from '@orpc/contract';
3
2
  import { StandardLinkCodec, StandardLinkOptions, StandardLink, StandardLinkClient } from '@orpc/client/standard';
4
- import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
3
+ import { AnyContractRouter } from '@orpc/contract';
5
4
  import { Segment, Value } from '@orpc/shared';
5
+ import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
6
6
 
7
7
  type StandardBracketNotationSerialized = [string, unknown][];
8
8
  declare class StandardBracketNotationSerializer {
@@ -75,4 +75,5 @@ declare class StandardOpenAPILink<T extends ClientContext> extends StandardLink<
75
75
  constructor(contract: AnyContractRouter, linkClient: StandardLinkClient<T>, options: StandardOpenAPILinkOptions<T>);
76
76
  }
77
77
 
78
- export { type StandardBracketNotationSerialized as S, StandardBracketNotationSerializer as a, type StandardOpenAPIJsonSerialized as b, type StandardOpenAPICustomJsonSerializer as c, type StandardOpenAPIJsonSerializerOptions as d, StandardOpenAPIJsonSerializer as e, type StandardOpenAPILinkOptions as f, StandardOpenAPILink as g, type StandardOpenapiLinkCodecOptions as h, StandardOpenapiLinkCodec as i, type StandardOpenAPISerializeOptions as j, StandardOpenAPISerializer as k };
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 };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/openapi-client",
3
3
  "type": "module",
4
- "version": "0.0.0-next.f538070",
4
+ "version": "0.0.0-next.f81b4a2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -34,13 +34,13 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@orpc/client": "0.0.0-next.f538070",
38
- "@orpc/contract": "0.0.0-next.f538070",
39
- "@orpc/shared": "0.0.0-next.f538070",
40
- "@orpc/standard-server": "0.0.0-next.f538070"
37
+ "@orpc/client": "0.0.0-next.f81b4a2",
38
+ "@orpc/shared": "0.0.0-next.f81b4a2",
39
+ "@orpc/standard-server": "0.0.0-next.f81b4a2",
40
+ "@orpc/contract": "0.0.0-next.f81b4a2"
41
41
  },
42
42
  "devDependencies": {
43
- "@orpc/server": "0.0.0-next.f538070"
43
+ "@orpc/server": "0.0.0-next.f81b4a2"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "unbuild",