@adtrackify/at-service-common 3.0.44 → 3.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/services/db/identity-cache-db-service.d.ts +22 -0
- package/dist/cjs/services/db/identity-cache-db-service.js +69 -0
- package/dist/cjs/services/db/identity-cache-db-service.js.map +1 -0
- package/dist/cjs/services/db/index.d.ts +1 -0
- package/dist/cjs/services/db/index.js +1 -0
- package/dist/cjs/services/db/index.js.map +1 -1
- package/dist/esm/services/db/identity-cache-db-service.d.ts +22 -0
- package/dist/esm/services/db/identity-cache-db-service.js +65 -0
- package/dist/esm/services/db/identity-cache-db-service.js.map +1 -0
- package/dist/esm/services/db/index.d.ts +1 -0
- package/dist/esm/services/db/index.js +1 -0
- package/dist/esm/services/db/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventIdentity } from '@adtrackify/at-tracking-event-types';
|
|
2
|
+
import { IdentityClient } from '../../clients';
|
|
3
|
+
export interface IdentityCache {
|
|
4
|
+
identityId: string;
|
|
5
|
+
request: EventIdentity;
|
|
6
|
+
response: EventIdentity;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
expiresAt: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class IdentityCacheDbService {
|
|
12
|
+
TABLE_NAME: string;
|
|
13
|
+
TABLE_KEY: string;
|
|
14
|
+
TTL_IN_MONTHS: number;
|
|
15
|
+
identityClient: IdentityClient;
|
|
16
|
+
constructor(tableName: string, tableKey: string, ttlInMonths: number, baseApiUrl: string, identityApiKey?: string);
|
|
17
|
+
lookupIdentityCache: (pixelId: string, identityId: string, incomingIdentity: EventIdentity) => Promise<any>;
|
|
18
|
+
putIdentityCache: (identityId: string, request: EventIdentity, response: EventIdentity) => Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput | null>;
|
|
19
|
+
updateIdentityCache: (identityId: string, request: EventIdentity, response: EventIdentity) => Promise<void>;
|
|
20
|
+
getIdentityCache: (identityId: string) => Promise<IdentityCache>;
|
|
21
|
+
deleteIdentityCache: (identityId: string) => Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput | null>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IdentityCacheDbService = void 0;
|
|
4
|
+
const luxon_1 = require("luxon");
|
|
5
|
+
const clients_1 = require("../../clients");
|
|
6
|
+
const libs_1 = require("../../libs");
|
|
7
|
+
const at_shared_utils_1 = require("@adtrackify/at-shared-utils");
|
|
8
|
+
const helpers_1 = require("../../helpers");
|
|
9
|
+
class IdentityCacheDbService {
|
|
10
|
+
TABLE_NAME;
|
|
11
|
+
TABLE_KEY;
|
|
12
|
+
TTL_IN_MONTHS;
|
|
13
|
+
identityClient;
|
|
14
|
+
constructor(tableName, tableKey, ttlInMonths, baseApiUrl, identityApiKey) {
|
|
15
|
+
this.TABLE_NAME = tableName;
|
|
16
|
+
this.TABLE_KEY = tableKey;
|
|
17
|
+
this.TTL_IN_MONTHS = ttlInMonths;
|
|
18
|
+
this.identityClient = new clients_1.IdentityClient(baseApiUrl, identityApiKey);
|
|
19
|
+
}
|
|
20
|
+
lookupIdentityCache = async (pixelId, identityId, incomingIdentity) => {
|
|
21
|
+
const cachedIdentity = await this.getIdentityCache(identityId);
|
|
22
|
+
if (cachedIdentity && (0, at_shared_utils_1.compareIdentityAndShouldUseCache)(cachedIdentity, incomingIdentity)) {
|
|
23
|
+
helpers_1.Logger.debug('identity cache hit', { cachedIdentity, incomingIdentity });
|
|
24
|
+
if (incomingIdentity?.traits?.emails && cachedIdentity?.response?.traits?.emails && incomingIdentity?.traits?.emails?.length !== cachedIdentity.response?.traits?.emails?.length) {
|
|
25
|
+
helpers_1.Logger.warn('Incoming identity & response identity having different emails lengths', { incomingIdentity, cachedIdentity });
|
|
26
|
+
}
|
|
27
|
+
else if (incomingIdentity?.traits?.userIds && cachedIdentity?.response?.traits?.userIds && incomingIdentity?.traits?.userIds?.length !== cachedIdentity.response?.traits?.userIds?.length) {
|
|
28
|
+
helpers_1.Logger.warn('Incoming identity & response identity having different userIds lengths', { incomingIdentity, cachedIdentity });
|
|
29
|
+
}
|
|
30
|
+
return cachedIdentity.response;
|
|
31
|
+
}
|
|
32
|
+
else if (cachedIdentity) {
|
|
33
|
+
helpers_1.Logger.debug('identity cache miss - record exists but stale', { cachedIdentity, incomingIdentity });
|
|
34
|
+
return await this.identityClient.getIdentity(pixelId, { identity: incomingIdentity });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
putIdentityCache = async (identityId, request, response) => {
|
|
38
|
+
const expiresAt = luxon_1.DateTime.now().plus({ months: this.TTL_IN_MONTHS }).toSeconds();
|
|
39
|
+
const identityCache = {
|
|
40
|
+
identityId,
|
|
41
|
+
request,
|
|
42
|
+
response,
|
|
43
|
+
createdAt: (0, libs_1.getCurrentTimestamp)(),
|
|
44
|
+
updatedAt: (0, libs_1.getCurrentTimestamp)(),
|
|
45
|
+
expiresAt
|
|
46
|
+
};
|
|
47
|
+
return await clients_1.DynamoDbClient.safePut(this.TABLE_NAME, identityCache);
|
|
48
|
+
};
|
|
49
|
+
updateIdentityCache = async (identityId, request, response) => {
|
|
50
|
+
const cachedIdentity = await this.getIdentityCache(identityId);
|
|
51
|
+
if (cachedIdentity) {
|
|
52
|
+
cachedIdentity.request = request;
|
|
53
|
+
cachedIdentity.response = response;
|
|
54
|
+
cachedIdentity.updatedAt = (0, libs_1.getCurrentTimestamp)();
|
|
55
|
+
await clients_1.DynamoDbClient.safePut(this.TABLE_NAME, cachedIdentity);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
await this.putIdentityCache(identityId, request, response);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
getIdentityCache = async (identityId) => {
|
|
62
|
+
return await clients_1.DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, identityId);
|
|
63
|
+
};
|
|
64
|
+
deleteIdentityCache = async (identityId) => {
|
|
65
|
+
return await clients_1.DynamoDbClient.safeDelete(this.TABLE_NAME, this.TABLE_KEY, identityId);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.IdentityCacheDbService = IdentityCacheDbService;
|
|
69
|
+
//# sourceMappingURL=identity-cache-db-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-cache-db-service.js","sourceRoot":"","sources":["../../../../src/services/db/identity-cache-db-service.ts"],"names":[],"mappings":";;;AACA,iCAAiC;AACjC,2CAA+D;AAC/D,qCAAiD;AACjD,iEAA+E;AAC/E,2CAAuC;AAWvC,MAAa,sBAAsB;IAC1B,UAAU,CAAS;IACnB,SAAS,CAAS;IAClB,aAAa,CAAS;IACtB,cAAc,CAAiB;IAEtC,YAAY,SAAiB,EAAE,QAAgB,EAAE,WAAmB,EAAE,UAAkB,EAAE,cAAuB;QAC/G,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC;QAEjC,IAAI,CAAC,cAAc,GAAG,IAAI,wBAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACvE,CAAC;IAEM,mBAAmB,GAAG,KAAK,EAAE,OAAe,EAAE,UAAkB,EAAE,gBAA+B,EAAE,EAAE;QAC1G,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAE/D,IAAI,cAAc,IAAI,IAAA,kDAAgC,EAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE;YACxF,gBAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC,CAAC;YACzE,IAAI,gBAAgB,EAAE,MAAM,EAAE,MAAM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AS;SACV,CAAC;QACF,OAAO,MAAM,wBAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IACtE,CAAC,CAAA;IAEM,mBAAmB,GAAG,KAAK,EAAE,UAAkB,EAAE,OAAsB,EAAE,QAAuB,EAAE,EAAE;QACzG,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC/D,IAAI,cAAc,EAAE;YAClB,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;YACjC,cAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACnC,cAAc,CAAC,SAAS,GAAG,IAAA,0BAAmB,GAAE,CAAC;YACjD,MAAM,wBAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;SAC/D;aACI;YACH,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;SAC5D;IACH,CAAC,CAAA;IAEM,gBAAgB,GAAG,KAAK,EAAE,UAAkB,EAA0B,EAAE;QAC7E,OAAO,MAAM,wBAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAkB,CAAC;IACpG,CAAC,CAAA;IAEM,mBAAmB,GAAG,KAAK,EAAE,UAAkB,EAAE,EAAE;QACxD,OAAO,MAAM,wBAAc,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtF,CAAC,CAAA;CACF;AApED,wDAoEC"}
|
|
@@ -20,4 +20,5 @@ __exportStar(require("./purchased-contacts-db-service.js"), exports);
|
|
|
20
20
|
__exportStar(require("./tracking-events-db-service.js"), exports);
|
|
21
21
|
__exportStar(require("./shopify-products-cache-db-service.js"), exports);
|
|
22
22
|
__exportStar(require("./shopify-app-installs-db-service.js"), exports);
|
|
23
|
+
__exportStar(require("./identity-cache-db-service.js"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/db/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,6DAA2C;AAC3C,qEAAmD;AACnD,kEAAgD;AAChD,yEAAuD;AACvD,uEAAqD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/db/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,6DAA2C;AAC3C,qEAAmD;AACnD,kEAAgD;AAChD,yEAAuD;AACvD,uEAAqD;AACrD,iEAA+C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventIdentity } from '@adtrackify/at-tracking-event-types';
|
|
2
|
+
import { IdentityClient } from '../../clients';
|
|
3
|
+
export interface IdentityCache {
|
|
4
|
+
identityId: string;
|
|
5
|
+
request: EventIdentity;
|
|
6
|
+
response: EventIdentity;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
expiresAt: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class IdentityCacheDbService {
|
|
12
|
+
TABLE_NAME: string;
|
|
13
|
+
TABLE_KEY: string;
|
|
14
|
+
TTL_IN_MONTHS: number;
|
|
15
|
+
identityClient: IdentityClient;
|
|
16
|
+
constructor(tableName: string, tableKey: string, ttlInMonths: number, baseApiUrl: string, identityApiKey?: string);
|
|
17
|
+
lookupIdentityCache: (pixelId: string, identityId: string, incomingIdentity: EventIdentity) => Promise<any>;
|
|
18
|
+
putIdentityCache: (identityId: string, request: EventIdentity, response: EventIdentity) => Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput | null>;
|
|
19
|
+
updateIdentityCache: (identityId: string, request: EventIdentity, response: EventIdentity) => Promise<void>;
|
|
20
|
+
getIdentityCache: (identityId: string) => Promise<IdentityCache>;
|
|
21
|
+
deleteIdentityCache: (identityId: string) => Promise<import("@aws-sdk/lib-dynamodb").DeleteCommandOutput | null>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
import { DynamoDbClient, IdentityClient } from '../../clients';
|
|
3
|
+
import { getCurrentTimestamp } from '../../libs';
|
|
4
|
+
import { compareIdentityAndShouldUseCache } from '@adtrackify/at-shared-utils';
|
|
5
|
+
import { Logger } from '../../helpers';
|
|
6
|
+
export class IdentityCacheDbService {
|
|
7
|
+
TABLE_NAME;
|
|
8
|
+
TABLE_KEY;
|
|
9
|
+
TTL_IN_MONTHS;
|
|
10
|
+
identityClient;
|
|
11
|
+
constructor(tableName, tableKey, ttlInMonths, baseApiUrl, identityApiKey) {
|
|
12
|
+
this.TABLE_NAME = tableName;
|
|
13
|
+
this.TABLE_KEY = tableKey;
|
|
14
|
+
this.TTL_IN_MONTHS = ttlInMonths;
|
|
15
|
+
this.identityClient = new IdentityClient(baseApiUrl, identityApiKey);
|
|
16
|
+
}
|
|
17
|
+
lookupIdentityCache = async (pixelId, identityId, incomingIdentity) => {
|
|
18
|
+
const cachedIdentity = await this.getIdentityCache(identityId);
|
|
19
|
+
if (cachedIdentity && compareIdentityAndShouldUseCache(cachedIdentity, incomingIdentity)) {
|
|
20
|
+
Logger.debug('identity cache hit', { cachedIdentity, incomingIdentity });
|
|
21
|
+
if (incomingIdentity?.traits?.emails && cachedIdentity?.response?.traits?.emails && incomingIdentity?.traits?.emails?.length !== cachedIdentity.response?.traits?.emails?.length) {
|
|
22
|
+
Logger.warn('Incoming identity & response identity having different emails lengths', { incomingIdentity, cachedIdentity });
|
|
23
|
+
}
|
|
24
|
+
else if (incomingIdentity?.traits?.userIds && cachedIdentity?.response?.traits?.userIds && incomingIdentity?.traits?.userIds?.length !== cachedIdentity.response?.traits?.userIds?.length) {
|
|
25
|
+
Logger.warn('Incoming identity & response identity having different userIds lengths', { incomingIdentity, cachedIdentity });
|
|
26
|
+
}
|
|
27
|
+
return cachedIdentity.response;
|
|
28
|
+
}
|
|
29
|
+
else if (cachedIdentity) {
|
|
30
|
+
Logger.debug('identity cache miss - record exists but stale', { cachedIdentity, incomingIdentity });
|
|
31
|
+
return await this.identityClient.getIdentity(pixelId, { identity: incomingIdentity });
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
putIdentityCache = async (identityId, request, response) => {
|
|
35
|
+
const expiresAt = DateTime.now().plus({ months: this.TTL_IN_MONTHS }).toSeconds();
|
|
36
|
+
const identityCache = {
|
|
37
|
+
identityId,
|
|
38
|
+
request,
|
|
39
|
+
response,
|
|
40
|
+
createdAt: getCurrentTimestamp(),
|
|
41
|
+
updatedAt: getCurrentTimestamp(),
|
|
42
|
+
expiresAt
|
|
43
|
+
};
|
|
44
|
+
return await DynamoDbClient.safePut(this.TABLE_NAME, identityCache);
|
|
45
|
+
};
|
|
46
|
+
updateIdentityCache = async (identityId, request, response) => {
|
|
47
|
+
const cachedIdentity = await this.getIdentityCache(identityId);
|
|
48
|
+
if (cachedIdentity) {
|
|
49
|
+
cachedIdentity.request = request;
|
|
50
|
+
cachedIdentity.response = response;
|
|
51
|
+
cachedIdentity.updatedAt = getCurrentTimestamp();
|
|
52
|
+
await DynamoDbClient.safePut(this.TABLE_NAME, cachedIdentity);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
await this.putIdentityCache(identityId, request, response);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
getIdentityCache = async (identityId) => {
|
|
59
|
+
return await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, identityId);
|
|
60
|
+
};
|
|
61
|
+
deleteIdentityCache = async (identityId) => {
|
|
62
|
+
return await DynamoDbClient.safeDelete(this.TABLE_NAME, this.TABLE_KEY, identityId);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=identity-cache-db-service.js.map
|
|
@@ -0,0 +1 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B,GAAG,KAAK,EAAE,UAAkB,EAAE,OAAsB,EAAE,QAAuB,EAAE,EAAE;QACzG,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC/D,IAAI,cAAc,EAAE;YAClB,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;YACjC,cAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACnC,cAAc,CAAC,SAAS,GAAG,mBAAmB,EAAE,CAAC;YACjD,MAAM,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;SAC/D;aACI;YACH,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;SAC5D;IACH,CAAC,CAAA;IAEM,gBAAgB,GAAG,KAAK,EAAE,UAAkB,EAA0B,EAAE;QAC7E,OAAO,MAAM,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAkB,CAAC;IACpG,CAAC,CAAA;IAEM,mBAAmB,GAAG,KAAK,EAAE,UAAkB,EAAE,EAAE;QACxD,OAAO,MAAM,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtF,CAAC,CAAA;CACF"}
|
|
@@ -4,4 +4,5 @@ export * from './purchased-contacts-db-service.js';
|
|
|
4
4
|
export * from './tracking-events-db-service.js';
|
|
5
5
|
export * from './shopify-products-cache-db-service.js';
|
|
6
6
|
export * from './shopify-app-installs-db-service.js';
|
|
7
|
+
export * from './identity-cache-db-service.js';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/db/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/db/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adtrackify/at-service-common",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.45",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"prepublishOnly": "npm run tsc"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@adtrackify/at-shared-utils": "^3.0.
|
|
38
|
+
"@adtrackify/at-shared-utils": "^3.0.30",
|
|
39
39
|
"pako": "^2.1.0",
|
|
40
40
|
"shopify-api-node": "^3.12.7"
|
|
41
41
|
},
|