New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rudder-sdk-js

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rudder-sdk-js - npm Package Compare versions

Comparing version 1.0.19 to 1.0.20

397

index.d.ts
declare module "rudder-sdk-js" {
function load(writeKey: string, dataPlaneUrl: string, options?: any): any;
/**
* Represents the integration options object
* Example usages:
* integrationOptions { All: false, "Google Analytics": true, "Braze": true}
* integrationOptions { All: true, "Chartbeat": false, "Customer.io": false}
*/
interface integrationOptions {
// Defaults to true
All?: boolean;
// Destination name: Enable/Disable
[index: string]: boolean | undefined;
}
function ready(callback: any): any;
/**
* Represents the queue options parameter in loadOptions type
*/
interface queueOptions {
// Upper cap on maximum delay for an event
maxRetryDelay?: number;
// Minimum delay before sending an event
minRetryDelay?: number;
// Exponential base
backoffFactor?: number;
// Maximum number of attempts
maxAttempts?: number;
// Maximum number of events in storage
maxItems?: number;
}
/**
* Represents the options parameter in the load API
*/
interface loadOptions {
integrations?: integrationOptions;
// defaults to https://api.rudderlabs.com
configUrl?: string;
queueOptions?: queueOptions;
// Defaults to true
loadIntegration?: boolean;
logLevel?: string;
getSourceConfig?: () =>
| string
| apiObject
| Promise<apiObject>
| Promise<string>;
setCookieDomain?: string;
sendAdblockPage?: boolean;
sendAdblockPageOptions?: apiOptions;
clientSuppliedCallbacks?: { string: () => void };
}
/**
* Represents the options parameter in the APIs
*/
interface apiOptions {
integrations?: integrationOptions;
anonymousId?: string;
// ISO 8601 date string
originalTimestamp?: string;
// Merged with event's contextual information
[index: string]:
| string
| number
| apiObject
| integrationOptions
| undefined;
}
/**
* Represents a generic object in the APIs
* Use for parameters like properties, traits etc.
*/
interface apiObject {
[index: string]: string | number | apiObject;
}
/**
* Represents the callback in the APIs
*/
type apiCallback = () => void;
/**
* Call control pane to get client configs
* @param writeKey
* @param dataPlaneUrl
* @param options
*/
function load(
writeKey: string,
dataPlaneUrl: string,
options?: loadOptions
): void;
/**
* To register a callback for SDK ready state
* @param callback
*/
function ready(callback: apiCallback): void;
/**
* To record a page view event
* @param category
* @param name
* @param properties
* @param options
* @param callback
*/
function page(
category?: string,
name?: string,
properties?: any,
options?: any,
callback?: any
): any;
properties?: apiObject,
options?: apiOptions,
callback?: apiCallback
): void;
/**
* To record a page view event
* @param category
* @param name
* @param properties
* @param callback
*/
function page(
category: string,
name: string,
properties: apiObject,
callback: apiCallback
): void;
/**
* To record a page view event
* @param category
* @param name
* @param callback
*/
function page(category: string, name: string, callback: apiCallback): void;
/**
* To record a page view event
* @param name
* @param properties
* @param options
* @param callback
*/
function page(
name: string,
properties?: apiObject,
options?: apiOptions,
callback?: apiCallback
): void;
/**
* To record a page view event
* @param name
* @param properties
* @param callback
*/
function page(
name: string,
properties: apiObject,
callback: apiCallback
): void;
/**
*
* @param name
* @param callback
*/
function page(name: string, callback: apiCallback): void;
/**
*
* @param properties
* @param options
* @param callback
*/
function page(
properties: apiObject,
options: apiOptions,
callback?: apiCallback
): void;
/**
* To record a page view event
* @param properties
* @param callback
*/
function page(properties: apiObject, callback?: apiCallback): void;
/**
* To record a user track event
* @param event
* @param properties
* @param options
* @param callback
*/
function track(
event: string,
properties?: any,
options?: any,
callback?: any
): any;
properties?: apiObject,
options?: apiOptions,
callback?: apiCallback
): void;
/**
* To record a user track event
* @param event
* @param properties
* @param callback
*/
function track(
event: string,
properties: apiObject,
callback: apiCallback
): void;
/**
* To record a user track event
* @param event
* @param callback
*/
function track(event: string, callback: apiCallback): void;
/**
* To record a user identification event
* @param userId
* @param traits
* @param options
* @param callback
*/
function identify(
id?: string,
traits?: any,
options?: any,
callback?: any
): any;
userId?: string,
traits?: apiObject,
options?: apiOptions,
callback?: apiCallback
): void;
function alias(to: string, from?: string, options?: any, callback?: any): any;
/**
* To record a user identification event
* @param userId
* @param traits
* @param callback
*/
function identify(
userId: string,
traits: apiObject,
callback: apiCallback
): void;
/**
* To record a user identification event
* @param userId
* @param callback
*/
function identify(userId: string, callback: apiCallback): void;
/**
*
* @param traits
* @param options
* @param callback
*/
function identify(
traits: apiObject,
options: apiOptions,
callback?: apiCallback
): void;
/**
*
* @param traits
* @param callback
*/
function identify(traits: apiObject, callback?: apiCallback): void;
/**
* To record a user alias event
* @param to
* @param from
* @param options
* @param callback
*/
function alias(
to: string,
from?: string,
options?: apiOptions,
callback?: apiCallback
): void;
/**
* To record a user alias event
* @param to
* @param from
* @param callback
*/
function alias(to: string, from: string, callback: apiCallback): void;
/**
* To record a user alias event
* @param to
* @param callback
*/
function alias(to: string, callback: apiCallback): void;
/**
* To record a user alias event
* @param to
* @param options
* @param callback
*/
function alias(to: string, options: apiOptions, callback?: apiCallback): void;
/**
* To record a user group event
* @param groupId
* @param traits
* @param options
* @param callback
*/
function group(
group: string,
traits?: any,
options?: any,
callback?: any
): any;
groupId: string,
traits?: apiObject,
options?: apiOptions,
callback?: apiCallback
): void;
function getAnonymousId(): any;
/**
* To record a user group event
* @param groupId
* @param traits
* @param callback
*/
function group(
groupId: string,
traits: apiObject,
callback: apiCallback
): void;
function setAnonymousId(id?: string): any;
/**
* To record a user group event
* @param groupId
* @param callback
*/
function group(groupId: string, callback: apiCallback): void;
function reset(): any;
/**
* To record a user group event
* @param traits
* @param options
* @param callback
*/
function group(
traits: apiObject,
options: apiOptions,
callback?: apiCallback
): void;
/**
* To record a user group event
* @param traits
* @param callback
*/
function group(traits: apiObject, callback?: apiCallback): void;
/**
* To get anonymousId set in the SDK
*/
function getAnonymousId(): string;
/**
* To set anonymousId
* @param anonymousId
* @param rudderAmpLinkerParm AMP Linker ID string
*/
function setAnonymousId(
anonymousId?: string,
rudderAmpLinkerParm?: string
): void;
/**
* Clear user information
* @param flag If true, clears anonymousId as well
*/
function reset(flag?: boolean): void;
export {
integrationOptions,
loadOptions,
apiOptions,
queueOptions,
apiObject,
apiCallback,
load,

@@ -45,0 +394,0 @@ ready,

2

package.json
{
"name": "rudder-sdk-js",
"version": "1.0.19",
"version": "1.0.20",
"description": "RudderStack Javascript SDK",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

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