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

gb-tracker-client

Package Overview
Dependencies
Maintainers
15
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gb-tracker-client - npm Package Compare versions

Comparing version 5.1.1 to 5.2.0-beta.1688982143

schemas/homePageView.d.ts

6

core.d.ts
import { SanitizeEventFn } from './';
import { AddToCartEvent, ViewCartEvent, RemoveFromCartEvent, OrderEvent, SearchEvent, AutoSearchEvent, AutoMoreRefinementsEvent, ViewProductEvent, ImpressionEvent } from './models';
import { AddToCartEvent, ViewCartEvent, RemoveFromCartEvent, OrderEvent, SearchEvent, AutoSearchEvent, AutoMoreRefinementsEvent, ViewProductEvent, ImpressionEvent, HomePageViewEvent } from './models';
interface EventCustomer {

@@ -29,3 +29,3 @@ id: string;

};
export declare type AnySendableEvent = AddToCartEvent | ViewCartEvent | RemoveFromCartEvent | OrderEvent | SearchEvent | AutoSearchEvent | AutoMoreRefinementsEvent | ViewProductEvent | ImpressionEvent;
export declare type AnySendableEvent = AddToCartEvent | ViewCartEvent | RemoveFromCartEvent | OrderEvent | SearchEvent | AutoSearchEvent | AutoMoreRefinementsEvent | ViewProductEvent | ImpressionEvent | HomePageViewEvent;
export declare type FullSendableEvent = AnySendableEvent & {

@@ -47,2 +47,3 @@ eventType: string;

impression?: object;
homePageView?: object;
}

@@ -122,2 +123,3 @@ export interface TrackerCoreFactory {

sendImpressionEvent: (event: ImpressionEvent) => void;
sendHomePageViewEvent: (event: HomePageViewEvent) => void;
setSite: (site: string | null) => void;

@@ -124,0 +126,0 @@ }

@@ -451,2 +451,9 @@ "use strict";

/**
* Validate and send HomePageView event
* @param event
*/
sendHomePageViewEvent: function (event) {
internals.prepareAndSendEvent(event, eventTypes_1.EVENT_TYPE_HOME_PAGE_VIEW);
},
/**
* Initialize siteFilter parameter.

@@ -453,0 +460,0 @@ * @param siteFilter

@@ -8,3 +8,4 @@ export declare const EVENT_TYPE_SEARCH = "search";

export declare const EVENT_TYPE_IMPRESSION = "impression";
export declare const EVENT_TYPE_HOME_PAGE_VIEW = "homePageView";
export declare const EVENT_TYPE_VIEW_CART = "viewCart";
export declare const EVENT_TYPE_MORE_REFINEMENTS = "moreRefinements";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EVENT_TYPE_MORE_REFINEMENTS = exports.EVENT_TYPE_VIEW_CART = exports.EVENT_TYPE_IMPRESSION = exports.EVENT_TYPE_ORDER = exports.EVENT_TYPE_REMOVE_FROM_CART = exports.EVENT_TYPE_ADD_TO_CART = exports.EVENT_TYPE_VIEW_PRODUCT = exports.EVENT_TYPE_AUTO_SEARCH = exports.EVENT_TYPE_SEARCH = void 0;
exports.EVENT_TYPE_MORE_REFINEMENTS = exports.EVENT_TYPE_VIEW_CART = exports.EVENT_TYPE_HOME_PAGE_VIEW = exports.EVENT_TYPE_IMPRESSION = exports.EVENT_TYPE_ORDER = exports.EVENT_TYPE_REMOVE_FROM_CART = exports.EVENT_TYPE_ADD_TO_CART = exports.EVENT_TYPE_VIEW_PRODUCT = exports.EVENT_TYPE_AUTO_SEARCH = exports.EVENT_TYPE_SEARCH = void 0;
exports.EVENT_TYPE_SEARCH = 'search';

@@ -11,4 +11,5 @@ exports.EVENT_TYPE_AUTO_SEARCH = 'autoSearch';

exports.EVENT_TYPE_IMPRESSION = 'impression';
exports.EVENT_TYPE_HOME_PAGE_VIEW = 'homePageView';
// Deprecated event types.
exports.EVENT_TYPE_VIEW_CART = 'viewCart';
exports.EVENT_TYPE_MORE_REFINEMENTS = 'moreRefinements';

@@ -281,2 +281,10 @@ /**

}
/**
* The data for a HomePageView event.
*/
export interface HomePageViewEvent extends BaseEvent {
products?: {
items: Item[];
};
}
export {};
{
"name": "gb-tracker-client",
"version": "5.1.1",
"version": "5.2.0-beta.1688982143",
"description": "GroupBy client-side event tracker",

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

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var experiments_1 = require("./partials/experiments");
var products_1 = require("./partials/products");
exports.default = {

@@ -22,101 +23,3 @@ sanitization: {

},
products: {
type: 'array',
optional: false,
strict: true,
items: {
type: 'object',
optional: false,
strict: true,
properties: {
category: {
type: 'string',
maxLength: 10000,
rules: [
'trim',
'lower'
],
optional: true
},
collection: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
],
optional: false,
def: 'default'
},
title: {
type: 'string',
maxLength: 10000,
rules: [
'trim',
'lower'
]
},
sku: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
],
optional: true
},
productId: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
]
},
parentId: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
],
optional: true
},
margin: {
type: 'number',
optional: true
},
price: {
type: 'number',
optional: false
},
currency: {
type: 'string',
optional: true
},
metadata: {
type: 'array',
optional: true,
items: {
strict: true,
type: 'object',
properties: {
key: {
type: 'string',
rules: [
'trim',
'lower'
],
maxLength: 10000
},
value: {
type: 'string',
rules: [
'trim',
'lower'
],
maxLength: 10000
}
}
}
}
}
}
},
products: products_1.productsSanitization,
},

