@hey-api/openapi-ts 0.84.3 → 0.85.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/bin/index.cjs +2 -9
- package/dist/chunk-JIKOAZJ5.js +47 -0
- package/dist/chunk-JIKOAZJ5.js.map +1 -0
- package/dist/clients/angular/index.ts +1 -0
- package/dist/clients/axios/index.ts +1 -0
- package/dist/clients/core/queryKeySerializer.ts +134 -0
- package/dist/clients/fetch/index.ts +1 -0
- package/dist/clients/next/index.ts +1 -0
- package/dist/clients/nuxt/index.ts +1 -0
- package/dist/clients/ofetch/index.ts +1 -0
- package/dist/clients/ofetch/utils.ts +1 -0
- package/dist/index.cjs +87 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -12
- package/dist/index.d.ts +18 -12
- package/dist/index.js +182 -163
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +19 -19
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +26 -18
- package/dist/internal.d.ts +26 -18
- package/dist/internal.js +1 -1
- package/dist/{types.d-fB2fiwrL.d.cts → types.d-DIu3K5QP.d.cts} +253 -126
- package/dist/{types.d-fB2fiwrL.d.ts → types.d-DIu3K5QP.d.ts} +253 -126
- package/package.json +3 -3
- package/dist/chunk-7LVATX6U.js +0 -54
- package/dist/chunk-7LVATX6U.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, L as Logger, b as Client$7, c as IR } from './types.d-fB2fiwrL.cjs';
|
|
4
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, k as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-fB2fiwrL.cjs';
|
|
1
|
+
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, L as LazyOrAsync, M as MaybeArray, U as UserConfig, b as Logger, c as Client$7, d as IR } from './types.d-DIu3K5QP.cjs';
|
|
2
|
+
export { k as Client, D as DefinePlugin, E as ExpressionTransformer, l as LegacyIR, O as OpenApi, e as OpenApiMetaObject, f as OpenApiOperationObject, g as OpenApiParameterObject, h as OpenApiRequestBodyObject, i as OpenApiResponseObject, j as OpenApiSchemaObject, T as TypeTransformer } from './types.d-DIu3K5QP.cjs';
|
|
5
3
|
import { HttpHeaders, HttpClient, HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
|
6
4
|
import { Injector } from '@angular/core';
|
|
7
5
|
import { CreateAxiosDefaults, AxiosStatic, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios';
|
|
8
6
|
import { UseFetchOptions, AsyncDataOptions, useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';
|
|
9
7
|
import { Ref } from 'vue';
|
|
10
8
|
import { FetchOptions as FetchOptions$1, ofetch, ResponseType } from 'ofetch';
|
|
9
|
+
import * as typescript from 'typescript';
|
|
10
|
+
import typescript__default from 'typescript';
|
|
11
11
|
import 'semver';
|
|
12
12
|
import '@hey-api/codegen-core';
|
|
13
13
|
import 'node:fs';
|
|
14
14
|
|
|
15
15
|
declare module '@hey-api/codegen-core' {
|
|
16
16
|
interface ProjectRenderMeta {
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* If specified, this will be the file extension used when importing
|
|
19
|
+
* other modules. By default, we don't add a file extension and let the
|
|
20
|
+
* runtime resolve it.
|
|
21
|
+
*
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
importFileExtension?: (string & {}) | null;
|
|
18
25
|
}
|
|
19
26
|
|
|
20
27
|
interface SymbolMeta {
|
|
@@ -971,7 +978,7 @@ declare const tsc: {
|
|
|
971
978
|
}) => typescript.AwaitExpression;
|
|
972
979
|
binaryExpression: ({ left, operator, right, }: {
|
|
973
980
|
left: typescript.Expression;
|
|
974
|
-
operator?: "=" | "===" | "in" | "??";
|
|
981
|
+
operator?: "=" | "===" | "!==" | "in" | "??";
|
|
975
982
|
right: typescript.Expression | string;
|
|
976
983
|
}) => typescript.BinaryExpression;
|
|
977
984
|
block: ({ multiLine, statements, }: {
|
|
@@ -1277,7 +1284,7 @@ declare const compiler: {
|
|
|
1277
1284
|
}) => typescript.AwaitExpression;
|
|
1278
1285
|
binaryExpression: ({ left, operator, right, }: {
|
|
1279
1286
|
left: typescript.Expression;
|
|
1280
|
-
operator?: "=" | "===" | "in" | "??";
|
|
1287
|
+
operator?: "=" | "===" | "!==" | "in" | "??";
|
|
1281
1288
|
right: typescript.Expression | string;
|
|
1282
1289
|
}) => typescript.BinaryExpression;
|
|
1283
1290
|
block: ({ multiLine, statements, }: {
|
|
@@ -1555,16 +1562,15 @@ declare const utils: {
|
|
|
1555
1562
|
}) => string;
|
|
1556
1563
|
};
|
|
1557
1564
|
|
|
1558
|
-
type Configs = UserConfig | (() => UserConfig) | (() => Promise<UserConfig>);
|
|
1559
1565
|
/**
|
|
1560
1566
|
* Generate a client from the provided configuration.
|
|
1561
1567
|
*
|
|
1562
|
-
* @param userConfig User provided {@link UserConfig} configuration.
|
|
1568
|
+
* @param userConfig User provided {@link UserConfig} configuration(s).
|
|
1563
1569
|
*/
|
|
1564
|
-
declare const createClient: (userConfig?:
|
|
1570
|
+
declare const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: Logger) => Promise<ReadonlyArray<Client$7 | IR.Context>>;
|
|
1565
1571
|
/**
|
|
1566
|
-
* Type helper for openapi-ts.config.ts, returns {@link UserConfig} object
|
|
1572
|
+
* Type helper for openapi-ts.config.ts, returns {@link MaybeArray<UserConfig>} object(s)
|
|
1567
1573
|
*/
|
|
1568
|
-
declare const defineConfig: (config:
|
|
1574
|
+
declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
|
|
1569
1575
|
|
|
1570
1576
|
export { type Client$5 as AngularClient, type Client$4 as AxiosClient, type Client$3 as FetchClient, IR, Logger, type Client$2 as NextClient, type Client$1 as NuxtClient, type Client as OfetchClient, Plugin, UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, compiler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, tsc, utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, L as Logger, b as Client$7, c as IR } from './types.d-fB2fiwrL.js';
|
|
4
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, k as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-fB2fiwrL.js';
|
|
1
|
+
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, L as LazyOrAsync, M as MaybeArray, U as UserConfig, b as Logger, c as Client$7, d as IR } from './types.d-DIu3K5QP.js';
|
|
2
|
+
export { k as Client, D as DefinePlugin, E as ExpressionTransformer, l as LegacyIR, O as OpenApi, e as OpenApiMetaObject, f as OpenApiOperationObject, g as OpenApiParameterObject, h as OpenApiRequestBodyObject, i as OpenApiResponseObject, j as OpenApiSchemaObject, T as TypeTransformer } from './types.d-DIu3K5QP.js';
|
|
5
3
|
import { HttpHeaders, HttpClient, HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
|
6
4
|
import { Injector } from '@angular/core';
|
|
7
5
|
import { CreateAxiosDefaults, AxiosStatic, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosError } from 'axios';
|
|
8
6
|
import { UseFetchOptions, AsyncDataOptions, useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from 'nuxt/app';
|
|
9
7
|
import { Ref } from 'vue';
|
|
10
8
|
import { FetchOptions as FetchOptions$1, ofetch, ResponseType } from 'ofetch';
|
|
9
|
+
import * as typescript from 'typescript';
|
|
10
|
+
import typescript__default from 'typescript';
|
|
11
11
|
import 'semver';
|
|
12
12
|
import '@hey-api/codegen-core';
|
|
13
13
|
import 'node:fs';
|
|
14
14
|
|
|
15
15
|
declare module '@hey-api/codegen-core' {
|
|
16
16
|
interface ProjectRenderMeta {
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* If specified, this will be the file extension used when importing
|
|
19
|
+
* other modules. By default, we don't add a file extension and let the
|
|
20
|
+
* runtime resolve it.
|
|
21
|
+
*
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
importFileExtension?: (string & {}) | null;
|
|
18
25
|
}
|
|
19
26
|
|
|
20
27
|
interface SymbolMeta {
|
|
@@ -971,7 +978,7 @@ declare const tsc: {
|
|
|
971
978
|
}) => typescript.AwaitExpression;
|
|
972
979
|
binaryExpression: ({ left, operator, right, }: {
|
|
973
980
|
left: typescript.Expression;
|
|
974
|
-
operator?: "=" | "===" | "in" | "??";
|
|
981
|
+
operator?: "=" | "===" | "!==" | "in" | "??";
|
|
975
982
|
right: typescript.Expression | string;
|
|
976
983
|
}) => typescript.BinaryExpression;
|
|
977
984
|
block: ({ multiLine, statements, }: {
|
|
@@ -1277,7 +1284,7 @@ declare const compiler: {
|
|
|
1277
1284
|
}) => typescript.AwaitExpression;
|
|
1278
1285
|
binaryExpression: ({ left, operator, right, }: {
|
|
1279
1286
|
left: typescript.Expression;
|
|
1280
|
-
operator?: "=" | "===" | "in" | "??";
|
|
1287
|
+
operator?: "=" | "===" | "!==" | "in" | "??";
|
|
1281
1288
|
right: typescript.Expression | string;
|
|
1282
1289
|
}) => typescript.BinaryExpression;
|
|
1283
1290
|
block: ({ multiLine, statements, }: {
|
|
@@ -1555,16 +1562,15 @@ declare const utils: {
|
|
|
1555
1562
|
}) => string;
|
|
1556
1563
|
};
|
|
1557
1564
|
|
|
1558
|
-
type Configs = UserConfig | (() => UserConfig) | (() => Promise<UserConfig>);
|
|
1559
1565
|
/**
|
|
1560
1566
|
* Generate a client from the provided configuration.
|
|
1561
1567
|
*
|
|
1562
|
-
* @param userConfig User provided {@link UserConfig} configuration.
|
|
1568
|
+
* @param userConfig User provided {@link UserConfig} configuration(s).
|
|
1563
1569
|
*/
|
|
1564
|
-
declare const createClient: (userConfig?:
|
|
1570
|
+
declare const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: Logger) => Promise<ReadonlyArray<Client$7 | IR.Context>>;
|
|
1565
1571
|
/**
|
|
1566
|
-
* Type helper for openapi-ts.config.ts, returns {@link UserConfig} object
|
|
1572
|
+
* Type helper for openapi-ts.config.ts, returns {@link MaybeArray<UserConfig>} object(s)
|
|
1567
1573
|
*/
|
|
1568
|
-
declare const defineConfig: (config:
|
|
1574
|
+
declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
|
|
1569
1575
|
|
|
1570
1576
|
export { type Client$5 as AngularClient, type Client$4 as AxiosClient, type Client$3 as FetchClient, IR, Logger, type Client$2 as NextClient, type Client$1 as NuxtClient, type Client as OfetchClient, Plugin, UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, compiler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, tsc, utils };
|