Socket
Socket
Sign inDemoInstall

@ombori/grid-session-manager

Package Overview
Dependencies
80
Maintainers
18
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.129.0 to 2.129.1

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## [2.129.1](https://github.com/ombori/gridapp/compare/v2.129.0...v2.129.1) (2021-12-06)
### Bug Fixes
* always create session and fix some method names ([ee5897e](https://github.com/ombori/gridapp/commit/ee5897ef3ee9c2487e7fbcfa5dc791b6f6343865))
* typo ([e42bc9e](https://github.com/ombori/gridapp/commit/e42bc9ebe2e66089ef623b3075c963a251a75dbe))
# [2.129.0](https://github.com/ombori/gridapp/compare/v2.128.0...v2.129.0) (2021-12-06)

@@ -8,0 +20,0 @@

11

dist/session-manager.d.ts

@@ -16,8 +16,9 @@ import { TrackEvent, InitProps, Instance, IdentityTypeEnum } from './types';

/**
* Identifying the customer based on a known identifyer
* Identifying the user based on a known identifyer
*/
sendContactIdentify: ({ interaction, identityType, contact, }: {
identifyContact: ({ interaction, identityType, contact, customIdentityType, }: {
interaction: boolean;
identityType: IdentityTypeEnum;
contact: string;
customIdentityType?: string | undefined;
}) => Promise<void>;

@@ -37,3 +38,3 @@ /**

*/
sendDetectMood: ({ mood, certainty, }: {
detectMood: ({ mood, certainty, }: {
mood: 'ANGRY' | 'DISGUST' | 'FEAR' | 'HAPPY' | 'SAD' | 'SURPRISE' | 'NEUTRAL';

@@ -47,3 +48,3 @@ certainty: number;

*/
sendDetectAge: ({ interaction, targetAge, ageRange, }: {
detectAge: ({ interaction, targetAge, ageRange, }: {
interaction: boolean;

@@ -58,3 +59,3 @@ targetAge: number;

*/
sendDetectGender: ({ interaction, gender, certainty, }: {
detectGender: ({ interaction, gender, certainty, }: {
interaction: boolean;

@@ -61,0 +62,0 @@ gender: 'FEMALE' | 'MALE';

@@ -67,5 +67,7 @@ "use strict";

this.instance.sessionId = initParams.sessionId ? initParams.sessionId : uuid_1.v4();
this.instance.sessionCreated = initParams.sessionId ? '' : get_date_string_1.default();
this.instance.sessionCreated = get_date_string_1.default();
yield delay_1.default(1000);
return Promise.all([
this.sendOrCacheData(types_1.DataRequestTypeEnum.SESSION, instance_helper_1.getSessionFromInstance(this.instance)),
this.sendAppStart(),
...(!this.instance.clientId

@@ -85,3 +87,3 @@ ? []

}),
this.sendContactIdentify({
this.identifyContact({
interaction: false,

@@ -92,9 +94,2 @@ identityType: types_1.IdentityTypeEnum.CLIENT_ID,

]),
// Skip create session if sessionId is provided
...(initParams.sessionId
? []
: [
this.sendOrCacheData(types_1.DataRequestTypeEnum.SESSION, instance_helper_1.getSessionFromInstance(this.instance)),
]),
this.sendAppStart(),
]);

@@ -150,9 +145,12 @@ }

/**
* Identifying the customer based on a known identifyer
* Identifying the user based on a known identifyer
*/
this.sendContactIdentify = ({ interaction, identityType, contact, }) => {
this.identifyContact = ({ interaction, identityType, contact, customIdentityType, }) => {
if (identityType === types_1.IdentityTypeEnum.OTHER && !customIdentityType) {
throw new Error('Custom identity type is required');
}
return this.trackEvent({
eventType: types_1.EventTypeEnum.CONTACT_IDENTIFY,
interaction,
str1: identityType,
str1: identityType === types_1.IdentityTypeEnum.OTHER ? customIdentityType : identityType,
str2: contact,

@@ -177,3 +175,3 @@ });

*/
this.sendDetectMood = ({ mood, certainty, }) => {
this.detectMood = ({ mood, certainty, }) => {
return this.trackEvent({

@@ -191,3 +189,3 @@ eventType: types_1.EventTypeEnum.DETECT_MOOD,

*/
this.sendDetectAge = ({ interaction, // If automatically detected with computer vision then FALSE. If user pick from an option in UI then TRUE
this.detectAge = ({ interaction, // If automatically detected with computer vision then FALSE. If user pick from an option in UI then TRUE
targetAge, ageRange, }) => {

@@ -206,3 +204,3 @@ return this.trackEvent({

*/
this.sendDetectGender = ({ interaction, // If automatically detected with computer vision then FALSE. If user pick from an option in UI then TRUE
this.detectGender = ({ interaction, // If automatically detected with computer vision then FALSE. If user pick from an option in UI then TRUE
gender, certainty, }) => {

@@ -209,0 +207,0 @@ return this.trackEvent({

{
"name": "@ombori/grid-session-manager",
"version": "2.129.0",
"version": "2.129.1",
"main": "dist/index.js",

@@ -32,3 +32,3 @@ "scripts": {

},
"gitHead": "d11525cda5ac1e05127389449610b7681bfc2d36"
"gitHead": "5d6a17a544e3e5c2ddc3542b9a78c6d85e4a528a"
}

@@ -87,3 +87,3 @@ import { v4 as uuid } from 'uuid';

this.instance.sessionId = initParams.sessionId ? initParams.sessionId : uuid();
this.instance.sessionCreated = initParams.sessionId ? '' : getDateString();
this.instance.sessionCreated = getDateString();

@@ -93,2 +93,7 @@ await delayPromise(1000);

return Promise.all([
this.sendOrCacheData(
DataRequestTypeEnum.SESSION,
getSessionFromInstance(this.instance),
),
this.sendAppStart(),
...(!this.instance.clientId

@@ -108,3 +113,3 @@ ? []

}),
this.sendContactIdentify({
this.identifyContact({
interaction: false,

@@ -115,12 +120,2 @@ identityType: IdentityTypeEnum.CLIENT_ID,

]),
// Skip create session if sessionId is provided
...(initParams.sessionId
? []
: [
this.sendOrCacheData(
DataRequestTypeEnum.SESSION,
getSessionFromInstance(this.instance),
),
]),
this.sendAppStart(),
]);

@@ -200,8 +195,9 @@ }

/**
* Identifying the customer based on a known identifyer
* Identifying the user based on a known identifyer
*/
public sendContactIdentify = ({
public identifyContact = ({
interaction,
identityType,
contact,
customIdentityType,
}: {

@@ -211,7 +207,12 @@ interaction: boolean;

contact: string;
customIdentityType?: string;
}) => {
if (identityType === IdentityTypeEnum.OTHER && !customIdentityType) {
throw new Error('Custom identity type is required');
}
return this.trackEvent({
eventType: EventTypeEnum.CONTACT_IDENTIFY,
interaction,
str1: identityType,
str1: identityType === IdentityTypeEnum.OTHER ? customIdentityType : identityType,
str2: contact,

@@ -246,3 +247,3 @@ });

*/
public sendDetectMood = ({
public detectMood = ({
mood,

@@ -267,3 +268,3 @@ certainty,

*/
public sendDetectAge = ({
public detectAge = ({
interaction, // If automatically detected with computer vision then FALSE. If user pick from an option in UI then TRUE

@@ -290,3 +291,3 @@ targetAge,

*/
public sendDetectGender = ({
public detectGender = ({
interaction, // If automatically detected with computer vision then FALSE. If user pick from an option in UI then TRUE

@@ -293,0 +294,0 @@ gender,

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc