@xsolla/payment-client-core 0.2.92 → 0.2.94

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.
@@ -1,15 +1,21 @@
1
1
  import { creditCardPaymentMethodId } from '../../credit-card-payment-methods-id.variable';
2
2
  import { BasePaymentConfiguration } from '../../payment-configuration.interface';
3
+ import { TransactionInitiationType } from '../../../transaction-initiation-type.enum';
3
4
  interface SpecialPaymentSettingsBase {
4
5
  useSingleExpirationDateField?: boolean;
5
6
  }
6
7
  type SpecialPaymentSettings = SpecialPaymentSettingsBase & {
7
8
  useExternalVault?: false;
8
9
  isPaymentViaSavedMethod?: never;
10
+ transactionInitiationType?: never;
9
11
  };
10
12
  type SpecialPaymentSettingsWithVault = SpecialPaymentSettingsBase & {
11
13
  useExternalVault: true;
12
- isPaymentViaSavedMethod: boolean;
14
+ /**
15
+ * @deprecated Use transactionInitiationType instead
16
+ */
17
+ isPaymentViaSavedMethod?: boolean;
18
+ transactionInitiationType?: TransactionInitiationType;
13
19
  };
14
20
  type PaymentConfigurationCreditCardBase = BasePaymentConfiguration & {
15
21
  paymentMethodId: typeof creditCardPaymentMethodId;
@@ -1,6 +1,11 @@
1
1
  import { XpsBoolean } from '../../xps-boolean.enum';
2
+ import { TransactionInitiationType } from '../../transaction-initiation-type.enum';
2
3
  export interface PaymentSettingsRequestParams {
3
4
  useSingleExpirationDateField?: XpsBoolean;
4
5
  useExternalVault?: XpsBoolean;
6
+ /**
7
+ * @deprecated Use transactionInitiationType instead
8
+ */
5
9
  isPaymentViaSavedMethod?: XpsBoolean;
10
+ transactionInitiationType?: TransactionInitiationType;
6
11
  }
@@ -4,6 +4,7 @@ import * as i0 from "@angular/core";
4
4
  export declare class PaymentSettingsService {
5
5
  getPaymentSettingsParams(config: PaymentConfiguration | null): PaymentSettingsRequestParams;
6
6
  private toXps;
7
+ private resolveTransactionInitiationType;
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<PaymentSettingsService, never>;
8
9
  static ɵprov: i0.ɵɵInjectableDeclaration<PaymentSettingsService>;
9
10
  }
@@ -19,6 +19,9 @@ export declare class GooglePayService {
19
19
  private readonly injector;
20
20
  private readonly googlePayScriptUrl;
21
21
  private readonly readyToPay;
22
+ private readonly paymentWindowIsReady;
23
+ private readonly paymentWindowIsClose;
24
+ private readonly error;
22
25
  private googlePaymentClient;
23
26
  private initParams;
24
27
  private paymentService;
@@ -28,6 +31,9 @@ export declare class GooglePayService {
28
31
  private get googlePaymentClientWasInitialized();
29
32
  constructor(window: ExtendedWindow, loggerService: LoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector);
30
33
  get readyToPay$(): Observable<boolean | null>;
34
+ get paymentWindowIsReady$(): Observable<void>;
35
+ get paymentWindowIsClose$(): Observable<void>;
36
+ get error$(): Observable<unknown>;
31
37
  isReadyToPay(): boolean | null;
32
38
  initGooglePayLibrary(data: GooglePayInitParams): void;
33
39
  checkPaymentDevice(data: CheckPaymentDeviceData): void;
@@ -0,0 +1,4 @@
1
+ export declare const enum TransactionInitiationType {
2
+ COF = "COF",
3
+ OT = "OT"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.92",
3
+ "version": "0.2.94",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.3",
6
6
  "@angular/core": "^17.3.3",
package/public-api.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './lib/core/payment/form/control-status.interface';
11
11
  export * from './lib/core/payment/field-names.enum';
12
12
  export * from './lib/core/credit-card/credit-card-types.enum';
13
13
  export * from './lib/core/countries-api/country-response.interface';
14
+ export * from './lib/core/transaction-initiation-type.enum';
14
15
  export * from './lib/core/sdk-payment-systems/google-pay/google-pay-button-color.type';
15
16
  export * from './lib/core/xsolla-number/api/send-instruction/response/send-instruction-response.interface';
16
17
  export * from './lib/core/exceptions-handling/errors';