From f3f2a57fa60abc29e0c45a59bf7f78c3fe4f29c6 Mon Sep 17 00:00:00 2001 From: davidbielik Date: Thu, 13 Jul 2023 10:40:23 -0400 Subject: [PATCH 1/2] Add types for InitConfig --- lib/mixpanel-node.d.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/mixpanel-node.d.ts b/lib/mixpanel-node.d.ts index 6b00577..7a3ad91 100644 --- a/lib/mixpanel-node.d.ts +++ b/lib/mixpanel-node.d.ts @@ -7,7 +7,23 @@ declare namespace mixpanel { type Scalar = string | number | boolean; export interface InitConfig { - [key: string]: any; + /* Defaults to `false` */ + test?: boolean; + /* Defaults to `false` */ + debug?: boolean; + /* Enable verbose logging - defaults to `false` */ + verbose?: boolean; + /* API hostname - defaults to `"api.mixpanel.com"` */ + host?: string; + /* API protocol - defaults to `"https"` */ + protocol?: string; + /* API pathname - defaults to `""` */ + path?: ''; + keepAlive?: boolean; + /** Geolocate based on client IP (e.g. when running in Electron) - defaults to `false`. + * To supply the user's IP manually, set to false and provide the `$ip` property instead. + **/ + geolocate?: false; } export interface PropertyDict { From 580283d0976c2739bac8d6a6c236b50973a36426 Mon Sep 17 00:00:00 2001 From: davidbielik Date: Thu, 13 Jul 2023 10:42:40 -0400 Subject: [PATCH 2/2] Update mixpanel-node.d.ts --- lib/mixpanel-node.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mixpanel-node.d.ts b/lib/mixpanel-node.d.ts index 7a3ad91..f271978 100644 --- a/lib/mixpanel-node.d.ts +++ b/lib/mixpanel-node.d.ts @@ -19,6 +19,7 @@ declare namespace mixpanel { protocol?: string; /* API pathname - defaults to `""` */ path?: ''; + /* request keepAlive setting - defaults to `true` */ keepAlive?: boolean; /** Geolocate based on client IP (e.g. when running in Electron) - defaults to `false`. * To supply the user's IP manually, set to false and provide the `$ip` property instead.