@mparticle/web-sdk 2.80.0 → 2.81.0

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 (36) hide show
  1. package/dist/mparticle.common.js +75 -488
  2. package/dist/mparticle.esm.js +75 -488
  3. package/dist/mparticle.js +244 -673
  4. package/dist/types/src/configAPIClient.d.ts +1 -0
  5. package/dist/types/src/ecommerce.d.ts +3 -53
  6. package/dist/types/src/ecommerce.interfaces.d.ts +11 -12
  7. package/dist/types/src/events.interfaces.d.ts +1 -1
  8. package/dist/types/src/forwarders.d.ts +4 -26
  9. package/dist/types/src/forwarders.interfaces.d.ts +41 -10
  10. package/dist/types/src/identity-utils.d.ts +3 -3
  11. package/dist/types/src/identity.d.ts +3 -0
  12. package/dist/types/src/identity.interfaces.d.ts +45 -11
  13. package/dist/types/src/identityApiClient.d.ts +5 -4
  14. package/dist/types/src/mp-instance.d.ts +2 -2
  15. package/dist/types/src/persistence.interfaces.d.ts +2 -3
  16. package/dist/types/src/roktManager.d.ts +18 -0
  17. package/dist/types/src/sdkRuntimeModels.d.ts +2 -2
  18. package/dist/types/src/store.d.ts +4 -3
  19. package/package.json +1 -1
  20. package/src/configAPIClient.ts +1 -0
  21. package/src/ecommerce.interfaces.ts +12 -21
  22. package/src/{ecommerce.js → ecommerce.ts} +144 -73
  23. package/src/events.interfaces.ts +1 -1
  24. package/src/events.ts +1 -1
  25. package/src/forwarders.interfaces.ts +73 -10
  26. package/src/{forwarders.js → forwarders.ts} +214 -176
  27. package/src/helpers.ts +7 -3
  28. package/src/identity-utils.ts +2 -2
  29. package/src/identity.interfaces.ts +58 -14
  30. package/src/{identity.js → identity.ts} +237 -192
  31. package/src/identityApiClient.ts +9 -9
  32. package/src/mp-instance.ts +2 -2
  33. package/src/persistence.interfaces.ts +2 -3
  34. package/src/roktManager.ts +37 -0
  35. package/src/sdkRuntimeModels.ts +2 -1
  36. package/src/store.ts +4 -3
@@ -1,19 +1,40 @@
1
- import Types from './types';
1
+ import Types, { ProductActionType, PromotionActionType } from './types';
2
2
  import Constants from './constants';
