@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.
Files changed (44) hide show
  1. package/.husky/pre-push +1 -1
  2. package/README.md +13 -0
  3. package/bitbucket-pipelines.yml +2 -2
  4. package/build.js +9 -4
  5. package/dist/index.d.ts +500 -1
  6. package/dist/index.js +2 -18
  7. package/dist/index.js.map +7 -1
  8. package/package.json +20 -21
  9. package/src/types/api/account.ts +31 -0
  10. package/src/types/api/destinations/destination-catalog.ts +24 -0
  11. package/src/types/api/destinations/destinations.ts +66 -0
  12. package/src/types/api/destinations/third-party-destination-configs.ts +60 -0
  13. package/src/types/api/index.ts +7 -1
  14. package/src/types/api/shopify-app-install.ts +50 -0
  15. package/src/types/api/subscription.ts +65 -0
  16. package/src/types/api/user.ts +14 -0
  17. package/src/types/index.ts +3 -1
  18. package/src/types/third-party-event-configuration-types.ts +3 -2
  19. package/src/types/tracking-event-type.ts +13 -7
  20. package/tsconfig.json +4 -7
  21. package/dist/types/adtrackify-event-bus-event.d.ts +0 -13
  22. package/dist/types/adtrackify-event-bus-event.js +0 -3
  23. package/dist/types/adtrackify-event-bus-event.js.map +0 -1
  24. package/dist/types/adtrackify-standard-events.d.ts +0 -18
  25. package/dist/types/adtrackify-standard-events.js +0 -23
  26. package/dist/types/adtrackify-standard-events.js.map +0 -1
  27. package/dist/types/api/destination.d.ts +0 -28
  28. package/dist/types/api/destination.js +0 -9
  29. package/dist/types/api/destination.js.map +0 -1
  30. package/dist/types/api/index.d.ts +0 -1
  31. package/dist/types/api/index.js +0 -18
  32. package/dist/types/api/index.js.map +0 -1
  33. package/dist/types/index.d.ts +0 -3
  34. package/dist/types/index.js +0 -20
  35. package/dist/types/index.js.map +0 -1
  36. package/dist/types/third-party-event-configuration-types.d.ts +0 -8
  37. package/dist/types/third-party-event-configuration-types.js +0 -3
  38. package/dist/types/third-party-event-configuration-types.js.map +0 -1
  39. package/dist/types/tracking-event-type.d.ts +0 -124
  40. package/dist/types/tracking-event-type.js +0 -5
  41. package/dist/types/tracking-event-type.js.map +0 -1
  42. package/jest.config.js +0 -39
  43. package/prettier.config.js +0 -9
  44. package/src/types/api/destination.ts +0 -33
@@ -1,18 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
@@ -1,3 +0,0 @@
1
- export * from './adtrackify-standard-events';
2
- export * from './third-party-event-configuration-types';
3
- export * from './tracking-event-type';
@@ -1,20 +0,0 @@
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
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,0EAAwD;AACxD,wDAAsC"}
@@ -1,8 +0,0 @@
1
- export interface DestinationConfiguration {
2
- eventConfigurations: DestinationEventSpecificConfiguration[];
3
- }
4
- export interface DestinationEventSpecificConfiguration {
5
- enabled: boolean;
6
- sourceEventName: string;
7
- destinationEventName: string;
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=third-party-event-configuration-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"third-party-event-configuration-types.js","sourceRoot":"","sources":["../../src/types/third-party-event-configuration-types.ts"],"names":[],"mappings":""}
@@ -1,124 +0,0 @@
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[];
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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 DELETED
@@ -1,39 +0,0 @@
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 */
@@ -1,9 +0,0 @@
1
- /*eslint-disable */
2
-
3
- module.exports = {
4
- trailingComma: 'es5',
5
- tabWidth: 2,
6
- semi: false,
7
- singleQuote: true,
8
- };
9
- /*eslint-enable */
@@ -1,33 +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
-
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
- }