Accept Promises for the apiKey configuration in the typescript-fetch generator. (#17758)

This commit is contained in:
Jeffrey Yasskin
2024-02-02 06:18:31 -08:00
committed by GitHub
parent 7c7634dda9
commit 8ff230ed06
38 changed files with 54 additions and 54 deletions

View File

@@ -191,13 +191,13 @@ export class {{classname}} extends runtime.BaseAPI {
{{#isApiKey}}
{{#isKeyInHeader}}
if (this.configuration && this.configuration.apiKey) {
headerParameters["{{keyParamName}}"] = this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication
headerParameters["{{keyParamName}}"] = await this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication
}
{{/isKeyInHeader}}
{{#isKeyInQuery}}
if (this.configuration && this.configuration.apiKey) {
queryParameters["{{keyParamName}}"] = this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication
queryParameters["{{keyParamName}}"] = await this.configuration.apiKey("{{keyParamName}}"); // {{name}} authentication
}
{{/isKeyInQuery}}

View File

@@ -11,7 +11,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -48,7 +48,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -47,7 +47,7 @@ export class FakeClassnameTags123Api extends runtime.BaseAPI {
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
queryParameters["api_key_query"] = this.configuration.apiKey("api_key_query"); // api_key_query authentication
queryParameters["api_key_query"] = await this.configuration.apiKey("api_key_query"); // api_key_query authentication
}
const response = await this.request({

View File

@@ -250,7 +250,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -240,7 +240,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -240,7 +240,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -240,7 +240,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -240,7 +240,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -355,7 +355,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -47,7 +47,7 @@ export class FakeClassnameTags123Api extends runtime.BaseAPI {
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
queryParameters["api_key_query"] = this.configuration.apiKey("api_key_query"); // api_key_query authentication
queryParameters["api_key_query"] = await this.configuration.apiKey("api_key_query"); // api_key_query authentication
}
const response = await this.request({

View File

@@ -250,7 +250,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -379,7 +379,7 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -151,7 +151,7 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -240,7 +240,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -80,7 +80,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;

View File

@@ -234,7 +234,7 @@ export class PetApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -76,7 +76,7 @@ export class StoreApi extends runtime.BaseAPI {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
headerParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
}
const response = await this.request({

View File

@@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;