@hey-api/openapi-ts 0.78.3 → 0.79.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 +34 -13
- package/bin/index.cjs +8 -0
- package/dist/chunk-H4ADXQ4D.js +39 -0
- package/dist/chunk-H4ADXQ4D.js.map +1 -0
- package/dist/clients/axios/types.ts +2 -1
- package/dist/clients/core/params.ts +10 -0
- package/dist/clients/core/types.ts +14 -0
- package/dist/index.cjs +65 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +11 -11
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-CaH9PF-K.d.cts → types.d-BRYhp7DX.d.cts} +1783 -268
- package/dist/{types.d-CaH9PF-K.d.ts → types.d-BRYhp7DX.d.ts} +1783 -268
- package/package.json +2 -1
- package/dist/chunk-YJGQGZQU.js +0 -39
- package/dist/chunk-YJGQGZQU.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Comments, I as ImportExportItemObject, t as tsNodeToString, s as stringToTsNodes, P as PluginHandler, a as Plugin, S as StringCase, U as UserConfig, b as Client, c as IR } from './types.d-
|
|
2
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, L as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject } from './types.d-
|
|
1
|
+
import { C as Comments, I as ImportExportItemObject, t as tsNodeToString, s as stringToTsNodes, P as PluginHandler, a as Plugin, S as StringCase, U as UserConfig, b as Client, c as IR } from './types.d-BRYhp7DX.cjs';
|
|
2
|
+
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, L as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject } from './types.d-BRYhp7DX.cjs';
|
|
3
3
|
import * as ts from 'typescript';
|
|
4
4
|
import ts__default from 'typescript';
|
|
5
5
|
import 'node:fs';
|
|
@@ -51,7 +51,7 @@ declare const compiler: {
|
|
|
51
51
|
multiLine?: boolean;
|
|
52
52
|
parameters?: FunctionParameter[];
|
|
53
53
|
returnType?: string | ts.TypeNode;
|
|
54
|
-
statements?: ts.Statement
|
|
54
|
+
statements?: ReadonlyArray<ts.Statement>;
|
|
55
55
|
types?: FunctionTypeParameter[];
|
|
56
56
|
}) => ts.FunctionExpression;
|
|
57
57
|
arrayLiteralExpression: <T>({ elements, multiLine, }: {
|
|
@@ -85,7 +85,7 @@ declare const compiler: {
|
|
|
85
85
|
}) => ts.BinaryExpression;
|
|
86
86
|
block: ({ multiLine, statements, }: {
|
|
87
87
|
multiLine?: boolean;
|
|
88
|
-
statements:
|
|
88
|
+
statements: ReadonlyArray<ts.Statement>;
|
|
89
89
|
}) => ts.Block;
|
|
90
90
|
callExpression: ({ functionName, parameters, types, }: {
|
|
91
91
|
functionName: string | ts.PropertyAccessExpression | ts.PropertyAccessChain | ts.ElementAccessExpression | ts.Expression;
|
|
@@ -113,7 +113,7 @@ declare const compiler: {
|
|
|
113
113
|
destructure?: boolean;
|
|
114
114
|
exportConst?: boolean;
|
|
115
115
|
expression: ts.Expression;
|
|
116
|
-
name: string;
|
|
116
|
+
name: string | ts.TypeReferenceNode;
|
|
117
117
|
typeName?: string | ts.IndexedAccessTypeNode | ts.TypeNode;
|
|
118
118
|
}) => ts.VariableStatement;
|
|
119
119
|
constructorDeclaration: ({ accessLevel, comment, multiLine, parameters, statements, }: {
|
|
@@ -126,7 +126,7 @@ declare const compiler: {
|
|
|
126
126
|
enumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({ comments: enumMemberComments, leadingComment: comments, name, obj, }: {
|
|
127
127
|
comments?: Record<string | number, Comments>;
|
|
128
128
|
leadingComment?: Comments;
|
|
129
|
-
name: string;
|
|
129
|
+
name: string | ts.TypeReferenceNode;
|
|
130
130
|
obj: T;
|
|
131
131
|
}) => ts.EnumDeclaration;
|
|
132
132
|
exportAllDeclaration: ({ module, }: {
|
|
@@ -289,13 +289,13 @@ declare const compiler: {
|
|
|
289
289
|
typeAliasDeclaration: ({ comment, exportType, name, type, typeParameters, }: {
|
|
290
290
|
comment?: Comments;
|
|
291
291
|
exportType?: boolean;
|
|
292
|
-
name: string;
|
|
293
|
-
type: string | ts.TypeNode;
|
|
292
|
+
name: string | ts.TypeReferenceNode;
|
|
293
|
+
type: string | ts.TypeNode | ts.Identifier;
|
|
294
294
|
typeParameters?: FunctionTypeParameter[];
|
|
295
295
|
}) => ts.TypeAliasDeclaration;
|
|
296
|
-
typeArrayNode: (types:
|
|
296
|
+
typeArrayNode: (types: ReadonlyArray<any | ts.TypeNode> | ts.TypeNode | ts.Identifier | string, isNullable?: boolean) => ts.TypeNode;
|
|
297
297
|
typeInterfaceNode: ({ indexKey, indexProperty, isNullable, properties, useLegacyResolution, }: {
|
|
298
|
-
indexKey?:
|
|
298
|
+
indexKey?: ts.TypeReferenceNode;
|
|
299
299
|
indexProperty?: Property;
|
|
300
300
|
isNullable?: boolean;
|
|
301
301
|
properties: Property[];
|
|
@@ -306,8 +306,8 @@ declare const compiler: {
|
|
|
306
306
|
types: (any | ts.TypeNode)[];
|
|
307
307
|
}) => ts.TypeNode;
|
|
308
308
|
typeNode: (base: any | ts.TypeNode, args?: (any | ts.TypeNode)[]) => ts.TypeNode;
|
|
309
|
-
typeOfExpression: ({ text }: {
|
|
310
|
-
text: string;
|
|
309
|
+
typeOfExpression: ({ text, }: {
|
|
310
|
+
text: string | ts.Identifier;
|
|
311
311
|
}) => ts.TypeOfExpression;
|
|
312
312
|
typeOperatorNode: ({ operator, type, }: {
|
|
313
313
|
operator: "keyof" | "readonly" | "unique";
|
|
@@ -333,7 +333,7 @@ declare const compiler: {
|
|
|
333
333
|
}) => ts.TypeNode;
|
|
334
334
|
typeUnionNode: ({ isNullable, types, }: {
|
|
335
335
|
isNullable?: boolean;
|
|
336
|
-
types:
|
|
336
|
+
types: ReadonlyArray<any | ts.TypeNode>;
|
|
337
337
|
}) => ts.TypeNode;
|
|
338
338
|
valueToExpression: <T = unknown>({ identifiers, isValueAccess, shorthand, unescape, value, }: {
|
|
339
339
|
identifiers?: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Comments, I as ImportExportItemObject, t as tsNodeToString, s as stringToTsNodes, P as PluginHandler, a as Plugin, S as StringCase, U as UserConfig, b as Client, c as IR } from './types.d-
|
|
2
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, L as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject } from './types.d-
|
|
1
|
+
import { C as Comments, I as ImportExportItemObject, t as tsNodeToString, s as stringToTsNodes, P as PluginHandler, a as Plugin, S as StringCase, U as UserConfig, b as Client, c as IR } from './types.d-BRYhp7DX.js';
|
|
2
|
+
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, L as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject } from './types.d-BRYhp7DX.js';
|
|
3
3
|
import * as ts from 'typescript';
|
|
4
4
|
import ts__default from 'typescript';
|
|
5
5
|
import 'node:fs';
|
|
@@ -51,7 +51,7 @@ declare const compiler: {
|
|
|
51
51
|
multiLine?: boolean;
|
|
52
52
|
parameters?: FunctionParameter[];
|
|
53
53
|
returnType?: string | ts.TypeNode;
|
|
54
|
-
statements?: ts.Statement
|
|
54
|
+
statements?: ReadonlyArray<ts.Statement>;
|
|
55
55
|
types?: FunctionTypeParameter[];
|
|
56
56
|
}) => ts.FunctionExpression;
|
|
57
57
|
arrayLiteralExpression: <T>({ elements, multiLine, }: {
|
|
@@ -85,7 +85,7 @@ declare const compiler: {
|
|
|
85
85
|
}) => ts.BinaryExpression;
|
|
86
86
|
block: ({ multiLine, statements, }: {
|
|
87
87
|
multiLine?: boolean;
|
|
88
|
-
statements:
|
|
88
|
+
statements: ReadonlyArray<ts.Statement>;
|
|
89
89
|
}) => ts.Block;
|
|
90
90
|
callExpression: ({ functionName, parameters, types, }: {
|
|
91
91
|
functionName: string | ts.PropertyAccessExpression | ts.PropertyAccessChain | ts.ElementAccessExpression | ts.Expression;
|
|
@@ -113,7 +113,7 @@ declare const compiler: {
|
|
|
113
113
|
destructure?: boolean;
|
|
114
114
|
exportConst?: boolean;
|
|
115
115
|
expression: ts.Expression;
|
|
116
|
-
name: string;
|
|
116
|
+
name: string | ts.TypeReferenceNode;
|
|
117
117
|
typeName?: string | ts.IndexedAccessTypeNode | ts.TypeNode;
|
|
118
118
|
}) => ts.VariableStatement;
|
|
119
119
|
constructorDeclaration: ({ accessLevel, comment, multiLine, parameters, statements, }: {
|
|
@@ -126,7 +126,7 @@ declare const compiler: {
|
|
|
126
126
|
enumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({ comments: enumMemberComments, leadingComment: comments, name, obj, }: {
|
|
127
127
|
comments?: Record<string | number, Comments>;
|
|
128
128
|
leadingComment?: Comments;
|
|
129
|
-
name: string;
|
|
129
|
+
name: string | ts.TypeReferenceNode;
|
|
130
130
|
obj: T;
|
|
131
131
|
}) => ts.EnumDeclaration;
|
|
132
132
|
exportAllDeclaration: ({ module, }: {
|
|
@@ -289,13 +289,13 @@ declare const compiler: {
|
|
|
289
289
|
typeAliasDeclaration: ({ comment, exportType, name, type, typeParameters, }: {
|
|
290
290
|
comment?: Comments;
|
|
291
291
|
exportType?: boolean;
|
|
292
|
-
name: string;
|
|
293
|
-
type: string | ts.TypeNode;
|
|
292
|
+
name: string | ts.TypeReferenceNode;
|
|
293
|
+
type: string | ts.TypeNode | ts.Identifier;
|
|
294
294
|
typeParameters?: FunctionTypeParameter[];
|
|
295
295
|
}) => ts.TypeAliasDeclaration;
|
|
296
|
-
typeArrayNode: (types:
|
|
296
|
+
typeArrayNode: (types: ReadonlyArray<any | ts.TypeNode> | ts.TypeNode | ts.Identifier | string, isNullable?: boolean) => ts.TypeNode;
|
|
297
297
|
typeInterfaceNode: ({ indexKey, indexProperty, isNullable, properties, useLegacyResolution, }: {
|
|
298
|
-
indexKey?:
|
|
298
|
+
indexKey?: ts.TypeReferenceNode;
|
|
299
299
|
indexProperty?: Property;
|
|
300
300
|
isNullable?: boolean;
|
|
301
301
|
properties: Property[];
|
|
@@ -306,8 +306,8 @@ declare const compiler: {
|
|
|
306
306
|
types: (any | ts.TypeNode)[];
|
|
307
307
|
}) => ts.TypeNode;
|
|
308
308
|
typeNode: (base: any | ts.TypeNode, args?: (any | ts.TypeNode)[]) => ts.TypeNode;
|
|
309
|
-
typeOfExpression: ({ text }: {
|
|
310
|
-
text: string;
|
|
309
|
+
typeOfExpression: ({ text, }: {
|
|
310
|
+
text: string | ts.Identifier;
|
|
311
311
|
}) => ts.TypeOfExpression;
|
|
312
312
|
typeOperatorNode: ({ operator, type, }: {
|
|
313
313
|
operator: "keyof" | "readonly" | "unique";
|
|
@@ -333,7 +333,7 @@ declare const compiler: {
|
|
|
333
333
|
}) => ts.TypeNode;
|
|
334
334
|
typeUnionNode: ({ isNullable, types, }: {
|
|
335
335
|
isNullable?: boolean;
|
|
336
|
-
types:
|
|
336
|
+
types: ReadonlyArray<any | ts.TypeNode>;
|
|
337
337
|
}) => ts.TypeNode;
|
|
338
338
|
valueToExpression: <T = unknown>({ identifiers, isValueAccess, shorthand, unescape, value, }: {
|
|
339
339
|
identifiers?: string[];
|