@adtrackify/at-service-common 1.0.34 → 1.0.36
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/index.d.ts +3 -97
- package/dist/index.js +14 -11
- package/dist/index.js.map +4 -4
- package/package.json +4 -3
- package/src/clients/generic/dynamodb-client.ts +13 -0
- package/src/clients/internal-api/accounts-client.ts +1 -1
- package/src/clients/internal-api/destinations-client.ts +1 -1
- package/src/types/index.ts +0 -1
- package/src/types/db/destination.ts +0 -47
- package/src/types/db/destinations.ts +0 -6
- package/src/types/db/index.ts +0 -3
- package/src/types/db/shopify-app-install.ts +0 -32
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ declare module '@adtrackify/at-service-common/clients/generic/dynamodb-client' {
|
|
|
4
4
|
static safeGet: (tableName: string, keyName: string, keyValue: any) => Promise<AWS.DynamoDB.DocumentClient.AttributeMap | null>;
|
|
5
5
|
static safePut: (tableName: string, data: any) => Promise<import("aws-sdk/lib/request").PromiseResult<AWS.DynamoDB.DocumentClient.PutItemOutput, AWS.AWSError> | null>;
|
|
6
6
|
static safeDelete: (tableName: string, keyName: string, keyValue: any) => Promise<import("aws-sdk/lib/request").PromiseResult<AWS.DynamoDB.DocumentClient.DeleteItemOutput, AWS.AWSError> | null>;
|
|
7
|
+
static safeQueryByGSI: (tableName: string, gsiName: string, keyName: string, keyValue: any) => Promise<any[] | null>;
|
|
7
8
|
static safeBatchGet: (tableName: string, keys: any) => Promise<AWS.DynamoDB.DocumentClient.ItemList>;
|
|
8
9
|
static queryAll: (params: any) => Promise<any[] | null>;
|
|
9
10
|
static batchGet: (params: any) => Promise<import("aws-sdk/lib/request").PromiseResult<AWS.DynamoDB.DocumentClient.BatchGetItemOutput, AWS.AWSError>>;
|
|
@@ -79,7 +80,7 @@ declare module '@adtrackify/at-service-common/clients/index' {
|
|
|
79
80
|
}
|
|
80
81
|
declare module '@adtrackify/at-service-common/clients/internal-api/accounts-client' {
|
|
81
82
|
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
82
|
-
import { Destination } from '@adtrackify/at-
|
|
83
|
+
import { Destination } from '@adtrackify/at-tracking-event-types';
|
|
83
84
|
export interface IsAuthorizedUserResponseData {
|
|
84
85
|
isAccountUser: boolean;
|
|
85
86
|
[key: string]: any;
|
|
@@ -145,7 +146,7 @@ declare module '@adtrackify/at-service-common/clients/internal-api/accounts-clie
|
|
|
145
146
|
}
|
|
146
147
|
declare module '@adtrackify/at-service-common/clients/internal-api/destinations-client' {
|
|
147
148
|
import { ApiResponse } from '@adtrackify/at-service-common/types/api-response';
|
|
148
|
-
import { Destination } from '@adtrackify/at-
|
|
149
|
+
import { Destination } from '@adtrackify/at-tracking-event-types';
|
|
149
150
|
export interface GetDestinationsResponseData {
|
|
150
151
|
destinations: Destination[];
|
|
151
152
|
[key: string]: any;
|
|
@@ -512,103 +513,8 @@ declare module '@adtrackify/at-service-common/types/api-response' {
|
|
|
512
513
|
headers?: AxiosResponseHeaders;
|
|
513
514
|
}
|
|
514
515
|
|
|
515
|
-
}
|
|
516
|
-
declare module '@adtrackify/at-service-common/types/db/destination' {
|
|
517
|
-
export interface Destination {
|
|
518
|
-
id: string;
|
|
519
|
-
accountId: string;
|
|
520
|
-
pixelId: string;
|
|
521
|
-
destination: string;
|
|
522
|
-
displayName?: string;
|
|
523
|
-
enabled: boolean;
|
|
524
|
-
configuration: any;
|
|
525
|
-
createdAt: string;
|
|
526
|
-
updatedAt: string;
|
|
527
|
-
}
|
|
528
|
-
export interface DestinationCatalogItem {
|
|
529
|
-
id: string;
|
|
530
|
-
active: boolean;
|
|
531
|
-
destinationKey: string;
|
|
532
|
-
destinationType: string;
|
|
533
|
-
displayName: string;
|
|
534
|
-
shortName: string;
|
|
535
|
-
description?: string;
|
|
536
|
-
url: string;
|
|
537
|
-
fields?: any;
|
|
538
|
-
createdAt: string;
|
|
539
|
-
updatedAt: string;
|
|
540
|
-
}
|
|
541
|
-
export interface DestinationCatalogFields {
|
|
542
|
-
component_type: string;
|
|
543
|
-
name: string;
|
|
544
|
-
description: string;
|
|
545
|
-
label: string;
|
|
546
|
-
type: string;
|
|
547
|
-
required: boolean;
|
|
548
|
-
order: number;
|
|
549
|
-
}
|
|
550
|
-
export interface AdTrackifyFacebookDestination extends Destination {
|
|
551
|
-
configuration: FacebookPixelConfiguration;
|
|
552
|
-
}
|
|
553
|
-
export interface FacebookPixelConfiguration {
|
|
554
|
-
apiAccessToken?: string;
|
|
555
|
-
enableConversionAPI: boolean;
|
|
556
|
-
pixelId: string;
|
|
557
|
-
}
|
|
558
|
-
export interface GoogleAnalytics4Configuration {
|
|
559
|
-
measurementId: string;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
}
|
|
563
|
-
declare module '@adtrackify/at-service-common/types/db/destinations' {
|
|
564
|
-
export enum DESTINATIONS {
|
|
565
|
-
FACEBOOK = "facebook",
|
|
566
|
-
TIKTOK = "tiktok",
|
|
567
|
-
GOOGLE_ADS = "googleAds",
|
|
568
|
-
GOOGLE_ANALYTICS_4 = "googleAnalytics4"
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
}
|
|
572
|
-
declare module '@adtrackify/at-service-common/types/db/index' {
|
|
573
|
-
export * from '@adtrackify/at-service-common/types/db/shopify-app-install';
|
|
574
|
-
export * from '@adtrackify/at-service-common/types/db/destination';
|
|
575
|
-
export * from '@adtrackify/at-service-common/types/db/destinations';
|
|
576
|
-
|
|
577
|
-
}
|
|
578
|
-
declare module '@adtrackify/at-service-common/types/db/shopify-app-install' {
|
|
579
|
-
export interface ShopifyAppInstall {
|
|
580
|
-
shopifyAppInstallId: string;
|
|
581
|
-
accessToken?: string;
|
|
582
|
-
appStatus?: string;
|
|
583
|
-
code?: string;
|
|
584
|
-
createdAt: string;
|
|
585
|
-
hmac?: string;
|
|
586
|
-
host?: string;
|
|
587
|
-
installRequest: ShopifyInstallRequest;
|
|
588
|
-
isAppEnabled: boolean;
|
|
589
|
-
pixelId?: string;
|
|
590
|
-
shop: string;
|
|
591
|
-
shopInfo?: any;
|
|
592
|
-
state?: string;
|
|
593
|
-
timestamp?: number;
|
|
594
|
-
updatedAt: string;
|
|
595
|
-
}
|
|
596
|
-
export interface ShopifyInstallRequest {
|
|
597
|
-
shop: string;
|
|
598
|
-
session: string;
|
|
599
|
-
hmac: string;
|
|
600
|
-
host: string;
|
|
601
|
-
nonce: string;
|
|
602
|
-
timestamp: string;
|
|
603
|
-
status: string;
|
|
604
|
-
}
|
|
605
|
-
export interface ShopifyStoreInfo {
|
|
606
|
-
[key: string]: any;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
516
|
}
|
|
610
517
|
declare module '@adtrackify/at-service-common/types/index' {
|
|
611
|
-
export * from '@adtrackify/at-service-common/types/db/index';
|
|
612
518
|
export * from '@adtrackify/at-service-common/types/internal-events/index';
|
|
613
519
|
|
|
614
520
|
}
|
package/dist/index.js
CHANGED
|
@@ -627936,8 +627936,9 @@ var require_dist2 = __commonJS({
|
|
|
627936
627936
|
var import_aws_sdk = __toESM(require_aws());
|
|
627937
627937
|
import * as log from "lambda-log";
|
|
627938
627938
|
var client = new import_aws_sdk.default.DynamoDB.DocumentClient();
|
|
627939
|
-
var
|
|
627939
|
+
var _DynamoDbClient = class {
|
|
627940
627940
|
};
|
|
627941
|
+
var DynamoDbClient = _DynamoDbClient;
|
|
627941
627942
|
__publicField(DynamoDbClient, "safeGet", async (tableName, keyName, keyValue) => {
|
|
627942
627943
|
try {
|
|
627943
627944
|
const params = {
|
|
@@ -627981,6 +627982,18 @@ __publicField(DynamoDbClient, "safeDelete", async (tableName, keyName, keyValue)
|
|
|
627981
627982
|
return null;
|
|
627982
627983
|
}
|
|
627983
627984
|
});
|
|
627985
|
+
__publicField(DynamoDbClient, "safeQueryByGSI", async (tableName, gsiName, keyName, keyValue) => {
|
|
627986
|
+
const query = {
|
|
627987
|
+
TableName: tableName,
|
|
627988
|
+
IndexName: gsiName,
|
|
627989
|
+
KeyConditionExpression: `${keyName} = :value`,
|
|
627990
|
+
ExpressionAttributeValues: {
|
|
627991
|
+
":value": keyValue
|
|
627992
|
+
}
|
|
627993
|
+
};
|
|
627994
|
+
const results = await _DynamoDbClient.queryAll(query);
|
|
627995
|
+
return results;
|
|
627996
|
+
});
|
|
627984
627997
|
__publicField(DynamoDbClient, "safeBatchGet", async (tableName, keys) => {
|
|
627985
627998
|
try {
|
|
627986
627999
|
const params = {
|
|
@@ -628584,15 +628597,6 @@ var HttpStatusCodes = /* @__PURE__ */ ((HttpStatusCodes2) => {
|
|
|
628584
628597
|
return HttpStatusCodes2;
|
|
628585
628598
|
})(HttpStatusCodes || {});
|
|
628586
628599
|
|
|
628587
|
-
// src/types/db/destinations.ts
|
|
628588
|
-
var DESTINATIONS = /* @__PURE__ */ ((DESTINATIONS2) => {
|
|
628589
|
-
DESTINATIONS2["FACEBOOK"] = "facebook";
|
|
628590
|
-
DESTINATIONS2["TIKTOK"] = "tiktok";
|
|
628591
|
-
DESTINATIONS2["GOOGLE_ADS"] = "googleAds";
|
|
628592
|
-
DESTINATIONS2["GOOGLE_ANALYTICS_4"] = "googleAnalytics4";
|
|
628593
|
-
return DESTINATIONS2;
|
|
628594
|
-
})(DESTINATIONS || {});
|
|
628595
|
-
|
|
628596
628600
|
// src/types/internal-events/event-detail-types.ts
|
|
628597
628601
|
var ADTRACKIFY_EVENT_TYPES = /* @__PURE__ */ ((ADTRACKIFY_EVENT_TYPES2) => {
|
|
628598
628602
|
ADTRACKIFY_EVENT_TYPES2["NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED"] = "shopifySubscriptionCreated";
|
|
@@ -628609,7 +628613,6 @@ export {
|
|
|
628609
628613
|
ADTRACKIFY_EVENT_SOURCES,
|
|
628610
628614
|
ADTRACKIFY_EVENT_TYPES,
|
|
628611
628615
|
AccountsClient,
|
|
628612
|
-
DESTINATIONS,
|
|
628613
628616
|
DestinationsClient,
|
|
628614
628617
|
DynamoDbClient,
|
|
628615
628618
|
EventBridgeClient,
|