@hey-api/openapi-ts 0.64.9 → 0.64.11
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/bin/index.cjs +4 -0
- package/dist/index.cjs +55 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +90 -31
- package/dist/index.d.ts +90 -31
- package/dist/index.js +56 -56
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
package/dist/index.d.cts
CHANGED
|
@@ -7123,6 +7123,92 @@ type StringCase =
|
|
|
7123
7123
|
| 'snake_case'
|
|
7124
7124
|
| 'SCREAMING_SNAKE_CASE';
|
|
7125
7125
|
|
|
7126
|
+
interface Input {
|
|
7127
|
+
/**
|
|
7128
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7129
|
+
*
|
|
7130
|
+
* Projects are private by default, you will need to be authenticated
|
|
7131
|
+
* to download OpenAPI specifications. We recommend using project API
|
|
7132
|
+
* keys in CI workflows and personal API keys for local development.
|
|
7133
|
+
*
|
|
7134
|
+
* API key isn't required for public projects. You can also omit this
|
|
7135
|
+
* parameter and provide an environment variable `HEY_API_TOKEN`.
|
|
7136
|
+
*/
|
|
7137
|
+
api_key?: string;
|
|
7138
|
+
/**
|
|
7139
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7140
|
+
*
|
|
7141
|
+
* You can fetch the last build from branch by providing the branch
|
|
7142
|
+
* name.
|
|
7143
|
+
*/
|
|
7144
|
+
branch?: string;
|
|
7145
|
+
/**
|
|
7146
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7147
|
+
*
|
|
7148
|
+
* You can fetch an exact specification by providing a commit sha.
|
|
7149
|
+
* This will always return the same file.
|
|
7150
|
+
*/
|
|
7151
|
+
commit_sha?: string;
|
|
7152
|
+
/**
|
|
7153
|
+
* Prevent parts matching the regular expression from being processed.
|
|
7154
|
+
* You can select both operations and components by reference within
|
|
7155
|
+
* the bundled input. In case of conflicts, `exclude` takes precedence
|
|
7156
|
+
* over `include`.
|
|
7157
|
+
*
|
|
7158
|
+
* @example
|
|
7159
|
+
* operation: '^#/paths/api/v1/foo/get$'
|
|
7160
|
+
* schema: '^#/components/schemas/Foo$'
|
|
7161
|
+
*/
|
|
7162
|
+
exclude?: string;
|
|
7163
|
+
/**
|
|
7164
|
+
* Process only parts matching the regular expression. You can select both
|
|
7165
|
+
* operations and components by reference within the bundled input. In
|
|
7166
|
+
* case of conflicts, `exclude` takes precedence over `include`.
|
|
7167
|
+
*
|
|
7168
|
+
* @example
|
|
7169
|
+
* operation: '^#/paths/api/v1/foo/get$'
|
|
7170
|
+
* schema: '^#/components/schemas/Foo$'
|
|
7171
|
+
*/
|
|
7172
|
+
include?: string;
|
|
7173
|
+
/**
|
|
7174
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7175
|
+
*
|
|
7176
|
+
* Organization created in Hey API platform.
|
|
7177
|
+
*/
|
|
7178
|
+
organization?: string;
|
|
7179
|
+
/**
|
|
7180
|
+
* Path to the OpenAPI specification. This can be either local or remote path.
|
|
7181
|
+
* Both JSON and YAML file formats are supported. You can also pass the parsed
|
|
7182
|
+
* object directly if you're fetching the file yourself.
|
|
7183
|
+
*/
|
|
7184
|
+
path?:
|
|
7185
|
+
| 'https://get.heyapi.dev/<organization>/<project>'
|
|
7186
|
+
| (string & {})
|
|
7187
|
+
| Record<string, unknown>;
|
|
7188
|
+
/**
|
|
7189
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7190
|
+
*
|
|
7191
|
+
* Project created in Hey API platform.
|
|
7192
|
+
*/
|
|
7193
|
+
project?: string;
|
|
7194
|
+
/**
|
|
7195
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7196
|
+
*
|
|
7197
|
+
* If you're tagging your specifications with custom tags, you can use
|
|
7198
|
+
* them to filter the results. When you provide multiple tags, only
|
|
7199
|
+
* the first match will be returned.
|
|
7200
|
+
*/
|
|
7201
|
+
tags?: ReadonlyArray<string>;
|
|
7202
|
+
/**
|
|
7203
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7204
|
+
*
|
|
7205
|
+
* Every OpenAPI document contains a required version field. You can
|
|
7206
|
+
* use this value to fetch the last uploaded specification matching
|
|
7207
|
+
* the value.
|
|
7208
|
+
*/
|
|
7209
|
+
version?: string;
|
|
7210
|
+
}
|
|
7211
|
+
|
|
7126
7212
|
interface UserConfig {
|
|
7127
7213
|
/**
|
|
7128
7214
|
* Path to the config file. Set this value if you don't use the default
|
|
@@ -7143,37 +7229,10 @@ interface UserConfig {
|
|
|
7143
7229
|
* Alternatively, you can define a configuration object with more options.
|
|
7144
7230
|
*/
|
|
7145
7231
|
input:
|
|
7146
|
-
|
|
|
7232
|
+
| 'https://get.heyapi.dev/<organization>/<project>'
|
|
7233
|
+
| (string & {})
|
|
7147
7234
|
| Record<string, unknown>
|
|
7148
|
-
|
|
|
7149
|
-
/**
|
|
7150
|
-
* Prevent parts matching the regular expression from being processed.
|
|
7151
|
-
* You can select both operations and components by reference within
|
|
7152
|
-
* the bundled input. In case of conflicts, `exclude` takes precedence
|
|
7153
|
-
* over `include`.
|
|
7154
|
-
*
|
|
7155
|
-
* @example
|
|
7156
|
-
* operation: '^#/paths/api/v1/foo/get$'
|
|
7157
|
-
* schema: '^#/components/schemas/Foo$'
|
|
7158
|
-
*/
|
|
7159
|
-
exclude?: string;
|
|
7160
|
-
/**
|
|
7161
|
-
* Process only parts matching the regular expression. You can select both
|
|
7162
|
-
* operations and components by reference within the bundled input. In
|
|
7163
|
-
* case of conflicts, `exclude` takes precedence over `include`.
|
|
7164
|
-
*
|
|
7165
|
-
* @example
|
|
7166
|
-
* operation: '^#/paths/api/v1/foo/get$'
|
|
7167
|
-
* schema: '^#/components/schemas/Foo$'
|
|
7168
|
-
*/
|
|
7169
|
-
include?: string;
|
|
7170
|
-
/**
|
|
7171
|
-
* Path to the OpenAPI specification. This can be either local or remote path.
|
|
7172
|
-
* Both JSON and YAML file formats are supported. You can also pass the parsed
|
|
7173
|
-
* object directly if you're fetching the file yourself.
|
|
7174
|
-
*/
|
|
7175
|
-
path: string | Record<string, unknown>;
|
|
7176
|
-
};
|
|
7235
|
+
| Input;
|
|
7177
7236
|
/**
|
|
7178
7237
|
* The relative location of the logs folder
|
|
7179
7238
|
*
|
|
@@ -7364,7 +7423,7 @@ type Config = Omit<
|
|
|
7364
7423
|
| 'watch'
|
|
7365
7424
|
> &
|
|
7366
7425
|
Pick<UserConfig, 'base' | 'name' | 'request'> & {
|
|
7367
|
-
input:
|
|
7426
|
+
input: Omit<Input, 'path'> & Pick<Required<Input>, 'path'>;
|
|
7368
7427
|
logs: Extract<Required<UserConfig['logs']>, object>;
|
|
7369
7428
|
output: Extract<UserConfig['output'], object>;
|
|
7370
7429
|
pluginOrder: ReadonlyArray<ClientPlugins['name']>;
|
package/dist/index.d.ts
CHANGED
|
@@ -7123,6 +7123,92 @@ type StringCase =
|
|
|
7123
7123
|
| 'snake_case'
|
|
7124
7124
|
| 'SCREAMING_SNAKE_CASE';
|
|
7125
7125
|
|
|
7126
|
+
interface Input {
|
|
7127
|
+
/**
|
|
7128
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7129
|
+
*
|
|
7130
|
+
* Projects are private by default, you will need to be authenticated
|
|
7131
|
+
* to download OpenAPI specifications. We recommend using project API
|
|
7132
|
+
* keys in CI workflows and personal API keys for local development.
|
|
7133
|
+
*
|
|
7134
|
+
* API key isn't required for public projects. You can also omit this
|
|
7135
|
+
* parameter and provide an environment variable `HEY_API_TOKEN`.
|
|
7136
|
+
*/
|
|
7137
|
+
api_key?: string;
|
|
7138
|
+
/**
|
|
7139
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7140
|
+
*
|
|
7141
|
+
* You can fetch the last build from branch by providing the branch
|
|
7142
|
+
* name.
|
|
7143
|
+
*/
|
|
7144
|
+
branch?: string;
|
|
7145
|
+
/**
|
|
7146
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7147
|
+
*
|
|
7148
|
+
* You can fetch an exact specification by providing a commit sha.
|
|
7149
|
+
* This will always return the same file.
|
|
7150
|
+
*/
|
|
7151
|
+
commit_sha?: string;
|
|
7152
|
+
/**
|
|
7153
|
+
* Prevent parts matching the regular expression from being processed.
|
|
7154
|
+
* You can select both operations and components by reference within
|
|
7155
|
+
* the bundled input. In case of conflicts, `exclude` takes precedence
|
|
7156
|
+
* over `include`.
|
|
7157
|
+
*
|
|
7158
|
+
* @example
|
|
7159
|
+
* operation: '^#/paths/api/v1/foo/get$'
|
|
7160
|
+
* schema: '^#/components/schemas/Foo$'
|
|
7161
|
+
*/
|
|
7162
|
+
exclude?: string;
|
|
7163
|
+
/**
|
|
7164
|
+
* Process only parts matching the regular expression. You can select both
|
|
7165
|
+
* operations and components by reference within the bundled input. In
|
|
7166
|
+
* case of conflicts, `exclude` takes precedence over `include`.
|
|
7167
|
+
*
|
|
7168
|
+
* @example
|
|
7169
|
+
* operation: '^#/paths/api/v1/foo/get$'
|
|
7170
|
+
* schema: '^#/components/schemas/Foo$'
|
|
7171
|
+
*/
|
|
7172
|
+
include?: string;
|
|
7173
|
+
/**
|
|
7174
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7175
|
+
*
|
|
7176
|
+
* Organization created in Hey API platform.
|
|
7177
|
+
*/
|
|
7178
|
+
organization?: string;
|
|
7179
|
+
/**
|
|
7180
|
+
* Path to the OpenAPI specification. This can be either local or remote path.
|
|
7181
|
+
* Both JSON and YAML file formats are supported. You can also pass the parsed
|
|
7182
|
+
* object directly if you're fetching the file yourself.
|
|
7183
|
+
*/
|
|
7184
|
+
path?:
|
|
7185
|
+
| 'https://get.heyapi.dev/<organization>/<project>'
|
|
7186
|
+
| (string & {})
|
|
7187
|
+
| Record<string, unknown>;
|
|
7188
|
+
/**
|
|
7189
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7190
|
+
*
|
|
7191
|
+
* Project created in Hey API platform.
|
|
7192
|
+
*/
|
|
7193
|
+
project?: string;
|
|
7194
|
+
/**
|
|
7195
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7196
|
+
*
|
|
7197
|
+
* If you're tagging your specifications with custom tags, you can use
|
|
7198
|
+
* them to filter the results. When you provide multiple tags, only
|
|
7199
|
+
* the first match will be returned.
|
|
7200
|
+
*/
|
|
7201
|
+
tags?: ReadonlyArray<string>;
|
|
7202
|
+
/**
|
|
7203
|
+
* **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
|
|
7204
|
+
*
|
|
7205
|
+
* Every OpenAPI document contains a required version field. You can
|
|
7206
|
+
* use this value to fetch the last uploaded specification matching
|
|
7207
|
+
* the value.
|
|
7208
|
+
*/
|
|
7209
|
+
version?: string;
|
|
7210
|
+
}
|
|
7211
|
+
|
|
7126
7212
|
interface UserConfig {
|
|
7127
7213
|
/**
|
|
7128
7214
|
* Path to the config file. Set this value if you don't use the default
|
|
@@ -7143,37 +7229,10 @@ interface UserConfig {
|
|
|
7143
7229
|
* Alternatively, you can define a configuration object with more options.
|
|
7144
7230
|
*/
|
|
7145
7231
|
input:
|
|
7146
|
-
|
|
|
7232
|
+
| 'https://get.heyapi.dev/<organization>/<project>'
|
|
7233
|
+
| (string & {})
|
|
7147
7234
|
| Record<string, unknown>
|
|
7148
|
-
|
|
|
7149
|
-
/**
|
|
7150
|
-
* Prevent parts matching the regular expression from being processed.
|
|
7151
|
-
* You can select both operations and components by reference within
|
|
7152
|
-
* the bundled input. In case of conflicts, `exclude` takes precedence
|
|
7153
|
-
* over `include`.
|
|
7154
|
-
*
|
|
7155
|
-
* @example
|
|
7156
|
-
* operation: '^#/paths/api/v1/foo/get$'
|
|
7157
|
-
* schema: '^#/components/schemas/Foo$'
|
|
7158
|
-
*/
|
|
7159
|
-
exclude?: string;
|
|
7160
|
-
/**
|
|
7161
|
-
* Process only parts matching the regular expression. You can select both
|
|
7162
|
-
* operations and components by reference within the bundled input. In
|
|
7163
|
-
* case of conflicts, `exclude` takes precedence over `include`.
|
|
7164
|
-
*
|
|
7165
|
-
* @example
|
|
7166
|
-
* operation: '^#/paths/api/v1/foo/get$'
|
|
7167
|
-
* schema: '^#/components/schemas/Foo$'
|
|
7168
|
-
*/
|
|
7169
|
-
include?: string;
|
|
7170
|
-
/**
|
|
7171
|
-
* Path to the OpenAPI specification. This can be either local or remote path.
|
|
7172
|
-
* Both JSON and YAML file formats are supported. You can also pass the parsed
|
|
7173
|
-
* object directly if you're fetching the file yourself.
|
|
7174
|
-
*/
|
|
7175
|
-
path: string | Record<string, unknown>;
|
|
7176
|
-
};
|
|
7235
|
+
| Input;
|
|
7177
7236
|
/**
|
|
7178
7237
|
* The relative location of the logs folder
|
|
7179
7238
|
*
|
|
@@ -7364,7 +7423,7 @@ type Config = Omit<
|
|
|
7364
7423
|
| 'watch'
|
|
7365
7424
|
> &
|
|
7366
7425
|
Pick<UserConfig, 'base' | 'name' | 'request'> & {
|
|
7367
|
-
input:
|
|
7426
|
+
input: Omit<Input, 'path'> & Pick<Required<Input>, 'path'>;
|
|
7368
7427
|
logs: Extract<Required<UserConfig['logs']>, object>;
|
|
7369
7428
|
output: Extract<UserConfig['output'], object>;
|
|
7370
7429
|
pluginOrder: ReadonlyArray<ClientPlugins['name']>;
|