| 10 | import { TemplateService } from './services/TemplateService'; |
| 11 | type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; |
| 12 | export class readMeGenerator { |
| 13 | public readonly healthCheck: HealthCheckService; |
| 14 | public readonly sidebar: SidebarService; |
| 15 | public readonly template: TemplateService; |
| 16 | public readonly request: BaseHttpRequest; |
| 17 | constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { |
| 18 | this.request = new HttpRequest({ |
| 19 | BASE: config?.BASE ?? "https://api.makeread.me", |
| 20 | VERSION: config?.VERSION ?? '1.0.0', |
| 21 | WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, |
| 22 | CREDENTIALS: config?.CREDENTIALS ?? 'include', |
| 23 | TOKEN: config?.TOKEN, |
| 24 | USERNAME: config?.USERNAME, |
| 25 | PASSWORD: config?.PASSWORD, |
| 26 | HEADERS: config?.HEADERS, |
| 27 | ENCODE_PATH: config?.ENCODE_PATH, |
| 28 | }); |
| 29 | this.healthCheck = new HealthCheckService(this.request); |
| 30 | this.sidebar = new SidebarService(this.request); |
| 31 | this.template = new TemplateService(this.request); |
| 32 | } |
| 33 | } |
| 34 |
nothing calls this directly
no outgoing calls
no test coverage detected