@hey-api/openapi-ts 0.71.0 → 0.72.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/dist/chunk-LVVLHTNY.js +39 -0
- package/dist/chunk-LVVLHTNY.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-Dy-fBrKf.d.cts → types.d-DMy4lDbN.d.cts} +22 -4
- package/dist/{types.d-Dy-fBrKf.d.ts → types.d-DMy4lDbN.d.ts} +22 -4
- package/package.json +4 -3
- package/dist/chunk-LBEWMSUW.js +0 -16
- package/dist/chunk-LBEWMSUW.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-LVVLHTNY.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
|
|
@@ -7374,11 +7383,12 @@ interface Input {
|
|
|
7374
7383
|
* **This is an experimental feature.**
|
|
7375
7384
|
*
|
|
7376
7385
|
* Validate the input before generating output? This is an experimental,
|
|
7377
|
-
* lightweight feature and support will be added on an ad hoc basis.
|
|
7386
|
+
* lightweight feature and support will be added on an ad hoc basis. Setting
|
|
7387
|
+
* `validate_EXPERIMENTAL` to `true` is the same as `warn`.
|
|
7378
7388
|
*
|
|
7379
7389
|
* @default false
|
|
7380
7390
|
*/
|
|
7381
|
-
validate_EXPERIMENTAL?: boolean;
|
|
7391
|
+
validate_EXPERIMENTAL?: boolean | 'strict' | 'warn';
|
|
7382
7392
|
/**
|
|
7383
7393
|
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7384
7394
|
*
|
|
@@ -8069,7 +8079,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
|
|
|
8069
8079
|
/**
|
|
8070
8080
|
* Register a new `event` listener.
|
|
8071
8081
|
*/
|
|
8072
|
-
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;
|
|
8073
8083
|
}
|
|
8074
8084
|
|
|
8075
8085
|
type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
|
|
@@ -8098,6 +8108,7 @@ interface IROperationObject {
|
|
|
8098
8108
|
description?: string;
|
|
8099
8109
|
id: string;
|
|
8100
8110
|
method: keyof IRPathItemObject;
|
|
8111
|
+
operationId?: string;
|
|
8101
8112
|
parameters?: IRParametersObject;
|
|
8102
8113
|
path: keyof IRPathsObject;
|
|
8103
8114
|
responses?: IRResponsesObject;
|
|
@@ -8244,6 +8255,13 @@ interface IRSchemaObject
|
|
|
8244
8255
|
* When type is `object`, `properties` will contain a map of its properties.
|
|
8245
8256
|
*/
|
|
8246
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;
|
|
8247
8265
|
/**
|
|
8248
8266
|
* Each schema eventually resolves into `type`.
|
|
8249
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
|
|
@@ -7374,11 +7383,12 @@ interface Input {
|
|
|
7374
7383
|
* **This is an experimental feature.**
|
|
7375
7384
|
*
|
|
7376
7385
|
* Validate the input before generating output? This is an experimental,
|
|
7377
|
-
* lightweight feature and support will be added on an ad hoc basis.
|
|
7386
|
+
* lightweight feature and support will be added on an ad hoc basis. Setting
|
|
7387
|
+
* `validate_EXPERIMENTAL` to `true` is the same as `warn`.
|
|
7378
7388
|
*
|
|
7379
7389
|
* @default false
|
|
7380
7390
|
*/
|
|
7381
|
-
validate_EXPERIMENTAL?: boolean;
|
|
7391
|
+
validate_EXPERIMENTAL?: boolean | 'strict' | 'warn';
|
|
7382
7392
|
/**
|
|
7383
7393
|
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7384
7394
|
*
|
|
@@ -8069,7 +8079,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
|
|
|
8069
8079
|
/**
|
|
8070
8080
|
* Register a new `event` listener.
|
|
8071
8081
|
*/
|
|
8072
|
-
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;
|
|
8073
8083
|
}
|
|
8074
8084
|
|
|
8075
8085
|
type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
|
|
@@ -8098,6 +8108,7 @@ interface IROperationObject {
|
|
|
8098
8108
|
description?: string;
|
|
8099
8109
|
id: string;
|
|
8100
8110
|
method: keyof IRPathItemObject;
|
|
8111
|
+
operationId?: string;
|
|
8101
8112
|
parameters?: IRParametersObject;
|
|
8102
8113
|
path: keyof IRPathsObject;
|
|
8103
8114
|
responses?: IRResponsesObject;
|
|
@@ -8244,6 +8255,13 @@ interface IRSchemaObject
|
|
|
8244
8255
|
* When type is `object`, `properties` will contain a map of its properties.
|
|
8245
8256
|
*/
|
|
8246
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;
|
|
8247
8265
|
/**
|
|
8248
8266
|
* Each schema eventually resolves into `type`.
|
|
8249
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.0",
|
|
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",
|