kcommons 13.10.4 → 13.11.0
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/index.d.ts +3 -0
- package/build/index.js +4 -0
- package/build/typings/common/ocr/ocrGst.typings.d.ts +6 -0
- package/build/typings/common/ocr/ocrGst.typings.js +2 -0
- package/build/typings/common/uploadMedia.typings.d.ts +8 -0
- package/build/typings/common/uploadMedia.typings.js +1 -0
- package/build/typings/vendor.typings.d.ts +5 -0
- package/build/utils/validators/gst.validator.d.ts +14 -0
- package/build/utils/validators/gst.validator.js +20 -0
- package/build/utils/validators/pan.validator.d.ts +12 -0
- package/build/utils/validators/pan.validator.js +18 -0
- package/package.json +1 -1
- package/build/typings/company/settings/CompanySettings.typings.d.ts +0 -6
- package/build/typings/company/settings/CompanySettings.typings.js +0 -10
package/build/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from "./typings/common/uploadMedia.typings";
|
|
|
65
65
|
export * from "./typings/common/retrieveMedia.typings";
|
|
66
66
|
export * from "./typings/common/lifecycleLogger.typings";
|
|
67
67
|
export * from "./typings/common/openUOM.typings";
|
|
68
|
+
export * from "./typings/common/ocr/ocrGst.typings";
|
|
68
69
|
export * from "./constants/permission.constants";
|
|
69
70
|
export * from "./constants/entityTypes.constants";
|
|
70
71
|
export * from "./constants/statuses.constants";
|
|
@@ -127,6 +128,8 @@ export * from "./typings/kpis/vendor/main/vHomeDashboardKpi.typings";
|
|
|
127
128
|
export * from "./typings/vendor/companyProfile.typings";
|
|
128
129
|
export * from "./helpers/padNumber.helper";
|
|
129
130
|
export * from "./typings/plugins/plugin.typings";
|
|
131
|
+
export * from "./utils/validators/gst.validator";
|
|
132
|
+
export * from "./utils/validators/pan.validator";
|
|
130
133
|
export interface ITesting {
|
|
131
134
|
message: string;
|
|
132
135
|
age: number;
|
package/build/index.js
CHANGED
|
@@ -85,6 +85,7 @@ __exportStar(require("./typings/common/uploadMedia.typings"), exports);
|
|
|
85
85
|
__exportStar(require("./typings/common/retrieveMedia.typings"), exports);
|
|
86
86
|
__exportStar(require("./typings/common/lifecycleLogger.typings"), exports);
|
|
87
87
|
__exportStar(require("./typings/common/openUOM.typings"), exports);
|
|
88
|
+
__exportStar(require("./typings/common/ocr/ocrGst.typings"), exports);
|
|
88
89
|
// Constants
|
|
89
90
|
__exportStar(require("./constants/permission.constants"), exports);
|
|
90
91
|
__exportStar(require("./constants/entityTypes.constants"), exports);
|
|
@@ -162,3 +163,6 @@ __exportStar(require("./typings/vendor/companyProfile.typings"), exports);
|
|
|
162
163
|
__exportStar(require("./helpers/padNumber.helper"), exports);
|
|
163
164
|
// Plugins
|
|
164
165
|
__exportStar(require("./typings/plugins/plugin.typings"), exports);
|
|
166
|
+
// Validators
|
|
167
|
+
__exportStar(require("./utils/validators/gst.validator"), exports);
|
|
168
|
+
__exportStar(require("./utils/validators/pan.validator"), exports);
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/** --- For Downloads--- */
|
|
2
|
+
export interface IRequestDownloadURLReq {
|
|
3
|
+
key: string;
|
|
4
|
+
}
|
|
5
|
+
export interface IRequestDownloadURLRes {
|
|
6
|
+
publicUrl: string;
|
|
7
|
+
}
|
|
8
|
+
/** --- For Uploads --- */
|
|
1
9
|
export declare enum UPLOAD_MEDIA_TYPE {
|
|
2
10
|
DOCUMENT = "documents",
|
|
3
11
|
IMAGE = "images"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OPEN_DOCUMENT_TYPE = exports.MEDIA_ACCEESS_TYPE = exports.UPLOAD_MEDIA_TYPE = void 0;
|
|
4
|
+
/** --- For Uploads --- */
|
|
4
5
|
var UPLOAD_MEDIA_TYPE;
|
|
5
6
|
(function (UPLOAD_MEDIA_TYPE) {
|
|
6
7
|
UPLOAD_MEDIA_TYPE["DOCUMENT"] = "documents";
|
|
@@ -33,6 +33,11 @@ export interface IVendor extends IAddress {
|
|
|
33
33
|
beneficiary_name: string | null;
|
|
34
34
|
vkraya_id: string;
|
|
35
35
|
password: string;
|
|
36
|
+
is_bank_details_verified: boolean;
|
|
37
|
+
is_gst_verified: boolean;
|
|
38
|
+
is_pan_verified: boolean;
|
|
39
|
+
is_cin_verified: boolean;
|
|
40
|
+
is_udyam_verified: boolean;
|
|
36
41
|
is_profile_complete: boolean;
|
|
37
42
|
is_profile_verified: boolean;
|
|
38
43
|
is_self_verified: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const GST_REGEX: RegExp;
|
|
2
|
+
/**
|
|
3
|
+
* Returns boolean based on whether the provided GST is valid or not.
|
|
4
|
+
* * @param gst_no Gst No to be validated
|
|
5
|
+
* @returns Boolean
|
|
6
|
+
*
|
|
7
|
+
* Validation Rules:
|
|
8
|
+
* 1. First 2 Characters should be Numbers.
|
|
9
|
+
* 2. Next 10 characters should be a valid PAN Number.
|
|
10
|
+
* 3. The 13th character can be 1-9 or A-Z.
|
|
11
|
+
* 4. The 14th character has to be "Z".
|
|
12
|
+
* 5. The 15th character has to be 1-9.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isValidGST(gst_no: string): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GST_REGEX = void 0;
|
|
4
|
+
exports.isValidGST = isValidGST;
|
|
5
|
+
exports.GST_REGEX = /^(0[1-9]|1[0-9]|2[0-9]|3[0-7])[A-Z]{5}\d{4}[A-Z][A-Z0-9]Z[A-Z0-9]$/i;
|
|
6
|
+
/**
|
|
7
|
+
* Returns boolean based on whether the provided GST is valid or not.
|
|
8
|
+
* * @param gst_no Gst No to be validated
|
|
9
|
+
* @returns Boolean
|
|
10
|
+
*
|
|
11
|
+
* Validation Rules:
|
|
12
|
+
* 1. First 2 Characters should be Numbers.
|
|
13
|
+
* 2. Next 10 characters should be a valid PAN Number.
|
|
14
|
+
* 3. The 13th character can be 1-9 or A-Z.
|
|
15
|
+
* 4. The 14th character has to be "Z".
|
|
16
|
+
* 5. The 15th character has to be 1-9.
|
|
17
|
+
*/
|
|
18
|
+
function isValidGST(gst_no) {
|
|
19
|
+
return exports.GST_REGEX.test(gst_no);
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const PAN_REGEX: RegExp;
|
|
2
|
+
/**
|
|
3
|
+
* Checks whether the provided PAN No. is valid or not.
|
|
4
|
+
* @param pan_no Pan No. to be validated
|
|
5
|
+
* @returns Boolean
|
|
6
|
+
*
|
|
7
|
+
* Validation Rules:
|
|
8
|
+
* 1. First 5 characters should be alphabets in uppercase.
|
|
9
|
+
* 2. The next 4 characters should be numbers.
|
|
10
|
+
* 3. The last character should be again alphabet in uppercase.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isValidPan(pan_no: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAN_REGEX = void 0;
|
|
4
|
+
exports.isValidPan = isValidPan;
|
|
5
|
+
exports.PAN_REGEX = /^[A-Z]{5}\d{4}[A-Z]$/i;
|
|
6
|
+
/**
|
|
7
|
+
* Checks whether the provided PAN No. is valid or not.
|
|
8
|
+
* @param pan_no Pan No. to be validated
|
|
9
|
+
* @returns Boolean
|
|
10
|
+
*
|
|
11
|
+
* Validation Rules:
|
|
12
|
+
* 1. First 5 characters should be alphabets in uppercase.
|
|
13
|
+
* 2. The next 4 characters should be numbers.
|
|
14
|
+
* 3. The last character should be again alphabet in uppercase.
|
|
15
|
+
*/
|
|
16
|
+
function isValidPan(pan_no) {
|
|
17
|
+
return exports.PAN_REGEX.test(pan_no);
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SETTINGS_TABS = void 0;
|
|
4
|
-
var SETTINGS_TABS;
|
|
5
|
-
(function (SETTINGS_TABS) {
|
|
6
|
-
SETTINGS_TABS["USERPROFILE"] = "userprofile";
|
|
7
|
-
SETTINGS_TABS["COMPANY_SETTINGS"] = "company_settings";
|
|
8
|
-
SETTINGS_TABS["BILLING"] = "billing";
|
|
9
|
-
SETTINGS_TABS["COMPANY_VENDORS"] = "company_vendors";
|
|
10
|
-
})(SETTINGS_TABS || (exports.SETTINGS_TABS = SETTINGS_TABS = {}));
|