@kameleoon/javascript-sdk-core 1.1.1 → 2.0.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/dist/campaignConfiguration/campaignConfiguration.d.ts +2 -1
- package/dist/campaignConfiguration/campaignConfiguration.js +239 -197
- package/dist/campaignConfiguration/campaignConfiguration.js.map +1 -1
- package/dist/campaignConfiguration/constants.js +20 -14
- package/dist/campaignConfiguration/constants.js.map +1 -1
- package/dist/campaignConfiguration/index.js +78 -6
- package/dist/campaignConfiguration/index.js.map +1 -1
- package/dist/campaignConfiguration/types.d.ts +3 -2
- package/dist/campaignConfiguration/types.js +53 -45
- package/dist/campaignConfiguration/types.js.map +1 -1
- package/dist/clientSettings/clientSettings.d.ts +1 -1
- package/dist/clientSettings/clientSettings.js +28 -21
- package/dist/clientSettings/clientSettings.js.map +1 -1
- package/dist/clientSettings/index.js +18 -4
- package/dist/clientSettings/index.js.map +1 -1
- package/dist/clientSettings/types.d.ts +1 -1
- package/dist/clientSettings/types.js +4 -1
- package/dist/clientSettings/types.js.map +1 -1
- package/dist/constants.js +22 -14
- package/dist/constants.js.map +1 -1
- package/dist/eventSource/constants.js +6 -2
- package/dist/eventSource/constants.js.map +1 -1
- package/dist/eventSource/externalEventSource.js +28 -20
- package/dist/eventSource/externalEventSource.js.map +1 -1
- package/dist/eventSource/index.js +49 -6
- package/dist/eventSource/index.js.map +1 -1
- package/dist/eventSource/types.d.ts +1 -1
- package/dist/eventSource/types.js +4 -1
- package/dist/eventSource/types.js.map +1 -1
- package/dist/hasher/constants.js +6 -2
- package/dist/hasher/constants.js.map +1 -1
- package/dist/hasher/hasher.js +35 -24
- package/dist/hasher/hasher.js.map +1 -1
- package/dist/hasher/index.js +11 -4
- package/dist/hasher/index.js.map +1 -1
- package/dist/hasher/types.js +4 -1
- package/dist/hasher/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +297 -28
- package/dist/index.js.map +1 -1
- package/dist/kameleoonClient.d.ts +16 -16
- package/dist/kameleoonClient.js +307 -236
- package/dist/kameleoonClient.js.map +1 -1
- package/dist/kameleoonData/browser.js +37 -32
- package/dist/kameleoonData/browser.js.map +1 -1
- package/dist/kameleoonData/constants.js +6 -2
- package/dist/kameleoonData/constants.js.map +1 -1
- package/dist/kameleoonData/conversion.js +47 -40
- package/dist/kameleoonData/conversion.js.map +1 -1
- package/dist/kameleoonData/customData.js +62 -58
- package/dist/kameleoonData/customData.js.map +1 -1
- package/dist/kameleoonData/device.js +37 -32
- package/dist/kameleoonData/device.js.map +1 -1
- package/dist/kameleoonData/index.js +101 -18
- package/dist/kameleoonData/index.js.map +1 -1
- package/dist/kameleoonData/nonce.js +25 -13
- package/dist/kameleoonData/nonce.js.map +1 -1
- package/dist/kameleoonData/pageView.js +52 -44
- package/dist/kameleoonData/pageView.js.map +1 -1
- package/dist/kameleoonData/types.js +41 -26
- package/dist/kameleoonData/types.js.map +1 -1
- package/dist/kameleoonData/userAgent.js +33 -24
- package/dist/kameleoonData/userAgent.js.map +1 -1
- package/dist/kameleoonError/constants.js +25 -21
- package/dist/kameleoonError/constants.js.map +1 -1
- package/dist/kameleoonError/helpers.js +6 -4
- package/dist/kameleoonError/helpers.js.map +1 -1
- package/dist/kameleoonError/index.js +25 -8
- package/dist/kameleoonError/index.js.map +1 -1
- package/dist/kameleoonError/kameleoonError.js +64 -53
- package/dist/kameleoonError/kameleoonError.js.map +1 -1
- package/dist/kameleoonError/types.js +26 -22
- package/dist/kameleoonError/types.js.map +1 -1
- package/dist/kameleoonUtils.js +34 -33
- package/dist/kameleoonUtils.js.map +1 -1
- package/dist/requester/constants.d.ts +6 -7
- package/dist/requester/constants.js +58 -45
- package/dist/requester/constants.js.map +1 -1
- package/dist/requester/index.d.ts +2 -2
- package/dist/requester/index.js +67 -8
- package/dist/requester/index.js.map +1 -1
- package/dist/requester/requester.d.ts +7 -7
- package/dist/requester/requester.js +100 -113
- package/dist/requester/requester.js.map +1 -1
- package/dist/requester/types.d.ts +38 -10
- package/dist/requester/types.js +14 -36
- package/dist/requester/types.js.map +1 -1
- package/dist/storage/constants.js +11 -7
- package/dist/storage/constants.js.map +1 -1
- package/dist/storage/externalStorage.js +33 -26
- package/dist/storage/externalStorage.js.map +1 -1
- package/dist/storage/index.js +55 -6
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/types.js +4 -1
- package/dist/storage/types.js.map +1 -1
- package/dist/targeting/conditions/conditionFactory.js +24 -19
- package/dist/targeting/conditions/conditionFactory.js.map +1 -1
- package/dist/targeting/conditions/customDataCondition.js +99 -88
- package/dist/targeting/conditions/customDataCondition.js.map +1 -1
- package/dist/targeting/conditions/exclusiveExperimentCondition.js +27 -15
- package/dist/targeting/conditions/exclusiveExperimentCondition.js.map +1 -1
- package/dist/targeting/conditions/index.js +45 -10
- package/dist/targeting/conditions/index.js.map +1 -1
- package/dist/targeting/conditions/targetExperimentCondition.js +54 -32
- package/dist/targeting/conditions/targetExperimentCondition.js.map +1 -1
- package/dist/targeting/conditions/types.js +4 -1
- package/dist/targeting/conditions/types.js.map +1 -1
- package/dist/targeting/index.js +79 -13
- package/dist/targeting/index.js.map +1 -1
- package/dist/targeting/targetingNode.js +41 -33
- package/dist/targeting/targetingNode.js.map +1 -1
- package/dist/targeting/targetingTree.js +125 -104
- package/dist/targeting/targetingTree.js.map +1 -1
- package/dist/targeting/types.js +99 -91
- package/dist/targeting/types.js.map +1 -1
- package/dist/types.d.ts +17 -2
- package/dist/types.js +50 -21
- package/dist/types.js.map +1 -1
- package/dist/utilities/constants.js +6 -2
- package/dist/utilities/constants.js.map +1 -1
- package/dist/utilities/index.js +11 -4
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/types.d.ts +1 -1
- package/dist/utilities/types.js +4 -1
- package/dist/utilities/types.js.map +1 -1
- package/dist/utilities/utilities.d.ts +2 -2
- package/dist/utilities/utilities.js +117 -105
- package/dist/utilities/utilities.js.map +1 -1
- package/dist/variationConfiguration/index.js +24 -4
- package/dist/variationConfiguration/index.js.map +1 -1
- package/dist/variationConfiguration/types.js +4 -1
- package/dist/variationConfiguration/types.js.map +1 -1
- package/dist/variationConfiguration/variation.js +35 -28
- package/dist/variationConfiguration/variation.js.map +1 -1
- package/dist/variationConfiguration/variationConfiguration.d.ts +5 -5
- package/dist/variationConfiguration/variationConfiguration.js +270 -228
- package/dist/variationConfiguration/variationConfiguration.js.map +1 -1
- package/package.json +6 -4
|
@@ -1,8 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "CampaignConfiguration", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _campaignConfiguration.CampaignConfiguration;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "CampaignConfigurationType", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _types.CampaignConfigurationType;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ConfigurationDataType", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _types.ConfigurationDataType;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "ExperimentItemType", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _types.ExperimentItemType;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "FeatureFlagType", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _types.FeatureFlagType;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "FeatureVariableType", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _types.FeatureVariableType;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "JSONType", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _types.JSONType;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "JSONValue", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _types.JSONValue;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "RespoolTimeType", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _types.RespoolTimeType;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "RuleItemType", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _types.RuleItemType;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "RuleType", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _types.RuleType;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "VariationByExpositionType", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _types.VariationByExpositionType;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var _types = require("./types");
|
|
79
|
+
var _campaignConfiguration = require("./campaignConfiguration");
|
|
8
80
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_types","require","_campaignConfiguration"],"sources":["../../src/campaignConfiguration/index.ts"],"sourcesContent":["export {\n ConfigurationDataType,\n CampaignConfigurationType,\n VariationByExpositionType,\n FeatureVariableType,\n ExperimentItemType,\n RespoolTimeType,\n FeatureFlagType,\n RuleItemType,\n JSONValue,\n RuleType,\n JSONType,\n} from './types';\nexport { CampaignConfiguration } from './campaignConfiguration';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAaA,IAAAC,sBAAA,GAAAD,OAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientSettingsType } from '../clientSettings';
|
|
2
2
|
import { KameleoonDataType } from '../kameleoonData';
|
|
3
|
-
import { Requester } from '../requester';
|
|
3
|
+
import { Requester, GetClientConfigurationResultType } from '../requester';
|
|
4
4
|
import { ClientDataType, IStorage } from '../storage';
|
|
5
5
|
import { SegmentType, TargetingDataType } from '../targeting';
|
|
6
6
|
import { VariableType } from '../types';
|
|
@@ -95,7 +95,7 @@ export type RuleItemType = {
|
|
|
95
95
|
type: RuleType;
|
|
96
96
|
order: number;
|
|
97
97
|
exposition: number;
|
|
98
|
-
experimentId: number
|
|
98
|
+
experimentId: number;
|
|
99
99
|
variationByExposition: VariationByExpositionType[];
|
|
100
100
|
segment: SegmentType | null;
|
|
101
101
|
};
|
|
@@ -123,4 +123,5 @@ export type CampaignConfigurationParametersType = {
|
|
|
123
123
|
settings: ClientSettingsType;
|
|
124
124
|
storage: IStorage<ClientDataType>;
|
|
125
125
|
requester: Requester;
|
|
126
|
+
externalClientConfiguration?: GetClientConfigurationResultType;
|
|
126
127
|
};
|
|
@@ -1,47 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RuleType = exports.FeatureStatus = exports.FeatureFlagSdkLanguageType = exports.ExperimentType = exports.ExperimentStatus = void 0;
|
|
7
|
+
let ExperimentType = /*#__PURE__*/function (ExperimentType) {
|
|
8
|
+
ExperimentType["CLASSIC"] = "CLASSIC";
|
|
9
|
+
ExperimentType["SERVER_SIDE"] = "SERVER_SIDE";
|
|
10
|
+
ExperimentType["DEVELOPER"] = "DEVELOPER";
|
|
11
|
+
ExperimentType["MVT"] = "MVT";
|
|
12
|
+
ExperimentType["HYBRID"] = "HYBRID";
|
|
13
|
+
return ExperimentType;
|
|
14
|
+
}({});
|
|
15
|
+
exports.ExperimentType = ExperimentType;
|
|
16
|
+
let RuleType = /*#__PURE__*/function (RuleType) {
|
|
17
|
+
RuleType["PROGRESSIVE_DELIVERY"] = "PROGRESSIVE_DELIVERY";
|
|
18
|
+
RuleType["TARGETED_DELIVERY"] = "TARGETED_DELIVERY";
|
|
19
|
+
RuleType["EXPERIMENTATION"] = "EXPERIMENTATION";
|
|
20
|
+
return RuleType;
|
|
21
|
+
}({});
|
|
22
|
+
exports.RuleType = RuleType;
|
|
23
|
+
let FeatureFlagSdkLanguageType = /*#__PURE__*/function (FeatureFlagSdkLanguageType) {
|
|
24
|
+
FeatureFlagSdkLanguageType["ANDROID"] = "ANDROID";
|
|
25
|
+
FeatureFlagSdkLanguageType["SWIFT"] = "SWIFT";
|
|
26
|
+
FeatureFlagSdkLanguageType["JAVA"] = "JAVA";
|
|
27
|
+
FeatureFlagSdkLanguageType["CSHARP"] = "CSHARP";
|
|
28
|
+
FeatureFlagSdkLanguageType["NODEJS"] = "NODEJS";
|
|
29
|
+
FeatureFlagSdkLanguageType["PHP"] = "PHP";
|
|
30
|
+
FeatureFlagSdkLanguageType["RUBY"] = "RUBY";
|
|
31
|
+
FeatureFlagSdkLanguageType["GO"] = "GO";
|
|
32
|
+
FeatureFlagSdkLanguageType["FLUTTER"] = "FLUTTER";
|
|
33
|
+
FeatureFlagSdkLanguageType["REACTJS"] = "REACTJS";
|
|
34
|
+
return FeatureFlagSdkLanguageType;
|
|
35
|
+
}({});
|
|
36
|
+
exports.FeatureFlagSdkLanguageType = FeatureFlagSdkLanguageType;
|
|
37
|
+
let FeatureStatus = /*#__PURE__*/function (FeatureStatus) {
|
|
38
|
+
FeatureStatus["ACTIVATED"] = "ACTIVATED";
|
|
39
|
+
FeatureStatus["DEACTIVATED"] = "DEACTIVATED";
|
|
40
|
+
FeatureStatus["SCHEDULED"] = "SCHEDULED";
|
|
41
|
+
return FeatureStatus;
|
|
42
|
+
}({});
|
|
43
|
+
exports.FeatureStatus = FeatureStatus;
|
|
44
|
+
let ExperimentStatus = /*#__PURE__*/function (ExperimentStatus) {
|
|
45
|
+
ExperimentStatus["DRAFT"] = "DRAFT";
|
|
46
|
+
ExperimentStatus["ACTIVE"] = "ACTIVE";
|
|
47
|
+
ExperimentStatus["PAUSED"] = "PAUSED";
|
|
48
|
+
ExperimentStatus["SCHEDULED"] = "SCHEDULED";
|
|
49
|
+
ExperimentStatus["STOPPED"] = "STOPPED";
|
|
50
|
+
ExperimentStatus["USED_AS_PERSONALIZATION"] = "USED_AS_PERSONALIZATION";
|
|
51
|
+
ExperimentStatus["DEVIATED"] = "DEVIATED";
|
|
52
|
+
return ExperimentStatus;
|
|
53
|
+
}({});
|
|
54
|
+
exports.ExperimentStatus = ExperimentStatus;
|
|
47
55
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","names":["ExperimentType","exports","RuleType","FeatureFlagSdkLanguageType","FeatureStatus","ExperimentStatus"],"sources":["../../src/campaignConfiguration/types.ts"],"sourcesContent":["import { ClientSettingsType } from '../clientSettings';\nimport { KameleoonDataType } from '../kameleoonData';\nimport { Requester, GetClientConfigurationResultType } from '../requester';\nimport { ClientDataType, IStorage } from '../storage';\nimport { SegmentType, TargetingDataType } from '../targeting';\nimport { VariableType } from '../types';\n\nexport type ScheduleType = {\n dateStart: string;\n dateEnd: string;\n};\n\nexport type JSONValue =\n | string\n | number\n | boolean\n | { [x: string]: JSONValue }\n | JSONValue[];\n\nexport type JSONType = Record<string | number | symbol, JSONValue> | null;\n\nexport enum ExperimentType {\n CLASSIC = 'CLASSIC',\n SERVER_SIDE = 'SERVER_SIDE',\n DEVELOPER = 'DEVELOPER',\n MVT = 'MVT',\n HYBRID = 'HYBRID',\n}\n\nexport enum RuleType {\n PROGRESSIVE_DELIVERY = 'PROGRESSIVE_DELIVERY',\n TARGETED_DELIVERY = 'TARGETED_DELIVERY',\n EXPERIMENTATION = 'EXPERIMENTATION',\n}\n\nexport enum FeatureFlagSdkLanguageType {\n ANDROID = 'ANDROID',\n SWIFT = 'SWIFT',\n JAVA = 'JAVA',\n CSHARP = 'CSHARP',\n NODEJS = 'NODEJS',\n PHP = 'PHP',\n RUBY = 'RUBY',\n GO = 'GO',\n FLUTTER = 'FLUTTER',\n REACTJS = 'REACTJS',\n}\n\nexport enum FeatureStatus {\n ACTIVATED = 'ACTIVATED',\n DEACTIVATED = 'DEACTIVATED',\n SCHEDULED = 'SCHEDULED',\n}\n\nexport type ExperimentItemType = {\n id: string;\n name: string;\n type: ExperimentType;\n siteId: string;\n siteCode: string;\n status: ExperimentStatus;\n siteEnabled: boolean;\n variations: ExperimentVariationType[];\n deviations: DeviationType[];\n respoolTime: RespoolTimeType[];\n segment: SegmentType | null;\n};\n\nexport type ExperimentVariationType = {\n id: string;\n customJson: JSONType;\n};\n\nexport type DeviationType = {\n variationId: string;\n value: number;\n};\n\nexport type RespoolTimeType = {\n variationId: string;\n value: number;\n};\n\nexport enum ExperimentStatus {\n DRAFT = 'DRAFT',\n ACTIVE = 'ACTIVE',\n PAUSED = 'PAUSED',\n SCHEDULED = 'SCHEDULED',\n STOPPED = 'STOPPED',\n USED_AS_PERSONALIZATION = 'USED_AS_PERSONALIZATION',\n DEVIATED = 'DEVIATED',\n}\n\nexport type FeatureFlagType = {\n id: number;\n featureKey: string;\n variations: FeatureVariationType[];\n defaultVariationKey: string;\n rules: RuleItemType[];\n};\n\nexport type FeatureVariationType = {\n key: string;\n variables: FeatureVariableType[];\n};\n\nexport type FeatureVariableType = {\n key: string;\n type: VariableType;\n value: string | number | boolean;\n};\n\nexport type RuleItemType = {\n type: RuleType;\n order: number;\n exposition: number;\n experimentId: number;\n variationByExposition: VariationByExpositionType[];\n segment: SegmentType | null;\n};\n\nexport type VariationByExpositionType = {\n variationKey: string;\n variationId: number | null;\n exposition: number;\n};\n\nexport type ConfigurationDataType = {\n experiments: ExperimentItemType[];\n featureFlags: FeatureFlagType[];\n configuration: ConfigurationType;\n};\n\nexport type ConfigurationType = {\n realTimeUpdate: boolean;\n};\n\nexport type CampaignConfigurationType = {\n targetingData: TargetingDataType;\n configurationData: ConfigurationDataType;\n};\n\nexport type UnsentTargetingDataType = {\n [visitorCode: string]: KameleoonDataType[];\n};\n\nexport type CampaignConfigurationParametersType = {\n settings: ClientSettingsType;\n storage: IStorage<ClientDataType>;\n requester: Requester;\n externalClientConfiguration?: GetClientConfigurationResultType;\n};\n"],"mappings":";;;;;;IAqBYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAAC,OAAA,CAAAD,cAAA,GAAAA,cAAA;AAAA,IAQdE,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAAD,OAAA,CAAAC,QAAA,GAAAA,QAAA;AAAA,IAMRC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAAAF,OAAA,CAAAE,0BAAA,GAAAA,0BAAA;AAAA,IAa1BC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAAAH,OAAA,CAAAG,aAAA,GAAAA,aAAA;AAAA,IAmCbC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAAAJ,OAAA,CAAAI,gBAAA,GAAAA,gBAAA"}
|
|
@@ -5,7 +5,7 @@ export interface IClientSettings {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class ClientSettings implements IClientSettings {
|
|
7
7
|
private updateInterval;
|
|
8
|
-
private environment
|
|
8
|
+
private environment?;
|
|
9
9
|
private siteCode;
|
|
10
10
|
constructor(siteCode: string, configuration?: Partial<SDKConfigurationType>);
|
|
11
11
|
get settings(): ClientSettingsType;
|
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.ClientSettings = void 0;
|
|
4
|
-
|
|
7
|
+
var _types = require("../types");
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
11
|
class ClientSettings {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (configuration === null || configuration === void 0 ? void 0 : configuration.updateInterval) {
|
|
14
|
-
if (configuration.updateInterval < 1) {
|
|
15
|
-
this.updateInterval = 1 * types_1.Milliseconds.Minute;
|
|
16
|
-
}
|
|
17
|
-
this.updateInterval = configuration.updateInterval * types_1.Milliseconds.Minute;
|
|
18
|
-
}
|
|
12
|
+
constructor(siteCode, configuration) {
|
|
13
|
+
_defineProperty(this, "updateInterval", 30 * _types.Milliseconds.Minute);
|
|
14
|
+
_defineProperty(this, "environment", void 0);
|
|
15
|
+
_defineProperty(this, "siteCode", void 0);
|
|
16
|
+
this.siteCode = siteCode;
|
|
17
|
+
if (configuration?.environment) {
|
|
18
|
+
this.environment = configuration.environment;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
20
|
+
if (configuration?.updateInterval) {
|
|
21
|
+
if (configuration.updateInterval < 1) {
|
|
22
|
+
this.updateInterval = 1 * _types.Milliseconds.Minute;
|
|
23
|
+
}
|
|
24
|
+
this.updateInterval = configuration.updateInterval * _types.Milliseconds.Minute;
|
|
26
25
|
}
|
|
26
|
+
}
|
|
27
|
+
get settings() {
|
|
28
|
+
return {
|
|
29
|
+
updateInterval: this.updateInterval,
|
|
30
|
+
environment: this.environment,
|
|
31
|
+
siteCode: this.siteCode
|
|
32
|
+
};
|
|
33
|
+
}
|
|
27
34
|
}
|
|
28
35
|
exports.ClientSettings = ClientSettings;
|
|
29
36
|
//# sourceMappingURL=clientSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientSettings.js","
|
|
1
|
+
{"version":3,"file":"clientSettings.js","names":["_types","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ClientSettings","constructor","siteCode","configuration","Milliseconds","Minute","environment","updateInterval","settings","exports"],"sources":["../../src/clientSettings/clientSettings.ts"],"sourcesContent":["import { Environment, Milliseconds, SDKConfigurationType } from '../types';\nimport { ClientSettingsType } from './types';\n\nexport interface IClientSettings {\n readonly settings: ClientSettingsType;\n}\n\nexport class ClientSettings implements IClientSettings {\n private updateInterval: number = 30 * Milliseconds.Minute;\n private environment?: Environment;\n private siteCode: string;\n\n constructor(siteCode: string, configuration?: Partial<SDKConfigurationType>) {\n this.siteCode = siteCode;\n\n if (configuration?.environment) {\n this.environment = configuration.environment;\n }\n\n if (configuration?.updateInterval) {\n if (configuration.updateInterval < 1) {\n this.updateInterval = 1 * Milliseconds.Minute;\n }\n\n this.updateInterval = configuration.updateInterval * Milliseconds.Minute;\n }\n }\n\n get settings(): ClientSettingsType {\n return {\n updateInterval: this.updateInterval,\n environment: this.environment,\n siteCode: this.siteCode,\n };\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAA2E,SAAAC,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAOpE,MAAMU,cAAc,CAA4B;EAKrDC,WAAWA,CAACC,QAAgB,EAAEC,aAA6C,EAAE;IAAA1B,eAAA,yBAJ5C,EAAE,GAAG2B,mBAAY,CAACC,MAAM;IAAA5B,eAAA;IAAAA,eAAA;IAKvD,IAAI,CAACyB,QAAQ,GAAGA,QAAQ;IAExB,IAAIC,aAAa,EAAEG,WAAW,EAAE;MAC9B,IAAI,CAACA,WAAW,GAAGH,aAAa,CAACG,WAAW;IAC9C;IAEA,IAAIH,aAAa,EAAEI,cAAc,EAAE;MACjC,IAAIJ,aAAa,CAACI,cAAc,GAAG,CAAC,EAAE;QACpC,IAAI,CAACA,cAAc,GAAG,CAAC,GAAGH,mBAAY,CAACC,MAAM;MAC/C;MAEA,IAAI,CAACE,cAAc,GAAGJ,aAAa,CAACI,cAAc,GAAGH,mBAAY,CAACC,MAAM;IAC1E;EACF;EAEA,IAAIG,QAAQA,CAAA,EAAuB;IACjC,OAAO;MACLD,cAAc,EAAE,IAAI,CAACA,cAAc;MACnCD,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BJ,QAAQ,EAAE,IAAI,CAACA;IACjB,CAAC;EACH;AACF;AAACO,OAAA,CAAAT,cAAA,GAAAA,cAAA"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ClientSettings", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _clientSettings.ClientSettings;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ClientSettingsType", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _types.ClientSettingsType;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _clientSettings = require("./clientSettings");
|
|
19
|
+
var _types = require("./types");
|
|
6
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_clientSettings","require","_types"],"sources":["../../src/clientSettings/index.ts"],"sourcesContent":["export { ClientSettings } from './clientSettings';\nexport { ClientSettingsType } from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/clientSettings/types.ts"],"sourcesContent":["import { Environment } from '../types';\n\nexport type ClientSettingsType = {\n updateInterval: number;\n environment?: Environment;\n siteCode: string;\n};\n"],"mappings":""}
|
package/dist/constants.js
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.KAMELEOON_COOKIE_KEY =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VISITOR_CODE_LENGTH = exports.UNALLOCATED_VARIATION_ID = exports.OFF_VARIATION_KEY = exports.KAMELEOON_COOKIE_KEY = exports.Cookie = void 0;
|
|
7
|
+
const UNALLOCATED_VARIATION_ID = 0;
|
|
8
|
+
exports.UNALLOCATED_VARIATION_ID = UNALLOCATED_VARIATION_ID;
|
|
9
|
+
const OFF_VARIATION_KEY = 'off';
|
|
10
|
+
exports.OFF_VARIATION_KEY = OFF_VARIATION_KEY;
|
|
11
|
+
const KAMELEOON_COOKIE_KEY = 'kameleoonVisitorCode';
|
|
12
|
+
exports.KAMELEOON_COOKIE_KEY = KAMELEOON_COOKIE_KEY;
|
|
13
|
+
const VISITOR_CODE_LENGTH = 16;
|
|
14
|
+
exports.VISITOR_CODE_LENGTH = VISITOR_CODE_LENGTH;
|
|
15
|
+
let Cookie = /*#__PURE__*/function (Cookie) {
|
|
16
|
+
Cookie["PairsDelimiter"] = "; ";
|
|
17
|
+
Cookie["KeyValueDelimiter"] = "=";
|
|
18
|
+
Cookie["MaxAge"] = "MaxAge";
|
|
19
|
+
Cookie["Path"] = "Path";
|
|
20
|
+
Cookie["Domain"] = "Domain";
|
|
21
|
+
return Cookie;
|
|
22
|
+
}({});
|
|
23
|
+
exports.Cookie = Cookie;
|
|
16
24
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","
|
|
1
|
+
{"version":3,"file":"constants.js","names":["UNALLOCATED_VARIATION_ID","exports","OFF_VARIATION_KEY","KAMELEOON_COOKIE_KEY","VISITOR_CODE_LENGTH","Cookie"],"sources":["../src/constants.ts"],"sourcesContent":["export const UNALLOCATED_VARIATION_ID = 0;\nexport const OFF_VARIATION_KEY = 'off';\nexport const KAMELEOON_COOKIE_KEY = 'kameleoonVisitorCode';\nexport const VISITOR_CODE_LENGTH = 16;\n\nexport enum Cookie {\n PairsDelimiter = '; ',\n KeyValueDelimiter = '=',\n MaxAge = 'MaxAge',\n Path = 'Path',\n Domain = 'Domain',\n}\n"],"mappings":";;;;;;AAAO,MAAMA,wBAAwB,GAAG,CAAC;AAACC,OAAA,CAAAD,wBAAA,GAAAA,wBAAA;AACnC,MAAME,iBAAiB,GAAG,KAAK;AAACD,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAChC,MAAMC,oBAAoB,GAAG,sBAAsB;AAACF,OAAA,CAAAE,oBAAA,GAAAA,oBAAA;AACpD,MAAMC,mBAAmB,GAAG,EAAE;AAACH,OAAA,CAAAG,mBAAA,GAAAA,mBAAA;AAAA,IAE1BC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAAAJ,OAAA,CAAAI,MAAA,GAAAA,MAAA"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.REAL_TIME_EVENT = void 0;
|
|
4
|
-
|
|
7
|
+
const REAL_TIME_EVENT = 'configuration-update-event';
|
|
8
|
+
exports.REAL_TIME_EVENT = REAL_TIME_EVENT;
|
|
5
9
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","
|
|
1
|
+
{"version":3,"file":"constants.js","names":["REAL_TIME_EVENT","exports"],"sources":["../../src/eventSource/constants.ts"],"sourcesContent":["export const REAL_TIME_EVENT = 'configuration-update-event';\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAG,4BAA4B;AAACC,OAAA,CAAAD,eAAA,GAAAA,eAAA"}
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.ExternalEventSource = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
var _requester = require("../requester");
|
|
8
|
+
var _constants = require("../requester/constants");
|
|
9
|
+
var _constants2 = require("./constants");
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
13
|
class ExternalEventSource {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
constructor(siteCode, externalEventSource) {
|
|
15
|
+
_defineProperty(this, "eventSource", void 0);
|
|
16
|
+
_defineProperty(this, "siteCode", void 0);
|
|
17
|
+
const url = _requester.URL.EVENTS + _constants.UrlQuery.Sse + siteCode;
|
|
18
|
+
const eventSource = externalEventSource.initialize(url);
|
|
19
|
+
this.eventSource = eventSource;
|
|
20
|
+
this.siteCode = siteCode;
|
|
21
|
+
}
|
|
22
|
+
open(onEvent) {
|
|
23
|
+
this.eventSource.open({
|
|
24
|
+
onEvent,
|
|
25
|
+
siteCode: this.siteCode,
|
|
26
|
+
eventType: _constants2.REAL_TIME_EVENT
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
close() {
|
|
30
|
+
this.eventSource.close();
|
|
31
|
+
}
|
|
24
32
|
}
|
|
25
33
|
exports.ExternalEventSource = ExternalEventSource;
|
|
26
34
|
//# sourceMappingURL=externalEventSource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"externalEventSource.js","
|
|
1
|
+
{"version":3,"file":"externalEventSource.js","names":["_requester","require","_constants","_constants2","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ExternalEventSource","constructor","siteCode","externalEventSource","url","URL","EVENTS","UrlQuery","Sse","eventSource","initialize","open","onEvent","eventType","REAL_TIME_EVENT","close","exports"],"sources":["../../src/eventSource/externalEventSource.ts"],"sourcesContent":["import { URL } from '../requester';\nimport { UrlQuery } from '../requester/constants';\nimport { REAL_TIME_EVENT } from './constants';\nimport { IExternalEventSource, IExternalEventSourceConstructor } from './types';\n\nexport interface IEventSource {\n open: (onEvent: (timestamp: number) => void) => void;\n close: () => void;\n}\n\nexport class ExternalEventSource implements IEventSource {\n private eventSource: IExternalEventSource;\n private siteCode: string;\n\n constructor(\n siteCode: string,\n externalEventSource: IExternalEventSourceConstructor,\n ) {\n const url = URL.EVENTS + UrlQuery.Sse + siteCode;\n const eventSource = externalEventSource.initialize(url);\n\n this.eventSource = eventSource;\n this.siteCode = siteCode;\n }\n\n public open(onEvent: (timestamp: number) => void): void {\n this.eventSource.open({\n onEvent,\n siteCode: this.siteCode,\n eventType: REAL_TIME_EVENT,\n });\n }\n\n public close(): void {\n this.eventSource.close();\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAA8C,SAAAG,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAQvC,MAAMU,mBAAmB,CAAyB;EAIvDC,WAAWA,CACTC,QAAgB,EAChBC,mBAAoD,EACpD;IAAA1B,eAAA;IAAAA,eAAA;IACA,MAAM2B,GAAG,GAAGC,cAAG,CAACC,MAAM,GAAGC,mBAAQ,CAACC,GAAG,GAAGN,QAAQ;IAChD,MAAMO,WAAW,GAAGN,mBAAmB,CAACO,UAAU,CAACN,GAAG,CAAC;IAEvD,IAAI,CAACK,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACP,QAAQ,GAAGA,QAAQ;EAC1B;EAEOS,IAAIA,CAACC,OAAoC,EAAQ;IACtD,IAAI,CAACH,WAAW,CAACE,IAAI,CAAC;MACpBC,OAAO;MACPV,QAAQ,EAAE,IAAI,CAACA,QAAQ;MACvBW,SAAS,EAAEC;IACb,CAAC,CAAC;EACJ;EAEOC,KAAKA,CAAA,EAAS;IACnB,IAAI,CAACN,WAAW,CAACM,KAAK,EAAE;EAC1B;AACF;AAACC,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA"}
|
|
@@ -1,8 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "EventSourceOpenParametersType", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _types.EventSourceOpenParametersType;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "ExternalEventSource", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _externalEventSource.ExternalEventSource;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "IEventSource", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _externalEventSource.IEventSource;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "IExternalEventSource", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _types.IExternalEventSource;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "IExternalEventSourceConstructor", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _types.IExternalEventSourceConstructor;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "REAL_TIME_EVENT", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _constants.REAL_TIME_EVENT;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "RealTimeEventType", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _types.RealTimeEventType;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var _types = require("./types");
|
|
49
|
+
var _externalEventSource = require("./externalEventSource");
|
|
50
|
+
var _constants = require("./constants");
|
|
8
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_types","require","_externalEventSource","_constants"],"sources":["../../src/eventSource/index.ts"],"sourcesContent":["export {\n IExternalEventSourceConstructor,\n EventSourceOpenParametersType,\n IExternalEventSource,\n RealTimeEventType,\n} from './types';\nexport { ExternalEventSource, IEventSource } from './externalEventSource';\nexport { REAL_TIME_EVENT } from './constants';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @interface an interface of External Constructor for
|
|
2
|
+
* @interface an interface of External Constructor for External Event Source which must be implemented by the wrapper constructor to initialize new `IExternalEventSource` in order to pass the necessary `url` parameter
|
|
3
3
|
* */
|
|
4
4
|
export interface IExternalEventSourceConstructor {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/eventSource/types.ts"],"sourcesContent":["/**\n * @interface an interface of External Constructor for External Event Source which must be implemented by the wrapper constructor to initialize new `IExternalEventSource` in order to pass the necessary `url` parameter\n * */\nexport interface IExternalEventSourceConstructor {\n /**\n * @method initialize - creates and instance of `IExternalEventSource` and returns it\n * @param {string} url - url of server sent event server which will be pasted by consumer\n * @returns {IExternalEventSource} an initialized instance of `IExternalEventSource`\n * */\n initialize: (url: string) => IExternalEventSource;\n}\n\n/**\n * @param {string} siteCode - site code from the event\n * @param {string} eventType - type of event to be listened for\n * @param {(timestamp: number) => void} onEvent - callback to be executed upon event if the site code from event matches the site code of EvenetSource\n * */\nexport type EventSourceOpenParametersType = {\n siteCode: string;\n eventType: string;\n onEvent: (timestamp: number) => void;\n};\n\n/**\n * @interface an interface of External Event Source which will be used in server sent events operations\n * */\nexport interface IExternalEventSource {\n /**\n * @method open - opens event source live connection\n * @param {(timestamp: number) => void} callback - callback function that will be executed on each obtainment of server event\n * */\n open: ({\n siteCode,\n eventType,\n onEvent,\n }: EventSourceOpenParametersType) => void;\n /**\n * @method close - closes event source live connection\n * */\n close: () => void;\n}\n\n/**\n * @param {string} siteCode - site code from the event\n * @param {number} ts - timestamp of when the event has happened\n * */\nexport type RealTimeEventType = {\n siteCode: string;\n ts: number;\n};\n\nexport type CreateEventSourceParamsType = {\n siteCode: string;\n externalEventSource?: IExternalEventSourceConstructor;\n};\n"],"mappings":""}
|
package/dist/hasher/constants.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.RESHUFFLE_SUFFIX = void 0;
|
|
4
|
-
|
|
7
|
+
const RESHUFFLE_SUFFIX = 'variation';
|
|
8
|
+
exports.RESHUFFLE_SUFFIX = RESHUFFLE_SUFFIX;
|
|
5
9
|
//# sourceMappingURL=constants.js.map
|