@@ -13,7 +13,7 @@ export declare namespace Assistants {
13
13
environment ?: core . Supplier < environments . VapiEnvironment | string > ;
14
14
/** Specify a custom URL to connect the client to. */
15
15
baseUrl ?: core . Supplier < string > ;
16
- token ? : core . Supplier < core . BearerToken | undefined > ;
16
+ token : core . Supplier < core . BearerToken > ;
17
17
fetcher ?: core . FetchFunction ;
18
18
}
19
19
@@ -30,7 +30,7 @@ export declare namespace Assistants {
30
30
}
31
31
32
32
export class Assistants {
33
- constructor ( protected readonly _options : Assistants . Options = { } ) { }
33
+ constructor ( protected readonly _options : Assistants . Options ) { }
34
34
35
35
/**
36
36
* @param {Vapi.AssistantsListRequest } request
@@ -110,8 +110,8 @@ export class Assistants {
110
110
Authorization : await this . _getAuthorizationHeader ( ) ,
111
111
"X-Fern-Language" : "JavaScript" ,
112
112
"X-Fern-SDK-Name" : "@vapi-ai/server-sdk" ,
113
- "X-Fern-SDK-Version" : "0.8 .1" ,
114
- "User-Agent" : "@vapi-ai/server-sdk/0.8 .1" ,
113
+ "X-Fern-SDK-Version" : "0.9 .1" ,
114
+ "User-Agent" : "@vapi-ai/server-sdk/0.9 .1" ,
115
115
"X-Fern-Runtime" : core . RUNTIME . type ,
116
116
"X-Fern-Runtime-Version" : core . RUNTIME . version ,
117
117
...requestOptions ?. headers ,
@@ -182,8 +182,8 @@ export class Assistants {
182
182
Authorization : await this . _getAuthorizationHeader ( ) ,
183
183
"X-Fern-Language" : "JavaScript" ,
184
184
"X-Fern-SDK-Name" : "@vapi-ai/server-sdk" ,
185
- "X-Fern-SDK-Version" : "0.8 .1" ,
186
- "User-Agent" : "@vapi-ai/server-sdk/0.8 .1" ,
185
+ "X-Fern-SDK-Version" : "0.9 .1" ,
186
+ "User-Agent" : "@vapi-ai/server-sdk/0.9 .1" ,
187
187
"X-Fern-Runtime" : core . RUNTIME . type ,
188
188
"X-Fern-Runtime-Version" : core . RUNTIME . version ,
189
189
...requestOptions ?. headers ,
@@ -251,8 +251,8 @@ export class Assistants {
251
251
Authorization : await this . _getAuthorizationHeader ( ) ,
252
252
"X-Fern-Language" : "JavaScript" ,
253
253
"X-Fern-SDK-Name" : "@vapi-ai/server-sdk" ,
254
- "X-Fern-SDK-Version" : "0.8 .1" ,
255
- "User-Agent" : "@vapi-ai/server-sdk/0.8 .1" ,
254
+ "X-Fern-SDK-Version" : "0.9 .1" ,
255
+ "User-Agent" : "@vapi-ai/server-sdk/0.9 .1" ,
256
256
"X-Fern-Runtime" : core . RUNTIME . type ,
257
257
"X-Fern-Runtime-Version" : core . RUNTIME . version ,
258
258
...requestOptions ?. headers ,
@@ -319,8 +319,8 @@ export class Assistants {
319
319
Authorization : await this . _getAuthorizationHeader ( ) ,
320
320
"X-Fern-Language" : "JavaScript" ,
321
321
"X-Fern-SDK-Name" : "@vapi-ai/server-sdk" ,
322
- "X-Fern-SDK-Version" : "0.8 .1" ,
323
- "User-Agent" : "@vapi-ai/server-sdk/0.8 .1" ,
322
+ "X-Fern-SDK-Version" : "0.9 .1" ,
323
+ "User-Agent" : "@vapi-ai/server-sdk/0.9 .1" ,
324
324
"X-Fern-Runtime" : core . RUNTIME . type ,
325
325
"X-Fern-Runtime-Version" : core . RUNTIME . version ,
326
326
...requestOptions ?. headers ,
@@ -393,8 +393,8 @@ export class Assistants {
393
393
Authorization : await this . _getAuthorizationHeader ( ) ,
394
394
"X-Fern-Language" : "JavaScript" ,
395
395
"X-Fern-SDK-Name" : "@vapi-ai/server-sdk" ,
396
- "X-Fern-SDK-Version" : "0.8 .1" ,
397
- "User-Agent" : "@vapi-ai/server-sdk/0.8 .1" ,
396
+ "X-Fern-SDK-Version" : "0.9 .1" ,
397
+ "User-Agent" : "@vapi-ai/server-sdk/0.9 .1" ,
398
398
"X-Fern-Runtime" : core . RUNTIME . type ,
399
399
"X-Fern-Runtime-Version" : core . RUNTIME . version ,
400
400
...requestOptions ?. headers ,
@@ -435,12 +435,7 @@ export class Assistants {
435
435
}
436
436
}
437
437
438
- protected async _getAuthorizationHeader ( ) : Promise < string | undefined > {
439
- const bearer = await core . Supplier . get ( this . _options . token ) ;
440
- if ( bearer != null ) {
441
- return `Bearer ${ bearer } ` ;
442
- }
443
-
444
- return undefined ;
438
+ protected async _getAuthorizationHeader ( ) : Promise < string > {
439
+ return `Bearer ${ await core . Supplier . get ( this . _options . token ) } ` ;
445
440
}
446
441
}
0 commit comments