@tap-payments/auth-jsconnect 1.0.94-test → 1.0.95-test
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/build/@types/app.d.ts +2 -2
- package/build/api/auth.d.ts +22 -3
- package/build/api/axios.d.ts +2 -2
- package/build/api/axios.js +62 -0
- package/build/api/country.d.ts +1 -2
- package/build/api/country.js +7 -8
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +5 -2
- package/build/api/index.d.ts +7 -8
- package/build/api/ip.d.ts +1 -1
- package/build/api/ip.js +5 -2
- package/build/api/lead.d.ts +2 -0
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +60 -4
- package/build/app/settings.d.ts +6 -15
- package/build/app/settings.js +82 -142
- package/build/components/AnimationFlow/AnimationFlow.d.ts +2 -1
- package/build/components/AnimationFlow/AnimationFlow.js +2 -2
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +16 -4
- package/build/constants/app.d.ts +6 -0
- package/build/constants/app.js +16 -4
- package/build/features/app/bank/bankStore.js +3 -3
- package/build/features/app/business/businessStore.js +5 -5
- package/build/features/app/connect/connectStore.js +9 -7
- package/build/features/app/individual/individualStore.d.ts +2 -2
- package/build/features/app/individual/individualStore.js +5 -5
- package/build/features/app/password/passwordStore.d.ts +29 -1
- package/build/features/app/password/passwordStore.js +181 -7
- package/build/features/app/tax/taxStore.js +4 -4
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -3
- package/build/features/business/Business.js +4 -4
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/connect/Connect.js +1 -1
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/Individual.js +4 -4
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -3
- package/build/features/password/Password.js +12 -6
- package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -2
- package/build/features/password/screens/OTP/OTP.d.ts +8 -0
- package/build/features/password/screens/OTP/OTP.js +78 -0
- package/build/features/password/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/password/screens/OTP/OTPInput.js +46 -0
- package/build/features/password/screens/OTP/index.d.ts +3 -0
- package/build/features/password/screens/OTP/index.js +2 -0
- package/build/features/password/screens/OTP/validation.d.ts +8 -0
- package/build/features/password/screens/OTP/validation.js +4 -0
- package/build/features/password/screens/Success/Success.js +8 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -4
- package/build/features/password/screens/Verify/OTPInput.d.ts +2 -2
- package/build/features/password/screens/Verify/OTPInput.js +1 -1
- package/build/features/shared/Button/FlowsButtons.d.ts +8 -2
- package/build/features/shared/Button/FlowsButtons.js +94 -6
- package/build/features/shared/Button/SuccessButton.js +17 -13
- package/build/features/tax/Tax.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -3
- package/build/hooks/useAppConfig.d.ts +1 -4
- package/build/hooks/useAppConfig.js +13 -113
- package/build/hooks/useAppTheme.js +3 -2
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +1 -2
- package/build/utils/array.d.ts +3 -0
- package/build/utils/array.js +10 -0
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +4 -0
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
|
@@ -143,14 +143,14 @@ export interface Entry {
|
|
|
143
143
|
version: string;
|
|
144
144
|
}
|
|
145
145
|
export interface DeviceInfo {
|
|
146
|
-
source: 'browser|app';
|
|
146
|
+
source: 'browser' | 'app';
|
|
147
147
|
device: DeviceDetails;
|
|
148
148
|
browser: BrowserDetails;
|
|
149
149
|
app: AppInfo & {
|
|
150
150
|
language?: string;
|
|
151
151
|
};
|
|
152
152
|
connection: Connection;
|
|
153
|
-
entry
|
|
153
|
+
entry?: Entry;
|
|
154
154
|
}
|
|
155
155
|
export interface LocalProps {
|
|
156
156
|
[country: string]: {
|
package/build/api/auth.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { LanguageMode } from '../@types';
|
|
2
3
|
export declare type MobileCredential = {
|
|
3
4
|
code: string;
|
|
4
5
|
phone: string;
|
|
@@ -14,9 +15,12 @@ export declare type IDCredential = {
|
|
|
14
15
|
};
|
|
15
16
|
export declare type CreateAuthBody = {
|
|
16
17
|
user_credentail: MobileCredential | EmailCredential | IDCredential;
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
auth_type?: number;
|
|
19
|
+
email_url?: string;
|
|
20
|
+
sign_in?: boolean;
|
|
21
|
+
step_name?: string;
|
|
19
22
|
encryption_contract: Array<string>;
|
|
23
|
+
lang?: LanguageMode;
|
|
20
24
|
};
|
|
21
25
|
export declare type VerifyAuthBody = {
|
|
22
26
|
auth_token: string;
|
|
@@ -31,6 +35,21 @@ export declare type VerifyAuthBody = {
|
|
|
31
35
|
remember_me?: boolean;
|
|
32
36
|
scopes?: Array<string>;
|
|
33
37
|
};
|
|
38
|
+
export declare type VerifyOperationAuthBody = {
|
|
39
|
+
auth_token: string;
|
|
40
|
+
auth_type: number;
|
|
41
|
+
};
|
|
42
|
+
export declare type ResetPasswordCredential = {
|
|
43
|
+
otp: string;
|
|
44
|
+
new_password: string;
|
|
45
|
+
};
|
|
46
|
+
export declare type ResetPasswordVerifyAuthBody = {
|
|
47
|
+
auth_token: string;
|
|
48
|
+
auth_type: number;
|
|
49
|
+
step_name: string;
|
|
50
|
+
user_credentail: ResetPasswordCredential;
|
|
51
|
+
encryption_contract: Array<string>;
|
|
52
|
+
};
|
|
34
53
|
export declare type CreatePasswordBody = {
|
|
35
54
|
password: string;
|
|
36
55
|
signup_token?: string;
|
|
@@ -39,7 +58,7 @@ export declare type CreatePasswordBody = {
|
|
|
39
58
|
};
|
|
40
59
|
declare const authService: {
|
|
41
60
|
createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
42
|
-
verifyAuth: (data: VerifyAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
61
|
+
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
43
62
|
createPassword: (data: CreatePasswordBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
63
|
};
|
|
45
64
|
export { authService };
|
package/build/api/axios.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
declare const instance: import("axios").AxiosInstance;
|
|
3
3
|
export declare const setAxiosGlobalHeaders: (headers: Record<string, string>) => void;
|
|
4
4
|
export declare const removeAxiosGlobalHeaders: (arr: Array<string>) => void;
|
|
5
|
-
export
|
|
5
|
+
export declare const httpClient: (config: AxiosRequestConfig) => Promise<any>;
|
|
6
6
|
export default instance;
|
package/build/api/axios.js
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
1
37
|
import axios from 'axios';
|
|
2
38
|
import { get, set } from 'lodash-es';
|
|
3
39
|
import { ENCRYPTION_FLAG } from '../constants';
|
|
@@ -42,4 +78,30 @@ export var removeAxiosGlobalHeaders = function (arr) {
|
|
|
42
78
|
delete axios.defaults.headers.common[key];
|
|
43
79
|
});
|
|
44
80
|
};
|
|
81
|
+
export var httpClient = function (config) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
|
+
var data, _a, description, error, err_1, response, data, _b, description, error;
|
|
83
|
+
return __generator(this, function (_c) {
|
|
84
|
+
switch (_c.label) {
|
|
85
|
+
case 0:
|
|
86
|
+
_c.trys.push([0, 2, , 3]);
|
|
87
|
+
return [4, instance(config)];
|
|
88
|
+
case 1:
|
|
89
|
+
data = (_c.sent()).data;
|
|
90
|
+
_a = (data.errors || [{}])[0], description = _a.description, error = _a.error;
|
|
91
|
+
if (description || error) {
|
|
92
|
+
throw new Error(description, error);
|
|
93
|
+
}
|
|
94
|
+
return [2, data];
|
|
95
|
+
case 2:
|
|
96
|
+
err_1 = _c.sent();
|
|
97
|
+
response = err_1.response;
|
|
98
|
+
data = (response || {}).data;
|
|
99
|
+
if (typeof data === 'string')
|
|
100
|
+
throw new Error(data);
|
|
101
|
+
_b = ((data === null || data === void 0 ? void 0 : data.errors) || [{}])[0], description = _b.description, error = _b.error;
|
|
102
|
+
throw new Error(description || error || 'Internal server error');
|
|
103
|
+
case 3: return [2];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}); };
|
|
45
107
|
export default instance;
|
package/build/api/country.d.ts
CHANGED
package/build/api/country.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { httpClient } from './axios';
|
|
2
2
|
import { ENDPOINT_PATHS } from '../constants';
|
|
3
|
-
var
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var getCountries = function () {
|
|
4
|
+
return httpClient({
|
|
5
|
+
method: 'post',
|
|
6
|
+
url: ENDPOINT_PATHS.COUNTRIES
|
|
7
|
+
});
|
|
8
8
|
};
|
|
9
9
|
var countryService = {
|
|
10
|
-
|
|
11
|
-
getAllCountries: getAllCountries
|
|
10
|
+
getCountries: getCountries
|
|
12
11
|
};
|
|
13
12
|
export { countryService };
|
package/build/api/firebase.d.ts
CHANGED
package/build/api/firebase.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
1
|
import { ENDPOINT_PATHS } from '../constants';
|
|
2
|
+
import { httpClient } from './axios';
|
|
3
3
|
var getLocale = function () {
|
|
4
|
-
return
|
|
4
|
+
return httpClient({
|
|
5
|
+
method: 'get',
|
|
6
|
+
url: ENDPOINT_PATHS.FIREBASE_URL
|
|
7
|
+
});
|
|
5
8
|
};
|
|
6
9
|
var firebaseService = {
|
|
7
10
|
getLocale: getLocale
|
package/build/api/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders } from './axios';
|
|
2
2
|
import { ValidateOperatorBody } from './operator';
|
|
3
|
-
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody } from './auth';
|
|
3
|
+
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody } from './auth';
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
6
|
import { EntityInfoBody, EntityBankUpdateBody } from './entity';
|
|
@@ -8,18 +8,17 @@ import { CreateAccountBody } from './account';
|
|
|
8
8
|
import { BrandListBody } from './individual';
|
|
9
9
|
declare const API: {
|
|
10
10
|
ipService: {
|
|
11
|
-
getIP: () => Promise<
|
|
11
|
+
getIP: () => Promise<any>;
|
|
12
12
|
};
|
|
13
13
|
operatorService: {
|
|
14
|
-
validateOperator: (body: ValidateOperatorBody) => Promise<
|
|
14
|
+
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
15
15
|
};
|
|
16
16
|
countryService: {
|
|
17
|
-
|
|
18
|
-
getAllCountries: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
17
|
+
getCountries: () => Promise<any>;
|
|
19
18
|
};
|
|
20
19
|
authService: {
|
|
21
20
|
createAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
22
|
-
verifyAuth: (data: VerifyAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
21
|
+
verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
22
|
createPassword: (data: CreatePasswordBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
24
23
|
};
|
|
25
24
|
leadService: {
|
|
@@ -43,7 +42,7 @@ declare const API: {
|
|
|
43
42
|
checkIbanBank: (data: import("./availabilityServices").CheckIBanBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
43
|
};
|
|
45
44
|
firebaseService: {
|
|
46
|
-
getLocale: () => Promise<
|
|
45
|
+
getLocale: () => Promise<any>;
|
|
47
46
|
};
|
|
48
47
|
accountService: {
|
|
49
48
|
createAccount: (data: CreateAccountBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -60,6 +59,6 @@ declare const API: {
|
|
|
60
59
|
getBrandList: (data: BrandListBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
61
60
|
};
|
|
62
61
|
};
|
|
63
|
-
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody };
|
|
62
|
+
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody };
|
|
64
63
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance };
|
|
65
64
|
export default API;
|
package/build/api/ip.d.ts
CHANGED
package/build/api/ip.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ENDPOINT_PATHS } from '../constants';
|
|
2
|
-
import
|
|
2
|
+
import { httpClient } from './axios';
|
|
3
3
|
var getIP = function () {
|
|
4
|
-
return
|
|
4
|
+
return httpClient({
|
|
5
|
+
method: 'get',
|
|
6
|
+
url: ENDPOINT_PATHS.IP
|
|
7
|
+
});
|
|
5
8
|
};
|
|
6
9
|
var ipService = {
|
|
7
10
|
getIP: getIP
|
package/build/api/lead.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { LanguageMode } from '../@types';
|
|
2
3
|
declare type Name = {
|
|
3
4
|
title?: string;
|
|
4
5
|
first?: string;
|
|
@@ -60,6 +61,7 @@ export declare type UpdateLeadBody = {
|
|
|
60
61
|
name: string;
|
|
61
62
|
url: string;
|
|
62
63
|
}[];
|
|
64
|
+
lang?: LanguageMode;
|
|
63
65
|
};
|
|
64
66
|
export declare type LeadVerifyBody = {
|
|
65
67
|
verify_token: string;
|
package/build/api/operator.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ export declare type ValidateOperatorBody = {
|
|
|
7
7
|
connect_pkey?: string;
|
|
8
8
|
};
|
|
9
9
|
declare const operatorService: {
|
|
10
|
-
validateOperator: (body: ValidateOperatorBody) => Promise<
|
|
10
|
+
validateOperator: (body: ValidateOperatorBody) => Promise<any>;
|
|
11
11
|
};
|
|
12
12
|
export { operatorService };
|
package/build/api/operator.js
CHANGED
|
@@ -1,8 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
5
36
|
};
|
|
37
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
38
|
+
import { httpClient } from './axios';
|
|
39
|
+
var validateOperator = function (body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
40
|
+
var data, error_1;
|
|
41
|
+
return __generator(this, function (_a) {
|
|
42
|
+
switch (_a.label) {
|
|
43
|
+
case 0:
|
|
44
|
+
_a.trys.push([0, 2, , 3]);
|
|
45
|
+
return [4, httpClient({
|
|
46
|
+
method: 'post',
|
|
47
|
+
url: ENDPOINT_PATHS.OPERATOR,
|
|
48
|
+
data: body
|
|
49
|
+
})];
|
|
50
|
+
case 1:
|
|
51
|
+
data = _a.sent();
|
|
52
|
+
if (data !== 'valid')
|
|
53
|
+
throw new Error('invalid operator');
|
|
54
|
+
return [2, data];
|
|
55
|
+
case 2:
|
|
56
|
+
error_1 = _a.sent();
|
|
57
|
+
throw new Error(error_1);
|
|
58
|
+
case 3: return [2];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}); };
|
|
6
62
|
var operatorService = {
|
|
7
63
|
validateOperator: validateOperator
|
|
8
64
|
};
|
package/build/app/settings.d.ts
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { RootState } from './store';
|
|
2
|
-
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
businessCountry:
|
|
6
|
-
|
|
2
|
+
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo, LibConfig, CountryCode } from '../@types';
|
|
3
|
+
export declare const fetchAppSettingsSync: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
|
+
countries: CountryCode[];
|
|
5
|
+
businessCountry: CountryCode;
|
|
6
|
+
locale: any;
|
|
7
|
+
deviceInfo: DeviceInfo;
|
|
7
8
|
}, void, {}>;
|
|
8
|
-
export declare const getClientIp: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
9
|
-
export declare const getBrowserFingerPrint: import("@reduxjs/toolkit").AsyncThunk<{
|
|
10
|
-
fingerPrint: import("@fingerprintjs/fingerprintjs").GetResult;
|
|
11
|
-
client: import("device-detector-js/dist/parsers/client").ClientResult;
|
|
12
|
-
device: import("device-detector-js/dist/parsers/device").DeviceResult;
|
|
13
|
-
os: import("device-detector-js/dist/parsers/operating-system").Result;
|
|
14
|
-
appInfo: AppInfo;
|
|
15
|
-
}, AppInfo, {}>;
|
|
16
|
-
export declare const getOperator: import("@reduxjs/toolkit").AsyncThunk<any, ValidateOperatorBody, {}>;
|
|
17
|
-
export declare const getLocale: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
18
9
|
export interface SettingsData {
|
|
19
10
|
skin: ThemeMode;
|
|
20
11
|
language: LanguageMode;
|