@xsolla/payment-client-core 0.2.15 → 0.2.16

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,15 @@
1
+ import { CountryResponse } from './country-response.interface';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ import { SettingsService } from '../settings/settings.service';
4
+ import { SecureApiClient } from '../http/secure-api/secure-api.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CountriesApiService {
7
+ private readonly secureApi;
8
+ private readonly settingsService;
9
+ countries$: BehaviorSubject<CountryResponse['countryList'] | null>;
10
+ private readonly apiRoute;
11
+ constructor(secureApi: SecureApiClient, settingsService: SettingsService);
12
+ request(): Promise<CountryResponse['countryList']>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<CountriesApiService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<CountriesApiService>;
15
+ }
@@ -0,0 +1,4 @@
1
+ import { Country } from './country.interface';
2
+ export interface CountryResponse {
3
+ countryList: Country[];
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface Country {
2
+ ISO: string;
3
+ aliases: null | string;
4
+ name: string;
5
+ }
@@ -37,6 +37,8 @@ import { SendEventMethodOptionsInterface } from './core/user-behaviour-analytics
37
37
  import { PerformanceService } from './core/performance/performance.service';
38
38
  import { CombinedPaymentMethods } from './core/combined-payment-methods/combined-payment-methods.interface';
39
39
  import { CombinedPaymentMethodsService } from './core/combined-payment-methods/combined-payment-methods.service';
40
+ import { CountriesApiService } from './core/countries-api/countries-api.service';
41
+ import { CountryResponse } from './core/countries-api/country-response.interface';
40
42
  import * as i0 from "@angular/core";
41
43
  export declare class CoreLibraryService {
42
44
  private readonly settingsService;
@@ -58,6 +60,7 @@ export declare class CoreLibraryService {
58
60
  private readonly userBehaviourAnalyticsService;
59
61
  private readonly performanceService;
60
62
  private readonly combinedPaymentMethodsService;
63
+ private readonly countriesApiService;
61
64
  paymentMethods: {
62
65
  getList: (isSaveMethodMode?: boolean) => Promise<PaymentMethod[]>;
63
66
  getQuickMethods: () => Promise<PaymentMethod[]>;
@@ -67,7 +70,7 @@ export declare class CoreLibraryService {
67
70
  deleteSavedMethod: (id: number, type: string) => Promise<boolean>;
68
71
  };
69
72
  sdkPaymentSystems: SdkPaymentSystems;
70
- 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);
73
+ 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);
71
74
  init(configuration: InitConfiguration): Promise<void>;
72
75
  getStatus(url?: string): Promise<Status>;
73
76
  sendAnalytics(action: string, type: keyof typeof userBehaviourEventTypes, options?: SendEventMethodOptionsInterface): void;
@@ -75,6 +78,7 @@ export declare class CoreLibraryService {
75
78
  qrCode: string;
76
79
  pid: number | null;
77
80
  };
81
+ getCountries(): Promise<CountryResponse['countryList']>;
78
82
  setCountry(country: string): void;
79
83
  getCountry(): string;
80
84
  createPayment(config: PaymentConfig): Payment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",
package/public-api.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from './lib/core/user-behaviour-analytics/user-behaviour-event/user-beh
9
9
  export * from './lib/core/payment/form/control-status.interface';
10
10
  export * from './lib/core/payment/field-names.enum';
11
11
  export * from './lib/core/credit-card/credit-card-types.enum';
12
+ export * from './lib/core/countries-api/country-response.interface';