Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amplitude/analytics-core

Package Overview
Dependencies
Maintainers
19
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/analytics-core - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

lib/cjs/core-client.d.ts

@@ -9,4 +9,4 @@ import { CoreClient, Config, Event, BaseEvent, EventOptions, Identify, Plugin, Revenue } from '@amplitude/analytics-types';

logEvent: (eventInput: BaseEvent | string, eventProperties?: Record<string, any> | undefined, eventOptions?: EventOptions | undefined) => Promise<import("@amplitude/analytics-types").Result>;
identify(identify: Identify, eventOptions?: EventOptions, userId?: string, deviceId?: string): Promise<import("@amplitude/analytics-types").Result>;
groupIdentify(groupType: string, groupName: string | string[], identify: Identify, eventOptions?: EventOptions, userId?: string, deviceId?: string): Promise<import("@amplitude/analytics-types").Result>;
identify(identify: Identify, eventOptions?: EventOptions): Promise<import("@amplitude/analytics-types").Result>;
groupIdentify(groupType: string, groupName: string | string[], identify: Identify, eventOptions?: EventOptions): Promise<import("@amplitude/analytics-types").Result>;
setGroup(groupType: string, groupName: string | string[]): Promise<import("@amplitude/analytics-types").Result>;

@@ -13,0 +13,0 @@ revenue(revenue: Revenue, eventOptions?: EventOptions): Promise<import("@amplitude/analytics-types").Result>;

@@ -22,8 +22,8 @@ Object.defineProperty(exports, "__esModule", { value: true });

};
AmplitudeCore.prototype.identify = function (identify, eventOptions, userId, deviceId) {
var event = (0, event_builder_1.createIdentifyEvent)(userId, deviceId, identify, eventOptions);
AmplitudeCore.prototype.identify = function (identify, eventOptions) {
var event = (0, event_builder_1.createIdentifyEvent)(identify, eventOptions);
return this.dispatch(event);
};
AmplitudeCore.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions, userId, deviceId) {
var event = (0, event_builder_1.createGroupIdentifyEvent)(userId, deviceId, groupType, groupName, identify, eventOptions);
AmplitudeCore.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions) {
var event = (0, event_builder_1.createGroupIdentifyEvent)(groupType, groupName, identify, eventOptions);
return this.dispatch(event);

@@ -30,0 +30,0 @@ };

import { BaseEvent, TrackEvent, IdentifyEvent, GroupIdentifyEvent, Identify as IIdentify, Revenue, RevenueEvent, EventOptions } from '@amplitude/analytics-types';
export declare const createTrackEvent: (eventInput: BaseEvent | string, eventProperties?: Record<string, any> | undefined, eventOptions?: EventOptions | undefined) => TrackEvent;
export declare const createIdentifyEvent: (userId: string | undefined, deviceId: string | undefined, identify: IIdentify, eventOptions?: EventOptions | undefined) => IdentifyEvent;
export declare const createGroupIdentifyEvent: (userId: string | undefined, deviceId: string | undefined, groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions | undefined) => GroupIdentifyEvent;
export declare const createIdentifyEvent: (identify: IIdentify, eventOptions?: EventOptions | undefined) => IdentifyEvent;
export declare const createGroupIdentifyEvent: (groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions | undefined) => GroupIdentifyEvent;
export declare const createGroupEvent: (groupType: string, groupName: string | string[]) => IdentifyEvent;
export declare const createRevenueEvent: (revenue: Revenue, eventOptions?: EventOptions | undefined) => RevenueEvent;
//# sourceMappingURL=event-builder.d.ts.map

@@ -11,18 +11,12 @@ Object.defineProperty(exports, "__esModule", { value: true });

exports.createTrackEvent = createTrackEvent;
var createIdentifyEvent = function (userId, deviceId, identify, eventOptions) {
var identifyEvent = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, eventOptions), { event_type: analytics_types_1.SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties(), user_id: userId });
if (deviceId !== undefined && deviceId.length > 0) {
identifyEvent.device_id = deviceId;
}
var createIdentifyEvent = function (identify, eventOptions) {
var identifyEvent = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, eventOptions), { event_type: analytics_types_1.SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties() });
return identifyEvent;
};
exports.createIdentifyEvent = createIdentifyEvent;
var createGroupIdentifyEvent = function (userId, deviceId, groupType, groupName, identify, eventOptions) {
var createGroupIdentifyEvent = function (groupType, groupName, identify, eventOptions) {
var _a;
var groupIdentify = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, eventOptions), { event_type: analytics_types_1.SpecialEventType.GROUP_IDENTIFY, group_properties: identify.getUserProperties(), groups: (_a = {},
_a[groupType] = groupName,
_a), user_id: userId });
if (deviceId !== undefined && deviceId.length > 0) {
groupIdentify.device_id = deviceId;
}
_a) });
return groupIdentify;

