Merge 1e7db758597b0de3446e2094059439bbb4e7b4c6 into d6c46342693205f0dae441b45742d9c85d41cf33

This commit is contained in:
Kha Thai 2025-05-10 07:09:48 +02:00 committed by GitHub
commit abb8f5320d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 84 additions and 28 deletions

View File

@ -38,8 +38,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -54,7 +56,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}

View File

@ -49,8 +49,10 @@ export interface RequestArgs {
*/
export class BaseAPI {
protected configuration: Configuration | undefined;
protected basePath: string | undefined;
protected axios: AxiosInstance | undefined;
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
constructor(configuration?: Configuration, basePath: string = BASE_PATH, axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath ?? basePath;
@ -65,7 +67,9 @@ export class BaseAPI {
* @extends {Error}
*/
export class RequiredError extends Error {
constructor(public field: string, msg?: string) {
public field: string | undefined
constructor(field: string, msg?: string) {
super(msg);
this.name = "RequiredError"
}