@hey-api/openapi-ts 0.71.1 → 0.72.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/dist/chunk-LGCLNROS.js +39 -0
- package/dist/chunk-LGCLNROS.js.map +1 -0
- package/dist/index.cjs +81 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +170 -171
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +11 -14
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/{types.d-1-e85tL8.d.cts → types.d-DMy4lDbN.d.cts} +19 -2
- package/dist/{types.d-1-e85tL8.d.ts → types.d-DMy4lDbN.d.ts} +19 -2
- package/package.json +4 -3
- package/dist/chunk-EZKCBI4J.js +0 -16
- package/dist/chunk-EZKCBI4J.js.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
2
|
-
import { e as Config, I as IR, W as WatchValues } from './types.d-
|
|
3
|
-
export { i as initConfigs } from './types.d-
|
|
2
|
+
import { e as Config, I as IR, W as WatchValues } from './types.d-DMy4lDbN.cjs';
|
|
3
|
+
export { i as initConfigs } from './types.d-DMy4lDbN.cjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'typescript';
|
|
6
6
|
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
2
|
-
import { e as Config, I as IR, W as WatchValues } from './types.d-
|
|
3
|
-
export { i as initConfigs } from './types.d-
|
|
2
|
+
import { e as Config, I as IR, W as WatchValues } from './types.d-DMy4lDbN.js';
|
|
3
|
+
export { i as initConfigs } from './types.d-DMy4lDbN.js';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'typescript';
|
|
6
6
|
|
package/dist/internal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {createRequire}from'module';export{
|
|
1
|
+
import {createRequire}from'module';export{r as getSpec,F as initConfigs,A as parseOpenApiSpec}from'./chunk-LGCLNROS.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
|
|
2
2
|
//# sourceMappingURL=internal.js.map
|
|
@@ -6783,6 +6783,14 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6783
6783
|
* This option has no effect if `sdk.asClass` is `false`.
|
|
6784
6784
|
*/
|
|
6785
6785
|
classNameBuilder?: string | ((name: string) => string);
|
|
6786
|
+
/**
|
|
6787
|
+
* How should we structure your SDK? By default, we try to infer the ideal
|
|
6788
|
+
* structure using `operationId` keywords. If you prefer a flatter structure,
|
|
6789
|
+
* you can set `classStructure` to `off` to disable this behavior.
|
|
6790
|
+
*
|
|
6791
|
+
* @default 'auto'
|
|
6792
|
+
*/
|
|
6793
|
+
classStructure?: 'auto' | 'off';
|
|
6786
6794
|
/**
|
|
6787
6795
|
* Use an internal client instance to send HTTP requests? This is useful if
|
|
6788
6796
|
* you don't want to manually pass the client to each SDK function.
|
|
@@ -6817,7 +6825,8 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6817
6825
|
*/
|
|
6818
6826
|
instance?: string | boolean;
|
|
6819
6827
|
/**
|
|
6820
|
-
* Customise the name of methods within the service. By default,
|
|
6828
|
+
* Customise the name of methods within the service. By default,
|
|
6829
|
+
* {@link IR.OperationObject.id} or {@link Operation.name} is used.
|
|
6821
6830
|
*/
|
|
6822
6831
|
methodNameBuilder?: (operation: IR.OperationObject | Operation) => string;
|
|
6823
6832
|
// TODO: parser - rename operationId option to something like inferId?: boolean
|
|
@@ -8070,7 +8079,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
|
|
|
8070
8079
|
/**
|
|
8071
8080
|
* Register a new `event` listener.
|
|
8072
8081
|
*/
|
|
8073
|
-
subscribe<T extends keyof Events>(event: T, callbackFn: Events[T]): void;
|
|
8082
|
+
subscribe<T extends keyof Events>(event: T, callbackFn: Events[T], pluginName?: string): void;
|
|
8074
8083
|
}
|
|
8075
8084
|
|
|
8076
8085
|
type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
|
|
@@ -8099,6 +8108,7 @@ interface IROperationObject {
|
|
|
8099
8108
|
description?: string;
|
|
8100
8109
|
id: string;
|
|
8101
8110
|
method: keyof IRPathItemObject;
|
|
8111
|
+
operationId?: string;
|
|
8102
8112
|
parameters?: IRParametersObject;
|
|
8103
8113
|
path: keyof IRPathsObject;
|
|
8104
8114
|
responses?: IRResponsesObject;
|
|
@@ -8245,6 +8255,13 @@ interface IRSchemaObject
|
|
|
8245
8255
|
* When type is `object`, `properties` will contain a map of its properties.
|
|
8246
8256
|
*/
|
|
8247
8257
|
properties?: Record<string, IRSchemaObject>;
|
|
8258
|
+
/**
|
|
8259
|
+
* The names of `properties` can be validated against a schema, irrespective
|
|
8260
|
+
* of their values. This can be useful if you don't want to enforce specific
|
|
8261
|
+
* properties, but you want to make sure that the names of those properties
|
|
8262
|
+
* follow a specific convention.
|
|
8263
|
+
*/
|
|
8264
|
+
propertyNames?: IRSchemaObject;
|
|
8248
8265
|
/**
|
|
8249
8266
|
* Each schema eventually resolves into `type`.
|
|
8250
8267
|
*/
|
|
@@ -6783,6 +6783,14 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6783
6783
|
* This option has no effect if `sdk.asClass` is `false`.
|
|
6784
6784
|
*/
|
|
6785
6785
|
classNameBuilder?: string | ((name: string) => string);
|
|
6786
|
+
/**
|
|
6787
|
+
* How should we structure your SDK? By default, we try to infer the ideal
|
|
6788
|
+
* structure using `operationId` keywords. If you prefer a flatter structure,
|
|
6789
|
+
* you can set `classStructure` to `off` to disable this behavior.
|
|
6790
|
+
*
|
|
6791
|
+
* @default 'auto'
|
|
6792
|
+
*/
|
|
6793
|
+
classStructure?: 'auto' | 'off';
|
|
6786
6794
|
/**
|
|
6787
6795
|
* Use an internal client instance to send HTTP requests? This is useful if
|
|
6788
6796
|
* you don't want to manually pass the client to each SDK function.
|
|
@@ -6817,7 +6825,8 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6817
6825
|
*/
|
|
6818
6826
|
instance?: string | boolean;
|
|
6819
6827
|
/**
|
|
6820
|
-
* Customise the name of methods within the service. By default,
|
|
6828
|
+
* Customise the name of methods within the service. By default,
|
|
6829
|
+
* {@link IR.OperationObject.id} or {@link Operation.name} is used.
|
|
6821
6830
|
*/
|
|
6822
6831
|
methodNameBuilder?: (operation: IR.OperationObject | Operation) => string;
|
|
6823
6832
|
// TODO: parser - rename operationId option to something like inferId?: boolean
|
|
@@ -8070,7 +8079,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
|
|
|
8070
8079
|
/**
|
|
8071
8080
|
* Register a new `event` listener.
|
|
8072
8081
|
*/
|
|
8073
|
-
subscribe<T extends keyof Events>(event: T, callbackFn: Events[T]): void;
|
|
8082
|
+
subscribe<T extends keyof Events>(event: T, callbackFn: Events[T], pluginName?: string): void;
|
|
8074
8083
|
}
|
|
8075
8084
|
|
|
8076
8085
|
type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
|
|
@@ -8099,6 +8108,7 @@ interface IROperationObject {
|
|
|
8099
8108
|
description?: string;
|
|
8100
8109
|
id: string;
|
|
8101
8110
|
method: keyof IRPathItemObject;
|
|
8111
|
+
operationId?: string;
|
|
8102
8112
|
parameters?: IRParametersObject;
|
|
8103
8113
|
path: keyof IRPathsObject;
|
|
8104
8114
|
responses?: IRResponsesObject;
|
|
@@ -8245,6 +8255,13 @@ interface IRSchemaObject
|
|
|
8245
8255
|
* When type is `object`, `properties` will contain a map of its properties.
|
|
8246
8256
|
*/
|
|
8247
8257
|
properties?: Record<string, IRSchemaObject>;
|
|
8258
|
+
/**
|
|
8259
|
+
* The names of `properties` can be validated against a schema, irrespective
|
|
8260
|
+
* of their values. This can be useful if you don't want to enforce specific
|
|
8261
|
+
* properties, but you want to make sure that the names of those properties
|
|
8262
|
+
* follow a specific convention.
|
|
8263
|
+
*/
|
|
8264
|
+
propertyNames?: IRSchemaObject;
|
|
8248
8265
|
/**
|
|
8249
8266
|
* Each schema eventually resolves into `type`.
|
|
8250
8267
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hey-api/openapi-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.1",
|
|
4
4
|
"description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
|
|
5
5
|
"homepage": "https://heyapi.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"c12": "2.0.1",
|
|
82
82
|
"color-support": "1.1.3",
|
|
83
83
|
"commander": "13.0.0",
|
|
84
|
-
"handlebars": "4.7.8"
|
|
84
|
+
"handlebars": "4.7.8",
|
|
85
|
+
"open": "10.1.2"
|
|
85
86
|
},
|
|
86
87
|
"peerDependencies": {
|
|
87
88
|
"typescript": "^5.5.3"
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
"typescript": "5.8.3",
|
|
102
103
|
"yaml": "2.8.0",
|
|
103
104
|
"@config/vite-base": "0.0.1",
|
|
104
|
-
"@hey-api/client-core": "0.
|
|
105
|
+
"@hey-api/client-core": "0.2.0"
|
|
105
106
|
},
|
|
106
107
|
"scripts": {
|
|
107
108
|
"build": "tsup && pnpm check-exports",
|