@@ -43,9 +43,9 @@ public static Task<Result<KnowledgeBoxObj, HttpError<string>>> GetKbBySlugKbSSlu
4343 /// <summary>Get Knowledge Box</summary>
4444 public static Task < Result < KnowledgeBoxObj , HttpError < string > > > GetKbKbKbidGet (
4545 this HttpClient httpClient ,
46- string kbid ,
46+ string kbid , string xNUCLIADBROLES ,
4747 CancellationToken cancellationToken = default
48- ) => _getKbKbKbidGet ( httpClient , kbid , cancellationToken ) ;
48+ ) => _getKbKbKbidGet ( httpClient , ( kbid , xNUCLIADBROLES ) , cancellationToken ) ;
4949
5050 /// <summary>Ask Knowledge Box</summary>
5151 public static Task < Result < SyncAskResponse , HttpError < string > > > AskKnowledgeboxEndpointKbKbidAskPost (
@@ -505,9 +505,9 @@ public static Task<Result<ResourceCreated, HttpError<string>>> CreateResourceKbK
505505 /// <summary>List Resources</summary>
506506 public static Task < Result < ResourceList , HttpError < string > > > ListResourcesKbKbidResourcesGet (
507507 this HttpClient httpClient ,
508- string kbid , int page , int size ,
508+ string kbid , int page , int size , string xNUCLIADBROLES ,
509509 CancellationToken cancellationToken = default
510- ) => _listResourcesKbKbidResourcesGet ( httpClient , ( kbid , page , size ) , cancellationToken ) ;
510+ ) => _listResourcesKbKbidResourcesGet ( httpClient , ( kbid , page , size , xNUCLIADBROLES ) , cancellationToken ) ;
511511
512512 /// <summary>Learning configuration schema</summary>
513513 public static Task < Result < object , HttpError < string > > > GetSchemaForConfigurationUpdatesKbKbidSchemaGet (
@@ -810,10 +810,10 @@ public static Task<Result<object, HttpError<string>>> LearningConfigurationSchem
810810 deserializeError : DeserializeError
811811 ) ;
812812
813- private static GetAsync < KnowledgeBoxObj , string , string > _getKbKbKbidGet { get ; } =
814- RestClient . Net . HttpClientFactoryExtensions . CreateGet < KnowledgeBoxObj , string , string > (
813+ private static GetAsync < KnowledgeBoxObj , string , ( string kbid , string xNUCLIADBROLES ) > _getKbKbKbidGet { get ; } =
814+ RestClient . Net . HttpClientFactoryExtensions . CreateGet < KnowledgeBoxObj , string , ( string kbid , string xNUCLIADBROLES ) > (
815815 url : BaseUrl ,
816- buildRequest : static kbid => new HttpRequestParts ( new RelativeUrl ( $ "/api/v1/kb/{ kbid } ") , null , null ) ,
816+ buildRequest : static param => new HttpRequestParts ( new RelativeUrl ( $ "/api/v1/kb/{ param . kbid } ") , null , new Dictionary < string , string > { [ "X-NUCLIADB-ROLES" ] = param . xNUCLIADBROLES . ToString ( ) ?? string . Empty } ) ,
817817 deserializeSuccess : DeserializeJson < KnowledgeBoxObj > ,
818818 deserializeError : DeserializeError
819819 ) ;
@@ -1338,10 +1338,10 @@ public static Task<Result<object, HttpError<string>>> LearningConfigurationSchem
13381338 deserializeError : DeserializeError
13391339 ) ;
13401340
1341- private static GetAsync < ResourceList , string , ( string kbid , int page , int size ) > _listResourcesKbKbidResourcesGet { get ; } =
1342- RestClient . Net . HttpClientFactoryExtensions . CreateGet < ResourceList , string , ( string kbid , int page , int size ) > (
1341+ private static GetAsync < ResourceList , string , ( string kbid , int page , int size , string xNUCLIADBROLES ) > _listResourcesKbKbidResourcesGet { get ; } =
1342+ RestClient . Net . HttpClientFactoryExtensions . CreateGet < ResourceList , string , ( string kbid , int page , int size , string xNUCLIADBROLES ) > (
13431343 url : BaseUrl ,
1344- buildRequest : static param => new HttpRequestParts ( new RelativeUrl ( $ "/api/v1/kb/{ param . kbid } /resources?page={ param . page } &size={ param . size } ") , null , null ) ,
1344+ buildRequest : static param => new HttpRequestParts ( new RelativeUrl ( $ "/api/v1/kb/{ param . kbid } /resources?page={ param . page } &size={ param . size } ") , null , new Dictionary < string , string > { [ "X-NUCLIADB-ROLES" ] = param . xNUCLIADBROLES . ToString ( ) ?? string . Empty } ) ,
13451345 deserializeSuccess : DeserializeJson < ResourceList > ,
13461346 deserializeError : DeserializeError
13471347 ) ;
0 commit comments