@@ -123,0 +26,0 @@ },

@@ -96,4 +96,32 @@ declare const _default: {

};
visit: {
type: string;
strict: boolean;
properties: {
customerData: {
type: string;
strict: boolean;
properties: {
visitorId: {
type: string;
maxLength: number;
rules: string[];
};
sessionId: {
type: string;
maxLength: number;
rules: string[];
};
loginId: {
type: string;
maxLength: number;
rules: string[];
};
};
};
};
};
product: {
type: string;
optional: boolean;
strict: boolean;

@@ -170,29 +198,2 @@ properties: {

};
visit: {
type: string;
strict: boolean;
properties: {
customerData: {
type: string;
strict: boolean;
properties: {
visitorId: {
type: string;
maxLength: number;
rules: string[];
};
sessionId: {
type: string;
maxLength: number;
rules: string[];
};
loginId: {
type: string;
maxLength: number;
rules: string[];
};
};
};
};
};
experiments: {

@@ -199,0 +200,0 @@ type: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var experiments_1 = require("./partials/experiments");
var products_1 = require("./partials/products");
var searchAttributionToken_1 = require("./partials/searchAttributionToken");

@@ -125,95 +126,2 @@ exports.default = {

},
product: {
type: 'object',
strict: true,
properties: {
category: {
type: 'string',
maxLength: 10000,
rules: [
'trim',
'lower'
],
optional: true
},
collection: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
],
optional: false,
def: 'default'
},
title: {
type: 'string',
maxLength: 10000,
rules: [
'trim',
'lower'
]
},
sku: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
],
optional: true
},
productId: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
]
},
parentId: {
type: 'string',
maxLength: 10000,
rules: [
'trim'
],
optional: true
},
margin: {
type: 'number',
optional: true
},
price: {
type: 'number',
optional: true
},
currency: {
type: 'string',
optional: true
},
metadata: {
type: 'array',
optional: true,
items: {
strict: true,
type: 'object',
properties: {
key: {
type: 'string',
rules: [
'trim',
'lower'
],
maxLength: 10000
},
value: {
type: 'string',
rules: [
'trim',
'lower'
],
maxLength: 10000
}
}
}
}
}
},
visit: {

@@ -253,2 +161,3 @@ type: 'object',

},
product: products_1.productSanitization,
experiments: experiments_1.sanitization,

@@ -255,0 +164,0 @@ searchAttributionToken: searchAttributionToken_1.sanitization,

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

export declare const version = "5.1.1";
export declare const version = "5.2.0-beta.1688982143";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "5.1.1";
exports.version = "5.2.0-beta.1688982143";
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