@tap-payments/auth-jsconnect 1.0.93-test → 1.0.96-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 +7 -2
- package/build/@types/form.d.ts +2 -1
- package/build/api/auth.d.ts +22 -3
- package/build/api/axios.d.ts +2 -0
- package/build/api/axios.js +64 -0
- package/build/api/country.d.ts +1 -2
- package/build/api/country.js +7 -8
- package/build/api/data.d.ts +1 -0
- package/build/api/data.js +9 -2
- package/build/api/entity.d.ts +3 -1
- package/build/api/entity.js +11 -2
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +5 -2
- package/build/api/index.d.ts +10 -9
- package/build/api/ip.d.ts +1 -1
- package/build/api/ip.js +5 -2
- package/build/api/lead.d.ts +4 -1
- package/build/api/lead.js +14 -2
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +60 -4
- package/build/app/settings.d.ts +9 -12
- package/build/app/settings.js +87 -111
- 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/components/AnimationFlow/Loader.js +1 -1
- package/build/constants/api.d.ts +2 -1
- package/build/constants/api.js +5 -3
- package/build/constants/app.d.ts +6 -0
- package/build/constants/app.js +16 -4
- package/build/features/app/bank/bankStore.js +6 -4
- package/build/features/app/business/businessStore.d.ts +3 -11
- package/build/features/app/business/businessStore.js +69 -62
- package/build/features/app/connect/connectStore.d.ts +6 -17
- package/build/features/app/connect/connectStore.js +112 -61
- package/build/features/app/individual/individualStore.d.ts +3 -7
- package/build/features/app/individual/individualStore.js +28 -54
- package/build/features/app/password/passwordStore.d.ts +29 -1
- package/build/features/app/password/passwordStore.js +184 -8
- package/build/features/app/tax/taxStore.js +7 -5
- package/build/features/bank/Bank.js +4 -4
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -3
- package/build/features/business/Business.js +5 -8
- package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
- package/build/features/business/screens/OTP/OTPInput.js +3 -9
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -5
- package/build/features/connect/Connect.js +4 -8
- package/build/features/connect/screens/Merchant/BrandName.js +3 -2
- package/build/features/connect/screens/Mobile/Mobile.js +2 -2
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/connect/screens/OTP/OTPInput.js +3 -13
- package/build/features/featuresScreens.js +5 -0
- package/build/features/individual/Individual.js +5 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +10 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +10 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +89 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -0
- 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/Background/Background.js +3 -2
- package/build/features/shared/Background/LogoBackground.d.ts +1 -4
- package/build/features/shared/Background/LogoBackground.js +4 -32
- 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/shared/Footer/Footer.js +2 -3
- 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 -110
- 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
|
@@ -90,6 +90,11 @@ export interface SourceOfIncome {
|
|
|
90
90
|
name_ar: string;
|
|
91
91
|
name_en: string;
|
|
92
92
|
}
|
|
93
|
+
export interface Occupation {
|
|
94
|
+
id: string;
|
|
95
|
+
name_ar: string;
|
|
96
|
+
name_en: string;
|
|
97
|
+
}
|
|
93
98
|
export interface MonthlyIncome extends SourceOfIncome {
|
|
94
99
|
}
|
|
95
100
|
export interface AppInfo {
|
|
@@ -143,14 +148,14 @@ export interface Entry {
|
|
|
143
148
|
version: string;
|
|
144
149
|
}
|
|
145
150
|
export interface DeviceInfo {
|
|
146
|
-
source: 'browser|app';
|
|
151
|
+
source: 'browser' | 'app';
|
|
147
152
|
device: DeviceDetails;
|
|
148
153
|
browser: BrowserDetails;
|
|
149
154
|
app: AppInfo & {
|
|
150
155
|
language?: string;
|
|
151
156
|
};
|
|
152
157
|
connection: Connection;
|
|
153
|
-
entry
|
|
158
|
+
entry?: Entry;
|
|
154
159
|
}
|
|
155
160
|
export interface LocalProps {
|
|
156
161
|
[country: string]: {
|
package/build/@types/form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, SalesChannel, SourceOfIncome } from './app';
|
|
1
|
+
import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SalesChannel, SourceOfIncome } from './app';
|
|
2
2
|
export declare type MobileFormValues = {
|
|
3
3
|
mobile: string | null;
|
|
4
4
|
countryCode: CountryCode;
|
|
@@ -56,6 +56,7 @@ export declare type TaxFormValues = {
|
|
|
56
56
|
confirmPolicy: false;
|
|
57
57
|
};
|
|
58
58
|
export declare type IndividualExtraFormValues = {
|
|
59
|
+
occupation: Occupation | undefined;
|
|
59
60
|
sourceIncome: SourceOfIncome | undefined;
|
|
60
61
|
monthlyIncome: MonthlyIncome | undefined;
|
|
61
62
|
employerName: 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,4 +1,6 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
1
2
|
declare const instance: import("axios").AxiosInstance;
|
|
2
3
|
export declare const setAxiosGlobalHeaders: (headers: Record<string, string>) => void;
|
|
3
4
|
export declare const removeAxiosGlobalHeaders: (arr: Array<string>) => void;
|
|
5
|
+
export declare const httpClient: (config: AxiosRequestConfig) => Promise<any>;
|
|
4
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';
|
|
@@ -33,11 +69,39 @@ var encryptionContractTransformer = function (config) {
|
|
|
33
69
|
export var setAxiosGlobalHeaders = function (headers) {
|
|
34
70
|
Object.keys(headers).forEach(function (key) {
|
|
35
71
|
instance.defaults.headers.common[key] = headers[key];
|
|
72
|
+
axios.defaults.headers.common[key] = headers[key];
|
|
36
73
|
});
|
|
37
74
|
};
|
|
38
75
|
export var removeAxiosGlobalHeaders = function (arr) {
|
|
39
76
|
arr.forEach(function (key) {
|
|
40
77
|
delete instance.defaults.headers.common[key];
|
|
78
|
+
delete axios.defaults.headers.common[key];
|
|
41
79
|
});
|
|
42
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
|
+
}); };
|
|
43
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/data.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ declare const dataService: {
|
|
|
5
5
|
getExpectedCustomerSales: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
6
|
getSourceOfIncome: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
7
|
getMonthlyIncome: (countryCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
+
getOccupation: () => Promise<any>;
|
|
8
9
|
};
|
|
9
10
|
export { dataService };
|
package/build/api/data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import instance from './axios';
|
|
1
|
+
import instance, { httpClient } from './axios';
|
|
2
2
|
import { ENDPOINT_PATHS } from '../constants';
|
|
3
3
|
var getChannelsOfServices = function () {
|
|
4
4
|
return instance.get("".concat(ENDPOINT_PATHS.CHANNEL));
|
|
@@ -18,12 +18,19 @@ var getSourceOfIncome = function () {
|
|
|
18
18
|
var getMonthlyIncome = function (countryCode) {
|
|
19
19
|
return instance.get("".concat(ENDPOINT_PATHS.MONTHLY_INCOME, "/").concat(countryCode));
|
|
20
20
|
};
|
|
21
|
+
var getOccupation = function () {
|
|
22
|
+
return httpClient({
|
|
23
|
+
method: 'get',
|
|
24
|
+
url: "".concat(ENDPOINT_PATHS.OCCUPATION)
|
|
25
|
+
});
|
|
26
|
+
};
|
|
21
27
|
var dataService = {
|
|
22
28
|
getChannelsOfServices: getChannelsOfServices,
|
|
23
29
|
getCustomerBases: getCustomerBases,
|
|
24
30
|
getExpectedSales: getExpectedSales,
|
|
25
31
|
getExpectedCustomerSales: getExpectedCustomerSales,
|
|
26
32
|
getSourceOfIncome: getSourceOfIncome,
|
|
27
|
-
getMonthlyIncome: getMonthlyIncome
|
|
33
|
+
getMonthlyIncome: getMonthlyIncome,
|
|
34
|
+
getOccupation: getOccupation
|
|
28
35
|
};
|
|
29
36
|
export { dataService };
|
package/build/api/entity.d.ts
CHANGED
|
@@ -12,11 +12,12 @@ export declare type EntityInfoBody = {
|
|
|
12
12
|
agree_chargeback?: boolean;
|
|
13
13
|
agree_refund?: boolean;
|
|
14
14
|
employer_name?: string;
|
|
15
|
-
|
|
15
|
+
employer_country?: string | null;
|
|
16
16
|
source_income?: Array<string | undefined>;
|
|
17
17
|
actual_income?: string;
|
|
18
18
|
is_relative_PEP?: boolean | null;
|
|
19
19
|
is_influencer?: boolean | null;
|
|
20
|
+
occupation?: string;
|
|
20
21
|
step_name: string;
|
|
21
22
|
encryption_contract?: Array<string>;
|
|
22
23
|
};
|
|
@@ -38,5 +39,6 @@ declare const entityService: {
|
|
|
38
39
|
updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
39
40
|
createBankAccount: (data: EntityBankUpdateBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
40
41
|
retrieveEntityInfo: (entity_id: string, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
42
|
+
updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
|
41
43
|
};
|
|
42
44
|
export { entityService };
|
package/build/api/entity.js
CHANGED
|
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { ENDPOINT_PATHS } from '../constants';
|
|
13
|
-
import instance from './axios';
|
|
13
|
+
import instance, { httpClient } from './axios';
|
|
14
14
|
var retrieveEntityInfo = function (entity_id, config) {
|
|
15
15
|
return instance.get("".concat(ENDPOINT_PATHS.ENTITY, "/").concat(entity_id), config);
|
|
16
16
|
};
|
|
@@ -25,10 +25,19 @@ var updateEntityInfo = function (_a, config) {
|
|
|
25
25
|
var createBankAccount = function (data, config) {
|
|
26
26
|
return instance.post("".concat(ENDPOINT_PATHS.BANK), data, config);
|
|
27
27
|
};
|
|
28
|
+
var updateIndividualInfo = function (_a) {
|
|
29
|
+
var id = _a.id, data = __rest(_a, ["id"]);
|
|
30
|
+
return httpClient({
|
|
31
|
+
method: 'put',
|
|
32
|
+
url: "".concat(ENDPOINT_PATHS.INDIVIDUAL, "/").concat(id, "/info"),
|
|
33
|
+
data: data
|
|
34
|
+
});
|
|
35
|
+
};
|
|
28
36
|
var entityService = {
|
|
29
37
|
createEntityInfo: createEntityInfo,
|
|
30
38
|
updateEntityInfo: updateEntityInfo,
|
|
31
39
|
createBankAccount: createBankAccount,
|
|
32
|
-
retrieveEntityInfo: retrieveEntityInfo
|
|
40
|
+
retrieveEntityInfo: retrieveEntityInfo,
|
|
41
|
+
updateIndividualInfo: updateIndividualInfo
|
|
33
42
|
};
|
|
34
43
|
export { entityService };
|
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: {
|
|
@@ -28,7 +27,7 @@ declare const API: {
|
|
|
28
27
|
retrieveLead: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
29
28
|
verifyLeadToken: (data: LeadVerifyBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
30
29
|
verifyLeadOTP: (data: LeadOTPVerifyBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
31
|
-
updateLeadIdentity: (data: LeadIdentityUpdateBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
30
|
+
updateLeadIdentity: ({ id, ...data }: LeadIdentityUpdateBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
32
31
|
retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
33
32
|
};
|
|
34
33
|
entityService: {
|
|
@@ -36,6 +35,7 @@ declare const API: {
|
|
|
36
35
|
updateEntityInfo: ({ id, ...data }: EntityInfoBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
37
36
|
createBankAccount: (data: EntityBankUpdateBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
38
37
|
retrieveEntityInfo: (entity_id: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
38
|
+
updateIndividualInfo: ({ id, ...data }: EntityInfoBody) => Promise<any>;
|
|
39
39
|
};
|
|
40
40
|
availabilityServices: {
|
|
41
41
|
checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -43,7 +43,7 @@ declare const API: {
|
|
|
43
43
|
checkIbanBank: (data: import("./availabilityServices").CheckIBanBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
44
|
};
|
|
45
45
|
firebaseService: {
|
|
46
|
-
getLocale: () => Promise<
|
|
46
|
+
getLocale: () => Promise<any>;
|
|
47
47
|
};
|
|
48
48
|
accountService: {
|
|
49
49
|
createAccount: (data: CreateAccountBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -55,11 +55,12 @@ declare const API: {
|
|
|
55
55
|
getExpectedCustomerSales: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
56
56
|
getSourceOfIncome: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
57
57
|
getMonthlyIncome: (countryCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
58
|
+
getOccupation: () => Promise<any>;
|
|
58
59
|
};
|
|
59
60
|
individualService: {
|
|
60
61
|
getBrandList: (data: BrandListBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
61
62
|
};
|
|
62
63
|
};
|
|
63
|
-
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody };
|
|
64
|
+
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody };
|
|
64
65
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance };
|
|
65
66
|
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;
|
|
@@ -75,6 +77,7 @@ export declare type CreateLeadBody = {
|
|
|
75
77
|
country_code: string;
|
|
76
78
|
};
|
|
77
79
|
export declare type LeadIdentityUpdateBody = {
|
|
80
|
+
id: string;
|
|
78
81
|
country_code: string;
|
|
79
82
|
identification_id: string;
|
|
80
83
|
identification_id_type: string;
|
|
@@ -88,7 +91,7 @@ declare const leadService: {
|
|
|
88
91
|
retrieveLead: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
89
92
|
verifyLeadToken: (data: LeadVerifyBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
90
93
|
verifyLeadOTP: (data: LeadOTPVerifyBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
91
|
-
updateLeadIdentity: (data: LeadIdentityUpdateBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
94
|
+
updateLeadIdentity: ({ id, ...data }: LeadIdentityUpdateBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
92
95
|
retrieveEntityList: (leadId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
93
96
|
};
|
|
94
97
|
export { leadService };
|
package/build/api/lead.js
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import instance from './axios';
|
|
2
13
|
import { ENDPOINT_PATHS } from '../constants';
|
|
3
14
|
var createLead = function (data, config) {
|
|
@@ -15,8 +26,9 @@ var verifyLeadToken = function (data, config) {
|
|
|
15
26
|
var verifyLeadOTP = function (data, config) {
|
|
16
27
|
return instance.put("".concat(ENDPOINT_PATHS.LEAD_IDENTITY_VERIFY), data, config);
|
|
17
28
|
};
|
|
18
|
-
var updateLeadIdentity = function (
|
|
19
|
-
|
|
29
|
+
var updateLeadIdentity = function (_a, config) {
|
|
30
|
+
var id = _a.id, data = __rest(_a, ["id"]);
|
|
31
|
+
return instance.put("".concat(ENDPOINT_PATHS.LEAD, "/").concat(id, "/identity"), data, config);
|
|
20
32
|
};
|
|
21
33
|
var retrieveEntityList = function (leadId) {
|
|
22
34
|
return instance.get("".concat(ENDPOINT_PATHS.RETRIEVE_ENTITY_LIST, "/").concat(leadId));
|
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,16 +1,11 @@
|
|
|
1
1
|
import { RootState } from './store';
|
|
2
|
-
import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation, DeviceInfo,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
os: import("device-detector-js/dist/parsers/operating-system").Result;
|
|
10
|
-
appInfo: AppInfo;
|
|
11
|
-
}, AppInfo, {}>;
|
|
12
|
-
export declare const getOperator: import("@reduxjs/toolkit").AsyncThunk<any, ValidateOperatorBody, {}>;
|
|
13
|
-
export declare const getLocale: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
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;
|
|
8
|
+
}, void, {}>;
|
|
14
9
|
export interface SettingsData {
|
|
15
10
|
skin: ThemeMode;
|
|
16
11
|
language: LanguageMode;
|
|
@@ -20,6 +15,8 @@ export interface SettingsData {
|
|
|
20
15
|
appConfig: LibConfig;
|
|
21
16
|
open: boolean;
|
|
22
17
|
isTapOrigin: boolean;
|
|
18
|
+
businessCountry: CountryCode;
|
|
19
|
+
countries: Array<CountryCode>;
|
|
23
20
|
}
|
|
24
21
|
export interface SettingsState extends SharedState<SettingsData> {
|
|
25
22
|
}
|