@meshtrade/api-node 1.30.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/README.md +93 -0
- package/dist/buf/validate/validate_pb.d.ts +4597 -0
- package/dist/buf/validate/validate_pb.js +354 -0
- package/dist/google/type/date_pb.d.ts +52 -0
- package/dist/google/type/date_pb.js +26 -0
- package/dist/meshtrade/common/config.d.ts +50 -0
- package/dist/meshtrade/common/config.js +34 -0
- package/dist/meshtrade/common/connectInterceptors.d.ts +137 -0
- package/dist/meshtrade/common/connectInterceptors.js +233 -0
- package/dist/meshtrade/common/validation.d.ts +62 -0
- package/dist/meshtrade/common/validation.js +77 -0
- package/dist/meshtrade/compliance/client/v1/client_pb.d.ts +138 -0
- package/dist/meshtrade/compliance/client/v1/client_pb.js +23 -0
- package/dist/meshtrade/compliance/client/v1/company_pb.d.ts +313 -0
- package/dist/meshtrade/compliance/client/v1/company_pb.js +100 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_pb.d.ts +81 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_pb.js +22 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.d.ts +88 -0
- package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.js +95 -0
- package/dist/meshtrade/compliance/client/v1/fund_pb.d.ts +65 -0
- package/dist/meshtrade/compliance/client/v1/fund_pb.js +18 -0
- package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.d.ts +55 -0
- package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.js +62 -0
- package/dist/meshtrade/compliance/client/v1/index.d.ts +16 -0
- package/dist/meshtrade/compliance/client/v1/index.js +59 -0
- package/dist/meshtrade/compliance/client/v1/industry_classification_pb.d.ts +86 -0
- package/dist/meshtrade/compliance/client/v1/industry_classification_pb.js +16 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.d.ts +133 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.js +140 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_pb.d.ts +143 -0
- package/dist/meshtrade/compliance/client/v1/natural_person_pb.js +24 -0
- package/dist/meshtrade/compliance/client/v1/pep_status_pb.d.ts +46 -0
- package/dist/meshtrade/compliance/client/v1/pep_status_pb.js +53 -0
- package/dist/meshtrade/compliance/client/v1/service_node_meshts.d.ts +78 -0
- package/dist/meshtrade/compliance/client/v1/service_node_meshts.js +141 -0
- package/dist/meshtrade/compliance/client/v1/service_pb.d.ts +123 -0
- package/dist/meshtrade/compliance/client/v1/service_pb.js +45 -0
- package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.d.ts +180 -0
- package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.js +187 -0
- package/dist/meshtrade/compliance/client/v1/tax_residency_pb.d.ts +40 -0
- package/dist/meshtrade/compliance/client/v1/tax_residency_pb.js +17 -0
- package/dist/meshtrade/compliance/client/v1/trust_pb.d.ts +65 -0
- package/dist/meshtrade/compliance/client/v1/trust_pb.js +18 -0
- package/dist/meshtrade/compliance/client/v1/verification_status_pb.d.ts +57 -0
- package/dist/meshtrade/compliance/client/v1/verification_status_pb.js +64 -0
- package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.d.ts +43 -0
- package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.js +17 -0
- package/dist/meshtrade/iam/api_user/v1/api_user_pb.d.ts +152 -0
- package/dist/meshtrade/iam/api_user/v1/api_user_pb.js +95 -0
- package/dist/meshtrade/iam/api_user/v1/index.d.ts +4 -0
- package/dist/meshtrade/iam/api_user/v1/index.js +45 -0
- package/dist/meshtrade/iam/api_user/v1/service_node_meshts.d.ts +114 -0
- package/dist/meshtrade/iam/api_user/v1/service_node_meshts.js +201 -0
- package/dist/meshtrade/iam/api_user/v1/service_pb.d.ts +343 -0
- package/dist/meshtrade/iam/api_user/v1/service_pb.js +86 -0
- package/dist/meshtrade/iam/group/v1/group_pb.d.ts +58 -0
- package/dist/meshtrade/iam/group/v1/group_pb.js +17 -0
- package/dist/meshtrade/iam/group/v1/index.d.ts +3 -0
- package/dist/meshtrade/iam/group/v1/index.js +44 -0
- package/dist/meshtrade/iam/group/v1/service_node_meshts.d.ts +90 -0
- package/dist/meshtrade/iam/group/v1/service_node_meshts.js +161 -0
- package/dist/meshtrade/iam/group/v1/service_pb.d.ts +306 -0
- package/dist/meshtrade/iam/group/v1/service_pb.js +75 -0
- package/dist/meshtrade/iam/role/v1/index.d.ts +2 -0
- package/dist/meshtrade/iam/role/v1/index.js +43 -0
- package/dist/meshtrade/iam/role/v1/role.d.ts +71 -0
- package/dist/meshtrade/iam/role/v1/role.js +192 -0
- package/dist/meshtrade/iam/role/v1/role_pb.d.ts +164 -0
- package/dist/meshtrade/iam/role/v1/role_pb.js +171 -0
- package/dist/meshtrade/iam/user/v1/index.d.ts +3 -0
- package/dist/meshtrade/iam/user/v1/index.js +44 -0
- package/dist/meshtrade/iam/user/v1/service_node_meshts.d.ts +108 -0
- package/dist/meshtrade/iam/user/v1/service_node_meshts.js +191 -0
- package/dist/meshtrade/iam/user/v1/service_pb.d.ts +379 -0
- package/dist/meshtrade/iam/user/v1/service_pb.js +90 -0
- package/dist/meshtrade/iam/user/v1/user_pb.d.ts +58 -0
- package/dist/meshtrade/iam/user/v1/user_pb.js +17 -0
- package/dist/meshtrade/ledger/transaction/v1/index.d.ts +5 -0
- package/dist/meshtrade/ledger/transaction/v1/index.js +46 -0
- package/dist/meshtrade/ledger/transaction/v1/service_node_meshts.d.ts +80 -0
- package/dist/meshtrade/ledger/transaction/v1/service_node_meshts.js +140 -0
- package/dist/meshtrade/ledger/transaction/v1/service_pb.d.ts +102 -0
- package/dist/meshtrade/ledger/transaction/v1/service_pb.js +41 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.d.ts +46 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.js +53 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state.d.ts +14 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state.js +64 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.d.ts +50 -0
- package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.js +57 -0
- package/dist/meshtrade/market_data/price/v1/index.d.ts +3 -0
- package/dist/meshtrade/market_data/price/v1/index.js +44 -0
- package/dist/meshtrade/market_data/price/v1/price_pb.d.ts +50 -0
- package/dist/meshtrade/market_data/price/v1/price_pb.js +19 -0
- package/dist/meshtrade/market_data/price/v1/service_node_meshts.d.ts +66 -0
- package/dist/meshtrade/market_data/price/v1/service_node_meshts.js +121 -0
- package/dist/meshtrade/market_data/price/v1/service_pb.d.ts +48 -0
- package/dist/meshtrade/market_data/price/v1/service_pb.js +27 -0
- package/dist/meshtrade/option/method_options/v1/index.d.ts +1 -0
- package/dist/meshtrade/option/method_options/v1/index.js +42 -0
- package/dist/meshtrade/option/method_options/v1/method_options_pb.d.ts +132 -0
- package/dist/meshtrade/option/method_options/v1/method_options_pb.js +108 -0
- package/dist/meshtrade/reporting/account_report/v1/account_report_pb.d.ts +136 -0
- package/dist/meshtrade/reporting/account_report/v1/account_report_pb.js +28 -0
- package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.d.ts +39 -0
- package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.js +16 -0
- package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.d.ts +66 -0
- package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.js +18 -0
- package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.d.ts +139 -0
- package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.js +80 -0
- package/dist/meshtrade/reporting/account_report/v1/index.d.ts +7 -0
- package/dist/meshtrade/reporting/account_report/v1/index.js +48 -0
- package/dist/meshtrade/reporting/account_report/v1/service_node_meshts.d.ts +72 -0
- package/dist/meshtrade/reporting/account_report/v1/service_node_meshts.js +131 -0
- package/dist/meshtrade/reporting/account_report/v1/service_pb.d.ts +162 -0
- package/dist/meshtrade/reporting/account_report/v1/service_pb.js +46 -0
- package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.d.ts +80 -0
- package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.js +18 -0
- package/dist/meshtrade/studio/instrument/v1/index.d.ts +3 -0
- package/dist/meshtrade/studio/instrument/v1/index.js +44 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_pb.d.ts +53 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_pb.js +18 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.d.ts +214 -0
- package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.js +221 -0
- package/dist/meshtrade/studio/instrument/v1/unit_pb.d.ts +148 -0
- package/dist/meshtrade/studio/instrument/v1/unit_pb.js +155 -0
- package/dist/meshtrade/trading/limit_order/v1/index.d.ts +3 -0
- package/dist/meshtrade/trading/limit_order/v1/index.js +44 -0
- package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.d.ts +211 -0
- package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.js +111 -0
- package/dist/meshtrade/trading/limit_order/v1/service_node_meshts.d.ts +111 -0
- package/dist/meshtrade/trading/limit_order/v1/service_node_meshts.js +190 -0
- package/dist/meshtrade/trading/limit_order/v1/service_pb.d.ts +357 -0
- package/dist/meshtrade/trading/limit_order/v1/service_pb.js +73 -0
- package/dist/meshtrade/trading/market_order/v1/index.d.ts +3 -0
- package/dist/meshtrade/trading/market_order/v1/index.js +44 -0
- package/dist/meshtrade/trading/market_order/v1/market_order_pb.d.ts +20 -0
- package/dist/meshtrade/trading/market_order/v1/market_order_pb.js +16 -0
- package/dist/meshtrade/trading/market_order/v1/service_node_meshts.d.ts +66 -0
- package/dist/meshtrade/trading/market_order/v1/service_node_meshts.js +121 -0
- package/dist/meshtrade/trading/market_order/v1/service_pb.d.ts +34 -0
- package/dist/meshtrade/trading/market_order/v1/service_pb.js +22 -0
- package/dist/meshtrade/type/v1/address_pb.d.ts +82 -0
- package/dist/meshtrade/type/v1/address_pb.js +16 -0
- package/dist/meshtrade/type/v1/amount.d.ts +13 -0
- package/dist/meshtrade/type/v1/amount.js +68 -0
- package/dist/meshtrade/type/v1/amountWrapper.d.ts +74 -0
- package/dist/meshtrade/type/v1/amountWrapper.js +98 -0
- package/dist/meshtrade/type/v1/amount_pb.d.ts +44 -0
- package/dist/meshtrade/type/v1/amount_pb.js +18 -0
- package/dist/meshtrade/type/v1/contact_details_pb.d.ts +98 -0
- package/dist/meshtrade/type/v1/contact_details_pb.js +16 -0
- package/dist/meshtrade/type/v1/date.d.ts +49 -0
- package/dist/meshtrade/type/v1/date.js +136 -0
- package/dist/meshtrade/type/v1/date_pb.d.ts +50 -0
- package/dist/meshtrade/type/v1/date_pb.js +16 -0
- package/dist/meshtrade/type/v1/decimalConversions.d.ts +24 -0
- package/dist/meshtrade/type/v1/decimalConversions.js +39 -0
- package/dist/meshtrade/type/v1/decimal_pb.d.ts +24 -0
- package/dist/meshtrade/type/v1/decimal_pb.js +16 -0
- package/dist/meshtrade/type/v1/index.d.ts +15 -0
- package/dist/meshtrade/type/v1/index.js +56 -0
- package/dist/meshtrade/type/v1/ledger.d.ts +27 -0
- package/dist/meshtrade/type/v1/ledger.js +115 -0
- package/dist/meshtrade/type/v1/ledger_pb.d.ts +83 -0
- package/dist/meshtrade/type/v1/ledger_pb.js +90 -0
- package/dist/meshtrade/type/v1/sorting_pb.d.ts +35 -0
- package/dist/meshtrade/type/v1/sorting_pb.js +42 -0
- package/dist/meshtrade/type/v1/time_of_day.d.ts +74 -0
- package/dist/meshtrade/type/v1/time_of_day.js +199 -0
- package/dist/meshtrade/type/v1/time_of_day_pb.d.ts +67 -0
- package/dist/meshtrade/type/v1/time_of_day_pb.js +16 -0
- package/dist/meshtrade/type/v1/token.d.ts +4 -0
- package/dist/meshtrade/type/v1/token.js +23 -0
- package/dist/meshtrade/type/v1/tokenWrapper.d.ts +49 -0
- package/dist/meshtrade/type/v1/tokenWrapper.js +92 -0
- package/dist/meshtrade/type/v1/token_pb.d.ts +56 -0
- package/dist/meshtrade/type/v1/token_pb.js +17 -0
- package/dist/meshtrade/wallet/account/v1/account_pb.d.ts +264 -0
- package/dist/meshtrade/wallet/account/v1/account_pb.js +74 -0
- package/dist/meshtrade/wallet/account/v1/index.d.ts +3 -0
- package/dist/meshtrade/wallet/account/v1/index.js +44 -0
- package/dist/meshtrade/wallet/account/v1/service_node_meshts.d.ts +114 -0
- package/dist/meshtrade/wallet/account/v1/service_node_meshts.js +201 -0
- package/dist/meshtrade/wallet/account/v1/service_pb.d.ts +559 -0
- package/dist/meshtrade/wallet/account/v1/service_pb.js +112 -0
- package/package.json +171 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
|
|
3
|
+
// @generated from file meshtrade/iam/group/v1/service.proto (package meshtrade.iam.group.v1, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GroupService = exports.GetGroupRequestSchema = exports.SearchGroupsResponseSchema = exports.SearchGroupsRequest_SortingSchema = exports.SearchGroupsRequestSchema = exports.ListGroupsResponseSchema = exports.ListGroupsRequest_SortingSchema = exports.ListGroupsRequestSchema = exports.UpdateGroupRequestSchema = exports.CreateGroupRequestSchema = exports.file_meshtrade_iam_group_v1_service = void 0;
|
|
7
|
+
const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
8
|
+
const validate_pb_1 = require("../../../../buf/validate/validate_pb");
|
|
9
|
+
const group_pb_1 = require("./group_pb");
|
|
10
|
+
const method_options_pb_1 = require("../../../option/method_options/v1/method_options_pb");
|
|
11
|
+
const sorting_pb_1 = require("../../../type/v1/sorting_pb");
|
|
12
|
+
/**
|
|
13
|
+
* Describes the file meshtrade/iam/group/v1/service.proto.
|
|
14
|
+
*/
|
|
15
|
+
exports.file_meshtrade_iam_group_v1_service = (0, codegenv2_1.fileDesc)("CiRtZXNodHJhZGUvaWFtL2dyb3VwL3YxL3NlcnZpY2UucHJvdG8SFm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEiSgoSQ3JlYXRlR3JvdXBSZXF1ZXN0EjQKBWdyb3VwGAEgASgLMh0ubWVzaHRyYWRlLmlhbS5ncm91cC52MS5Hcm91cEIGukgDyAEBIkoKElVwZGF0ZUdyb3VwUmVxdWVzdBI0CgVncm91cBgBIAEoCzIdLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuR3JvdXBCBrpIA8gBASKsAgoRTGlzdEdyb3Vwc1JlcXVlc3QSQgoHc29ydGluZxgBIAEoCzIxLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuTGlzdEdyb3Vwc1JlcXVlc3QuU29ydGluZxrSAQoHU29ydGluZxKWAQoFZmllbGQYASABKAlChgG6SIIBugFnCgtmaWVsZC52YWxpZBIyZmllbGQgbXVzdCBiZSBvbmUgb2Y6IG5hbWUsIGRpc3BsYXlfbmFtZSwgb3IgZW1wdHkaJHRoaXMgaW4gWycnLCAnbmFtZScsICdkaXNwbGF5X25hbWUnXXIWUgBSBG5hbWVSDGRpc3BsYXlfbmFtZRIuCgVvcmRlchgCIAEoDjIfLm1lc2h0cmFkZS50eXBlLnYxLlNvcnRpbmdPcmRlciJDChJMaXN0R3JvdXBzUmVzcG9uc2USLQoGZ3JvdXBzGAEgAygLMh0ubWVzaHRyYWRlLmlhbS5ncm91cC52MS5Hcm91cCK/BAoTU2VhcmNoR3JvdXBzUmVxdWVzdBKGAQoMZGlzcGxheV9uYW1lGAEgASgJQnC6SG26AWUKF2Rpc3BsYXlfbmFtZS5tYXhfbGVuZ3RoEjdkaXNwbGF5X25hbWUgc2VhcmNoIHRlcm0gbXVzdCBub3QgZXhjZWVkIDI1NSBjaGFyYWN0ZXJzGhFzaXplKHRoaXMpIDw9IDI1NXIDGP8BEoMBCgtkZXNjcmlwdGlvbhgCIAEoCUJuukhrugFjChZkZXNjcmlwdGlvbi5tYXhfbGVuZ3RoEjZkZXNjcmlwdGlvbiBzZWFyY2ggdGVybSBtdXN0IG5vdCBleGNlZWQgMjU1IGNoYXJhY3RlcnMaEXNpemUodGhpcykgPD0gMjU1cgMY/wESRAoHc29ydGluZxgDIAEoCzIzLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuU2VhcmNoR3JvdXBzUmVxdWVzdC5Tb3J0aW5nGtIBCgdTb3J0aW5nEpYBCgVmaWVsZBgBIAEoCUKGAbpIggG6AWcKC2ZpZWxkLnZhbGlkEjJmaWVsZCBtdXN0IGJlIG9uZSBvZjogbmFtZSwgZGlzcGxheV9uYW1lLCBvciBlbXB0eRokdGhpcyBpbiBbJycsICduYW1lJywgJ2Rpc3BsYXlfbmFtZSddchZSAFIEbmFtZVIMZGlzcGxheV9uYW1lEi4KBW9yZGVyGAIgASgOMh8ubWVzaHRyYWRlLnR5cGUudjEuU29ydGluZ09yZGVyIkUKFFNlYXJjaEdyb3Vwc1Jlc3BvbnNlEi0KBmdyb3VwcxgBIAMoCzIdLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuR3JvdXAi8AIKD0dldEdyb3VwUmVxdWVzdBLcAgoEbmFtZRgBIAEoCULNArpIyQK6AVcKDW5hbWUucmVxdWlyZWQSNm5hbWUgaXMgcmVxdWlyZWQgYW5kIG11c3QgYmUgaW4gZm9ybWF0IGdyb3Vwcy97VUxJRHYyfRoOc2l6ZSh0aGlzKSA+IDC6AbMBCgtuYW1lLmZvcm1hdBJjbmFtZSBtdXN0IGJlIGluIGZvcm1hdCBncm91cHMve1VMSUR2Mn0gd2hlcmUgdWxpZHYyIGlzIGV4YWN0bHkgMjYgdXBwZXJjYXNlIGFscGhhbnVtZXJpYyBjaGFyYWN0ZXJzGj90aGlzLm1hdGNoZXMoJ15ncm91cHMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0kJynIAQFyMxABMi9eZ3JvdXBzL1swMTIzNDU2Nzg5QUJDREVGR0hKS01OUFFSU1RWV1hZWl17MjZ9JDLjBAoMR3JvdXBTZXJ2aWNlEmwKC0NyZWF0ZUdyb3VwEioubWVzaHRyYWRlLmlhbS5ncm91cC52MS5DcmVhdGVHcm91cFJlcXVlc3QaHS5tZXNodHJhZGUuaWFtLmdyb3VwLnYxLkdyb3VwIhKytRgOCAIQAhoIwI23AcSNtwESbAoLVXBkYXRlR3JvdXASKi5tZXNodHJhZGUuaWFtLmdyb3VwLnYxLlVwZGF0ZUdyb3VwUmVxdWVzdBodLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuR3JvdXAiErK1GA4IAhACGgjAjbcBxI23ARJ/CgpMaXN0R3JvdXBzEikubWVzaHRyYWRlLmlhbS5ncm91cC52MS5MaXN0R3JvdXBzUmVxdWVzdBoqLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuTGlzdEdyb3Vwc1Jlc3BvbnNlIhqytRgWCAEQAhoQwI23AcGNtwHEjbcBxY23ARKFAQoMU2VhcmNoR3JvdXBzEisubWVzaHRyYWRlLmlhbS5ncm91cC52MS5TZWFyY2hHcm91cHNSZXF1ZXN0GiwubWVzaHRyYWRlLmlhbS5ncm91cC52MS5TZWFyY2hHcm91cHNSZXNwb25zZSIasrUYFggBEAIaEMCNtwHBjbcBxI23AcWNtwESbgoIR2V0R3JvdXASJy5tZXNodHJhZGUuaWFtLmdyb3VwLnYxLkdldEdyb3VwUmVxdWVzdBodLm1lc2h0cmFkZS5pYW0uZ3JvdXAudjEuR3JvdXAiGrK1GBYIARACGhDAjbcBwY23AcSNtwHFjbcBQlIKHWNvLm1lc2h0cmFkZS5hcGkuaWFtLmdyb3VwLnYxWjFnaXRodWIuY29tL21lc2h0cmFkZS9hcGkvZ28vaWFtL2dyb3VwL3YxO2dyb3VwX3YxYgZwcm90bzM", [validate_pb_1.file_buf_validate_validate, group_pb_1.file_meshtrade_iam_group_v1_group, method_options_pb_1.file_meshtrade_option_method_options_v1_method_options, sorting_pb_1.file_meshtrade_type_v1_sorting]);
|
|
16
|
+
/**
|
|
17
|
+
* Describes the message meshtrade.iam.group.v1.CreateGroupRequest.
|
|
18
|
+
* Use `create(CreateGroupRequestSchema)` to create a new message.
|
|
19
|
+
*/
|
|
20
|
+
exports.CreateGroupRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 0);
|
|
21
|
+
/**
|
|
22
|
+
* Describes the message meshtrade.iam.group.v1.UpdateGroupRequest.
|
|
23
|
+
* Use `create(UpdateGroupRequestSchema)` to create a new message.
|
|
24
|
+
*/
|
|
25
|
+
exports.UpdateGroupRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 1);
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message meshtrade.iam.group.v1.ListGroupsRequest.
|
|
28
|
+
* Use `create(ListGroupsRequestSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
exports.ListGroupsRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 2);
|
|
31
|
+
/**
|
|
32
|
+
* Describes the message meshtrade.iam.group.v1.ListGroupsRequest.Sorting.
|
|
33
|
+
* Use `create(ListGroupsRequest_SortingSchema)` to create a new message.
|
|
34
|
+
*/
|
|
35
|
+
exports.ListGroupsRequest_SortingSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 2, 0);
|
|
36
|
+
/**
|
|
37
|
+
* Describes the message meshtrade.iam.group.v1.ListGroupsResponse.
|
|
38
|
+
* Use `create(ListGroupsResponseSchema)` to create a new message.
|
|
39
|
+
*/
|
|
40
|
+
exports.ListGroupsResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 3);
|
|
41
|
+
/**
|
|
42
|
+
* Describes the message meshtrade.iam.group.v1.SearchGroupsRequest.
|
|
43
|
+
* Use `create(SearchGroupsRequestSchema)` to create a new message.
|
|
44
|
+
*/
|
|
45
|
+
exports.SearchGroupsRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 4);
|
|
46
|
+
/**
|
|
47
|
+
* Describes the message meshtrade.iam.group.v1.SearchGroupsRequest.Sorting.
|
|
48
|
+
* Use `create(SearchGroupsRequest_SortingSchema)` to create a new message.
|
|
49
|
+
*/
|
|
50
|
+
exports.SearchGroupsRequest_SortingSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 4, 0);
|
|
51
|
+
/**
|
|
52
|
+
* Describes the message meshtrade.iam.group.v1.SearchGroupsResponse.
|
|
53
|
+
* Use `create(SearchGroupsResponseSchema)` to create a new message.
|
|
54
|
+
*/
|
|
55
|
+
exports.SearchGroupsResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 5);
|
|
56
|
+
/**
|
|
57
|
+
* Describes the message meshtrade.iam.group.v1.GetGroupRequest.
|
|
58
|
+
* Use `create(GetGroupRequestSchema)` to create a new message.
|
|
59
|
+
*/
|
|
60
|
+
exports.GetGroupRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_group_v1_service, 6);
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* GroupService manages organizational group hierarchy and lifecycle operations.
|
|
64
|
+
*
|
|
65
|
+
* Groups are the fundamental multi-tenancy units in Mesh that own resources,
|
|
66
|
+
* define permission boundaries, and enable hierarchical access control.
|
|
67
|
+
* Each group can own sub-groups, users, API users, and platform resources,
|
|
68
|
+
* forming tree structures for inherited permissions and resource isolation.
|
|
69
|
+
*
|
|
70
|
+
* All operations are scoped to the authenticated group's hierarchy and
|
|
71
|
+
* require appropriate IAM domain permissions.
|
|
72
|
+
*
|
|
73
|
+
* @generated from service meshtrade.iam.group.v1.GroupService
|
|
74
|
+
*/
|
|
75
|
+
exports.GroupService = (0, codegenv2_1.serviceDesc)(exports.file_meshtrade_iam_group_v1_service, 0);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ===================================================================
|
|
3
|
+
// AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
|
|
4
|
+
// ===================================================================
|
|
5
|
+
// This section is automatically managed by protoc-gen-meshts.
|
|
6
|
+
//
|
|
7
|
+
// DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
|
|
8
|
+
// Your changes will be overwritten during code generation.
|
|
9
|
+
//
|
|
10
|
+
// To add custom exports, scroll down to the
|
|
11
|
+
// "MANUAL EXPORTS" section indicated below.
|
|
12
|
+
// ===================================================================
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
// Generated exports
|
|
29
|
+
__exportStar(require("./role_pb"), exports);
|
|
30
|
+
// ===================================================================
|
|
31
|
+
// END OF AUTO-GENERATED SECTION
|
|
32
|
+
// ===================================================================
|
|
33
|
+
//
|
|
34
|
+
// MANUAL EXPORTS - ADD YOUR CUSTOM EXPORTS BELOW
|
|
35
|
+
//
|
|
36
|
+
// You can safely add your own export statements in this section.
|
|
37
|
+
// They will be preserved across code generation.
|
|
38
|
+
//
|
|
39
|
+
// Example:
|
|
40
|
+
// export * from "./my_custom_module";
|
|
41
|
+
// export { MyCustomClass } from "./another_module";
|
|
42
|
+
// ===================================================================
|
|
43
|
+
__exportStar(require("./role"), exports);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Role } from "./role_pb";
|
|
2
|
+
export declare const allRoles: Role[];
|
|
3
|
+
/**
|
|
4
|
+
* Converts a Role enum instance to a custom string representation.
|
|
5
|
+
* @param {Role} role - The role to convert.
|
|
6
|
+
* @returns {string} The custom string representation of the role.
|
|
7
|
+
*/
|
|
8
|
+
export declare function roleToString(role: Role): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a custom string representation to a Role enum instance.
|
|
11
|
+
* @param {string} roleStr - The custom string representation of the role.
|
|
12
|
+
* @returns {Role} The corresponding Role enum instance.
|
|
13
|
+
*/
|
|
14
|
+
export declare function stringToRole(roleStr: string): Role;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a role path resource name from a group ULID and role ID.
|
|
17
|
+
* @param {string} groupULID - The group ULID (26 characters).
|
|
18
|
+
* @param {number} roleId - The role ID enum value.
|
|
19
|
+
* @returns {string} The role path in format groups/{ULIDv2}/roles/{role_id}.
|
|
20
|
+
* @throws {Error} If the group ULID is invalid.
|
|
21
|
+
* @throws {Error} If the role ID is invalid.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* createRolePath('01ARZ3NDEKTSV4YWVF8F5BH32', Role.ROLE_IAM_ADMIN);
|
|
26
|
+
* // Returns: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32/roles/1000000'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function createRolePath(groupULID: string, roleId: number): string;
|
|
30
|
+
/**
|
|
31
|
+
* Validates whether a role path is in the correct format.
|
|
32
|
+
* @param {string} rolePath - The role path to validate.
|
|
33
|
+
* @returns {boolean} True if the role path is valid, false otherwise.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* isValidRolePath('groups/01ARZ3NDEKTSV4YWVF8F5BH32Q/roles/1000000'); // true
|
|
38
|
+
* isValidRolePath('groups/01ARZ3NDEKTSV4YWVF8F5BH32Q/1000000'); // false (old format)
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function isValidRolePath(rolePath: string): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Extracts the role ID from a role path.
|
|
44
|
+
* @param {string} rolePath - The role path in format groups/{ULIDv2}/roles/{role_id}.
|
|
45
|
+
* @returns {number | null} The role ID if valid, null otherwise.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* extractRoleIdFromPath('groups/01ARZ3NDEKTSV4YWVF8F5BH32/roles/1000000');
|
|
50
|
+
* // Returns: 1000000
|
|
51
|
+
*
|
|
52
|
+
* extractRoleIdFromPath('invalid/path');
|
|
53
|
+
* // Returns: null
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare function extractRoleIdFromPath(rolePath: string): number | null;
|
|
57
|
+
/**
|
|
58
|
+
* Extracts the group resource name from a role path.
|
|
59
|
+
* @param {string} rolePath - The role path in format groups/{ULIDv2}/roles/{role_id}.
|
|
60
|
+
* @returns {string | null} The group resource name (groups/{ULIDv2}) if valid, null otherwise.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* extractGroupFromRolePath('groups/01ARZ3NDEKTSV4YWVF8F5BH32/roles/1000000');
|
|
65
|
+
* // Returns: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
|
|
66
|
+
*
|
|
67
|
+
* extractGroupFromRolePath('invalid/path');
|
|
68
|
+
* // Returns: null
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function extractGroupFromRolePath(rolePath: string): string | null;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allRoles = void 0;
|
|
4
|
+
exports.roleToString = roleToString;
|
|
5
|
+
exports.stringToRole = stringToRole;
|
|
6
|
+
exports.createRolePath = createRolePath;
|
|
7
|
+
exports.isValidRolePath = isValidRolePath;
|
|
8
|
+
exports.extractRoleIdFromPath = extractRoleIdFromPath;
|
|
9
|
+
exports.extractGroupFromRolePath = extractGroupFromRolePath;
|
|
10
|
+
const role_pb_1 = require("./role_pb");
|
|
11
|
+
// Get all roles as enum values
|
|
12
|
+
exports.allRoles = Object.values(role_pb_1.Role).filter((value) => typeof value === "number");
|
|
13
|
+
// Define explicit mappings between Role enums and custom string representations
|
|
14
|
+
const roleToStringMapping = {
|
|
15
|
+
[role_pb_1.Role.UNSPECIFIED]: "Unspecified",
|
|
16
|
+
[role_pb_1.Role.WALLET_ADMIN]: "Wallet Admin",
|
|
17
|
+
[role_pb_1.Role.WALLET_VIEWER]: "Wallet Viewer",
|
|
18
|
+
[role_pb_1.Role.WALLET_ACCOUNT_ADMIN]: "Wallet Account Admin",
|
|
19
|
+
[role_pb_1.Role.WALLET_ACCOUNT_VIEWER]: "Wallet Account Viewer",
|
|
20
|
+
[role_pb_1.Role.COMPLIANCE_ADMIN]: "Compliance Admin",
|
|
21
|
+
[role_pb_1.Role.COMPLIANCE_VIEWER]: "Compliance Viewer",
|
|
22
|
+
[role_pb_1.Role.COMPLIANCE_CLIENT_ADMIN]: "Compliance Client Admin",
|
|
23
|
+
[role_pb_1.Role.COMPLIANCE_CLIENT_VIEWER]: "Compliance Client Viewer",
|
|
24
|
+
[role_pb_1.Role.IAM_ADMIN]: "IAM Admin",
|
|
25
|
+
[role_pb_1.Role.IAM_VIEWER]: "IAM Viewer",
|
|
26
|
+
[role_pb_1.Role.IAM_API_USER_ADMIN]: "IAM API User Admin",
|
|
27
|
+
[role_pb_1.Role.IAM_API_USER_VIEWER]: "IAM API User Viewer",
|
|
28
|
+
[role_pb_1.Role.IAM_GROUP_ADMIN]: "IAM Group Admin",
|
|
29
|
+
[role_pb_1.Role.IAM_GROUP_VIEWER]: "IAM Group Viewer",
|
|
30
|
+
[role_pb_1.Role.IAM_USER_ADMIN]: "IAM User Admin",
|
|
31
|
+
[role_pb_1.Role.IAM_USER_VIEWER]: "IAM User Viewer",
|
|
32
|
+
[role_pb_1.Role.STUDIO_ADMIN]: "Studio Admin",
|
|
33
|
+
[role_pb_1.Role.STUDIO_VIEWER]: "Studio Viewer",
|
|
34
|
+
[role_pb_1.Role.STUDIO_INSTRUMENT_ADMIN]: "Studio Instrument Admin",
|
|
35
|
+
[role_pb_1.Role.STUDIO_INSTRUMENT_VIEWER]: "Studio Instrument Viewer",
|
|
36
|
+
[role_pb_1.Role.TRADING_ADMIN]: "Trading Admin",
|
|
37
|
+
[role_pb_1.Role.TRADING_VIEWER]: "Trading Viewer",
|
|
38
|
+
[role_pb_1.Role.TRADING_LIMIT_ORDER_ADMIN]: "Trading Limit Order Admin",
|
|
39
|
+
[role_pb_1.Role.TRADING_LIMIT_ORDER_VIEWER]: "Trading Limit Order Viewer",
|
|
40
|
+
[role_pb_1.Role.REPORTING_ADMIN]: "Reporting Admin",
|
|
41
|
+
[role_pb_1.Role.REPORTING_VIEWER]: "Reporting Viewer",
|
|
42
|
+
[role_pb_1.Role.LEDGER_ADMIN]: "Ledger Admin",
|
|
43
|
+
[role_pb_1.Role.LEDGER_VIEWER]: "Ledger Viewer",
|
|
44
|
+
[role_pb_1.Role.LEDGER_TRANSACTION_ADMIN]: "Ledger Transaction Admin",
|
|
45
|
+
[role_pb_1.Role.LEDGER_TRANSACTION_VIEWER]: "Ledger Transaction Viewer",
|
|
46
|
+
[role_pb_1.Role.MARKET_DATA_ADMIN]: "Market Data Admin",
|
|
47
|
+
[role_pb_1.Role.MARKET_DATA_VIEWER]: "Market Data Viewer",
|
|
48
|
+
[role_pb_1.Role.MARKET_DATA_PRICE_ADMIN]: "Market Data Price Admin",
|
|
49
|
+
[role_pb_1.Role.MARKET_DATA_PRICE_VIEWER]: "Market Data Price Viewer",
|
|
50
|
+
};
|
|
51
|
+
// Reverse mapping from string to Role enum
|
|
52
|
+
const stringToRoleMapping = {};
|
|
53
|
+
for (const [key, value] of Object.entries(roleToStringMapping)) {
|
|
54
|
+
stringToRoleMapping[value] = Number(key);
|
|
55
|
+
}
|
|
56
|
+
class UnsupportedRoleError extends Error {
|
|
57
|
+
constructor(role) {
|
|
58
|
+
const message = `Unsupported Role: ${role}`;
|
|
59
|
+
super(message);
|
|
60
|
+
this.role = role;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Converts a Role enum instance to a custom string representation.
|
|
65
|
+
* @param {Role} role - The role to convert.
|
|
66
|
+
* @returns {string} The custom string representation of the role.
|
|
67
|
+
*/
|
|
68
|
+
function roleToString(role) {
|
|
69
|
+
if (role in roleToStringMapping) {
|
|
70
|
+
return roleToStringMapping[role];
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
throw new UnsupportedRoleError(role);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class UnsupportedRoleStringError extends Error {
|
|
77
|
+
constructor(roleStr) {
|
|
78
|
+
const message = `Unsupported role string: ${roleStr}`;
|
|
79
|
+
super(message);
|
|
80
|
+
this.roleStr = roleStr;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Converts a custom string representation to a Role enum instance.
|
|
85
|
+
* @param {string} roleStr - The custom string representation of the role.
|
|
86
|
+
* @returns {Role} The corresponding Role enum instance.
|
|
87
|
+
*/
|
|
88
|
+
function stringToRole(roleStr) {
|
|
89
|
+
if (roleStr in stringToRoleMapping) {
|
|
90
|
+
return stringToRoleMapping[roleStr];
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
throw new UnsupportedRoleStringError(roleStr);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Validates whether a ULID string is in the correct format.
|
|
98
|
+
* ULIDs use Crockford's base32 alphabet (0-9, A-Z excluding I, L, O, U) and are 26 characters long.
|
|
99
|
+
* @param {string} ulid - The ULID to validate.
|
|
100
|
+
* @returns {boolean} True if the ULID is valid, false otherwise.
|
|
101
|
+
*/
|
|
102
|
+
function isValidULID(ulid) {
|
|
103
|
+
return /^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$/.test(ulid);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Validates whether a role ID is in the valid range.
|
|
107
|
+
* Role IDs must be 7 or 8 digits and cannot start with 0.
|
|
108
|
+
* @param {number} roleId - The role ID to validate.
|
|
109
|
+
* @returns {boolean} True if the role ID is valid, false otherwise.
|
|
110
|
+
*/
|
|
111
|
+
function isValidRoleId(roleId) {
|
|
112
|
+
return roleId >= 1000000 && roleId <= 99999999;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Creates a role path resource name from a group ULID and role ID.
|
|
116
|
+
* @param {string} groupULID - The group ULID (26 characters).
|
|
117
|
+
* @param {number} roleId - The role ID enum value.
|
|
118
|
+
* @returns {string} The role path in format groups/{ULIDv2}/roles/{role_id}.
|
|
119
|
+
* @throws {Error} If the group ULID is invalid.
|
|
120
|
+
* @throws {Error} If the role ID is invalid.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* createRolePath('01ARZ3NDEKTSV4YWVF8F5BH32', Role.ROLE_IAM_ADMIN);
|
|
125
|
+
* // Returns: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32/roles/1000000'
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
function createRolePath(groupULID, roleId) {
|
|
129
|
+
if (!isValidULID(groupULID)) {
|
|
130
|
+
throw new Error(`Invalid group ULID: ${groupULID}. Must be 26 uppercase alphanumeric characters.`);
|
|
131
|
+
}
|
|
132
|
+
if (!isValidRoleId(roleId)) {
|
|
133
|
+
throw new Error(`Invalid role ID: ${roleId}. Must be between 1000000 and 99999999.`);
|
|
134
|
+
}
|
|
135
|
+
return `groups/${groupULID}/roles/${roleId}`;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Validates whether a role path is in the correct format.
|
|
139
|
+
* @param {string} rolePath - The role path to validate.
|
|
140
|
+
* @returns {boolean} True if the role path is valid, false otherwise.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* isValidRolePath('groups/01ARZ3NDEKTSV4YWVF8F5BH32Q/roles/1000000'); // true
|
|
145
|
+
* isValidRolePath('groups/01ARZ3NDEKTSV4YWVF8F5BH32Q/1000000'); // false (old format)
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
function isValidRolePath(rolePath) {
|
|
149
|
+
return /^groups\/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}\/roles\/[1-9][0-9]{6,7}$/.test(rolePath);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Extracts the role ID from a role path.
|
|
153
|
+
* @param {string} rolePath - The role path in format groups/{ULIDv2}/roles/{role_id}.
|
|
154
|
+
* @returns {number | null} The role ID if valid, null otherwise.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* extractRoleIdFromPath('groups/01ARZ3NDEKTSV4YWVF8F5BH32/roles/1000000');
|
|
159
|
+
* // Returns: 1000000
|
|
160
|
+
*
|
|
161
|
+
* extractRoleIdFromPath('invalid/path');
|
|
162
|
+
* // Returns: null
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
function extractRoleIdFromPath(rolePath) {
|
|
166
|
+
if (!isValidRolePath(rolePath)) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
const parts = rolePath.split("/");
|
|
170
|
+
return parseInt(parts[3], 10);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Extracts the group resource name from a role path.
|
|
174
|
+
* @param {string} rolePath - The role path in format groups/{ULIDv2}/roles/{role_id}.
|
|
175
|
+
* @returns {string | null} The group resource name (groups/{ULIDv2}) if valid, null otherwise.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* extractGroupFromRolePath('groups/01ARZ3NDEKTSV4YWVF8F5BH32/roles/1000000');
|
|
180
|
+
* // Returns: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
|
|
181
|
+
*
|
|
182
|
+
* extractGroupFromRolePath('invalid/path');
|
|
183
|
+
* // Returns: null
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
function extractGroupFromRolePath(rolePath) {
|
|
187
|
+
if (!isValidRolePath(rolePath)) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
const parts = rolePath.split("/");
|
|
191
|
+
return `${parts[0]}/${parts[1]}`;
|
|
192
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { GenEnum, GenFile } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
/**
|
|
3
|
+
* Describes the file meshtrade/iam/role/v1/role.proto.
|
|
4
|
+
*/
|
|
5
|
+
export declare const file_meshtrade_iam_role_v1_role: GenFile;
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* Role defines a named collection of permissions.
|
|
9
|
+
* This allows for the creation of business-level roles (e.g., "AccountReader", "AccountAdmin")
|
|
10
|
+
* that group a set of granular, string-based permissions. Roles are
|
|
11
|
+
* defined at the file level in a service's `.proto` file.
|
|
12
|
+
*
|
|
13
|
+
* @generated from enum meshtrade.iam.role.v1.Role
|
|
14
|
+
*/
|
|
15
|
+
export declare enum Role {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* The default value, indicating the role is unknown or not specified.
|
|
19
|
+
* This should be treated as an error and not be used explicitly.
|
|
20
|
+
*
|
|
21
|
+
* @generated from enum value: ROLE_UNSPECIFIED = 0;
|
|
22
|
+
*/
|
|
23
|
+
UNSPECIFIED = 0,
|
|
24
|
+
/**
|
|
25
|
+
* @generated from enum value: ROLE_WALLET_ADMIN = 1000000;
|
|
26
|
+
*/
|
|
27
|
+
WALLET_ADMIN = 1000000,
|
|
28
|
+
/**
|
|
29
|
+
* @generated from enum value: ROLE_WALLET_VIEWER = 1000001;
|
|
30
|
+
*/
|
|
31
|
+
WALLET_VIEWER = 1000001,
|
|
32
|
+
/**
|
|
33
|
+
* @generated from enum value: ROLE_WALLET_ACCOUNT_ADMIN = 1000002;
|
|
34
|
+
*/
|
|
35
|
+
WALLET_ACCOUNT_ADMIN = 1000002,
|
|
36
|
+
/**
|
|
37
|
+
* @generated from enum value: ROLE_WALLET_ACCOUNT_VIEWER = 1000003;
|
|
38
|
+
*/
|
|
39
|
+
WALLET_ACCOUNT_VIEWER = 1000003,
|
|
40
|
+
/**
|
|
41
|
+
* @generated from enum value: ROLE_COMPLIANCE_ADMIN = 2000000;
|
|
42
|
+
*/
|
|
43
|
+
COMPLIANCE_ADMIN = 2000000,
|
|
44
|
+
/**
|
|
45
|
+
* @generated from enum value: ROLE_COMPLIANCE_VIEWER = 2000001;
|
|
46
|
+
*/
|
|
47
|
+
COMPLIANCE_VIEWER = 2000001,
|
|
48
|
+
/**
|
|
49
|
+
* @generated from enum value: ROLE_COMPLIANCE_CLIENT_ADMIN = 2000002;
|
|
50
|
+
*/
|
|
51
|
+
COMPLIANCE_CLIENT_ADMIN = 2000002,
|
|
52
|
+
/**
|
|
53
|
+
* @generated from enum value: ROLE_COMPLIANCE_CLIENT_VIEWER = 2000003;
|
|
54
|
+
*/
|
|
55
|
+
COMPLIANCE_CLIENT_VIEWER = 2000003,
|
|
56
|
+
/**
|
|
57
|
+
* @generated from enum value: ROLE_IAM_ADMIN = 3000000;
|
|
58
|
+
*/
|
|
59
|
+
IAM_ADMIN = 3000000,
|
|
60
|
+
/**
|
|
61
|
+
* @generated from enum value: ROLE_IAM_VIEWER = 3000001;
|
|
62
|
+
*/
|
|
63
|
+
IAM_VIEWER = 3000001,
|
|
64
|
+
/**
|
|
65
|
+
* @generated from enum value: ROLE_IAM_API_USER_ADMIN = 3000002;
|
|
66
|
+
*/
|
|
67
|
+
IAM_API_USER_ADMIN = 3000002,
|
|
68
|
+
/**
|
|
69
|
+
* @generated from enum value: ROLE_IAM_API_USER_VIEWER = 3000003;
|
|
70
|
+
*/
|
|
71
|
+
IAM_API_USER_VIEWER = 3000003,
|
|
72
|
+
/**
|
|
73
|
+
* @generated from enum value: ROLE_IAM_GROUP_ADMIN = 3000004;
|
|
74
|
+
*/
|
|
75
|
+
IAM_GROUP_ADMIN = 3000004,
|
|
76
|
+
/**
|
|
77
|
+
* @generated from enum value: ROLE_IAM_GROUP_VIEWER = 3000005;
|
|
78
|
+
*/
|
|
79
|
+
IAM_GROUP_VIEWER = 3000005,
|
|
80
|
+
/**
|
|
81
|
+
* @generated from enum value: ROLE_IAM_USER_ADMIN = 3000006;
|
|
82
|
+
*/
|
|
83
|
+
IAM_USER_ADMIN = 3000006,
|
|
84
|
+
/**
|
|
85
|
+
* @generated from enum value: ROLE_IAM_USER_VIEWER = 3000007;
|
|
86
|
+
*/
|
|
87
|
+
IAM_USER_VIEWER = 3000007,
|
|
88
|
+
/**
|
|
89
|
+
* @generated from enum value: ROLE_STUDIO_ADMIN = 4000000;
|
|
90
|
+
*/
|
|
91
|
+
STUDIO_ADMIN = 4000000,
|
|
92
|
+
/**
|
|
93
|
+
* @generated from enum value: ROLE_STUDIO_VIEWER = 4000001;
|
|
94
|
+
*/
|
|
95
|
+
STUDIO_VIEWER = 4000001,
|
|
96
|
+
/**
|
|
97
|
+
* @generated from enum value: ROLE_STUDIO_INSTRUMENT_ADMIN = 4000002;
|
|
98
|
+
*/
|
|
99
|
+
STUDIO_INSTRUMENT_ADMIN = 4000002,
|
|
100
|
+
/**
|
|
101
|
+
* @generated from enum value: ROLE_STUDIO_INSTRUMENT_VIEWER = 4000003;
|
|
102
|
+
*/
|
|
103
|
+
STUDIO_INSTRUMENT_VIEWER = 4000003,
|
|
104
|
+
/**
|
|
105
|
+
* @generated from enum value: ROLE_TRADING_ADMIN = 5000000;
|
|
106
|
+
*/
|
|
107
|
+
TRADING_ADMIN = 5000000,
|
|
108
|
+
/**
|
|
109
|
+
* @generated from enum value: ROLE_TRADING_VIEWER = 5000001;
|
|
110
|
+
*/
|
|
111
|
+
TRADING_VIEWER = 5000001,
|
|
112
|
+
/**
|
|
113
|
+
* @generated from enum value: ROLE_TRADING_LIMIT_ORDER_ADMIN = 5000002;
|
|
114
|
+
*/
|
|
115
|
+
TRADING_LIMIT_ORDER_ADMIN = 5000002,
|
|
116
|
+
/**
|
|
117
|
+
* @generated from enum value: ROLE_TRADING_LIMIT_ORDER_VIEWER = 5000003;
|
|
118
|
+
*/
|
|
119
|
+
TRADING_LIMIT_ORDER_VIEWER = 5000003,
|
|
120
|
+
/**
|
|
121
|
+
* @generated from enum value: ROLE_REPORTING_ADMIN = 6000000;
|
|
122
|
+
*/
|
|
123
|
+
REPORTING_ADMIN = 6000000,
|
|
124
|
+
/**
|
|
125
|
+
* @generated from enum value: ROLE_REPORTING_VIEWER = 6000001;
|
|
126
|
+
*/
|
|
127
|
+
REPORTING_VIEWER = 6000001,
|
|
128
|
+
/**
|
|
129
|
+
* @generated from enum value: ROLE_LEDGER_ADMIN = 7000000;
|
|
130
|
+
*/
|
|
131
|
+
LEDGER_ADMIN = 7000000,
|
|
132
|
+
/**
|
|
133
|
+
* @generated from enum value: ROLE_LEDGER_VIEWER = 7000001;
|
|
134
|
+
*/
|
|
135
|
+
LEDGER_VIEWER = 7000001,
|
|
136
|
+
/**
|
|
137
|
+
* @generated from enum value: ROLE_LEDGER_TRANSACTION_ADMIN = 7000002;
|
|
138
|
+
*/
|
|
139
|
+
LEDGER_TRANSACTION_ADMIN = 7000002,
|
|
140
|
+
/**
|
|
141
|
+
* @generated from enum value: ROLE_LEDGER_TRANSACTION_VIEWER = 7000003;
|
|
142
|
+
*/
|
|
143
|
+
LEDGER_TRANSACTION_VIEWER = 7000003,
|
|
144
|
+
/**
|
|
145
|
+
* @generated from enum value: ROLE_MARKET_DATA_ADMIN = 8000000;
|
|
146
|
+
*/
|
|
147
|
+
MARKET_DATA_ADMIN = 8000000,
|
|
148
|
+
/**
|
|
149
|
+
* @generated from enum value: ROLE_MARKET_DATA_VIEWER = 8000001;
|
|
150
|
+
*/
|
|
151
|
+
MARKET_DATA_VIEWER = 8000001,
|
|
152
|
+
/**
|
|
153
|
+
* @generated from enum value: ROLE_MARKET_DATA_PRICE_ADMIN = 8000002;
|
|
154
|
+
*/
|
|
155
|
+
MARKET_DATA_PRICE_ADMIN = 8000002,
|
|
156
|
+
/**
|
|
157
|
+
* @generated from enum value: ROLE_MARKET_DATA_PRICE_VIEWER = 8000003;
|
|
158
|
+
*/
|
|
159
|
+
MARKET_DATA_PRICE_VIEWER = 8000003
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Describes the enum meshtrade.iam.role.v1.Role.
|
|
163
|
+
*/
|
|
164
|
+
export declare const RoleSchema: GenEnum<Role>;
|