@kameleoon/javascript-sdk-core 5.16.0 → 5.16.1

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.
@@ -1,6 +1,7 @@
1
1
  import { VisitType } from '../requester';
2
2
  import { ConversionDataType, ConversionParametersType, IKameleoonData } from './types';
3
3
  import { TrackingStatus } from '../types';
4
+ import { CustomData } from '../kameleoonData/customData';
4
5
  /**
5
6
  * @class
6
7
  * Conversion - a class for creating an instance for conversion tracking
@@ -20,6 +21,7 @@ export declare class Conversion implements IKameleoonData {
20
21
  set _id(id: number);
21
22
  set _nonce(nonce: string);
22
23
  get url(): string;
24
+ get _metadata(): CustomData[] | undefined;
23
25
  get data(): ConversionDataType;
24
26
  private _encodeMetadata;
25
27
  /**
@@ -6,12 +6,13 @@ import { TrackingStatus } from '../types';
6
6
  * CustomData - a class for creating an instance for user's custom data
7
7
  * */
8
8
  export declare class CustomData implements IKameleoonData {
9
+ static readonly UNDEFINED_INDEX = -1;
9
10
  private _status;
10
- private index;
11
+ private _index;
11
12
  private value;
12
13
  private isIdentifier;
13
14
  private overwrite;
14
- private name?;
15
+ private _name?;
15
16
  /**
16
17
  * @param {number|string} indexOrName - either:
17
18
  * - `number` — an index of custom data (configured in *Advanced Tools* section of Kameleoon Application)
@@ -68,8 +69,18 @@ export declare class CustomData implements IKameleoonData {
68
69
  static _updateFromVisit(visit: VisitType, dataMap: Map<number, CustomData>): void;
69
70
  /**
70
71
  * @private
71
- * @method _index - an internal setter for setting index of custom data
72
+ * @method index - an internal setter for setting index of custom data
72
73
  * @param {number} value - an index value
73
74
  * */
74
- set _index(value: number);
75
+ set index(value: number);
76
+ /**
77
+ * @private
78
+ * @method index - an internal getter for index of custom data
79
+ * */
80
+ get index(): number;
81
+ /**
82
+ * @private
83
+ * @method name - an internal getter for a name of custom data
84
+ * */
85
+ get name(): string | undefined;
75
86
  }
@@ -60,6 +60,7 @@ export declare class DataManager implements IDataManager {
60
60
  private mutUpdateTargetingData;
61
61
  private cleanupData;
62
62
  private processCustomData;
63
+ private trySetCustomDataIndexByName;
63
64
  get unsentDataVisitors(): string[];
64
65
  get identifierCustomDataIndex(): number | null;
65
66
  get trees(): Map<string, Tree>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kameleoon/javascript-sdk-core",
3
- "version": "5.16.0",
3
+ "version": "5.16.1",
4
4
  "description": "Kameleoon JS SDK Core",
5
5
  "main": "dist/javascript-sdk-core.cjs.js",
6
6
  "module": "dist/javascript-sdk-core.es.js",