@adtrackify/at-tracking-event-types 1.0.4 → 1.0.5-8.1
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/.husky/pre-push +1 -1
- package/README.md +13 -0
- package/bitbucket-pipelines.yml +2 -2
- package/build.js +9 -4
- package/dist/index.d.ts +500 -1
- package/dist/index.js +2 -18
- package/dist/index.js.map +7 -1
- package/package.json +20 -21
- package/src/types/api/account.ts +31 -0
- package/src/types/api/destinations/destination-catalog.ts +24 -0
- package/src/types/api/destinations/destinations.ts +66 -0
- package/src/types/api/destinations/third-party-destination-configs.ts +60 -0
- package/src/types/api/index.ts +7 -1
- package/src/types/api/shopify-app-install.ts +50 -0
- package/src/types/api/subscription.ts +65 -0
- package/src/types/api/user.ts +14 -0
- package/src/types/index.ts +3 -1
- package/src/types/third-party-event-configuration-types.ts +3 -2
- package/src/types/tracking-event-type.ts +13 -7
- package/tsconfig.json +4 -7
- package/dist/types/adtrackify-event-bus-event.d.ts +0 -13
- package/dist/types/adtrackify-event-bus-event.js +0 -3
- package/dist/types/adtrackify-event-bus-event.js.map +0 -1
- package/dist/types/adtrackify-standard-events.d.ts +0 -18
- package/dist/types/adtrackify-standard-events.js +0 -23
- package/dist/types/adtrackify-standard-events.js.map +0 -1
- package/dist/types/api/destination.d.ts +0 -28
- package/dist/types/api/destination.js +0 -9
- package/dist/types/api/destination.js.map +0 -1
- package/dist/types/api/index.d.ts +0 -1
- package/dist/types/api/index.js +0 -18
- package/dist/types/api/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.js +0 -20
- package/dist/types/index.js.map +0 -1
- package/dist/types/third-party-event-configuration-types.d.ts +0 -8
- package/dist/types/third-party-event-configuration-types.js +0 -3
- package/dist/types/third-party-event-configuration-types.js.map +0 -1
- package/dist/types/tracking-event-type.d.ts +0 -124
- package/dist/types/tracking-event-type.js +0 -5
- package/dist/types/tracking-event-type.js.map +0 -1
- package/jest.config.js +0 -39
- package/prettier.config.js +0 -9
- package/src/types/api/destination.ts +0 -33
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adtrackify/at-tracking-event-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58.1",
|
|
4
4
|
"description": "",
|
|
5
|
+
"module": "./dist/index.js",
|
|
5
6
|
"main": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"modules": "esm",
|
|
7
9
|
"scripts": {
|
|
8
10
|
"clean": "rimraf dist",
|
|
9
|
-
"build": "node
|
|
10
|
-
"build:dev": "npm run clean && npm run verify && cross-env NODE_ENV=production stage=dev APP_ENV=dev npm run build",
|
|
11
|
-
"build:qa": "npm run clean && npm run verify && cross-env NODE_ENV=production stage=qa APP_ENV=qa webpack",
|
|
12
|
-
"build:prod": "npm run clean && npm run verify && cross-env NODE_ENV=production stage=prod APP_ENV=prod webpack",
|
|
11
|
+
"build": "npm run clean && npm run verify && cross-env NODE_ENV=production stage=dev APP_ENV=dev node build.js",
|
|
13
12
|
"elint": "eslint --ignore-path .gitignore .",
|
|
14
13
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
15
14
|
"lint": "tslint -p tsconfig.json",
|
|
@@ -21,39 +20,38 @@
|
|
|
21
20
|
"verify": "npm run clean && npm run type-check && npm run lint:fix",
|
|
22
21
|
"version": "npm run format && git add -A src",
|
|
23
22
|
"postversion": "git push && git push --tags",
|
|
24
|
-
"push": "npm install && npm run build
|
|
25
|
-
"type-check": "tsc --noEmit"
|
|
23
|
+
"push": "npm install && npm run build && npm publish",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"prepare": "husky install"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
28
|
+
"@types/luxon": "^3.0.1",
|
|
29
|
+
"@types/ua-parser-js": "^0.7.36"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@babel/cli": "^7.13.16",
|
|
32
|
-
"@babel/core": "^7.13
|
|
33
|
+
"@babel/core": "^7.18.13",
|
|
33
34
|
"@babel/plugin-proposal-optional-chaining": "^7.13.8",
|
|
34
35
|
"@babel/plugin-transform-runtime": "^7.10.3",
|
|
35
36
|
"@babel/preset-env": "^7.16.8",
|
|
36
37
|
"@babel/preset-typescript": "^7.16.7",
|
|
37
38
|
"@babel/runtime-corejs3": "^7.13.17",
|
|
38
|
-
"@types/jest": "^27.4.1",
|
|
39
39
|
"@types/node": "^17.0.8",
|
|
40
|
-
"@
|
|
41
|
-
"@typescript-eslint/
|
|
42
|
-
"@typescript-eslint/parser": "^5.21.0",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
|
41
|
+
"@typescript-eslint/parser": "^5.36.1",
|
|
43
42
|
"babel-eslint": "^10.1.0",
|
|
44
43
|
"babel-jest": "^26.6.3",
|
|
45
44
|
"babel-loader": "^8.2.2",
|
|
46
45
|
"babel-polyfill": "^6.26.0",
|
|
47
|
-
"core-js": "^3.
|
|
46
|
+
"core-js": "^3.25.0",
|
|
48
47
|
"cross-env": "^7.0.3",
|
|
49
48
|
"esbuild": "^0.14.54",
|
|
50
|
-
"eslint": "^8.
|
|
49
|
+
"eslint": "^8.23.0",
|
|
51
50
|
"eslint-config-standard": "^17.0.0",
|
|
52
|
-
"eslint-loader": "^4.0.2",
|
|
53
51
|
"eslint-plugin-babel": "^5.3.1",
|
|
54
52
|
"eslint-plugin-import": "^2.26.0",
|
|
55
|
-
"eslint-plugin-n": "^15.2.
|
|
56
|
-
"eslint-plugin-promise": "^6.0.
|
|
53
|
+
"eslint-plugin-n": "^15.2.5",
|
|
54
|
+
"eslint-plugin-promise": "^6.0.1",
|
|
57
55
|
"eslint-webpack-plugin": "^3.1.1",
|
|
58
56
|
"glob": "^8.0.3",
|
|
59
57
|
"husky": "^6.0.0",
|
|
@@ -61,12 +59,13 @@
|
|
|
61
59
|
"jest-cucumber": "3.0.1",
|
|
62
60
|
"jest-junit": "13.0.0",
|
|
63
61
|
"jest-runner-groups": "2.1.0",
|
|
62
|
+
"npm-dts": "^1.3.12",
|
|
64
63
|
"npm-run-all": "^4.1.5",
|
|
65
64
|
"npm-scripts-info": "^0.3.9",
|
|
66
|
-
"prettier": "^2.2.1",
|
|
67
65
|
"regenerator-runtime": "^0.13.9",
|
|
68
66
|
"rimraf": "^3.0.2",
|
|
69
|
-
"typescript": "
|
|
67
|
+
"typescript": "4.7.4",
|
|
68
|
+
"ua-parser-js": "^1.0.2"
|
|
70
69
|
},
|
|
71
70
|
"repository": {
|
|
72
71
|
"type": "git",
|
|
@@ -75,4 +74,4 @@
|
|
|
75
74
|
"author": "",
|
|
76
75
|
"license": "ISC",
|
|
77
76
|
"homepage": "https://bitbucket.org/eacap/at-tracking-event-types#readme"
|
|
78
|
-
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Subscription } from './subscription';
|
|
2
|
+
|
|
3
|
+
export interface Account {
|
|
4
|
+
id: string,
|
|
5
|
+
accountName: string,
|
|
6
|
+
companyName?: string,
|
|
7
|
+
accountStatus: ACCOUNT_STATUS,
|
|
8
|
+
primaryEmail: string,
|
|
9
|
+
publicApiKey?: string,
|
|
10
|
+
subscriptionId?: string,
|
|
11
|
+
pixels?: Pixel[],
|
|
12
|
+
subscription?: Subscription;
|
|
13
|
+
ownerId?: string,
|
|
14
|
+
createdAt: string,
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export interface Pixel {
|
|
20
|
+
id: string;
|
|
21
|
+
accountId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
createdAt: string,
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum ACCOUNT_STATUS {
|
|
28
|
+
PENDING = 'pending',
|
|
29
|
+
ACTIVE = 'active',
|
|
30
|
+
INACTIVE = 'inactive'
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface DestinationCatalogItem {
|
|
2
|
+
id: string,
|
|
3
|
+
active: boolean,
|
|
4
|
+
destinationKey: string,
|
|
5
|
+
destinationType: string,
|
|
6
|
+
displayName?: string,
|
|
7
|
+
shortName?: string;
|
|
8
|
+
description?: string,
|
|
9
|
+
url: string,
|
|
10
|
+
fields?: DestinationCatalogFields[],
|
|
11
|
+
createdAt: string,
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DestinationCatalogFields {
|
|
16
|
+
component_type: string,
|
|
17
|
+
name: string,
|
|
18
|
+
description: string,
|
|
19
|
+
label: string,
|
|
20
|
+
type: string,
|
|
21
|
+
required: boolean,
|
|
22
|
+
values?: any[],
|
|
23
|
+
order: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
export interface Destination {
|
|
3
|
+
id: string,
|
|
4
|
+
accountId: string,
|
|
5
|
+
pixelId: string,
|
|
6
|
+
destination: string;
|
|
7
|
+
displayName?: string,
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
configuration?: UserDestinationConfiguration,
|
|
10
|
+
createdAt: string,
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum DESTINATIONS {
|
|
15
|
+
FACEBOOK = 'facebook',
|
|
16
|
+
TIKTOK = 'tiktok',
|
|
17
|
+
GOOGLE_ADS = 'googleAds',
|
|
18
|
+
GOOGLE_ANALYTICS_4 = 'googleAnalytics4',
|
|
19
|
+
HUBSPOT = 'hubspot',
|
|
20
|
+
WEBHOOK = 'webhook',
|
|
21
|
+
CUSTOM_HTML = 'customHTML',
|
|
22
|
+
CUSTOM_JS = 'customJS',
|
|
23
|
+
SNAPCHAT = 'snapchat',
|
|
24
|
+
TWITTER = 'twitter',
|
|
25
|
+
REDDIT = 'reddit'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UserDestinationConfiguration {
|
|
29
|
+
[ key: string ]: any;
|
|
30
|
+
eventBlacklist?: string[];
|
|
31
|
+
events?: EventConfiguration[];
|
|
32
|
+
trigger?: DestinationTriggerConfiguration;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DestinationTriggerConfiguration {
|
|
36
|
+
shopify?: ShopifyTriggerConfiguration;
|
|
37
|
+
exludeDomains?: string[];
|
|
38
|
+
excludePages?: string[];
|
|
39
|
+
domains?: string[];
|
|
40
|
+
pages?: string[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ShopifyTriggerConfiguration {
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
collections?: string[];
|
|
46
|
+
tags?: string[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export interface EventConfiguration {
|
|
51
|
+
sourceEventName: string;
|
|
52
|
+
exclude?: boolean;
|
|
53
|
+
sample: EventSampleConfiguration;
|
|
54
|
+
transformations?: EventTransformation[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface EventTransformation {
|
|
58
|
+
transformationEventName: string;
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface EventSampleConfiguration {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
rate: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Destination, UserDestinationConfiguration } from './destinations';
|
|
2
|
+
|
|
3
|
+
export interface AdTrackifyFacebookDestination extends Destination {
|
|
4
|
+
configuration: FacebookPixelConfiguration;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Destination Specific configurations below
|
|
8
|
+
export interface FacebookPixelConfiguration extends UserDestinationConfiguration {
|
|
9
|
+
apiAccessToken?: string;
|
|
10
|
+
enableConversionAPI: boolean;
|
|
11
|
+
pixelId: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface TiktokPixelConfiguration {
|
|
15
|
+
pixelId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface GoogleAnalytics4Configuration {
|
|
19
|
+
measurementId: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GoogleAdsConfiguration {
|
|
23
|
+
pixelId: string;
|
|
24
|
+
conversionID: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HubspotPixelConfiguration {
|
|
28
|
+
hubspotId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface SnapchatPixelConfiguration {
|
|
32
|
+
snapchatPixelId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface TwitterPixelConfiguration {
|
|
36
|
+
twitterPixelId: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface WebhookConfiguration {
|
|
40
|
+
webhookUrl: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CustomHTMLConfiguration {
|
|
44
|
+
html: string;
|
|
45
|
+
location: CustomHTMLLocation;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CustomJSConfiguration {
|
|
49
|
+
script: string;
|
|
50
|
+
async: boolean;
|
|
51
|
+
defer: boolean;
|
|
52
|
+
location: CustomHTMLLocation;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export enum CustomHTMLLocation {
|
|
56
|
+
HEADER = 'header',
|
|
57
|
+
FOOTER = 'footer',
|
|
58
|
+
BODY = 'body'
|
|
59
|
+
}
|
|
60
|
+
|
package/src/types/api/index.ts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './account';
|
|
2
|
+
export * from './destinations/destinations';
|
|
3
|
+
export * from './destinations/destination-catalog';
|
|
4
|
+
export * from './destinations/third-party-destination-configs';
|
|
5
|
+
export * from './shopify-app-install';
|
|
6
|
+
export * from './subscription';
|
|
7
|
+
export * from './user';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ShopifyAppInstall {
|
|
2
|
+
shopifyAppInstallId: string;
|
|
3
|
+
shop: string;
|
|
4
|
+
accessToken?: string;
|
|
5
|
+
appStatus?: string;
|
|
6
|
+
appSubscriptionStatus?: ShopifyAppSubscriptionStatus;
|
|
7
|
+
code?: string;
|
|
8
|
+
hmac?: string;
|
|
9
|
+
host?: string;
|
|
10
|
+
installRequest?: ShopifyInstallRequest;
|
|
11
|
+
isAppEnabled?: boolean;
|
|
12
|
+
pixelId?: string;
|
|
13
|
+
shopInfo?: any;
|
|
14
|
+
state?: string;
|
|
15
|
+
timestamp?: number;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum ShopifyAppInstallStatus {
|
|
21
|
+
STARTED = 'started',
|
|
22
|
+
COMPLETED = 'completed',
|
|
23
|
+
UNINSTALLED = 'uninstalled',
|
|
24
|
+
FAILED = 'failed',
|
|
25
|
+
NONE = 'none'
|
|
26
|
+
}
|
|
27
|
+
export enum ShopifyAppSubscriptionStatus {
|
|
28
|
+
ACTIVE = 'active', // approved and billed to shop
|
|
29
|
+
CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation
|
|
30
|
+
DECLINED = 'declined', // subscription declined by merchant
|
|
31
|
+
EXPIRED = 'expired', //wasn't approved within two days of being created
|
|
32
|
+
FROZEN = 'frozen', //on hold due to not payment
|
|
33
|
+
PENDING = 'pending', // pending approval
|
|
34
|
+
NOT_SUBMITTED = 'na' // billing has not yet been attempted
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ShopifyInstallRequest {
|
|
38
|
+
shop?: string;
|
|
39
|
+
session?: string;
|
|
40
|
+
hmac?: string;
|
|
41
|
+
host?: string;
|
|
42
|
+
nonce?: string;
|
|
43
|
+
timestamp?: string;
|
|
44
|
+
status?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ShopifyStoreInfo {
|
|
48
|
+
// TBD based on shopify api
|
|
49
|
+
[ key: string ]: any;
|
|
50
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
|
|
2
|
+
export interface Subscription {
|
|
3
|
+
id: string,
|
|
4
|
+
accountId?: string,
|
|
5
|
+
shopifyAppInstallId?: string,
|
|
6
|
+
shopifyDomain?: string,
|
|
7
|
+
stripeCustomerId?: string,
|
|
8
|
+
stripeSubscriptionId?: string,
|
|
9
|
+
stripeCompletedCheckoutSession?: any;
|
|
10
|
+
shopifyChargeId?: string;
|
|
11
|
+
subscriptionPlan?: SubscriptionPlan,
|
|
12
|
+
status?: SUBSCRIPTION_STATUS,
|
|
13
|
+
paymentStatus?: PAYMENT_STATUS,
|
|
14
|
+
paymentGateway?: PAYMENT_GATEWAY,
|
|
15
|
+
createdAt: string,
|
|
16
|
+
updatedAt: string,
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
export interface SubscriptionPlan {
|
|
20
|
+
id: number;
|
|
21
|
+
planName: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
description: string;
|
|
24
|
+
sku: string;
|
|
25
|
+
price: string;
|
|
26
|
+
displayPrice: string;
|
|
27
|
+
billingFrequency: PLAN_BILLING_FREQUENCY;
|
|
28
|
+
trialLengthDays?: number;
|
|
29
|
+
trialRequiresCreditCard?: boolean;
|
|
30
|
+
planDesc?: string[];
|
|
31
|
+
unitPriceText?: string;
|
|
32
|
+
isHighlighted?: boolean;
|
|
33
|
+
isBanner?: boolean;
|
|
34
|
+
bannerText?: string;
|
|
35
|
+
bannerColor?: string;
|
|
36
|
+
stripePriceId?: string;
|
|
37
|
+
stripeProductId?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum PLAN_BILLING_FREQUENCY {
|
|
41
|
+
MONTHLY = 'monthly',
|
|
42
|
+
YEARLY = 'yearly'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export enum PAYMENT_STATUS {
|
|
46
|
+
CURRENT = 'current',
|
|
47
|
+
PAST_DUE = 'past_due',
|
|
48
|
+
CANCELLED = 'cancelled',
|
|
49
|
+
FAILED = 'failed'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export enum SUBSCRIPTION_STATUS {
|
|
53
|
+
ACTIVE = 'active', // approved and billed to shop
|
|
54
|
+
CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation
|
|
55
|
+
DECLINED = 'declined', // subscription declined by merchant
|
|
56
|
+
EXPIRED = 'expired', //wasn't approved within two days of being created
|
|
57
|
+
FROZEN = 'frozen', //on hold due to not payment
|
|
58
|
+
PENDING = 'pending', // pending approval
|
|
59
|
+
NOT_SUBMITTED = 'na' // billing has not yet been attempted
|
|
60
|
+
}
|
|
61
|
+
export enum PAYMENT_GATEWAY {
|
|
62
|
+
STRIPE = 'stripe',
|
|
63
|
+
PAYPAL = 'paypal',
|
|
64
|
+
SHOPIFY = 'shopify'
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
export interface User {
|
|
3
|
+
id: string;
|
|
4
|
+
sub: string,
|
|
5
|
+
userId: string;
|
|
6
|
+
Username: string,
|
|
7
|
+
UserLastModifiedDate: string,
|
|
8
|
+
Enabled: boolean,
|
|
9
|
+
UserStatus: string,
|
|
10
|
+
email: string,
|
|
11
|
+
email_verified: string,
|
|
12
|
+
name: string,
|
|
13
|
+
family_name: string,
|
|
14
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export interface DestinationConfiguration {
|
|
2
|
-
eventConfigurations: DestinationEventSpecificConfiguration[]
|
|
2
|
+
eventConfigurations: DestinationEventSpecificConfiguration[];
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
export interface DestinationEventSpecificConfiguration {
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
sourceEventName: string;
|
|
8
|
-
destinationEventName
|
|
8
|
+
destinationEventName?: string;
|
|
9
|
+
excludeEvent?: boolean;
|
|
9
10
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IResult } from 'ua-parser-js';
|
|
2
|
+
import { ADTRACKIFY_STANDARD_EVENT } from './adtrackify-standard-events';
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
export interface TrackingEvent {
|
|
5
6
|
id: string;
|
|
6
7
|
type: string;
|
|
7
|
-
name:
|
|
8
|
+
name: ADTRACKIFY_STANDARD_EVENT;
|
|
8
9
|
pixelId: string;
|
|
9
10
|
context: TrackingEventContext;
|
|
10
11
|
data: TrackingEventData;
|
|
@@ -25,9 +26,14 @@ export interface TrackingEventContext {
|
|
|
25
26
|
userAgent?: string;
|
|
26
27
|
ipAddress?: string;
|
|
27
28
|
ipv6Address?: string;
|
|
29
|
+
sessionId?: string;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
export interface TrackingEventIdentity {
|
|
33
|
+
[ key: string ]: any;
|
|
34
|
+
identityId?: string;
|
|
35
|
+
anonymousId?: string;
|
|
36
|
+
userId?: string;
|
|
31
37
|
gender?: string;
|
|
32
38
|
dob?: string;
|
|
33
39
|
phone?: string;
|
|
@@ -47,7 +53,7 @@ export interface AdClickInfo {
|
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
export interface TrackingEventData {
|
|
50
|
-
[key: string]: any;
|
|
56
|
+
[ key: string ]: any;
|
|
51
57
|
firstName?: string;
|
|
52
58
|
lastName?: string;
|
|
53
59
|
email?: string;
|
|
@@ -74,7 +80,7 @@ export interface TrackingEventData {
|
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
export interface GenericContent {
|
|
77
|
-
[key: string]: any;
|
|
83
|
+
[ key: string ]: any;
|
|
78
84
|
content_type?: string;
|
|
79
85
|
id?: string;
|
|
80
86
|
name?: string;
|
|
@@ -108,9 +114,9 @@ export interface AddressInfo {
|
|
|
108
114
|
address2?: string;
|
|
109
115
|
city?: string;
|
|
110
116
|
province?: string;
|
|
111
|
-
provinceCode
|
|
117
|
+
provinceCode?: string;
|
|
112
118
|
country?: string;
|
|
113
|
-
countryCode
|
|
119
|
+
countryCode?: string;
|
|
114
120
|
zip?: string;
|
|
115
121
|
}
|
|
116
122
|
|
|
@@ -131,8 +137,8 @@ export interface PageInfo {
|
|
|
131
137
|
qsp?: any;
|
|
132
138
|
}
|
|
133
139
|
|
|
134
|
-
export type DeviceInfo = IResult
|
|
140
|
+
export type DeviceInfo = IResult;
|
|
135
141
|
|
|
136
142
|
|
|
137
|
-
export const Currencies: string[] = ['AED', 'ARS', 'AUD', 'BDT', 'BIF', 'BOB', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CZK', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'GTQ', 'HKD', 'HNL', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'KZT', 'MAD', 'MOP', 'MXN', 'MYR', 'NGN', 'NIO', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'USD', 'VES', 'VND', 'ZAR'];
|
|
143
|
+
export const Currencies: string[] = [ 'AED', 'ARS', 'AUD', 'BDT', 'BIF', 'BOB', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CZK', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'GTQ', 'HKD', 'HNL', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'KZT', 'MAD', 'MOP', 'MXN', 'MYR', 'NGN', 'NIO', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'USD', 'VES', 'VND', 'ZAR' ];
|
|
138
144
|
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"module": "
|
|
5
|
-
"
|
|
6
|
-
"ESNext"
|
|
7
|
-
],
|
|
8
|
-
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
3
|
+
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
|
4
|
+
"module": "ES2022" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
5
|
+
"allowJs": false, /* Allow javascript files to be compiled. */
|
|
9
6
|
"checkJs": false /* Report errors in .js files. */,
|
|
10
7
|
"outDir": "dist", /* Redirect output to the directory. */
|
|
11
8
|
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
|
@@ -17,7 +14,7 @@
|
|
|
17
14
|
"experimentalDecorators": true,
|
|
18
15
|
"sourceMap": true,
|
|
19
16
|
"declaration": true,
|
|
20
|
-
"moduleResolution": "
|
|
17
|
+
"moduleResolution": "NodeNext",
|
|
21
18
|
"resolveJsonModule": true,
|
|
22
19
|
"isolatedModules": true,
|
|
23
20
|
"removeComments": true,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TrackingEvent } from './tracking-event-type';
|
|
2
|
-
export interface AdtrackifyEventBusEvent {
|
|
3
|
-
eventId: string;
|
|
4
|
-
eventType: string;
|
|
5
|
-
eventTime: string;
|
|
6
|
-
eventData?: object;
|
|
7
|
-
}
|
|
8
|
-
export interface AdtrackifyEventBusTrackingEvent extends AdtrackifyEventBusEvent {
|
|
9
|
-
eventData: {
|
|
10
|
-
trackingEvent: TrackingEvent;
|
|
11
|
-
pixelId: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adtrackify-event-bus-event.js","sourceRoot":"","sources":["../../src/types/adtrackify-event-bus-event.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare enum ADTRACKIFY_STANDARD_EVENT {
|
|
2
|
-
ADD_PAYMENT_INFO = "add_payment_info",
|
|
3
|
-
ADD_SHIPPING_INFO = "add_shipping_info",
|
|
4
|
-
ADD_TO_CART = "add_to_cart",
|
|
5
|
-
ADD_TO_WISHLIST = "add_to_wishlist",
|
|
6
|
-
INITIATE_CHECKOUT = "initiate_checkout",
|
|
7
|
-
LEAD = "lead",
|
|
8
|
-
LOGIN = "login",
|
|
9
|
-
PAGE_VIEW = "page_view",
|
|
10
|
-
PURCHASE = "purchase",
|
|
11
|
-
REFUND = "refund",
|
|
12
|
-
SEARCH = "search",
|
|
13
|
-
SIGN_UP = "sign_up",
|
|
14
|
-
VIEW_CART = "view_cart",
|
|
15
|
-
VIEW_CONTENT = "view_content",
|
|
16
|
-
SELECT_SHIPPING_METHOD = "select_shipping_method",
|
|
17
|
-
VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form"
|
|
18
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADTRACKIFY_STANDARD_EVENT = void 0;
|
|
4
|
-
var ADTRACKIFY_STANDARD_EVENT;
|
|
5
|
-
(function (ADTRACKIFY_STANDARD_EVENT) {
|
|
6
|
-
ADTRACKIFY_STANDARD_EVENT["ADD_PAYMENT_INFO"] = "add_payment_info";
|
|
7
|
-
ADTRACKIFY_STANDARD_EVENT["ADD_SHIPPING_INFO"] = "add_shipping_info";
|
|
8
|
-
ADTRACKIFY_STANDARD_EVENT["ADD_TO_CART"] = "add_to_cart";
|
|
9
|
-
ADTRACKIFY_STANDARD_EVENT["ADD_TO_WISHLIST"] = "add_to_wishlist";
|
|
10
|
-
ADTRACKIFY_STANDARD_EVENT["INITIATE_CHECKOUT"] = "initiate_checkout";
|
|
11
|
-
ADTRACKIFY_STANDARD_EVENT["LEAD"] = "lead";
|
|
12
|
-
ADTRACKIFY_STANDARD_EVENT["LOGIN"] = "login";
|
|
13
|
-
ADTRACKIFY_STANDARD_EVENT["PAGE_VIEW"] = "page_view";
|
|
14
|
-
ADTRACKIFY_STANDARD_EVENT["PURCHASE"] = "purchase";
|
|
15
|
-
ADTRACKIFY_STANDARD_EVENT["REFUND"] = "refund";
|
|
16
|
-
ADTRACKIFY_STANDARD_EVENT["SEARCH"] = "search";
|
|
17
|
-
ADTRACKIFY_STANDARD_EVENT["SIGN_UP"] = "sign_up";
|
|
18
|
-
ADTRACKIFY_STANDARD_EVENT["VIEW_CART"] = "view_cart";
|
|
19
|
-
ADTRACKIFY_STANDARD_EVENT["VIEW_CONTENT"] = "view_content";
|
|
20
|
-
ADTRACKIFY_STANDARD_EVENT["SELECT_SHIPPING_METHOD"] = "select_shipping_method";
|
|
21
|
-
ADTRACKIFY_STANDARD_EVENT["VIRTUALIZED_VIEWED_PAYMENT_FORM"] = "virtualized_viewd_payment_form";
|
|
22
|
-
})(ADTRACKIFY_STANDARD_EVENT = exports.ADTRACKIFY_STANDARD_EVENT || (exports.ADTRACKIFY_STANDARD_EVENT = {}));
|
|
23
|
-
//# sourceMappingURL=adtrackify-standard-events.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adtrackify-standard-events.js","sourceRoot":"","sources":["../../src/types/adtrackify-standard-events.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAyBX;AAzBD,WAAY,yBAAyB;IACnC,kEAAqC,CAAA;IACrC,oEAAuC,CAAA;IACvC,wDAA2B,CAAA;IAC3B,gEAAmC,CAAA;IAGnC,oEAAuC,CAAA;IACvC,0CAAa,CAAA;IACb,4CAAe,CAAA;IACf,oDAAuB,CAAA;IACvB,kDAAqB,CAAA;IACrB,8CAAiB,CAAA;IACjB,8CAAiB,CAAA;IAIjB,gDAAmB,CAAA;IACnB,oDAAuB,CAAA;IACvB,0DAA6B,CAAA;IAI7B,8EAAiD,CAAA;IACjD,+FAAkE,CAAA;AACpE,CAAC,EAzBW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAyBpC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface AdTrackifyDestination {
|
|
2
|
-
id: string;
|
|
3
|
-
accountId: string;
|
|
4
|
-
pixelId: string;
|
|
5
|
-
destination: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
configuration?: any;
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface AdTrackifyFacebookDestination extends AdTrackifyDestination {
|
|
11
|
-
configuration: {
|
|
12
|
-
apiAccessToken: string;
|
|
13
|
-
enableConversionAPI: boolean;
|
|
14
|
-
pixelId: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare enum ADTRACKIFY_DESTINATIONS {
|
|
18
|
-
FACEBOOK = "facebook",
|
|
19
|
-
GOOGLE_ANALYTICS_4 = "googleAnalytics4"
|
|
20
|
-
}
|
|
21
|
-
export interface FacebookPixelConfiguration {
|
|
22
|
-
apiAccessToken?: string;
|
|
23
|
-
enableConversionAPI: boolean;
|
|
24
|
-
pixelId: string;
|
|
25
|
-
}
|
|
26
|
-
export interface GoogleAnalytics4Configuration {
|
|
27
|
-
measurementId: string;
|
|
28
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADTRACKIFY_DESTINATIONS = void 0;
|
|
4
|
-
var ADTRACKIFY_DESTINATIONS;
|
|
5
|
-
(function (ADTRACKIFY_DESTINATIONS) {
|
|
6
|
-
ADTRACKIFY_DESTINATIONS["FACEBOOK"] = "facebook";
|
|
7
|
-
ADTRACKIFY_DESTINATIONS["GOOGLE_ANALYTICS_4"] = "googleAnalytics4";
|
|
8
|
-
})(ADTRACKIFY_DESTINATIONS = exports.ADTRACKIFY_DESTINATIONS || (exports.ADTRACKIFY_DESTINATIONS = {}));
|
|
9
|
-
//# sourceMappingURL=destination.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"destination.js","sourceRoot":"","sources":["../../../src/types/api/destination.ts"],"names":[],"mappings":";;;AAmBA,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,gDAAqB,CAAA;IACrB,kEAAuC,CAAA;AACzC,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './destination';
|