@tap-payments/auth-jsconnect 2.14.0-beta → 2.15.0-beta
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 +1 -0
- package/build/api/auth.d.ts +2 -1
- package/build/api/axios.js +9 -1
- package/build/api/headers.d.ts +1 -0
- package/build/api/headers.js +15 -0
- package/build/api/index.d.ts +5 -4
- package/build/api/index.js +2 -1
- package/build/api/lead.d.ts +2 -2
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +2 -0
- package/build/app/session.d.ts +17 -0
- package/build/app/session.js +28 -0
- package/build/app/settings.js +1 -1
- package/build/app/store.d.ts +2 -0
- package/build/assets/locales/ar.json +4 -5
- package/build/assets/locales/en.json +4 -5
- package/build/constants/app.d.ts +6 -0
- package/build/constants/app.js +118 -22
- package/build/constants/dummy.d.ts +2 -29
- package/build/constants/dummy.js +4 -4
- package/build/constants/flows.d.ts +11 -22
- package/build/constants/flows.js +12 -24
- package/build/features/app/auth/authStore.d.ts +4 -0
- package/build/features/app/auth/authStore.js +105 -1
- package/build/features/app/bank/bankStore.d.ts +7 -0
- package/build/features/app/bank/bankStore.js +87 -1
- package/build/features/app/board/boardStore.d.ts +5 -0
- package/build/features/app/board/boardStore.js +84 -1
- package/build/features/app/brand/brandStore.d.ts +7 -0
- package/build/features/app/brand/brandStore.js +86 -2
- package/build/features/app/business/businessStore.d.ts +10 -0
- package/build/features/app/business/businessStore.js +86 -2
- package/build/features/app/connect/connectStore.d.ts +6 -0
- package/build/features/app/connect/connectStore.js +106 -8
- package/build/features/app/connectExpress/connectExpressStore.d.ts +4 -0
- package/build/features/app/connectExpress/connectExpressStore.js +105 -8
- package/build/features/app/entity/entityStore.d.ts +7 -0
- package/build/features/app/entity/entityStore.js +88 -2
- package/build/features/app/individual/individualStore.d.ts +9 -0
- package/build/features/app/individual/individualStore.js +94 -6
- package/build/features/app/kyc/kycStore.d.ts +5 -5
- package/build/features/app/kyc/kycStore.js +4 -1
- package/build/features/app/password/passwordStore.d.ts +9 -0
- package/build/features/app/password/passwordStore.js +87 -1
- package/build/features/app/tax/taxStore.d.ts +7 -0
- package/build/features/app/tax/taxStore.js +84 -1
- package/build/features/app/terminal/terminalStore.d.ts +9 -0
- package/build/features/app/terminal/terminalStore.js +79 -1
- package/build/features/auth/Auth.js +3 -2
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +2 -2
- package/build/features/auth/screens/OTPSessionExpired/OTPInput.d.ts +3 -0
- package/build/features/auth/screens/OTPSessionExpired/OTPInput.js +58 -0
- package/build/features/auth/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/auth/screens/OTPSessionExpired/OTPSessionExpired.js +85 -0
- package/build/features/auth/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/auth/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/auth/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/auth/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/bank/Bank.js +3 -2
- package/build/features/bank/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/bank/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/bank/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/bank/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/bank/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/bank/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/bank/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/bank/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/board/Board.js +5 -4
- package/build/features/board/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/board/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/board/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/board/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/board/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/board/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/board/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/board/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/brand/Brand.js +3 -2
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -2
- package/build/features/brand/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/brand/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/brand/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/brand/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/brand/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/brand/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/brand/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/brand/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/business/Business.js +3 -2
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/business/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/business/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/business/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/business/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/business/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/business/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/business/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/business/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/connect/Connect.js +3 -2
- package/build/features/connect/screens/OTPSessionExpired/OTPInput.d.ts +5 -0
- package/build/features/connect/screens/OTPSessionExpired/OTPInput.js +58 -0
- package/build/features/connect/screens/OTPSessionExpired/OTPSessionExpired.d.ts +3 -0
- package/build/features/connect/screens/OTPSessionExpired/OTPSessionExpired.js +86 -0
- package/build/features/connect/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/connect/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/connect/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/connect/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/connectExpress/ConnectExpress.js +3 -2
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +2 -2
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPInput.d.ts +3 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPInput.js +58 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/OTPSessionExpired.js +85 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/entity/Entity.js +3 -2
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +2 -2
- package/build/features/entity/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/entity/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/entity/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/entity/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/entity/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/entity/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/entity/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/entity/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/featuresScreens.js +60 -0
- package/build/features/individual/Individual.js +3 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +2 -2
- package/build/features/individual/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/individual/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/individual/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/individual/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/individual/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/individual/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/individual/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/individual/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/password/Password.js +3 -2
- package/build/features/password/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/password/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/password/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/password/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/password/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/password/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/password/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/password/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/shared/Address/CountryList.d.ts +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +1 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +1 -1
- package/build/features/tax/Tax.js +3 -2
- package/build/features/tax/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/tax/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/tax/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/tax/screens/OTPSessionExpired/OTPSessionExpired.js +75 -0
- package/build/features/tax/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/tax/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/tax/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/tax/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/terminal/Terminal.js +3 -2
- package/build/features/terminal/screens/OTPSessionExpired/OTPInput.d.ts +7 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPInput.js +51 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPSessionExpired.d.ts +5 -0
- package/build/features/terminal/screens/OTPSessionExpired/OTPSessionExpired.js +89 -0
- package/build/features/terminal/screens/OTPSessionExpired/index.d.ts +2 -0
- package/build/features/terminal/screens/OTPSessionExpired/index.js +2 -0
- package/build/features/terminal/screens/OTPSessionExpired/validation.d.ts +8 -0
- package/build/features/terminal/screens/OTPSessionExpired/validation.js +4 -0
- package/build/features/terminal/screens/shared/styles.d.ts +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useSessionExpiryHandler.d.ts +8 -0
- package/build/hooks/useSessionExpiryHandler.js +71 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/package.json +1 -1
package/build/@types/app.d.ts
CHANGED
package/build/api/auth.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare type CreateAuthBody = {
|
|
|
47
47
|
user_id?: string;
|
|
48
48
|
login?: boolean;
|
|
49
49
|
};
|
|
50
|
+
export declare type CreateAuthSessionExpiredBody = Omit<CreateAuthBody, 'user_credentail'>;
|
|
50
51
|
export declare type CreateNafathAuthBody = {
|
|
51
52
|
country: string;
|
|
52
53
|
scope: string;
|
|
@@ -140,7 +141,7 @@ declare const authService: {
|
|
|
140
141
|
getVerifyAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
|
|
141
142
|
getTokenVerify: (token: string, config?: AxiosRequestConfig) => Promise<any>;
|
|
142
143
|
createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
|
|
143
|
-
createExpressAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<any>;
|
|
144
|
+
createExpressAuth: (data: CreateAuthBody | CreateAuthSessionExpiredBody, config?: AxiosRequestConfig) => Promise<any>;
|
|
144
145
|
verifyExpressLeadIdentity: (data: VerifyAuthExpressOTPBody) => Promise<any>;
|
|
145
146
|
createExpressLeadIdentityAuth: (data: CreateAuthBody) => Promise<any>;
|
|
146
147
|
getVerifyExpressAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
|
package/build/api/axios.js
CHANGED
|
@@ -47,7 +47,15 @@ var instance = axios.create({
|
|
|
47
47
|
instance.interceptors.request.use(function (config) {
|
|
48
48
|
return encryptionContractTransformer(config);
|
|
49
49
|
}, function (error) { return Promise.reject(error); });
|
|
50
|
-
instance.interceptors.response.use(function (response) {
|
|
50
|
+
instance.interceptors.response.use(function (response) {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
var errors = (_a = response.data) === null || _a === void 0 ? void 0 : _a.errors;
|
|
53
|
+
if (((_b = errors === null || errors === void 0 ? void 0 : errors[0]) === null || _b === void 0 ? void 0 : _b.code) === '7014')
|
|
54
|
+
throw new Error('session_expired');
|
|
55
|
+
if (((_c = errors === null || errors === void 0 ? void 0 : errors[0]) === null || _c === void 0 ? void 0 : _c.code) === '7013')
|
|
56
|
+
throw new Error('session_invalid');
|
|
57
|
+
return response;
|
|
58
|
+
}, function (error) {
|
|
51
59
|
return Promise.reject(error);
|
|
52
60
|
});
|
|
53
61
|
var encryptionContractTransformer = function (config) {
|
package/build/api/headers.d.ts
CHANGED
package/build/api/headers.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { getAxiosHeaders, setAxiosGlobalHeaders } from './axios';
|
|
1
13
|
export var getAuthHeaders = function (authSession) {
|
|
2
14
|
return authSession ? { st: authSession } : {};
|
|
3
15
|
};
|
|
16
|
+
export var setAuthSessionToGlobalHeaders = function (authSession) {
|
|
17
|
+
setAxiosGlobalHeaders(__assign(__assign({}, getAxiosHeaders()), (authSession && { st: authSession })));
|
|
18
|
+
};
|
package/build/api/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
|
|
2
2
|
import { ValidateOperatorBody, ConfirmBody } from './operator';
|
|
3
|
-
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody, ConfigBody, CreateNafathAuthBody, CreateKYCAuthBody } from './auth';
|
|
3
|
+
import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthExpressOTPBody, ConfigBody, CreateNafathAuthBody, CreateKYCAuthBody, CreateAuthSessionExpiredBody } from './auth';
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody, ExpressLeadVerifyBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
6
|
import { EntityInfoBody, EntityBankUpdateBody, BankDocumentInfo, UpdateEntityBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, UpdateEntityAOAFileBody, RemoveEntityActivity, MerchantListBody, CreateEntityBody } from './entity';
|
|
@@ -14,6 +14,7 @@ import { UploadFileBody } from './file';
|
|
|
14
14
|
import { DocumentUpdateBody, DocumentInfo, DocumentBody } from './document';
|
|
15
15
|
import { InitBody } from './init';
|
|
16
16
|
import { GenerateAuthLinkNewTerminalProps, UnlinkTerminalDeviceProps, LinkTerminalDeviceProps } from './terminal';
|
|
17
|
+
import { setAuthSessionToGlobalHeaders } from './headers';
|
|
17
18
|
declare const API: {
|
|
18
19
|
locationService: {
|
|
19
20
|
getIP: () => Promise<any>;
|
|
@@ -38,7 +39,7 @@ declare const API: {
|
|
|
38
39
|
getVerifyAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
39
40
|
getTokenVerify: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
40
41
|
createAuthKitNID: (data: CreateAuthBody) => Promise<any>;
|
|
41
|
-
createExpressAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
42
|
+
createExpressAuth: (data: CreateAuthBody | CreateAuthSessionExpiredBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
42
43
|
verifyExpressLeadIdentity: (data: VerifyAuthExpressOTPBody) => Promise<any>;
|
|
43
44
|
createExpressLeadIdentityAuth: (data: CreateAuthBody) => Promise<any>;
|
|
44
45
|
getVerifyExpressAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
|
|
@@ -171,6 +172,6 @@ declare const API: {
|
|
|
171
172
|
retrievePOSDevices: (merchants: string[]) => Promise<any>;
|
|
172
173
|
};
|
|
173
174
|
};
|
|
174
|
-
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody, CreateNafathAuthBody, GetUserListSegmentBody, CreateKYCAuthBody, GenerateAuthLinkNewTerminalProps, UnlinkTerminalDeviceProps, LinkTerminalDeviceProps };
|
|
175
|
-
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
175
|
+
export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody, CreateNafathAuthBody, GetUserListSegmentBody, CreateKYCAuthBody, GenerateAuthLinkNewTerminalProps, UnlinkTerminalDeviceProps, LinkTerminalDeviceProps, CreateAuthSessionExpiredBody };
|
|
176
|
+
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders, setAuthSessionToGlobalHeaders };
|
|
176
177
|
export default API;
|
package/build/api/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { fileService } from './file';
|
|
|
17
17
|
import { documentService } from './document';
|
|
18
18
|
import { initService } from './init';
|
|
19
19
|
import { terminalService } from './terminal';
|
|
20
|
+
import { setAuthSessionToGlobalHeaders } from './headers';
|
|
20
21
|
var API = {
|
|
21
22
|
locationService: locationService,
|
|
22
23
|
operatorService: operatorService,
|
|
@@ -37,5 +38,5 @@ var API = {
|
|
|
37
38
|
initService: initService,
|
|
38
39
|
terminalService: terminalService
|
|
39
40
|
};
|
|
40
|
-
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
|
|
41
|
+
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders, setAuthSessionToGlobalHeaders };
|
|
41
42
|
export default API;
|
package/build/api/lead.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export declare type UpdateLeadBody = {
|
|
|
80
80
|
date_of_birth?: string;
|
|
81
81
|
};
|
|
82
82
|
export declare type LeadVerifyBody = {
|
|
83
|
-
verify_token
|
|
83
|
+
verify_token?: string;
|
|
84
84
|
service_name: string;
|
|
85
85
|
notification?: {
|
|
86
86
|
sms: boolean;
|
|
@@ -88,7 +88,7 @@ export declare type LeadVerifyBody = {
|
|
|
88
88
|
};
|
|
89
89
|
export declare type CreateVerifyTokenBody = {
|
|
90
90
|
service_name: string;
|
|
91
|
-
board_id
|
|
91
|
+
board_id?: string;
|
|
92
92
|
notification?: {
|
|
93
93
|
sms: boolean;
|
|
94
94
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const rootReducer: {
|
|
2
|
+
session: import("redux").Reducer<import("./session").SessionState, import("redux").AnyAction>;
|
|
2
3
|
settings: import("redux").Reducer<import("./settings").SettingsState, import("redux").AnyAction>;
|
|
3
4
|
connect: import("redux").Reducer<import("../features/app/connect/connectStore").ConnectState, import("redux").AnyAction>;
|
|
4
5
|
business: import("redux").Reducer<import("../features/app/business/businessStore").BusinessState, import("redux").AnyAction>;
|
package/build/app/rootReducer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import session from './session';
|
|
1
2
|
import settings from './settings';
|
|
2
3
|
import connect from '../features/app/connect/connectStore';
|
|
3
4
|
import business from '../features/app/business/businessStore';
|
|
@@ -14,6 +15,7 @@ import auth from '../features/app/auth/authStore';
|
|
|
14
15
|
import kyc from '../features/app/kyc/kycStore';
|
|
15
16
|
import terminal from '../features/app/terminal/terminalStore';
|
|
16
17
|
var rootReducer = {
|
|
18
|
+
session: session,
|
|
17
19
|
settings: settings,
|
|
18
20
|
connect: connect,
|
|
19
21
|
business: business,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RootState } from './store';
|
|
2
|
+
import { ActionState, SharedState } from '../@types';
|
|
3
|
+
export interface SessionData {
|
|
4
|
+
isExpired: boolean;
|
|
5
|
+
nextScreen: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SessionState extends SharedState<SessionData> {
|
|
8
|
+
}
|
|
9
|
+
export declare const sessionSlice: import("@reduxjs/toolkit").Slice<SessionState, {
|
|
10
|
+
setSessionExpired: (state: SessionState) => void;
|
|
11
|
+
setNextScreen: (state: SessionState, action: ActionState<string>) => void;
|
|
12
|
+
resetSession: (state: SessionState) => void;
|
|
13
|
+
}, "session">;
|
|
14
|
+
export declare const setSessionExpired: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setNextScreen: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, resetSession: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
15
|
+
declare const _default: import("redux").Reducer<SessionState, import("redux").AnyAction>;
|
|
16
|
+
export default _default;
|
|
17
|
+
export declare const sessionSelector: (state: RootState) => SessionState;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
3
|
+
var initialState = {
|
|
4
|
+
error: null,
|
|
5
|
+
loading: false,
|
|
6
|
+
data: {
|
|
7
|
+
isExpired: false,
|
|
8
|
+
nextScreen: ''
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export var sessionSlice = createSlice({
|
|
12
|
+
name: 'session',
|
|
13
|
+
initialState: initialState,
|
|
14
|
+
reducers: {
|
|
15
|
+
setSessionExpired: function (state) {
|
|
16
|
+
state.data.isExpired = true;
|
|
17
|
+
},
|
|
18
|
+
setNextScreen: function (state, action) {
|
|
19
|
+
state.data.nextScreen = action.payload;
|
|
20
|
+
},
|
|
21
|
+
resetSession: function (state) {
|
|
22
|
+
state.data.isExpired = false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export var setSessionExpired = (_a = sessionSlice.actions, _a.setSessionExpired), setNextScreen = _a.setNextScreen, resetSession = _a.resetSession;
|
|
27
|
+
export default sessionSlice.reducer;
|
|
28
|
+
export var sessionSelector = function (state) { return state.session; };
|
package/build/app/settings.js
CHANGED
|
@@ -100,7 +100,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
|
|
|
100
100
|
_e = _f, country_list = _e.country_list, ip_info = _e.ip_info, merchant = _e.merchant, operator = _e.operator, config = _e.config;
|
|
101
101
|
list = __spreadArray([], ((country_list === null || country_list === void 0 ? void 0 : country_list.list) || []), true);
|
|
102
102
|
_g = ip_info || {}, ip = _g.ip, latitude = _g.latitude, longitude = _g.longitude, country_code = _g.country_code;
|
|
103
|
-
countries = sortCountries(list);
|
|
103
|
+
countries = sortCountries(list.filter(function (c) { return c.idd_prefix; }));
|
|
104
104
|
if (config) {
|
|
105
105
|
_h = config, operator_1 = _h.operator, scope = _h.scope, data = _h.data, lead = _h.lead, board = _h.board, interfaceData = _h.interface, redirect = _h.redirect, post = _h.post, platforms = _h.platforms, payment_provider = _h.payment_provider;
|
|
106
106
|
_j = interfaceData || {}, locale_1 = _j.locale, edges = _j.edges;
|
package/build/app/store.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ThunkAction, Action } from '@reduxjs/toolkit';
|
|
2
2
|
export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
3
|
+
session: import("./session").SessionState;
|
|
3
4
|
settings: import("./settings").SettingsState;
|
|
4
5
|
connect: import("../features/app/connect/connectStore").ConnectState;
|
|
5
6
|
business: import("../features/app/business/businessStore").BusinessState;
|
|
@@ -16,6 +17,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
16
17
|
kyc: import("../features/app/kyc/kycStore").KYCDataState;
|
|
17
18
|
terminal: import("../features/app/terminal/terminalStore").TerminalDataState;
|
|
18
19
|
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
20
|
+
session: import("./session").SessionState;
|
|
19
21
|
settings: import("./settings").SettingsState;
|
|
20
22
|
connect: import("../features/app/connect/connectStore").ConnectState;
|
|
21
23
|
business: import("../features/app/business/businessStore").BusinessState;
|
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
"capital_paid_hint": "00000",
|
|
138
138
|
"capital_paid_input_label": "رأس المال المدفوع",
|
|
139
139
|
"capital_paid_label": "رأس المال المدفوع ({{currency}})",
|
|
140
|
-
"capital_paid_input_label": "رأس المال المدفوع",
|
|
141
140
|
"capital_paid_required": "Please Enter paid amount",
|
|
142
141
|
"capital_share_count_hint": "00000",
|
|
143
142
|
"capital_share_count_label": "عدد اسهم رأس المال",
|
|
@@ -145,7 +144,6 @@
|
|
|
145
144
|
"capital_share_value_hint": "00000",
|
|
146
145
|
"capital_share_value_input_label": "قيمة السهم",
|
|
147
146
|
"capital_share_value_label": "قيمة السهم ({{currency}})",
|
|
148
|
-
"capital_share_value_input_label": "قيمة السهم",
|
|
149
147
|
"capital_share_value_required": "Please Enter share value",
|
|
150
148
|
"category": "الفئة",
|
|
151
149
|
"category_name": "اسم الفئة",
|
|
@@ -286,7 +284,6 @@
|
|
|
286
284
|
"expected_customers_to_serve": "عدد العملاء شهريا",
|
|
287
285
|
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
288
286
|
"expected_sales_monthly": "البيع المتوقع في الشهر؟ ({{currency}})",
|
|
289
|
-
"expected_sale_per_month": "البيع المتوقع في الشهر؟",
|
|
290
287
|
"expected_sales_yearly": "ما هي المبيعات المتوقعة لعملك شهريًا؟",
|
|
291
288
|
"expected_served_monthly": "عدد العملاء شهريا",
|
|
292
289
|
"expiry_date": "تاريخ الإنتهاء",
|
|
@@ -496,7 +493,6 @@
|
|
|
496
493
|
"please_choose_is_authorized": "الرجاء التأكيد إذا كنت أنت المستخدم المصرح له",
|
|
497
494
|
"please_choose_relative_pep": "هل أنت أو أحد أقاربك شخص مكشوف علنًا (PEP)",
|
|
498
495
|
"please_enter_actual_income": "ما هو دخلك الشهري ({{currency}}) ؟ ",
|
|
499
|
-
"monthly_income": "ما هو دخلك الشهري؟ ",
|
|
500
496
|
"please_enter_employer_name": "يرجى إدخال اسم منشأه العمل الخاص بك",
|
|
501
497
|
"please_try_again_after_few_minutes": "يمكنك محاولة تسجيل الدخول مرة أخرى بعد {{minutes}} دقيقة",
|
|
502
498
|
"powered_by": "بواسطة",
|
|
@@ -684,5 +680,8 @@
|
|
|
684
680
|
"year": "السنة",
|
|
685
681
|
"yes": "نعم",
|
|
686
682
|
"your_brand_details": "تفاصيل علامتك التجارية",
|
|
687
|
-
"يرجى التحقق من اسم تطبيق ابل": ""
|
|
683
|
+
"يرجى التحقق من اسم تطبيق ابل": "",
|
|
684
|
+
"session_expired_otp": "انتهت صلاحية العملية. يرجى إدخال رمز التحقق المرسل للمتابعة.",
|
|
685
|
+
"code_sent_to": "تم إرسال الرمز إلى ",
|
|
686
|
+
"session_invalid": "رمز التحقق غير صالح"
|
|
688
687
|
}
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"capital_paid_hint": "00000",
|
|
137
137
|
"capital_paid_input_label": "Capital Paid",
|
|
138
138
|
"capital_paid_label": "Capital Paid ({{currency}})",
|
|
139
|
-
"capital_paid_input_label": "Capital Paid",
|
|
140
139
|
"capital_paid_required": "Please Enter paid amount",
|
|
141
140
|
"capital_share_count_hint": "00000",
|
|
142
141
|
"capital_share_count_label": "Capital Share Count",
|
|
@@ -144,7 +143,6 @@
|
|
|
144
143
|
"capital_share_value_hint": "00000",
|
|
145
144
|
"capital_share_value_input_label": "Capital Share Value",
|
|
146
145
|
"capital_share_value_label": "Capital Share Value ({{currency}})",
|
|
147
|
-
"capital_share_value_input_label": "Capital Share Value",
|
|
148
146
|
"capital_share_value_required": "Please Enter share value",
|
|
149
147
|
"category": "Category",
|
|
150
148
|
"category_name": "Category name",
|
|
@@ -294,7 +292,6 @@
|
|
|
294
292
|
"expected_customers_to_serve": "Customers served per month",
|
|
295
293
|
"expected_sale_per_month": "Expected sale per month?",
|
|
296
294
|
"expected_sales_monthly": "Expected sale per month? ({{currency}})",
|
|
297
|
-
"expected_sale_per_month": "Expected sale per month?",
|
|
298
295
|
"expected_sales_yearly": "What is the expected sales for your business per month?",
|
|
299
296
|
"expected_served_monthly": "Customers served per month",
|
|
300
297
|
"expiry_date": "Date of expiry",
|
|
@@ -512,7 +509,6 @@
|
|
|
512
509
|
"please_choose_is_authorized": "Please tell us if you are the authorized user",
|
|
513
510
|
"please_choose_relative_pep": "Are you or one of your relatives a Publicly Exposed Person (PEP)",
|
|
514
511
|
"please_enter_actual_income": "Monthly income ({{currency}})",
|
|
515
|
-
"monthly_income": "Monthly income",
|
|
516
512
|
"please_enter_employer_name": "Please enter the name of your employer",
|
|
517
513
|
"please_try_again_after_few_minutes": "You can try to login again after {{minutes}} mins",
|
|
518
514
|
"powered_by": "Powered by",
|
|
@@ -711,5 +707,8 @@
|
|
|
711
707
|
"website_label": "Website",
|
|
712
708
|
"year": "Year",
|
|
713
709
|
"yes": "Yes",
|
|
714
|
-
"your_brand_details": "Your brand details"
|
|
710
|
+
"your_brand_details": "Your brand details",
|
|
711
|
+
"session_expired_otp": "Session expired. Please verify your phone number to continue.",
|
|
712
|
+
"code_sent_to": "Code sent to ",
|
|
713
|
+
"session_invalid": "Session Invalid"
|
|
715
714
|
}
|
package/build/constants/app.d.ts
CHANGED
|
@@ -113,6 +113,8 @@ export declare const CONNECT_STEP_NAMES: {
|
|
|
113
113
|
CONNECT_MOBILE_OWNERSHIP: string;
|
|
114
114
|
CONNECT_MOBILE_OWNERSHIP_SKIPPED: string;
|
|
115
115
|
CONNECT_SUCCESS: string;
|
|
116
|
+
CREATE_AUTH_SESSION_EXPIRED: string;
|
|
117
|
+
VERIFY_AUTH_SESSION_EXPIRED: string;
|
|
116
118
|
};
|
|
117
119
|
export declare const AUTH_STEP_NAMES: {
|
|
118
120
|
CREATE_AUTH_MOBILE: string;
|
|
@@ -124,6 +126,8 @@ export declare const AUTH_STEP_NAMES: {
|
|
|
124
126
|
VERIFY_AUTH_NID: string;
|
|
125
127
|
UPDATE_DOB_INFO: string;
|
|
126
128
|
CREATE_AUTH_PASSCODE: string;
|
|
129
|
+
CREATE_AUTH_SESSION_EXPIRED: string;
|
|
130
|
+
VERIFY_AUTH_SESSION_EXPIRED: string;
|
|
127
131
|
};
|
|
128
132
|
export declare const CONNECT_EXPRESS_STEP_NAMES: {
|
|
129
133
|
CREATE_AUTH_MOBILE: string;
|
|
@@ -144,6 +148,8 @@ export declare const CONNECT_EXPRESS_STEP_NAMES: {
|
|
|
144
148
|
COLLECT_MOBILE_OWNERSHIP: string;
|
|
145
149
|
COLLECT_MOBILE_OWNERSHIP_SKIPPED: string;
|
|
146
150
|
VERIFY_AUTH_MOBILE_OTP: string;
|
|
151
|
+
CREATE_AUTH_SESSION_EXPIRED: string;
|
|
152
|
+
VERIFY_AUTH_SESSION_EXPIRED: string;
|
|
147
153
|
};
|
|
148
154
|
export declare const SignIn_STEP_NAMES: {
|
|
149
155
|
CREATE_AUTH_MOBILE: string;
|