@xsolla/payment-client-core 0.1.13 → 0.1.14-test

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,11 @@
1
+ import { EmitDataService } from '../emit-data.service.abstract';
2
+ import { XpsMessage } from '../xps-message.interface';
3
+ import { UnescapeHtmlPipe } from '../../../shared/pipes/unescape-html/unescape-html.pipe';
4
+ import * as i0 from "@angular/core";
5
+ export declare class FormMessagesService extends EmitDataService<string[]> {
6
+ private readonly unescapeHtmlPipe;
7
+ constructor(unescapeHtmlPipe: UnescapeHtmlPipe);
8
+ emitOnResponse(messages?: XpsMessage[]): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormMessagesService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormMessagesService>;
11
+ }
@@ -22,6 +22,7 @@ export interface Payment {
22
22
  getControlConfig(field: Field): ControlConfig | null;
23
23
  changeFieldState(name: string, state: InputEventName): void;
24
24
  updateFieldFormState(fieldName: string, formState: FormState): void;
25
+ formMessages$: Observable<string[]>;
25
26
  };
26
27
  financeDetailsUpdates$: Observable<FinanceDetails>;
27
28
  }
@@ -20,6 +20,7 @@ import { FormFieldsStatus } from './form/form-fields-status.interface';
20
20
  import { ThreeDsService } from './three-ds/three-ds.service';
21
21
  import { CreditCardStateService } from './credit-card-state/credit-card-state.service';
22
22
  import { FormState } from './form/form-state.interface';
23
+ import { FormMessagesService } from './form-messages/form-messages.service';
23
24
  import * as i0 from "@angular/core";
24
25
  export declare class PaymentService {
25
26
  private readonly initializeService;
@@ -32,6 +33,7 @@ export declare class PaymentService {
32
33
  private readonly nextActionService;
33
34
  private readonly controlConfigService;
34
35
  private readonly threeDsService;
36
+ private readonly formMessagesService;
35
37
  form: UntypedFormGroup | null;
36
38
  get formFieldsStatus$(): Observable<FormFieldsStatus>;
37
39
  private data;
@@ -42,7 +44,7 @@ export declare class PaymentService {
42
44
  private destroy$;
43
45
  private formDestroy$;
44
46
  private readonly formFieldsStatusSubject;
45
- constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService);
47
+ constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService, formMessagesService: FormMessagesService);
46
48
  initialize(config: PaymentConfig): Promise<Field[]>;
47
49
  submit(): Promise<NextAction | null | void>;
48
50
  getFields(): Field[];
@@ -58,6 +60,7 @@ export declare class PaymentService {
58
60
  private emitFinanceDetails;
59
61
  private emitCreditCardState;
60
62
  private emitFormFieldsStatus;
63
+ private emitFormMessages;
61
64
  private setupSyncService;
62
65
  private listenFinanceDetails;
63
66
  private listenFormStatusChanges;
@@ -1,4 +1,6 @@
1
+ import { XpsBoolean } from "../xps-boolean.enum";
1
2
  export interface PaymentMethodsRequestParams {
2
3
  access_token: string;
3
4
  country: string;
5
+ save_payment_account_only?: XpsBoolean;
4
6
  }
@@ -12,7 +12,7 @@ export declare class PaymentMethodsService {
12
12
  private readonly apiRoute;
13
13
  private readonly cache;
14
14
  constructor(responseFactory: PaymentMethodsResponseFactory, settingsService: SettingsService, countryService: CountryService, secureApi: SecureApiClient);
15
- getList(): Promise<PaymentMethod[]>;
15
+ getList(isSaveMethodMode: boolean): Promise<PaymentMethod[]>;
16
16
  getQuickMethods(): Promise<PaymentMethod[]>;
17
17
  private request;
18
18
  static ɵfac: i0.ɵɵFactoryDeclaration<PaymentMethodsService, never>;
@@ -27,6 +27,7 @@ import { CreditCardState } from './core/payment/credit-card-state/credit-card-st
27
27
  import { FinanceDetails } from './core/payment/finance-details/finance-details.interface';
28
28
  import { NextAction } from './core/payment/actions/next-action.interface';
29
29
  import { Balance } from './core/settings/balance.interface';
30
+ import { FormMessagesService } from './core/payment/form-messages/form-messages.service';
30
31
  import * as i0 from "@angular/core";
31
32
  export declare class CoreLibraryService {
32
33
  private readonly settingsService;
@@ -43,13 +44,14 @@ export declare class CoreLibraryService {
43
44
  private readonly nextActionService;
44
45
  private readonly creditCardService;
45
46
  private readonly creditCardStateService;
47
+ private readonly formMessagesService;
46
48
  paymentMethods: {
47
- getList: () => Promise<PaymentMethod[]>;
49
+ getList: (isSaveMethodMode: boolean) => Promise<PaymentMethod[]>;
48
50
  getQuickMethods: () => Promise<PaymentMethod[]>;
49
51
  getSavedMethods: () => Promise<SavedMethod[]>;
50
52
  getUserBalance: () => Promise<UserBalanceResponse>;
51
53
  };
52
- 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);
54
+ 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);
53
55
  init(configuration: InitConfiguration): Promise<void>;
54
56
  getStatus(url?: string): Promise<Status>;
55
57
  setCountry(country: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.1.13",
3
+ "version": "0.1.14-test",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",