@hey-api/openapi-ts 0.87.5 → 0.88.1
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 +19 -2
- package/bin/run.js +2 -2
- package/dist/{config-CK1EGY2d.d.cts → config-C5xWXzTz.d.cts} +2479 -1966
- package/dist/{config-DHUTNwtw.d.ts → config-eqVtXEeO.d.mts} +2405 -1892
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -1622
- package/dist/index.d.mts +101 -0
- package/dist/index.mjs +1 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/{internal.d.ts → internal.d.mts} +2 -2
- package/dist/internal.mjs +1 -0
- package/dist/openApi-DlyxIg9f.mjs +17 -0
- package/dist/openApi-DlyxIg9f.mjs.map +1 -0
- package/dist/openApi-DszQAwQH.cjs +17 -0
- package/dist/openApi-DszQAwQH.cjs.map +1 -0
- package/dist/run.cjs +1 -1
- package/dist/run.cjs.map +1 -1
- package/dist/run.mjs +3 -0
- package/dist/run.mjs.map +1 -0
- package/dist/src-9qIIwEzI.cjs +19 -0
- package/dist/{src-DmdEIcct.cjs.map → src-9qIIwEzI.cjs.map} +1 -1
- package/dist/src-BNSjnWaN.mjs +11 -0
- package/dist/src-BNSjnWaN.mjs.map +1 -0
- package/package.json +11 -11
- package/dist/chunk-C-EqMg7d.js +0 -1
- package/dist/index.d.ts +0 -1719
- package/dist/index.js +0 -1
- package/dist/internal.js +0 -1
- package/dist/openApi-BKUOqJVi.cjs +0 -19
- package/dist/openApi-BKUOqJVi.cjs.map +0 -1
- package/dist/openApi-QNcKaSPP.js +0 -19
- package/dist/openApi-QNcKaSPP.js.map +0 -1
- package/dist/run.js +0 -3
- package/dist/run.js.map +0 -1
- package/dist/src-D4L_i8zt.js +0 -11
- package/dist/src-D4L_i8zt.js.map +0 -1
- package/dist/src-DmdEIcct.cjs +0 -19
- /package/dist/{run.d.ts → run.d.mts} +0 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { A as StringCase, C as PluginHandler, D as Client$3, E as Client$4, M as LazyOrAsync, N as MaybeArray, O as Client$1, S as Client$2, T as Client$5, _ as $, a as Plugin, b as TsDsl, c as OpenApiOperationObject, d as OpenApiResponseObject, f as OpenApiSchemaObject, g as ExpressionTransformer, h as TypeTransformer, i as DefinePlugin, j as IR, k as Client, l as OpenApiParameterObject, m as Logger, n as UserConfig, o as OpenApi, p as Context, s as OpenApiMetaObject, u as OpenApiRequestBodyObject, v as DollarTsDsl, w as Client$6, x as TypeTsDsl, y as MaybeTsDsl } from "./config-eqVtXEeO.mjs";
|
|
2
|
+
import "@hey-api/codegen-core";
|
|
3
|
+
|
|
4
|
+
//#region src/generate.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generate a client from the provided configuration.
|
|
8
|
+
*
|
|
9
|
+
* @param userConfig User provided {@link UserConfig} configuration(s).
|
|
10
|
+
*/
|
|
11
|
+
declare const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: Logger) => Promise<ReadonlyArray<Context>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/config/parser.d.ts
|
|
14
|
+
declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/config/plugins.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Default plugins used to generate artifacts if plugins aren't specified.
|
|
19
|
+
*/
|
|
20
|
+
declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/plugins/@hey-api/client-core/config.d.ts
|
|
23
|
+
declare const clientDefaultConfig: {
|
|
24
|
+
readonly baseUrl: true;
|
|
25
|
+
readonly bundle: true;
|
|
26
|
+
readonly exportFromIndex: false;
|
|
27
|
+
};
|
|
28
|
+
declare const clientDefaultMeta: {
|
|
29
|
+
readonly dependencies: readonly ["@hey-api/typescript"];
|
|
30
|
+
readonly tags: readonly ["client"];
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/plugins/@hey-api/client-core/plugin.d.ts
|
|
34
|
+
declare const clientPluginHandler: ({
|
|
35
|
+
plugin
|
|
36
|
+
}: Parameters<PluginHandler>[0]) => void;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/plugins/shared/utils/config.d.ts
|
|
39
|
+
declare const definePluginConfig: <T extends Plugin.Types>(defaultConfig: Plugin.Config<T>) => (userConfig?: Omit<T["config"], "name">) => Omit<Plugin.Config<T>, "name"> & {
|
|
40
|
+
/**
|
|
41
|
+
* Cast name to `any` so it doesn't throw type error in `plugins` array.
|
|
42
|
+
* We could allow any `string` as plugin `name` in the object syntax, but
|
|
43
|
+
* that TypeScript trick would cause all string methods to appear as
|
|
44
|
+
* suggested auto completions, which is undesirable.
|
|
45
|
+
*/
|
|
46
|
+
name: any;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/utils/exports.d.ts
|
|
50
|
+
declare const utils: {
|
|
51
|
+
stringCase: ({
|
|
52
|
+
case: _case,
|
|
53
|
+
stripLeadingSeparators,
|
|
54
|
+
value
|
|
55
|
+
}: {
|
|
56
|
+
readonly case: StringCase | undefined;
|
|
57
|
+
stripLeadingSeparators?: boolean;
|
|
58
|
+
value: string;
|
|
59
|
+
}) => string;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/index.d.ts
|
|
63
|
+
declare module '@hey-api/codegen-core' {
|
|
64
|
+
interface ProjectRenderMeta {
|
|
65
|
+
/**
|
|
66
|
+
* If specified, this will be the file extension used when importing
|
|
67
|
+
* other modules. By default, we don't add a file extension and let the
|
|
68
|
+
* runtime resolve it.
|
|
69
|
+
*
|
|
70
|
+
* @default null
|
|
71
|
+
*/
|
|
72
|
+
importFileExtension?: (string & {}) | null;
|
|
73
|
+
}
|
|
74
|
+
interface SymbolMeta {
|
|
75
|
+
category?: 'client' | 'external' | 'hook' | 'schema' | 'sdk' | 'transform' | 'type' | 'utility' | (string & {});
|
|
76
|
+
/**
|
|
77
|
+
* Path to the resource this symbol represents.
|
|
78
|
+
*/
|
|
79
|
+
path?: ReadonlyArray<string | number>;
|
|
80
|
+
/**
|
|
81
|
+
* Name of the plugin that registered this symbol.
|
|
82
|
+
*/
|
|
83
|
+
pluginName?: string;
|
|
84
|
+
resource?: 'client' | 'definition' | 'operation' | 'webhook' | (string & {});
|
|
85
|
+
resourceId?: string;
|
|
86
|
+
role?: 'data' | 'error' | 'errors' | 'options' | 'response' | 'responses' | (string & {});
|
|
87
|
+
/**
|
|
88
|
+
* Tags associated with this symbol.
|
|
89
|
+
*/
|
|
90
|
+
tags?: ReadonlyArray<string>;
|
|
91
|
+
tool?: 'angular' | 'arktype' | 'fastify' | 'json-schema' | 'sdk' | 'typescript' | 'valibot' | 'zod' | (string & {});
|
|
92
|
+
variant?: 'container' | (string & {});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Type helper for openapi-ts.config.ts, returns {@link MaybeArray<UserConfig>} object(s)
|
|
97
|
+
*/
|
|
98
|
+
declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
|
|
99
|
+
//#endregion
|
|
100
|
+
export { $, type Client as AngularClient, type Client$1 as AxiosClient, type Client$2 as Client, type DefinePlugin, DollarTsDsl, type ExpressionTransformer, type Client$3 as FetchClient, type IR, Logger, MaybeTsDsl, type Client$4 as NextClient, type Client$5 as NuxtClient, type Client$6 as OfetchClient, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, type Plugin, TsDsl, type TypeTransformer, TypeTsDsl, type UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, utils };
|
|
101
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,d as n,h as r,l as i,m as a,o,u as s}from"./openApi-DlyxIg9f.mjs";import{i as c,n as l,r as u,t as d}from"./src-BNSjnWaN.mjs";export{s as $,c as Logger,n as TsDsl,t as clientDefaultConfig,i as clientDefaultMeta,o as clientPluginHandler,u as createClient,r as defaultPaginationKeywords,e as defaultPlugins,d as defineConfig,a as definePluginConfig,l as utils};
|
package/dist/internal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./openApi-
|
|
1
|
+
const e=require(`./openApi-DszQAwQH.cjs`);exports.getSpec=e.r,exports.initConfigs=e.i,exports.parseOpenApiSpec=e.t;
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Logger, n as UserConfig, p as Context, r as Input, t as Config } from "./config-
|
|
1
|
+
import { m as Logger, n as UserConfig, p as Context, r as Input, t as Config } from "./config-C5xWXzTz.cjs";
|
|
2
2
|
import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
|
|
3
3
|
|
|
4
4
|
//#region src/config/init.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Logger, n as UserConfig, p as Context, r as Input, t as Config } from "./config-
|
|
1
|
+
import { m as Logger, n as UserConfig, p as Context, r as Input, t as Config } from "./config-eqVtXEeO.mjs";
|
|
2
2
|
import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
|
|
3
3
|
|
|
4
4
|
//#region src/config/init.d.ts
|
|
@@ -88,4 +88,4 @@ declare const parseOpenApiSpec: ({
|
|
|
88
88
|
}) => Context;
|
|
89
89
|
//#endregion
|
|
90
90
|
export { getSpec, initConfigs, parseOpenApiSpec };
|
|
91
|
-
//# sourceMappingURL=internal.d.
|
|
91
|
+
//# sourceMappingURL=internal.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./openApi-DlyxIg9f.mjs";export{t as getSpec,e as initConfigs,n as parseOpenApiSpec};
|