@xsolla/payment-client-core 0.2.74 → 0.2.76

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 (56) hide show
  1. package/esm2022/lib/core/exceptions-handling/common-log-attributes/common-log-attributes.interface.mjs +2 -0
  2. package/esm2022/lib/core/exceptions-handling/common-log-attributes/common-log-attributes.service.mjs +50 -0
  3. package/esm2022/lib/core/exceptions-handling/elk/additional-info.interface.mjs +1 -1
  4. package/esm2022/lib/core/exceptions-handling/elk/elk-logger.service.mjs +17 -23
  5. package/esm2022/lib/core/exceptions-handling/elk/log-message.interface.mjs +1 -1
  6. package/esm2022/lib/core/exceptions-handling/errors/index.mjs +3 -0
  7. package/esm2022/lib/core/exceptions-handling/errors/tagged-error.class.mjs +3 -2
  8. package/esm2022/lib/core/exceptions-handling/logger/index.mjs +2 -0
  9. package/esm2022/lib/core/exceptions-handling/logger/log-handler.interface.mjs +2 -0
  10. package/esm2022/lib/core/exceptions-handling/logger/logger.service.mjs +25 -0
  11. package/esm2022/lib/core/payment/form/converters/cpf-number/cpf-number.converter.mjs +5 -1
  12. package/esm2022/lib/core/payment/form/validators/cpf-formula-validator/cpf-formula.validator.mjs +55 -0
  13. package/esm2022/lib/core/payment/initialize-actions/special-button/special-button.action.class.mjs +9 -8
  14. package/esm2022/lib/core/payment/payment-behaviour/behaviour-strategies.mjs +5 -1
  15. package/esm2022/lib/core/payment/payment-behaviour/strategies/behaviour-strategy.abstract.mjs +5 -1
  16. package/esm2022/lib/core/payment/payment-behaviour/strategies/google-pay-instant-flow/google-pay-instant-flow.strategy.mjs +41 -0
  17. package/esm2022/lib/core/payment/payment-behaviour/strategies/google-pay-regular-flow/google-pay-regular-flow.strategy.mjs +36 -0
  18. package/esm2022/lib/core/payment/payment.service.mjs +18 -15
  19. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-sdk.service.mjs +7 -6
  20. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.mjs +9 -8
  21. package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.mjs +9 -8
  22. package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay.service.mjs +16 -15
  23. package/esm2022/lib/core/settings/settings.service.mjs +10 -1
  24. package/esm2022/lib/core/web-socket/centrifugo-web-socket.service.mjs +19 -18
  25. package/esm2022/lib/core-library.service.mjs +36 -26
  26. package/esm2022/public-api.mjs +3 -1
  27. package/fesm2022/xsolla-payment-client-core.mjs +1221 -1012
  28. package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
  29. package/lib/core/exceptions-handling/common-log-attributes/common-log-attributes.interface.d.ts +16 -0
  30. package/lib/core/exceptions-handling/common-log-attributes/common-log-attributes.service.d.ts +15 -0
  31. package/lib/core/exceptions-handling/elk/additional-info.interface.d.ts +2 -1
  32. package/lib/core/exceptions-handling/elk/elk-logger.service.d.ts +4 -8
  33. package/lib/core/exceptions-handling/elk/log-message.interface.d.ts +1 -3
  34. package/lib/core/exceptions-handling/errors/index.d.ts +2 -0
  35. package/lib/core/exceptions-handling/errors/tagged-error.class.d.ts +2 -1
  36. package/lib/core/exceptions-handling/logger/index.d.ts +1 -0
  37. package/lib/core/exceptions-handling/logger/log-handler.interface.d.ts +4 -0
  38. package/lib/core/exceptions-handling/logger/logger.service.d.ts +13 -0
  39. package/lib/core/payment/form/converters/cpf-number/cpf-number.converter.d.ts +2 -0
  40. package/lib/core/payment/form/validators/cpf-formula-validator/cpf-formula.validator.d.ts +6 -0
  41. package/lib/core/payment/initialize-actions/special-button/special-button.action.class.d.ts +3 -3
  42. package/lib/core/payment/payment-behaviour/strategies/behaviour-strategy.abstract.d.ts +2 -1
  43. package/lib/core/payment/payment-behaviour/strategies/google-pay-instant-flow/google-pay-instant-flow.strategy.d.ts +10 -0
  44. package/lib/core/payment/payment-behaviour/strategies/google-pay-regular-flow/google-pay-regular-flow.strategy.d.ts +10 -0
  45. package/lib/core/payment/payment.service.d.ts +4 -3
  46. package/lib/core/sdk-payment-systems/apple-pay/apple-pay-sdk.service.d.ts +2 -2
  47. package/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.d.ts +3 -3
  48. package/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.d.ts +3 -3
  49. package/lib/core/sdk-payment-systems/google-pay/google-pay.service.d.ts +3 -3
  50. package/lib/core/settings/settings.service.d.ts +3 -0
  51. package/lib/core/web-socket/centrifugo-web-socket.service.d.ts +3 -3
  52. package/lib/core-library.service.d.ts +9 -1
  53. package/package.json +1 -1
  54. package/public-api.d.ts +2 -0
  55. package/xsolla-payment-client-core-0.2.76.tgz +0 -0
  56. package/xsolla-payment-client-core-0.2.74.tgz +0 -0
