@povio/openapi-codegen-cli 3.1.1-rc.1 → 3.2.0-rc.10
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 +63 -15
- package/dist/AuthGuard-GbtTDXs0.d.mts +32 -0
- package/dist/AuthGuard-qpAtHaBz.mjs +24 -0
- package/dist/acl.d.mts +6 -20
- package/dist/acl.mjs +8 -13
- package/dist/{auth.context-Bu5KW2sI.mjs → auth.context-COWO6ssl.mjs} +1 -21
- package/dist/auth.d.mts +2 -0
- package/dist/auth.mjs +3 -0
- package/dist/axios.d.mts +2 -0
- package/dist/axios.mjs +2 -0
- package/dist/{config-BU7wVf7U.d.mts → config-DgrOddSC.d.mts} +1 -2
- package/dist/config.d.mts +4 -0
- package/dist/config.mjs +5 -0
- package/dist/{error-handling-DSI86D3u.mjs → error-handling-BeydPL7s.mjs} +21 -51
- package/dist/{error-handling-D-mHJ60d.d.mts → error-handling-LPEPQV1V.d.mts} +3 -42
- package/dist/errors.d.mts +3 -0
- package/dist/errors.mjs +2 -0
- package/dist/generate.runner-CD7mlcJ4.mjs +184 -0
- package/dist/generate.utils-CT-LA-gX.cjs +2267 -0
- package/dist/generateCodeFromOpenAPIDoc-D9W5BtAt.mjs +2097 -0
- package/dist/{generateCodeFromOpenAPIDoc-DseBECa-.mjs → generateCodeFromOpenAPIDoc-DhI7CHeh.cjs} +1349 -2344
- package/dist/generator.d.mts +3 -10
- package/dist/generator.mjs +9 -9
- package/dist/getDataFromOpenAPIDoc-D8w0QElH.mjs +2011 -0
- package/dist/i18n-B_brQh4X.d.mts +38 -0
- package/dist/i18n-D-FesqFb.mjs +36 -0
- package/dist/index.d.mts +12 -200
- package/dist/index.mjs +12 -264
- package/dist/metro.cjs +114 -4959
- package/dist/metro.d.mts +3 -4
- package/dist/metro.mjs +4 -9
- package/dist/native-bindings-BTQGSGhU.mjs +1480 -0
- package/dist/native-rest-interceptor-CAWR8H5Y.mjs +208 -0
- package/dist/native-rest-interceptor-Cz6saoq5.d.mts +46 -0
- package/dist/native.d.mts +3 -0
- package/dist/native.mjs +3 -0
- package/dist/openapi-codegen-native-darwin-arm64.node +0 -0
- package/dist/openapi-codegen-native-linux-x64.node +0 -0
- package/dist/openapi-codegen-native-win32-x64.node +0 -0
- package/dist/{openapi-codegen.runner-Co_bG00_.mjs → openapi-codegen.runner-C4TIXQNx.mjs} +4 -5
- package/dist/{openapi-source.runner-wLs5vqw6.mjs → openapi-source.runner-BZ6ZLgRO.mjs} +19 -10
- package/dist/{openapi-source.runner-BSIrB6ny.d.mts → openapi-source.runner-ykstqlPC.d.mts} +2 -8
- package/dist/{options-CE4Koxof.d.mts → options-KPf-Fti5.d.mts} +6 -1
- package/dist/query.d.mts +3 -0
- package/dist/query.mjs +3 -0
- package/dist/queryConfig.context-CRJOgf19.d.mts +22 -0
- package/dist/queryConfig.context-CldQ5YL9.mjs +34 -0
- package/dist/rest-client-CQyFvqYC.d.mts +55 -0
- package/dist/rest-interceptor-D5NCNTm1.mjs +115 -0
- package/dist/rest-transport.types-DM5-qyOJ.d.mts +66 -0
- package/dist/rest-transport.types-DxitRtsB.mjs +11 -0
- package/dist/rest.d.mts +2 -0
- package/dist/rest.mjs +2 -0
- package/dist/rest.utils-rezWAIYL.d.mts +10 -0
- package/dist/router.context-EPlMBk3G.mjs +21 -0
- package/dist/sh.d.mts +1 -1
- package/dist/sh.mjs +41 -71
- package/dist/tiny.d.mts +1 -3
- package/dist/tiny.mjs +2 -3
- package/dist/useMutationEffects-DIdL8tlx.d.mts +29 -0
- package/dist/useMutationEffects-PB1fvKWM.mjs +68 -0
- package/dist/vite.d.mts +3 -4
- package/dist/vite.mjs +6 -10
- package/dist/workspace.context-XWvQ_7Hg.mjs +26 -0
- package/dist/workspace.context-isVY9ves.d.mts +23 -0
- package/dist/zod.d.mts +2 -7
- package/dist/zod.mjs +2 -4
- package/package.json +73 -26
- package/dist/generate.runner-C1HrS_9G.mjs +0 -90
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { t as HttpError } from "./rest-transport.types-DxitRtsB.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/lib/rest/native-rest-client.ts
|
|
4
|
+
var NativeRestClient = class {
|
|
5
|
+
interceptors;
|
|
6
|
+
constructor({ config, interceptors = [] } = {}) {
|
|
7
|
+
this.baseURL = config?.baseURL ?? "";
|
|
8
|
+
this.headers = config?.headers;
|
|
9
|
+
this.credentials = config?.credentials;
|
|
10
|
+
this.fetch = config?.fetch ?? globalThis.fetch.bind(globalThis);
|
|
11
|
+
this.interceptors = [...interceptors];
|
|
12
|
+
}
|
|
13
|
+
baseURL;
|
|
14
|
+
headers;
|
|
15
|
+
credentials;
|
|
16
|
+
fetch;
|
|
17
|
+
attachInterceptor(interceptor) {
|
|
18
|
+
this.interceptors.push(interceptor);
|
|
19
|
+
}
|
|
20
|
+
ejectInterceptor(interceptor) {
|
|
21
|
+
const index = this.interceptors.indexOf(interceptor);
|
|
22
|
+
if (index >= 0) this.interceptors.splice(index, 1);
|
|
23
|
+
}
|
|
24
|
+
get(info, url, config) {
|
|
25
|
+
return this.request(info, "GET", url, void 0, config);
|
|
26
|
+
}
|
|
27
|
+
post(info, url, data, config) {
|
|
28
|
+
return this.request(info, "POST", url, data, config);
|
|
29
|
+
}
|
|
30
|
+
patch(info, url, data, config) {
|
|
31
|
+
return this.request(info, "PATCH", url, data, config);
|
|
32
|
+
}
|
|
33
|
+
put(info, url, data, config) {
|
|
34
|
+
return this.request(info, "PUT", url, data, config);
|
|
35
|
+
}
|
|
36
|
+
delete(info, url, data, config) {
|
|
37
|
+
return this.request(info, "DELETE", url, data, config);
|
|
38
|
+
}
|
|
39
|
+
async upload(url, data, config = {}, method = "put") {
|
|
40
|
+
if (config.onUploadProgress && typeof XMLHttpRequest !== "undefined") {
|
|
41
|
+
await this.uploadWithXhr(url, data, config, method);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
await this.execute({
|
|
45
|
+
url,
|
|
46
|
+
method: method.toUpperCase(),
|
|
47
|
+
body: data,
|
|
48
|
+
headers: new Headers(config.headers),
|
|
49
|
+
signal: config.signal
|
|
50
|
+
}, config, false);
|
|
51
|
+
}
|
|
52
|
+
async request(info, method, path, data, config = {}) {
|
|
53
|
+
const errorStack = (/* @__PURE__ */ new Error()).stack;
|
|
54
|
+
try {
|
|
55
|
+
const headers = new Headers(this.headers);
|
|
56
|
+
new Headers(config.headers).forEach((value, key) => headers.set(key, value));
|
|
57
|
+
let body;
|
|
58
|
+
if (data != null) if (data instanceof FormData || data instanceof Blob || typeof data === "string") body = data;
|
|
59
|
+
else {
|
|
60
|
+
body = JSON.stringify(data);
|
|
61
|
+
if (!headers.has("content-type")) headers.set("content-type", "application/json");
|
|
62
|
+
}
|
|
63
|
+
const request = {
|
|
64
|
+
url: this.resolveUrl(path, config.params),
|
|
65
|
+
method,
|
|
66
|
+
headers,
|
|
67
|
+
body,
|
|
68
|
+
signal: config.signal,
|
|
69
|
+
credentials: config.credentials ?? this.credentials
|
|
70
|
+
};
|
|
71
|
+
const response = await this.execute(request, config);
|
|
72
|
+
const parseResult = info.resSchema.safeParse(response.data);
|
|
73
|
+
let dataResult;
|
|
74
|
+
if (parseResult.success) dataResult = parseResult.data;
|
|
75
|
+
else if (config.allowInvalidResponseData && method === "GET") {
|
|
76
|
+
parseResult.error.name = "BE Response schema mismatch - ZodError";
|
|
77
|
+
parseResult.error.stack = [parseResult.error.stack, ...errorStack?.split("\n").slice(2) ?? []].join("\n");
|
|
78
|
+
console.error(parseResult.error);
|
|
79
|
+
dataResult = response.data;
|
|
80
|
+
} else throw parseResult.error;
|
|
81
|
+
return config.rawResponse ? {
|
|
82
|
+
...response,
|
|
83
|
+
data: dataResult
|
|
84
|
+
} : dataResult;
|
|
85
|
+
} catch (error) {
|
|
86
|
+
if (error instanceof z.ZodError) error.name = "BE Response schema mismatch - ZodError";
|
|
87
|
+
throw await this.runErrorInterceptors(error);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async execute(request, config = {}, applyInterceptors = true) {
|
|
91
|
+
let next = request;
|
|
92
|
+
if (applyInterceptors) for (const interceptor of this.interceptors) next = await interceptor.onRequest?.(next) ?? next;
|
|
93
|
+
const timeoutController = config.timeout ? new AbortController() : void 0;
|
|
94
|
+
const timer = timeoutController ? setTimeout(() => timeoutController.abort(), config.timeout) : void 0;
|
|
95
|
+
if (timeoutController && next.signal) if (next.signal.aborted) timeoutController.abort(next.signal.reason);
|
|
96
|
+
else next.signal.addEventListener("abort", () => timeoutController.abort(next.signal?.reason), { once: true });
|
|
97
|
+
const signal = timeoutController?.signal ?? next.signal;
|
|
98
|
+
try {
|
|
99
|
+
const res = await this.fetch(next.url, {
|
|
100
|
+
method: next.method,
|
|
101
|
+
headers: next.headers,
|
|
102
|
+
body: next.body,
|
|
103
|
+
signal,
|
|
104
|
+
credentials: next.credentials
|
|
105
|
+
});
|
|
106
|
+
let response = {
|
|
107
|
+
data: await this.readResponse(res, config.responseType),
|
|
108
|
+
status: res.status,
|
|
109
|
+
statusText: res.statusText,
|
|
110
|
+
headers: res.headers,
|
|
111
|
+
url: res.url
|
|
112
|
+
};
|
|
113
|
+
if (!res.ok) throw new HttpError(`Request failed with status ${res.status}`, response);
|
|
114
|
+
if (applyInterceptors) for (const interceptor of this.interceptors) response = await interceptor.onResponse?.(response) ?? response;
|
|
115
|
+
return response;
|
|
116
|
+
} catch (error) {
|
|
117
|
+
if (!applyInterceptors) throw error;
|
|
118
|
+
const context = {
|
|
119
|
+
request: next,
|
|
120
|
+
response: error instanceof HttpError ? error.response : void 0,
|
|
121
|
+
retry: (request = next) => this.execute({
|
|
122
|
+
...request,
|
|
123
|
+
retryCount: (next.retryCount ?? 0) + 1
|
|
124
|
+
}, config, true)
|
|
125
|
+
};
|
|
126
|
+
const transformed = await this.runErrorInterceptors(error, context);
|
|
127
|
+
if (this.isTransportResponse(transformed)) return transformed;
|
|
128
|
+
throw transformed;
|
|
129
|
+
} finally {
|
|
130
|
+
if (timer) clearTimeout(timer);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async readResponse(response, type) {
|
|
134
|
+
if (response.status === 204) return void 0;
|
|
135
|
+
if (type === "blob") return response.blob();
|
|
136
|
+
if (type === "arrayBuffer") return response.arrayBuffer();
|
|
137
|
+
if (type === "text") return response.text();
|
|
138
|
+
const text = await response.text();
|
|
139
|
+
if (text === "") return void 0;
|
|
140
|
+
if (!response.headers.get("content-type")?.includes("json")) try {
|
|
141
|
+
return JSON.parse(text);
|
|
142
|
+
} catch {
|
|
143
|
+
return text;
|
|
144
|
+
}
|
|
145
|
+
return JSON.parse(text);
|
|
146
|
+
}
|
|
147
|
+
resolveUrl(path, params) {
|
|
148
|
+
const baseURL = this.baseURL && !this.baseURL.endsWith("/") ? `${this.baseURL}/` : this.baseURL;
|
|
149
|
+
const url = /^https?:\/\//.test(path) ? new URL(path) : new URL(path.replace(/^\//, ""), baseURL || globalThis.location?.origin);
|
|
150
|
+
for (const [key, value] of Object.entries(params ?? {})) {
|
|
151
|
+
if (value == null) continue;
|
|
152
|
+
if (Array.isArray(value)) value.forEach((item) => url.searchParams.append(key, String(item)));
|
|
153
|
+
else url.searchParams.append(key, String(value));
|
|
154
|
+
}
|
|
155
|
+
return url.toString();
|
|
156
|
+
}
|
|
157
|
+
async runErrorInterceptors(error, context) {
|
|
158
|
+
let next = error;
|
|
159
|
+
if (!context) return next;
|
|
160
|
+
for (const interceptor of [...this.interceptors].reverse()) if (interceptor.onError) try {
|
|
161
|
+
next = await interceptor.onError(next, context);
|
|
162
|
+
} catch (transformed) {
|
|
163
|
+
next = transformed;
|
|
164
|
+
}
|
|
165
|
+
return next;
|
|
166
|
+
}
|
|
167
|
+
isTransportResponse(value) {
|
|
168
|
+
return !!value && typeof value === "object" && "status" in value && "headers" in value && "data" in value;
|
|
169
|
+
}
|
|
170
|
+
uploadWithXhr(url, data, config, method) {
|
|
171
|
+
return new Promise((resolve, reject) => {
|
|
172
|
+
const xhr = new XMLHttpRequest();
|
|
173
|
+
xhr.open(method.toUpperCase(), url);
|
|
174
|
+
new Headers(config.headers).forEach((value, key) => xhr.setRequestHeader(key, value));
|
|
175
|
+
if (config.timeout) xhr.timeout = config.timeout;
|
|
176
|
+
xhr.upload.onprogress = ({ loaded, total }) => config.onUploadProgress?.({
|
|
177
|
+
loaded,
|
|
178
|
+
total
|
|
179
|
+
});
|
|
180
|
+
xhr.onload = () => xhr.status >= 200 && xhr.status < 300 ? resolve() : reject(/* @__PURE__ */ new Error(`Upload failed with status ${xhr.status}`));
|
|
181
|
+
xhr.onerror = () => reject(/* @__PURE__ */ new TypeError("Network request failed"));
|
|
182
|
+
xhr.ontimeout = () => reject(new DOMException("Request timed out", "TimeoutError"));
|
|
183
|
+
config.signal?.addEventListener("abort", () => xhr.abort(), { once: true });
|
|
184
|
+
xhr.onabort = () => reject(config.signal?.reason ?? new DOMException("Request aborted", "AbortError"));
|
|
185
|
+
xhr.send(data);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/lib/rest/native-rest-interceptor.ts
|
|
191
|
+
var NativeRestInterceptor = class {
|
|
192
|
+
interceptor;
|
|
193
|
+
constructor(interceptor) {
|
|
194
|
+
this.interceptor = interceptor;
|
|
195
|
+
}
|
|
196
|
+
onRequest(request) {
|
|
197
|
+
return this.interceptor.onRequest?.(request) ?? request;
|
|
198
|
+
}
|
|
199
|
+
onResponse(response) {
|
|
200
|
+
return this.interceptor.onResponse?.(response) ?? response;
|
|
201
|
+
}
|
|
202
|
+
onError(error, context) {
|
|
203
|
+
if (!this.interceptor.onError) throw error;
|
|
204
|
+
return this.interceptor.onError(error, context);
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
//#endregion
|
|
208
|
+
export { NativeRestClient as n, NativeRestInterceptor as t };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { a as RestTransport, c as TransportFetch, d as TransportResponse, l as TransportRequest, o as RestTransportInterceptor, r as RestRequestInfo, s as TransportErrorContext, t as GeneralTransportErrorCode, u as TransportRequestConfig } from "./rest-transport.types-DM5-qyOJ.mjs";
|
|
2
|
+
//#region src/lib/rest/native-rest-client.d.ts
|
|
3
|
+
type NativeResult<T, IsRawRes extends boolean> = IsRawRes extends true ? TransportResponse<T> : T;
|
|
4
|
+
declare class NativeRestClient implements RestTransport {
|
|
5
|
+
private readonly interceptors;
|
|
6
|
+
constructor({ config, interceptors }?: {
|
|
7
|
+
config?: {
|
|
8
|
+
baseURL?: string;
|
|
9
|
+
headers?: HeadersInit;
|
|
10
|
+
credentials?: RequestCredentials;
|
|
11
|
+
fetch?: TransportFetch;
|
|
12
|
+
};
|
|
13
|
+
interceptors?: RestTransportInterceptor[];
|
|
14
|
+
});
|
|
15
|
+
private readonly baseURL;
|
|
16
|
+
private readonly headers?;
|
|
17
|
+
private readonly credentials?;
|
|
18
|
+
private readonly fetch;
|
|
19
|
+
attachInterceptor(interceptor: RestTransportInterceptor): void;
|
|
20
|
+
ejectInterceptor(interceptor: RestTransportInterceptor): void;
|
|
21
|
+
get<T, E extends string = GeneralTransportErrorCode, R extends boolean = false>(info: RestRequestInfo<T, E>, url: string, config?: TransportRequestConfig<R>): Promise<NativeResult<T, R>>;
|
|
22
|
+
post<T, E extends string = GeneralTransportErrorCode, R extends boolean = false>(info: RestRequestInfo<T, E>, url: string, data?: unknown, config?: TransportRequestConfig<R>): Promise<NativeResult<T, R>>;
|
|
23
|
+
patch<T, E extends string = GeneralTransportErrorCode, R extends boolean = false>(info: RestRequestInfo<T, E>, url: string, data?: unknown, config?: TransportRequestConfig<R>): Promise<NativeResult<T, R>>;
|
|
24
|
+
put<T, E extends string = GeneralTransportErrorCode, R extends boolean = false>(info: RestRequestInfo<T, E>, url: string, data?: unknown, config?: TransportRequestConfig<R>): Promise<NativeResult<T, R>>;
|
|
25
|
+
delete<T, E extends string = GeneralTransportErrorCode, R extends boolean = false>(info: RestRequestInfo<T, E>, url: string, data?: unknown, config?: TransportRequestConfig<R>): Promise<NativeResult<T, R>>;
|
|
26
|
+
upload(url: string, data: BodyInit, config?: TransportRequestConfig, method?: "put" | "post"): Promise<void>;
|
|
27
|
+
private request;
|
|
28
|
+
private execute;
|
|
29
|
+
private readResponse;
|
|
30
|
+
private resolveUrl;
|
|
31
|
+
private runErrorInterceptors;
|
|
32
|
+
private isTransportResponse;
|
|
33
|
+
private uploadWithXhr;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/lib/rest/native-rest-interceptor.d.ts
|
|
37
|
+
type NativeInterceptor = RestTransportInterceptor;
|
|
38
|
+
declare class NativeRestInterceptor implements RestTransportInterceptor {
|
|
39
|
+
private readonly interceptor;
|
|
40
|
+
constructor(interceptor: RestTransportInterceptor);
|
|
41
|
+
onRequest(request: TransportRequest): Promise<TransportRequest> | TransportRequest;
|
|
42
|
+
onResponse<T>(response: TransportResponse<T>): Promise<TransportResponse<T>> | TransportResponse<T>;
|
|
43
|
+
onError(error: unknown, context: TransportErrorContext): unknown;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { NativeRestInterceptor as n, NativeRestClient as r, NativeInterceptor as t };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as RestTransport, d as TransportResponse, f as TransportResult, i as RestResponseType, l as TransportRequest, n as HttpError, o as RestTransportInterceptor, p as UploadProgress, r as RestRequestInfo, t as GeneralTransportErrorCode, u as TransportRequestConfig } from "./rest-transport.types-DM5-qyOJ.mjs";
|
|
2
|
+
import { n as NativeRestInterceptor, r as NativeRestClient, t as NativeInterceptor } from "./native-rest-interceptor-Cz6saoq5.mjs";
|
|
3
|
+
export { type GeneralTransportErrorCode, HttpError, HttpError as NativeHttpError, type NativeInterceptor, type TransportRequest as NativeRequest, type TransportRequest, type TransportRequestConfig as NativeRequestConfig, type TransportRequestConfig, type TransportResponse as NativeResponse, type TransportResponse, NativeRestClient, NativeRestInterceptor, type UploadProgress as NativeUploadProgress, type UploadProgress, type RestRequestInfo, type RestResponseType, type RestTransport, type RestTransportInterceptor, type TransportResult };
|
package/dist/native.mjs
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Wn as Profiler } from "./native-bindings-BTQGSGhU.mjs";
|
|
2
|
+
import { n as runGenerate } from "./generate.runner-CD7mlcJ4.mjs";
|
|
3
3
|
import path from "path";
|
|
4
|
-
|
|
5
4
|
//#region src/plugins/openapi-codegen.runner.ts
|
|
6
5
|
function createOpenApiCodegenRunner(config, options = {}) {
|
|
7
6
|
let queue = Promise.resolve();
|
|
@@ -14,6 +13,7 @@ function createOpenApiCodegenRunner(config, options = {}) {
|
|
|
14
13
|
formatGeneratedFile,
|
|
15
14
|
profiler
|
|
16
15
|
});
|
|
16
|
+
for (const line of profiler.formatLines()) console.info(`[openapi-codegen] ${line}`);
|
|
17
17
|
options.onGenerated?.();
|
|
18
18
|
});
|
|
19
19
|
queue = run.then(() => void 0, () => void 0);
|
|
@@ -38,6 +38,5 @@ function getLocalInputPath(input, root) {
|
|
|
38
38
|
function isLocalOpenApiInput(input) {
|
|
39
39
|
return typeof input === "string" && !/^https?:\/\//i.test(input);
|
|
40
40
|
}
|
|
41
|
-
|
|
42
41
|
//#endregion
|
|
43
|
-
export { createOpenApiCodegenRunner as t };
|
|
42
|
+
export { createOpenApiCodegenRunner as t };
|
|
@@ -2,7 +2,6 @@ import fs from "fs";
|
|
|
2
2
|
import path, { join } from "path";
|
|
3
3
|
import { pathToFileURL } from "url";
|
|
4
4
|
import { access, readdir } from "fs/promises";
|
|
5
|
-
|
|
6
5
|
//#region src/tiny/openapi.ts
|
|
7
6
|
async function importRuntimeModule(specifier) {
|
|
8
7
|
return new Function("specifier", "return import(specifier)")(specifier);
|
|
@@ -20,7 +19,7 @@ const PAGINATION_PROPERTY_NAMES = [
|
|
|
20
19
|
"limit",
|
|
21
20
|
"totalItems"
|
|
22
21
|
];
|
|
23
|
-
const OPENAPI_31_ONLY_KEYS = new Set([
|
|
22
|
+
const OPENAPI_31_ONLY_KEYS = /* @__PURE__ */ new Set([
|
|
24
23
|
"$schema",
|
|
25
24
|
"$id",
|
|
26
25
|
"$vocabulary",
|
|
@@ -586,13 +585,18 @@ function toOpenAPI30Document(spec) {
|
|
|
586
585
|
return converted;
|
|
587
586
|
}
|
|
588
587
|
async function generateORPCOpenAPISpec(options) {
|
|
589
|
-
const
|
|
590
|
-
const
|
|
591
|
-
const
|
|
592
|
-
const
|
|
588
|
+
const profile = process.env.TINY_OPENAPI_PROFILE === "1";
|
|
589
|
+
const started = performance.now();
|
|
590
|
+
const runtimePromise = Promise.all([importRuntimeModule("@orpc/openapi"), importRuntimeModule("@orpc/zod/zod4")]);
|
|
591
|
+
const modelSchemasPromise = collectModelSchemaExports({
|
|
593
592
|
apiRoot: options.apiRoot,
|
|
594
593
|
dbTablesRoot: options.dbTablesRoot
|
|
595
594
|
});
|
|
595
|
+
const [[{ OpenAPIGenerator }, { ZodToJsonSchemaConverter }], modelSchemas] = await Promise.all([runtimePromise, modelSchemasPromise]);
|
|
596
|
+
const generator = new OpenAPIGenerator({ schemaConverters: [new ZodToJsonSchemaConverter()] });
|
|
597
|
+
const afterRuntime = performance.now();
|
|
598
|
+
const explicitSchemaName = options.getOpenApiSchemaName ?? getOpenApiSchemaName;
|
|
599
|
+
const afterModels = performance.now();
|
|
596
600
|
const getSchemaName = createModelSchemaNameGetter(modelSchemas, explicitSchemaName);
|
|
597
601
|
const operationMeta = collectOperationMeta(options.contract);
|
|
598
602
|
const extraSchemas = collectExtraSchemas(options.apiModules);
|
|
@@ -608,6 +612,7 @@ async function generateORPCOpenAPISpec(options) {
|
|
|
608
612
|
...extraSchemas,
|
|
609
613
|
...reachableModelSchemas
|
|
610
614
|
};
|
|
615
|
+
const afterCollection = performance.now();
|
|
611
616
|
const spec = await generator.generate(options.contract, {
|
|
612
617
|
info: options.info ?? {
|
|
613
618
|
title: "Tiny Template Fake API",
|
|
@@ -621,6 +626,7 @@ async function generateORPCOpenAPISpec(options) {
|
|
|
621
626
|
...Object.keys(commonSchemas).length > 0 ? { commonSchemas } : {}
|
|
622
627
|
});
|
|
623
628
|
const jsonSpec = spec;
|
|
629
|
+
const afterGeneration = performance.now();
|
|
624
630
|
const sortableSchemaNames = options.realBackendSortableSchemaNames instanceof Map ? options.realBackendSortableSchemaNames : new Map(Object.entries(options.realBackendSortableSchemaNames ?? {}));
|
|
625
631
|
applyOperationMeta(jsonSpec, operationMeta, options.apiModules);
|
|
626
632
|
applyEnumExtensions(spec);
|
|
@@ -643,9 +649,13 @@ async function generateORPCOpenAPISpec(options) {
|
|
|
643
649
|
}
|
|
644
650
|
applyRobodevModuleExtensions(jsonSpec, robodevModuleExtensions, options.apiModules);
|
|
645
651
|
applyRobodevUserRolesExtension(jsonSpec, userRoles);
|
|
646
|
-
|
|
652
|
+
const output = toOpenAPI30Document(jsonSpec);
|
|
653
|
+
if (profile) {
|
|
654
|
+
const finished = performance.now();
|
|
655
|
+
console.error(`tiny openapi profile runtime=${(afterRuntime - started).toFixed(1)}ms models=${(afterModels - afterRuntime).toFixed(1)}ms collection=${(afterCollection - afterModels).toFixed(1)}ms orpc=${(afterGeneration - afterCollection).toFixed(1)}ms post=${(finished - afterGeneration).toFixed(1)}ms total=${(finished - started).toFixed(1)}ms`);
|
|
656
|
+
}
|
|
657
|
+
return output;
|
|
647
658
|
}
|
|
648
|
-
|
|
649
659
|
//#endregion
|
|
650
660
|
//#region src/tiny/openapi-source.runner.ts
|
|
651
661
|
function createTinyOpenApiSourceRunner(config) {
|
|
@@ -700,6 +710,5 @@ async function loadOpenApiSpecGenerator(config) {
|
|
|
700
710
|
if (typeof generateOpenApiSpec !== "function") throw new Error(`Tiny OpenAPI spec module "${moduleConfig.path}" does not export function "${exportName}".`);
|
|
701
711
|
return generateOpenApiSpec;
|
|
702
712
|
}
|
|
703
|
-
|
|
704
713
|
//#endregion
|
|
705
|
-
export { namedControllerActionInputDtoSchema as $, generateORPCOpenAPISpec as A, getOperationController as B, collectReachableModelSchemas as C, defineOpenApiSchemas as D, createModelSchemaNameGetter as E, getModuleOpenApiController as F, isContractProcedure as G, getProcedureInputSchemaRole as H, getModuleOpenApiTag as I, isObject as J, isNullSchema as K, getObjectPropertySchema as L, getComponentSchemas as M, getContractProcedureData as N, findComponentEnumNames as O, getDerivedOperationId as P, modelSchemaNameEntries as Q, getOpenApiSchemaName as R, collectOperationTags as S, compactTagName as T, getRobodevModuleRoles as U, getPaginatedItemSchema as V, getStringEnumValues as W, isZodSchema as X, isProcedureMeta as Y, modelSchemaExportName as Z, collectDbTableModelSchemaExports as _, visitZodSchema as _t, addContractSchema as a, operationKey as at, collectModuleModelSchemaExports as b, applyPaginatedItemSchemas as c, routeHasPathParameters as ct, applyRobodevUserRolesExtension as d, sharedSchemaExportName as dt, namedControllerActionSchema as et, asStringArray as f, stripNoContentResponseBodies as ft, collectDbTableModelSchemaExport as g, toPascalCase as gt, collectContractSchemas as h, toOpenAPIAclRule as ht, normalizeWatchFolders as i, namedOpenApiSchema as it, generateOpenApiFile as j, findEnumNames as k, applyParameterExtensions as l, schemaComponentRef as lt, collectContractSchemaRoots as m, toOpenAPI30Schema as mt, getLocalInputPath as n, namedOpenApiRequestSchema as nt, applyEnumExtensions as o, procedureSchemaName as ot, collectApiModelSchemaExports as p, toOpenAPI30Document as pt, isNullableOnlySchema as q, isTinyOpenApiFakeMode as r, namedOpenApiResponseSchema as rt, applyOperationMeta as s, resolveOpenApiOutputPath as st, createTinyOpenApiSourceRunner as t, namedOpenApiOutputSchema as tt, applyRobodevModuleExtensions as u, schemaExportName as ut, collectExtraSchemas as v, collectSchemaRegistryRoots as w, collectOperationMeta as x, collectModelSchemaExports as y, getOperationAction as z };
|
|
714
|
+
export { namedControllerActionInputDtoSchema as $, generateORPCOpenAPISpec as A, getOperationController as B, collectReachableModelSchemas as C, defineOpenApiSchemas as D, createModelSchemaNameGetter as E, getModuleOpenApiController as F, isContractProcedure as G, getProcedureInputSchemaRole as H, getModuleOpenApiTag as I, isObject as J, isNullSchema as K, getObjectPropertySchema as L, getComponentSchemas as M, getContractProcedureData as N, findComponentEnumNames as O, getDerivedOperationId as P, modelSchemaNameEntries as Q, getOpenApiSchemaName as R, collectOperationTags as S, compactTagName as T, getRobodevModuleRoles as U, getPaginatedItemSchema as V, getStringEnumValues as W, isZodSchema as X, isProcedureMeta as Y, modelSchemaExportName as Z, collectDbTableModelSchemaExports as _, visitZodSchema as _t, addContractSchema as a, operationKey as at, collectModuleModelSchemaExports as b, applyPaginatedItemSchemas as c, routeHasPathParameters as ct, applyRobodevUserRolesExtension as d, sharedSchemaExportName as dt, namedControllerActionSchema as et, asStringArray as f, stripNoContentResponseBodies as ft, collectDbTableModelSchemaExport as g, toPascalCase as gt, collectContractSchemas as h, toOpenAPIAclRule as ht, normalizeWatchFolders as i, namedOpenApiSchema as it, generateOpenApiFile as j, findEnumNames as k, applyParameterExtensions as l, schemaComponentRef as lt, collectContractSchemaRoots as m, toOpenAPI30Schema as mt, getLocalInputPath as n, namedOpenApiRequestSchema as nt, applyEnumExtensions as o, procedureSchemaName as ot, collectApiModelSchemaExports as p, toOpenAPI30Document as pt, isNullableOnlySchema as q, isTinyOpenApiFakeMode as r, namedOpenApiResponseSchema as rt, applyOperationMeta as s, resolveOpenApiOutputPath as st, createTinyOpenApiSourceRunner as t, namedOpenApiOutputSchema as tt, applyRobodevModuleExtensions as u, schemaExportName as ut, collectExtraSchemas as v, collectSchemaRegistryRoots as w, collectOperationMeta as x, collectModelSchemaExports as y, getOperationAction as z };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPICodegenConfig } from "./config-
|
|
2
|
-
|
|
1
|
+
import { t as OpenAPICodegenConfig } from "./config-DgrOddSC.mjs";
|
|
3
2
|
//#region src/tiny/openapi.d.ts
|
|
4
3
|
interface GenerateOpenApiFileOptions {
|
|
5
4
|
argv?: readonly string[];
|
|
@@ -79,12 +78,7 @@ interface OrpcContractProcedureData {
|
|
|
79
78
|
successStatus?: number;
|
|
80
79
|
};
|
|
81
80
|
}
|
|
82
|
-
declare function resolveOpenApiOutputPath({
|
|
83
|
-
argv,
|
|
84
|
-
cwd,
|
|
85
|
-
defaultOutput,
|
|
86
|
-
env
|
|
87
|
-
}: GenerateOpenApiFileOptions): string;
|
|
81
|
+
declare function resolveOpenApiOutputPath({ argv, cwd, defaultOutput, env }: GenerateOpenApiFileOptions): string;
|
|
88
82
|
declare function generateOpenApiFile(options: GenerateTinyOpenApiFileOptions): Promise<GenerateOpenApiFileResult>;
|
|
89
83
|
declare function defineOpenApiSchemas<const TSchemas extends OpenApiSchemaRegistry>(schemas: TSchemas): TSchemas;
|
|
90
84
|
declare function collectExtraSchemas<TModules extends Record<string, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OpenAPIV3 } from "openapi-types";
|
|
2
|
-
|
|
3
2
|
//#region src/generators/types/generate.d.ts
|
|
4
3
|
declare enum GenerateType {
|
|
5
4
|
Models = "models",
|
|
@@ -19,6 +18,7 @@ interface ZodGenerateOptions {
|
|
|
19
18
|
schemaSuffix: string;
|
|
20
19
|
enumSuffix: string;
|
|
21
20
|
modelsInCommon?: boolean;
|
|
21
|
+
modelsInModules?: boolean;
|
|
22
22
|
withImplicitRequiredProps?: boolean;
|
|
23
23
|
withDefaultValues?: boolean;
|
|
24
24
|
withDescription?: boolean;
|
|
@@ -27,7 +27,9 @@ interface ZodGenerateOptions {
|
|
|
27
27
|
replaceOptionalWithNullish?: boolean;
|
|
28
28
|
}
|
|
29
29
|
interface EndpointsGenerateOptions {
|
|
30
|
+
restClient: "axios" | "native";
|
|
30
31
|
restClientImportPath: string;
|
|
32
|
+
zodImportPath: string;
|
|
31
33
|
errorHandlingImportPath?: string;
|
|
32
34
|
withDeprecatedEndpoints?: boolean;
|
|
33
35
|
removeOperationPrefixEndingWith?: string;
|
|
@@ -37,6 +39,7 @@ interface EndpointsGenerateOptions {
|
|
|
37
39
|
}
|
|
38
40
|
interface QueriesGenerateOptions {
|
|
39
41
|
queryTypesImportPath: string;
|
|
42
|
+
mutationEffectsImportPath: string;
|
|
40
43
|
axiosRequestConfig?: boolean;
|
|
41
44
|
mutationEffects?: boolean;
|
|
42
45
|
mutationDefaultOnError?: boolean;
|
|
@@ -64,6 +67,7 @@ interface ACLGenerateOptions {
|
|
|
64
67
|
checkAcl?: boolean;
|
|
65
68
|
abilityContextGenericAppAbilities: boolean;
|
|
66
69
|
abilityContextImportPath?: string;
|
|
70
|
+
aclCheckImportPath: string;
|
|
67
71
|
}
|
|
68
72
|
interface BuilderConfigsGenerateOptions {
|
|
69
73
|
builderConfigs?: boolean;
|
|
@@ -88,6 +92,7 @@ interface BaseGenerateOptions {
|
|
|
88
92
|
excludePathRegex: string;
|
|
89
93
|
excludeRedundantZodSchemas: boolean;
|
|
90
94
|
tsNamespaces: boolean;
|
|
95
|
+
treeShakeableNamespaces?: boolean;
|
|
91
96
|
tsPath: string;
|
|
92
97
|
importPath: "ts" | "relative" | "absolute";
|
|
93
98
|
configs: Record<GenerateType, GenerateConfig>;
|
package/dist/query.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { i as QueryModule, n as InvalidationMapFunc, r as OpenApiQueryConfig, t as InvalidationMap } from "./queryConfig.context-CRJOgf19.mjs";
|
|
2
|
+
import { a as AppQueryOptions, i as AppMutationOptions, n as useMutationEffects, r as AppInfiniteQueryOptions, t as MutationEffectsOptions } from "./useMutationEffects-DIdL8tlx.mjs";
|
|
3
|
+
export { type AppInfiniteQueryOptions, type AppMutationOptions, type AppQueryOptions, type InvalidationMap, type InvalidationMapFunc, type MutationEffectsOptions, OpenApiQueryConfig, type QueryModule, useMutationEffects };
|
package/dist/query.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
import { QueryKey } from "@tanstack/react-query";
|
|
3
|
+
//#region src/lib/config/queryConfig.context.d.ts
|
|
4
|
+
type QueryModule = string | number | symbol;
|
|
5
|
+
type InvalidationMapFunc<TData = any, TVariables = any> = (data: TData, variables: TVariables) => QueryKey[];
|
|
6
|
+
type InvalidationMap<TQueryModule extends QueryModule = QueryModule, TData = any, TVariables = any> = Partial<Record<TQueryModule, InvalidationMapFunc<TData, TVariables>>>;
|
|
7
|
+
declare namespace OpenApiQueryConfig {
|
|
8
|
+
export interface Type<TQueryModule extends QueryModule = QueryModule> {
|
|
9
|
+
preferUpdate?: boolean;
|
|
10
|
+
invalidateCurrentModule?: boolean;
|
|
11
|
+
invalidationMap?: InvalidationMap<TQueryModule>;
|
|
12
|
+
crossTabInvalidation?: boolean;
|
|
13
|
+
allowInvalidResponseData?: boolean;
|
|
14
|
+
onError?: (error: unknown) => void;
|
|
15
|
+
}
|
|
16
|
+
type ProviderProps<TQueryModule extends QueryModule = QueryModule> = Type<TQueryModule>;
|
|
17
|
+
export function Provider<TQueryModule extends QueryModule = QueryModule>({ preferUpdate, invalidateCurrentModule, invalidationMap, crossTabInvalidation, allowInvalidResponseData, onError, children }: PropsWithChildren<ProviderProps<TQueryModule>>): import("react").JSX.Element;
|
|
18
|
+
export const useConfig: <TQueryModule extends QueryModule = QueryModule>() => Type<TQueryModule>;
|
|
19
|
+
export {};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { QueryModule as i, InvalidationMapFunc as n, OpenApiQueryConfig as r, InvalidationMap as t };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createContext, use, useMemo } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/lib/config/queryConfig.context.tsx
|
|
4
|
+
let OpenApiQueryConfig;
|
|
5
|
+
(function(_OpenApiQueryConfig) {
|
|
6
|
+
const Context = createContext({});
|
|
7
|
+
function Provider({ preferUpdate, invalidateCurrentModule, invalidationMap, crossTabInvalidation, allowInvalidResponseData, onError, children }) {
|
|
8
|
+
const value = useMemo(() => ({
|
|
9
|
+
preferUpdate,
|
|
10
|
+
invalidateCurrentModule,
|
|
11
|
+
invalidationMap,
|
|
12
|
+
crossTabInvalidation,
|
|
13
|
+
allowInvalidResponseData,
|
|
14
|
+
onError
|
|
15
|
+
}), [
|
|
16
|
+
preferUpdate,
|
|
17
|
+
invalidateCurrentModule,
|
|
18
|
+
invalidationMap,
|
|
19
|
+
crossTabInvalidation,
|
|
20
|
+
allowInvalidResponseData,
|
|
21
|
+
onError
|
|
22
|
+
]);
|
|
23
|
+
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
24
|
+
value,
|
|
25
|
+
children
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
_OpenApiQueryConfig.Provider = Provider;
|
|
29
|
+
_OpenApiQueryConfig.useConfig = () => {
|
|
30
|
+
return use(Context) ?? {};
|
|
31
|
+
};
|
|
32
|
+
})(OpenApiQueryConfig || (OpenApiQueryConfig = {}));
|
|
33
|
+
//#endregion
|
|
34
|
+
export { OpenApiQueryConfig as t };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { a as ErrorHandler, s as GeneralErrorCodes$1 } from "./error-handling-LPEPQV1V.mjs";
|
|
2
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse, CreateAxiosDefaults } from "axios";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/lib/rest/rest-interceptor.d.ts
|
|
5
|
+
declare class RestInterceptor<T extends any[]> {
|
|
6
|
+
private applyInterceptor;
|
|
7
|
+
private interceptorIdMap;
|
|
8
|
+
constructor(applyInterceptor: (client: AxiosInstance, ...args: T) => number);
|
|
9
|
+
addInterceptor(client: AxiosInstance, ...args: T): void;
|
|
10
|
+
removeInterceptor(client: AxiosInstance): void;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/lib/rest/rest-client.types.d.ts
|
|
14
|
+
type GeneralErrorCodes = string;
|
|
15
|
+
interface RequestInfo<ZOutput, ECodes extends string> {
|
|
16
|
+
resSchema: z.ZodType<ZOutput>;
|
|
17
|
+
errorHandler?: ErrorHandler<ECodes>;
|
|
18
|
+
}
|
|
19
|
+
interface RequestConfig<IsRawRes extends boolean = false> {
|
|
20
|
+
rawResponse?: IsRawRes;
|
|
21
|
+
allowInvalidResponseData?: boolean;
|
|
22
|
+
}
|
|
23
|
+
type Response<ZOutput, IsRawRes extends boolean = false> = IsRawRes extends true ? AxiosResponse<ZOutput> : ZOutput;
|
|
24
|
+
interface RestClient$1 {
|
|
25
|
+
attachInterceptors<T extends any[]>(interceptors?: RestInterceptor<T>[], ...args: T): void;
|
|
26
|
+
attachInterceptor<T extends any[]>(interceptor: RestInterceptor<T>, ...args: T): void;
|
|
27
|
+
ejectInterceptor<T extends any[]>(interceptor: RestInterceptor<T>): void;
|
|
28
|
+
get<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
29
|
+
post<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
30
|
+
patch<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
31
|
+
put<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
32
|
+
delete<ZOutput, ECodes extends string = GeneralErrorCodes, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/lib/rest/rest-client.d.ts
|
|
36
|
+
declare class RestClient implements RestClient$1 {
|
|
37
|
+
private readonly client;
|
|
38
|
+
private readonly errorHandler;
|
|
39
|
+
constructor({ config, interceptors, errorHandler }?: {
|
|
40
|
+
config?: CreateAxiosDefaults;
|
|
41
|
+
interceptors?: RestInterceptor<any[]>[];
|
|
42
|
+
errorHandler?: ErrorHandler<any>;
|
|
43
|
+
});
|
|
44
|
+
attachInterceptors<T extends any[]>(interceptors?: RestInterceptor<T>[], ...args: T): void;
|
|
45
|
+
attachInterceptor<T extends any[]>(interceptor: RestInterceptor<T>, ...args: T): void;
|
|
46
|
+
ejectInterceptor<T extends any[]>(interceptor: RestInterceptor<T>): void;
|
|
47
|
+
get<ZOutput, ECodes extends string = GeneralErrorCodes$1, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
48
|
+
post<ZOutput, ECodes extends string = GeneralErrorCodes$1, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
49
|
+
patch<ZOutput, ECodes extends string = GeneralErrorCodes$1, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
50
|
+
put<ZOutput, ECodes extends string = GeneralErrorCodes$1, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
51
|
+
delete<ZOutput, ECodes extends string = GeneralErrorCodes$1, IsRawRes extends boolean = false>(requestInfo: RequestInfo<ZOutput, ECodes>, url: string, data?: any, requestConfig?: AxiosRequestConfig & RequestConfig<IsRawRes>): Promise<Response<ZOutput, IsRawRes>>;
|
|
52
|
+
private makeRequest;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { RestClient$1 as a, Response as i, RequestConfig as n, RestInterceptor as o, RequestInfo as r, RestClient as t };
|