@@ -53,6 +53,7 @@ export type ApiCaller<T> = (query: string, variables?: VariablesType) => Promise
5353
5454export type ClientInterface = {
5555 catalogueApi : ApiCaller < any > ;
56+ discoveryApi : ApiCaller < any > ;
5657 searchApi : ApiCaller < any > ;
5758 orderApi : ApiCaller < any > ;
5859 subscriptionApi : ApiCaller < any > ;
@@ -360,6 +361,12 @@ export function createClient(configuration: ClientConfiguration, options?: Creat
360361 accessTokenSecret : configuration . accessTokenSecret ,
361362 } ;
362363
364+ // nothing expect static auth token
365+ const discoveryConfig : ClientConfiguration = {
366+ ...commonConfig ,
367+ staticAuthToken : configuration . staticAuthToken ,
368+ } ;
369+
363370 // sessionId and static auth token are excluded
364371 const tokenOnlyConfig : ClientConfiguration = {
365372 ...commonConfig ,
@@ -369,6 +376,12 @@ export function createClient(configuration: ClientConfiguration, options?: Creat
369376
370377 return {
371378 catalogueApi : createApiCaller ( grab , apiHost ( configuration ) ( [ identifier , 'catalogue' ] ) , catalogConfig , options ) ,
379+ discoveryApi : createApiCaller (
380+ grab ,
381+ apiHost ( configuration ) ( [ identifier , 'discovery' ] ) ,
382+ discoveryConfig ,
383+ options ,
384+ ) ,
372385 searchApi : createApiCaller ( grab , apiHost ( configuration ) ( [ identifier , 'search' ] ) , catalogConfig , options ) ,
373386 orderApi : createApiCaller ( grab , apiHost ( configuration ) ( [ identifier , 'orders' ] ) , tokenOnlyConfig , options ) ,
374387 subscriptionApi : createApiCaller (
0 commit comments