@splitsoftware/splitio-browserjs 0.3.0 → 0.3.1-rc.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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaults = void 0;
4
4
  var index_1 = require("@splitsoftware/splitio-commons/cjs/logger/index");
5
- var packageVersion = '0.3.0';
5
+ var packageVersion = '0.3.1-rc.0';
6
6
  /**
7
7
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
8
8
  * Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
@@ -1,5 +1,5 @@
1
1
  import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index';
2
- var packageVersion = '0.3.0';
2
+ var packageVersion = '0.3.1-rc.0';
3
3
  /**
4
4
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
5
5
  * Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-browserjs",
3
- "version": "0.3.0",
3
+ "version": "0.3.1-rc.0",
4
4
  "description": "Split SDK for Javascript on Browser",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -61,7 +61,7 @@
61
61
  "bugs": "https://github.com/splitio/javascript-browser-client/issues",
62
62
  "homepage": "https://github.com/splitio/javascript-browser-client#readme",
63
63
  "dependencies": {
64
- "@splitsoftware/splitio-commons": "^1.1.0",
64
+ "@splitsoftware/splitio-commons": "1.1.1-rc.0",
65
65
  "@types/google.analytics": "0.0.40"
66
66
  },
67
67
  "devDependencies": {
@@ -1,7 +1,7 @@
1
1
  import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/logger/index';
2
2
  import { LogLevel } from '@splitsoftware/splitio-commons/src/types';
3
3
 
4
- const packageVersion = '0.3.0';
4
+ const packageVersion = '0.3.1-rc.0';
5
5
 
6
6
  /**
7
7
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
@@ -1199,6 +1199,45 @@ declare namespace SplitIO {
1199
1199
  * @returns {boolean} Whether the event was added to the queue successfully or not.
1200
1200
  */
1201
1201
  track(trafficType: string, eventType: string, value?: number, properties?: Properties): boolean,
1202
+ /**
1203
+ * Add an attribute to client's in memory attributes storage
1204
+ * @function setAttribute
1205
+ * @param {string} attributeName Attrinute name
1206
+ * @param {string, number, boolean, list} attributeValue Attribute value
1207
+ * @returns {boolean} true if the attribute was stored and false otherways
1208
+ */
1209
+ setAttribute(attributeName: string, attributeValue: Object): boolean,
1210
+ /**
1211
+ * Returns the attribute with the given key
1212
+ * @function getAttribute
1213
+ * @param {string} attributeName Attribute name
1214
+ * @returns {Object} Attribute with the given key
1215
+ */
1216
+ getAttribute(attributeName: string): Object,
1217
+ /**
1218
+ * Add to client's in memory attributes storage the attributes in 'attributes'
1219
+ * @function setAttributes
1220
+ * @param {Object} attributes Object with attributes to store
1221
+ * @returns true if attributes were stored an false otherways
1222
+ */
1223
+ setAttributes(attributes: Record<string, Object>): boolean,
1224
+ /**
1225
+ * Return all the attributes stored in client's in memory attributes storage
1226
+ * @function getAttributes
1227
+ * @returns {Object} returns all the stored attributes
1228
+ */
1229
+ getAttributes(): Record<string, Object>,
1230
+ /**
1231
+ * Removes from client's in memory attributes storage the attribute with the given key
1232
+ * @function removeAttribute
1233
+ * @param {string} attributeName
1234
+ * @returns {boolean} true if attribute was removed and false otherways
1235
+ */
1236
+ removeAttribute(attributeName: string): boolean,
1237
+ /**
1238
+ * Remove all the stored attributes in the client's in memory attribute storage
1239
+ */
1240
+ clearAttributes(): any
1202
1241
  }
1203
1242
  /**
1204
1243
  * This represents the interface for the Client instance with asynchronous storage for client-side SDK, where each client has associated a key.