@amplitude/types
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -0,39 +1,5 @@ | ||
import { BaseEvent } from './baseEvent'; | ||
import { IdentifyEvent } from './identify'; | ||
export declare type Event = BaseEvent | IdentifyEvent; | ||
/** | ||
* Amplitude event definition. | ||
*/ | ||
export interface Event { | ||
event_type: string; | ||
user_id?: string; | ||
device_id?: string; | ||
time?: number; | ||
country?: string; | ||
region?: string; | ||
city?: string; | ||
location_lat?: number; | ||
location_lng?: number; | ||
dma?: string; | ||
language?: string; | ||
platform?: string; | ||
version_name?: string; | ||
library?: string; | ||
ip?: string; | ||
uuid?: string; | ||
event_properties?: { | ||
[key: string]: any; | ||
}; | ||
user_properties?: { | ||
[key: string]: any; | ||
}; | ||
price?: number; | ||
quantity?: number; | ||
revenue?: number; | ||
productId?: string; | ||
revenueType?: string; | ||
event_id?: number; | ||
session_id?: number; | ||
groups?: { | ||
[key: string]: any; | ||
}; | ||
} | ||
/** | ||
* Amplitude request payload options. | ||
@@ -40,0 +6,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
import { BaseEvent, SpecialEventType } from './base-event'; | ||
import { BaseEvent, SpecialEventType } from './baseEvent'; | ||
export declare enum IdentifyOperation { | ||
@@ -15,6 +15,6 @@ SET = "$set", | ||
export declare type ValidPropertyType = number | string | Array<string | number>; | ||
declare type BaseOperationConfig = { | ||
interface BaseOperationConfig { | ||
[key: string]: ValidPropertyType; | ||
}; | ||
export declare type IdentifyUserProperties = { | ||
} | ||
export interface IdentifyUserProperties { | ||
[IdentifyOperation.ADD]?: { | ||
@@ -32,5 +32,5 @@ [key: string]: number; | ||
[IdentifyOperation.REMOVE]?: BaseOperationConfig; | ||
}; | ||
} | ||
export interface IdentifyEvent extends BaseEvent { | ||
event_type: SpecialEventType.IDENTIFY; | ||
event_type: SpecialEventType.IDENTIFY | SpecialEventType.GROUP_IDENTIFY; | ||
user_properties: IdentifyUserProperties | { | ||
@@ -37,0 +37,0 @@ [key in Exclude<string, IdentifyOperation>]: any; |
@@ -1,5 +0,7 @@ | ||
export { LogLevel } from './logger'; | ||
export { BaseEvent, SpecialEventType } from './baseEvent'; | ||
export { Client } from './client'; | ||
export { Event, PayloadOptions } from './event'; | ||
export { IdentifyEvent, IdentifyOperation, IdentifyUserProperties, ValidPropertyType } from './identify'; | ||
export { Identity, IdentityListener, DEFAULT_IDENTITY_INSTANCE } from './identity'; | ||
export { Event, Payload, PayloadOptions } from './event'; | ||
export { LogLevel } from './logger'; | ||
export { Options } from './options'; | ||
@@ -9,3 +11,3 @@ export { Response, ResponseBody, SKIPPED_RESPONSE } from './response'; | ||
export { Status } from './status'; | ||
export { Transport, TransportOptions } from './transport'; | ||
export { Transport, TransportOptions, Payload } from './transport'; | ||
//# sourceMappingURL=index.d.ts.map |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var baseEvent_1 = require("./baseEvent"); | ||
Object.defineProperty(exports, "SpecialEventType", { enumerable: true, get: function () { return baseEvent_1.SpecialEventType; } }); | ||
var identify_1 = require("./identify"); | ||
Object.defineProperty(exports, "IdentifyOperation", { enumerable: true, get: function () { return identify_1.IdentifyOperation; } }); | ||
var identity_1 = require("./identity"); | ||
Object.defineProperty(exports, "DEFAULT_IDENTITY_INSTANCE", { enumerable: true, get: function () { return identity_1.DEFAULT_IDENTITY_INSTANCE; } }); | ||
var logger_1 = require("./logger"); | ||
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return logger_1.LogLevel; } }); | ||
var identity_1 = require("./identity"); | ||
Object.defineProperty(exports, "DEFAULT_IDENTITY_INSTANCE", { enumerable: true, get: function () { return identity_1.DEFAULT_IDENTITY_INSTANCE; } }); | ||
var response_1 = require("./response"); | ||
@@ -7,0 +11,0 @@ Object.defineProperty(exports, "SKIPPED_RESPONSE", { enumerable: true, get: function () { return response_1.SKIPPED_RESPONSE; } }); |
@@ -1,3 +0,10 @@ | ||
import { Payload } from './event'; | ||
import { Event } from './event'; | ||
import { Response } from './response'; | ||
/** | ||
* Amplitude request payload definition. | ||
*/ | ||
export interface Payload { | ||
api_key: string; | ||
events: readonly Event[]; | ||
} | ||
/** Transport used sending data to Amplitude */ | ||
@@ -4,0 +11,0 @@ export interface Transport { |
@@ -0,39 +1,5 @@ | ||
import { BaseEvent } from './baseEvent'; | ||
import { IdentifyEvent } from './identify'; | ||
export declare type Event = BaseEvent | IdentifyEvent; | ||
/** | ||
* Amplitude event definition. | ||
*/ | ||
export interface Event { | ||
event_type: string; | ||
user_id?: string; | ||
device_id?: string; | ||
time?: number; | ||
country?: string; | ||
region?: string; | ||
city?: string; | ||
location_lat?: number; | ||
location_lng?: number; | ||
dma?: string; | ||
language?: string; | ||
platform?: string; | ||
version_name?: string; | ||
library?: string; | ||
ip?: string; | ||
uuid?: string; | ||
event_properties?: { | ||
[key: string]: any; | ||
}; | ||
user_properties?: { | ||
[key: string]: any; | ||
}; | ||
price?: number; | ||
quantity?: number; | ||
revenue?: number; | ||
productId?: string; | ||
revenueType?: string; | ||
event_id?: number; | ||
session_id?: number; | ||
groups?: { | ||
[key: string]: any; | ||
}; | ||
} | ||
/** | ||
* Amplitude request payload options. | ||
@@ -40,0 +6,0 @@ */ |
@@ -1,2 +0,2 @@ | ||
import { BaseEvent, SpecialEventType } from './base-event'; | ||
import { BaseEvent, SpecialEventType } from './baseEvent'; | ||
export declare enum IdentifyOperation { | ||
@@ -15,6 +15,6 @@ SET = "$set", | ||
export declare type ValidPropertyType = number | string | Array<string | number>; | ||
declare type BaseOperationConfig = { | ||
interface BaseOperationConfig { | ||
[key: string]: ValidPropertyType; | ||
}; | ||
export declare type IdentifyUserProperties = { | ||
} | ||
export interface IdentifyUserProperties { | ||
[IdentifyOperation.ADD]?: { | ||
@@ -32,5 +32,5 @@ [key: string]: number; | ||
[IdentifyOperation.REMOVE]?: BaseOperationConfig; | ||
}; | ||
} | ||
export interface IdentifyEvent extends BaseEvent { | ||
event_type: SpecialEventType.IDENTIFY; | ||
event_type: SpecialEventType.IDENTIFY | SpecialEventType.GROUP_IDENTIFY; | ||
user_properties: IdentifyUserProperties | { | ||
@@ -37,0 +37,0 @@ [key in Exclude<string, IdentifyOperation>]: any; |
@@ -1,5 +0,7 @@ | ||
export { LogLevel } from './logger'; | ||
export { BaseEvent, SpecialEventType } from './baseEvent'; | ||
export { Client } from './client'; | ||
export { Event, PayloadOptions } from './event'; | ||
export { IdentifyEvent, IdentifyOperation, IdentifyUserProperties, ValidPropertyType } from './identify'; | ||
export { Identity, IdentityListener, DEFAULT_IDENTITY_INSTANCE } from './identity'; | ||
export { Event, Payload, PayloadOptions } from './event'; | ||
export { LogLevel } from './logger'; | ||
export { Options } from './options'; | ||
@@ -9,3 +11,3 @@ export { Response, ResponseBody, SKIPPED_RESPONSE } from './response'; | ||
export { Status } from './status'; | ||
export { Transport, TransportOptions } from './transport'; | ||
export { Transport, TransportOptions, Payload } from './transport'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -0,5 +1,7 @@ | ||
export { SpecialEventType } from './baseEvent'; | ||
export { IdentifyOperation } from './identify'; | ||
export { DEFAULT_IDENTITY_INSTANCE } from './identity'; | ||
export { LogLevel } from './logger'; | ||
export { DEFAULT_IDENTITY_INSTANCE } from './identity'; | ||
export { SKIPPED_RESPONSE } from './response'; | ||
export { Status } from './status'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,10 @@ | ||
import { Payload } from './event'; | ||
import { Event } from './event'; | ||
import { Response } from './response'; | ||
/** | ||
* Amplitude request payload definition. | ||
*/ | ||
export interface Payload { | ||
api_key: string; | ||
events: readonly Event[]; | ||
} | ||
/** Transport used sending data to Amplitude */ | ||
@@ -4,0 +11,0 @@ export interface Transport { |
{ | ||
"name": "@amplitude/types", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Types for all Amplitude JavaScript SDKs", | ||
"repository": "git://github.com/amplitude/Amplitude-Node.git", | ||
"homepage": "https://github.com/amplitude/Amplitude-Node/tree/master/packages/types", | ||
"homepage": "https://github.com/amplitude/Amplitude-Node/tree/main/packages/types", | ||
"author": "Amplitude Inc", | ||
@@ -45,5 +45,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@amplitude/eslint-config-typescript": "^1.1.0" | ||
"@amplitude/eslint-config-typescript": "^1.3.0" | ||
}, | ||
"gitHead": "53443284df7e4fdb407bf89595d73d48f587e6fe" | ||
"gitHead": "dc3d9a781a84a9f649d21af14d3d2df9f29db889" | ||
} |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123159
143
1345
1