@unshared/client 0.5.0 → 0.6.0
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/chunks/{Nc32BOzg.d.ts → BGG3bT7O.d.ts} +3 -2
- package/dist/chunks/{5p4H9ZaI.d.ts → DMWBcqy0.d.ts} +3 -2
- package/dist/createClient.d.ts +3 -3
- package/dist/createService.d.ts +4 -3
- package/dist/index.d.ts +2 -2
- package/dist/openapi.d.ts +4 -3
- package/dist/utils.d.ts +4 -3
- package/dist/websocket.d.ts +2 -1
- package/package.json +4 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MaybeArray,
|
1
|
+
import { MaybeArray, ObjectLike, Loose, UnionMerge, MaybeLiteral } from '@unshared/types';
|
2
2
|
import { HttpHeader } from '../HttpHeaders.js';
|
3
3
|
import { HttpMethod } from '../HttpMethods.js';
|
4
4
|
|
@@ -161,4 +161,5 @@ interface RequestOptions<Method extends FetchMethod = FetchMethod, BaseUrl exten
|
|
161
161
|
*/
|
162
162
|
declare function request(route: string, options?: RequestOptions): Promise<unknown>;
|
163
163
|
|
164
|
-
export {
|
164
|
+
export { parseRequest as p, request as r, toSearchParams as t };
|
165
|
+
export type { FetchOptions as F, RequestOptions as R, SearchParamsObject as S, ToSearchParamsOptions as T, FetchMethod as a, RequestContext as b, FetchHeaders as c, SearchArrayFormat as d };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Loose, UnionMerge, Override, Pretty, CollectKey, MaybeLiteral, StringSplit } from '@unshared/types';
|
2
|
-
import { a as FetchMethod, R as RequestOptions } from './
|
2
|
+
import { a as FetchMethod, R as RequestOptions } from './BGG3bT7O.js';
|
3
3
|
import { OpenAPI } from 'openapi-types';
|
4
4
|
|
5
5
|
/** Get the base URL of an OpenAPI specification. */
|
@@ -227,4 +227,5 @@ type OpenAPIOptionsMap<T> = {
|
|
227
227
|
[K in OperationRoute<T>]: OperationOptions<T, OperationByRoute<T, K>>;
|
228
228
|
};
|
229
229
|
|
230
|
-
export {
|
230
|
+
export { OpenAPIV3 as b, getServerUrl as g, OpenAPIV2 as h, resolveOperation as r };
|
231
|
+
export type { OpenAPILike as O, ServerUrl as S, OpenAPIOptionsMap as a, OperationId as c, OperationById as d, OperationOptions as e, OperationResult as f, Operation as i, OpenAPIV2Like as j, OpenAPIV3Like as k, OperationResponse as l, OperationRoute as m, OperationByRoute as n };
|
package/dist/createClient.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Result } from '@unshared/functions/attempt';
|
2
2
|
import { ServiceOptions } from './createService.js';
|
3
|
-
import { R as RequestOptions, F as FetchOptions } from './chunks/
|
4
|
-
import { O as OpenAPILike, a as OpenAPIOptionsMap } from './chunks/
|
5
|
-
import {
|
3
|
+
import { R as RequestOptions, F as FetchOptions } from './chunks/BGG3bT7O.js';
|
4
|
+
import { O as OpenAPILike, a as OpenAPIOptionsMap } from './chunks/DMWBcqy0.js';
|
5
|
+
import { ConnectOptions, WebSocketChannel } from './websocket.js';
|
6
6
|
import '@unshared/types';
|
7
7
|
import './HttpHeaders.js';
|
8
8
|
import './HttpMethods.js';
|
package/dist/createService.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MaybeLiteral } from '@unshared/types';
|
2
|
-
import {
|
3
|
-
import { R as RequestOptions } from './chunks/
|
2
|
+
import { S as ServerUrl, b as OpenAPIV3, c as OperationId, d as OperationById, e as OperationOptions, f as OperationResult } from './chunks/DMWBcqy0.js';
|
3
|
+
import { R as RequestOptions } from './chunks/BGG3bT7O.js';
|
4
4
|
import 'openapi-types';
|
5
5
|
import './HttpHeaders.js';
|
6
6
|
import './HttpMethods.js';
|
@@ -35,4 +35,5 @@ interface ServiceOptions<T = any> extends RequestOptions {
|
|
35
35
|
*/
|
36
36
|
declare function createService<T extends object>(document: Readonly<T>, initialOptions?: ServiceOptions<T>): Service<T>;
|
37
37
|
|
38
|
-
export {
|
38
|
+
export { createService };
|
39
|
+
export type { Service, ServiceOptions };
|
package/dist/index.d.ts
CHANGED
@@ -4,8 +4,8 @@ export { HttpHeader } from './HttpHeaders.js';
|
|
4
4
|
export { HttpMethod } from './HttpMethods.js';
|
5
5
|
export { HttpStatusCode } from './HttpStatusCodes.js';
|
6
6
|
import '@unshared/functions/attempt';
|
7
|
-
import './chunks/
|
7
|
+
import './chunks/BGG3bT7O.js';
|
8
8
|
import '@unshared/types';
|
9
|
-
import './chunks/
|
9
|
+
import './chunks/DMWBcqy0.js';
|
10
10
|
import 'openapi-types';
|
11
11
|
import './websocket.js';
|
package/dist/openapi.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
export { O as OpenAPILike, a as OpenAPIOptionsMap, h as OpenAPIV2, j as OpenAPIV2Like,
|
1
|
+
export { O as OpenAPILike, a as OpenAPIOptionsMap, h as OpenAPIV2, j as OpenAPIV2Like, b as OpenAPIV3, k as OpenAPIV3Like, i as Operation, d as OperationById, n as OperationByRoute, c as OperationId, e as OperationOptions, l as OperationResponse, f as OperationResult, m as OperationRoute, S as ServerUrl, g as getServerUrl, r as resolveOperation } from './chunks/DMWBcqy0.js';
|
2
2
|
import { OpenAPIV2, OpenAPIV3, OpenAPIV3_1, OpenAPI } from 'openapi-types';
|
3
3
|
import { StringReplace, WriteableDeep, StringJoin, Substract } from '@unshared/types';
|
4
|
-
import './chunks/
|
4
|
+
import './chunks/BGG3bT7O.js';
|
5
5
|
import './HttpHeaders.js';
|
6
6
|
import './HttpMethods.js';
|
7
7
|
|
@@ -133,4 +133,5 @@ interface TokenOptions {
|
|
133
133
|
*/
|
134
134
|
declare function resolveOperationTokenOptions(document: object, operation: OpenAPI.Operation): TokenOptions;
|
135
135
|
|
136
|
-
export {
|
136
|
+
export { isOpenAPIV2, isOpenAPIV3, isOpenAPIV3_1, isReferenceObject, resolveDocument, resolveOperationTokenOptions, resolveReference };
|
137
|
+
export type { OpenAPIReference, OpenAPIReferenceDecoded, OpenAPIReferencePath, OpenAPIReferenceResolved, OpenAPIResolved, TokenOptions };
|
package/dist/utils.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { F as FetchOptions, R as RequestOptions, b as RequestContext } from './chunks/
|
2
|
-
export { c as FetchHeaders, a as FetchMethod, d as SearchArrayFormat, S as SearchParamsObject, T as ToSearchParamsOptions, p as parseRequest, r as request, t as toSearchParams } from './chunks/
|
1
|
+
import { F as FetchOptions, R as RequestOptions, b as RequestContext } from './chunks/BGG3bT7O.js';
|
2
|
+
export { c as FetchHeaders, a as FetchMethod, d as SearchArrayFormat, S as SearchParamsObject, T as ToSearchParamsOptions, p as parseRequest, r as request, t as toSearchParams } from './chunks/BGG3bT7O.js';
|
3
3
|
import { Awaitable } from '@unshared/functions/awaitable';
|
4
4
|
import { ObjectLike } from '@unshared/types';
|
5
5
|
import './HttpHeaders.js';
|
@@ -240,4 +240,5 @@ declare function setHeader(headers: HeadersInit, key: string, value: number | st
|
|
240
240
|
*/
|
241
241
|
declare function toFormData(object: FormDataLike): FormData;
|
242
242
|
|
243
|
-
export { FetchOptions,
|
243
|
+
export { FetchOptions, RequestContext, RequestOptions, fetch, getCookie, getCookies, getHeader, handleResponse, handleResponseStreamJson, isFormDataLike, isObjectLike, parseRequestBasicAuth, parseRequestBody, parseRequestHeaders, parseRequestParameters, parseRequestQuery, parseRequestToken, parseRequestUrl, setCookie, setHeader, toFormData };
|
244
|
+
export type { FormDataLike };
|
package/dist/websocket.d.ts
CHANGED
@@ -139,4 +139,5 @@ declare class WebSocketChannel<T extends ConnectOptions = ConnectOptions> {
|
|
139
139
|
*/
|
140
140
|
declare function connect(route: string, options: ConnectOptions): WebSocketChannel;
|
141
141
|
|
142
|
-
export {
|
142
|
+
export { WebSocketChannel, connect, parseConnectOptions };
|
143
|
+
export type { ConnectOptions, ConnectProtocol, WebSocketParameters };
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@unshared/client",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.6.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"sideEffects": false,
|
7
7
|
"author": "Stanley Horwood <stanley@hsjm.io>",
|
@@ -68,12 +68,12 @@
|
|
68
68
|
"LICENSE.md"
|
69
69
|
],
|
70
70
|
"dependencies": {
|
71
|
-
"@unshared/functions": "0.
|
72
|
-
"@unshared/types": "0.
|
71
|
+
"@unshared/functions": "0.6.0",
|
72
|
+
"@unshared/types": "0.6.0",
|
73
73
|
"openapi-types": "12.1.3"
|
74
74
|
},
|
75
75
|
"devDependencies": {
|
76
|
-
"@unshared/scripts": "0.
|
76
|
+
"@unshared/scripts": "0.6.0"
|
77
77
|
},
|
78
78
|
"scripts": {
|
79
79
|
"build:httpMethods": "tsx ./scripts/buildHttpMethods.ts",
|