posthog-js 1.81.3 → 1.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/array.full.js +2 -2
- package/dist/array.full.js.map +1 -1
- package/dist/array.js +2 -2
- package/dist/array.js.map +1 -1
- package/dist/es.js +2 -2
- package/dist/es.js.map +1 -1
- package/dist/module.d.ts +11 -7
- package/dist/module.js +2 -2
- package/dist/module.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/src/posthog-core.js +7 -1
- package/lib/src/posthog-core.js.map +1 -1
- package/lib/src/posthog-surveys-types.d.ts +2 -0
- package/lib/src/posthog-surveys-types.js.map +1 -1
- package/lib/src/posthog-surveys.d.ts +2 -1
- package/lib/src/posthog-surveys.js +10 -3
- package/lib/src/posthog-surveys.js.map +1 -1
- package/lib/src/utils.d.ts +2 -0
- package/lib/src/utils.js +14 -0
- package/lib/src/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/module.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SurveyCallback as SurveyCallback$1 } from 'posthog-surveys-types';
|
|
2
|
+
|
|
1
3
|
declare enum NodeType {
|
|
2
4
|
Document = 0,
|
|
3
5
|
DocumentType = 1,
|
|
@@ -1159,6 +1161,13 @@ declare class ExceptionObserver {
|
|
|
1159
1161
|
}): void;
|
|
1160
1162
|
}
|
|
1161
1163
|
|
|
1164
|
+
declare class PostHogSurveys {
|
|
1165
|
+
instance: PostHog;
|
|
1166
|
+
constructor(instance: PostHog);
|
|
1167
|
+
getSurveys(callback: SurveyCallback$1, forceReload?: boolean): void;
|
|
1168
|
+
getActiveMatchingSurveys(callback: SurveyCallback$1, forceReload?: boolean): void;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1162
1171
|
/**
|
|
1163
1172
|
* Having Survey types in types.ts was confusing tsc
|
|
1164
1173
|
* and generating an invalid module.d.ts
|
|
@@ -1222,6 +1231,7 @@ declare enum SurveyQuestionType {
|
|
|
1222
1231
|
Link = "link"
|
|
1223
1232
|
}
|
|
1224
1233
|
declare type SurveyCallback = (surveys: Survey[]) => void;
|
|
1234
|
+
declare type SurveyUrlMatchType = 'regex' | 'exact' | 'icontains';
|
|
1225
1235
|
interface Survey {
|
|
1226
1236
|
id: string;
|
|
1227
1237
|
name: string;
|
|
@@ -1235,18 +1245,12 @@ interface Survey {
|
|
|
1235
1245
|
url?: string;
|
|
1236
1246
|
selector?: string;
|
|
1237
1247
|
seenSurveyWaitPeriodInDays?: number;
|
|
1248
|
+
urlMatchType?: SurveyUrlMatchType;
|
|
1238
1249
|
} | null;
|
|
1239
1250
|
start_date: string | null;
|
|
1240
1251
|
end_date: string | null;
|
|
1241
1252
|
}
|
|
1242
1253
|
|
|
1243
|
-
declare class PostHogSurveys {
|
|
1244
|
-
instance: PostHog;
|
|
1245
|
-
constructor(instance: PostHog);
|
|
1246
|
-
getSurveys(callback: SurveyCallback, forceReload?: boolean): void;
|
|
1247
|
-
getActiveMatchingSurveys(callback: SurveyCallback, forceReload?: boolean): void;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
1254
|
/**
|
|
1251
1255
|
* PostHog Library Object
|
|
1252
1256
|
* @constructor
|