@tap-payments/auth-jsconnect 1.0.33 → 1.0.36
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/form.d.ts +8 -1
- package/build/api/account.d.ts +15 -0
- package/build/api/account.js +9 -0
- package/build/api/data.d.ts +6 -0
- package/build/api/data.js +17 -0
- package/build/api/entity.d.ts +4 -4
- package/build/api/index.d.ts +10 -1
- package/build/api/index.js +5 -1
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/Input/Input.js +1 -1
- package/build/constants/api.d.ts +4 -0
- package/build/constants/api.js +9 -1
- package/build/constants/app.d.ts +5 -1
- package/build/constants/app.js +5 -1
- package/build/features/app/business/businessStore.d.ts +26 -5
- package/build/features/app/business/businessStore.js +221 -40
- package/build/features/app/connect/connectStore.d.ts +8 -2
- package/build/features/app/connect/connectStore.js +19 -1
- package/build/features/business/screens/Activities/Activities.js +12 -12
- package/build/features/business/screens/Activities/ActivitiesList.js +14 -4
- package/build/features/business/screens/Activities/SalesChannels.js +11 -2
- package/build/features/business/screens/Confirm/Confirm.js +3 -3
- package/build/features/business/screens/Customers/Customers.js +3 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +1 -1
- package/build/features/business/screens/IDBOD/validation.js +2 -3
- package/build/features/business/screens/Success/Success.js +6 -0
- package/build/features/business/screens/Verify/Verify.js +2 -1
- package/build/features/connect/screens/Individual/Individual.js +6 -1
- package/build/features/connect/screens/Merchant/Merchant.js +6 -1
- package/build/features/connect/screens/Mobile/Mobile.js +6 -1
- package/build/features/connect/screens/NID/NID.js +6 -1
- package/build/features/connect/screens/OTP/OTP.js +6 -1
- package/build/features/connect/screens/OTP/OTPInput.js +0 -3
- package/build/features/connect/screens/Password/Password.js +6 -1
- package/build/features/shared/Button/Button.js +16 -11
- package/build/utils/string.js +2 -1
- package/package.json +1 -1
package/build/@types/form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Activity, CountryCode, SalesChannel } from './app';
|
|
1
|
+
import { Activity, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, SalesChannel } from './app';
|
|
2
2
|
export declare type MobileFormValues = {
|
|
3
3
|
mobile: string | null;
|
|
4
4
|
countryCode: CountryCode;
|
|
@@ -43,3 +43,10 @@ export declare type ActivitiesFormValues = {
|
|
|
43
43
|
salesChannels: Array<SalesChannel>;
|
|
44
44
|
operationStartDate: string;
|
|
45
45
|
};
|
|
46
|
+
export declare type CustomersFormValues = {
|
|
47
|
+
customerLocations: Array<CustomerLocation>;
|
|
48
|
+
expectedCustomers: ExpectedCustomer | undefined;
|
|
49
|
+
expectedSalesRange: ExpectedSaleRange | undefined;
|
|
50
|
+
refundPolicy: boolean;
|
|
51
|
+
transactionPolicy: boolean;
|
|
52
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
export declare type CreateAccountBody = {
|
|
3
|
+
lead_id: string;
|
|
4
|
+
notify: {
|
|
5
|
+
email: boolean;
|
|
6
|
+
phone: boolean;
|
|
7
|
+
};
|
|
8
|
+
skip_legacy: boolean;
|
|
9
|
+
is_acknowledged: boolean;
|
|
10
|
+
step_name: string;
|
|
11
|
+
};
|
|
12
|
+
declare const accountService: {
|
|
13
|
+
createAccount: (data: CreateAccountBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
|
+
};
|
|
15
|
+
export { accountService };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import instance from './axios';
|
|
2
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
3
|
+
var createAccount = function (data, config) {
|
|
4
|
+
return instance.post("".concat(ENDPOINT_PATHS.CREATE_ACCOUNT, "/").concat(data.lead_id), data, config);
|
|
5
|
+
};
|
|
6
|
+
var accountService = {
|
|
7
|
+
createAccount: createAccount
|
|
8
|
+
};
|
|
9
|
+
export { accountService };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const dataService: {
|
|
2
|
+
getChannelsOfServices: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
3
|
+
getCustomerBases: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
getExpectedSales: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
+
};
|
|
6
|
+
export { dataService };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import instance from './axios';
|
|
2
|
+
import { ENDPOINT_PATHS } from '../constants';
|
|
3
|
+
var getChannelsOfServices = function () {
|
|
4
|
+
return instance.get("".concat(ENDPOINT_PATHS.CHANNEL));
|
|
5
|
+
};
|
|
6
|
+
var getCustomerBases = function () {
|
|
7
|
+
return instance.get("".concat(ENDPOINT_PATHS.CUSTOMER_BASES));
|
|
8
|
+
};
|
|
9
|
+
var getExpectedSales = function () {
|
|
10
|
+
return instance.get("".concat(ENDPOINT_PATHS.SALES));
|
|
11
|
+
};
|
|
12
|
+
var dataService = {
|
|
13
|
+
getChannelsOfServices: getChannelsOfServices,
|
|
14
|
+
getCustomerBases: getCustomerBases,
|
|
15
|
+
getExpectedSales: getExpectedSales
|
|
16
|
+
};
|
|
17
|
+
export { dataService };
|
package/build/api/entity.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Activity, SalesChannel } from '../@types';
|
|
1
|
+
import { Activity, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, SalesChannel } from '../@types';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
export declare type EntityInfoUpdateBody = {
|
|
4
4
|
activities?: Array<Activity>;
|
|
5
5
|
business_operation_start_at?: string;
|
|
6
6
|
channel_services?: Array<SalesChannel>;
|
|
7
7
|
physical_store_available?: boolean;
|
|
8
|
-
yearly_sales_range?:
|
|
9
|
-
customers_served_monthly?:
|
|
10
|
-
customers_base?: Array<
|
|
8
|
+
yearly_sales_range?: ExpectedSaleRange;
|
|
9
|
+
customers_served_monthly?: ExpectedCustomer;
|
|
10
|
+
customers_base?: Array<CustomerLocation>;
|
|
11
11
|
vat_id?: string;
|
|
12
12
|
agree_chargeback?: boolean;
|
|
13
13
|
agree_refund?: boolean;
|
package/build/api/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { CreateAuthBody, VerifyAuthBody } from './auth';
|
|
|
4
4
|
import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
|
|
5
5
|
import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
|
|
6
6
|
import { EntityInfoUpdateBody } from './entity';
|
|
7
|
+
import { CreateAccountBody } from './account';
|
|
7
8
|
declare const API: {
|
|
8
9
|
ipService: {
|
|
9
10
|
getIP: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -39,7 +40,15 @@ declare const API: {
|
|
|
39
40
|
firebaseService: {
|
|
40
41
|
getLocale: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
41
42
|
};
|
|
43
|
+
accountService: {
|
|
44
|
+
createAccount: (data: CreateAccountBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
45
|
+
};
|
|
46
|
+
dataService: {
|
|
47
|
+
getChannelsOfServices: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
48
|
+
getCustomerBases: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
49
|
+
getExpectedSales: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
50
|
+
};
|
|
42
51
|
};
|
|
43
|
-
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoUpdateBody };
|
|
52
|
+
export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoUpdateBody, CreateAccountBody };
|
|
44
53
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders };
|
|
45
54
|
export default API;
|
package/build/api/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import { leadService } from './lead';
|
|
|
7
7
|
import availabilityServices from './availabilityServices';
|
|
8
8
|
import { firebaseService } from './firebase';
|
|
9
9
|
import { entityService } from './entity';
|
|
10
|
+
import { accountService } from './account';
|
|
11
|
+
import { dataService } from './data';
|
|
10
12
|
var API = {
|
|
11
13
|
ipService: ipService,
|
|
12
14
|
operatorService: operatorService,
|
|
@@ -15,7 +17,9 @@ var API = {
|
|
|
15
17
|
leadService: leadService,
|
|
16
18
|
entityService: entityService,
|
|
17
19
|
availabilityServices: availabilityServices,
|
|
18
|
-
firebaseService: firebaseService
|
|
20
|
+
firebaseService: firebaseService,
|
|
21
|
+
accountService: accountService,
|
|
22
|
+
dataService: dataService
|
|
19
23
|
};
|
|
20
24
|
export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders };
|
|
21
25
|
export default API;
|
|
@@ -53,7 +53,7 @@ var BottomSheetComponent = function (_a) {
|
|
|
53
53
|
var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
|
|
54
54
|
return (_jsx(BottomSheetStyled, __assign({ open: open, snapPoints: function (_a) {
|
|
55
55
|
var maxHeight = _a.maxHeight;
|
|
56
|
-
return [maxHeight * 0.9];
|
|
56
|
+
return [maxHeight * 0.7, maxHeight * 0.9];
|
|
57
57
|
} }, rest, { children: children })));
|
|
58
58
|
};
|
|
59
59
|
export default React.memo(BottomSheetComponent);
|
|
@@ -65,7 +65,7 @@ var InputStyled = styled(Input)(function (_a) {
|
|
|
65
65
|
});
|
|
66
66
|
var InputField = function (_a) {
|
|
67
67
|
var onEnterPressed = _a.onEnterPressed, hide = _a.hide, endAdornment = _a.endAdornment, startAdornment = _a.startAdornment, warningType = _a.warningType, warningMessage = _a.warningMessage, rest = __rest(_a, ["onEnterPressed", "hide", "endAdornment", "startAdornment", "warningType", "warningMessage"]);
|
|
68
|
-
var _b = React.useState(), warning = _b[0], setWarning = _b[1];
|
|
68
|
+
var _b = React.useState('alert'), warning = _b[0], setWarning = _b[1];
|
|
69
69
|
var onKeyPress = function (e) {
|
|
70
70
|
var _a;
|
|
71
71
|
if (e.key === 'Enter')
|
package/build/constants/api.d.ts
CHANGED
package/build/constants/api.js
CHANGED
|
@@ -12,6 +12,10 @@ var RETRIEVE_FL_PATH = '/lead/fllist';
|
|
|
12
12
|
var ENTITY_PATH = '/entity';
|
|
13
13
|
var CHECK_EMAIL = '/lead/identity/emailcheck';
|
|
14
14
|
var CHECK_BRAND = 'lead/profile/profile_name';
|
|
15
|
+
var CREATE_ACCOUNT_PATH = '/account/create';
|
|
16
|
+
var CHANNEL_PATH = '/channel';
|
|
17
|
+
var CUSTOMER_BASES_PATH = '/customerBases';
|
|
18
|
+
var SALES_PATH = '/sales';
|
|
15
19
|
var FIREBASE_URL = 'https://goconnect-195cd-default-rtdb.asia-southeast1.firebasedatabase.app/sandbox/local.json';
|
|
16
20
|
export var ENDPOINT_PATHS = {
|
|
17
21
|
BASE_URL: API_BASE_URL,
|
|
@@ -28,5 +32,9 @@ export var ENDPOINT_PATHS = {
|
|
|
28
32
|
ENTITY: ENTITY_PATH,
|
|
29
33
|
CHECK_EMAIL: CHECK_EMAIL,
|
|
30
34
|
CHECK_BRAND: CHECK_BRAND,
|
|
31
|
-
FIREBASE_URL: FIREBASE_URL
|
|
35
|
+
FIREBASE_URL: FIREBASE_URL,
|
|
36
|
+
CREATE_ACCOUNT: CREATE_ACCOUNT_PATH,
|
|
37
|
+
CHANNEL: CHANNEL_PATH,
|
|
38
|
+
CUSTOMER_BASES: CUSTOMER_BASES_PATH,
|
|
39
|
+
SALES: SALES_PATH
|
|
32
40
|
};
|
package/build/constants/app.d.ts
CHANGED
|
@@ -83,7 +83,11 @@ export declare const BUSINESS_STEP_NAMES: {
|
|
|
83
83
|
PHONE_AUTH: string;
|
|
84
84
|
IDENTITY_AUTH: string;
|
|
85
85
|
IDENTITY_VERIFY_AUTH: string;
|
|
86
|
-
|
|
86
|
+
BUSINESS_CR_INFO: string;
|
|
87
|
+
BUSINESS_INFO_CONFIRM: string;
|
|
88
|
+
BUSINESS_CR_ACTIVITIES: string;
|
|
89
|
+
BUSINESS_CUSTOMERS: string;
|
|
90
|
+
BUSINESS_SUCCESS: string;
|
|
87
91
|
};
|
|
88
92
|
export declare const RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
89
93
|
export declare const ENCRYPTION_FLAG = "encryption_contract";
|
package/build/constants/app.js
CHANGED
|
@@ -232,7 +232,11 @@ export var BUSINESS_STEP_NAMES = {
|
|
|
232
232
|
PHONE_AUTH: 'business_phone_auth',
|
|
233
233
|
IDENTITY_AUTH: 'business_identity_auth',
|
|
234
234
|
IDENTITY_VERIFY_AUTH: 'business_identity_auth_verify',
|
|
235
|
-
|
|
235
|
+
BUSINESS_CR_INFO: 'business_cr_info',
|
|
236
|
+
BUSINESS_INFO_CONFIRM: 'business_info_confirm',
|
|
237
|
+
BUSINESS_CR_ACTIVITIES: 'business_cr_activities',
|
|
238
|
+
BUSINESS_CUSTOMERS: 'business_customers',
|
|
239
|
+
BUSINESS_SUCCESS: 'business_completed'
|
|
236
240
|
};
|
|
237
241
|
export var RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
|
|
238
242
|
export var ENCRYPTION_FLAG = 'encryption_contract';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState } from '../../../app/store';
|
|
2
|
-
import { ActivitiesFormValues, BusinessInfoFormValues, BusinessTypeFormValues, CountryCode, CRLicense, FLLicense, NIDFormValues, OTPFormValues, ResponseData, SharedState } from '../../../@types';
|
|
2
|
+
import { ActivitiesFormValues, BusinessInfoFormValues, CustomersFormValues, BusinessTypeFormValues, CountryCode, CRLicense, FLLicense, NIDFormValues, OTPFormValues, ResponseData, SharedState } from '../../../@types';
|
|
3
3
|
export declare const getCountries: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
businessCountry: any;
|
|
5
5
|
countries: any;
|
|
@@ -37,17 +37,35 @@ export declare const updateLeadBusinessType: import("@reduxjs/toolkit").AsyncThu
|
|
|
37
37
|
data: any;
|
|
38
38
|
formData: BusinessTypeFormValues;
|
|
39
39
|
}, BusinessTypeFormValues, {}>;
|
|
40
|
-
export declare const
|
|
40
|
+
export declare const createAccount: import("@reduxjs/toolkit").AsyncThunk<{
|
|
41
|
+
data: any;
|
|
42
|
+
channelsData: any;
|
|
43
|
+
}, void, {}>;
|
|
44
|
+
export declare const updateActivitiesInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
41
45
|
data: any;
|
|
42
46
|
formData: {
|
|
43
47
|
activities: import("../../../@types").Activity[] | undefined;
|
|
44
48
|
salesChannels: import("../../../@types").SalesChannel[];
|
|
45
49
|
operationStartDate: string;
|
|
50
|
+
};
|
|
51
|
+
}, ActivitiesFormValues, {}>;
|
|
52
|
+
export declare const updateCustomersInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
53
|
+
data: any;
|
|
54
|
+
formData: {
|
|
55
|
+
customerLocations: import("../../../@types").CustomerLocation[];
|
|
56
|
+
expectedCustomers: import("../../../@types").ExpectedCustomer | undefined;
|
|
57
|
+
expectedSalesRange: import("../../../@types").ExpectedSaleRange | undefined;
|
|
58
|
+
refundPolicy: boolean;
|
|
59
|
+
transactionPolicy: boolean;
|
|
46
60
|
isResend: boolean;
|
|
47
61
|
};
|
|
48
|
-
},
|
|
62
|
+
}, CustomersFormValues & {
|
|
49
63
|
isResend: boolean;
|
|
50
64
|
}, {}>;
|
|
65
|
+
export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
66
|
+
response: any;
|
|
67
|
+
formData: void;
|
|
68
|
+
}, void, {}>;
|
|
51
69
|
declare type VerifyData = {
|
|
52
70
|
token: string;
|
|
53
71
|
};
|
|
@@ -55,15 +73,18 @@ export interface BusinessData {
|
|
|
55
73
|
verify: ResponseData & VerifyData;
|
|
56
74
|
businessCountry: CountryCode;
|
|
57
75
|
countries: CountryCode[];
|
|
58
|
-
otpData: OTPFormValues & ResponseData
|
|
76
|
+
otpData: OTPFormValues & ResponseData & {
|
|
77
|
+
isNID: boolean;
|
|
78
|
+
};
|
|
59
79
|
nidData: NIDFormValues & ResponseData & {
|
|
60
80
|
type: string;
|
|
61
81
|
};
|
|
62
82
|
businessTypeData: BusinessTypeFormValues & ResponseData;
|
|
63
83
|
crInfos: Array<CRLicense>;
|
|
64
84
|
flInfos: Array<FLLicense>;
|
|
65
|
-
businessInfo: BusinessInfoFormValues;
|
|
85
|
+
businessInfo: BusinessInfoFormValues & ResponseData;
|
|
66
86
|
activitiesData: ActivitiesFormValues & ResponseData;
|
|
87
|
+
customersData: CustomersFormValues & ResponseData;
|
|
67
88
|
}
|
|
68
89
|
export interface BusinessState extends SharedState<BusinessData> {
|
|
69
90
|
}
|