@xsolla/payment-client-core 0.2.43 → 0.2.44

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.
@@ -0,0 +1 @@
1
+ export type Environment = 'production' | 'staging' | 'development';
@@ -0,0 +1,19 @@
1
+ import { UserBehaviourAnalyticsService } from '../user-behaviour-analytics/user-behaviour-analytics.service';
2
+ import { Environment } from '../environment.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ScriptTrackerService {
5
+ private readonly userBehaviourAnalyticsService;
6
+ private readonly currentScripts;
7
+ private readonly scriptHostBlacklist;
8
+ private readonly SCRIPT_DEBOUNCE_TIME_MS;
9
+ private readonly scriptTracked$;
10
+ constructor(userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
11
+ initScriptTracking(environment: Environment): void;
12
+ private handleScriptData;
13
+ private getTrackedScripts;
14
+ private checkCurrentScripts;
15
+ private setupScriptObserver;
16
+ private trackScript;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScriptTrackerService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<ScriptTrackerService>;
19
+ }
@@ -1,6 +1,8 @@
1
+ import { Environment } from '../environment.interface';
1
2
  export interface InitConfiguration {
2
3
  token: string;
3
4
  refer: number;
5
+ environment: Environment;
4
6
  isWebview?: boolean;
5
7
  sandbox?: boolean;
6
8
  }
@@ -3,5 +3,6 @@ export declare enum EventParameterType {
3
3
  int = "1",
4
4
  float = "2",
5
5
  bool = "3",
6
- intArray = "4"
6
+ intArray = "4",
7
+ stringArray = "5"
7
8
  }
@@ -3,7 +3,7 @@ import { userBehaviourEventTypes } from './user-behaviour-event/user-behaviour-e
3
3
  import { Invoice } from './event-builder/invoice.interface';
4
4
  import { EventParameterType } from './event-builder/event-parameter-types';
5
5
  export interface SendEventMethodOptionsInterface {
6
- value?: string | null | boolean | number | number[];
6
+ value?: string | string[] | null | boolean | number | number[];
7
7
  valueType?: EventParameterType;
8
8
  eventCategory?: keyof typeof eventCategories;
9
9
  extraValue?: string | null;
@@ -20,7 +20,7 @@ export interface SendEventMethodOptionsInterface {
20
20
  export interface CreateEventMethodOptionsInterface {
21
21
  action: string;
22
22
  type: keyof typeof userBehaviourEventTypes;
23
- value: string | null | boolean | number | number[];
23
+ value: string | string[] | null | boolean | number | number[];
24
24
  valueType: EventParameterType | null;
25
25
  date: Date;
26
26
  invoice: Invoice | null;
@@ -2,5 +2,6 @@ export declare enum UserBehaviourEventName {
2
2
  openPaystation = "open-paystation",
3
3
  showMethodHeader = "show-method-header",
4
4
  showErrorMessage = "show-error-message",
5
- openStatusError = "open-status-error"
5
+ openStatusError = "open-status-error",
6
+ sysTrackedScripts = "sys-tracked_scripts"
6
7
  }
@@ -43,6 +43,7 @@ import { CashPaymentData } from './core/payment/cash-payment-data.interface';
43
43
  import { SendInstructionService } from './core/xsolla-number/api/send-instruction/send-instruction.service';
44
44
  import { SendInstructionResponseInterface } from './core/xsolla-number/api/send-instruction/response/send-instruction-response.interface';
45
45
  import { SendInstructionParametersInterface } from './core/xsolla-number/api/send-instruction/send-instruction-parameters.interface';
46
+ import { ScriptTrackerService } from './core/script-tracker/script-tracker.service';
46
47
  import * as i0 from "@angular/core";
47
48
  export declare class CoreLibraryService {
48
49
  private readonly settingsService;
@@ -66,6 +67,7 @@ export declare class CoreLibraryService {
66
67
  private readonly combinedPaymentMethodsService;
67
68
  private readonly countriesApiService;
68
69
  private readonly sendInstructionService;
70
+ private readonly scriptTrackerService;
69
71
  paymentMethods: {
70
72
  getList: (isSaveMethodMode?: boolean) => Promise<PaymentMethod[]>;
71
73
  getQuickMethods: () => Promise<PaymentMethod[]>;
@@ -75,7 +77,7 @@ export declare class CoreLibraryService {
75
77
  deleteSavedMethod: (id: number, type: string) => Promise<boolean>;
76
78
  };
77
79
  sdkPaymentSystems: SdkPaymentSystems;
78
- constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService, formMessagesService: FormMessagesService, editSavedMethodsService: EditSavedMethodsService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, performanceService: PerformanceService, combinedPaymentMethodsService: CombinedPaymentMethodsService, countriesApiService: CountriesApiService, sendInstructionService: SendInstructionService);
80
+ constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService, formMessagesService: FormMessagesService, editSavedMethodsService: EditSavedMethodsService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, performanceService: PerformanceService, combinedPaymentMethodsService: CombinedPaymentMethodsService, countriesApiService: CountriesApiService, sendInstructionService: SendInstructionService, scriptTrackerService: ScriptTrackerService);
79
81
  init(configuration: InitConfiguration): Promise<void>;
80
82
  getStatus(url?: string): Promise<Status>;
81
83
  sendAnalytics(action: string, type: keyof typeof userBehaviourEventTypes, options?: SendEventMethodOptionsInterface): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.43",
3
+ "version": "0.2.44",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.3",
6
6
  "@angular/core": "^17.3.3",