@adtrackify/at-tracking-event-types 1.0.5-8.1 → 1.0.5

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/bitbucket-pipelines.yml +2 -2
  3. package/build.js +4 -9
  4. package/dist/index.d.ts +1 -500
  5. package/dist/index.js +18 -2
  6. package/dist/index.js.map +1 -7
  7. package/dist/types/adtrackify-event-bus-event.d.ts +13 -0
  8. package/dist/types/adtrackify-event-bus-event.js +3 -0
  9. package/dist/types/adtrackify-event-bus-event.js.map +1 -0
  10. package/dist/types/adtrackify-standard-events.d.ts +18 -0
  11. package/dist/types/adtrackify-standard-events.js +23 -0
  12. package/dist/types/adtrackify-standard-events.js.map +1 -0
  13. package/dist/types/api/destination.d.ts +28 -0
  14. package/dist/types/api/destination.js +9 -0
  15. package/dist/types/api/destination.js.map +1 -0
  16. package/dist/types/api/index.d.ts +1 -0
  17. package/dist/types/api/index.js +18 -0
  18. package/dist/types/api/index.js.map +1 -0
  19. package/dist/types/index.d.ts +4 -0
  20. package/dist/types/index.js +21 -0
  21. package/dist/types/index.js.map +1 -0
  22. package/dist/types/third-party-event-configuration-types.d.ts +8 -0
  23. package/dist/types/third-party-event-configuration-types.js +3 -0
  24. package/dist/types/third-party-event-configuration-types.js.map +1 -0
  25. package/dist/types/tracking-event-type.d.ts +124 -0
  26. package/dist/types/tracking-event-type.js +5 -0
  27. package/dist/types/tracking-event-type.js.map +1 -0
  28. package/jest.config.js +39 -0
  29. package/package.json +20 -19
  30. package/prettier.config.js +9 -0
  31. package/src/types/api/destination.ts +33 -0
  32. package/src/types/api/index.ts +1 -7
  33. package/src/types/index.ts +0 -1
  34. package/src/types/third-party-event-configuration-types.ts +2 -3
  35. package/src/types/tracking-event-type.ts +7 -13
  36. package/tsconfig.json +7 -4
  37. package/README.md +0 -13
  38. package/src/types/api/account.ts +0 -31
  39. package/src/types/api/destinations/destination-catalog.ts +0 -24
  40. package/src/types/api/destinations/destinations.ts +0 -66
  41. package/src/types/api/destinations/third-party-destination-configs.ts +0 -60
  42. package/src/types/api/shopify-app-install.ts +0 -50
  43. package/src/types/api/subscription.ts +0 -65
  44. package/src/types/api/user.ts +0 -14
package/.husky/pre-push CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/bin/sh
2
2
  . "$(dirname "$0")/_/husky.sh"
3
3
 
4
- npm run build
4
+ npm run build:dev
@@ -1,4 +1,4 @@
1
- image: node:16.18.0
1
+ image: node:14.13.0
2
2
 
3
3
  pipelines:
4
4
  default:
@@ -8,7 +8,7 @@ pipelines:
8
8
  script:
9
9
  - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
10
10
  - npm install
11
- - npm run build
11
+ - npm run build:dev
12
12
  branches:
13
13
  master:
14
14
  - step:
package/build.js CHANGED
@@ -11,17 +11,12 @@ new Generator({
11
11
  output: 'dist/index.d.ts',
12
12
  }).generate()
13
13
 
