@amplitude/analytics-client-common 2.0.0-beta.1 → 2.0.0-beta.3

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,7 +1,7 @@
1
- import { BeforePlugin, Config, Event, PluginType } from '@amplitude/analytics-types';
1
+ import { BeforePlugin, Config, Event } from '@amplitude/analytics-types';
2
2
  export declare class IdentityEventSender implements BeforePlugin {
3
3
  name: string;
4
- type: PluginType.BEFORE;
4
+ type: "before";
5
5
  identityStore: import("@amplitude/analytics-connector/dist/types/src/identityStore").IdentityStoreImpl;
6
6
  execute(context: Event): Promise<Event>;
7
7
  setup(_: Config): Promise<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGrF,qBAAa,mBAAoB,YAAW,YAAY;IACtD,IAAI,SAAc;IAClB,IAAI,oBAA8B;IAElC,aAAa,0FAAyC;IAEhD,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAQ7C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGrC"}
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGzE,qBAAa,mBAAoB,YAAW,YAAY;IACtD,IAAI,SAAc;IAClB,IAAI,WAAqB;IAEzB,aAAa,0FAAyC;IAEhD,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAQ7C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGrC"}
@@ -1,12 +1,11 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.IdentityEventSender = void 0;
3
3
  var tslib_1 = require("tslib");
4
- var analytics_types_1 = require("@amplitude/analytics-types");
5
4
  var analytics_connector_1 = require("../analytics-connector");
6
5
  var IdentityEventSender = /** @class */ (function () {
7
6
  function IdentityEventSender() {
8
7
  this.name = 'identity';
9
- this.type = analytics_types_1.PluginType.BEFORE;
8
+ this.type = 'before';
10
9
  this.identityStore = (0, analytics_connector_1.getAnalyticsConnector)().identityStore;
11
10
  }
12
11
  IdentityEventSender.prototype.execute = function (context) {
@@ -1 +1 @@
1
- {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":";;;AAAA,8DAAqF;AACrF,8DAA+D;AAE/D;IAAA;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,SAAI,GAAG,4BAAU,CAAC,MAAe,CAAC;QAElC,kBAAa,GAAG,IAAA,2CAAqB,GAAE,CAAC,aAAa,CAAC;IAaxD,CAAC;IAXO,qCAAO,GAAb,UAAc,OAAc;;;;gBACpB,cAAc,GAAG,OAAO,CAAC,eAAsC,CAAC;gBACtE,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjF;gBACD,sBAAO,OAAO,EAAC;;;KAChB;IAED,mCAAK,GAAL,UAAM,CAAS;QACb,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IACH,0BAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,kDAAmB","sourcesContent":["import { BeforePlugin, Config, Event, PluginType } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = PluginType.BEFORE as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"]}
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":";;;AACA,8DAA+D;AAE/D;IAAA;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,SAAI,GAAG,QAAiB,CAAC;QAEzB,kBAAa,GAAG,IAAA,2CAAqB,GAAE,CAAC,aAAa,CAAC;IAaxD,CAAC;IAXO,qCAAO,GAAb,UAAc,OAAc;;;;gBACpB,cAAc,GAAG,OAAO,CAAC,eAAsC,CAAC;gBACtE,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjF;gBACD,sBAAO,OAAO,EAAC;;;KAChB;IAED,mCAAK,GAAL,UAAM,CAAS;QACb,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IACH,0BAAC;AAAD,CAAC,AAjBD,IAiBC;AAjBY,kDAAmB","sourcesContent":["import { BeforePlugin, Config, Event } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = 'before' as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { BeforePlugin, Config, Event, PluginType } from '@amplitude/analytics-types';
1
+ import { BeforePlugin, Config, Event } from '@amplitude/analytics-types';
2
2
  export declare class IdentityEventSender implements BeforePlugin {
3
3
  name: string;
4
- type: PluginType.BEFORE;
4
+ type: "before";
5
5
  identityStore: import("@amplitude/analytics-connector/dist/types/src/identityStore").IdentityStoreImpl;
6
6
  execute(context: Event): Promise<Event>;
7
7
  setup(_: Config): Promise<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGrF,qBAAa,mBAAoB,YAAW,YAAY;IACtD,IAAI,SAAc;IAClB,IAAI,oBAA8B;IAElC,aAAa,0FAAyC;IAEhD,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAQ7C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGrC"}
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGzE,qBAAa,mBAAoB,YAAW,YAAY;IACtD,IAAI,SAAc;IAClB,IAAI,WAAqB;IAEzB,aAAa,0FAAyC;IAEhD,OAAO,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAQ7C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGrC"}
@@ -1,10 +1,9 @@
1
1
  import { __awaiter, __generator } from "tslib";
2
- import { PluginType } from '@amplitude/analytics-types';
3
2
  import { getAnalyticsConnector } from '../analytics-connector';
4
3
  var IdentityEventSender = /** @class */ (function () {
5
4
  function IdentityEventSender() {
6
5
  this.name = 'identity';
7
- this.type = PluginType.BEFORE;
6
+ this.type = 'before';
8
7
  this.identityStore = getAnalyticsConnector().identityStore;
9
8
  }
10
9
  IdentityEventSender.prototype.execute = function (context) {
@@ -1 +1 @@
1
- {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":";AAAA,OAAO,EAA+B,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;IAAA;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,SAAI,GAAG,UAAU,CAAC,MAAe,CAAC;QAElC,kBAAa,GAAG,qBAAqB,EAAE,CAAC,aAAa,CAAC;IAaxD,CAAC;IAXO,qCAAO,GAAb,UAAc,OAAc;;;;gBACpB,cAAc,GAAG,OAAO,CAAC,eAAsC,CAAC;gBACtE,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjF;gBACD,sBAAO,OAAO,EAAC;;;KAChB;IAED,mCAAK,GAAL,UAAM,CAAS;QACb,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IACH,0BAAC;AAAD,CAAC,AAjBD,IAiBC","sourcesContent":["import { BeforePlugin, Config, Event, PluginType } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = PluginType.BEFORE as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"]}
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/plugins/identity.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;IAAA;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,SAAI,GAAG,QAAiB,CAAC;QAEzB,kBAAa,GAAG,qBAAqB,EAAE,CAAC,aAAa,CAAC;IAaxD,CAAC;IAXO,qCAAO,GAAb,UAAc,OAAc;;;;gBACpB,cAAc,GAAG,OAAO,CAAC,eAAsC,CAAC;gBACtE,IAAI,cAAc,EAAE;oBAClB,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjF;gBACD,sBAAO,OAAO,EAAC;;;KAChB;IAED,mCAAK,GAAL,UAAM,CAAS;QACb,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IACH,0BAAC;AAAD,CAAC,AAjBD,IAiBC","sourcesContent":["import { BeforePlugin, Config, Event } from '@amplitude/analytics-types';\nimport { getAnalyticsConnector } from '../analytics-connector';\n\nexport class IdentityEventSender implements BeforePlugin {\n name = 'identity';\n type = 'before' as const;\n\n identityStore = getAnalyticsConnector().identityStore;\n\n async execute(context: Event): Promise<Event> {\n const userProperties = context.user_properties as Record<string, any>;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return context;\n }\n\n setup(_: Config): Promise<undefined> {\n return Promise.resolve(undefined);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/analytics-client-common",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "",
5
5
  "author": "Amplitude Inc",
6
6
  "homepage": "https://github.com/amplitude/Amplitude-TypeScript",
@@ -35,12 +35,12 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@amplitude/analytics-connector": "^1.4.8",
38
- "@amplitude/analytics-core": "^2.0.0-beta.1",
39
- "@amplitude/analytics-types": "^2.0.0-beta.1",
38
+ "@amplitude/analytics-core": "^2.0.0-beta.3",
39
+ "@amplitude/analytics-types": "^2.0.0-beta.3",
40
40
  "tslib": "^2.4.1"
41
41
  },
42
42
  "files": [
43
43
  "lib"
44
44
  ],
45
- "gitHead": "c33e72bd43d1f6a5ca7ed1bd3fe2e7330e512bee"
45
+ "gitHead": "7658bf9e740c0a72e1b18d95173c77049e0f1e00"
46
46
  }