File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @kilnfi/sdk" ,
3- "version" : " 3.1.6 " ,
3+ "version" : " 3.1.7 " ,
44 "autor" :
" Kiln <[email protected] > (https://kiln.fi)" ,
55 "license" : " BUSL-1.1" ,
66 "description" : " JavaScript sdk for Kiln API" ,
Original file line number Diff line number Diff line change @@ -2,22 +2,24 @@ import type { paths } from './openapi/schema.js';
22export * from './validators.js' ;
33export * from './openapi/schema.js' ;
44export * from './utils.js' ;
5- import createClient , { type Client } from 'openapi-fetch' ;
5+ import createClient , { type Client , type ClientOptions } from 'openapi-fetch' ;
66import { FireblocksService } from './fireblocks.js' ;
77
88type Config = {
99 baseUrl : string ;
10- apiToken : string ;
10+ apiToken ?: string ;
11+ clientOptions ?: ClientOptions ;
1112} ;
1213
1314export class Kiln {
1415 fireblocks : FireblocksService ;
1516 client : Client < paths > ;
1617
17- constructor ( { apiToken, baseUrl } : Config ) {
18+ constructor ( { apiToken, baseUrl, clientOptions } : Config ) {
1819 const client = createClient < paths > ( {
20+ ...clientOptions ,
1921 baseUrl,
20- headers : { Authorization : `Bearer ${ apiToken } ` } ,
22+ headers : apiToken ? { Authorization : `Bearer ${ apiToken } ` } : { } ,
2123 querySerializer : { array : { explode : false , style : 'form' } } ,
2224 } ) ;
2325 this . fireblocks = new FireblocksService ( client ) ;
You can’t perform that action at this time.
0 commit comments