14
-
15
- const shared = {
16
- }
17
-
18
14
  build({
19
15
  entryPoints: ['./src/index.ts'],
20
- external: [...Object.keys(dependencies)],
16
+ outdir: 'dist',
21
17
  bundle: true,
22
- minify: true,
23
18
  format: 'esm',
19
+ platform: 'node',
24
20
  sourcemap: 'linked',
25
- outdir: 'dist'
26
- })
27
-
21
+ external: Object.keys(dependencies)
22
+ })
package/dist/index.d.ts CHANGED
@@ -1,500 +1 @@
1
- declare module '@adtrackify/at-tracking-event-types/index' {
2
- export * from '@adtrackify/at-tracking-event-types/types/index';
3
-
4
- }
5
- declare module '@adtrackify/at-tracking-event-types/types/adtrackify-event-bus-event' {
6
- import { TrackingEvent } from '@adtrackify/at-tracking-event-types/types/tracking-event-type';
7
- export interface AdtrackifyEventBusEvent {
8
- eventId: string;
9
- eventType: string;
10
- eventTime: string;
11
- eventData?: object;
12
- }
13
- export interface AdtrackifyEventBusTrackingEvent extends AdtrackifyEventBusEvent {
14
- eventData: {
15
- trackingEvent: TrackingEvent;
16
- pixelId: string;
17
- };
18
- }
19
-
20
- }
21
- declare module '@adtrackify/at-tracking-event-types/types/adtrackify-standard-events' {
22
- export enum ADTRACKIFY_STANDARD_EVENT {
23
- ADD_PAYMENT_INFO = "add_payment_info",
24
- ADD_SHIPPING_INFO = "add_shipping_info",
25
- ADD_TO_CART = "add_to_cart",
26
- ADD_TO_WISHLIST = "add_to_wishlist",
27
- INITIATE_CHECKOUT = "initiate_checkout",
28
- LEAD = "lead",
29
- LOGIN = "login",
30
- PAGE_VIEW = "page_view",
31
- PURCHASE = "purchase",
32
- REFUND = "refund",
33
- SEARCH = "search",
34
- SIGN_UP = "sign_up",
35
- VIEW_CART = "view_cart",
36
- VIEW_CONTENT = "view_content",
37
- SELECT_SHIPPING_METHOD = "select_shipping_method",
38
- VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form"
39
- }
40
-
41
- }
42
- declare module '@adtrackify/at-tracking-event-types/types/api/account' {
43
- import { Subscription } from '@adtrackify/at-tracking-event-types/types/api/subscription';
44
- export interface Account {
45
- id: string;
46
- accountName: string;
47
- companyName?: string;
48
- accountStatus: ACCOUNT_STATUS;
49
- primaryEmail: string;
50
- publicApiKey?: string;
51
- subscriptionId?: string;
52
- pixels?: Pixel[];
53
- subscription?: Subscription;
54
- ownerId?: string;
55
- createdAt: string;
56
- updatedAt: string;
57
- }
58
- export interface Pixel {
59
- id: string;
60
- accountId: string;
61
- name: string;
62
- createdAt: string;
63
- updatedAt: string;
64
- }
65
- export enum ACCOUNT_STATUS {
66
- PENDING = "pending",
67
- ACTIVE = "active",
68
- INACTIVE = "inactive"
69
- }
70
-
71
- }
72
- declare module '@adtrackify/at-tracking-event-types/types/api/destinations/destination-catalog' {
73
- export interface DestinationCatalogItem {
74
- id: string;
75
- active: boolean;
76
- destinationKey: string;
77
- destinationType: string;
78
- displayName?: string;
79
- shortName?: string;
80
- description?: string;
81
- url: string;
82
- fields?: DestinationCatalogFields[];
83
- createdAt: string;
84
- updatedAt: string;
85
- }
86
- export interface DestinationCatalogFields {
87
- component_type: string;
88
- name: string;
89
- description: string;
90
- label: string;
91
- type: string;
92
- required: boolean;
93
- values?: any[];
94
- order: number;
95
- }
96
-
97
- }
98
- declare module '@adtrackify/at-tracking-event-types/types/api/destinations/destinations' {
99
- export interface Destination {
100
- id: string;
101
- accountId: string;
102
- pixelId: string;
103
- destination: string;
104
- displayName?: string;
105
- enabled: boolean;
106
- configuration?: UserDestinationConfiguration;
107
- createdAt: string;
108
- updatedAt: string;
109
- }
110
- export enum DESTINATIONS {
111
- FACEBOOK = "facebook",
112
- TIKTOK = "tiktok",
113
- GOOGLE_ADS = "googleAds",
114
- GOOGLE_ANALYTICS_4 = "googleAnalytics4",
115
- HUBSPOT = "hubspot",
116
- WEBHOOK = "webhook",
117
- CUSTOM_HTML = "customHTML",
118
- CUSTOM_JS = "customJS",
119
- SNAPCHAT = "snapchat",
120
- TWITTER = "twitter",
121
- REDDIT = "reddit"
122
- }
123
- export interface UserDestinationConfiguration {
124
- [key: string]: any;
125
- eventBlacklist?: string[];
126
- events?: EventConfiguration[];
127
- trigger?: DestinationTriggerConfiguration;
128
- }
129
- export interface DestinationTriggerConfiguration {
130
- shopify?: ShopifyTriggerConfiguration;
131
- exludeDomains?: string[];
132
- excludePages?: string[];
133
- domains?: string[];
134
- pages?: string[];
135
- }
136
- export interface ShopifyTriggerConfiguration {
137
- enabled: boolean;
138
- collections?: string[];
139
- tags?: string[];
140
- }
141
- export interface EventConfiguration {
142
- sourceEventName: string;
143
- exclude?: boolean;
144
- sample: EventSampleConfiguration;
145
- transformations?: EventTransformation[];
146
- }
147
- export interface EventTransformation {
148
- transformationEventName: string;
149
- enabled: boolean;
150
- }
151
- export interface EventSampleConfiguration {
152
- enabled: boolean;
153
- rate: number;
154
- }
155
-
156
- }
157
- declare module '@adtrackify/at-tracking-event-types/types/api/destinations/third-party-destination-configs' {
158
- import { Destination, UserDestinationConfiguration } from '@adtrackify/at-tracking-event-types/types/api/destinations/destinations';
159
- export interface AdTrackifyFacebookDestination extends Destination {
160
- configuration: FacebookPixelConfiguration;
161
- }
162
- export interface FacebookPixelConfiguration extends UserDestinationConfiguration {
163
- apiAccessToken?: string;
164
- enableConversionAPI: boolean;
165
- pixelId: string;
166
- }
167
- export interface TiktokPixelConfiguration {
168
- pixelId: string;
169
- }
170
- export interface GoogleAnalytics4Configuration {
171
- measurementId: string;
172
- }
173
- export interface GoogleAdsConfiguration {
174
- pixelId: string;
175
- conversionID: string;
176
- }
177
- export interface HubspotPixelConfiguration {
178
- hubspotId: string;
179
- }
180
- export interface SnapchatPixelConfiguration {
181
- snapchatPixelId: string;
182
- }
183
- export interface TwitterPixelConfiguration {
184
- twitterPixelId: string;
185
- }
186
- export interface WebhookConfiguration {
187
- webhookUrl: string;
188
- }
189
- export interface CustomHTMLConfiguration {
190
- html: string;
191
- location: CustomHTMLLocation;
192
- }
193
- export interface CustomJSConfiguration {
194
- script: string;
195
- async: boolean;
196
- defer: boolean;
197
- location: CustomHTMLLocation;
198
- }
199
- export enum CustomHTMLLocation {
200
- HEADER = "header",
201
- FOOTER = "footer",
202
- BODY = "body"
203
- }
204
-
205
- }
206
- declare module '@adtrackify/at-tracking-event-types/types/api/index' {
207
- export * from '@adtrackify/at-tracking-event-types/types/api/account';
208
- export * from '@adtrackify/at-tracking-event-types/types/api/destinations/destinations';
209
- export * from '@adtrackify/at-tracking-event-types/types/api/destinations/destination-catalog';
210
- export * from '@adtrackify/at-tracking-event-types/types/api/destinations/third-party-destination-configs';
211
- export * from '@adtrackify/at-tracking-event-types/types/api/shopify-app-install';
212
- export * from '@adtrackify/at-tracking-event-types/types/api/subscription';
213
- export * from '@adtrackify/at-tracking-event-types/types/api/user';
214
-
215
- }
216
- declare module '@adtrackify/at-tracking-event-types/types/api/shopify-app-install' {
217
- export interface ShopifyAppInstall {
218
- shopifyAppInstallId: string;
219
- shop: string;
220
- accessToken?: string;
221
- appStatus?: string;
222
- appSubscriptionStatus?: ShopifyAppSubscriptionStatus;
223
- code?: string;
224
- hmac?: string;
225
- host?: string;
226
- installRequest?: ShopifyInstallRequest;
227
- isAppEnabled?: boolean;
228
- pixelId?: string;
229
- shopInfo?: any;
230
- state?: string;
231
- timestamp?: number;
232
- createdAt: string;
233
- updatedAt: string;
234
- }
235
- export enum ShopifyAppInstallStatus {
236
- STARTED = "started",
237
- COMPLETED = "completed",
238
- UNINSTALLED = "uninstalled",
239
- FAILED = "failed",
240
- NONE = "none"
241
- }
242
- export enum ShopifyAppSubscriptionStatus {
243
- ACTIVE = "active",
244
- CANCELLED = "cancelled",
245
- DECLINED = "declined",
246
- EXPIRED = "expired",
247
- FROZEN = "frozen",
248
- PENDING = "pending",
249
- NOT_SUBMITTED = "na"
250
- }
251
- export interface ShopifyInstallRequest {
252
- shop?: string;
253
- session?: string;
254
- hmac?: string;
255
- host?: string;
256
- nonce?: string;
257
- timestamp?: string;
258
- status?: string;
259
- }
260
- export interface ShopifyStoreInfo {
261
- [key: string]: any;
262
- }
263
-
264
- }
265
- declare module '@adtrackify/at-tracking-event-types/types/api/subscription' {
266
- export interface Subscription {
267
- id: string;
268
- accountId?: string;
269
- shopifyAppInstallId?: string;
270
- shopifyDomain?: string;
271
- stripeCustomerId?: string;
272
- stripeSubscriptionId?: string;
273
- stripeCompletedCheckoutSession?: any;
274
- shopifyChargeId?: string;
275
- subscriptionPlan?: SubscriptionPlan;
276
- status?: SUBSCRIPTION_STATUS;
277
- paymentStatus?: PAYMENT_STATUS;
278
- paymentGateway?: PAYMENT_GATEWAY;
279
- createdAt: string;
280
- updatedAt: string;
281
- }
282
- export interface SubscriptionPlan {
283
- id: number;
284
- planName: string;
285
- displayName: string;
286
- description: string;
287
- sku: string;
288
- price: string;
289
- displayPrice: string;
290
- billingFrequency: PLAN_BILLING_FREQUENCY;
291
- trialLengthDays?: number;
292
- trialRequiresCreditCard?: boolean;
293
- planDesc?: string[];
294
- unitPriceText?: string;
295
- isHighlighted?: boolean;
296
- isBanner?: boolean;
297
- bannerText?: string;
298
- bannerColor?: string;
299
- stripePriceId?: string;
300
- stripeProductId?: string;
301
- }
302
- export enum PLAN_BILLING_FREQUENCY {
303
- MONTHLY = "monthly",
304
- YEARLY = "yearly"
305
- }
306
- export enum PAYMENT_STATUS {
307
- CURRENT = "current",
308
- PAST_DUE = "past_due",
309
- CANCELLED = "cancelled",
310
- FAILED = "failed"
311
- }
312
- export enum SUBSCRIPTION_STATUS {
313
- ACTIVE = "active",
314
- CANCELLED = "cancelled",
315
- DECLINED = "declined",
316
- EXPIRED = "expired",
317
- FROZEN = "frozen",
318
- PENDING = "pending",
319
- NOT_SUBMITTED = "na"
320
- }
321
- export enum PAYMENT_GATEWAY {
322
- STRIPE = "stripe",
323
- PAYPAL = "paypal",
324
- SHOPIFY = "shopify"
325
- }
326
-
327
- }
328
- declare module '@adtrackify/at-tracking-event-types/types/api/user' {
329
- export interface User {
330
- id: string;
331
- sub: string;
332
- userId: string;
333
- Username: string;
334
- UserLastModifiedDate: string;
335
- Enabled: boolean;
336
- UserStatus: string;
337
- email: string;
338
- email_verified: string;
339
- name: string;
340
- family_name: string;
341
- }
342
-
343
- }
344
- declare module '@adtrackify/at-tracking-event-types/types/index' {
345
- export * from '@adtrackify/at-tracking-event-types/types/adtrackify-standard-events';
346
- export * from '@adtrackify/at-tracking-event-types/types/third-party-event-configuration-types';
347
- export * from '@adtrackify/at-tracking-event-types/types/tracking-event-type';
348
- export * from '@adtrackify/at-tracking-event-types/types/adtrackify-event-bus-event';
349
- export * from '@adtrackify/at-tracking-event-types/types/api/index';
350
-
351
- }
352
- declare module '@adtrackify/at-tracking-event-types/types/third-party-event-configuration-types' {
353
- export interface DestinationConfiguration {
354
- eventConfigurations: DestinationEventSpecificConfiguration[];
355
- }
356
- export interface DestinationEventSpecificConfiguration {
357
- enabled: boolean;
358
- sourceEventName: string;
359
- destinationEventName?: string;
360
- excludeEvent?: boolean;
361
- }
362
-
363
- }
364
- declare module '@adtrackify/at-tracking-event-types/types/tracking-event-type' {
365
- import { IResult } from 'ua-parser-js';
366
- import { ADTRACKIFY_STANDARD_EVENT } from '@adtrackify/at-tracking-event-types/types/adtrackify-standard-events';
367
- export interface TrackingEvent {
368
- id: string;
369
- type: string;
370
- name: ADTRACKIFY_STANDARD_EVENT;
371
- pixelId: string;
372
- context: TrackingEventContext;
373
- data: TrackingEventData;
374
- testCode?: string;
375
- sentAtEpoch?: number;
376
- collectedAt?: string;
377
- version: string;
378
- }
379
- export interface TrackingEventContext {
380
- identity: TrackingEventIdentity;
381
- click?: AdClickInfo;
382
- campaign?: CampaignInfo;
383
- page?: PageInfo;
384
- device?: DeviceInfo;
385
- locale?: string;
386
- timezone?: string;
387
- userAgent?: string;
388
- ipAddress?: string;
389
- ipv6Address?: string;
390
- sessionId?: string;
391
- }
392
- export interface TrackingEventIdentity {
393
- [key: string]: any;
394
- identityId?: string;
395
- anonymousId?: string;
396
- userId?: string;
397
- gender?: string;
398
- dob?: string;
399
- phone?: string;
400
- id?: string;
401
- firstName?: string;
402
- lastName?: string;
403
- email?: string;
404
- address?: AddressInfo;
405
- addresses?: AddressInfo[];
406
- }
407
- export interface AdClickInfo {
408
- fbp?: string;
409
- fbc?: string;
410
- fbclid?: string;
411
- gclid?: string;
412
- }
413
- export interface TrackingEventData {
414
- [key: string]: any;
415
- firstName?: string;
416
- lastName?: string;
417
- email?: string;
418
- phone?: string;
419
- addresses?: AddressInfo[];
420
- cartId?: string;
421
- transactionId?: string;
422
- affiliation?: string;
423
- currency?: string;
424
- price?: number;
425
- subtotalPrice?: number;
426
- value?: number;
427
- tax?: number;
428
- shipping?: number;
429
- coupon?: string;
430
- paymentType?: string;
431
- shippingTier?: string;
432
- creativeName?: string;
433
- creativeSlot?: string;
434
- locationId?: string;
435
- promotionId?: string;
436
- promotionName?: string;
437
- items?: GenericContent[];
438
- }
439
- export interface GenericContent {
440
- [key: string]: any;
441
- content_type?: string;
442
- id?: string;
443
- name?: string;
444
- sku?: string;
445
- brand?: string;
446
- variant?: string;
447
- coupon?: string;
448
- currency?: string;
449
- discount?: number;
450
- index?: number;
451
- value?: number;
452
- price?: number;
453
- quantity?: number;
454
- url?: string;
455
- locationId?: string;
456
- imageUrl?: string;
457
- category?: string;
458
- category2?: string;
459
- category3?: string;
460
- category4?: string;
461
- category5?: string;
462
- }
463
- export interface AddressInfo {
464
- email?: string;
465
- phone?: string;
466
- firstName?: string;
467
- lastName?: string;
468
- company?: string;
469
- address1?: string;
470
- address2?: string;
471
- city?: string;
472
- province?: string;
473
- provinceCode?: string;
474
- country?: string;
475
- countryCode?: string;
476
- zip?: string;
477
- }
478
- export interface CampaignInfo {
479
- name?: string;
480
- source?: string;
481
- medium?: string;
482
- term?: string;
483
- content?: string;
484
- }
485
- export interface PageInfo {
486
- path?: string;
487
- referrer?: string;
488
- search?: string;
489
- title?: string;
490
- url?: string;
491
- qsp?: any;
492
- }
493
- export type DeviceInfo = IResult;
494
- export const Currencies: string[];
495
-
496
- }
497
- declare module '@adtrackify/at-tracking-event-types' {
498
- import main = require('@adtrackify/at-tracking-event-types/src/index');
499
- export = main;
500
- }
1
+ export * from './types';
package/dist/index.js CHANGED
@@ -1,2 +1,18 @@
1
- var a=(t=>(t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.INITIATE_CHECKOUT="initiate_checkout",t.LEAD="lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.SEARCH="search",t.SIGN_UP="sign_up",t.VIEW_CART="view_cart",t.VIEW_CONTENT="view_content",t.SELECT_SHIPPING_METHOD="select_shipping_method",t.VIRTUALIZED_VIEWED_PAYMENT_FORM="virtualized_viewd_payment_form",t))(a||{});var y=["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"];var g=(e=>(e.PENDING="pending",e.ACTIVE="active",e.INACTIVE="inactive",e))(g||{});var c=(i=>(i.FACEBOOK="facebook",i.TIKTOK="tiktok",i.GOOGLE_ADS="googleAds",i.GOOGLE_ANALYTICS_4="googleAnalytics4",i.HUBSPOT="hubspot",i.WEBHOOK="webhook",i.CUSTOM_HTML="customHTML",i.CUSTOM_JS="customJS",i.SNAPCHAT="snapchat",i.TWITTER="twitter",i.REDDIT="reddit",i))(c||{});var d=(e=>(e.HEADER="header",e.FOOTER="footer",e.BODY="body",e))(d||{});var p=(r=>(r.STARTED="started",r.COMPLETED="completed",r.UNINSTALLED="uninstalled",r.FAILED="failed",r.NONE="none",r))(p||{}),l=(n=>(n.ACTIVE="active",n.CANCELLED="cancelled",n.DECLINED="declined",n.EXPIRED="expired",n.FROZEN="frozen",n.PENDING="pending",n.NOT_SUBMITTED="na",n))(l||{});var m=(s=>(s.MONTHLY="monthly",s.YEARLY="yearly",s))(m||{}),f=(o=>(o.CURRENT="current",o.PAST_DUE="past_due",o.CANCELLED="cancelled",o.FAILED="failed",o))(f||{}),u=(n=>(n.ACTIVE="active",n.CANCELLED="cancelled",n.DECLINED="declined",n.EXPIRED="expired",n.FROZEN="frozen",n.PENDING="pending",n.NOT_SUBMITTED="na",n))(u||{}),x=(e=>(e.STRIPE="stripe",e.PAYPAL="paypal",e.SHOPIFY="shopify",e))(x||{});export{g as ACCOUNT_STATUS,a as ADTRACKIFY_STANDARD_EVENT,y as Currencies,d as CustomHTMLLocation,c as DESTINATIONS,x as PAYMENT_GATEWAY,f as PAYMENT_STATUS,m as PLAN_BILLING_FREQUENCY,u as SUBSCRIPTION_STATUS,p as ShopifyAppInstallStatus,l as ShopifyAppSubscriptionStatus};
2
- //# sourceMappingURL=index.js.map
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("./types"), exports);
18
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/types/adtrackify-standard-events.ts", "../src/types/tracking-event-type.ts", "../src/types/api/account.ts", "../src/types/api/destinations/destinations.ts", "../src/types/api/destinations/third-party-destination-configs.ts", "../src/types/api/shopify-app-install.ts", "../src/types/api/subscription.ts"],
4
- "sourcesContent": ["export enum ADTRACKIFY_STANDARD_EVENT {\n ADD_PAYMENT_INFO = 'add_payment_info',\n ADD_SHIPPING_INFO = 'add_shipping_info',\n ADD_TO_CART = 'add_to_cart',\n ADD_TO_WISHLIST = 'add_to_wishlist',\n // COMPLETE_REGISTRATION: 'complete_registration',\n // CONTACT: 'contact',\n INITIATE_CHECKOUT = 'initiate_checkout',\n LEAD = 'lead',\n LOGIN = 'login',\n PAGE_VIEW = 'page_view',\n PURCHASE = 'purchase',\n REFUND = 'refund',\n SEARCH = 'search',\n // START_TRIAL: 'start_trial',\n // SUBMIT_APPLICATION: 'submit_application',\n // SUBSCRIBE: 'subscribe',\n SIGN_UP = 'sign_up',\n VIEW_CART = 'view_cart',\n VIEW_CONTENT = 'view_content',\n\n\n //\n SELECT_SHIPPING_METHOD = 'select_shipping_method',\n VIRTUALIZED_VIEWED_PAYMENT_FORM = 'virtualized_viewd_payment_form'\n}", "import { IResult } from 'ua-parser-js';\nimport { ADTRACKIFY_STANDARD_EVENT } from './adtrackify-standard-events';\n\n\nexport interface TrackingEvent {\n id: string;\n type: string;\n name: ADTRACKIFY_STANDARD_EVENT;\n pixelId: string;\n context: TrackingEventContext;\n data: TrackingEventData;\n testCode?: string;\n sentAtEpoch?: number;\n collectedAt?: string;\n version: string;\n}\n\nexport interface TrackingEventContext {\n identity: TrackingEventIdentity;\n click?: AdClickInfo;\n campaign?: CampaignInfo;\n page?: PageInfo;\n device?: DeviceInfo;\n locale?: string;\n timezone?: string;\n userAgent?: string;\n ipAddress?: string;\n ipv6Address?: string;\n sessionId?: string;\n}\n\nexport interface TrackingEventIdentity {\n [ key: string ]: any;\n identityId?: string;\n anonymousId?: string;\n userId?: string;\n gender?: string;\n dob?: string;\n phone?: string;\n id?: string;\n firstName?: string;\n lastName?: string;\n email?: string;\n address?: AddressInfo;\n addresses?: AddressInfo[];\n}\n\nexport interface AdClickInfo {\n fbp?: string;\n fbc?: string;\n fbclid?: string;\n gclid?: string;\n}\n\nexport interface TrackingEventData {\n [ key: string ]: any;\n firstName?: string;\n lastName?: string;\n email?: string;\n phone?: string;\n addresses?: AddressInfo[];\n cartId?: string;\n transactionId?: string;\n affiliation?: string;\n currency?: string;\n price?: number;\n subtotalPrice?: number;\n value?: number;\n tax?: number;\n shipping?: number;\n coupon?: string;\n paymentType?: string;\n shippingTier?: string;\n creativeName?: string;\n creativeSlot?: string;\n locationId?: string;\n promotionId?: string;\n promotionName?: string;\n items?: GenericContent[];\n}\n\nexport interface GenericContent {\n [ key: string ]: any;\n content_type?: string;\n id?: string;\n name?: string;\n sku?: string;\n brand?: string;\n variant?: string;\n coupon?: string;\n currency?: string;\n discount?: number;\n index?: number;\n value?: number;\n price?: number;\n quantity?: number;\n url?: string;\n locationId?: string;\n imageUrl?: string;\n category?: string;\n category2?: string;\n category3?: string;\n category4?: string;\n category5?: string;\n}\n\nexport interface AddressInfo {\n email?: string;\n phone?: string;\n firstName?: string;\n lastName?: string;\n company?: string;\n address1?: string;\n address2?: string;\n city?: string;\n province?: string;\n provinceCode?: string;\n country?: string;\n countryCode?: string;\n zip?: string;\n}\n\nexport interface CampaignInfo {\n name?: string;\n source?: string;\n medium?: string;\n term?: string;\n content?: string;\n}\n\nexport interface PageInfo {\n path?: string;\n referrer?: string;\n search?: string;\n title?: string;\n url?: string;\n qsp?: any;\n}\n\nexport type DeviceInfo = IResult;\n\n\nexport 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' ];\n\n", "import { Subscription } from './subscription';\n\nexport interface Account {\n id: string,\n accountName: string,\n companyName?: string,\n accountStatus: ACCOUNT_STATUS,\n primaryEmail: string,\n publicApiKey?: string,\n subscriptionId?: string,\n pixels?: Pixel[],\n subscription?: Subscription;\n ownerId?: string,\n createdAt: string,\n updatedAt: string;\n}\n\n\nexport interface Pixel {\n id: string;\n accountId: string;\n name: string;\n createdAt: string,\n updatedAt: string;\n}\n\nexport enum ACCOUNT_STATUS {\n PENDING = 'pending',\n ACTIVE = 'active',\n INACTIVE = 'inactive'\n}", "\r\nexport interface Destination {\r\n id: string,\r\n accountId: string,\r\n pixelId: string,\r\n destination: string;\r\n displayName?: string,\r\n enabled: boolean;\r\n configuration?: UserDestinationConfiguration,\r\n createdAt: string,\r\n updatedAt: string;\r\n}\r\n\r\nexport enum DESTINATIONS {\r\n FACEBOOK = 'facebook',\r\n TIKTOK = 'tiktok',\r\n GOOGLE_ADS = 'googleAds',\r\n GOOGLE_ANALYTICS_4 = 'googleAnalytics4',\r\n HUBSPOT = 'hubspot',\r\n WEBHOOK = 'webhook',\r\n CUSTOM_HTML = 'customHTML',\r\n CUSTOM_JS = 'customJS',\r\n SNAPCHAT = 'snapchat',\r\n TWITTER = 'twitter',\r\n REDDIT = 'reddit'\r\n}\r\n\r\nexport interface UserDestinationConfiguration {\r\n [ key: string ]: any;\r\n eventBlacklist?: string[];\r\n events?: EventConfiguration[];\r\n trigger?: DestinationTriggerConfiguration;\r\n}\r\n\r\nexport interface DestinationTriggerConfiguration {\r\n shopify?: ShopifyTriggerConfiguration;\r\n exludeDomains?: string[];\r\n excludePages?: string[];\r\n domains?: string[];\r\n pages?: string[];\r\n}\r\n\r\nexport interface ShopifyTriggerConfiguration {\r\n enabled: boolean;\r\n collections?: string[];\r\n tags?: string[];\r\n}\r\n\r\n\r\nexport interface EventConfiguration {\r\n sourceEventName: string;\r\n exclude?: boolean;\r\n sample: EventSampleConfiguration;\r\n transformations?: EventTransformation[];\r\n}\r\n\r\nexport interface EventTransformation {\r\n transformationEventName: string;\r\n enabled: boolean;\r\n}\r\n\r\nexport interface EventSampleConfiguration {\r\n enabled: boolean;\r\n rate: number;\r\n}\r\n\r\n", "import { Destination, UserDestinationConfiguration } from './destinations';\n\nexport interface AdTrackifyFacebookDestination extends Destination {\n configuration: FacebookPixelConfiguration;\n}\n\n// Destination Specific configurations below\nexport interface FacebookPixelConfiguration extends UserDestinationConfiguration {\n apiAccessToken?: string;\n enableConversionAPI: boolean;\n pixelId: string;\n}\n\nexport interface TiktokPixelConfiguration {\n pixelId: string;\n}\n\nexport interface GoogleAnalytics4Configuration {\n measurementId: string;\n}\n\nexport interface GoogleAdsConfiguration {\n pixelId: string;\n conversionID: string;\n}\n\nexport interface HubspotPixelConfiguration {\n hubspotId: string;\n}\n\nexport interface SnapchatPixelConfiguration {\n snapchatPixelId: string;\n}\n\nexport interface TwitterPixelConfiguration {\n twitterPixelId: string;\n}\n\nexport interface WebhookConfiguration {\n webhookUrl: string;\n}\n\nexport interface CustomHTMLConfiguration {\n html: string;\n location: CustomHTMLLocation;\n}\n\nexport interface CustomJSConfiguration {\n script: string;\n async: boolean;\n defer: boolean;\n location: CustomHTMLLocation;\n}\n\nexport enum CustomHTMLLocation {\n HEADER = 'header',\n FOOTER = 'footer',\n BODY = 'body'\n}\n\n", "export interface ShopifyAppInstall {\n shopifyAppInstallId: string;\n shop: string;\n accessToken?: string;\n appStatus?: string;\n appSubscriptionStatus?: ShopifyAppSubscriptionStatus;\n code?: string;\n hmac?: string;\n host?: string;\n installRequest?: ShopifyInstallRequest;\n isAppEnabled?: boolean;\n pixelId?: string;\n shopInfo?: any;\n state?: string;\n timestamp?: number;\n createdAt: string;\n updatedAt: string;\n}\n\nexport enum ShopifyAppInstallStatus {\n STARTED = 'started',\n COMPLETED = 'completed',\n UNINSTALLED = 'uninstalled',\n FAILED = 'failed',\n NONE = 'none'\n}\nexport enum ShopifyAppSubscriptionStatus {\n ACTIVE = 'active', // approved and billed to shop\n CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation\n DECLINED = 'declined', // subscription declined by merchant\n EXPIRED = 'expired', //wasn't approved within two days of being created\n FROZEN = 'frozen', //on hold due to not payment\n PENDING = 'pending', // pending approval\n NOT_SUBMITTED = 'na' // billing has not yet been attempted\n}\n\nexport interface ShopifyInstallRequest {\n shop?: string;\n session?: string;\n hmac?: string;\n host?: string;\n nonce?: string;\n timestamp?: string;\n status?: string;\n}\n\nexport interface ShopifyStoreInfo {\n // TBD based on shopify api\n [ key: string ]: any;\n}", "\nexport interface Subscription {\n id: string,\n accountId?: string,\n shopifyAppInstallId?: string,\n shopifyDomain?: string,\n stripeCustomerId?: string,\n stripeSubscriptionId?: string,\n stripeCompletedCheckoutSession?: any;\n shopifyChargeId?: string;\n subscriptionPlan?: SubscriptionPlan,\n status?: SUBSCRIPTION_STATUS,\n paymentStatus?: PAYMENT_STATUS,\n paymentGateway?: PAYMENT_GATEWAY,\n createdAt: string,\n updatedAt: string,\n\n}\nexport interface SubscriptionPlan {\n id: number;\n planName: string;\n displayName: string;\n description: string;\n sku: string;\n price: string;\n displayPrice: string;\n billingFrequency: PLAN_BILLING_FREQUENCY;\n trialLengthDays?: number;\n trialRequiresCreditCard?: boolean;\n planDesc?: string[];\n unitPriceText?: string;\n isHighlighted?: boolean;\n isBanner?: boolean;\n bannerText?: string;\n bannerColor?: string;\n stripePriceId?: string;\n stripeProductId?: string;\n}\n\nexport enum PLAN_BILLING_FREQUENCY {\n MONTHLY = 'monthly',\n YEARLY = 'yearly'\n}\n\nexport enum PAYMENT_STATUS {\n CURRENT = 'current',\n PAST_DUE = 'past_due',\n CANCELLED = 'cancelled',\n FAILED = 'failed'\n}\n\nexport enum SUBSCRIPTION_STATUS {\n ACTIVE = 'active', // approved and billed to shop\n CANCELLED = 'cancelled', // cancelled, uninstalled or cancellation\n DECLINED = 'declined', // subscription declined by merchant\n EXPIRED = 'expired', //wasn't approved within two days of being created\n FROZEN = 'frozen', //on hold due to not payment\n PENDING = 'pending', // pending approval\n NOT_SUBMITTED = 'na' // billing has not yet been attempted\n}\nexport enum PAYMENT_GATEWAY {\n STRIPE = 'stripe',\n PAYPAL = 'paypal',\n SHOPIFY = 'shopify'\n}\n"],
5
- "mappings": "AAAO,IAAKA,OACVA,EAAA,iBAAmB,mBACnBA,EAAA,kBAAoB,oBACpBA,EAAA,YAAc,cACdA,EAAA,gBAAkB,kBAGlBA,EAAA,kBAAoB,oBACpBA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,OAAS,SAITA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,aAAe,eAIfA,EAAA,uBAAyB,yBACzBA,EAAA,gCAAkC,iCAxBxBA,OAAA,IC8IL,IAAMC,EAAuB,CAAE,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAM,ECpHpb,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,SAAW,WAHDA,OAAA,ICbL,IAAKC,OACVA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,WAAa,YACbA,EAAA,mBAAqB,mBACrBA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,YAAc,aACdA,EAAA,UAAY,WACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SAXCA,OAAA,ICyCL,IAAKC,OACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,KAAO,OAHGA,OAAA,ICnCL,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,KAAO,OALGA,OAAA,IAOAC,OACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,cAAgB,KAPNA,OAAA,ICaL,IAAKC,OACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFCA,OAAA,IAKAC,OACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,UAAY,YACZA,EAAA,OAAS,SAJCA,OAAA,IAOAC,OACVA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,cAAgB,KAPNA,OAAA,IASAC,OACVA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,QAAU,UAHAA,OAAA",
6
- "names": ["ADTRACKIFY_STANDARD_EVENT", "Currencies", "ACCOUNT_STATUS", "DESTINATIONS", "CustomHTMLLocation", "ShopifyAppInstallStatus", "ShopifyAppSubscriptionStatus", "PLAN_BILLING_FREQUENCY", "PAYMENT_STATUS", "SUBSCRIPTION_STATUS", "PAYMENT_GATEWAY"]
7
- }
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=adtrackify-event-bus-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adtrackify-event-bus-event.js","sourceRoot":"","sources":["../../src/types/adtrackify-event-bus-event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1,23 @@
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
@@ -0,0 +1 @@
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"}