@xsolla/payment-client-core 0.1.14 → 0.1.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,5 @@
1
+ export interface DeleteMethodResponse {
2
+ api: {
3
+ ver: string;
4
+ };
5
+ }
@@ -0,0 +1,14 @@
1
+ import { SettingsService } from '../settings/settings.service';
2
+ import { SecureApiClient } from '../http/secure-api/secure-api.service';
3
+ import { SavedMethodsService } from '../saved-methods/saved-methods.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class EditSavedMethodsService {
6
+ private readonly savedMethodsService;
7
+ private readonly settingsService;
8
+ private readonly secureApi;
9
+ private readonly deleteRoute;
10
+ constructor(savedMethodsService: SavedMethodsService, settingsService: SettingsService, secureApi: SecureApiClient);
11
+ deleteSavedMethodRequest(id: number, type: string): Promise<boolean>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditSavedMethodsService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<EditSavedMethodsService>;
14
+ }
@@ -1,3 +1,4 @@
1
+ import { XpsBoolean } from '../../xps-boolean.enum';
1
2
  export interface InitializeRequestParams {
2
3
  [fieldName: `xps_${string}`]: unknown;
3
4
  access_token: string;
@@ -5,4 +6,6 @@ export interface InitializeRequestParams {
5
6
  refer: string;
6
7
  country?: string;
7
8
  returnUrl?: string;
9
+ paymentWithSavedMethod: XpsBoolean;
10
+ saved_method_id?: number;
8
11
  }
@@ -2,4 +2,6 @@ export interface PaymentConfig {
2
2
  paymentMethodId: number;
3
3
  returnUrl: string;
4
4
  accountId?: number;
5
+ paymentWithSavedMethod?: boolean;
6
+ savedMethodId?: number;
5
7
  }
@@ -10,7 +10,7 @@ export declare class SavedMethodsService {
10
10
  private readonly apiRoute;
11
11
  private readonly cache;
12
12
  constructor(responseFactory: SavedMethodsResponseFactory, settingsService: SettingsService, secureApi: SecureApiClient);
13
- getList(): Promise<SavedMethod[]>;
13
+ getList(needResetCache?: boolean): Promise<SavedMethod[]>;
14
14
  private request;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<SavedMethodsService, never>;
16
16
  static ɵprov: i0.ɵɵInjectableDeclaration<SavedMethodsService>;
@@ -28,6 +28,7 @@ import { FinanceDetails } from './core/payment/finance-details/finance-details.i
28
28
  import { NextAction } from './core/payment/actions/next-action.interface';
29
29
  import { Balance } from './core/settings/balance.interface';
30
30
  import { FormMessagesService } from './core/payment/form-messages/form-messages.service';
31
+ import { EditSavedMethodsService } from './core/edit-saved-methods/edit-saved-methods.service';
31
32
  import * as i0 from "@angular/core";
32
33
  export declare class CoreLibraryService {
33
34
  private readonly settingsService;
@@ -45,13 +46,15 @@ export declare class CoreLibraryService {
45
46
  private readonly creditCardService;
46
47
  private readonly creditCardStateService;
47
48
  private readonly formMessagesService;
49
+ private readonly editSavedMethodsService;
48
50
  paymentMethods: {
49
51
  getList: () => Promise<PaymentMethod[]>;
50
52
  getQuickMethods: () => Promise<PaymentMethod[]>;
51
53
  getSavedMethods: () => Promise<SavedMethod[]>;
52
54
  getUserBalance: () => Promise<UserBalanceResponse>;
55
+ deleteSavedMethod: (id: number, type: string) => Promise<boolean>;
53
56
  };
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);
57
+ 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);
55
58
  init(configuration: InitConfiguration): Promise<void>;
56
59
  getStatus(url?: string): Promise<Status>;
57
60
  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.14",
3
+ "version": "0.1.16",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0",