@hey-api/openapi-ts 0.65.0 → 0.66.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 +20 -9
- package/dist/index.cjs +73 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -35
- package/dist/index.d.ts +78 -35
- package/dist/index.js +74 -74
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -6733,18 +6733,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6733
6733
|
* @default true
|
|
6734
6734
|
*/
|
|
6735
6735
|
exportFromIndex?: boolean;
|
|
6736
|
-
/**
|
|
6737
|
-
* @deprecated
|
|
6738
|
-
*
|
|
6739
|
-
* **This feature works only with the legacy parser**
|
|
6740
|
-
*
|
|
6741
|
-
* Filter endpoints to be included in the generated SDK. The provided
|
|
6742
|
-
* string should be a regular expression where matched results will be
|
|
6743
|
-
* included in the output. The input pattern this string will be tested
|
|
6744
|
-
* against is `{method} {path}`. For example, you can match
|
|
6745
|
-
* `POST /api/v1/foo` with `^POST /api/v1/foo$`.
|
|
6746
|
-
*/
|
|
6747
|
-
filter?: string;
|
|
6748
6736
|
/**
|
|
6749
6737
|
* Include only service classes with names matching regular expression
|
|
6750
6738
|
*
|
|
@@ -6768,14 +6756,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6768
6756
|
* @default 'sdk'
|
|
6769
6757
|
*/
|
|
6770
6758
|
output?: string;
|
|
6771
|
-
/**
|
|
6772
|
-
* @deprecated
|
|
6773
|
-
*
|
|
6774
|
-
* Define shape of returned value from service calls
|
|
6775
|
-
*
|
|
6776
|
-
* @default 'body'
|
|
6777
|
-
*/
|
|
6778
|
-
response?: 'body' | 'response';
|
|
6779
6759
|
/**
|
|
6780
6760
|
* Customize the generated service class names. The name variable is
|
|
6781
6761
|
* obtained from your OpenAPI specification tags.
|
|
@@ -6811,6 +6791,30 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6811
6791
|
* @default false
|
|
6812
6792
|
*/
|
|
6813
6793
|
validator?: PluginValidatorNames | boolean;
|
|
6794
|
+
|
|
6795
|
+
// DEPRECATED OPTIONS BELOW
|
|
6796
|
+
|
|
6797
|
+
/**
|
|
6798
|
+
* @deprecated
|
|
6799
|
+
*
|
|
6800
|
+
* **This feature works only with the legacy parser**
|
|
6801
|
+
*
|
|
6802
|
+
* Filter endpoints to be included in the generated SDK. The provided
|
|
6803
|
+
* string should be a regular expression where matched results will be
|
|
6804
|
+
* included in the output. The input pattern this string will be tested
|
|
6805
|
+
* against is `{method} {path}`. For example, you can match
|
|
6806
|
+
* `POST /api/v1/foo` with `^POST /api/v1/foo$`.
|
|
6807
|
+
*/
|
|
6808
|
+
// eslint-disable-next-line typescript-sort-keys/interface
|
|
6809
|
+
filter?: string;
|
|
6810
|
+
/**
|
|
6811
|
+
* @deprecated
|
|
6812
|
+
*
|
|
6813
|
+
* Define shape of returned value from service calls
|
|
6814
|
+
*
|
|
6815
|
+
* @default 'body'
|
|
6816
|
+
*/
|
|
6817
|
+
response?: 'body' | 'response';
|
|
6814
6818
|
}
|
|
6815
6819
|
|
|
6816
6820
|
interface Config$9 extends Plugin.Name<'@hey-api/transformers'> {
|
|
@@ -6879,6 +6883,37 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
|
|
|
6879
6883
|
* @default 'PascalCase'
|
|
6880
6884
|
*/
|
|
6881
6885
|
identifierCase?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
|
|
6886
|
+
/**
|
|
6887
|
+
* Name of the generated file.
|
|
6888
|
+
*
|
|
6889
|
+
* @default 'types'
|
|
6890
|
+
*/
|
|
6891
|
+
output?: string;
|
|
6892
|
+
/**
|
|
6893
|
+
* Choose how to handle types containing read-only or write-only fields?
|
|
6894
|
+
* This option exists for backward compatibility with outputs created before
|
|
6895
|
+
* this feature existed.
|
|
6896
|
+
*
|
|
6897
|
+
* @default 'split'
|
|
6898
|
+
*/
|
|
6899
|
+
readOnlyWriteOnlyBehavior?: 'off' | 'split';
|
|
6900
|
+
/**
|
|
6901
|
+
* Customize the name of types used in responses or containing read-only
|
|
6902
|
+
* fields.
|
|
6903
|
+
*
|
|
6904
|
+
* @default '{{name}}Readable'
|
|
6905
|
+
*/
|
|
6906
|
+
readableNameBuilder?: string;
|
|
6907
|
+
/**
|
|
6908
|
+
* Customize the name of types used in payloads or containing write-only
|
|
6909
|
+
* fields.
|
|
6910
|
+
*
|
|
6911
|
+
* @default '{{name}}Writable'
|
|
6912
|
+
*/
|
|
6913
|
+
writableNameBuilder?: string;
|
|
6914
|
+
|
|
6915
|
+
// DEPRECATED OPTIONS BELOW
|
|
6916
|
+
|
|
6882
6917
|
/**
|
|
6883
6918
|
* @deprecated
|
|
6884
6919
|
*
|
|
@@ -6886,13 +6921,8 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
|
|
|
6886
6921
|
*
|
|
6887
6922
|
* Include only types matching regular expression.
|
|
6888
6923
|
*/
|
|
6924
|
+
// eslint-disable-next-line typescript-sort-keys/interface
|
|
6889
6925
|
include?: string;
|
|
6890
|
-
/**
|
|
6891
|
-
* Name of the generated file.
|
|
6892
|
-
*
|
|
6893
|
-
* @default 'types'
|
|
6894
|
-
*/
|
|
6895
|
-
output?: string;
|
|
6896
6926
|
/**
|
|
6897
6927
|
* @deprecated
|
|
6898
6928
|
*
|
|
@@ -7168,31 +7198,34 @@ interface Input {
|
|
|
7168
7198
|
*/
|
|
7169
7199
|
commit_sha?: string;
|
|
7170
7200
|
/**
|
|
7171
|
-
* Prevent parts matching the regular expression from being processed.
|
|
7201
|
+
* Prevent parts matching the regular expression(s) from being processed.
|
|
7172
7202
|
* You can select both operations and components by reference within
|
|
7173
|
-
* the bundled input.
|
|
7174
|
-
*
|
|
7203
|
+
* the bundled input.
|
|
7204
|
+
*
|
|
7205
|
+
* In case of conflicts, `exclude` takes precedence over `include`.
|
|
7175
7206
|
*
|
|
7176
7207
|
* @example
|
|
7177
7208
|
* operation: '^#/paths/api/v1/foo/get$'
|
|
7178
7209
|
* schema: '^#/components/schemas/Foo$'
|
|
7210
|
+
* deprecated: '@deprecated'
|
|
7179
7211
|
*/
|
|
7180
|
-
exclude?: string;
|
|
7212
|
+
exclude?: ReadonlyArray<string> | string;
|
|
7181
7213
|
/**
|
|
7182
7214
|
* You pass any valid Fetch API options to the request for fetching your
|
|
7183
7215
|
* specification. This is useful if your file is behind auth for example.
|
|
7184
7216
|
*/
|
|
7185
7217
|
fetch?: RequestInit;
|
|
7186
7218
|
/**
|
|
7187
|
-
* Process only parts matching the regular expression. You can select both
|
|
7188
|
-
* operations and components by reference within the bundled input.
|
|
7189
|
-
*
|
|
7219
|
+
* Process only parts matching the regular expression(s). You can select both
|
|
7220
|
+
* operations and components by reference within the bundled input.
|
|
7221
|
+
*
|
|
7222
|
+
* In case of conflicts, `exclude` takes precedence over `include`.
|
|
7190
7223
|
*
|
|
7191
7224
|
* @example
|
|
7192
7225
|
* operation: '^#/paths/api/v1/foo/get$'
|
|
7193
7226
|
* schema: '^#/components/schemas/Foo$'
|
|
7194
7227
|
*/
|
|
7195
|
-
include?: string;
|
|
7228
|
+
include?: ReadonlyArray<string> | string;
|
|
7196
7229
|
/**
|
|
7197
7230
|
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7198
7231
|
*
|
|
@@ -7400,6 +7433,9 @@ interface UserConfig {
|
|
|
7400
7433
|
*/
|
|
7401
7434
|
timeout?: number;
|
|
7402
7435
|
};
|
|
7436
|
+
|
|
7437
|
+
// DEPRECATED OPTIONS BELOW
|
|
7438
|
+
|
|
7403
7439
|
/**
|
|
7404
7440
|
* @deprecated
|
|
7405
7441
|
*
|
|
@@ -7825,9 +7861,16 @@ interface IRSchemaObject
|
|
|
7825
7861
|
> {
|
|
7826
7862
|
/**
|
|
7827
7863
|
* If the schema is intended to be used as an object property, it can be
|
|
7828
|
-
* marked as read-only or write-only.
|
|
7864
|
+
* marked as read-only or write-only. This value controls whether the schema
|
|
7865
|
+
* receives the "readonly" TypeScript keyword.
|
|
7829
7866
|
*/
|
|
7830
7867
|
accessScope?: 'read' | 'write';
|
|
7868
|
+
/**
|
|
7869
|
+
* Similar to `accessScope`, but tells us whether the schema as a whole
|
|
7870
|
+
* contains any read-only or write-only fields. This value controls whether
|
|
7871
|
+
* we split the schema into individual schemas for payloads and responses.
|
|
7872
|
+
*/
|
|
7873
|
+
accessScopes?: ReadonlyArray<'read' | 'write'>;
|
|
7831
7874
|
/**
|
|
7832
7875
|
* If type is `object`, `additionalProperties` can be used to either define
|
|
7833
7876
|
* a schema for properties not included in `properties` or disallow such
|
package/dist/index.d.ts
CHANGED
|
@@ -6733,18 +6733,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6733
6733
|
* @default true
|
|
6734
6734
|
*/
|
|
6735
6735
|
exportFromIndex?: boolean;
|
|
6736
|
-
/**
|
|
6737
|
-
* @deprecated
|
|
6738
|
-
*
|
|
6739
|
-
* **This feature works only with the legacy parser**
|
|
6740
|
-
*
|
|
6741
|
-
* Filter endpoints to be included in the generated SDK. The provided
|
|
6742
|
-
* string should be a regular expression where matched results will be
|
|
6743
|
-
* included in the output. The input pattern this string will be tested
|
|
6744
|
-
* against is `{method} {path}`. For example, you can match
|
|
6745
|
-
* `POST /api/v1/foo` with `^POST /api/v1/foo$`.
|
|
6746
|
-
*/
|
|
6747
|
-
filter?: string;
|
|
6748
6736
|
/**
|
|
6749
6737
|
* Include only service classes with names matching regular expression
|
|
6750
6738
|
*
|
|
@@ -6768,14 +6756,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6768
6756
|
* @default 'sdk'
|
|
6769
6757
|
*/
|
|
6770
6758
|
output?: string;
|
|
6771
|
-
/**
|
|
6772
|
-
* @deprecated
|
|
6773
|
-
*
|
|
6774
|
-
* Define shape of returned value from service calls
|
|
6775
|
-
*
|
|
6776
|
-
* @default 'body'
|
|
6777
|
-
*/
|
|
6778
|
-
response?: 'body' | 'response';
|
|
6779
6759
|
/**
|
|
6780
6760
|
* Customize the generated service class names. The name variable is
|
|
6781
6761
|
* obtained from your OpenAPI specification tags.
|
|
@@ -6811,6 +6791,30 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6811
6791
|
* @default false
|
|
6812
6792
|
*/
|
|
6813
6793
|
validator?: PluginValidatorNames | boolean;
|
|
6794
|
+
|
|
6795
|
+
// DEPRECATED OPTIONS BELOW
|
|
6796
|
+
|
|
6797
|
+
/**
|
|
6798
|
+
* @deprecated
|
|
6799
|
+
*
|
|
6800
|
+
* **This feature works only with the legacy parser**
|
|
6801
|
+
*
|
|
6802
|
+
* Filter endpoints to be included in the generated SDK. The provided
|
|
6803
|
+
* string should be a regular expression where matched results will be
|
|
6804
|
+
* included in the output. The input pattern this string will be tested
|
|
6805
|
+
* against is `{method} {path}`. For example, you can match
|
|
6806
|
+
* `POST /api/v1/foo` with `^POST /api/v1/foo$`.
|
|
6807
|
+
*/
|
|
6808
|
+
// eslint-disable-next-line typescript-sort-keys/interface
|
|
6809
|
+
filter?: string;
|
|
6810
|
+
/**
|
|
6811
|
+
* @deprecated
|
|
6812
|
+
*
|
|
6813
|
+
* Define shape of returned value from service calls
|
|
6814
|
+
*
|
|
6815
|
+
* @default 'body'
|
|
6816
|
+
*/
|
|
6817
|
+
response?: 'body' | 'response';
|
|
6814
6818
|
}
|
|
6815
6819
|
|
|
6816
6820
|
interface Config$9 extends Plugin.Name<'@hey-api/transformers'> {
|
|
@@ -6879,6 +6883,37 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
|
|
|
6879
6883
|
* @default 'PascalCase'
|
|
6880
6884
|
*/
|
|
6881
6885
|
identifierCase?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
|
|
6886
|
+
/**
|
|
6887
|
+
* Name of the generated file.
|
|
6888
|
+
*
|
|
6889
|
+
* @default 'types'
|
|
6890
|
+
*/
|
|
6891
|
+
output?: string;
|
|
6892
|
+
/**
|
|
6893
|
+
* Choose how to handle types containing read-only or write-only fields?
|
|
6894
|
+
* This option exists for backward compatibility with outputs created before
|
|
6895
|
+
* this feature existed.
|
|
6896
|
+
*
|
|
6897
|
+
* @default 'split'
|
|
6898
|
+
*/
|
|
6899
|
+
readOnlyWriteOnlyBehavior?: 'off' | 'split';
|
|
6900
|
+
/**
|
|
6901
|
+
* Customize the name of types used in responses or containing read-only
|
|
6902
|
+
* fields.
|
|
6903
|
+
*
|
|
6904
|
+
* @default '{{name}}Readable'
|
|
6905
|
+
*/
|
|
6906
|
+
readableNameBuilder?: string;
|
|
6907
|
+
/**
|
|
6908
|
+
* Customize the name of types used in payloads or containing write-only
|
|
6909
|
+
* fields.
|
|
6910
|
+
*
|
|
6911
|
+
* @default '{{name}}Writable'
|
|
6912
|
+
*/
|
|
6913
|
+
writableNameBuilder?: string;
|
|
6914
|
+
|
|
6915
|
+
// DEPRECATED OPTIONS BELOW
|
|
6916
|
+
|
|
6882
6917
|
/**
|
|
6883
6918
|
* @deprecated
|
|
6884
6919
|
*
|
|
@@ -6886,13 +6921,8 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
|
|
|
6886
6921
|
*
|
|
6887
6922
|
* Include only types matching regular expression.
|
|
6888
6923
|
*/
|
|
6924
|
+
// eslint-disable-next-line typescript-sort-keys/interface
|
|
6889
6925
|
include?: string;
|
|
6890
|
-
/**
|
|
6891
|
-
* Name of the generated file.
|
|
6892
|
-
*
|
|
6893
|
-
* @default 'types'
|
|
6894
|
-
*/
|
|
6895
|
-
output?: string;
|
|
6896
6926
|
/**
|
|
6897
6927
|
* @deprecated
|
|
6898
6928
|
*
|
|
@@ -7168,31 +7198,34 @@ interface Input {
|
|
|
7168
7198
|
*/
|
|
7169
7199
|
commit_sha?: string;
|
|
7170
7200
|
/**
|
|
7171
|
-
* Prevent parts matching the regular expression from being processed.
|
|
7201
|
+
* Prevent parts matching the regular expression(s) from being processed.
|
|
7172
7202
|
* You can select both operations and components by reference within
|
|
7173
|
-
* the bundled input.
|
|
7174
|
-
*
|
|
7203
|
+
* the bundled input.
|
|
7204
|
+
*
|
|
7205
|
+
* In case of conflicts, `exclude` takes precedence over `include`.
|
|
7175
7206
|
*
|
|
7176
7207
|
* @example
|
|
7177
7208
|
* operation: '^#/paths/api/v1/foo/get$'
|
|
7178
7209
|
* schema: '^#/components/schemas/Foo$'
|
|
7210
|
+
* deprecated: '@deprecated'
|
|
7179
7211
|
*/
|
|
7180
|
-
exclude?: string;
|
|
7212
|
+
exclude?: ReadonlyArray<string> | string;
|
|
7181
7213
|
/**
|
|
7182
7214
|
* You pass any valid Fetch API options to the request for fetching your
|
|
7183
7215
|
* specification. This is useful if your file is behind auth for example.
|
|
7184
7216
|
*/
|
|
7185
7217
|
fetch?: RequestInit;
|
|
7186
7218
|
/**
|
|
7187
|
-
* Process only parts matching the regular expression. You can select both
|
|
7188
|
-
* operations and components by reference within the bundled input.
|
|
7189
|
-
*
|
|
7219
|
+
* Process only parts matching the regular expression(s). You can select both
|
|
7220
|
+
* operations and components by reference within the bundled input.
|
|
7221
|
+
*
|
|
7222
|
+
* In case of conflicts, `exclude` takes precedence over `include`.
|
|
7190
7223
|
*
|
|
7191
7224
|
* @example
|
|
7192
7225
|
* operation: '^#/paths/api/v1/foo/get$'
|
|
7193
7226
|
* schema: '^#/components/schemas/Foo$'
|
|
7194
7227
|
*/
|
|
7195
|
-
include?: string;
|
|
7228
|
+
include?: ReadonlyArray<string> | string;
|
|
7196
7229
|
/**
|
|
7197
7230
|
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7198
7231
|
*
|
|
@@ -7400,6 +7433,9 @@ interface UserConfig {
|
|
|
7400
7433
|
*/
|
|
7401
7434
|
timeout?: number;
|
|
7402
7435
|
};
|
|
7436
|
+
|
|
7437
|
+
// DEPRECATED OPTIONS BELOW
|
|
7438
|
+
|
|
7403
7439
|
/**
|
|
7404
7440
|
* @deprecated
|
|
7405
7441
|
*
|
|
@@ -7825,9 +7861,16 @@ interface IRSchemaObject
|
|
|
7825
7861
|
> {
|
|
7826
7862
|
/**
|
|
7827
7863
|
* If the schema is intended to be used as an object property, it can be
|
|
7828
|
-
* marked as read-only or write-only.
|
|
7864
|
+
* marked as read-only or write-only. This value controls whether the schema
|
|
7865
|
+
* receives the "readonly" TypeScript keyword.
|
|
7829
7866
|
*/
|
|
7830
7867
|
accessScope?: 'read' | 'write';
|
|
7868
|
+
/**
|
|
7869
|
+
* Similar to `accessScope`, but tells us whether the schema as a whole
|
|
7870
|
+
* contains any read-only or write-only fields. This value controls whether
|
|
7871
|
+
* we split the schema into individual schemas for payloads and responses.
|
|
7872
|
+
*/
|
|
7873
|
+
accessScopes?: ReadonlyArray<'read' | 'write'>;
|
|
7831
7874
|
/**
|
|
7832
7875
|
* If type is `object`, `additionalProperties` can be used to either define
|
|
7833
7876
|
* a schema for properties not included in `properties` or disallow such
|