@xsolla/payment-client-core 0.0.4 → 0.0.6
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/device-finger-print/device-finger-print-components.interface.mjs +2 -0
- package/esm2020/lib/core/device-finger-print/device-finger-print.service.mjs +167 -0
- package/esm2020/lib/core/device-finger-print/fingerprint-js.interface.mjs +2 -0
- package/esm2020/lib/core/device-finger-print/hash.type.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/elk/additional-info.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/elk/elk-logger.service.mjs +120 -0
- package/esm2020/lib/core/exceptions-handling/elk/error-without-meta-fields.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/elk/log-message.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/errors/default-terminal-error.class.mjs +8 -0
- package/esm2020/lib/core/exceptions-handling/errors/elk-error-types.enum.mjs +13 -0
- package/esm2020/lib/core/exceptions-handling/errors/tagged-error.class.mjs +16 -0
- package/esm2020/lib/core/exceptions-handling/errors/terminal-error.class.mjs +8 -0
- package/esm2020/lib/core/exceptions-handling/errors/token-error.class.mjs +7 -0
- package/esm2020/lib/core/exceptions-handling/errors/ws-error.class.mjs +10 -0
- package/esm2020/lib/core/payment/actions/action-factory-value.interface.mjs +2 -0
- package/esm2020/lib/core/payment/actions/action-type-command.map.mjs +6 -0
- package/esm2020/lib/core/payment/actions/action.interface.mjs +2 -0
- package/esm2020/lib/core/payment/actions/check-status/check-status.action.class.mjs +16 -0
- package/esm2020/lib/core/payment/actions/check-status/check-status.action.token.mjs +11 -0
- package/esm2020/lib/core/payment/actions/check-status/check-status.action.type.mjs +2 -0
- package/esm2020/lib/core/payment/actions/next-action.interface.mjs +2 -0
- package/esm2020/lib/core/payment/actions/next-action.service.mjs +55 -0
- package/esm2020/lib/core/payment/actions/next-actions.mjs +11 -0
- package/esm2020/lib/core/payment/actions/show-fields/show-fields.action.class.mjs +16 -0
- package/esm2020/lib/core/payment/actions/show-fields/show-fields.action.token.mjs +11 -0
- package/esm2020/lib/core/payment/actions/show-fields/show-fields.action.type.mjs +2 -0
- package/esm2020/lib/core/payment/actions/status-updated/status-updated.action.class.mjs +13 -0
- package/esm2020/lib/core/payment/actions/status-updated/status-updated.action.token.mjs +11 -0
- package/esm2020/lib/core/payment/actions/status-updated/status-updated.action.type.mjs +2 -0
- package/esm2020/lib/core/payment/field-names.enum.mjs +64 -0
- package/esm2020/lib/core/payment/field.interface.mjs +1 -1
- package/esm2020/lib/core/payment/form/common-control-config.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/controls/control-config.mjs +6 -0
- package/esm2020/lib/core/payment/form/controls/control-config.service.mjs +39 -0
- package/esm2020/lib/core/payment/form/controls/control-type.type.mjs +2 -0
- package/esm2020/lib/core/payment/form/controls/text-control.config.mjs +8 -0
- package/esm2020/lib/core/payment/form/converters/converter.abstract.mjs +75 -0
- package/esm2020/lib/core/payment/form/converters/converters-map.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/converters/converters-map.mjs +9 -0
- package/esm2020/lib/core/payment/form/converters/email.converter.mjs +29 -0
- package/esm2020/lib/core/payment/form/converters/zip.converter.mjs +64 -0
- package/esm2020/lib/core/payment/form/form-state.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/form.module.mjs +33 -0
- package/esm2020/lib/core/payment/form/form.service.mjs +28 -0
- package/esm2020/lib/core/payment/form/validators/convert.function.mjs +22 -0
- package/esm2020/lib/core/payment/form/validators/email-validator.mjs +7 -0
- package/esm2020/lib/core/payment/form/validators/required-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/restricted-value.validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/validation-error.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/validators/validation-errors.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/validators/validator-fn.type.mjs +2 -0
- package/esm2020/lib/core/payment/initialize/initialize-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/payment/initialize/initialize-response.class.mjs +43 -0
- package/esm2020/lib/core/payment/initialize/initialize-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/initialize/initialize.service.mjs +46 -0
- package/esm2020/lib/core/payment/payment-form.interface.mjs +2 -0
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +37 -14
- package/esm2020/lib/core/payment/status/check-status/check-status.service.mjs +56 -0
- package/esm2020/lib/core/payment/status/check-status/request/check-status-request.class.mjs +16 -0
- package/esm2020/lib/core/payment/status/check-status/request/check-status-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/status/check-status/response/check-status-response.class.mjs +9 -0
- package/esm2020/lib/core/payment/status/check-status/response/check-status-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/status/listen-status/listen-status.service.mjs +112 -0
- package/esm2020/lib/core/payment/status/status-groups.mjs +7 -0
- package/esm2020/lib/core/payment/status/status-params.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/status-request/request/status-request.class.mjs +22 -0
- package/esm2020/lib/core/payment/status/status-request/request/status-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/status/status-request/response/status-response.class.mjs +96 -0
- package/esm2020/lib/core/payment/status/status-request/response/status-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/status/status-request/status-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/status-request/status-request.service.mjs +68 -0
- package/esm2020/lib/core/payment/status/status-settings.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/status-updated.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/status.interface.mjs +1 -1
- package/esm2020/lib/core/payment/status/status.service.mjs +38 -0
- package/esm2020/lib/core/payment/status/websocket-status/websocket-status.enum.mjs +6 -0
- package/esm2020/lib/core/payment/status/websocket-status/websocket-status.service.mjs +76 -0
- package/esm2020/lib/core/payment/submit/request/submit-request.class.mjs +16 -0
- package/esm2020/lib/core/payment/submit/request/submit-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/submit/response/submit-response.class.mjs +31 -0
- package/esm2020/lib/core/payment/submit/response/submit-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/submit/submit.service.mjs +59 -0
- package/esm2020/lib/core/payment/sync/field-sync-state.interface.mjs +2 -0
- package/esm2020/lib/core/payment/sync/sync-request.class.mjs +31 -0
- package/esm2020/lib/core/payment/sync/sync-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/sync/sync-response.class.mjs +14 -0
- package/esm2020/lib/core/payment/sync/sync-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/sync/sync.service.mjs +91 -0
- package/esm2020/lib/core/payment/xps-api-part-request.abstract.mjs +8 -0
- package/esm2020/lib/core/payment/xps-api-part.abstract.mjs +19 -0
- package/esm2020/lib/core/payment/xps-error.interface.mjs +1 -1
- package/esm2020/lib/core/payment/xps-request.abstract.mjs +8 -0
- package/esm2020/lib/core/payment/xps-response.interface.mjs +1 -1
- package/esm2020/lib/core/properties.type.mjs +2 -0
- package/esm2020/lib/core/web-socket/centrifugo-web-socket.service.mjs +200 -0
- package/esm2020/lib/core/web-socket/nchan-web-socket.service.mjs +116 -0
- package/esm2020/lib/core/web-socket/web-socket-client-type.enum.mjs +6 -0
- package/esm2020/lib/core/web-socket/web-socket.factory.mjs +28 -0
- package/esm2020/lib/core/web-socket/web-socket.interface.mjs +2 -0
- package/esm2020/lib/core/xps-boolean.enum.mjs +2 -0
- package/esm2020/lib/core-library.module.mjs +43 -4
- package/esm2020/lib/core-library.service.mjs +18 -11
- package/fesm2015/xsolla-payment-client-core.mjs +2201 -87
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +2117 -83
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/device-finger-print/device-finger-print-components.interface.d.ts +4 -0
- package/lib/core/device-finger-print/device-finger-print.service.d.ts +44 -0
- package/lib/core/device-finger-print/fingerprint-js.interface.d.ts +6 -0
- package/lib/core/device-finger-print/hash.type.d.ts +3 -0
- package/lib/core/exceptions-handling/elk/additional-info.interface.d.ts +19 -0
- package/lib/core/exceptions-handling/elk/elk-logger.service.d.ts +27 -0
- package/lib/core/exceptions-handling/elk/error-without-meta-fields.interface.d.ts +8 -0
- package/lib/core/exceptions-handling/elk/log-message.interface.d.ts +8 -0
- package/lib/core/exceptions-handling/errors/default-terminal-error.class.d.ts +4 -0
- package/lib/core/exceptions-handling/errors/elk-error-types.enum.d.ts +11 -0
- package/lib/core/exceptions-handling/errors/tagged-error.class.d.ts +10 -0
- package/lib/core/exceptions-handling/errors/terminal-error.class.d.ts +5 -0
- package/lib/core/exceptions-handling/errors/token-error.class.d.ts +4 -0
- package/lib/core/exceptions-handling/errors/ws-error.class.d.ts +5 -0
- package/lib/core/payment/actions/action-factory-value.interface.d.ts +5 -0
- package/lib/core/payment/actions/action-type-command.map.d.ts +4 -0
- package/lib/core/payment/actions/check-status/check-status.action.class.d.ts +8 -0
- package/lib/core/payment/actions/check-status/check-status.action.token.d.ts +4 -0
- package/lib/core/payment/actions/check-status/check-status.action.type.d.ts +12 -0
- package/lib/core/payment/actions/next-action.interface.d.ts +4 -0
- package/lib/core/payment/actions/next-action.service.d.ts +20 -0
- package/lib/core/payment/actions/next-actions.d.ts +5 -0
- package/lib/core/payment/actions/show-fields/show-fields.action.class.d.ts +8 -0
- package/lib/core/payment/actions/show-fields/show-fields.action.token.d.ts +4 -0
- package/lib/core/payment/actions/show-fields/show-fields.action.type.d.ts +12 -0
- package/lib/core/payment/actions/status-updated/status-updated.action.class.d.ts +8 -0
- package/lib/core/payment/actions/status-updated/status-updated.action.token.d.ts +4 -0
- package/lib/core/payment/actions/status-updated/status-updated.action.type.d.ts +11 -0
- package/lib/core/payment/field-names.enum.d.ts +62 -0
- package/lib/core/payment/field.interface.d.ts +5 -5
- package/lib/core/payment/form/common-control-config.interface.d.ts +9 -0
- package/lib/core/payment/form/controls/control-config.d.ts +9 -0
- package/lib/core/payment/form/controls/control-config.service.d.ts +15 -0
- package/lib/core/payment/form/controls/control-type.type.d.ts +1 -0
- package/lib/core/payment/form/controls/text-control.config.d.ts +11 -0
- package/lib/core/payment/form/converters/converter.abstract.d.ts +23 -0
- package/lib/core/payment/form/converters/converters-map.d.ts +4 -0
- package/lib/core/payment/form/converters/converters-map.interface.d.ts +5 -0
- package/lib/core/payment/form/converters/email.converter.d.ts +14 -0
- package/lib/core/payment/form/converters/zip.converter.d.ts +21 -0
- package/lib/core/payment/form/form-state.interface.d.ts +3 -0
- package/lib/core/payment/form/form.module.d.ts +7 -0
- package/lib/core/payment/form/form.service.d.ts +12 -0
- package/lib/core/payment/form/validators/convert.function.d.ts +3 -0
- package/lib/core/payment/form/validators/email-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/required-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/restricted-value.validator.d.ts +2 -0
- package/lib/core/payment/form/validators/validation-error.interface.d.ts +4 -0
- package/lib/core/payment/form/validators/validation-errors.interface.d.ts +4 -0
- package/lib/core/payment/form/validators/validator-fn.type.d.ts +3 -0
- package/lib/core/payment/initialize/initialize-response.class.d.ts +7 -0
- package/lib/core/payment/initialize/initialize-response.token.d.ts +6 -0
- package/lib/core/payment/initialize/initialize.service.d.ts +18 -0
- package/lib/core/payment/payment-form.interface.d.ts +39 -0
- package/lib/core/payment/payment.interface.d.ts +12 -8
- package/lib/core/payment/payment.service.d.ts +23 -8
- package/lib/core/payment/status/check-status/check-status.service.d.ts +20 -0
- package/lib/core/payment/status/check-status/request/check-status-request.class.d.ts +8 -0
- package/lib/core/payment/status/check-status/request/check-status-request.token.d.ts +6 -0
- package/lib/core/payment/status/check-status/response/check-status-response.class.d.ts +8 -0
- package/lib/core/payment/status/check-status/response/check-status-response.token.d.ts +7 -0
- package/lib/core/payment/status/listen-status/listen-status.service.d.ts +28 -0
- package/lib/core/payment/status/status-groups.d.ts +5 -0
- package/lib/core/payment/status/status-params.interface.d.ts +9 -0
- package/lib/core/payment/status/status-request/request/status-request.class.d.ts +17 -0
- package/lib/core/payment/status/status-request/request/status-request.token.d.ts +6 -0
- package/lib/core/payment/status/status-request/response/status-response.class.d.ts +14 -0
- package/lib/core/payment/status/status-request/response/status-response.token.d.ts +7 -0
- package/lib/core/payment/status/status-request/status-request-params.interface.d.ts +10 -0
- package/lib/core/payment/status/status-request/status-request.service.d.ts +21 -0
- package/lib/core/payment/status/status-settings.interface.d.ts +13 -0
- package/lib/core/payment/status/status-updated.interface.d.ts +6 -0
- package/lib/core/payment/status/status.interface.d.ts +0 -1
- package/lib/core/payment/status/status.service.d.ts +16 -0
- package/lib/core/payment/status/websocket-status/websocket-status.enum.d.ts +4 -0
- package/lib/core/payment/status/websocket-status/websocket-status.service.d.ts +24 -0
- package/lib/core/payment/submit/request/submit-request.class.d.ts +13 -0
- package/lib/core/payment/submit/request/submit-request.token.d.ts +6 -0
- package/lib/core/payment/submit/response/submit-response.class.d.ts +26 -0
- package/lib/core/payment/submit/response/submit-response.token.d.ts +6 -0
- package/lib/core/payment/submit/submit.service.d.ts +21 -0
- package/lib/core/payment/sync/field-sync-state.interface.d.ts +5 -0
- package/lib/core/payment/sync/sync-request.class.d.ts +15 -0
- package/lib/core/payment/sync/sync-request.token.d.ts +6 -0
- package/lib/core/payment/sync/sync-response.class.d.ts +11 -0
- package/lib/core/payment/sync/sync-response.token.d.ts +6 -0
- package/lib/core/payment/sync/sync.service.d.ts +27 -0
- package/lib/core/payment/xps-api-part-request.abstract.d.ts +6 -0
- package/lib/core/payment/xps-api-part.abstract.d.ts +8 -0
- package/lib/core/payment/xps-error.interface.d.ts +1 -0
- package/lib/core/payment/xps-request.abstract.d.ts +6 -0
- package/lib/core/payment/xps-response.interface.d.ts +3 -6
- package/lib/core/properties.type.d.ts +3 -0
- package/lib/core/web-socket/centrifugo-web-socket.service.d.ts +41 -0
- package/lib/core/web-socket/nchan-web-socket.service.d.ts +30 -0
- package/lib/core/web-socket/web-socket-client-type.enum.d.ts +4 -0
- package/lib/core/web-socket/web-socket.factory.d.ts +13 -0
- package/lib/core/web-socket/web-socket.interface.d.ts +9 -0
- package/lib/core/xps-boolean.enum.d.ts +4 -0
- package/lib/core-library.module.d.ts +2 -1
- package/lib/core-library.service.d.ts +6 -2
- package/package.json +19 -4
- package/xsolla-payment-client-core-0.0.6.tgz +0 -0
- package/esm2020/lib/core/boolean-string.enum.mjs +0 -6
- package/esm2020/lib/core/payment/actions/action.type.mjs +0 -2
- package/esm2020/lib/core/payment/actions/check-status.action.type.mjs +0 -2
- package/esm2020/lib/core/payment/actions/next-action.type.mjs +0 -2
- package/esm2020/lib/core/payment/initialize-request-params.interface.mjs +0 -2
- package/esm2020/lib/core/payment/initialize.service.mjs +0 -39
- package/lib/core/boolean-string.enum.d.ts +0 -4
- package/lib/core/payment/actions/check-status.action.type.d.ts +0 -12
- package/lib/core/payment/actions/next-action.type.d.ts +0 -2
- package/lib/core/payment/initialize.service.d.ts +0 -16
- package/xsolla-payment-client-core-0.0.4.tgz +0 -0
- /package/lib/core/payment/actions/{action.type.d.ts → action.interface.d.ts} +0 -0
- /package/lib/core/payment/{initialize-request-params.interface.d.ts → initialize/initialize-request-params.interface.d.ts} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SecureApiClient } from '../http/secure-api/secure-api.service';
|
|
2
|
+
import { SettingsService } from '../settings/settings.service';
|
|
3
|
+
import { ExtendedWindow } from '../extended-window.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DeviceFingerPrintService {
|
|
6
|
+
private readonly secureApi;
|
|
7
|
+
private readonly settingsService;
|
|
8
|
+
private readonly window;
|
|
9
|
+
private hash;
|
|
10
|
+
private readonly apiRoute;
|
|
11
|
+
private fingerprintJs;
|
|
12
|
+
private antifraudFingerprintLibrary;
|
|
13
|
+
private readonly fingerprintApiUrl;
|
|
14
|
+
constructor(secureApi: SecureApiClient, settingsService: SettingsService, window: ExtendedWindow);
|
|
15
|
+
init(): Promise<void>;
|
|
16
|
+
getHash(): Promise<string>;
|
|
17
|
+
private loadFingerprintJs;
|
|
18
|
+
private loadAntifraudFingerprintLibrary;
|
|
19
|
+
private makeAntifraudFingerprint;
|
|
20
|
+
/**
|
|
21
|
+
*Загружаем библиотеку, генерируем данные,
|
|
22
|
+
*хешируем с помощью BASE64 и отправляем на бэкенд,
|
|
23
|
+
*в ответ получаем dfp_hash.
|
|
24
|
+
**/
|
|
25
|
+
private buildHash;
|
|
26
|
+
/**
|
|
27
|
+
*Новая версия библиотеки содержит не все компоненты, некоторые приходится имплементировать самостоятельно
|
|
28
|
+
**/
|
|
29
|
+
private getHasLiedResolution;
|
|
30
|
+
/**
|
|
31
|
+
*Бэкенд заточен под конкретные поля, которые необходимо смапить.
|
|
32
|
+
**/
|
|
33
|
+
private getComponents;
|
|
34
|
+
/**
|
|
35
|
+
* Получаем данные dfp с помощью FingerprintJS, мапим необходимые поля, добавляем хэш
|
|
36
|
+
**/
|
|
37
|
+
private generate;
|
|
38
|
+
/**
|
|
39
|
+
* Отправка dfp на сервер, в ответ получаем dfp_hash
|
|
40
|
+
**/
|
|
41
|
+
private send;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceFingerPrintService, never>;
|
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceFingerPrintService>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface AdditionalInfo {
|
|
2
|
+
location: {
|
|
3
|
+
url: string;
|
|
4
|
+
};
|
|
5
|
+
user_agent?: string;
|
|
6
|
+
project: {
|
|
7
|
+
id: number;
|
|
8
|
+
};
|
|
9
|
+
referrer: {
|
|
10
|
+
url: string;
|
|
11
|
+
};
|
|
12
|
+
viewport: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
cdn_address: string;
|
|
17
|
+
country: string;
|
|
18
|
+
local: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ErrorHandler, NgZone } from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { SettingsService } from '../../settings/settings.service';
|
|
4
|
+
import { ExtendedWindow } from '../../extended-window.interface';
|
|
5
|
+
import { ErrorTags } from '../errors/elk-error-types.enum';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ElkLoggerService implements ErrorHandler {
|
|
8
|
+
private readonly window;
|
|
9
|
+
private readonly settingsService;
|
|
10
|
+
private readonly http;
|
|
11
|
+
private readonly ngZone;
|
|
12
|
+
private readonly stackTrace;
|
|
13
|
+
private readonly vendors;
|
|
14
|
+
constructor(window: ExtendedWindow, settingsService: SettingsService, http: HttpClient, ngZone: NgZone);
|
|
15
|
+
handleError(error: Error): void;
|
|
16
|
+
log(message: string, tags: ErrorTags[], extra?: {
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}): void;
|
|
19
|
+
private parseError;
|
|
20
|
+
private loadStackTrace;
|
|
21
|
+
private getErrorTrace;
|
|
22
|
+
private getAdditionalInfo;
|
|
23
|
+
private removeErrorMetaFields;
|
|
24
|
+
private sendLog;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElkLoggerService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ElkLoggerService>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AdditionalInfo } from './additional-info.interface';
|
|
2
|
+
import { HttpErrorData } from '../http-interceptor/http-error-data.interface';
|
|
3
|
+
export interface ErrorWithoutMetaFields {
|
|
4
|
+
message: string;
|
|
5
|
+
trace: string;
|
|
6
|
+
additionalInfo: AdditionalInfo;
|
|
7
|
+
httpErrorData?: HttpErrorData;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ErrorTags } from './elk-error-types.enum';
|
|
2
|
+
import { AdditionalInfo } from '../elk/additional-info.interface';
|
|
3
|
+
export declare class TaggedError extends Error {
|
|
4
|
+
childTag: ErrorTags;
|
|
5
|
+
trace: string;
|
|
6
|
+
tags: ErrorTags[];
|
|
7
|
+
additionalInfo: AdditionalInfo;
|
|
8
|
+
private readonly parentTag;
|
|
9
|
+
constructor(message: string, tags?: ErrorTags[]);
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SubmitResponse } from '../../submit/response/submit-response.class';
|
|
2
|
+
import { Action } from '../action.interface';
|
|
3
|
+
import { CheckStatusActionData, CheckStatusActionType } from './check-status.action.type';
|
|
4
|
+
export declare class CheckStatusAction implements Action {
|
|
5
|
+
type: CheckStatusActionType;
|
|
6
|
+
data: CheckStatusActionData;
|
|
7
|
+
constructor(submitResponse: SubmitResponse);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { ActionFactoryValue } from '../action-factory-value.interface';
|
|
3
|
+
export declare const checkStatusActionFactoryToken: InjectionToken<ActionFactoryValue>;
|
|
4
|
+
export declare const checkStatusActionFactoryProvider: ValueProvider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
export type CheckStatusActionType = 'check_status';
|
|
3
|
+
export interface CheckStatusActionData {
|
|
4
|
+
invoice: number;
|
|
5
|
+
signature: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
testProject?: string;
|
|
8
|
+
testPs?: string;
|
|
9
|
+
testXsolla?: string;
|
|
10
|
+
userReturnStatus?: string;
|
|
11
|
+
}
|
|
12
|
+
export type CheckStatusAction = Action<CheckStatusActionType, CheckStatusActionData>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CheckStatusAction } from './check-status/check-status.action.type';
|
|
2
|
+
import { ShowFieldsAction } from './show-fields/show-fields.action.type';
|
|
3
|
+
import { StatusUpdatedAction } from './status-updated/status-updated.action.type';
|
|
4
|
+
export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { NextAction } from './next-action.interface';
|
|
3
|
+
import { SubmitResponse } from '../submit/response/submit-response.class';
|
|
4
|
+
import { NextActionTokens } from './next-actions';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NextActionService {
|
|
8
|
+
private readonly nextActionTokens;
|
|
9
|
+
private readonly injector;
|
|
10
|
+
private readonly flowUpdatesSubject;
|
|
11
|
+
private readonly nextActionsMap;
|
|
12
|
+
get flowUpdates$(): Observable<NextAction>;
|
|
13
|
+
constructor(nextActionTokens: NextActionTokens, injector: Injector);
|
|
14
|
+
getNextAction(submitResponse: SubmitResponse): NextAction | null;
|
|
15
|
+
emitFlowUpdates(action: NextAction): void;
|
|
16
|
+
private fillNextActionsMap;
|
|
17
|
+
private findNextAction;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NextActionService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NextActionService>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { Action } from './action.interface';
|
|
3
|
+
export type NextActionTokens = ValueProvider[];
|
|
4
|
+
export declare const nextActionsToken: InjectionToken<Action<string, object>>;
|
|
5
|
+
export declare const nextActions: NextActionTokens;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { ShowFieldsActionData, ShowFieldsActionType } from './show-fields.action.type';
|
|
3
|
+
import { SubmitResponse } from '../../submit/response/submit-response.class';
|
|
4
|
+
export declare class ShowFieldsAction implements Action {
|
|
5
|
+
type: ShowFieldsActionType;
|
|
6
|
+
data: ShowFieldsActionData;
|
|
7
|
+
constructor(submitResponse: SubmitResponse);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { ActionFactoryValue } from '../action-factory-value.interface';
|
|
3
|
+
export declare const showFieldsActionFactoryToken: InjectionToken<ActionFactoryValue>;
|
|
4
|
+
export declare const showFieldsActionFactoryProvider: ValueProvider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { XpsMessage } from '../../xps-message.interface';
|
|
4
|
+
import { XpsError } from '../../xps-error.interface';
|
|
5
|
+
export type ShowFieldsActionType = 'show_fields';
|
|
6
|
+
export interface ShowFieldsActionData {
|
|
7
|
+
fields: Field[];
|
|
8
|
+
errors: XpsError[] | null;
|
|
9
|
+
messages: XpsMessage[] | undefined;
|
|
10
|
+
order?: object;
|
|
11
|
+
}
|
|
12
|
+
export type ShowFieldsAction = Action<ShowFieldsActionType, ShowFieldsActionData>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { StatusUpdatedActionData, StatusUpdatedActionType } from './status-updated.action.type';
|
|
3
|
+
import { StatusResponse } from '../../status/status-request/response/status-response.class';
|
|
4
|
+
export declare class StatusUpdatedAction implements Action {
|
|
5
|
+
type: StatusUpdatedActionType;
|
|
6
|
+
data: StatusUpdatedActionData;
|
|
7
|
+
constructor(statusResponse: StatusResponse);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { ActionFactoryValue } from '../action-factory-value.interface';
|
|
3
|
+
export declare const statusUpdatedActionFactoryToken: InjectionToken<ActionFactoryValue>;
|
|
4
|
+
export declare const statusUpdatedActionFactoryProvider: ValueProvider;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { StatusEnum } from '../../status/status.enum';
|
|
3
|
+
export type StatusUpdatedActionType = 'status_updated';
|
|
4
|
+
export interface StatusUpdatedActionData {
|
|
5
|
+
statusState: StatusEnum;
|
|
6
|
+
group: string;
|
|
7
|
+
isCanceled?: boolean;
|
|
8
|
+
isSuccess?: boolean;
|
|
9
|
+
invoice?: number;
|
|
10
|
+
}
|
|
11
|
+
export type StatusUpdatedAction = Action<StatusUpdatedActionType, StatusUpdatedActionData>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare enum FieldNames {
|
|
2
|
+
address1 = "address1",
|
|
3
|
+
address2 = "address2",
|
|
4
|
+
address = "address",
|
|
5
|
+
allowRecurrentSubscription = "allowRecurrentSubscription",
|
|
6
|
+
allowSubscription = "allowSubscription",
|
|
7
|
+
apt = "apt",
|
|
8
|
+
availableCardTypes = "available_card_types",
|
|
9
|
+
bank = "bank",
|
|
10
|
+
birthDate = "birth_date",
|
|
11
|
+
cardMonth = "card_month",
|
|
12
|
+
cardYear = "card_year",
|
|
13
|
+
cardNumber = "card_number",
|
|
14
|
+
cardholdername = "cardholdername",
|
|
15
|
+
city = "city",
|
|
16
|
+
couponCode = "couponCode",
|
|
17
|
+
cpfName = "cpf_name",
|
|
18
|
+
cpfNumber = "cpf_number",
|
|
19
|
+
cvv = "cvv",
|
|
20
|
+
description = "description",
|
|
21
|
+
email = "email",
|
|
22
|
+
psEmail = "psEmail",
|
|
23
|
+
euCheck = "eu_check",
|
|
24
|
+
extraCvv = "extra_cvv",
|
|
25
|
+
extraCardNumber = "extra_card_number",
|
|
26
|
+
extraCardType = "extra_card_type",
|
|
27
|
+
fName = "f_name",
|
|
28
|
+
installments = "installments",
|
|
29
|
+
lName = "l_name",
|
|
30
|
+
needInstallments = "needInstallments",
|
|
31
|
+
personId = "person_id",
|
|
32
|
+
personIdAr = "person_id_ar",
|
|
33
|
+
personIdCo = "person_id_co",
|
|
34
|
+
phone = "phone",
|
|
35
|
+
purchaseDescription = "purchaseDescription",
|
|
36
|
+
recurrentType = "recurrent_type",
|
|
37
|
+
rockstarTaxes = "rockstar_taxes",
|
|
38
|
+
state = "state",
|
|
39
|
+
street = "street",
|
|
40
|
+
streetNumber = "street_number",
|
|
41
|
+
take2Taxes = "take2_taxes",
|
|
42
|
+
termsAndConditions = "termsAndConditions",
|
|
43
|
+
termsAndConditionsAtariPp = "termsAndConditionsAtariPP",
|
|
44
|
+
termsAndConditionsAtariTc = "termsAndConditionsAtariTC",
|
|
45
|
+
termsAndConditionsHtcEula = "termsAndConditionsHtcEula",
|
|
46
|
+
termsAndConditionsRobloxEula = "termsAndConditionsRobloxEula",
|
|
47
|
+
termsAndConditionsRolandEula = "termsAndConditionsRolandEula",
|
|
48
|
+
termsAndConditionsDeusLoVultEula = "termsAndConditionsDeusLoVultEula",
|
|
49
|
+
termsAndConditionsOnzenga = "termsAndConditionsOnzenga",
|
|
50
|
+
xsollaTipsAmount = "xsollaTipsAmount",
|
|
51
|
+
zip = "zip",
|
|
52
|
+
allowSave = "allowSave",
|
|
53
|
+
koreaLimitsInstruction = "korea_limits_instruction",
|
|
54
|
+
tokenApplePay = "token_applepay",
|
|
55
|
+
fixInvoice = "fix_invoice",
|
|
56
|
+
fixPid = "fix_pid",
|
|
57
|
+
signature = "signature",
|
|
58
|
+
qr = "qr",
|
|
59
|
+
sum = "sum",
|
|
60
|
+
out = "out",
|
|
61
|
+
tinkoffDisclaimer = "ps.tinkoff.disclaimer"
|
|
62
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XpsBoolean } from '../xps-boolean.enum';
|
|
2
2
|
export interface Field {
|
|
3
3
|
name: string;
|
|
4
4
|
type: string;
|
|
@@ -6,10 +6,10 @@ export interface Field {
|
|
|
6
6
|
title: string;
|
|
7
7
|
example: string;
|
|
8
8
|
options?: unknown[];
|
|
9
|
-
isMandatory:
|
|
10
|
-
isReadonly?:
|
|
11
|
-
isVisible:
|
|
12
|
-
isPakets?:
|
|
9
|
+
isMandatory: XpsBoolean;
|
|
10
|
+
isReadonly?: XpsBoolean;
|
|
11
|
+
isVisible: XpsBoolean;
|
|
12
|
+
isPakets?: XpsBoolean;
|
|
13
13
|
tooltip?: string;
|
|
14
14
|
regex?: string;
|
|
15
15
|
validation_error_msg?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { ControlType } from './control-type.type';
|
|
3
|
+
export declare class ControlConfig {
|
|
4
|
+
[option: string]: any;
|
|
5
|
+
controlType: ControlType | string;
|
|
6
|
+
name: string;
|
|
7
|
+
title?: string | null | SafeHtml;
|
|
8
|
+
shouldHideUserInput?: boolean | null;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { Field } from '../../field.interface';
|
|
4
|
+
import { Converter } from '../converters/converter.abstract';
|
|
5
|
+
import { ConvertersMap } from '../converters/converters-map.interface';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class ControlConfigService {
|
|
8
|
+
private readonly convertersMap;
|
|
9
|
+
private readonly injector;
|
|
10
|
+
constructor(convertersMap: ConvertersMap, injector: Injector);
|
|
11
|
+
getFormControl(field: Field): UntypedFormControl | null;
|
|
12
|
+
getConverter(field: Field | null): Converter | null;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ControlConfigService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ControlConfigService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ControlType = 'text' | 'checkbox' | 'radio' | 'search-select' | 'phone' | 'phone-or-email';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ControlConfig } from './control-config';
|
|
2
|
+
export declare class TextControlConfig extends ControlConfig {
|
|
3
|
+
controlType: string;
|
|
4
|
+
dataType?: string;
|
|
5
|
+
maxLength?: number;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
autocomplete?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
inputMode?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AsyncValidatorFn, UntypedFormControl, ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { SyncService } from '../../sync/sync.service';
|
|
4
|
+
import { ControlConfig } from '../controls/control-config';
|
|
5
|
+
import { FormState } from '../form-state.interface';
|
|
6
|
+
export declare abstract class Converter {
|
|
7
|
+
protected syncService: SyncService;
|
|
8
|
+
protected constructor(syncService: SyncService);
|
|
9
|
+
convertToConfig(field: Field, formState?: FormState): ControlConfig;
|
|
10
|
+
convertToFormControl(field: Field): UntypedFormControl;
|
|
11
|
+
getValidators(field: Field): ValidatorFn[];
|
|
12
|
+
getAsyncValidators(field: Field): AsyncValidatorFn | AsyncValidatorFn[] | null;
|
|
13
|
+
createDefaultControlConfig<T extends {
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}>(controlConfigClass: new () => T, field: Field): T;
|
|
16
|
+
getValue(field: Field): string;
|
|
17
|
+
protected abstract createControlConfig(field: Field, formState?: FormState): ControlConfig;
|
|
18
|
+
protected getDataType(): string;
|
|
19
|
+
protected getAutocomplete(): string;
|
|
20
|
+
protected shouldHideUserInput(): boolean;
|
|
21
|
+
private getCommonControlConfig;
|
|
22
|
+
private copyCommonOptions;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { SyncService } from '../../sync/sync.service';
|
|
4
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
5
|
+
import { Converter } from './converter.abstract';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class EmailConverter extends Converter {
|
|
8
|
+
constructor(syncService: SyncService);
|
|
9
|
+
getValidators(field: Field): ValidatorFn[];
|
|
10
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
11
|
+
protected getDataType(): string;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailConverter, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EmailConverter>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { CountryService } from '../../../country/country.service';
|
|
3
|
+
import { Field } from '../../field.interface';
|
|
4
|
+
import { SyncService } from '../../sync/sync.service';
|
|
5
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
6
|
+
import { Converter } from './converter.abstract';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class ZipConverter extends Converter {
|
|
9
|
+
private readonly countryService;
|
|
10
|
+
private readonly minLength;
|
|
11
|
+
private readonly maxLength;
|
|
12
|
+
private readonly usCountryLength;
|
|
13
|
+
constructor(syncService: SyncService, countryService: CountryService);
|
|
14
|
+
private get isUsCountry();
|
|
15
|
+
getValidators(field: Field): ValidatorFn[];
|
|
16
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
17
|
+
protected getAutocomplete(): string;
|
|
18
|
+
protected getDataType(): string;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZipConverter, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ZipConverter>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/forms";
|
|
3
|
+
export declare class FormModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormModule, never, [typeof i1.ReactiveFormsModule], never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FormModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UntypedFormGroup } from '@angular/forms';
|
|
2
|
+
import { Field } from '../field.interface';
|
|
3
|
+
import { ControlConfigService } from './controls/control-config.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FormService {
|
|
6
|
+
protected readonly controlConfigService: ControlConfigService;
|
|
7
|
+
constructor(controlConfigService: ControlConfigService);
|
|
8
|
+
createForm(fields: Field[]): UntypedFormGroup;
|
|
9
|
+
private getVisibleFields;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PaymentForm } from '../payment-form.interface';
|
|
2
|
+
import { XpsResponse } from '../xps-response.interface';
|
|
3
|
+
export declare class InitializeResponse {
|
|
4
|
+
readonly paymentForm: PaymentForm | null;
|
|
5
|
+
constructor(response: XpsResponse);
|
|
6
|
+
private extractPaymentForm;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { InitializeResponse } from './initialize-response.class';
|
|
3
|
+
export type ResponseParameters = ConstructorParameters<typeof InitializeResponse>;
|
|
4
|
+
export type InitializeResponseFactory = (...args: ResponseParameters) => InitializeResponse;
|
|
5
|
+
export declare const initializeResponseFactoryToken: InjectionToken<InitializeResponseFactory>;
|
|
6
|
+
export declare const initializeResponseFactoryProvider: ValueProvider;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CountryService } from '../../country/country.service';
|
|
2
|
+
import { SecureApiClient } from '../../http/secure-api/secure-api.service';
|
|
3
|
+
import { SettingsService } from '../../settings/settings.service';
|
|
4
|
+
import { PaymentConfig } from '../payment-config.interface';
|
|
5
|
+
import { InitializeResponseFactory } from './initialize-response.token';
|
|
6
|
+
import { InitializeResponse } from './initialize-response.class';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class InitializeService {
|
|
9
|
+
protected readonly responseFactory: InitializeResponseFactory;
|
|
10
|
+
private readonly secureApi;
|
|
11
|
+
private readonly settingsService;
|
|
12
|
+
private readonly countryService;
|
|
13
|
+
private readonly apiRoute;
|
|
14
|
+
constructor(responseFactory: InitializeResponseFactory, secureApi: SecureApiClient, settingsService: SettingsService, countryService: CountryService);
|
|
15
|
+
request(config: PaymentConfig): Promise<InitializeResponse>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitializeService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InitializeService>;
|
|
18
|
+
}
|