@@ -29,0 +23,0 @@ };

@@ -9,4 +9,4 @@ import { CoreClient, Config, Event, BaseEvent, EventOptions, Identify, Plugin, Revenue } from '@amplitude/analytics-types';

logEvent: (eventInput: BaseEvent | string, eventProperties?: Record<string, any> | undefined, eventOptions?: EventOptions | undefined) => Promise<import("@amplitude/analytics-types").Result>;
identify(identify: Identify, eventOptions?: EventOptions, userId?: string, deviceId?: string): Promise<import("@amplitude/analytics-types").Result>;
groupIdentify(groupType: string, groupName: string | string[], identify: Identify, eventOptions?: EventOptions, userId?: string, deviceId?: string): Promise<import("@amplitude/analytics-types").Result>;
identify(identify: Identify, eventOptions?: EventOptions): Promise<import("@amplitude/analytics-types").Result>;
groupIdentify(groupType: string, groupName: string | string[], identify: Identify, eventOptions?: EventOptions): Promise<import("@amplitude/analytics-types").Result>;
setGroup(groupType: string, groupName: string | string[]): Promise<import("@amplitude/analytics-types").Result>;

@@ -13,0 +13,0 @@ revenue(revenue: Revenue, eventOptions?: EventOptions): Promise<import("@amplitude/analytics-types").Result>;

@@ -20,8 +20,8 @@ import { __awaiter, __generator } from "tslib";

};
AmplitudeCore.prototype.identify = function (identify, eventOptions, userId, deviceId) {
var event = createIdentifyEvent(userId, deviceId, identify, eventOptions);
AmplitudeCore.prototype.identify = function (identify, eventOptions) {
var event = createIdentifyEvent(identify, eventOptions);
return this.dispatch(event);
};
AmplitudeCore.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions, userId, deviceId) {
var event = createGroupIdentifyEvent(userId, deviceId, groupType, groupName, identify, eventOptions);
AmplitudeCore.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions) {
var event = createGroupIdentifyEvent(groupType, groupName, identify, eventOptions);
return this.dispatch(event);

@@ -28,0 +28,0 @@ };

import { BaseEvent, TrackEvent, IdentifyEvent, GroupIdentifyEvent, Identify as IIdentify, Revenue, RevenueEvent, EventOptions } from '@amplitude/analytics-types';
export declare const createTrackEvent: (eventInput: BaseEvent | string, eventProperties?: Record<string, any> | undefined, eventOptions?: EventOptions | undefined) => TrackEvent;
export declare const createIdentifyEvent: (userId: string | undefined, deviceId: string | undefined, identify: IIdentify, eventOptions?: EventOptions | undefined) => IdentifyEvent;
export declare const createGroupIdentifyEvent: (userId: string | undefined, deviceId: string | undefined, groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions | undefined) => GroupIdentifyEvent;
export declare const createIdentifyEvent: (identify: IIdentify, eventOptions?: EventOptions | undefined) => IdentifyEvent;
export declare const createGroupIdentifyEvent: (groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions | undefined) => GroupIdentifyEvent;
export declare const createGroupEvent: (groupType: string, groupName: string | string[]) => IdentifyEvent;
export declare const createRevenueEvent: (revenue: Revenue, eventOptions?: EventOptions | undefined) => RevenueEvent;
//# sourceMappingURL=event-builder.d.ts.map

@@ -8,17 +8,11 @@ import { __assign } from "tslib";

};
export var createIdentifyEvent = function (userId, deviceId, identify, eventOptions) {
var identifyEvent = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties(), user_id: userId });
if (deviceId !== undefined && deviceId.length > 0) {
identifyEvent.device_id = deviceId;
}
export var createIdentifyEvent = function (identify, eventOptions) {
var identifyEvent = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties() });
return identifyEvent;
};
export var createGroupIdentifyEvent = function (userId, deviceId, groupType, groupName, identify, eventOptions) {
export var createGroupIdentifyEvent = function (groupType, groupName, identify, eventOptions) {
var _a;
var groupIdentify = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.GROUP_IDENTIFY, group_properties: identify.getUserProperties(), groups: (_a = {},
_a[groupType] = groupName,
_a), user_id: userId });
if (deviceId !== undefined && deviceId.length > 0) {
groupIdentify.device_id = deviceId;
}
_a) });
return groupIdentify;

@@ -25,0 +19,0 @@ };

{
"name": "@amplitude/analytics-core",
"version": "0.4.0",
"version": "0.4.1",
"description": "",

@@ -41,3 +41,3 @@ "author": "Amplitude Inc",

],
"gitHead": "b76a2494587c6a27e2007047c1602269ed2b3403"
"gitHead": "77f86840a33e9812eff986c3dec7f6372edea6eb"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc