@convertcom/js-sdk-rules 2.0.0 → 2.1.2
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 +2 -2
- package/lib/enums/index.d.ts +26 -0
- package/lib/enums/src/bucketing-error.d.ts +9 -0
- package/lib/enums/src/conversion-setting-key.d.ts +9 -0
- package/lib/enums/src/data-enitites.d.ts +16 -0
- package/lib/enums/src/dictionary.d.ts +68 -0
- package/lib/enums/src/do-not-track.d.ts +12 -0
- package/lib/enums/src/entity-type.d.ts +15 -0
- package/lib/enums/src/feature-status.d.ts +10 -0
- package/lib/enums/src/goal-data-key.d.ts +11 -0
- package/lib/enums/src/log-level.d.ts +14 -0
- package/lib/enums/src/log-method.d.ts +14 -0
- package/lib/enums/src/project-type.d.ts +10 -0
- package/lib/enums/src/rule-error.d.ts +10 -0
- package/lib/enums/src/segments/browser-type.d.ts +17 -0
- package/lib/enums/src/segments/device-type.d.ts +16 -0
- package/lib/enums/src/segments/segments-keys.d.ts +15 -0
- package/lib/enums/src/segments/source-type.d.ts +12 -0
- package/lib/enums/src/segments/visitor-type.d.ts +10 -0
- package/lib/enums/src/system-events.d.ts +22 -0
- package/lib/enums/src/variable-types.d.ts +7 -0
- package/lib/enums/src/variation-change-type.d.ts +14 -0
- package/lib/index.d.ts +5 -4
- package/lib/index.js +767 -30
- package/lib/index.js.map +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.map +1 -1
- package/lib/index.min.mjs +1 -1
- package/lib/index.min.mjs.map +1 -1
- package/lib/index.mjs +743 -6
- package/lib/index.mjs.map +1 -1
- package/lib/legacy/index.js +798 -140
- package/lib/legacy/index.js.map +1 -1
- package/lib/legacy/index.min.js +1 -1
- package/lib/legacy/index.min.js.map +1 -1
- package/lib/logger/index.d.ts +8 -0
- package/lib/logger/src/interfaces/log-client.d.ts +13 -0
- package/lib/logger/src/interfaces/log-manager.d.ts +18 -0
- package/lib/logger/src/interfaces/log-method-map.d.ts +15 -0
- package/lib/logger/src/log-manager.d.ts +64 -0
- package/lib/package.json +6 -6
- package/lib/rules/index.d.ts +8 -0
- package/lib/rules/src/interfaces/rule-manager.d.ts +15 -0
- package/lib/rules/src/rule-manager.d.ts +82 -0
- package/lib/types/index.d.ts +28 -0
- package/lib/types/src/BucketedFeature.d.ts +29 -0
- package/lib/types/src/BucketedVariation.d.ts +13 -0
- package/lib/types/src/BucketingAllocation.d.ts +10 -0
- package/lib/types/src/BucketingAttributes.d.ts +17 -0
- package/lib/types/src/BucketingHash.d.ts +11 -0
- package/lib/types/src/Config.d.ts +60 -0
- package/lib/types/src/ConversionAttributes.d.ts +13 -0
- package/lib/types/src/Entity.d.ts +8 -0
- package/lib/types/src/GoalData.d.ts +11 -0
- package/lib/types/src/IndentityField.d.ts +7 -0
- package/lib/types/src/Integration.d.ts +8 -0
- package/lib/types/src/LocationAttributes.d.ts +12 -0
- package/lib/types/src/Path.d.ts +10 -0
- package/lib/types/src/RequireAtLeastOne.d.ts +3 -0
- package/lib/types/src/Rule.d.ts +13 -0
- package/lib/types/src/SegmentsAttributes.d.ts +9 -0
- package/lib/types/src/StoreData.d.ts +13 -0
- package/lib/types/src/TrackingEvent.d.ts +14 -0
- package/lib/types/src/VariableType.d.ts +8 -0
- package/lib/types/src/Visitor.d.ts +12 -0
- package/lib/types/src/VisitorsQueue.d.ts +14 -0
- package/lib/types/src/config/index.d.ts +1 -0
- package/lib/types/src/config/types.gen.d.ts +2387 -0
- package/lib/utils/index.d.ts +14 -0
- package/lib/utils/src/array-utils.d.ts +11 -0
- package/lib/utils/src/comparisons.d.ts +22 -0
- package/lib/utils/src/data-store.d.ts +39 -0
- package/lib/utils/src/file-logger.d.ts +40 -0
- package/lib/utils/src/http-client.d.ts +115 -0
- package/lib/utils/src/object-utils.d.ts +35 -0
- package/lib/utils/src/string-utils.d.ts +32 -0
- package/lib/utils/src/types-utils.d.ts +12 -0
- package/package.json +35 -31
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Convert JS SDK
|
|
3
|
+
* Version 1.0.0
|
|
4
|
+
* Copyright(c) 2020 Convert Insights, Inc
|
|
5
|
+
* License Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { RuleElement } from './config/index';
|
|
8
|
+
export type RuleOrWhen = {
|
|
9
|
+
OR_WHEN: Array<RuleElement>;
|
|
10
|
+
};
|
|
11
|
+
export type RuleAnd = {
|
|
12
|
+
AND: Array<RuleOrWhen>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Convert JS SDK
|
|
3
|
+
* Version 1.0.0
|
|
4
|
+
* Copyright(c) 2020 Convert Insights, Inc
|
|
5
|
+
* License Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { VisitorSegments } from './config/index';
|
|
8
|
+
export type StoreData = {
|
|
9
|
+
bucketing?: Record<string, string>;
|
|
10
|
+
locations?: Array<string>;
|
|
11
|
+
segments?: VisitorSegments;
|
|
12
|
+
goals?: Record<string, boolean>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Convert JS SDK
|
|
3
|
+
* Version 1.0.0
|
|
4
|
+
* Copyright(c) 2020 Convert Insights, Inc
|
|
5
|
+
* License Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { Visitor } from './Visitor';
|
|
8
|
+
export type TrackingEvent = {
|
|
9
|
+
accountId?: string;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
enrichData?: boolean;
|
|
12
|
+
source?: string;
|
|
13
|
+
visitors: Array<Visitor>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Convert JS SDK
|
|
3
|
+
* Version 1.0.0
|
|
4
|
+
* Copyright(c) 2020 Convert Insights, Inc
|
|
5
|
+
* License Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { VisitorSegments, VisitorTrackingEvents } from './config/index';
|
|
8
|
+
export type Visitor = {
|
|
9
|
+
visitorId: string;
|
|
10
|
+
segments?: VisitorSegments;
|
|
11
|
+
events: Array<VisitorTrackingEvents>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Convert JS SDK
|
|
3
|
+
* Version 1.0.0
|
|
4
|
+
* Copyright(c) 2020 Convert Insights, Inc
|
|
5
|
+
* License Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { VisitorSegments, VisitorTrackingEvents } from './config/index';
|
|
8
|
+
import { Visitor } from './Visitor';
|
|
9
|
+
export type VisitorsQueue = {
|
|
10
|
+
length: number;
|
|
11
|
+
items: Array<Visitor>;
|
|
12
|
+
push: (visitorId: string, eventRequest: VisitorTrackingEvents, segments?: VisitorSegments) => void;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types.gen';
|