@xsolla/payment-client-core 0.0.2 → 0.0.3-2
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.
- package/esm2020/lib/core/boolean-number.enum.mjs +5 -5
- package/esm2020/lib/core/country/country.service.mjs +26 -26
- package/esm2020/lib/core/deep-readonly.type.mjs +1 -1
- package/esm2020/lib/core/exceptions-handling/errors/api-error.interface.mjs +1 -1
- package/esm2020/lib/core/exceptions-handling/errors/app-error.class.mjs +5 -5
- package/esm2020/lib/core/exceptions-handling/errors/http-error.class.mjs +39 -39
- package/esm2020/lib/core/exceptions-handling/errors/response-error.class.mjs +6 -6
- package/esm2020/lib/core/exceptions-handling/http-interceptor/http-error-data.interface.mjs +1 -1
- package/esm2020/lib/core/exceptions-handling/http-interceptor/http-error-response-data.interface.mjs +1 -1
- package/esm2020/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.mjs +21 -21
- package/esm2020/lib/core/extended-window.interface.mjs +1 -1
- package/esm2020/lib/core/http/secure-api/api-url.const.mjs +2 -2
- package/esm2020/lib/core/http/secure-api/options.interface.mjs +1 -1
- package/esm2020/lib/core/http/secure-api/secure-api.service.mjs +54 -54
- package/esm2020/lib/core/legal/disclaimer.service.mjs +16 -0
- package/esm2020/lib/core/legal/legal.component.config.mjs +2 -0
- package/esm2020/lib/core/legal/legal.service.mjs +39 -0
- package/esm2020/lib/core/legal/refund-policy.service.mjs +30 -0
- package/esm2020/lib/core/legal/secure-connection.service.mjs +31 -0
- package/esm2020/lib/core/payment-methods/payment-method-api.interface.mjs +1 -1
- package/esm2020/lib/core/payment-methods/payment-method.interface.mjs +1 -1
- package/esm2020/lib/core/payment-methods/payment-methods-api.interface.mjs +1 -1
- package/esm2020/lib/core/payment-methods/payment-methods-request-params.interface.mjs +1 -1
- package/esm2020/lib/core/payment-methods/payment-methods-response.class.mjs +25 -25
- package/esm2020/lib/core/payment-methods/payment-methods-response.interface.mjs +1 -1
- package/esm2020/lib/core/payment-methods/payment-methods-response.token.mjs +7 -7
- package/esm2020/lib/core/payment-methods/payment-methods.service.mjs +57 -57
- package/esm2020/lib/core/saved-methods/saved-method-api.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-method.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods-response.class.mjs +24 -0
- package/esm2020/lib/core/saved-methods/saved-methods-response.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods-response.token.mjs +8 -0
- package/esm2020/lib/core/saved-methods/saved-methods.service.mjs +53 -0
- package/esm2020/lib/core/settings/auto-redirect-on-status.mjs +13 -13
- package/esm2020/lib/core/settings/balance.interface.mjs +1 -1
- package/esm2020/lib/core/settings/bonus.interface.mjs +1 -1
- package/esm2020/lib/core/settings/configuration.interface.mjs +1 -1
- package/esm2020/lib/core/settings/empty-utils-response.error.mjs +6 -6
- package/esm2020/lib/core/settings/header-type.enum.mjs +5 -5
- package/esm2020/lib/core/settings/offer.interface.mjs +1 -1
- package/esm2020/lib/core/settings/project.interface.mjs +1 -1
- package/esm2020/lib/core/settings/purchase.interface.mjs +1 -1
- package/esm2020/lib/core/settings/settings-mode.enum.mjs +4 -4
- package/esm2020/lib/core/settings/settings.interface.mjs +1 -1
- package/esm2020/lib/core/settings/settings.service.mjs +84 -84
- package/esm2020/lib/core/settings/status-back-show.mjs +15 -15
- package/esm2020/lib/core/settings/tracking-info.interface.mjs +1 -1
- package/esm2020/lib/core/settings/user.interface.mjs +1 -1
- package/esm2020/lib/core/settings/utils-response.interface.mjs +1 -1
- package/esm2020/lib/core/user-balance/user-balance-api.interface.mjs +2 -0
- package/esm2020/lib/core/user-balance/user-balance-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/user-balance/user-balance-response.class.mjs +8 -0
- package/esm2020/lib/core/user-balance/user-balance-response.token.mjs +8 -0
- package/esm2020/lib/core/user-balance/user-balance.service.mjs +50 -0
- package/esm2020/lib/core/window.token.mjs +2 -2
- package/esm2020/lib/core-library.module.mjs +41 -35
- package/esm2020/lib/core-library.service.mjs +42 -31
- package/esm2020/public-api.mjs +7 -6
- package/esm2020/xsolla-payment-client-core.mjs +4 -4
- package/fesm2015/xsolla-payment-client-core.mjs +618 -358
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +589 -345
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/core/boolean-number.enum.d.ts +4 -4
- package/lib/core/country/country.service.d.ts +12 -12
- package/lib/core/deep-readonly.type.d.ts +3 -3
- package/lib/core/exceptions-handling/errors/api-error.interface.d.ts +4 -4
- package/lib/core/exceptions-handling/errors/app-error.class.d.ts +3 -3
- package/lib/core/exceptions-handling/errors/http-error.class.d.ts +10 -10
- package/lib/core/exceptions-handling/errors/response-error.class.d.ts +4 -4
- package/lib/core/exceptions-handling/http-interceptor/http-error-data.interface.d.ts +20 -20
- package/lib/core/exceptions-handling/http-interceptor/http-error-response-data.interface.d.ts +7 -7
- package/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.d.ts +11 -11
- package/lib/core/extended-window.interface.d.ts +1 -1
- package/lib/core/http/secure-api/api-url.const.d.ts +2 -2
- package/lib/core/http/secure-api/options.interface.d.ts +14 -14
- package/lib/core/http/secure-api/secure-api.service.d.ts +20 -20
- package/lib/core/legal/disclaimer.service.d.ts +6 -0
- package/lib/core/legal/legal.component.config.d.ts +10 -0
- package/lib/core/legal/legal.service.d.ts +18 -0
- package/lib/core/legal/refund-policy.service.d.ts +11 -0
- package/lib/core/legal/secure-connection.service.d.ts +13 -0
- package/lib/core/payment-methods/payment-method-api.interface.d.ts +11 -11
- package/lib/core/payment-methods/payment-method.interface.d.ts +11 -11
- package/lib/core/payment-methods/payment-methods-api.interface.d.ts +10 -10
- package/lib/core/payment-methods/payment-methods-request-params.interface.d.ts +4 -4
- package/lib/core/payment-methods/payment-methods-response.class.d.ts +13 -13
- package/lib/core/payment-methods/payment-methods-response.interface.d.ts +4 -4
- package/lib/core/payment-methods/payment-methods-response.token.d.ts +7 -7
- package/lib/core/payment-methods/payment-methods.service.d.ts +20 -20
- package/lib/core/saved-methods/saved-method-api.interface.d.ts +22 -0
- package/lib/core/saved-methods/saved-method.interface.d.ts +21 -0
- package/lib/core/saved-methods/saved-methods-request-params.interface.d.ts +3 -0
- package/lib/core/saved-methods/saved-methods-response.class.d.ts +7 -0
- package/lib/core/saved-methods/saved-methods-response.interface.d.ts +4 -0
- package/lib/core/saved-methods/saved-methods-response.token.d.ts +7 -0
- package/lib/core/saved-methods/saved-methods.service.d.ts +19 -0
- package/lib/core/settings/auto-redirect-on-status.d.ts +12 -12
- package/lib/core/settings/balance.interface.d.ts +4 -4
- package/lib/core/settings/bonus.interface.d.ts +10 -10
- package/lib/core/settings/configuration.interface.d.ts +5 -5
- package/lib/core/settings/empty-utils-response.error.d.ts +4 -4
- package/lib/core/settings/header-type.enum.d.ts +4 -4
- package/lib/core/settings/offer.interface.d.ts +6 -6
- package/lib/core/settings/project.interface.d.ts +32 -32
- package/lib/core/settings/purchase.interface.d.ts +47 -47
- package/lib/core/settings/settings-mode.enum.d.ts +3 -3
- package/lib/core/settings/settings.interface.d.ts +45 -45
- package/lib/core/settings/settings.service.d.ts +30 -30
- package/lib/core/settings/status-back-show.d.ts +14 -14
- package/lib/core/settings/tracking-info.interface.d.ts +5 -5
- package/lib/core/settings/user.interface.d.ts +23 -23
- package/lib/core/settings/utils-response.interface.d.ts +16 -16
- package/lib/core/user-balance/user-balance-api.interface.d.ts +4 -0
- package/lib/core/user-balance/user-balance-request-params.interface.d.ts +3 -0
- package/lib/core/user-balance/user-balance-response.class.d.ts +6 -0
- package/lib/core/user-balance/user-balance-response.token.d.ts +7 -0
- package/lib/core/user-balance/user-balance.service.d.ts +17 -0
- package/lib/core/window.token.d.ts +3 -3
- package/lib/core-library.module.d.ts +7 -7
- package/lib/core-library.service.d.ts +32 -20
- package/package.json +1 -1
- package/public-api.d.ts +3 -2
- package/xsolla-payment-client-core-0.0.3-2.tgz +0 -0
- package/xsolla-payment-client-core-0.0.2.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface TrackingInfo {
|
|
2
|
-
projectId: number;
|
|
3
|
-
analyticsSystemName: string;
|
|
4
|
-
trackingId: string;
|
|
5
|
-
}
|
|
1
|
+
export interface TrackingInfo {
|
|
2
|
+
projectId: number;
|
|
3
|
+
analyticsSystemName: string;
|
|
4
|
+
trackingId: string;
|
|
5
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Balance } from './balance.interface';
|
|
2
|
-
export interface User {
|
|
3
|
-
requisites: {
|
|
4
|
-
id: string;
|
|
5
|
-
value: string;
|
|
6
|
-
v2: string | null;
|
|
7
|
-
};
|
|
8
|
-
session_id: string;
|
|
9
|
-
country: {
|
|
10
|
-
allow_modify: boolean;
|
|
11
|
-
localized_name: string;
|
|
12
|
-
value: string;
|
|
13
|
-
};
|
|
14
|
-
local: string;
|
|
15
|
-
age: number | null;
|
|
16
|
-
email: {
|
|
17
|
-
value: string;
|
|
18
|
-
} | null;
|
|
19
|
-
uuid: string | null;
|
|
20
|
-
ip: string | null;
|
|
21
|
-
utm_parameters: string | null;
|
|
22
|
-
user_balance: Balance | null;
|
|
23
|
-
}
|
|
1
|
+
import { Balance } from './balance.interface';
|
|
2
|
+
export interface User {
|
|
3
|
+
requisites: {
|
|
4
|
+
id: string;
|
|
5
|
+
value: string;
|
|
6
|
+
v2: string | null;
|
|
7
|
+
};
|
|
8
|
+
session_id: string;
|
|
9
|
+
country: {
|
|
10
|
+
allow_modify: boolean;
|
|
11
|
+
localized_name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
local: string;
|
|
15
|
+
age: number | null;
|
|
16
|
+
email: {
|
|
17
|
+
value: string;
|
|
18
|
+
} | null;
|
|
19
|
+
uuid: string | null;
|
|
20
|
+
ip: string | null;
|
|
21
|
+
utm_parameters: string | null;
|
|
22
|
+
user_balance: Balance | null;
|
|
23
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Bonus } from './bonus.interface';
|
|
2
|
-
import { Project } from './project.interface';
|
|
3
|
-
import { Purchase } from './purchase.interface';
|
|
4
|
-
import { Settings } from './settings.interface';
|
|
5
|
-
import { User } from './user.interface';
|
|
6
|
-
export interface UtilsResponse {
|
|
7
|
-
project: Project;
|
|
8
|
-
purchase: Purchase;
|
|
9
|
-
settings: Settings;
|
|
10
|
-
user: User;
|
|
11
|
-
purchase_external_id: string | null;
|
|
12
|
-
xsolla_product_tag: string | null;
|
|
13
|
-
experimentGroup: string | null;
|
|
14
|
-
save_payment_account: boolean | null;
|
|
15
|
-
bonus: Bonus | null;
|
|
16
|
-
}
|
|
1
|
+
import { Bonus } from './bonus.interface';
|
|
2
|
+
import { Project } from './project.interface';
|
|
3
|
+
import { Purchase } from './purchase.interface';
|
|
4
|
+
import { Settings } from './settings.interface';
|
|
5
|
+
import { User } from './user.interface';
|
|
6
|
+
export interface UtilsResponse {
|
|
7
|
+
project: Project;
|
|
8
|
+
purchase: Purchase;
|
|
9
|
+
settings: Settings;
|
|
10
|
+
user: User;
|
|
11
|
+
purchase_external_id: string | null;
|
|
12
|
+
xsolla_product_tag: string | null;
|
|
13
|
+
experimentGroup: string | null;
|
|
14
|
+
save_payment_account: boolean | null;
|
|
15
|
+
bonus: Bonus | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { UserBalanceResponse } from './user-balance-response.class';
|
|
3
|
+
type ResponseParameters = ConstructorParameters<typeof UserBalanceResponse>;
|
|
4
|
+
export type UserBalanceResponseFactory = (...args: ResponseParameters) => UserBalanceResponse;
|
|
5
|
+
export declare const userBalanceResponseFactoryToken: InjectionToken<UserBalanceResponseFactory>;
|
|
6
|
+
export declare const userBalanceResponseFactoryProvider: ValueProvider;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SecureApiClient } from '../http/secure-api/secure-api.service';
|
|
2
|
+
import { SettingsService } from '../settings/settings.service';
|
|
3
|
+
import { UserBalanceResponseFactory } from './user-balance-response.token';
|
|
4
|
+
import { UserBalanceResponse } from './user-balance-response.class';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UserBalanceService {
|
|
7
|
+
private readonly responseFactory;
|
|
8
|
+
private readonly settingsService;
|
|
9
|
+
private readonly secureApi;
|
|
10
|
+
private readonly apiRoute;
|
|
11
|
+
private readonly cache;
|
|
12
|
+
constructor(responseFactory: UserBalanceResponseFactory, settingsService: SettingsService, secureApi: SecureApiClient);
|
|
13
|
+
getUserBalance(): Promise<UserBalanceResponse>;
|
|
14
|
+
private request;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserBalanceService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserBalanceService>;
|
|
17
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { ExtendedWindow } from './extended-window.interface';
|
|
3
|
-
export declare const windowToken: InjectionToken<ExtendedWindow>;
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ExtendedWindow } from './extended-window.interface';
|
|
3
|
+
export declare const windowToken: InjectionToken<ExtendedWindow>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common/http";
|
|
3
|
-
export declare class CoreLibraryModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CoreLibraryModule, never, [typeof i1.HttpClientModule], never>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CoreLibraryModule>;
|
|
7
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common/http";
|
|
3
|
+
export declare class CoreLibraryModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CoreLibraryModule, never, [typeof i1.HttpClientModule], never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CoreLibraryModule>;
|
|
7
|
+
}
|
|
@@ -1,20 +1,32 @@
|
|
|
1
|
-
import { InitConfiguration } from './core/settings/configuration.interface';
|
|
2
|
-
import { SettingsService } from './core/settings/settings.service';
|
|
3
|
-
import { CountryService } from './core/country/country.service';
|
|
4
|
-
import { PaymentMethodsService } from './core/payment-methods/payment-methods.service';
|
|
5
|
-
import { PaymentMethod } from './core/payment-methods/payment-method.interface';
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { InitConfiguration } from './core/settings/configuration.interface';
|
|
2
|
+
import { SettingsService } from './core/settings/settings.service';
|
|
3
|
+
import { CountryService } from './core/country/country.service';
|
|
4
|
+
import { PaymentMethodsService } from './core/payment-methods/payment-methods.service';
|
|
5
|
+
import { PaymentMethod } from './core/payment-methods/payment-method.interface';
|
|
6
|
+
import { SavedMethodsService } from './core/saved-methods/saved-methods.service';
|
|
7
|
+
import { SavedMethod } from './core/saved-methods/saved-method.interface';
|
|
8
|
+
import { UserBalanceResponse } from './core/user-balance/user-balance-response.class';
|
|
9
|
+
import { UserBalanceService } from './core/user-balance/user-balance.service';
|
|
10
|
+
import { LegalService } from './core/legal/legal.service';
|
|
11
|
+
import { LegalComponentConfig } from './core/legal/legal.component.config';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
export declare class CoreLibraryService {
|
|
14
|
+
private readonly settingsService;
|
|
15
|
+
private readonly countryService;
|
|
16
|
+
private readonly paymentMethodsService;
|
|
17
|
+
private readonly savedMethodsService;
|
|
18
|
+
private readonly userBalanceService;
|
|
19
|
+
private readonly legalService;
|
|
20
|
+
paymentMethods: {
|
|
21
|
+
getList: () => Promise<PaymentMethod[]>;
|
|
22
|
+
getQuickMethods: () => Promise<PaymentMethod[]>;
|
|
23
|
+
getSavedMethods: () => Promise<SavedMethod[]>;
|
|
24
|
+
getUserBalance: () => Promise<UserBalanceResponse>;
|
|
25
|
+
};
|
|
26
|
+
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, legalService: LegalService);
|
|
27
|
+
init(configuration: InitConfiguration): Promise<void>;
|
|
28
|
+
setCountry(country: string): void;
|
|
29
|
+
getLegalComponentConfig(): LegalComponentConfig;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CoreLibraryService>;
|
|
32
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './lib/core-library.service';
|
|
2
|
-
export * from './lib/core-library.module';
|
|
1
|
+
export * from './lib/core-library.service';
|
|
2
|
+
export * from './lib/core-library.module';
|
|
3
|
+
export * from './lib/core/legal/legal.component.config';
|
|
Binary file
|
|
Binary file
|