@adtrackify/at-tracking-event-types 1.0.5-8.1 → 1.0.6
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/bitbucket-pipelines.yml +2 -2
- package/build.js +4 -9
- package/dist/index.d.ts +1 -500
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -7
- package/dist/types/adtrackify-event-bus-event.d.ts +13 -0
- package/dist/types/adtrackify-event-bus-event.js +3 -0
- package/dist/types/adtrackify-event-bus-event.js.map +1 -0
- package/dist/types/adtrackify-standard-events.d.ts +18 -0
- package/dist/types/adtrackify-standard-events.js +23 -0
- package/dist/types/adtrackify-standard-events.js.map +1 -0
- package/dist/types/api/destination.d.ts +28 -0
- package/dist/types/api/destination.js +9 -0
- package/dist/types/api/destination.js.map +1 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/index.js +18 -0
- package/dist/types/api/index.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +22 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/third-party-event-configuration-types.d.ts +8 -0
- package/dist/types/third-party-event-configuration-types.js +3 -0
- package/dist/types/third-party-event-configuration-types.js.map +1 -0
- package/dist/types/tracking-event-type.d.ts +124 -0
- package/dist/types/tracking-event-type.js +5 -0
- package/dist/types/tracking-event-type.js.map +1 -0
- package/jest.config.js +39 -0
- package/package.json +20 -19
- package/prettier.config.js +9 -0
- package/src/types/api/destination.ts +33 -0
- package/src/types/api/index.ts +1 -7
- package/src/types/third-party-event-configuration-types.ts +2 -3
- package/src/types/tracking-event-type.ts +7 -13
- package/tsconfig.json +7 -4
- package/README.md +0 -13
- package/src/types/api/account.ts +0 -31
- package/src/types/api/destinations/destination-catalog.ts +0 -24
- package/src/types/api/destinations/destinations.ts +0 -66
- package/src/types/api/destinations/third-party-destination-configs.ts +0 -60
- package/src/types/api/shopify-app-install.ts +0 -50
- package/src/types/api/subscription.ts +0 -65
- package/src/types/api/user.ts +0 -14
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './destination';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./destination"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./adtrackify-standard-events"), exports);
|
|
18
|
+
__exportStar(require("./third-party-event-configuration-types"), exports);
|
|
19
|
+
__exportStar(require("./tracking-event-type"), exports);
|
|
20
|
+
__exportStar(require("./adtrackify-event-bus-event"), exports);
|
|
21
|
+
__exportStar(require("./api"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,0EAAwD;AACxD,wDAAsC;AACtC,+DAA6C;AAC7C,wCAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"third-party-event-configuration-types.js","sourceRoot":"","sources":["../../src/types/third-party-event-configuration-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { IResult } from 'ua-parser-js';
|
|
2
|
+
export interface TrackingEvent {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
name: string;
|
|
6
|
+
pixelId: string;
|
|
7
|
+
context: TrackingEventContext;
|
|
8
|
+
data: TrackingEventData;
|
|
9
|
+
testCode?: string;
|
|
10
|
+
sentAtEpoch?: number;
|
|
11
|
+
collectedAt?: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TrackingEventContext {
|
|
15
|
+
identity: TrackingEventIdentity;
|
|
16
|
+
click?: AdClickInfo;
|
|
17
|
+
campaign?: CampaignInfo;
|
|
18
|
+
page?: PageInfo;
|
|
19
|
+
device?: DeviceInfo;
|
|
20
|
+
locale?: string;
|
|
21
|
+
timezone?: string;
|
|
22
|
+
userAgent?: string;
|
|
23
|
+
ipAddress?: string;
|
|
24
|
+
ipv6Address?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TrackingEventIdentity {
|
|
27
|
+
gender?: string;
|
|
28
|
+
dob?: string;
|
|
29
|
+
phone?: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
firstName?: string;
|
|
32
|
+
lastName?: string;
|
|
33
|
+
email?: string;
|
|
34
|
+
address?: AddressInfo;
|
|
35
|
+
addresses?: AddressInfo[];
|
|
36
|
+
}
|
|
37
|
+
export interface AdClickInfo {
|
|
38
|
+
fbp?: string;
|
|
39
|
+
fbc?: string;
|
|
40
|
+
fbclid?: string;
|
|
41
|
+
gclid?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface TrackingEventData {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
firstName?: string;
|
|
46
|
+
lastName?: string;
|
|
47
|
+
email?: string;
|
|
48
|
+
phone?: string;
|
|
49
|
+
addresses?: AddressInfo[];
|
|
50
|
+
cartId?: string;
|
|
51
|
+
transactionId?: string;
|
|
52
|
+
affiliation?: string;
|
|
53
|
+
currency?: string;
|
|
54
|
+
price?: number;
|
|
55
|
+
subtotalPrice?: number;
|
|
56
|
+
value?: number;
|
|
57
|
+
tax?: number;
|
|
58
|
+
shipping?: number;
|
|
59
|
+
coupon?: string;
|
|
60
|
+
paymentType?: string;
|
|
61
|
+
shippingTier?: string;
|
|
62
|
+
creativeName?: string;
|
|
63
|
+
creativeSlot?: string;
|
|
64
|
+
locationId?: string;
|
|
65
|
+
promotionId?: string;
|
|
66
|
+
promotionName?: string;
|
|
67
|
+
items?: GenericContent[];
|
|
68
|
+
}
|
|
69
|
+
export interface GenericContent {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
content_type?: string;
|
|
72
|
+
id?: string;
|
|
73
|
+
name?: string;
|
|
74
|
+
sku?: string;
|
|
75
|
+
brand?: string;
|
|
76
|
+
variant?: string;
|
|
77
|
+
coupon?: string;
|
|
78
|
+
currency?: string;
|
|
79
|
+
discount?: number;
|
|
80
|
+
index?: number;
|
|
81
|
+
value?: number;
|
|
82
|
+
price?: number;
|
|
83
|
+
quantity?: number;
|
|
84
|
+
url?: string;
|
|
85
|
+
locationId?: string;
|
|
86
|
+
imageUrl?: string;
|
|
87
|
+
category?: string;
|
|
88
|
+
category2?: string;
|
|
89
|
+
category3?: string;
|
|
90
|
+
category4?: string;
|
|
91
|
+
category5?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface AddressInfo {
|
|
94
|
+
email?: string;
|
|
95
|
+
phone?: string;
|
|
96
|
+
firstName?: string;
|
|
97
|
+
lastName?: string;
|
|
98
|
+
company?: string;
|
|
99
|
+
address1?: string;
|
|
100
|
+
address2?: string;
|
|
101
|
+
city?: string;
|
|
102
|
+
province?: string;
|
|
103
|
+
provinceCode: string;
|
|
104
|
+
country?: string;
|
|
105
|
+
countryCode: string;
|
|
106
|
+
zip?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface CampaignInfo {
|
|
109
|
+
name?: string;
|
|
110
|
+
source?: string;
|
|
111
|
+
medium?: string;
|
|
112
|
+
term?: string;
|
|
113
|
+
content?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface PageInfo {
|
|
116
|
+
path?: string;
|
|
117
|
+
referrer?: string;
|
|
118
|
+
search?: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
url?: string;
|
|
121
|
+
qsp?: any;
|
|
122
|
+
}
|
|
123
|
+
export declare type DeviceInfo = IResult;
|
|
124
|
+
export declare const Currencies: string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Currencies = void 0;
|
|
4
|
+
exports.Currencies = ['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'];
|
|
5
|
+
//# sourceMappingURL=tracking-event-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracking-event-type.js","sourceRoot":"","sources":["../../src/types/tracking-event-type.ts"],"names":[],"mappings":";;;AAwIa,QAAA,UAAU,GAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC"}
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*eslint-disable */
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
globals: {
|
|
5
|
+
'window': {},
|
|
6
|
+
'document': {},
|
|
7
|
+
'navigator': {},
|
|
8
|
+
'ts-jest': {
|
|
9
|
+
babelConfig: true,
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
roots: ['<rootDir>/src'],
|
|
13
|
+
testRegex: '\\.spec\\.(js|ts)$',
|
|
14
|
+
transform: {
|
|
15
|
+
'^.+\\.(js|jsx|ts|tsx|mjs)$': 'babel-jest',
|
|
16
|
+
},
|
|
17
|
+
moduleFileExtensions: ['js', 'json', 'ts'],
|
|
18
|
+
runner: 'groups',
|
|
19
|
+
verbose: true,
|
|
20
|
+
coverageThreshold: {
|
|
21
|
+
global: {
|
|
22
|
+
branches: 0,
|
|
23
|
+
functions: 0,
|
|
24
|
+
lines: 0,
|
|
25
|
+
statements: 0
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
coverageReporters: ['html', 'text', 'text-summary', 'cobertura'],
|
|
29
|
+
reporters: ['default', 'jest-junit'],
|
|
30
|
+
collectCoverageFrom: [
|
|
31
|
+
'src/**/*.ts',
|
|
32
|
+
'!src/**/*.spec.js',
|
|
33
|
+
'src/**/*.js',
|
|
34
|
+
'!src/**/*.spec.ts',
|
|
35
|
+
'!src/**/tests/**'
|
|
36
|
+
],
|
|
37
|
+
setupFilesAfterEnv: [],
|
|
38
|
+
};
|
|
39
|
+
/*eslint-enable */
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adtrackify/at-tracking-event-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "",
|
|
5
|
-
"module": "./dist/index.js",
|
|
6
5
|
"main": "./dist/index.js",
|
|
7
6
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"modules": "esm",
|
|
9
7
|
"scripts": {
|
|
10
8
|
"clean": "rimraf dist",
|
|
11
|
-
"build": "
|
|
9
|
+
"build": "node ./node_modules/typescript/bin/tsc",
|
|
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",
|
|
12
13
|
"elint": "eslint --ignore-path .gitignore .",
|
|
13
14
|
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
14
15
|
"lint": "tslint -p tsconfig.json",
|
|
@@ -20,38 +21,39 @@
|
|
|
20
21
|
"verify": "npm run clean && npm run type-check && npm run lint:fix",
|
|
21
22
|
"version": "npm run format && git add -A src",
|
|
22
23
|
"postversion": "git push && git push --tags",
|
|
23
|
-
"push": "npm install && npm run build && npm publish",
|
|
24
|
-
"type-check": "tsc --noEmit"
|
|
25
|
-
"prepare": "husky install"
|
|
24
|
+
"push": "npm install && npm run build:dev && npm publish",
|
|
25
|
+
"type-check": "tsc --noEmit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
29
|
-
"@types/ua-parser-js": "^0.7.36"
|
|
28
|
+
"ua-parser-js": "^1.0.2"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@babel/cli": "^7.13.16",
|
|
33
|
-
"@babel/core": "^7.
|
|
32
|
+
"@babel/core": "^7.13.10",
|
|
34
33
|
"@babel/plugin-proposal-optional-chaining": "^7.13.8",
|
|
35
34
|
"@babel/plugin-transform-runtime": "^7.10.3",
|
|
36
35
|
"@babel/preset-env": "^7.16.8",
|
|
37
36
|
"@babel/preset-typescript": "^7.16.7",
|
|
38
37
|
"@babel/runtime-corejs3": "^7.13.17",
|
|
38
|
+
"@types/jest": "^27.4.1",
|
|
39
39
|
"@types/node": "^17.0.8",
|
|
40
|
-
"@
|
|
41
|
-
"@typescript-eslint/
|
|
40
|
+
"@types/ua-parser-js": "^0.7.36",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
42
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
42
43
|
"babel-eslint": "^10.1.0",
|
|
43
44
|
"babel-jest": "^26.6.3",
|
|
44
45
|
"babel-loader": "^8.2.2",
|
|
45
46
|
"babel-polyfill": "^6.26.0",
|
|
46
|
-
"core-js": "^3.
|
|
47
|
+
"core-js": "^3.21.1",
|
|
47
48
|
"cross-env": "^7.0.3",
|
|
48
49
|
"esbuild": "^0.14.54",
|
|
49
|
-
"eslint": "^8.
|
|
50
|
+
"eslint": "^8.14.0",
|
|
50
51
|
"eslint-config-standard": "^17.0.0",
|
|
52
|
+
"eslint-loader": "^4.0.2",
|
|
51
53
|
"eslint-plugin-babel": "^5.3.1",
|
|
52
54
|
"eslint-plugin-import": "^2.26.0",
|
|
53
|
-
"eslint-plugin-n": "^15.2.
|
|
54
|
-
"eslint-plugin-promise": "^6.0.
|
|
55
|
+
"eslint-plugin-n": "^15.2.0",
|
|
56
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
55
57
|
"eslint-webpack-plugin": "^3.1.1",
|
|
56
58
|
"glob": "^8.0.3",
|
|
57
59
|
"husky": "^6.0.0",
|
|
@@ -59,13 +61,12 @@
|
|
|
59
61
|
"jest-cucumber": "3.0.1",
|
|
60
62
|
"jest-junit": "13.0.0",
|
|
61
63
|
"jest-runner-groups": "2.1.0",
|
|
62
|
-
"npm-dts": "^1.3.12",
|
|
63
64
|
"npm-run-all": "^4.1.5",
|
|
64
65
|
"npm-scripts-info": "^0.3.9",
|
|
66
|
+
"prettier": "^2.2.1",
|
|
65
67
|
"regenerator-runtime": "^0.13.9",
|
|
66
68
|
"rimraf": "^3.0.2",
|
|
67
|
-
"typescript": "4.7.4"
|
|
68
|
-
"ua-parser-js": "^1.0.2"
|
|
69
|
+
"typescript": "^4.7.4"
|
|
69
70
|
},
|
|
70
71
|
"repository": {
|
|
71
72
|
"type": "git",
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
|
|
11
|
+
|
|
12
|
+
export interface AdTrackifyFacebookDestination extends AdTrackifyDestination {
|
|
13
|
+
configuration: {
|
|
14
|
+
apiAccessToken: string;
|
|
15
|
+
enableConversionAPI: boolean;
|
|
16
|
+
pixelId: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum ADTRACKIFY_DESTINATIONS {
|
|
21
|
+
FACEBOOK = 'facebook',
|
|
22
|
+
GOOGLE_ANALYTICS_4 = 'googleAnalytics4'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface FacebookPixelConfiguration {
|
|
26
|
+
apiAccessToken?: string;
|
|
27
|
+
enableConversionAPI: boolean;
|
|
28
|
+
pixelId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface GoogleAnalytics4Configuration {
|
|
32
|
+
measurementId: string;
|
|
33
|
+
}
|
package/src/types/api/index.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export * from './
|
|
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';
|
|
1
|
+
export * from './destination';
|
|
@@ -1,10 +1,9 @@
|
|
|
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
|
|
9
|
-
excludeEvent?: boolean;
|
|
8
|
+
destinationEventName: string;
|
|
10
9
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { IResult } from 'ua-parser-js';
|
|
2
|
-
import { ADTRACKIFY_STANDARD_EVENT } from './adtrackify-standard-events';
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
export interface TrackingEvent {
|
|
6
5
|
id: string;
|
|
7
6
|
type: string;
|
|
8
|
-
name:
|
|
7
|
+
name: string;
|
|
9
8
|
pixelId: string;
|
|
10
9
|
context: TrackingEventContext;
|
|
11
10
|
data: TrackingEventData;
|
|
@@ -26,14 +25,9 @@ export interface TrackingEventContext {
|
|
|
26
25
|
userAgent?: string;
|
|
27
26
|
ipAddress?: string;
|
|
28
27
|
ipv6Address?: string;
|
|
29
|
-
sessionId?: string;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
export interface TrackingEventIdentity {
|
|
33
|
-
[ key: string ]: any;
|
|
34
|
-
identityId?: string;
|
|
35
|
-
anonymousId?: string;
|
|
36
|
-
userId?: string;
|
|
37
31
|
gender?: string;
|
|
38
32
|
dob?: string;
|
|
39
33
|
phone?: string;
|
|
@@ -53,7 +47,7 @@ export interface AdClickInfo {
|
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
export interface TrackingEventData {
|
|
56
|
-
[
|
|
50
|
+
[key: string]: any;
|
|
57
51
|
firstName?: string;
|
|
58
52
|
lastName?: string;
|
|
59
53
|
email?: string;
|
|
@@ -80,7 +74,7 @@ export interface TrackingEventData {
|
|
|
80
74
|
}
|
|
81
75
|
|
|
82
76
|
export interface GenericContent {
|
|
83
|
-
[
|
|
77
|
+
[key: string]: any;
|
|
84
78
|
content_type?: string;
|
|
85
79
|
id?: string;
|
|
86
80
|
name?: string;
|
|
@@ -114,9 +108,9 @@ export interface AddressInfo {
|
|
|
114
108
|
address2?: string;
|
|
115
109
|
city?: string;
|
|
116
110
|
province?: string;
|
|
117
|
-
provinceCode
|
|
111
|
+
provinceCode: string;
|
|
118
112
|
country?: string;
|
|
119
|
-
countryCode
|
|
113
|
+
countryCode: string;
|
|
120
114
|
zip?: string;
|
|
121
115
|
}
|
|
122
116
|
|
|
@@ -137,8 +131,8 @@ export interface PageInfo {
|
|
|
137
131
|
qsp?: any;
|
|
138
132
|
}
|
|
139
133
|
|
|
140
|
-
export type DeviceInfo = IResult
|
|
134
|
+
export type DeviceInfo = IResult
|
|
141
135
|
|
|
142
136
|
|
|
143
|
-
export const Currencies: string[] = [
|
|
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'];
|
|
144
138
|
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
4
|
-
"module": "
|
|
5
|
-
"
|
|
3
|
+
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
|
4
|
+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
|
5
|
+
"lib": [
|
|
6
|
+
"ESNext"
|
|
7
|
+
],
|
|
8
|
+
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
6
9
|
"checkJs": false /* Report errors in .js files. */,
|
|
7
10
|
"outDir": "dist", /* Redirect output to the directory. */
|
|
8
11
|
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
|
@@ -14,7 +17,7 @@
|
|
|
14
17
|
"experimentalDecorators": true,
|
|
15
18
|
"sourceMap": true,
|
|
16
19
|
"declaration": true,
|
|
17
|
-
"moduleResolution": "
|
|
20
|
+
"moduleResolution": "node",
|
|
18
21
|
"resolveJsonModule": true,
|
|
19
22
|
"isolatedModules": true,
|
|
20
23
|
"removeComments": true,
|
package/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# at-tracking-event-types
|
|
2
|
-
|
|
3
|
-
- Type library for tracking events and related types
|
|
4
|
-
|
|
5
|
-
# build instructions
|
|
6
|
-
|
|
7
|
-
1. make changes to type
|
|
8
|
-
2. to build your changes:
|
|
9
|
-
- npm run build
|
|
10
|
-
3. bump package.json version to update package
|
|
11
|
-
4. package will automatically deploy when push to master
|
|
12
|
-
5. to deploy from command line, run:
|
|
13
|
-
- npm run publish
|
package/src/types/api/account.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|