@xsolla/payment-client-core 0.0.8 → 0.0.9

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.
@@ -3,12 +3,14 @@ import { UntypedFormControl } from '@angular/forms';
3
3
  import { Field } from '../../field.interface';
4
4
  import { Converter } from '../converters/converter.abstract';
5
5
  import { ConvertersMap } from '../converters/converters-map.interface';
6
+ import { ControlConfig } from './control-config';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class ControlConfigService {
8
9
  private readonly convertersMap;
9
10
  private readonly injector;
10
11
  constructor(convertersMap: ConvertersMap, injector: Injector);
11
12
  getFormControl(field: Field): UntypedFormControl | null;
13
+ getConfig(field: Field): ControlConfig | null;
12
14
  getConverter(field: Field | null): Converter | null;
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ControlConfigService, never>;
14
16
  static ɵprov: i0.ɵɵInjectableDeclaration<ControlConfigService>;
@@ -5,6 +5,7 @@ import { Status } from './status/status.interface';
5
5
  import { StatusParams } from './status/status-params.interface';
6
6
  import { FinanceDetails } from './finance-details.interface';
7
7
  import { Field } from './field.interface';
8
+ import { ControlConfig } from './form/controls/control-config';
8
9
  export interface Payment {
9
10
  initialize(): Promise<Field[]>;
10
11
  submit(): Promise<NextAction | null>;
@@ -13,6 +14,9 @@ export interface Payment {
13
14
  getFinanceDetails(): FinanceDetails;
14
15
  runThreeDs(): NextAction;
15
16
  getStatus(params: StatusParams): Promise<Status>;
16
- changeFieldValue(name: string, value: string): void;
17
+ form: {
18
+ changeFieldValue(name: string, value: string): void;
19
+ getControlConfig(field: Field): ControlConfig | null;
20
+ };
17
21
  flowUpdates$: Observable<NextAction>;
18
22
  }
@@ -11,6 +11,8 @@ import { SyncService } from './sync/sync.service';
11
11
  import { StatusService } from './status/status.service';
12
12
  import { StatusParams } from './status/status-params.interface';
13
13
  import { NextActionService } from './actions/next-action.service';
14
+ import { ControlConfig } from './form/controls/control-config';
15
+ import { ControlConfigService } from './form/controls/control-config.service';
14
16
  import * as i0 from "@angular/core";
15
17
  export declare class PaymentService {
16
18
  private readonly initializeService;
@@ -19,11 +21,12 @@ export declare class PaymentService {
19
21
  private readonly formService;
20
22
  private readonly statusService;
21
23
  private readonly nextActionService;
24
+ private readonly controlConfigService;
22
25
  form: UntypedFormGroup | null;
23
26
  private data;
24
27
  private fields;
25
28
  private config;
26
- constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, nextActionService: NextActionService);
29
+ constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
27
30
  initialize(config: PaymentConfig): Promise<Field[]>;
28
31
  submit(): Promise<NextAction | null>;
29
32
  getFields(): Field[];
@@ -31,6 +34,7 @@ export declare class PaymentService {
31
34
  runThreeDs(): NextAction;
32
35
  getFinanceDetails(): FinanceDetails;
33
36
  getStatus(params: StatusParams): Promise<Status>;
37
+ getFieldConfig(field: Field): ControlConfig | null;
34
38
  changeFieldValue(name: string, value: string): void;
35
39
  static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
36
40
  static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",