(options: OpenPanelOptions)
| 62 | queue: TrackHandlerPayload[] = []; |
| 63 | |
| 64 | constructor(options: OpenPanelOptions) { |
| 65 | this.options = options; |
| 66 | |
| 67 | const defaultHeaders: Record<string, string> = { |
| 68 | 'openpanel-client-id': options.clientId, |
| 69 | }; |
| 70 | |
| 71 | if (options.clientSecret) { |
| 72 | defaultHeaders['openpanel-client-secret'] = options.clientSecret; |
| 73 | } |
| 74 | |
| 75 | defaultHeaders['openpanel-sdk-name'] = options.sdk || 'node'; |
| 76 | defaultHeaders['openpanel-sdk-version'] = |
| 77 | options.sdkVersion || process.env.SDK_VERSION!; |
| 78 | |
| 79 | this.api = new Api({ |
| 80 | baseUrl: options.apiUrl || 'https://api.openpanel.dev', |
| 81 | defaultHeaders, |
| 82 | }); |
| 83 | } |
| 84 | |
| 85 | // placeholder for future use |
| 86 | init() { |
nothing calls this directly
no outgoing calls
no test coverage detected