@@ -0,0 +1,16 @@
1
+ export interface CommonLogAttributes {
2
+ token: string;
3
+ userId?: string | null;
4
+ userEmail?: string;
5
+ projectId?: number;
6
+ merchantId?: number;
7
+ locationUrl?: string;
8
+ userAgent?: string;
9
+ referrerUrl?: string;
10
+ viewportWidth: number;
11
+ viewportHeight: number;
12
+ cdnAddress: string;
13
+ country?: string;
14
+ local?: string;
15
+ browserInfo: string;
16
+ }
@@ -0,0 +1,15 @@
1
+ import { ExtendedWindow } from '../../extended-window.interface';
2
+ import { SettingsService } from '../../settings/settings.service';
3
+ import { UserAgentService } from '../../user-agent/user-agent.service';
4
+ import { CommonLogAttributes } from './common-log-attributes.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CommonLogAttributesService {
7
+ private readonly window;
8
+ private readonly settingsService;
9
+ private readonly userAgentService;
10
+ constructor(window: ExtendedWindow, settingsService: SettingsService, userAgentService: UserAgentService);
11
+ getAttributes(): CommonLogAttributes;
12
+ private extractUrlHost;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommonLogAttributesService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<CommonLogAttributesService>;
15
+ }
@@ -1,10 +1,11 @@
1
1
  export interface AdditionalInfo {
2
+ token: string;
2
3
  location: {
3
4
  url: string;
4
5
  };
5
6
  user_agent?: string;
6
7
  project: {
7
- id: number;
8
+ id: number | null;
8
9
  };
9
10
  referrer: {
10
11
  url: string;
@@ -1,21 +1,17 @@
1
1
  import { ErrorHandler, NgZone } from '@angular/core';
2
2
  import { HttpClient } from '@angular/common/http';
3
- import { SettingsService } from '../../settings/settings.service';
4
- import { ExtendedWindow } from '../../extended-window.interface';
5
3
  import { ErrorTags } from '../errors/elk-error-types.enum';
4
+ import { CommonLogAttributesService } from '../common-log-attributes/common-log-attributes.service';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class ElkLoggerService implements ErrorHandler {
8
- private readonly window;
9
- private readonly settingsService;
7
+ private readonly commonLogAttributesService;
10
8
  private readonly http;
11
9
  private readonly ngZone;
12
10
  private readonly stackTrace;
13
11
  private readonly vendors;
14
- constructor(window: ExtendedWindow, settingsService: SettingsService, http: HttpClient, ngZone: NgZone);
12
+ constructor(commonLogAttributesService: CommonLogAttributesService, http: HttpClient, ngZone: NgZone);
15
13
  handleError(error: Error): void;
16
- log(message: string, tags: ErrorTags[], extra?: {
17
- [key: string]: unknown;
18
- }): void;
14
+ log(message: string, tags: ErrorTags[], extra?: object): void;
19
15
  private parseError;
20
16
  private loadStackTrace;
21
17
  private getErrorTrace;
@@ -2,7 +2,5 @@ import { AdditionalInfo } from './additional-info.interface';
2
2
  export interface LogMessage {
3
3
  additionalInfo: AdditionalInfo;
4
4
  message: string;
5
- extra?: {
6
- [key: string]: unknown;
7
- };
5
+ extra?: object;
8
6
  }
@@ -0,0 +1,2 @@
1
+ export * from './tagged-error.class';
2
+ export * from './elk-error-types.enum';
@@ -5,6 +5,7 @@ export declare class TaggedError extends Error {
5
5
  trace: string;
6
6
  tags: ErrorTags[];
7
7
  additionalInfo: AdditionalInfo;
8
+ extra: object;
8
9
  private readonly parentTag;
9
- constructor(message: string, tags?: ErrorTags[]);
10
+ constructor(message: string, tags?: ErrorTags[], extra?: object);
10
11
  }
@@ -0,0 +1 @@
1
+ export * from './log-handler.interface';
@@ -0,0 +1,4 @@
1
+ import { TaggedError } from '../errors';
2
+ export interface LogHandler {
3
+ handleError(error: Error | TaggedError): void;
4
+ }
@@ -0,0 +1,13 @@
1
+ import { ElkLoggerService } from '../elk/elk-logger.service';
2
+ import { TaggedError } from '../errors';
3
+ import { LogHandler } from './log-handler.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class LoggerService {
6
+ private readonly elkLoggerService;
7
+ private readonly handlers;
8
+ constructor(elkLoggerService: ElkLoggerService);
9
+ register(handler: LogHandler): void;
10
+ error(error: Error | TaggedError): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoggerService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoggerService>;
13
+ }
@@ -1,3 +1,4 @@
1
+ import { ValidatorFn } from '@angular/forms';
1
2
  import { Field } from '../../../field.interface';
2
3
  import { SyncService } from '../../../requests/sync/sync.service';
3
4
  import { TextControlConfig } from '../../controls/text-control.config';
@@ -5,6 +6,7 @@ import { Converter } from '../converter.abstract';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class CpfNumberConverter extends Converter {
7
8
  constructor(syncService: SyncService);
9
+ getValidators(field: Field): ValidatorFn[];
8
10
  protected createControlConfig(field: Field): TextControlConfig;
9
11
  static ɵfac: i0.ɵɵFactoryDeclaration<CpfNumberConverter, never>;
10
12
  static ɵprov: i0.ɵɵInjectableDeclaration<CpfNumberConverter>;
@@ -0,0 +1,6 @@
1
+ import { ValidatorFn } from '../validator-fn.type';
2
+ /**
3
+ * Checks number match CPF validation algorithm.
4
+ * Based on https://en.wikipedia.org/wiki/CPF_number
5
+ */
6
+ export declare const cpfFormulaValidator: ValidatorFn;
@@ -1,14 +1,14 @@
1
- import { ElkLoggerService } from '../../../exceptions-handling/elk/elk-logger.service';
2
1
  import { InitializeResponse } from '../../requests/initialize/response/initialize-response.class';
3
2
  import { InitializeActionCreator } from '../action.interface';
4
3
  import { InitializeSpecialButtonAction, SpecialButtonActionType } from './special-button.action.type';
4
+ import { LoggerService } from '../../../exceptions-handling/logger/logger.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class InitializeSpecialButtonActionCreator implements InitializeActionCreator {
7
- private readonly elkLoggerService;
7
+ private readonly loggerService;
8
8
  type: SpecialButtonActionType;
9
9
  private readonly pids;
10
10
  private readonly sdkPaymentMethodsName;
11
- constructor(elkLoggerService: ElkLoggerService);
11
+ constructor(loggerService: LoggerService);
12
12
  getActionData(response: InitializeResponse): InitializeSpecialButtonAction;
13
13
  isSuitable(response: InitializeResponse): boolean;
14
14
  private getPaymentMethodName;
@@ -5,9 +5,10 @@ import * as i0 from "@angular/core";
5
5
  export declare abstract class BehaviourStrategy {
6
6
  protected paymentData: InitializeResponse | SubmitResponse | null;
7
7
  protected paymentConfig: PaymentConfiguration;
8
- abstract onInit(): void;
9
8
  isSuitable(): boolean;
9
+ onInit(): void;
10
10
  onDestroy(): void;
11
+ canAutoSubmit(): boolean;
11
12
  setPaymentData(paymentData: InitializeResponse | SubmitResponse | null): void;
12
13
  setPaymentConfig(config: PaymentConfiguration): void;
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<BehaviourStrategy, never>;
@@ -0,0 +1,10 @@
1
+ import { BehaviourStrategy } from '../behaviour-strategy.abstract';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GooglePayInstantFlowStrategy extends BehaviourStrategy {
4
+ constructor();
5
+ isSuitable(): boolean;
6
+ onInit(): void;
7
+ private hideField;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayInstantFlowStrategy, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayInstantFlowStrategy>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { BehaviourStrategy } from '../behaviour-strategy.abstract';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GooglePayRegularFlowStrategy extends BehaviourStrategy {
4
+ constructor();
5
+ isSuitable(): boolean;
6
+ canAutoSubmit(): boolean;
7
+ private getVisibleFields;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayRegularFlowStrategy, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayRegularFlowStrategy>;
10
+ }
@@ -34,11 +34,11 @@ import { InitializedForm } from './initialized-form.inteface';
34
34
  import { CashPaymentData } from './cash-payment-data.interface';
35
35
  import { PrintInstructionService } from '../xsolla-number/api/print-instruction/print-instruction.service';
36
36
  import { SyncResponse } from './requests/sync/response/sync-response.class';
37
- import { ElkLoggerService } from '../exceptions-handling/elk/elk-logger.service';
38
37
  import { PaymentBehaviourService } from './payment-behaviour/payment-behaviour.service';
38
+ import { LoggerService } from '../exceptions-handling/logger/logger.service';
39
39
  import * as i0 from "@angular/core";
40
40
  export declare class PaymentService {
41
- private readonly elkLoggerService;
41
+ private readonly loggerService;
42
42
  private readonly initializeService;
43
43
  private readonly submitService;
44
44
  private readonly syncService;
@@ -72,7 +72,7 @@ export declare class PaymentService {
72
72
  private readonly formFieldsStatusSubject;
73
73
  private readonly _formResponse$;
74
74
  private isSavingMethodMode;
75
- constructor(elkLoggerService: ElkLoggerService, initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, initializeNextActionService: InitializeNextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService, formMessagesService: FormMessagesService, settingsService: SettingsService, countryService: CountryService, checkStatusActionCreator: CheckStatusActionCreator, printInstructionService: PrintInstructionService, paymentBehaviourService: PaymentBehaviourService);
75
+ constructor(loggerService: LoggerService, initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, initializeNextActionService: InitializeNextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService, formMessagesService: FormMessagesService, settingsService: SettingsService, countryService: CountryService, checkStatusActionCreator: CheckStatusActionCreator, printInstructionService: PrintInstructionService, paymentBehaviourService: PaymentBehaviourService);
76
76
  initialize(config: PaymentConfiguration): Promise<InitializedForm>;
77
77
  submit(): Promise<NextAction | null | void>;
78
78
  submitWithFields(fields?: Field[]): Promise<SubmitResponse>;
@@ -111,6 +111,7 @@ export declare class PaymentService {
111
111
  private getSdkPaymentDataFromResponse;
112
112
  private initializeBehaviourStrategies;
113
113
  private destroyBehaviourStrategies;
114
+ private autoSubmitBehaviourStrategies;
114
115
  static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
115
116
  static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
116
117
  }
@@ -1,6 +1,6 @@
1
1
  import { ExtendedWindow } from '../../extended-window.interface';
2
- import { ElkLoggerService } from '../../exceptions-handling/elk/elk-logger.service';
3
2
  import { Observable } from 'rxjs';
3
+ import { LoggerService } from '../../exceptions-handling/logger/logger.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ApplePaySdkService {
6
6
  private readonly window;
@@ -13,7 +13,7 @@ export declare class ApplePaySdkService {
13
13
  private readonly successPaymentType;
14
14
  private readonly windowClosingType;
15
15
  private applePaySdkPostMessagesListener;
16
- constructor(window: ExtendedWindow, loggerService: ElkLoggerService);
16
+ constructor(window: ExtendedWindow, loggerService: LoggerService);
17
17
  get windowClosing$(): Observable<void>;
18
18
  emitWindowClosing(): void;
19
19
  addApplePaySdkJs(): void;
@@ -8,7 +8,6 @@ import { BraintreeHandler } from './session-handlers/braintree.handler';
8
8
  import { CheckoutHandler } from './session-handlers/checkout.handler';
9
9
  import { PaymentForm } from '../../payment/payment-form.interface';
10
10
  import { ApplePayParamsBuilderService } from './params-builder/apple-pay-params-builder.service';
11
- import { ElkLoggerService } from '../../exceptions-handling/elk/elk-logger.service';
12
11
  import { StartSessionParams } from './session-handlers/start-session-params.interface';
13
12
  import { ApplePaySdkService } from './apple-pay-sdk.service';
14
13
  import { ApplePayExternalWindowCommunicationService } from './external-window-communication/external-window-communication.service';
@@ -20,6 +19,7 @@ import { SettingsService } from '../../settings/settings.service';
20
19
  import { ShippingAddress } from './shipping-address.interface';
21
20
  import { ApplePayShippingContact } from './session-handlers/apple-pay-session.interface';
22
21
  import { UpdatedPrice } from './updated-price.interface';
22
+ import { LoggerService } from '../../exceptions-handling/logger/logger.service';
23
23
  import * as i0 from "@angular/core";
24
24
  export declare class ApplePayService {
25
25
  private readonly window;
@@ -27,7 +27,7 @@ export declare class ApplePayService {
27
27
  private readonly braintreeHandler;
28
28
  private readonly checkoutHandler;
29
29
  private readonly appleParamsBuilder;
30
- private readonly elkLoggerService;
30
+ private readonly loggerService;
31
31
  private readonly applePaySdkService;
32
32
  private readonly externalWindowCommunicationService;
33
33
  private readonly settingsService;
@@ -50,7 +50,7 @@ export declare class ApplePayService {
50
50
  get getWindowSendTokenMessage$(): Observable<ApplePaySendTokenMessage>;
51
51
  get getWindowClose$(): Observable<WindowCloseMessage>;
52
52
  get getWindowReturnMessage$(): Observable<ReturnMessage>;
53
- constructor(window: ExtendedWindow, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService, braintreeHandler: BraintreeHandler, checkoutHandler: CheckoutHandler, appleParamsBuilder: ApplePayParamsBuilderService, elkLoggerService: ElkLoggerService, applePaySdkService: ApplePaySdkService, externalWindowCommunicationService: ApplePayExternalWindowCommunicationService, settingsService: SettingsService);
53
+ constructor(window: ExtendedWindow, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService, braintreeHandler: BraintreeHandler, checkoutHandler: CheckoutHandler, appleParamsBuilder: ApplePayParamsBuilderService, loggerService: LoggerService, applePaySdkService: ApplePaySdkService, externalWindowCommunicationService: ApplePayExternalWindowCommunicationService, settingsService: SettingsService);
54
54
  addApplePaySdkJs(): void;
55
55
  removeListeners(): void;
56
56
  setApplePayParams(data: {
@@ -1,17 +1,17 @@
1
1
  import { ApplePay } from 'braintree-web';
2
- import { ElkLoggerService } from '../../../exceptions-handling/elk/elk-logger.service';
3
2
  import { ExtendedWindow } from '../../../extended-window.interface';
4
3
  import { ApplePayParams } from '../apple-pay-params.interface';
5
4
  import { ApplePaySessionHandlerAbstract } from './session-handler.abstract';
6
5
  import { StartSessionParams } from './start-session-params.interface';
7
6
  import { ApplePayCartService } from '../apple-pay-cart/apple-pay-cart.service';
7
+ import { LoggerService } from '../../../exceptions-handling/logger/logger.service';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class BraintreeHandler extends ApplePaySessionHandlerAbstract {
10
10
  private readonly window;
11
- private readonly elkLoggerService;
11
+ private readonly loggerService;
12
12
  private readonly applePayCartService;
13
13
  private paymentClient;
14
- constructor(window: ExtendedWindow, elkLoggerService: ElkLoggerService, applePayCartService: ApplePayCartService);
14
+ constructor(window: ExtendedWindow, loggerService: LoggerService, applePayCartService: ApplePayCartService);
15
15
  setClient(client: ApplePay): void;
16
16
  startSession(params: ApplePayParams, additionalParams: StartSessionParams, applePayFinallyCallback: () => void): void;
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<BraintreeHandler, never>;
@@ -1,6 +1,5 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { ElkLoggerService } from '../../exceptions-handling/elk/elk-logger.service';
4
3
  import { ExtendedWindow } from '../../extended-window.interface';
5
4
  import { CheckStatusAction } from '../../payment/actions/check-status/check-status.action.type';
6
5
  import { PaymentSystemProcessingService } from '../payment-systems/payment-system-processing.service';
@@ -9,10 +8,11 @@ import { GooglePayButtonColorType } from './google-pay-button-color.type';
9
8
  import { GooglePayInitParams } from './google-pay-init-params.interface';
10
9
  import { GooglePayCheckoutPaymentService } from './payment/google-pay-checkout-payment.service';
11
10
  import { GooglePayInstantPaymentService } from './payment/google-pay-instant-payment.service';
11
+ import { LoggerService } from '../../exceptions-handling/logger/logger.service';
12
12
  import * as i0 from "@angular/core";
13
13
  export declare class GooglePayService {
14
14
  private readonly window;
15
- private readonly elkLoggerService;
15
+ private readonly loggerService;
16
16
  private readonly paymentSystemProcessingService;
17
17
  private readonly googlePayCheckoutPaymentService;
18
18
  private readonly googlePayInstantPaymentService;
@@ -26,7 +26,7 @@ export declare class GooglePayService {
26
26
  private onPaymentAuthorized;
27
27
  private get libraryWasInitialized();
28
28
  private get googlePaymentClientWasInitialized();
29
- constructor(window: ExtendedWindow, elkLoggerService: ElkLoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector);
29
+ constructor(window: ExtendedWindow, loggerService: LoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector);
30
30
  get readyToPay$(): Observable<boolean | null>;
31
31
  isReadyToPay(): boolean | null;
32
32
  initGooglePayLibrary(data: GooglePayInitParams): void;
@@ -15,6 +15,9 @@ export declare class SettingsService {
15
15
  get user(): DeepReadonly<User>;
16
16
  get utilsResponse(): DeepReadonly<UtilsResponse>;
17
17
  get unsafeUtilsResponse(): DeepReadonly<UtilsResponse | null>;
18
+ get unsafeUser(): DeepReadonly<User | null>;
19
+ get unsafeProject(): DeepReadonly<Project | null>;
20
+ get unsafeSettings(): DeepReadonly<Settings | null>;
18
21
  get isEmpty(): boolean;
19
22
  get token(): string;
20
23
  get hasResponse(): boolean;
@@ -1,10 +1,10 @@
1
1
  import { Observable, Subscription } from 'rxjs';
2
- import { ElkLoggerService } from '../exceptions-handling/elk/elk-logger.service';
3
2
  import { WebSocketClient } from './web-socket.interface';
4
3
  import { WebSocketClientType } from './web-socket-client-type.enum';
4
+ import { LoggerService } from '../exceptions-handling/logger/logger.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class CentrifugoWebSocketService implements WebSocketClient {
7
- private readonly elkLoggerService;
7
+ private readonly loggerService;
8
8
  static readonly reconnectionTimeoutIncrementFactor = 2;
9
9
  type: WebSocketClientType;
10
10
  private static readonly timeoutsMs;
@@ -21,7 +21,7 @@ export declare class CentrifugoWebSocketService implements WebSocketClient {
21
21
  private prevSubscribedChannel?;
22
22
  private readonly incomingMessages$;
23
23
  private readonly successfulReconnectionEventsProxy$;
24
- constructor(elkLoggerService: ElkLoggerService);
24
+ constructor(loggerService: LoggerService);
25
25
  open(url: string, channel: string): Promise<void>;
26
26
  close(): void;
27
27
  get messages$(): Observable<string>;
@@ -49,9 +49,14 @@ import { SyncResponse } from './core/payment/requests/sync/response/sync-respons
49
49
  import { XpsSummary } from './core/payment/xps-summary.interface';
50
50
  import { SubmitResponse } from './core/payment/requests/submit/response/submit-response.class';
51
51
  import { TranslateService } from '@ngx-translate/core';
52
+ import { CommonLogAttributesService } from './core/exceptions-handling/common-log-attributes/common-log-attributes.service';
53
+ import { CommonLogAttributes } from './core/exceptions-handling/common-log-attributes/common-log-attributes.interface';
54
+ import { LogHandler } from './core/exceptions-handling/logger/log-handler.interface';
55
+ import { LoggerService } from './core/exceptions-handling/logger/logger.service';
52
56
  import * as i0 from "@angular/core";
53
57
  export declare class CoreLibraryService {
54
58
  private readonly settingsService;
59
+ private readonly loggerService;
55
60
  private readonly countryService;
56
61
  private readonly paymentMethodsService;
57
62
  private readonly savedMethodsService;
@@ -74,6 +79,7 @@ export declare class CoreLibraryService {
74
79
  private readonly sendInstructionService;
75
80
  private readonly scriptTrackerService;
76
81
  private readonly translateService;
82
+ private readonly commonLogAttributesService;
77
83
  paymentMethods: {
78
84
  getList: (isSaveMethodMode?: boolean) => Promise<PaymentMethod[]>;
79
85
  getQuickMethods: () => Promise<PaymentMethod[]>;
@@ -86,7 +92,7 @@ export declare class CoreLibraryService {
86
92
  finance: {
87
93
  getDetailsFromSummary: (summary: XpsSummary) => FinanceDetails;
88
94
  };
89
- 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, translateService: TranslateService);
95
+ constructor(settingsService: SettingsService, loggerService: LoggerService, 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, translateService: TranslateService, commonLogAttributesService: CommonLogAttributesService);
90
96
  init(configuration: InitConfiguration): Promise<void>;
91
97
  getStatus(url?: string): Promise<Status>;
92
98
  calculateField(changedField: Field, fields: Field[]): Promise<SyncResponse>;
@@ -109,11 +115,13 @@ export declare class CoreLibraryService {
109
115
  get cardTypeUpdates$(): Observable<CreditCardState>;
110
116
  getLegalComponentConfig(pid?: number): LegalComponentConfig;
111
117
  getUserBalanceValue(): Balance | null;
118
+ registerLogHandler(handler: LogHandler): void;
112
119
  get paymentForm$(): Observable<FormControlStatus | null>;
113
120
  get formResponse$(): Observable<FormResponse | null>;
114
121
  get formResponseValue(): FormResponse | null;
115
122
  get topLevelDomain(): string | undefined;
116
123
  get isApplePayInstantFlowEnabled(): boolean;
124
+ get commonLogAttributes(): CommonLogAttributes;
117
125
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
118
126
  static ɵprov: i0.ɵɵInjectableDeclaration<CoreLibraryService>;
119
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.74",
3
+ "version": "0.2.76",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.3",
6
6
  "@angular/core": "^17.3.3",
package/public-api.d.ts CHANGED
@@ -13,3 +13,5 @@ export * from './lib/core/credit-card/credit-card-types.enum';
13
13
  export * from './lib/core/countries-api/country-response.interface';
14
14
  export * from './lib/core/sdk-payment-systems/google-pay/google-pay-button-color.type';
15
15
  export * from './lib/core/xsolla-number/api/send-instruction/response/send-instruction-response.interface';
16
+ export * from './lib/core/exceptions-handling/errors';
17
+ export * from './lib/core/exceptions-handling/logger';