@riocrypto/common 1.0.1370 → 1.0.1372
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/helpers/validate-business-name.d.ts +4 -0
- package/build/helpers/validate-business-name.js +20 -0
- package/build/helpers/validate-individual-name.d.ts +4 -0
- package/build/helpers/validate-individual-name.js +20 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/types/kyc-file-index.d.ts +11 -0
- package/build/types/kyc-file-index.js +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateBusinessName = void 0;
|
|
4
|
+
const validateBusinessName = (name) => {
|
|
5
|
+
const trimmedName = name.trim();
|
|
6
|
+
if (trimmedName.length < 2 || trimmedName.length > 100) {
|
|
7
|
+
return {
|
|
8
|
+
isValid: false,
|
|
9
|
+
message: `Business name must be between 2 and 100 characters`,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
// Check character pattern
|
|
13
|
+
if (!/^[a-zA-Z0-9\s,'-]*$/.test(trimmedName)) {
|
|
14
|
+
return {
|
|
15
|
+
isValid: false,
|
|
16
|
+
message: `Business name can only contain letters, numbers, spaces, and ,'- characters`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.validateBusinessName = validateBusinessName;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateIndividualName = void 0;
|
|
4
|
+
const validateIndividualName = (name, label) => {
|
|
5
|
+
const trimmedName = name.trim();
|
|
6
|
+
if (trimmedName.length < 1 || trimmedName.length > 50) {
|
|
7
|
+
return {
|
|
8
|
+
isValid: false,
|
|
9
|
+
message: `${label} must be between 1 and 50 characters`,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
// Check character pattern
|
|
13
|
+
if (!/^[A-Za-z '-]+$/.test(trimmedName)) {
|
|
14
|
+
return {
|
|
15
|
+
isValid: false,
|
|
16
|
+
message: `${label} can only contain alphabets, spaces, hyphens, and apostrophes`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.validateIndividualName = validateIndividualName;
|
package/build/index.d.ts
CHANGED
|
@@ -210,6 +210,7 @@ export * from "./types/circle-payout";
|
|
|
210
210
|
export * from "./types/risk-tier";
|
|
211
211
|
export * from "./types/market-data";
|
|
212
212
|
export * from "./types/kyc-file-type";
|
|
213
|
+
export * from "./types/kyc-file-index";
|
|
213
214
|
export * from "./types/identity-verification-status";
|
|
214
215
|
export * from "./types/UBO-onboarding-status";
|
|
215
216
|
export * from "./types/UBO";
|
|
@@ -251,6 +252,8 @@ export * from "./helpers/alpha-2-to-alpha-3";
|
|
|
251
252
|
export * from "./helpers/get-user-name";
|
|
252
253
|
export * from "./helpers/get-highest-onboarding-status";
|
|
253
254
|
export * from "./helpers/get-auth-name";
|
|
255
|
+
export * from "./helpers/validate-individual-name";
|
|
256
|
+
export * from "./helpers/validate-business-name";
|
|
254
257
|
export * from "./clients/rio-client";
|
|
255
258
|
export * from "./clients/rio-admin-client";
|
|
256
259
|
export * from "./constants/mexico-fiscal-regimens";
|
package/build/index.js
CHANGED
|
@@ -226,6 +226,7 @@ __exportStar(require("./types/circle-payout"), exports);
|
|
|
226
226
|
__exportStar(require("./types/risk-tier"), exports);
|
|
227
227
|
__exportStar(require("./types/market-data"), exports);
|
|
228
228
|
__exportStar(require("./types/kyc-file-type"), exports);
|
|
229
|
+
__exportStar(require("./types/kyc-file-index"), exports);
|
|
229
230
|
__exportStar(require("./types/identity-verification-status"), exports);
|
|
230
231
|
__exportStar(require("./types/UBO-onboarding-status"), exports);
|
|
231
232
|
__exportStar(require("./types/UBO"), exports);
|
|
@@ -267,6 +268,8 @@ __exportStar(require("./helpers/alpha-2-to-alpha-3"), exports);
|
|
|
267
268
|
__exportStar(require("./helpers/get-user-name"), exports);
|
|
268
269
|
__exportStar(require("./helpers/get-highest-onboarding-status"), exports);
|
|
269
270
|
__exportStar(require("./helpers/get-auth-name"), exports);
|
|
271
|
+
__exportStar(require("./helpers/validate-individual-name"), exports);
|
|
272
|
+
__exportStar(require("./helpers/validate-business-name"), exports);
|
|
270
273
|
__exportStar(require("./clients/rio-client"), exports);
|
|
271
274
|
__exportStar(require("./clients/rio-admin-client"), exports);
|
|
272
275
|
__exportStar(require("./constants/mexico-fiscal-regimens"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum KYCFileIndex {
|
|
2
|
+
CertificateOfIncorporation = "certificateOfIncorporation",
|
|
3
|
+
KYCReport = "KYCReport",
|
|
4
|
+
TaxTranscript = "taxTranscript",
|
|
5
|
+
ProofOfAddress = "proofOfAddress",
|
|
6
|
+
BusinessRegistration = "businessRegistration",
|
|
7
|
+
TaxIdentificationCertificate = "taxIdentificationCertificate",
|
|
8
|
+
LegalRepresentativeIdPowerOfAttorney = "legalRepresentativeIdPowerOfAttorney",
|
|
9
|
+
PersonalIdentificationCertificate = "personalIdentificationCertificate",
|
|
10
|
+
ExtraFiles = "extraFiles"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KYCFileIndex = void 0;
|
|
4
|
+
var KYCFileIndex;
|
|
5
|
+
(function (KYCFileIndex) {
|
|
6
|
+
KYCFileIndex["CertificateOfIncorporation"] = "certificateOfIncorporation";
|
|
7
|
+
KYCFileIndex["KYCReport"] = "KYCReport";
|
|
8
|
+
KYCFileIndex["TaxTranscript"] = "taxTranscript";
|
|
9
|
+
KYCFileIndex["ProofOfAddress"] = "proofOfAddress";
|
|
10
|
+
KYCFileIndex["BusinessRegistration"] = "businessRegistration";
|
|
11
|
+
KYCFileIndex["TaxIdentificationCertificate"] = "taxIdentificationCertificate";
|
|
12
|
+
KYCFileIndex["LegalRepresentativeIdPowerOfAttorney"] = "legalRepresentativeIdPowerOfAttorney";
|
|
13
|
+
KYCFileIndex["PersonalIdentificationCertificate"] = "personalIdentificationCertificate";
|
|
14
|
+
KYCFileIndex["ExtraFiles"] = "extraFiles";
|
|
15
|
+
})(KYCFileIndex = exports.KYCFileIndex || (exports.KYCFileIndex = {}));
|