@meshtrade/api-web 1.50.0 → 1.52.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/dist/meshtrade/compliance/client/v1/client_pb.d.ts +1 -1
- package/dist/meshtrade/compliance/client/v1/client_pb.js +1 -1
- package/dist/meshtrade/compliance/client/v1/company_representative_role.d.ts +14 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_role.js +65 -0
- package/dist/meshtrade/compliance/client/v1/identification_document_type.d.ts +14 -0
- package/dist/meshtrade/compliance/client/v1/identification_document_type.js +61 -0
- package/dist/meshtrade/compliance/client/v1/index.d.ts +6 -0
- package/dist/meshtrade/compliance/client/v1/index.js +6 -2
- package/dist/meshtrade/compliance/client/v1/natural_person_connection_type.d.ts +14 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_connection_type.js +72 -0
- package/dist/meshtrade/compliance/client/v1/pep_status.d.ts +14 -0
- package/dist/meshtrade/compliance/client/v1/pep_status.js +60 -0
- package/dist/meshtrade/compliance/client/v1/service_pb.d.ts +1 -1
- package/dist/meshtrade/compliance/client/v1/service_pb.js +1 -1
- package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth.d.ts +14 -0
- package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth.js +79 -0
- package/dist/meshtrade/compliance/client/v1/verification_status.d.ts +14 -0
- package/dist/meshtrade/compliance/client/v1/verification_status.js +61 -0
- package/dist/meshtrade/iam/user_profile/v1/service_pb.js +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ export declare const file_meshtrade_compliance_client_v1_client: GenFile;
|
|
|
21
21
|
export type Client = Message<"meshtrade.compliance.client.v1.Client"> & {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* The unique, immutable, and canonical name of the client resource in the format clients/{client_id}.
|
|
24
|
+
* The unique, immutable, and canonical name of the client resource in the format compliance/clients/{client_id}.
|
|
25
25
|
* The {client_id} is a system-generated unique identifier (e.g., UUID) that will never change. This name field will never change and should be used as the permanent primary key for this resource in all systems.
|
|
26
26
|
* System set on creation.
|
|
27
27
|
*
|
|
@@ -15,7 +15,7 @@ const verification_status_pb_1 = require("./verification_status_pb");
|
|
|
15
15
|
/**
|
|
16
16
|
* Describes the file meshtrade/compliance/client/v1/client.proto.
|
|
17
17
|
*/
|
|
18
|
-
exports.file_meshtrade_compliance_client_v1_client = (0, codegenv2_1.fileDesc)("
|
|
18
|
+
exports.file_meshtrade_compliance_client_v1_client = (0, codegenv2_1.fileDesc)("CittZXNodHJhZGUvY29tcGxpYW5jZS9jbGllbnQvdjEvY2xpZW50LnByb3RvEh5tZXNodHJhZGUuY29tcGxpYW5jZS5jbGllbnQudjEi9ggKBkNsaWVudBLOAQoEbmFtZRgBIAEoCUK/AbpIuwG6AbcBChRuYW1lLmZvcm1hdC5vcHRpb25hbBI/bmFtZSBtdXN0IGJlIGVtcHR5IG9yIGluIHRoZSBmb3JtYXQgY29tcGxpYW5jZS9jbGllbnRzL3tVTElEdjJ9Gl5zaXplKHRoaXMpID09IDAgfHwgdGhpcy5tYXRjaGVzKCdeY29tcGxpYW5jZS9jbGllbnRzL1swMTIzNDU2Nzg5QUJDREVGR0hKS01OUFFSU1RWV1hZWl17MjZ9JCcpEksKBW93bmVyGAIgASgJQjy6SDnIAQFyNDIvXmdyb3Vwcy9bMDEyMzQ1Njc4OUFCQ0RFRkdISktNTlBRUlNUVldYWVpdezI2fSSYASESTgoGb3duZXJzGAMgAygJQj66SDuSATgiNnI0Mi9eZ3JvdXBzL1swMTIzNDU2Nzg5QUJDREVGR0hKS01OUFFSU1RWV1hZWl17MjZ9JJgBIRIjCgxkaXNwbGF5X25hbWUYBCABKAlCDbpICsgBAXIFEAEY/wESRwoObmF0dXJhbF9wZXJzb24YBSABKAsyLS5tZXNodHJhZGUuY29tcGxpYW5jZS5jbGllbnQudjEuTmF0dXJhbFBlcnNvbkgAEjoKB2NvbXBhbnkYBiABKAsyJy5tZXNodHJhZGUuY29tcGxpYW5jZS5jbGllbnQudjEuQ29tcGFueUgAEjQKBGZ1bmQYByABKAsyJC5tZXNodHJhZGUuY29tcGxpYW5jZS5jbGllbnQudjEuRnVuZEgAEjYKBXRydXN0GAggASgLMiUubWVzaHRyYWRlLmNvbXBsaWFuY2UuY2xpZW50LnYxLlRydXN0SAASXAoTdmVyaWZpY2F0aW9uX3N0YXR1cxgJIAEoDjIyLm1lc2h0cmFkZS5jb21wbGlhbmNlLmNsaWVudC52MS5WZXJpZmljYXRpb25TdGF0dXNCC7pICMgBAYIBAhABEoQCChZ2ZXJpZmljYXRpb25fYXV0aG9yaXR5GAogASgJQuMBukjfAboB2wEKJnZlcmlmaWNhdGlvbl9hdXRob3JpdHkuZm9ybWF0Lm9wdGlvbmFsElF2ZXJpZmljYXRpb25fYXV0aG9yaXR5IG11c3QgYmUgZW1wdHkgb3IgaW4gdGhlIGZvcm1hdCBjb21wbGlhbmNlL2NsaWVudHMve1VMSUR2Mn0aXnNpemUodGhpcykgPT0gMCB8fCB0aGlzLm1hdGNoZXMoJ15jb21wbGlhbmNlL2NsaWVudHMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0kJykSNQoRdmVyaWZpY2F0aW9uX2RhdGUYCyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjoKFm5leHRfdmVyaWZpY2F0aW9uX2RhdGUYDCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQg4KDGxlZ2FsX3BlcnNvbkJjCiVjby5tZXNodHJhZGUuYXBpLmNvbXBsaWFuY2UuY2xpZW50LnYxWjpnaXRodWIuY29tL21lc2h0cmFkZS9hcGkvZ28vY29tcGxpYW5jZS9jbGllbnQvdjE7Y2xpZW50X3YxYgZwcm90bzM", [validate_pb_1.file_buf_validate_validate, wkt_1.file_google_protobuf_timestamp, company_pb_1.file_meshtrade_compliance_client_v1_company, fund_pb_1.file_meshtrade_compliance_client_v1_fund, natural_person_pb_1.file_meshtrade_compliance_client_v1_natural_person, trust_pb_1.file_meshtrade_compliance_client_v1_trust, verification_status_pb_1.file_meshtrade_compliance_client_v1_verification_status]);
|
|
19
19
|
/**
|
|
20
20
|
* Describes the message meshtrade.compliance.client.v1.Client.
|
|
21
21
|
* Use `create(ClientSchema)` to create a new message.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CompanyRepresentativeRole } from "./company_representative_role_pb";
|
|
2
|
+
export declare const allCompanyRepresentativeRoles: CompanyRepresentativeRole[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts a CompanyRepresentativeRole enum instance to a custom string representation.
|
|
5
|
+
* @param {CompanyRepresentativeRole} companyRepresentativeRole - The role to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the role.
|
|
7
|
+
*/
|
|
8
|
+
export declare function companyRepresentativeRoleToString(companyRepresentativeRole: CompanyRepresentativeRole): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to a CompanyRepresentativeRole enum instance.
|
|
11
|
+
* @param {string} companyRepresentativeRoleStr - The custom string representation of the role.
|
|
12
|
+
* @returns {CompanyRepresentativeRole} The corresponding CompanyRepresentativeRole enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToCompanyRepresentativeRole(companyRepresentativeRoleStr: string): CompanyRepresentativeRole;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allCompanyRepresentativeRoles = void 0;
|
|
4
|
+
exports.companyRepresentativeRoleToString = companyRepresentativeRoleToString;
|
|
5
|
+
exports.stringToCompanyRepresentativeRole = stringToCompanyRepresentativeRole;
|
|
6
|
+
const company_representative_role_pb_1 = require("./company_representative_role_pb");
|
|
7
|
+
// Get all company representative roles as enum values
|
|
8
|
+
exports.allCompanyRepresentativeRoles = Object.values(company_representative_role_pb_1.CompanyRepresentativeRole).filter((value) => typeof value === "number");
|
|
9
|
+
// Define explicit mappings between CompanyRepresentativeRole enums and custom string representations
|
|
10
|
+
const companyRepresentativeRoleToStringMapping = {
|
|
11
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.UNSPECIFIED]: "Unspecified",
|
|
12
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.ULTIMATE_BENEFICIAL_OWNER]: "Ultimate Beneficial Owner",
|
|
13
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.SHAREHOLDER]: "Shareholder",
|
|
14
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.SOLE_PROPRIETOR]: "Sole Proprietor",
|
|
15
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.PARTNER]: "Partner",
|
|
16
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.DIRECTOR]: "Director",
|
|
17
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.MANAGER]: "Manager",
|
|
18
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.AUTHORIZED_SIGNATORY]: "Authorized Signatory",
|
|
19
|
+
[company_representative_role_pb_1.CompanyRepresentativeRole.PRIMARY_CONTACT]: "Primary Contact",
|
|
20
|
+
};
|
|
21
|
+
// Reverse mapping from string to CompanyRepresentativeRole enum
|
|
22
|
+
const stringToCompanyRepresentativeRoleMapping = {};
|
|
23
|
+
for (const [key, value] of Object.entries(companyRepresentativeRoleToStringMapping)) {
|
|
24
|
+
stringToCompanyRepresentativeRoleMapping[value] = Number(key);
|
|
25
|
+
}
|
|
26
|
+
class UnsupportedCompanyRepresentativeRoleError extends Error {
|
|
27
|
+
constructor(companyRepresentativeRole) {
|
|
28
|
+
const message = `Unsupported CompanyRepresentativeRole: ${companyRepresentativeRole}`;
|
|
29
|
+
super(message);
|
|
30
|
+
this.companyRepresentativeRole = companyRepresentativeRole;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Converts a CompanyRepresentativeRole enum instance to a custom string representation.
|
|
35
|
+
* @param {CompanyRepresentativeRole} companyRepresentativeRole - The role to convert.
|
|
36
|
+
* @returns {string} The custom string representation of the role.
|
|
37
|
+
*/
|
|
38
|
+
function companyRepresentativeRoleToString(companyRepresentativeRole) {
|
|
39
|
+
if (companyRepresentativeRole in companyRepresentativeRoleToStringMapping) {
|
|
40
|
+
return companyRepresentativeRoleToStringMapping[companyRepresentativeRole];
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
throw new UnsupportedCompanyRepresentativeRoleError(companyRepresentativeRole);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
class UnsupportedCompanyRepresentativeRoleStringError extends Error {
|
|
47
|
+
constructor(companyRepresentativeRoleStr) {
|
|
48
|
+
const message = `Unsupported company representative role string: ${companyRepresentativeRoleStr}`;
|
|
49
|
+
super(message);
|
|
50
|
+
this.companyRepresentativeRoleStr = companyRepresentativeRoleStr;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Converts a custom string representation to a CompanyRepresentativeRole enum instance.
|
|
55
|
+
* @param {string} companyRepresentativeRoleStr - The custom string representation of the role.
|
|
56
|
+
* @returns {CompanyRepresentativeRole} The corresponding CompanyRepresentativeRole enum instance.
|
|
57
|
+
*/
|
|
58
|
+
function stringToCompanyRepresentativeRole(companyRepresentativeRoleStr) {
|
|
59
|
+
if (companyRepresentativeRoleStr in stringToCompanyRepresentativeRoleMapping) {
|
|
60
|
+
return stringToCompanyRepresentativeRoleMapping[companyRepresentativeRoleStr];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
throw new UnsupportedCompanyRepresentativeRoleStringError(companyRepresentativeRoleStr);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IdentificationDocumentType } from "./identification_document_type_pb";
|
|
2
|
+
export declare const allIdentificationDocumentTypes: IdentificationDocumentType[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts an IdentificationDocumentType enum instance to a custom string representation.
|
|
5
|
+
* @param {IdentificationDocumentType} identificationDocumentType - The document type to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the document type.
|
|
7
|
+
*/
|
|
8
|
+
export declare function identificationDocumentTypeToString(identificationDocumentType: IdentificationDocumentType): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to an IdentificationDocumentType enum instance.
|
|
11
|
+
* @param {string} identificationDocumentTypeStr - The custom string representation.
|
|
12
|
+
* @returns {IdentificationDocumentType} The corresponding IdentificationDocumentType enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToIdentificationDocumentType(identificationDocumentTypeStr: string): IdentificationDocumentType;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allIdentificationDocumentTypes = void 0;
|
|
4
|
+
exports.identificationDocumentTypeToString = identificationDocumentTypeToString;
|
|
5
|
+
exports.stringToIdentificationDocumentType = stringToIdentificationDocumentType;
|
|
6
|
+
const identification_document_type_pb_1 = require("./identification_document_type_pb");
|
|
7
|
+
// Get all identification document types as enum values
|
|
8
|
+
exports.allIdentificationDocumentTypes = Object.values(identification_document_type_pb_1.IdentificationDocumentType).filter((value) => typeof value === "number");
|
|
9
|
+
// Define explicit mappings between IdentificationDocumentType enums and custom string representations
|
|
10
|
+
const identificationDocumentTypeToStringMapping = {
|
|
11
|
+
[identification_document_type_pb_1.IdentificationDocumentType.UNSPECIFIED]: "Unspecified",
|
|
12
|
+
[identification_document_type_pb_1.IdentificationDocumentType.PASSPORT]: "Passport",
|
|
13
|
+
[identification_document_type_pb_1.IdentificationDocumentType.NATIONAL_ID]: "National ID",
|
|
14
|
+
[identification_document_type_pb_1.IdentificationDocumentType.DRIVERS_LICENSE]: "Driver's License",
|
|
15
|
+
[identification_document_type_pb_1.IdentificationDocumentType.RESIDENCE_PERMIT]: "Residence Permit",
|
|
16
|
+
};
|
|
17
|
+
// Reverse mapping from string to IdentificationDocumentType enum
|
|
18
|
+
const stringToIdentificationDocumentTypeMapping = {};
|
|
19
|
+
for (const [key, value] of Object.entries(identificationDocumentTypeToStringMapping)) {
|
|
20
|
+
stringToIdentificationDocumentTypeMapping[value] = Number(key);
|
|
21
|
+
}
|
|
22
|
+
class UnsupportedIdentificationDocumentTypeError extends Error {
|
|
23
|
+
constructor(identificationDocumentType) {
|
|
24
|
+
const message = `Unsupported IdentificationDocumentType: ${identificationDocumentType}`;
|
|
25
|
+
super(message);
|
|
26
|
+
this.identificationDocumentType = identificationDocumentType;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Converts an IdentificationDocumentType enum instance to a custom string representation.
|
|
31
|
+
* @param {IdentificationDocumentType} identificationDocumentType - The document type to convert.
|
|
32
|
+
* @returns {string} The custom string representation of the document type.
|
|
33
|
+
*/
|
|
34
|
+
function identificationDocumentTypeToString(identificationDocumentType) {
|
|
35
|
+
if (identificationDocumentType in identificationDocumentTypeToStringMapping) {
|
|
36
|
+
return identificationDocumentTypeToStringMapping[identificationDocumentType];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
throw new UnsupportedIdentificationDocumentTypeError(identificationDocumentType);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class UnsupportedIdentificationDocumentTypeStringError extends Error {
|
|
43
|
+
constructor(identificationDocumentTypeStr) {
|
|
44
|
+
const message = `Unsupported identification document type string: ${identificationDocumentTypeStr}`;
|
|
45
|
+
super(message);
|
|
46
|
+
this.identificationDocumentTypeStr = identificationDocumentTypeStr;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Converts a custom string representation to an IdentificationDocumentType enum instance.
|
|
51
|
+
* @param {string} identificationDocumentTypeStr - The custom string representation.
|
|
52
|
+
* @returns {IdentificationDocumentType} The corresponding IdentificationDocumentType enum instance.
|
|
53
|
+
*/
|
|
54
|
+
function stringToIdentificationDocumentType(identificationDocumentTypeStr) {
|
|
55
|
+
if (identificationDocumentTypeStr in stringToIdentificationDocumentTypeMapping) {
|
|
56
|
+
return stringToIdentificationDocumentTypeMapping[identificationDocumentTypeStr];
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new UnsupportedIdentificationDocumentTypeStringError(identificationDocumentTypeStr);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -14,3 +14,9 @@ export * from "./source_of_income_and_wealth_pb";
|
|
|
14
14
|
export * from "./tax_residency_pb";
|
|
15
15
|
export * from "./trust_pb";
|
|
16
16
|
export * from "./verification_status_pb";
|
|
17
|
+
export * from "./company_representative_role";
|
|
18
|
+
export * from "./identification_document_type";
|
|
19
|
+
export * from "./natural_person_connection_type";
|
|
20
|
+
export * from "./pep_status";
|
|
21
|
+
export * from "./source_of_income_and_wealth";
|
|
22
|
+
export * from "./verification_status";
|
|
@@ -55,5 +55,9 @@ __exportStar(require("./verification_status_pb"), exports);
|
|
|
55
55
|
// export * from "./my_custom_module";
|
|
56
56
|
// export { MyCustomClass } from "./another_module";
|
|
57
57
|
// ===================================================================
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
__exportStar(require("./company_representative_role"), exports);
|
|
59
|
+
__exportStar(require("./identification_document_type"), exports);
|
|
60
|
+
__exportStar(require("./natural_person_connection_type"), exports);
|
|
61
|
+
__exportStar(require("./pep_status"), exports);
|
|
62
|
+
__exportStar(require("./source_of_income_and_wealth"), exports);
|
|
63
|
+
__exportStar(require("./verification_status"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NaturalPersonConnectionType } from "./natural_person_connection_type_pb";
|
|
2
|
+
export declare const allNaturalPersonConnectionTypes: NaturalPersonConnectionType[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts a NaturalPersonConnectionType enum instance to a custom string representation.
|
|
5
|
+
* @param {NaturalPersonConnectionType} naturalPersonConnectionType - The connection type to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the connection type.
|
|
7
|
+
*/
|
|
8
|
+
export declare function naturalPersonConnectionTypeToString(naturalPersonConnectionType: NaturalPersonConnectionType): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to a NaturalPersonConnectionType enum instance.
|
|
11
|
+
* @param {string} naturalPersonConnectionTypeStr - The custom string representation.
|
|
12
|
+
* @returns {NaturalPersonConnectionType} The corresponding NaturalPersonConnectionType enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToNaturalPersonConnectionType(naturalPersonConnectionTypeStr: string): NaturalPersonConnectionType;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allNaturalPersonConnectionTypes = void 0;
|
|
4
|
+
exports.naturalPersonConnectionTypeToString = naturalPersonConnectionTypeToString;
|
|
5
|
+
exports.stringToNaturalPersonConnectionType = stringToNaturalPersonConnectionType;
|
|
6
|
+
const natural_person_connection_type_pb_1 = require("./natural_person_connection_type_pb");
|
|
7
|
+
// Get all natural person connection types as enum values
|
|
8
|
+
exports.allNaturalPersonConnectionTypes = Object.values(natural_person_connection_type_pb_1.NaturalPersonConnectionType).filter((value) => typeof value === "number");
|
|
9
|
+
// Define explicit mappings between NaturalPersonConnectionType enums and custom string representations
|
|
10
|
+
const naturalPersonConnectionTypeToStringMapping = {
|
|
11
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.UNSPECIFIED]: "Unspecified",
|
|
12
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.ULTIMATE_BENEFICIAL_OWNER]: "Ultimate Beneficial Owner",
|
|
13
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.SHAREHOLDER]: "Shareholder",
|
|
14
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.DIRECTOR]: "Director",
|
|
15
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.SENIOR_MANAGEMENT]: "Senior Management",
|
|
16
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.AUTHORIZED_SIGNATORY]: "Authorized Signatory",
|
|
17
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.FOUNDER]: "Founder",
|
|
18
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.SPOUSE]: "Spouse",
|
|
19
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.DOMESTIC_PARTNER]: "Domestic Partner",
|
|
20
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.PARENT]: "Parent",
|
|
21
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.CHILD]: "Child",
|
|
22
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.SIBLING]: "Sibling",
|
|
23
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.BUSINESS_PARTNER]: "Business Partner",
|
|
24
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.CLOSE_ASSOCIATE]: "Close Associate",
|
|
25
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.GUARANTOR]: "Guarantor",
|
|
26
|
+
[natural_person_connection_type_pb_1.NaturalPersonConnectionType.BENEFICIARY_OF_TRUST]: "Beneficiary of Trust",
|
|
27
|
+
};
|
|
28
|
+
// Reverse mapping from string to NaturalPersonConnectionType enum
|
|
29
|
+
const stringToNaturalPersonConnectionTypeMapping = {};
|
|
30
|
+
for (const [key, value] of Object.entries(naturalPersonConnectionTypeToStringMapping)) {
|
|
31
|
+
stringToNaturalPersonConnectionTypeMapping[value] = Number(key);
|
|
32
|
+
}
|
|
33
|
+
class UnsupportedNaturalPersonConnectionTypeError extends Error {
|
|
34
|
+
constructor(naturalPersonConnectionType) {
|
|
35
|
+
const message = `Unsupported NaturalPersonConnectionType: ${naturalPersonConnectionType}`;
|
|
36
|
+
super(message);
|
|
37
|
+
this.naturalPersonConnectionType = naturalPersonConnectionType;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Converts a NaturalPersonConnectionType enum instance to a custom string representation.
|
|
42
|
+
* @param {NaturalPersonConnectionType} naturalPersonConnectionType - The connection type to convert.
|
|
43
|
+
* @returns {string} The custom string representation of the connection type.
|
|
44
|
+
*/
|
|
45
|
+
function naturalPersonConnectionTypeToString(naturalPersonConnectionType) {
|
|
46
|
+
if (naturalPersonConnectionType in naturalPersonConnectionTypeToStringMapping) {
|
|
47
|
+
return naturalPersonConnectionTypeToStringMapping[naturalPersonConnectionType];
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
throw new UnsupportedNaturalPersonConnectionTypeError(naturalPersonConnectionType);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
class UnsupportedNaturalPersonConnectionTypeStringError extends Error {
|
|
54
|
+
constructor(naturalPersonConnectionTypeStr) {
|
|
55
|
+
const message = `Unsupported natural person connection type string: ${naturalPersonConnectionTypeStr}`;
|
|
56
|
+
super(message);
|
|
57
|
+
this.naturalPersonConnectionTypeStr = naturalPersonConnectionTypeStr;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Converts a custom string representation to a NaturalPersonConnectionType enum instance.
|
|
62
|
+
* @param {string} naturalPersonConnectionTypeStr - The custom string representation.
|
|
63
|
+
* @returns {NaturalPersonConnectionType} The corresponding NaturalPersonConnectionType enum instance.
|
|
64
|
+
*/
|
|
65
|
+
function stringToNaturalPersonConnectionType(naturalPersonConnectionTypeStr) {
|
|
66
|
+
if (naturalPersonConnectionTypeStr in stringToNaturalPersonConnectionTypeMapping) {
|
|
67
|
+
return stringToNaturalPersonConnectionTypeMapping[naturalPersonConnectionTypeStr];
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
throw new UnsupportedNaturalPersonConnectionTypeStringError(naturalPersonConnectionTypeStr);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PepStatus } from "./pep_status_pb";
|
|
2
|
+
export declare const allPepStatuses: PepStatus[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts a PepStatus enum instance to a custom string representation.
|
|
5
|
+
* @param {PepStatus} pepStatus - The PEP status to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the PEP status.
|
|
7
|
+
*/
|
|
8
|
+
export declare function pepStatusToString(pepStatus: PepStatus): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to a PepStatus enum instance.
|
|
11
|
+
* @param {string} pepStatusStr - The custom string representation of the PEP status.
|
|
12
|
+
* @returns {PepStatus} The corresponding PepStatus enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToPepStatus(pepStatusStr: string): PepStatus;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allPepStatuses = void 0;
|
|
4
|
+
exports.pepStatusToString = pepStatusToString;
|
|
5
|
+
exports.stringToPepStatus = stringToPepStatus;
|
|
6
|
+
const pep_status_pb_1 = require("./pep_status_pb");
|
|
7
|
+
// Get all PEP statuses as enum values
|
|
8
|
+
exports.allPepStatuses = Object.values(pep_status_pb_1.PepStatus).filter((value) => typeof value === "number");
|
|
9
|
+
// Define explicit mappings between PepStatus enums and custom string representations
|
|
10
|
+
const pepStatusToStringMapping = {
|
|
11
|
+
[pep_status_pb_1.PepStatus.UNSPECIFIED]: "Unspecified",
|
|
12
|
+
[pep_status_pb_1.PepStatus.IS_NOT_PEP]: "Is Not PEP",
|
|
13
|
+
[pep_status_pb_1.PepStatus.IS_PEP]: "Is PEP",
|
|
14
|
+
[pep_status_pb_1.PepStatus.IS_ASSOCIATE]: "Is Associate",
|
|
15
|
+
};
|
|
16
|
+
// Reverse mapping from string to PepStatus enum
|
|
17
|
+
const stringToPepStatusMapping = {};
|
|
18
|
+
for (const [key, value] of Object.entries(pepStatusToStringMapping)) {
|
|
19
|
+
stringToPepStatusMapping[value] = Number(key);
|
|
20
|
+
}
|
|
21
|
+
class UnsupportedPepStatusError extends Error {
|
|
22
|
+
constructor(pepStatus) {
|
|
23
|
+
const message = `Unsupported PepStatus: ${pepStatus}`;
|
|
24
|
+
super(message);
|
|
25
|
+
this.pepStatus = pepStatus;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Converts a PepStatus enum instance to a custom string representation.
|
|
30
|
+
* @param {PepStatus} pepStatus - The PEP status to convert.
|
|
31
|
+
* @returns {string} The custom string representation of the PEP status.
|
|
32
|
+
*/
|
|
33
|
+
function pepStatusToString(pepStatus) {
|
|
34
|
+
if (pepStatus in pepStatusToStringMapping) {
|
|
35
|
+
return pepStatusToStringMapping[pepStatus];
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
throw new UnsupportedPepStatusError(pepStatus);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class UnsupportedPepStatusStringError extends Error {
|
|
42
|
+
constructor(pepStatusStr) {
|
|
43
|
+
const message = `Unsupported PEP status string: ${pepStatusStr}`;
|
|
44
|
+
super(message);
|
|
45
|
+
this.pepStatusStr = pepStatusStr;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Converts a custom string representation to a PepStatus enum instance.
|
|
50
|
+
* @param {string} pepStatusStr - The custom string representation of the PEP status.
|
|
51
|
+
* @returns {PepStatus} The corresponding PepStatus enum instance.
|
|
52
|
+
*/
|
|
53
|
+
function stringToPepStatus(pepStatusStr) {
|
|
54
|
+
if (pepStatusStr in stringToPepStatusMapping) {
|
|
55
|
+
return stringToPepStatusMapping[pepStatusStr];
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
throw new UnsupportedPepStatusStringError(pepStatusStr);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -14,7 +14,7 @@ export type GetClientRequest = Message<"meshtrade.compliance.client.v1.GetClient
|
|
|
14
14
|
/**
|
|
15
15
|
* The unique resource name of the client to be retrieved.
|
|
16
16
|
* The name serves as the primary identifier for the client resource.
|
|
17
|
-
* Format: "clients/{client_id}"
|
|
17
|
+
* Format: "compliance/clients/{client_id}"
|
|
18
18
|
*
|
|
19
19
|
* @generated from field: string name = 1;
|
|
20
20
|
*/
|
|
@@ -11,7 +11,7 @@ const method_options_pb_1 = require("../../../option/method_options/v1/method_op
|
|
|
11
11
|
/**
|
|
12
12
|
* Describes the file meshtrade/compliance/client/v1/service.proto.
|
|
13
13
|
*/
|
|
14
|
-
exports.file_meshtrade_compliance_client_v1_service = (0, codegenv2_1.fileDesc)("
|
|
14
|
+
exports.file_meshtrade_compliance_client_v1_service = (0, codegenv2_1.fileDesc)("CixtZXNodHJhZGUvY29tcGxpYW5jZS9jbGllbnQvdjEvc2VydmljZS5wcm90bxIebWVzaHRyYWRlLmNvbXBsaWFuY2UuY2xpZW50LnYxImoKEEdldENsaWVudFJlcXVlc3QSVgoEbmFtZRgBIAEoCUJIukhFyAEBckAyO15jb21wbGlhbmNlL2NsaWVudHMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0kmAEtIlUKE0NyZWF0ZUNsaWVudFJlcXVlc3QSPgoGY2xpZW50GAEgASgLMiYubWVzaHRyYWRlLmNvbXBsaWFuY2UuY2xpZW50LnYxLkNsaWVudEIGukgDyAEBImQKFUdldEdyb3VwQ2xpZW50UmVxdWVzdBJLCgVncm91cBgBIAEoCUI8ukg5yAEBcjQyL15ncm91cHMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0kmAEhIhQKEkxpc3RDbGllbnRzUmVxdWVzdCJOChNMaXN0Q2xpZW50c1Jlc3BvbnNlEjcKB2NsaWVudHMYASADKAsyJi5tZXNodHJhZGUuY29tcGxpYW5jZS5jbGllbnQudjEuQ2xpZW50MqgECg1DbGllbnRTZXJ2aWNlEn0KDENyZWF0ZUNsaWVudBIzLm1lc2h0cmFkZS5jb21wbGlhbmNlLmNsaWVudC52MS5DcmVhdGVDbGllbnRSZXF1ZXN0GiYubWVzaHRyYWRlLmNvbXBsaWFuY2UuY2xpZW50LnYxLkNsaWVudCIQsrUYDAgCEAIaBoCJeoKJehJ9CglHZXRDbGllbnQSMC5tZXNodHJhZGUuY29tcGxpYW5jZS5jbGllbnQudjEuR2V0Q2xpZW50UmVxdWVzdBomLm1lc2h0cmFkZS5jb21wbGlhbmNlLmNsaWVudC52MS5DbGllbnQiFrK1GBIIARACGgyAiXqBiXqCiXqDiXoShwEKDkdldEdyb3VwQ2xpZW50EjUubWVzaHRyYWRlLmNvbXBsaWFuY2UuY2xpZW50LnYxLkdldEdyb3VwQ2xpZW50UmVxdWVzdBomLm1lc2h0cmFkZS5jb21wbGlhbmNlLmNsaWVudC52MS5DbGllbnQiFrK1GBIIARACGgyAiXqBiXqCiXqDiXoSjgEKC0xpc3RDbGllbnRzEjIubWVzaHRyYWRlLmNvbXBsaWFuY2UuY2xpZW50LnYxLkxpc3RDbGllbnRzUmVxdWVzdBozLm1lc2h0cmFkZS5jb21wbGlhbmNlLmNsaWVudC52MS5MaXN0Q2xpZW50c1Jlc3BvbnNlIhaytRgSCAEQAhoMgIl6gYl6gol6g4l6QmMKJWNvLm1lc2h0cmFkZS5hcGkuY29tcGxpYW5jZS5jbGllbnQudjFaOmdpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9jb21wbGlhbmNlL2NsaWVudC92MTtjbGllbnRfdjFiBnByb3RvMw", [validate_pb_1.file_buf_validate_validate, client_pb_1.file_meshtrade_compliance_client_v1_client, method_options_pb_1.file_meshtrade_option_method_options_v1_method_options]);
|
|
15
15
|
/**
|
|
16
16
|
* Describes the message meshtrade.compliance.client.v1.GetClientRequest.
|
|
17
17
|
* Use `create(GetClientRequestSchema)` to create a new message.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SourceOfIncomeAndWealth } from "./source_of_income_and_wealth_pb";
|
|
2
|
+
export declare const allSourceOfIncomeAndWealths: SourceOfIncomeAndWealth[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts a SourceOfIncomeAndWealth enum instance to a custom string representation.
|
|
5
|
+
* @param {SourceOfIncomeAndWealth} sourceOfIncomeAndWealth - The source to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the source.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sourceOfIncomeAndWealthToString(sourceOfIncomeAndWealth: SourceOfIncomeAndWealth): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to a SourceOfIncomeAndWealth enum instance.
|
|
11
|
+
* @param {string} sourceOfIncomeAndWealthStr - The custom string representation.
|
|
12
|
+
* @returns {SourceOfIncomeAndWealth} The corresponding SourceOfIncomeAndWealth enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToSourceOfIncomeAndWealth(sourceOfIncomeAndWealthStr: string): SourceOfIncomeAndWealth;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allSourceOfIncomeAndWealths = void 0;
|
|
4
|
+
exports.sourceOfIncomeAndWealthToString = sourceOfIncomeAndWealthToString;
|
|
5
|
+
exports.stringToSourceOfIncomeAndWealth = stringToSourceOfIncomeAndWealth;
|
|
6
|
+
const source_of_income_and_wealth_pb_1 = require("./source_of_income_and_wealth_pb");
|
|
7
|
+
// Get all source of income and wealth values as enum values
|
|
8
|
+
exports.allSourceOfIncomeAndWealths = Object.values(source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth).filter((value) => typeof value === "number");
|
|
9
|
+
// Define explicit mappings between SourceOfIncomeAndWealth enums and custom string representations
|
|
10
|
+
const sourceOfIncomeAndWealthToStringMapping = {
|
|
11
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.UNSPECIFIED]: "Unspecified",
|
|
12
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.ALLOWANCES]: "Allowances",
|
|
13
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.BURSARY]: "Bursary",
|
|
14
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.COURT_ORDER]: "Court Order",
|
|
15
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.LOAN_FINANCIAL_INSTITUTION]: "Loan (Financial Institution)",
|
|
16
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.LOAN_OTHER]: "Loan (Other)",
|
|
17
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.MAINTENANCE]: "Maintenance",
|
|
18
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.MATURING_INVESTMENTS]: "Maturing Investments",
|
|
19
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.PENSION]: "Pension",
|
|
20
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.RENTAL_INCOME]: "Rental Income",
|
|
21
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.COMPANY_PROFITS]: "Company Profits",
|
|
22
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.COMPANY_SALE]: "Company Sale",
|
|
23
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.DECEASED_ESTATE]: "Deceased Estate",
|
|
24
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.DIVORCE_SETTLEMENT]: "Divorce Settlement",
|
|
25
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.GIFT_OR_DONATION]: "Gift or Donation",
|
|
26
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.INCOME_FROM_EMPLOYMENT]: "Income from Employment",
|
|
27
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.INCOME_FROM_PREVIOUS_EMPLOYMENT]: "Income from Previous Employment",
|
|
28
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.INHERITANCE]: "Inheritance",
|
|
29
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.LOTTERY_WINNINGS_OR_GAMBLING]: "Lottery Winnings or Gambling",
|
|
30
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.SALE_OF_ASSET]: "Sale of Asset",
|
|
31
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.SALE_OF_SHARES]: "Sale of Shares",
|
|
32
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.SAVINGS_INVESTMENT_OR_DIVIDEND]: "Savings, Investment or Dividend",
|
|
33
|
+
[source_of_income_and_wealth_pb_1.SourceOfIncomeAndWealth.TRUST_DISTRIBUTIONS]: "Trust Distributions",
|
|
34
|
+
};
|
|
35
|
+
// Reverse mapping from string to SourceOfIncomeAndWealth enum
|
|
36
|
+
const stringToSourceOfIncomeAndWealthMapping = {};
|
|
37
|
+
for (const [key, value] of Object.entries(sourceOfIncomeAndWealthToStringMapping)) {
|
|
38
|
+
stringToSourceOfIncomeAndWealthMapping[value] = Number(key);
|
|
39
|
+
}
|
|
40
|
+
class UnsupportedSourceOfIncomeAndWealthError extends Error {
|
|
41
|
+
constructor(sourceOfIncomeAndWealth) {
|
|
42
|
+
const message = `Unsupported SourceOfIncomeAndWealth: ${sourceOfIncomeAndWealth}`;
|
|
43
|
+
super(message);
|
|
44
|
+
this.sourceOfIncomeAndWealth = sourceOfIncomeAndWealth;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Converts a SourceOfIncomeAndWealth enum instance to a custom string representation.
|
|
49
|
+
* @param {SourceOfIncomeAndWealth} sourceOfIncomeAndWealth - The source to convert.
|
|
50
|
+
* @returns {string} The custom string representation of the source.
|
|
51
|
+
*/
|
|
52
|
+
function sourceOfIncomeAndWealthToString(sourceOfIncomeAndWealth) {
|
|
53
|
+
if (sourceOfIncomeAndWealth in sourceOfIncomeAndWealthToStringMapping) {
|
|
54
|
+
return sourceOfIncomeAndWealthToStringMapping[sourceOfIncomeAndWealth];
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
throw new UnsupportedSourceOfIncomeAndWealthError(sourceOfIncomeAndWealth);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class UnsupportedSourceOfIncomeAndWealthStringError extends Error {
|
|
61
|
+
constructor(sourceOfIncomeAndWealthStr) {
|
|
62
|
+
const message = `Unsupported source of income and wealth string: ${sourceOfIncomeAndWealthStr}`;
|
|
63
|
+
super(message);
|
|
64
|
+
this.sourceOfIncomeAndWealthStr = sourceOfIncomeAndWealthStr;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Converts a custom string representation to a SourceOfIncomeAndWealth enum instance.
|
|
69
|
+
* @param {string} sourceOfIncomeAndWealthStr - The custom string representation.
|
|
70
|
+
* @returns {SourceOfIncomeAndWealth} The corresponding SourceOfIncomeAndWealth enum instance.
|
|
71
|
+
*/
|
|
72
|
+
function stringToSourceOfIncomeAndWealth(sourceOfIncomeAndWealthStr) {
|
|
73
|
+
if (sourceOfIncomeAndWealthStr in stringToSourceOfIncomeAndWealthMapping) {
|
|
74
|
+
return stringToSourceOfIncomeAndWealthMapping[sourceOfIncomeAndWealthStr];
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new UnsupportedSourceOfIncomeAndWealthStringError(sourceOfIncomeAndWealthStr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VerificationStatus } from "./verification_status_pb";
|
|
2
|
+
export declare const allVerificationStatuses: VerificationStatus[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts a VerificationStatus enum instance to a custom string representation.
|
|
5
|
+
* @param {VerificationStatus} verificationStatus - The verification status to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the verification status.
|
|
7
|
+
*/
|
|
8
|
+
export declare function verificationStatusToString(verificationStatus: VerificationStatus): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to a VerificationStatus enum instance.
|
|
11
|
+
* @param {string} verificationStatusStr - The custom string representation of the verification status.
|
|
12
|
+
* @returns {VerificationStatus} The corresponding VerificationStatus enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToVerificationStatus(verificationStatusStr: string): VerificationStatus;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allVerificationStatuses = void 0;
|
|
4
|
+
exports.verificationStatusToString = verificationStatusToString;
|
|
5
|
+
exports.stringToVerificationStatus = stringToVerificationStatus;
|
|
6
|
+
const verification_status_pb_1 = require("./verification_status_pb");
|
|
7
|
+
// Get all verification statuses as enum values
|
|
8
|
+
exports.allVerificationStatuses = Object.values(verification_status_pb_1.VerificationStatus).filter((value) => typeof value === "number");
|
|
9
|
+
// Define explicit mappings between VerificationStatus enums and custom string representations
|
|
10
|
+
const verificationStatusToStringMapping = {
|
|
11
|
+
[verification_status_pb_1.VerificationStatus.UNSPECIFIED]: "Unspecified",
|
|
12
|
+
[verification_status_pb_1.VerificationStatus.NOT_STARTED]: "Not Started",
|
|
13
|
+
[verification_status_pb_1.VerificationStatus.PENDING]: "Pending",
|
|
14
|
+
[verification_status_pb_1.VerificationStatus.VERIFIED]: "Verified",
|
|
15
|
+
[verification_status_pb_1.VerificationStatus.FAILED]: "Failed",
|
|
16
|
+
};
|
|
17
|
+
// Reverse mapping from string to VerificationStatus enum
|
|
18
|
+
const stringToVerificationStatusMapping = {};
|
|
19
|
+
for (const [key, value] of Object.entries(verificationStatusToStringMapping)) {
|
|
20
|
+
stringToVerificationStatusMapping[value] = Number(key);
|
|
21
|
+
}
|
|
22
|
+
class UnsupportedVerificationStatusError extends Error {
|
|
23
|
+
constructor(verificationStatus) {
|
|
24
|
+
const message = `Unsupported VerificationStatus: ${verificationStatus}`;
|
|
25
|
+
super(message);
|
|
26
|
+
this.verificationStatus = verificationStatus;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Converts a VerificationStatus enum instance to a custom string representation.
|
|
31
|
+
* @param {VerificationStatus} verificationStatus - The verification status to convert.
|
|
32
|
+
* @returns {string} The custom string representation of the verification status.
|
|
33
|
+
*/
|
|
34
|
+
function verificationStatusToString(verificationStatus) {
|
|
35
|
+
if (verificationStatus in verificationStatusToStringMapping) {
|
|
36
|
+
return verificationStatusToStringMapping[verificationStatus];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
throw new UnsupportedVerificationStatusError(verificationStatus);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class UnsupportedVerificationStatusStringError extends Error {
|
|
43
|
+
constructor(verificationStatusStr) {
|
|
44
|
+
const message = `Unsupported verification status string: ${verificationStatusStr}`;
|
|
45
|
+
super(message);
|
|
46
|
+
this.verificationStatusStr = verificationStatusStr;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Converts a custom string representation to a VerificationStatus enum instance.
|
|
51
|
+
* @param {string} verificationStatusStr - The custom string representation of the verification status.
|
|
52
|
+
* @returns {VerificationStatus} The corresponding VerificationStatus enum instance.
|
|
53
|
+
*/
|
|
54
|
+
function stringToVerificationStatus(verificationStatusStr) {
|
|
55
|
+
if (verificationStatusStr in stringToVerificationStatusMapping) {
|
|
56
|
+
return stringToVerificationStatusMapping[verificationStatusStr];
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new UnsupportedVerificationStatusStringError(verificationStatusStr);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -12,7 +12,7 @@ const method_options_pb_1 = require("../../../option/method_options/v1/method_op
|
|
|
12
12
|
/**
|
|
13
13
|
* Describes the file meshtrade/iam/user_profile/v1/service.proto.
|
|
14
14
|
*/
|
|
15
|
-
exports.file_meshtrade_iam_user_profile_v1_service = (0, codegenv2_1.fileDesc)("
|
|
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VcGxvYWRVcmxSZXF1ZXN0GkUubWVzaHRyYWRlLmlhbS51c2VyX3Byb2ZpbGUudjEuR2V0VXNlclByb2ZpbGVQaWN0dXJlVXBsb2FkVXJsUmVzcG9uc2UiErK1GA4IARACGgjAjbcByI23AUJnCiRjby5tZXNodHJhZGUuYXBpLmlhbS51c2VyX3Byb2ZpbGUudjFaP2dpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9pYW0vdXNlcl9wcm9maWxlL3YxO3VzZXJfcHJvZmlsZV92MWIGcHJvdG8z", [validate_pb_1.file_buf_validate_validate, wkt_1.file_google_protobuf_timestamp, user_profile_pb_1.file_meshtrade_iam_user_profile_v1_user_profile, method_options_pb_1.file_meshtrade_option_method_options_v1_method_options]);
|
|
16
16
|
/**
|
|
17
17
|
* Describes the message meshtrade.iam.user_profile.v1.GetUserProfileByUserRequest.
|
|
18
18
|
* Use `create(GetUserProfileByUserRequestSchema)` to create a new message.
|