@adtrackify/at-service-common 2.0.45 → 2.0.46
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/destinations-service.d.ts +6 -0
- package/dist/cjs/services/destinations-service.js +36 -0
- package/dist/cjs/services/destinations-service.js.map +1 -0
- package/dist/cjs/services/index.d.ts +1 -1
- package/dist/cjs/services/index.js +1 -1
- package/dist/cjs/services/index.js.map +1 -1
- package/dist/esm/services/destinations-service.d.ts +6 -0
- package/dist/esm/services/destinations-service.js +32 -0
- package/dist/esm/services/destinations-service.js.map +1 -0
- package/dist/esm/services/index.d.ts +1 -1
- package/dist/esm/services/index.js +1 -1
- package/dist/esm/services/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/services/destination-service.d.ts +0 -1
- package/dist/cjs/services/destination-service.js +0 -20
- package/dist/cjs/services/destination-service.js.map +0 -1
- package/dist/esm/services/destination-service.d.ts +0 -1
- package/dist/esm/services/destination-service.js +0 -16
- package/dist/esm/services/destination-service.js.map +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class DestinationsService {
|
|
2
|
+
TABLE_NAME: string;
|
|
3
|
+
constructor(tableName: string);
|
|
4
|
+
getDestinationsByPixel: (indexName: string, pixelId: string) => Promise<any[] | null>;
|
|
5
|
+
getDestinationsByAccountId: (indexName: string, accountId: string) => Promise<any[] | null>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DestinationsService = void 0;
|
|
4
|
+
const clients_1 = require("../clients");
|
|
5
|
+
class DestinationsService {
|
|
6
|
+
TABLE_NAME;
|
|
7
|
+
constructor(tableName) {
|
|
8
|
+
this.TABLE_NAME = tableName;
|
|
9
|
+
}
|
|
10
|
+
getDestinationsByPixel = async (indexName, pixelId) => {
|
|
11
|
+
const query = {
|
|
12
|
+
TableName: this.TABLE_NAME,
|
|
13
|
+
IndexName: indexName,
|
|
14
|
+
KeyConditionExpression: 'pixelId = :pixelId',
|
|
15
|
+
ExpressionAttributeValues: {
|
|
16
|
+
':pixelId': pixelId,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
const destinations = await clients_1.DynamoDbClient.queryAll(query);
|
|
20
|
+
return destinations;
|
|
21
|
+
};
|
|
22
|
+
getDestinationsByAccountId = async (indexName, accountId) => {
|
|
23
|
+
const query = {
|
|
24
|
+
TableName: this.TABLE_NAME,
|
|
25
|
+
IndexName: indexName,
|
|
26
|
+
KeyConditionExpression: 'accountId = :accountId',
|
|
27
|
+
ExpressionAttributeValues: {
|
|
28
|
+
':accountId': accountId,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const destinations = await clients_1.DynamoDbClient.queryAll(query);
|
|
32
|
+
return destinations;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.DestinationsService = DestinationsService;
|
|
36
|
+
//# sourceMappingURL=destinations-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destinations-service.js","sourceRoot":"","sources":["../../../src/services/destinations-service.ts"],"names":[],"mappings":";;;AAAA,wCAA4C;AAE5C,MAAa,mBAAmB;IACvB,UAAU,CAAS;IAE1B,YAAY,SAAiB;QAC3B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAEM,sBAAsB,GAAG,KAAK,EAAE,SAAiB,EAAE,OAAe,EAAE,EAAE;QAC3E,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,SAAS,EAAE,SAAS;YACpB,sBAAsB,EAAE,oBAAoB;YAC5C,yBAAyB,EAAE;gBACzB,UAAU,EAAE,OAAO;aACpB;SACF,CAAC;QACF,MAAM,YAAY,GAAG,MAAM,wBAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC;IAEK,0BAA0B,GAAG,KAAK,EAAE,SAAiB,EAAE,SAAiB,EAAE,EAAE;QACjF,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,SAAS,EAAE,SAAS;YACpB,sBAAsB,EAAE,wBAAwB;YAChD,yBAAyB,EAAE;gBACzB,YAAY,EAAE,SAAS;aACxB;SACF,CAAC;QACF,MAAM,YAAY,GAAG,MAAM,wBAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,YAAY,CAAC;IACtB,CAAC,CAAA;CACF;AAhCD,kDAgCC"}
|
|
@@ -2,4 +2,4 @@ export * from './eventbridge-integration-service.js';
|
|
|
2
2
|
export * from './ipdata-lookup-service.js';
|
|
3
3
|
export * from './log-event-service.js';
|
|
4
4
|
export * from './metric-event-service.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './destinations-service.js';
|
|
@@ -18,5 +18,5 @@ __exportStar(require("./eventbridge-integration-service.js"), exports);
|
|
|
18
18
|
__exportStar(require("./ipdata-lookup-service.js"), exports);
|
|
19
19
|
__exportStar(require("./log-event-service.js"), exports);
|
|
20
20
|
__exportStar(require("./metric-event-service.js"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
21
|
+
__exportStar(require("./destinations-service.js"), exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD;AACrD,6DAA2C;AAC3C,yDAAuC;AACvC,4DAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD;AACrD,6DAA2C;AAC3C,yDAAuC;AACvC,4DAA0C;AAC1C,4DAA0C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class DestinationsService {
|
|
2
|
+
TABLE_NAME: string;
|
|
3
|
+
constructor(tableName: string);
|
|
4
|
+
getDestinationsByPixel: (indexName: string, pixelId: string) => Promise<any[] | null>;
|
|
5
|
+
getDestinationsByAccountId: (indexName: string, accountId: string) => Promise<any[] | null>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DynamoDbClient } from '../clients';
|
|
2
|
+
export class DestinationsService {
|
|
3
|
+
TABLE_NAME;
|
|
4
|
+
constructor(tableName) {
|
|
5
|
+
this.TABLE_NAME = tableName;
|
|
6
|
+
}
|
|
7
|
+
getDestinationsByPixel = async (indexName, pixelId) => {
|
|
8
|
+
const query = {
|
|
9
|
+
TableName: this.TABLE_NAME,
|
|
10
|
+
IndexName: indexName,
|
|
11
|
+
KeyConditionExpression: 'pixelId = :pixelId',
|
|
12
|
+
ExpressionAttributeValues: {
|
|
13
|
+
':pixelId': pixelId,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const destinations = await DynamoDbClient.queryAll(query);
|
|
17
|
+
return destinations;
|
|
18
|
+
};
|
|
19
|
+
getDestinationsByAccountId = async (indexName, accountId) => {
|
|
20
|
+
const query = {
|
|
21
|
+
TableName: this.TABLE_NAME,
|
|
22
|
+
IndexName: indexName,
|
|
23
|
+
KeyConditionExpression: 'accountId = :accountId',
|
|
24
|
+
ExpressionAttributeValues: {
|
|
25
|
+
':accountId': accountId,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const destinations = await DynamoDbClient.queryAll(query);
|
|
29
|
+
return destinations;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=destinations-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destinations-service.js","sourceRoot":"","sources":["../../../src/services/destinations-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,OAAO,mBAAmB;IACvB,UAAU,CAAS;IAE1B,YAAY,SAAiB;QAC3B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAEM,sBAAsB,GAAG,KAAK,EAAE,SAAiB,EAAE,OAAe,EAAE,EAAE;QAC3E,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,SAAS,EAAE,SAAS;YACpB,sBAAsB,EAAE,oBAAoB;YAC5C,yBAAyB,EAAE;gBACzB,UAAU,EAAE,OAAO;aACpB;SACF,CAAC;QACF,MAAM,YAAY,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC;IAEK,0BAA0B,GAAG,KAAK,EAAE,SAAiB,EAAE,SAAiB,EAAE,EAAE;QACjF,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,IAAI,CAAC,UAAU;YAC1B,SAAS,EAAE,SAAS;YACpB,sBAAsB,EAAE,wBAAwB;YAChD,yBAAyB,EAAE;gBACzB,YAAY,EAAE,SAAS;aACxB;SACF,CAAC;QACF,MAAM,YAAY,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,YAAY,CAAC;IACtB,CAAC,CAAA;CACF"}
|
|
@@ -2,4 +2,4 @@ export * from './eventbridge-integration-service.js';
|
|
|
2
2
|
export * from './ipdata-lookup-service.js';
|
|
3
3
|
export * from './log-event-service.js';
|
|
4
4
|
export * from './metric-event-service.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './destinations-service.js';
|
|
@@ -2,5 +2,5 @@ export * from './eventbridge-integration-service.js';
|
|
|
2
2
|
export * from './ipdata-lookup-service.js';
|
|
3
3
|
export * from './log-event-service.js';
|
|
4
4
|
export * from './metric-event-service.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './destinations-service.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getDestinationsByPixel: (pixelId: string) => Promise<any[] | null>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDestinationsByPixel = void 0;
|
|
4
|
-
const clients_1 = require("../clients");
|
|
5
|
-
const DESTINATIONS_TABLE = process.env.DESTINATIONS_TABLE;
|
|
6
|
-
const GSI_DESTINATIONS_PIXEL_ID = process.env.GSI_DESTINATIONS_PIXEL_ID;
|
|
7
|
-
const getDestinationsByPixel = async (pixelId) => {
|
|
8
|
-
const query = {
|
|
9
|
-
TableName: DESTINATIONS_TABLE,
|
|
10
|
-
IndexName: GSI_DESTINATIONS_PIXEL_ID,
|
|
11
|
-
KeyConditionExpression: 'pixelId = :pixelId',
|
|
12
|
-
ExpressionAttributeValues: {
|
|
13
|
-
':pixelId': pixelId,
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const destinations = await clients_1.DynamoDbClient.queryAll(query);
|
|
17
|
-
return destinations;
|
|
18
|
-
};
|
|
19
|
-
exports.getDestinationsByPixel = getDestinationsByPixel;
|
|
20
|
-
//# sourceMappingURL=destination-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destination-service.js","sourceRoot":"","sources":["../../../src/services/destination-service.ts"],"names":[],"mappings":";;;AAAA,wCAA4C;AAE5C,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAA4B,CAAC;AACpE,MAAM,yBAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAmC,CAAC;AAE3E,MAAM,sBAAsB,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IAC9D,MAAM,KAAK,GAAG;QACZ,SAAS,EAAE,kBAAkB;QAC7B,SAAS,EAAE,yBAAyB;QACpC,sBAAsB,EAAE,oBAAoB;QAC5C,yBAAyB,EAAE;YACzB,UAAU,EAAE,OAAO;SACpB;KACF,CAAC;IACF,MAAM,YAAY,GAAG,MAAM,wBAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAXW,QAAA,sBAAsB,0BAWjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getDestinationsByPixel: (pixelId: string) => Promise<any[] | null>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DynamoDbClient } from '../clients';
|
|
2
|
-
const DESTINATIONS_TABLE = process.env.DESTINATIONS_TABLE;
|
|
3
|
-
const GSI_DESTINATIONS_PIXEL_ID = process.env.GSI_DESTINATIONS_PIXEL_ID;
|
|
4
|
-
export const getDestinationsByPixel = async (pixelId) => {
|
|
5
|
-
const query = {
|
|
6
|
-
TableName: DESTINATIONS_TABLE,
|
|
7
|
-
IndexName: GSI_DESTINATIONS_PIXEL_ID,
|
|
8
|
-
KeyConditionExpression: 'pixelId = :pixelId',
|
|
9
|
-
ExpressionAttributeValues: {
|
|
10
|
-
':pixelId': pixelId,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
const destinations = await DynamoDbClient.queryAll(query);
|
|
14
|
-
return destinations;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=destination-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destination-service.js","sourceRoot":"","sources":["../../../src/services/destination-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAA4B,CAAC;AACpE,MAAM,yBAAyB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAmC,CAAC;AAElF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IAC9D,MAAM,KAAK,GAAG;QACZ,SAAS,EAAE,kBAAkB;QAC7B,SAAS,EAAE,yBAAyB;QACpC,sBAAsB,EAAE,oBAAoB;QAC5C,yBAAyB,EAAE;YACzB,UAAU,EAAE,OAAO;SACpB;KACF,CAAC;IACF,MAAM,YAAY,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"}
|