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

@amplitude/analytics-types

Package Overview
Dependencies
Maintainers
20
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/analytics-types - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0-beta.1

4

lib/cjs/campaign.d.ts
import { BaseEvent } from './base-event';
import { AttributionOptions } from './config';
import { ReactNativeAttributionOptions } from './config';
import { Storage } from './storage';

@@ -34,3 +34,3 @@ export interface UTMParameters {

}
export interface CampaignTrackerOptions extends AttributionOptions {
export interface CampaignTrackerOptions extends ReactNativeAttributionOptions {
storage: Storage<Campaign>;

@@ -37,0 +37,0 @@ track: CampaignTrackFunction;

import { UserSession } from '../user-session';
import { Storage } from '../storage';
import { TransportType } from '../transport';
import { IdentityStorageType, Storage } from '../storage';
import { Transport } from '../transport';
import { Config } from './core';
import { PageTrackingOptions } from '../page-view-tracking';
export interface BrowserConfig extends Config {
export interface BrowserConfig extends ExternalBrowserConfig, InternalBrowserConfig {
}
export interface ExternalBrowserConfig extends Config {
appVersion?: string;
attribution?: AttributionOptions;
defaultTracking?: boolean | DefaultTrackingOptions;
deviceId?: string;
cookieExpiration: number;
cookieSameSite: string;
cookieSecure: boolean;
cookieStorage: Storage<UserSession>;
cookieUpgrade: boolean;
disableCookies: boolean;
domain: string;
lastEventTime?: number;
lastEventId?: number;
cookieOptions?: CookieOptions;
identityStorage?: IdentityStorageType;
partnerId?: string;

@@ -24,5 +18,13 @@ sessionId?: number;

trackingOptions: TrackingOptions;
transport?: 'fetch' | 'xhr' | 'beacon';
userId?: string;
}
interface InternalBrowserConfig {
cookieStorage: Storage<UserSession>;
lastEventTime?: number;
lastEventId?: number;
transportProvider: Transport;
}
export interface DefaultTrackingOptions {
attribution?: boolean | AttributionOptions;
fileDownloads?: boolean;

@@ -34,22 +36,22 @@ formInteractions?: boolean;

export interface TrackingOptions {
deviceManufacturer?: boolean;
deviceModel?: boolean;
ipAddress?: boolean;
language?: boolean;
osName?: boolean;
osVersion?: boolean;
platform?: boolean;
[key: string]: boolean | undefined;
}
export interface AttributionOptions {
disabled?: boolean;
excludeReferrers?: string[];
excludeReferrers?: (string | RegExp)[];
initialEmptyValue?: string;
resetSessionOnNewCampaign?: boolean;
trackNewCampaigns?: boolean;
trackPageViews?: boolean;
}
export interface BrowserOptions extends Omit<Partial<BrowserConfig>, 'apiKey'> {
transport?: TransportType | keyof typeof TransportType;
export interface CookieOptions {
domain?: string;
expiration?: number;
sameSite?: 'Strict' | 'Lax' | 'None';
secure?: boolean;
upgrade?: boolean;
}
type HiddenOptions = 'apiKey';
export interface BrowserOptions extends Omit<Partial<ExternalBrowserConfig>, HiddenOptions> {
}
export {};
//# sourceMappingURL=browser.d.ts.map
export { Config, Options } from './core';
export { BrowserConfig, DefaultTrackingOptions, TrackingOptions, AttributionOptions, BrowserOptions } from './browser';
export { NodeConfig, NodeOptions } from './node';
export { ReactNativeConfig, ReactNativeTrackingOptions, ReactNativeOptions } from './react-native';
export { ReactNativeAttributionOptions, ReactNativeConfig, ReactNativeTrackingOptions, ReactNativeOptions, } from './react-native';
//# sourceMappingURL=index.d.ts.map

@@ -0,11 +1,43 @@

import { UserSession } from '../user-session';
import { Storage } from '../storage';
import { TransportType } from '../transport';
import { BrowserConfig, TrackingOptions } from './browser';
export interface ReactNativeConfig extends BrowserConfig {
import { Config } from './core';
export interface ReactNativeConfig extends Config {
attribution?: ReactNativeAttributionOptions;
appVersion?: string;
deviceId?: string;
cookieExpiration: number;
cookieSameSite: string;
cookieSecure: boolean;
cookieStorage: Storage<UserSession>;
cookieUpgrade: boolean;
disableCookies: boolean;
domain: string;
lastEventTime?: number;
lastEventId?: number;
partnerId?: string;
sessionId?: number;
sessionTimeout: number;
trackingOptions: ReactNativeTrackingOptions;
userId?: string;
trackingSessionEvents?: boolean;
}
export interface ReactNativeTrackingOptions extends TrackingOptions {
export interface ReactNativeTrackingOptions {
adid?: boolean;
carrier?: boolean;
deviceManufacturer?: boolean;
deviceModel?: boolean;
ipAddress?: boolean;
language?: boolean;
osName?: boolean;
osVersion?: boolean;
platform?: boolean;
}
export interface ReactNativeAttributionOptions {
disabled?: boolean;
excludeReferrers?: string[];
initialEmptyValue?: string;
trackNewCampaigns?: boolean;
trackPageViews?: boolean;
}
type HiddenOptions = 'apiKey' | 'lastEventId';

@@ -12,0 +44,0 @@ export interface ReactNativeOptions extends Omit<Partial<ReactNativeConfig>, HiddenOptions> {

@@ -19,5 +19,5 @@ export { AmplitudeReturn } from './amplitude-promise';

export { QueueProxy, InstanceProxy } from './proxy';
export { ServerZone } from './server-zone';
export { ServerZone, ServerZoneType } from './server-zone';
export { Status } from './status';
export { CookieStorageOptions, Storage } from './storage';
export { CookieStorageOptions, IdentityStorageType, Storage } from './storage';
export { Transport, TransportType } from './transport';

@@ -24,0 +24,0 @@ export { UserSession } from './user-session';

@@ -0,1 +1,4 @@

/**
* @deprecated
*/
export declare enum ServerZone {

@@ -5,2 +8,3 @@ US = "US",

}
export type ServerZoneType = 'US' | 'EU';
//# sourceMappingURL=server-zone.d.ts.map
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerZone = void 0;
/**
* @deprecated
*/
var ServerZone;

@@ -4,0 +7,0 @@ (function (ServerZone) {

@@ -15,2 +15,3 @@ export interface Storage<T> {

}
export type IdentityStorageType = 'cookie' | 'localStorage' | 'none';
//# sourceMappingURL=storage.d.ts.map

@@ -6,2 +6,5 @@ import { Payload } from './payload';

}
/**
* @deprecated
*/
export declare enum TransportType {

@@ -8,0 +11,0 @@ XHR = "xhr",

Object.defineProperty(exports, "__esModule", { value: true });
exports.TransportType = void 0;
/**
* @deprecated
*/
var TransportType;

@@ -4,0 +7,0 @@ (function (TransportType) {

import { BaseEvent } from './base-event';
import { AttributionOptions } from './config';
import { ReactNativeAttributionOptions } from './config';
import { Storage } from './storage';

@@ -34,3 +34,3 @@ export interface UTMParameters {

}
export interface CampaignTrackerOptions extends AttributionOptions {
export interface CampaignTrackerOptions extends ReactNativeAttributionOptions {
storage: Storage<Campaign>;

@@ -37,0 +37,0 @@ track: CampaignTrackFunction;

import { UserSession } from '../user-session';
import { Storage } from '../storage';
import { TransportType } from '../transport';
import { IdentityStorageType, Storage } from '../storage';
import { Transport } from '../transport';
import { Config } from './core';
import { PageTrackingOptions } from '../page-view-tracking';
export interface BrowserConfig extends Config {
export interface BrowserConfig extends ExternalBrowserConfig, InternalBrowserConfig {
}
export interface ExternalBrowserConfig extends Config {
appVersion?: string;
attribution?: AttributionOptions;
defaultTracking?: boolean | DefaultTrackingOptions;
deviceId?: string;
cookieExpiration: number;
cookieSameSite: string;
cookieSecure: boolean;
cookieStorage: Storage<UserSession>;
cookieUpgrade: boolean;
disableCookies: boolean;
domain: string;
lastEventTime?: number;
lastEventId?: number;
cookieOptions?: CookieOptions;
identityStorage?: IdentityStorageType;
partnerId?: string;

@@ -24,5 +18,13 @@ sessionId?: number;

trackingOptions: TrackingOptions;
transport?: 'fetch' | 'xhr' | 'beacon';
userId?: string;
}
interface InternalBrowserConfig {
cookieStorage: Storage<UserSession>;
lastEventTime?: number;
lastEventId?: number;
transportProvider: Transport;
}
export interface DefaultTrackingOptions {
attribution?: boolean | AttributionOptions;
fileDownloads?: boolean;

@@ -34,22 +36,22 @@ formInteractions?: boolean;

export interface TrackingOptions {
deviceManufacturer?: boolean;
deviceModel?: boolean;
ipAddress?: boolean;
language?: boolean;
osName?: boolean;
osVersion?: boolean;
platform?: boolean;
[key: string]: boolean | undefined;
}
export interface AttributionOptions {
disabled?: boolean;
excludeReferrers?: string[];
excludeReferrers?: (string | RegExp)[];
initialEmptyValue?: string;
resetSessionOnNewCampaign?: boolean;
trackNewCampaigns?: boolean;
trackPageViews?: boolean;
}
export interface BrowserOptions extends Omit<Partial<BrowserConfig>, 'apiKey'> {
transport?: TransportType | keyof typeof TransportType;
export interface CookieOptions {
domain?: string;
expiration?: number;
sameSite?: 'Strict' | 'Lax' | 'None';
secure?: boolean;
upgrade?: boolean;
}
type HiddenOptions = 'apiKey';
export interface BrowserOptions extends Omit<Partial<ExternalBrowserConfig>, HiddenOptions> {
}
export {};
//# sourceMappingURL=browser.d.ts.map
export { Config, Options } from './core';
export { BrowserConfig, DefaultTrackingOptions, TrackingOptions, AttributionOptions, BrowserOptions } from './browser';
export { NodeConfig, NodeOptions } from './node';
export { ReactNativeConfig, ReactNativeTrackingOptions, ReactNativeOptions } from './react-native';
export { ReactNativeAttributionOptions, ReactNativeConfig, ReactNativeTrackingOptions, ReactNativeOptions, } from './react-native';
//# sourceMappingURL=index.d.ts.map

@@ -0,11 +1,43 @@

import { UserSession } from '../user-session';
import { Storage } from '../storage';
import { TransportType } from '../transport';
import { BrowserConfig, TrackingOptions } from './browser';
export interface ReactNativeConfig extends BrowserConfig {
import { Config } from './core';
export interface ReactNativeConfig extends Config {
attribution?: ReactNativeAttributionOptions;
appVersion?: string;
deviceId?: string;
cookieExpiration: number;
cookieSameSite: string;
cookieSecure: boolean;
cookieStorage: Storage<UserSession>;
cookieUpgrade: boolean;
disableCookies: boolean;
domain: string;
lastEventTime?: number;
lastEventId?: number;
partnerId?: string;
sessionId?: number;
sessionTimeout: number;
trackingOptions: ReactNativeTrackingOptions;
userId?: string;
trackingSessionEvents?: boolean;
}
export interface ReactNativeTrackingOptions extends TrackingOptions {
export interface ReactNativeTrackingOptions {
adid?: boolean;
carrier?: boolean;
deviceManufacturer?: boolean;
deviceModel?: boolean;
ipAddress?: boolean;
language?: boolean;
osName?: boolean;
osVersion?: boolean;
platform?: boolean;
}
export interface ReactNativeAttributionOptions {
disabled?: boolean;
excludeReferrers?: string[];
initialEmptyValue?: string;
trackNewCampaigns?: boolean;
trackPageViews?: boolean;
}
type HiddenOptions = 'apiKey' | 'lastEventId';

@@ -12,0 +44,0 @@ export interface ReactNativeOptions extends Omit<Partial<ReactNativeConfig>, HiddenOptions> {

@@ -19,5 +19,5 @@ export { AmplitudeReturn } from './amplitude-promise';

export { QueueProxy, InstanceProxy } from './proxy';
export { ServerZone } from './server-zone';
export { ServerZone, ServerZoneType } from './server-zone';
export { Status } from './status';
export { CookieStorageOptions, Storage } from './storage';
export { CookieStorageOptions, IdentityStorageType, Storage } from './storage';
export { Transport, TransportType } from './transport';

@@ -24,0 +24,0 @@ export { UserSession } from './user-session';

@@ -0,1 +1,4 @@

/**
* @deprecated
*/
export declare enum ServerZone {

@@ -5,2 +8,3 @@ US = "US",

}
export type ServerZoneType = 'US' | 'EU';
//# sourceMappingURL=server-zone.d.ts.map

@@ -0,1 +1,4 @@

/**
* @deprecated
*/
export var ServerZone;

@@ -2,0 +5,0 @@ (function (ServerZone) {

@@ -15,2 +15,3 @@ export interface Storage<T> {

}
export type IdentityStorageType = 'cookie' | 'localStorage' | 'none';
//# sourceMappingURL=storage.d.ts.map

@@ -6,2 +6,5 @@ import { Payload } from './payload';

}
/**
* @deprecated
*/
export declare enum TransportType {

@@ -8,0 +11,0 @@ XHR = "xhr",

@@ -0,1 +1,4 @@

/**
* @deprecated
*/
export var TransportType;

@@ -2,0 +5,0 @@ (function (TransportType) {

{
"name": "@amplitude/analytics-types",
"version": "1.0.0",
"version": "2.0.0-beta.1",
"description": "",

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

],
"gitHead": "08dca3e99057682bb0e1cf63ab771c9517cbdee4"
"gitHead": "c33e72bd43d1f6a5ca7ed1bd3fe2e7330e512bee"
}

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

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

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