3
- import { extend, parseNumber } from './utils';
4
-
5
- var Messages = Constants.Messages;
6
-
7
- export default function Ecommerce(mpInstance) {
8
- var self = this;
3
+ import { extend, parseNumber, valueof } from './utils';
4
+ import { IMParticleWebSDKInstance } from './mp-instance';
5
+ import { IECommerce } from './ecommerce.interfaces';
6
+ import {
7
+ SDKEvent,
8
+ SDKEventCustomFlags,
9
+ SDKImpression,
10
+ SDKProduct,
11
+ SDKProductAction,
12
+ SDKPromotion,
13
+ } from './sdkRuntimeModels';
14
+ import {
15
+ SDKEventAttrs,
16
+ SDKEventOptions,
17
+ TransactionAttributes,
18
+ } from '@mparticle/web-sdk';
19
+
20
+ const { Messages } = Constants;
21
+
22
+ export default function Ecommerce(
23
+ this: IECommerce,
24
+ mpInstance: IMParticleWebSDKInstance
25
+ ): void {
26
+ const self = this;
9
27
 
10
28
  // https://go.mparticle.com/work/SQDSDKS-4801
11
29
  this.convertTransactionAttributesToProductAction = function(
12
- transactionAttributes,
13
- productAction
14
- ) {
30
+ transactionAttributes: TransactionAttributes & {
31
+ Step?: number;
32
+ Option?: string;
33
+ },
34
+ productAction: SDKProductAction
35
+ ): void {
15
36
  if (transactionAttributes.hasOwnProperty('Id')) {
16
- productAction.TransactionId = transactionAttributes.Id;
37
+ productAction.TransactionId = transactionAttributes.Id as unknown as string;
17
38
  }
18
39
  if (transactionAttributes.hasOwnProperty('Affiliation')) {
19
40
  productAction.Affiliation = transactionAttributes.Affiliation;
@@ -51,7 +72,9 @@ export default function Ecommerce(mpInstance) {
51
72
  // transactionAttributes.Revenue, derive it from the product list
52
73
  // (quantity * price) plus shipping and tax. A total that the caller provided
53
74
  // (including 0) is never overwritten.
54
- this.calculateProductActionTotalAmount = function(productAction) {
75
+ this.calculateProductActionTotalAmount = function(
76
+ productAction: SDKProductAction
77
+ ): SDKProductAction {
55
78
  if (!productAction || productAction.TotalAmount != null) {
56
79
  return productAction;
57
80
  }
@@ -74,7 +97,9 @@ export default function Ecommerce(mpInstance) {
74
97
  return productAction;
75
98
  };
76
99
 
77
- this.getProductActionEventName = function(productActionType) {
100
+ this.getProductActionEventName = function(
101
+ productActionType: valueof<typeof ProductActionType>
102
+ ): string {
78
103
  switch (productActionType) {
79
104
  case Types.ProductActionType.AddToCart:
80
105
  return 'AddToCart';
@@ -118,7 +143,9 @@ export default function Ecommerce(mpInstance) {
118
143
  }
119
144
  };
120
145
 
121
- this.getPromotionActionEventName = function(promotionActionType) {
146
+ this.getPromotionActionEventName = function(
147
+ promotionActionType: valueof<typeof PromotionActionType>
148
+ ): string {
122
149
  switch (promotionActionType) {
123
150
  case Types.PromotionActionType.PromotionClick:
124
151
  return 'PromotionClick';
@@ -129,7 +156,9 @@ export default function Ecommerce(mpInstance) {
129
156
  }
130
157
  };
131
158
 
132
- this.convertProductActionToEventType = function(productActionType) {
159
+ this.convertProductActionToEventType = function(
160
+ productActionType: valueof<typeof ProductActionType>
161
+ ): number | null {
133
162
  switch (productActionType) {
134
163
  case Types.ProductActionType.AddToCart:
135
164
  return Types.CommerceEventType.ProductAddToCart;
@@ -178,7 +207,9 @@ export default function Ecommerce(mpInstance) {
178
207
  }
179
208
  };
180
209
 
181
- this.convertPromotionActionToEventType = function(promotionActionType) {
210
+ this.convertPromotionActionToEventType = function(
211
+ promotionActionType: valueof<typeof PromotionActionType>
212
+ ): number | null {
182
213
  switch (promotionActionType) {
183
214
  case Types.PromotionActionType.PromotionClick:
184
215
  return Types.CommerceEventType.PromotionClick;
@@ -194,14 +225,20 @@ export default function Ecommerce(mpInstance) {
194
225
  }
195
226
  };
196
227
 
197
- this.generateExpandedEcommerceName = function(eventName, plusOne) {
228
+ this.generateExpandedEcommerceName = function(
229
+ eventName: string,
230
+ plusOne?: boolean
231
+ ): string {
198
232
  return (
199
233
  'eCommerce - ' + eventName + ' - ' + (plusOne ? 'Total' : 'Item')
200
234
  );
201
235
  };
202
236
 
203
237
  // https://go.mparticle.com/work/SQDSDKS-4801
204
- this.extractProductAttributes = function(attributes, product) {
238
+ this.extractProductAttributes = function(
239
+ attributes: { [key: string]: any },
240
+ product: SDKProduct
241
+ ): void {
205
242
  if (product.CouponCode) {
206
243
  attributes['Coupon Code'] = product.CouponCode;
207
244
  }
@@ -233,14 +270,20 @@ export default function Ecommerce(mpInstance) {
233
270
  };
234
271
 
235
272
  // https://go.mparticle.com/work/SQDSDKS-4801
236
- this.extractTransactionId = function(attributes, productAction) {
273
+ this.extractTransactionId = function(
274
+ attributes: { [key: string]: any },
275
+ productAction: SDKProductAction
276
+ ): void {
237
277
  if (productAction.TransactionId) {
238
278
  attributes['Transaction Id'] = productAction.TransactionId;
239
279
  }
240
280
  };
241
281
 
242
282
  // https://go.mparticle.com/work/SQDSDKS-4801
243
- this.extractActionAttributes = function(attributes, productAction) {
283
+ this.extractActionAttributes = function(
284
+ attributes: { [key: string]: any },
285
+ productAction: SDKProductAction
286
+ ): void {
244
287
  self.extractTransactionId(attributes, productAction);
245
288
 
246
289
  if (productAction.Affiliation) {
@@ -273,7 +316,10 @@ export default function Ecommerce(mpInstance) {
273
316
  };
274
317
 
275
318
  // https://go.mparticle.com/work/SQDSDKS-4801
276
- this.extractPromotionAttributes = function(attributes, promotion) {
319
+ this.extractPromotionAttributes = function(
320
+ attributes: { [key: string]: any },
321
+ promotion: SDKPromotion
322
+ ): void {
277
323
  if (promotion.Id) {
278
324
  attributes['Id'] = promotion.Id;
279
325
  }
@@ -291,7 +337,10 @@ export default function Ecommerce(mpInstance) {
291
337
  }
292
338
  };
293
339
 
294
- this.buildProductList = function(event, product) {
340
+ this.buildProductList = function(
341
+ event: SDKEvent,
342
+ product: SDKProduct | SDKProduct[]
343
+ ): SDKProduct[] {
295
344
  if (product) {
296
345
  if (Array.isArray(product)) {
297
346
  return product;
@@ -304,17 +353,17 @@ export default function Ecommerce(mpInstance) {
304
353
  };
305
354
 
306
355
  this.createProduct = function(
307
- name,
308
- sku,
309
- price,
310
- quantity,
311
- variant,
312
- category,
313
- brand,
314
- position,
315
- couponCode,
316
- attributes
317
- ) {
356
+ name: string,
357
+ sku: string | number,
358
+ price: string | number,
359
+ quantity?: string | number,
360
+ variant?: string,
361
+ category?: string,
362
+ brand?: string,
363
+ position?: number,
364
+ couponCode?: string,
365
+ attributes?: SDKEventAttrs
366
+ ): SDKProduct | null {
318
367
  attributes = mpInstance._Helpers.sanitizeAttributes(attributes, name);
319
368
 
320
369
  if (typeof name !== 'string') {
@@ -342,7 +391,7 @@ export default function Ecommerce(mpInstance) {
342
391
  mpInstance.Logger.error(
343
392
  'Position must be a number, it will be set to null.'
344
393
  );
345
- position = null;
394
+ position = null as unknown as number;
346
395
  }
347
396
 
348
397
  if (!mpInstance._Helpers.Validators.isStringOrNumber(quantity)) {
@@ -353,34 +402,42 @@ export default function Ecommerce(mpInstance) {
353
402
 
354
403
  return {
355
404
  Name: name,
356
- Sku: sku,
357
- Price: price,
358
- Quantity: quantity,
405
+ Sku: sku as unknown as string,
406
+ Price: price as number,
407
+ Quantity: quantity as number,
359
408
  Brand: brand,
360
409
  Variant: variant,
361
410
  Category: category,
362
411
  Position: position,
363
412
  CouponCode: couponCode,
364
- TotalAmount: quantity * price,
413
+ TotalAmount: (quantity as number) * (price as number),
365
414
  Attributes: attributes,
366
415
  };
367
416
  };
368
417
 
369
- this.createPromotion = function(id, creative, name, position) {
418
+ this.createPromotion = function(
419
+ id: string | number,
420
+ creative?: string,
421
+ name?: string,
422
+ position?: number
423
+ ): SDKPromotion | null {
370
424
  if (!mpInstance._Helpers.Validators.isStringOrNumber(id)) {
371
425
  mpInstance.Logger.error(Messages.ErrorMessages.PromotionIdRequired);
372
426
  return null;
373
427
  }
374
428
 
375
429
  return {
376
- Id: id,
430
+ Id: id as unknown as string,
377
431
  Creative: creative,
378
432
  Name: name,
379
- Position: position,
433
+ Position: position as unknown as string,
380
434
  };
381
435
  };
382
436
 
383
- this.createImpression = function(name, product) {
437
+ this.createImpression = function(
438
+ name: string,
439
+ product: SDKProduct
440
+ ): SDKImpression | null {
384
441
  if (typeof name !== 'string') {
385
442
  mpInstance.Logger.error(
386
443
  'Name is required when creating an impression.'
@@ -402,13 +459,13 @@ export default function Ecommerce(mpInstance) {
402
459
  };
403
460
 
404
461
  this.createTransactionAttributes = function(
405
- id,
406
- affiliation,
407
- couponCode,
408
- revenue,
409
- shipping,
410
- tax
411
- ) {
462
+ id: string | number,
463
+ affiliation?: string,
464
+ couponCode?: string,
465
+ revenue?: string | number,
466
+ shipping?: string | number,
467
+ tax?: number
468
+ ): TransactionAttributes | null {
412
469
  if (!mpInstance._Helpers.Validators.isStringOrNumber(id)) {
413
470
  mpInstance.Logger.error(
414
471
  Messages.ErrorMessages.TransactionIdRequired
@@ -420,14 +477,16 @@ export default function Ecommerce(mpInstance) {
420
477
  Id: id,
421
478
  Affiliation: affiliation,
422
479
  CouponCode: couponCode,
423
- Revenue: revenue,
424
- Shipping: shipping,
480
+ Revenue: revenue as number,
481
+ Shipping: shipping as string,
425
482
  Tax: tax,
426
483
  };
427
484
  };
428
485
 
429
- this.expandProductImpression = function(commerceEvent) {
430
- var appEvents = [];
486
+ this.expandProductImpression = function(
487
+ commerceEvent: SDKEvent
488
+ ): SDKEvent[] {
489
+ const appEvents = [];
431
490
  if (!commerceEvent.ProductImpressions) {
432
491
  return appEvents;
433
492
  }
@@ -450,7 +509,7 @@ export default function Ecommerce(mpInstance) {
450
509
  attributes['Product Impression List'] =
451
510
  productImpression.ProductImpressionList;
452
511
  }
453
- var appEvent = mpInstance._ServerModel.createEventObject({
512
+ const appEvent = mpInstance._ServerModel.createEventObject({
454
513
  messageType: Types.MessageType.PageEvent,
455
514
  name: self.generateExpandedEcommerceName('Impression'),
456
515
  data: attributes,
@@ -464,7 +523,9 @@ export default function Ecommerce(mpInstance) {
464
523
  return appEvents;
465
524
  };
466
525
 
467
- this.expandCommerceEvent = function(event) {
526
+ this.expandCommerceEvent = function(
527
+ event: SDKEvent
528
+ ): SDKEvent[] | null {
468
529
  if (!event) {
469
530
  return null;
470
531
  }
@@ -474,21 +535,23 @@ export default function Ecommerce(mpInstance) {
474
535
  .concat(self.expandProductImpression(event));
475
536
  };
476
537
 
477
- this.expandPromotionAction = function(commerceEvent) {
478
- var appEvents = [];
538
+ this.expandPromotionAction = function(
539
+ commerceEvent: SDKEvent
540
+ ): SDKEvent[] {
541
+ const appEvents = [];
479
542
  if (!commerceEvent.PromotionAction) {
480
543
  return appEvents;
481
544
  }
482
- var promotions = commerceEvent.PromotionAction.PromotionList;
545
+ const promotions = commerceEvent.PromotionAction.PromotionList;
483
546
  promotions.forEach(function(promotion) {
484
547
  let attributes = extend(false, {}, commerceEvent.EventAttributes);
485
548
  self.extractPromotionAttributes(attributes, promotion);
486
549
 
487
- var appEvent = mpInstance._ServerModel.createEventObject({
550
+ const appEvent = mpInstance._ServerModel.createEventObject({
488
551
  messageType: Types.MessageType.PageEvent,
489
552
  name: self.generateExpandedEcommerceName(
490
553
  Types.PromotionActionType.getExpansionName(
491
- commerceEvent.PromotionAction.PromotionActionType
554
+ commerceEvent.PromotionAction.PromotionActionType as unknown as number
492
555
  )
493
556
  ),
494
557
  data: attributes,
@@ -499,12 +562,14 @@ export default function Ecommerce(mpInstance) {
499
562
  return appEvents;
500
563
  };
501
564
 
502
- this.expandProductAction = function(commerceEvent) {
503
- var appEvents = [];
565
+ this.expandProductAction = function(
566
+ commerceEvent: SDKEvent
567
+ ): SDKEvent[] {
568
+ const appEvents = [];
504
569
  if (!commerceEvent.ProductAction) {
505
570
  return appEvents;
506
571
  }
507
- var shouldExtractActionAttributes = false;
572
+ let shouldExtractActionAttributes = false;
508
573
  if (
509
574
  commerceEvent.ProductAction.ProductActionType ===
510
575
  Types.ProductActionType.Purchase ||
@@ -523,11 +588,11 @@ export default function Ecommerce(mpInstance) {
523
588
  if (commerceEvent.CurrencyCode) {
524
589
  attributes['Currency Code'] = commerceEvent.CurrencyCode;
525
590
  }
526
- var plusOneEvent = mpInstance._ServerModel.createEventObject({
591
+ const plusOneEvent = mpInstance._ServerModel.createEventObject({
527
592
  messageType: Types.MessageType.PageEvent,
528
593
  name: self.generateExpandedEcommerceName(
529
594
  Types.ProductActionType.getExpansionName(
530
- commerceEvent.ProductAction.ProductActionType
595
+ commerceEvent.ProductAction.ProductActionType as number
531
596
  ),
532
597
  true
533
598
  ),
@@ -539,7 +604,7 @@ export default function Ecommerce(mpInstance) {
539
604
  shouldExtractActionAttributes = true;
540
605
  }
541
606
 
542
- var products = commerceEvent.ProductAction.ProductList;
607
+ const products = commerceEvent.ProductAction.ProductList;
543
608
 
544
609
  if (!products) {
545
610
  return appEvents;
@@ -564,11 +629,11 @@ export default function Ecommerce(mpInstance) {
564
629
  }
565
630
  self.extractProductAttributes(attributes, product);
566
631
 
567
- var productEvent = mpInstance._ServerModel.createEventObject({
632
+ const productEvent = mpInstance._ServerModel.createEventObject({
568
633
  messageType: Types.MessageType.PageEvent,
569
634
  name: self.generateExpandedEcommerceName(
570
635
  Types.ProductActionType.getExpansionName(
571
- commerceEvent.ProductAction.ProductActionType
636
+ commerceEvent.ProductAction.ProductActionType as number
572
637
  )
573
638
  ),
574
639
  data: attributes,
@@ -580,10 +645,13 @@ export default function Ecommerce(mpInstance) {
580
645
  return appEvents;
581
646
  };
582
647
 
583
- this.createCommerceEventObject = function(customFlags, options) {
584
- var baseEvent;
648
+ this.createCommerceEventObject = function(
649
+ customFlags?: SDKEventCustomFlags,
650
+ options?: SDKEventOptions
651
+ ): SDKEvent | null {
652
+ let baseEvent;
585
653
  // https://go.mparticle.com/work/SQDSDKS-4801
586
- var { extend } = mpInstance._Helpers;
654
+ const { extend } = mpInstance._Helpers;
587
655
 
588
656
  mpInstance.Logger.verbose(
589
657
  Messages.InformationMessages.StartingLogCommerceEvent
@@ -611,9 +679,12 @@ export default function Ecommerce(mpInstance) {
611
679
  };
612
680
 
613
681
  // sanitizes any non number, non string value to 0
614
- this.sanitizeAmount = function(amount, category) {
682
+ this.sanitizeAmount = function(
683
+ amount: string | number,
684
+ category: string
685
+ ): number {
615
686
  if (!mpInstance._Helpers.Validators.isStringOrNumber(amount)) {
616
- var message = [
687
+ const message = [
617
688
  category,
618
689
  'must be of type number. A',
619
690
  typeof amount,
@@ -62,7 +62,7 @@ export interface IEvents {
62
62
  ): void;
63
63
  logPromotionEvent(
64
64
  promotionType: valueof<typeof PromotionActionType>,
65
- promotion: SDKPromotion,
65
+ promotion: SDKPromotion | SDKPromotion[],
66
66
  attrs?: SDKEventAttrs,
67
67
  customFlags?: SDKEventCustomFlags,
68
68
  eventOptions?: SDKEventOptions
package/src/events.ts CHANGED
@@ -342,7 +342,7 @@ export default function Events(
342
342
 
343
343
  this.logPromotionEvent = function(
344
344
  promotionType: valueof<typeof PromotionActionType>,
345
- promotion: SDKPromotion,
345
+ promotion: SDKPromotion | SDKPromotion[],
346
346
  attrs?: SDKEventAttrs,
347
347
  customFlags?: SDKEventCustomFlags,
348
348
  eventOptions?: SDKEventOptions
@@ -1,14 +1,22 @@
1
- import { SDKEvent, SDKEventCustomFlags } from './sdkRuntimeModels';
1
+ import { SDKEvent, SDKEventCustomFlags, SDKInitConfig, SDKLoggerApi } from './sdkRuntimeModels';
2
2
  import { Dictionary } from './utils';
3
- import { IKitConfigs, IKitFilterSettings } from './configAPIClient';
4
- import { IdentityApiData, IdentityType } from '@mparticle/web-sdk';
3
+ import {
4
+ IKitConfigs,
5
+ IKitFilterSettings,
6
+ IFilteringUserAttributeValue,
7
+ } from './configAPIClient';
8
+ import { IdentityApiData, IdentityType, UserIdentities } from '@mparticle/web-sdk';
5
9
  import { Batch } from '@mparticle/event-models';
10
+ import { IForwardingStatsData } from './apiClient';
11
+ import { AsyncUploader } from './uploaders';
12
+ import { IPixelConfiguration } from './cookieSyncManager';
6
13
 
7
14
  import {
8
15
  IMParticleUser,
9
16
  ISDKUserIdentity,
10
17
  UserAttributes,
11
18
  } from './identity-user-interfaces';
19
+ import type { IFilteredMparticleUser } from './filteredMparticleUser';
12
20
 
13
21
  // TODO: https://go.mparticle.com/work/SQDSDKS-4475
14
22
  export type MPForwarder = Dictionary;
@@ -57,38 +65,41 @@ export interface ConfiguredKit
57
65
  testMode: boolean,
58
66
  trackerId: string | null,
59
67
  userAttributes: UserAttributes,
60
- userIdentities: ISDKUserIdentity,
68
+ userIdentities: ISDKUserIdentity[],
61
69
  appVersion: string,
62
70
  appName: string,
63
71
  customFlags: SDKEventCustomFlags,
64
72
  clientId: string
65
73
  ): string;
66
74
  onIdentifyComplete(
67
- user: IMParticleUser,
75
+ user: IFilteredMparticleUser,
68
76
  filteredIdentityRequest: IdentityApiData
69
77
  ): string;
70
78
  onLoginComplete(
71
- user: IMParticleUser,
79
+ user: IFilteredMparticleUser,
72
80
  filteredIdentityRequest: IdentityApiData
73
81
  ): string;
74
82
  onLogoutComplete(
75
- user: IMParticleUser,
83
+ user: IFilteredMparticleUser,
76
84
  filteredIdentityRequest: IdentityApiData
77
85
  ): string;
78
86
  onModifyComplete(
79
- user: IMParticleUser,
87
+ user: IFilteredMparticleUser,
80
88
  filteredIdentityRequest: IdentityApiData
81
89
  ): string;
82
- onUserIdentified(user: IMParticleUser): string;
90
+ onUserIdentified(user: IFilteredMparticleUser): string;
83
91
  process(event: SDKEvent): string;
84
92
  setOptOut(isOptingOut: boolean): string;
85
93
  removeUserAttribute(key: string): string;
86
94
  setUserAttribute(key: string, value: string): string;
87
- setUserIdentity(id: UserIdentityId, type: UserIdentityType): void;
95
+ setUserIdentity(id: UserIdentityId, type: UserIdentityType): string | void;
96
+ logOut?(evt: SDKEvent): void;
88
97
 
89
98
  // TODO: https://go.mparticle.com/work/SQDSDKS-5156
90
99
  isSandbox: boolean;
91
100
  hasSandbox: boolean;
101
+ initialized?: boolean;
102
+ logger?: SDKLoggerApi;
92
103
  }
93
104
 
94
105
  export interface KitInterface {
@@ -140,3 +151,55 @@ export type forwardingStatsCallback = (
140
151
  forwarder: ConfiguredKit,
141
152
  event: SDKEvent
142
153
  ) => void;
154
+
155
+ export interface IForwarders {
156
+ forwarderStatsUploader: AsyncUploader;
157
+ initForwarders(
158
+ userIdentities: UserIdentities,
159
+ forwardingStatsCallback: forwardingStatsCallback
160
+ ): void;
161
+ isEnabledForUserAttributes(
162
+ filterObject: Partial<IFilteringUserAttributeValue>,
163
+ user: IMParticleUser
164
+ ): boolean;
165
+ isEnabledForUnknownUser(
166
+ excludeAnonymousUserBoolean: boolean,
167
+ user: IMParticleUser
168
+ ): boolean;
169
+ applyToForwarders(functionName: string, functionArgs: unknown): void;
170
+ sendEventToForwarders(event: SDKEvent): void;
171
+ handleForwarderUserAttributes(
172
+ functionNameKey: string,
173
+ key: string,
174
+ value: string
175
+ ): void;
176
+ setForwarderUserIdentities(userIdentities: UserIdentities): void;
177
+ setForwarderOnUserIdentified(user: IMParticleUser): void;
178
+ setForwarderOnIdentityComplete(
179
+ user: IMParticleUser,
180
+ identityMethod: string
181
+ ): void;
182
+ getForwarderStatsQueue(): IForwardingStatsData[];
183
+ setForwarderStatsQueue(queue: IForwardingStatsData[]): void;
184
+ processForwarders(
185
+ config: SDKInitConfig,
186
+ forwardingStatsCallback: forwardingStatsCallback
187
+ ): void;
188
+ processUIEnabledKits(config: SDKInitConfig): void;
189
+ returnKitConstructors(): Dictionary<RegisteredKit>;
190
+ configureUIEnabledKit(
191
+ configuration: IKitConfigs,
192
+ kits: Dictionary<RegisteredKit>
193
+ ): void;
194
+ processSideloadedKits(mpConfig: SDKInitConfig): void;
195
+ configureSideloadedKit(kitConstructor: RegisteredKit): void;
196
+ returnConfiguredKit(
197
+ forwarder: RegisteredKit,
198
+ config?: Partial<IKitConfigs>
199
+ ): ConfiguredKit;
200
+ configurePixel(settings: IPixelConfiguration): void;
201
+ processPixelConfigs(config: SDKInitConfig): void;
202
+ sendSingleForwardingStatsToServer(
203
+ forwardingStatsData: IForwardingStatsData
204
+ ): Promise<void>;
205
+ }