File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 66 "scripts" : {
77 "test" : " echo \" Error: no test specified\" && exit 1" ,
88 "generate.spec.node" : " ./node_modules/.bin/openapi --input openapi.yaml --output ./src/api --useOptions --useUnionTypes --client node" ,
9- "generate.spec.browser" : " ./node_modules/.bin/openapi --input openapi.yaml --output ./src/api --useOptions -- useUnionTypes --client xhr" ,
9+ "generate.spec.browser" : " ./node_modules/.bin/openapi --input openapi.yaml --output ./src/api --useUnionTypes --client xhr" ,
1010 "webpack" : " npm run generate.spec.browser && npx webpack --mode=development && npx webpack --mode=production && npm run generate.spec.node"
1111 },
1212 "keywords" : [],
Original file line number Diff line number Diff line change 11import Docupilot from './docupilot' ;
22
33import * as _API from './api' ;
4+ import { ApiRequestOptions } from './api/core/ApiRequestOptions' ;
45
56class _Docupilot extends Docupilot {
67 readonly AuthTokensService = _API . AuthTokensService ;
@@ -15,6 +16,13 @@ class _Docupilot extends Docupilot {
1516 readonly TemplateDeliveryService = _API . TemplateDeliveryService ;
1617 readonly TemplatesService = _API . TemplatesService ;
1718 readonly UsersService = _API . UsersService ;
19+
20+ configureHeadersInterceptor ( getHeaders : ( ) => Record < string , string > ) {
21+ _API . OpenAPI . HEADERS = async ( options : ApiRequestOptions ) => {
22+ const headers = getHeaders ( ) ;
23+ return Object . assign ( { } , options . headers || { } , headers ) ;
24+ } ;
25+ }
1826}
1927
2028export const client = new _Docupilot ( ) ;
You can’t perform that action at this time.
0 commit comments