@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.
Files changed (186) hide show
  1. package/README.md +93 -0
  2. package/dist/buf/validate/validate_pb.d.ts +4597 -0
  3. package/dist/buf/validate/validate_pb.js +354 -0
  4. package/dist/google/type/date_pb.d.ts +52 -0
  5. package/dist/google/type/date_pb.js +26 -0
  6. package/dist/meshtrade/common/config.d.ts +50 -0
  7. package/dist/meshtrade/common/config.js +34 -0
  8. package/dist/meshtrade/common/connectInterceptors.d.ts +137 -0
  9. package/dist/meshtrade/common/connectInterceptors.js +233 -0
  10. package/dist/meshtrade/common/validation.d.ts +62 -0
  11. package/dist/meshtrade/common/validation.js +77 -0
  12. package/dist/meshtrade/compliance/client/v1/client_pb.d.ts +138 -0
  13. package/dist/meshtrade/compliance/client/v1/client_pb.js +23 -0
  14. package/dist/meshtrade/compliance/client/v1/company_pb.d.ts +313 -0
  15. package/dist/meshtrade/compliance/client/v1/company_pb.js +100 -0
  16. package/dist/meshtrade/compliance/client/v1/company_representative_pb.d.ts +81 -0
  17. package/dist/meshtrade/compliance/client/v1/company_representative_pb.js +22 -0
  18. package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.d.ts +88 -0
  19. package/dist/meshtrade/compliance/client/v1/company_representative_role_pb.js +95 -0
  20. package/dist/meshtrade/compliance/client/v1/fund_pb.d.ts +65 -0
  21. package/dist/meshtrade/compliance/client/v1/fund_pb.js +18 -0
  22. package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.d.ts +55 -0
  23. package/dist/meshtrade/compliance/client/v1/identification_document_type_pb.js +62 -0
  24. package/dist/meshtrade/compliance/client/v1/index.d.ts +16 -0
  25. package/dist/meshtrade/compliance/client/v1/index.js +59 -0
  26. package/dist/meshtrade/compliance/client/v1/industry_classification_pb.d.ts +86 -0
  27. package/dist/meshtrade/compliance/client/v1/industry_classification_pb.js +16 -0
  28. package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.d.ts +133 -0
  29. package/dist/meshtrade/compliance/client/v1/natural_person_connection_type_pb.js +140 -0
  30. package/dist/meshtrade/compliance/client/v1/natural_person_pb.d.ts +143 -0
  31. package/dist/meshtrade/compliance/client/v1/natural_person_pb.js +24 -0
  32. package/dist/meshtrade/compliance/client/v1/pep_status_pb.d.ts +46 -0
  33. package/dist/meshtrade/compliance/client/v1/pep_status_pb.js +53 -0
  34. package/dist/meshtrade/compliance/client/v1/service_node_meshts.d.ts +78 -0
  35. package/dist/meshtrade/compliance/client/v1/service_node_meshts.js +141 -0
  36. package/dist/meshtrade/compliance/client/v1/service_pb.d.ts +123 -0
  37. package/dist/meshtrade/compliance/client/v1/service_pb.js +45 -0
  38. package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.d.ts +180 -0
  39. package/dist/meshtrade/compliance/client/v1/source_of_income_and_wealth_pb.js +187 -0
  40. package/dist/meshtrade/compliance/client/v1/tax_residency_pb.d.ts +40 -0
  41. package/dist/meshtrade/compliance/client/v1/tax_residency_pb.js +17 -0
  42. package/dist/meshtrade/compliance/client/v1/trust_pb.d.ts +65 -0
  43. package/dist/meshtrade/compliance/client/v1/trust_pb.js +18 -0
  44. package/dist/meshtrade/compliance/client/v1/verification_status_pb.d.ts +57 -0
  45. package/dist/meshtrade/compliance/client/v1/verification_status_pb.js +64 -0
  46. package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.d.ts +43 -0
  47. package/dist/meshtrade/iam/api_user/v1/api_credentials_pb.js +17 -0
  48. package/dist/meshtrade/iam/api_user/v1/api_user_pb.d.ts +152 -0
  49. package/dist/meshtrade/iam/api_user/v1/api_user_pb.js +95 -0
  50. package/dist/meshtrade/iam/api_user/v1/index.d.ts +4 -0
  51. package/dist/meshtrade/iam/api_user/v1/index.js +45 -0
  52. package/dist/meshtrade/iam/api_user/v1/service_node_meshts.d.ts +114 -0
  53. package/dist/meshtrade/iam/api_user/v1/service_node_meshts.js +201 -0
  54. package/dist/meshtrade/iam/api_user/v1/service_pb.d.ts +343 -0
  55. package/dist/meshtrade/iam/api_user/v1/service_pb.js +86 -0
  56. package/dist/meshtrade/iam/group/v1/group_pb.d.ts +58 -0
  57. package/dist/meshtrade/iam/group/v1/group_pb.js +17 -0
  58. package/dist/meshtrade/iam/group/v1/index.d.ts +3 -0
  59. package/dist/meshtrade/iam/group/v1/index.js +44 -0
  60. package/dist/meshtrade/iam/group/v1/service_node_meshts.d.ts +90 -0
  61. package/dist/meshtrade/iam/group/v1/service_node_meshts.js +161 -0
  62. package/dist/meshtrade/iam/group/v1/service_pb.d.ts +306 -0
  63. package/dist/meshtrade/iam/group/v1/service_pb.js +75 -0
  64. package/dist/meshtrade/iam/role/v1/index.d.ts +2 -0
  65. package/dist/meshtrade/iam/role/v1/index.js +43 -0
  66. package/dist/meshtrade/iam/role/v1/role.d.ts +71 -0
  67. package/dist/meshtrade/iam/role/v1/role.js +192 -0
  68. package/dist/meshtrade/iam/role/v1/role_pb.d.ts +164 -0
  69. package/dist/meshtrade/iam/role/v1/role_pb.js +171 -0
  70. package/dist/meshtrade/iam/user/v1/index.d.ts +3 -0
  71. package/dist/meshtrade/iam/user/v1/index.js +44 -0
  72. package/dist/meshtrade/iam/user/v1/service_node_meshts.d.ts +108 -0
  73. package/dist/meshtrade/iam/user/v1/service_node_meshts.js +191 -0
  74. package/dist/meshtrade/iam/user/v1/service_pb.d.ts +379 -0
  75. package/dist/meshtrade/iam/user/v1/service_pb.js +90 -0
  76. package/dist/meshtrade/iam/user/v1/user_pb.d.ts +58 -0
  77. package/dist/meshtrade/iam/user/v1/user_pb.js +17 -0
  78. package/dist/meshtrade/ledger/transaction/v1/index.d.ts +5 -0
  79. package/dist/meshtrade/ledger/transaction/v1/index.js +46 -0
  80. package/dist/meshtrade/ledger/transaction/v1/service_node_meshts.d.ts +80 -0
  81. package/dist/meshtrade/ledger/transaction/v1/service_node_meshts.js +140 -0
  82. package/dist/meshtrade/ledger/transaction/v1/service_pb.d.ts +102 -0
  83. package/dist/meshtrade/ledger/transaction/v1/service_pb.js +41 -0
  84. package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.d.ts +46 -0
  85. package/dist/meshtrade/ledger/transaction/v1/transaction_action_pb.js +53 -0
  86. package/dist/meshtrade/ledger/transaction/v1/transaction_state.d.ts +14 -0
  87. package/dist/meshtrade/ledger/transaction/v1/transaction_state.js +64 -0
  88. package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.d.ts +50 -0
  89. package/dist/meshtrade/ledger/transaction/v1/transaction_state_pb.js +57 -0
  90. package/dist/meshtrade/market_data/price/v1/index.d.ts +3 -0
  91. package/dist/meshtrade/market_data/price/v1/index.js +44 -0
  92. package/dist/meshtrade/market_data/price/v1/price_pb.d.ts +50 -0
  93. package/dist/meshtrade/market_data/price/v1/price_pb.js +19 -0
  94. package/dist/meshtrade/market_data/price/v1/service_node_meshts.d.ts +66 -0
  95. package/dist/meshtrade/market_data/price/v1/service_node_meshts.js +121 -0
  96. package/dist/meshtrade/market_data/price/v1/service_pb.d.ts +48 -0
  97. package/dist/meshtrade/market_data/price/v1/service_pb.js +27 -0
  98. package/dist/meshtrade/option/method_options/v1/index.d.ts +1 -0
  99. package/dist/meshtrade/option/method_options/v1/index.js +42 -0
  100. package/dist/meshtrade/option/method_options/v1/method_options_pb.d.ts +132 -0
  101. package/dist/meshtrade/option/method_options/v1/method_options_pb.js +108 -0
  102. package/dist/meshtrade/reporting/account_report/v1/account_report_pb.d.ts +136 -0
  103. package/dist/meshtrade/reporting/account_report/v1/account_report_pb.js +28 -0
  104. package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.d.ts +39 -0
  105. package/dist/meshtrade/reporting/account_report/v1/disclaimer_pb.js +16 -0
  106. package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.d.ts +66 -0
  107. package/dist/meshtrade/reporting/account_report/v1/fee_entry_pb.js +18 -0
  108. package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.d.ts +139 -0
  109. package/dist/meshtrade/reporting/account_report/v1/income_entry_pb.js +80 -0
  110. package/dist/meshtrade/reporting/account_report/v1/index.d.ts +7 -0
  111. package/dist/meshtrade/reporting/account_report/v1/index.js +48 -0
  112. package/dist/meshtrade/reporting/account_report/v1/service_node_meshts.d.ts +72 -0
  113. package/dist/meshtrade/reporting/account_report/v1/service_node_meshts.js +131 -0
  114. package/dist/meshtrade/reporting/account_report/v1/service_pb.d.ts +162 -0
  115. package/dist/meshtrade/reporting/account_report/v1/service_pb.js +46 -0
  116. package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.d.ts +80 -0
  117. package/dist/meshtrade/reporting/account_report/v1/trading_statement_entry_pb.js +18 -0
  118. package/dist/meshtrade/studio/instrument/v1/index.d.ts +3 -0
  119. package/dist/meshtrade/studio/instrument/v1/index.js +44 -0
  120. package/dist/meshtrade/studio/instrument/v1/instrument_pb.d.ts +53 -0
  121. package/dist/meshtrade/studio/instrument/v1/instrument_pb.js +18 -0
  122. package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.d.ts +214 -0
  123. package/dist/meshtrade/studio/instrument/v1/instrument_type_pb.js +221 -0
  124. package/dist/meshtrade/studio/instrument/v1/unit_pb.d.ts +148 -0
  125. package/dist/meshtrade/studio/instrument/v1/unit_pb.js +155 -0
  126. package/dist/meshtrade/trading/limit_order/v1/index.d.ts +3 -0
  127. package/dist/meshtrade/trading/limit_order/v1/index.js +44 -0
  128. package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.d.ts +211 -0
  129. package/dist/meshtrade/trading/limit_order/v1/limit_order_pb.js +111 -0
  130. package/dist/meshtrade/trading/limit_order/v1/service_node_meshts.d.ts +111 -0
  131. package/dist/meshtrade/trading/limit_order/v1/service_node_meshts.js +190 -0
  132. package/dist/meshtrade/trading/limit_order/v1/service_pb.d.ts +357 -0
  133. package/dist/meshtrade/trading/limit_order/v1/service_pb.js +73 -0
  134. package/dist/meshtrade/trading/market_order/v1/index.d.ts +3 -0
  135. package/dist/meshtrade/trading/market_order/v1/index.js +44 -0
  136. package/dist/meshtrade/trading/market_order/v1/market_order_pb.d.ts +20 -0
  137. package/dist/meshtrade/trading/market_order/v1/market_order_pb.js +16 -0
  138. package/dist/meshtrade/trading/market_order/v1/service_node_meshts.d.ts +66 -0
  139. package/dist/meshtrade/trading/market_order/v1/service_node_meshts.js +121 -0
  140. package/dist/meshtrade/trading/market_order/v1/service_pb.d.ts +34 -0
  141. package/dist/meshtrade/trading/market_order/v1/service_pb.js +22 -0
  142. package/dist/meshtrade/type/v1/address_pb.d.ts +82 -0
  143. package/dist/meshtrade/type/v1/address_pb.js +16 -0
  144. package/dist/meshtrade/type/v1/amount.d.ts +13 -0
  145. package/dist/meshtrade/type/v1/amount.js +68 -0
  146. package/dist/meshtrade/type/v1/amountWrapper.d.ts +74 -0
  147. package/dist/meshtrade/type/v1/amountWrapper.js +98 -0
  148. package/dist/meshtrade/type/v1/amount_pb.d.ts +44 -0
  149. package/dist/meshtrade/type/v1/amount_pb.js +18 -0
  150. package/dist/meshtrade/type/v1/contact_details_pb.d.ts +98 -0
  151. package/dist/meshtrade/type/v1/contact_details_pb.js +16 -0
  152. package/dist/meshtrade/type/v1/date.d.ts +49 -0
  153. package/dist/meshtrade/type/v1/date.js +136 -0
  154. package/dist/meshtrade/type/v1/date_pb.d.ts +50 -0
  155. package/dist/meshtrade/type/v1/date_pb.js +16 -0
  156. package/dist/meshtrade/type/v1/decimalConversions.d.ts +24 -0
  157. package/dist/meshtrade/type/v1/decimalConversions.js +39 -0
  158. package/dist/meshtrade/type/v1/decimal_pb.d.ts +24 -0
  159. package/dist/meshtrade/type/v1/decimal_pb.js +16 -0
  160. package/dist/meshtrade/type/v1/index.d.ts +15 -0
  161. package/dist/meshtrade/type/v1/index.js +56 -0
  162. package/dist/meshtrade/type/v1/ledger.d.ts +27 -0
  163. package/dist/meshtrade/type/v1/ledger.js +115 -0
  164. package/dist/meshtrade/type/v1/ledger_pb.d.ts +83 -0
  165. package/dist/meshtrade/type/v1/ledger_pb.js +90 -0
  166. package/dist/meshtrade/type/v1/sorting_pb.d.ts +35 -0
  167. package/dist/meshtrade/type/v1/sorting_pb.js +42 -0
  168. package/dist/meshtrade/type/v1/time_of_day.d.ts +74 -0
  169. package/dist/meshtrade/type/v1/time_of_day.js +199 -0
  170. package/dist/meshtrade/type/v1/time_of_day_pb.d.ts +67 -0
  171. package/dist/meshtrade/type/v1/time_of_day_pb.js +16 -0
  172. package/dist/meshtrade/type/v1/token.d.ts +4 -0
  173. package/dist/meshtrade/type/v1/token.js +23 -0
  174. package/dist/meshtrade/type/v1/tokenWrapper.d.ts +49 -0
  175. package/dist/meshtrade/type/v1/tokenWrapper.js +92 -0
  176. package/dist/meshtrade/type/v1/token_pb.d.ts +56 -0
  177. package/dist/meshtrade/type/v1/token_pb.js +17 -0
  178. package/dist/meshtrade/wallet/account/v1/account_pb.d.ts +264 -0
  179. package/dist/meshtrade/wallet/account/v1/account_pb.js +74 -0
  180. package/dist/meshtrade/wallet/account/v1/index.d.ts +3 -0
  181. package/dist/meshtrade/wallet/account/v1/index.js +44 -0
  182. package/dist/meshtrade/wallet/account/v1/service_node_meshts.d.ts +114 -0
  183. package/dist/meshtrade/wallet/account/v1/service_node_meshts.js +201 -0
  184. package/dist/meshtrade/wallet/account/v1/service_pb.d.ts +559 -0
  185. package/dist/meshtrade/wallet/account/v1/service_pb.js +112 -0
  186. package/package.json +171 -0
@@ -0,0 +1,50 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
3
+ import type { Decimal } from "../../../type/v1/decimal_pb";
4
+ import type { Token } from "../../../type/v1/token_pb";
5
+ import type { Message } from "@bufbuild/protobuf";
6
+ /**
7
+ * Describes the file meshtrade/market_data/price/v1/price.proto.
8
+ */
9
+ export declare const file_meshtrade_market_data_price_v1_price: GenFile;
10
+ /**
11
+ *
12
+ * Is a Price
13
+ *
14
+ *
15
+ * BaseToken
16
+ *
17
+ * @generated from message meshtrade.market_data.price.v1.Price
18
+ */
19
+ export type Price = Message<"meshtrade.market_data.price.v1.Price"> & {
20
+ /**
21
+ * @generated from field: meshtrade.type.v1.Token base_token = 1;
22
+ */
23
+ baseToken?: Token;
24
+ /**
25
+ *
26
+ * QuoteToken
27
+ *
28
+ * @generated from field: meshtrade.type.v1.Token quote_token = 2;
29
+ */
30
+ quoteToken?: Token;
31
+ /**
32
+ *
33
+ * Mid price in quote
34
+ *
35
+ * @generated from field: meshtrade.type.v1.Decimal mid_price = 3;
36
+ */
37
+ midPrice?: Decimal;
38
+ /**
39
+ *
40
+ * Time of Price
41
+ *
42
+ * @generated from field: google.protobuf.Timestamp time = 4;
43
+ */
44
+ time?: Timestamp;
45
+ };
46
+ /**
47
+ * Describes the message meshtrade.market_data.price.v1.Price.
48
+ * Use `create(PriceSchema)` to create a new message.
49
+ */
50
+ export declare const PriceSchema: GenMessage<Price>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/market_data/price/v1/price.proto (package meshtrade.market_data.price.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PriceSchema = exports.file_meshtrade_market_data_price_v1_price = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ const wkt_1 = require("@bufbuild/protobuf/wkt");
9
+ const decimal_pb_1 = require("../../../type/v1/decimal_pb");
10
+ const token_pb_1 = require("../../../type/v1/token_pb");
11
+ /**
12
+ * Describes the file meshtrade/market_data/price/v1/price.proto.
13
+ */
14
+ exports.file_meshtrade_market_data_price_v1_price = (0, codegenv2_1.fileDesc)("CiptZXNodHJhZGUvbWFya2V0X2RhdGEvcHJpY2UvdjEvcHJpY2UucHJvdG8SHm1lc2h0cmFkZS5tYXJrZXRfZGF0YS5wcmljZS52MSK9AQoFUHJpY2USLAoKYmFzZV90b2tlbhgBIAEoCzIYLm1lc2h0cmFkZS50eXBlLnYxLlRva2VuEi0KC3F1b3RlX3Rva2VuGAIgASgLMhgubWVzaHRyYWRlLnR5cGUudjEuVG9rZW4SLQoJbWlkX3ByaWNlGAMgASgLMhoubWVzaHRyYWRlLnR5cGUudjEuRGVjaW1hbBIoCgR0aW1lGAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEJiCiVjby5tZXNodHJhZGUuYXBpLm1hcmtldF9kYXRhLnByaWNlLnYxWjlnaXRodWIuY29tL21lc2h0cmFkZS9hcGkvZ28vbWFya2V0X2RhdGEvcHJpY2UvdjE7cHJpY2VfdjFiBnByb3RvMw", [wkt_1.file_google_protobuf_timestamp, decimal_pb_1.file_meshtrade_type_v1_decimal, token_pb_1.file_meshtrade_type_v1_token]);
15
+ /**
16
+ * Describes the message meshtrade.market_data.price.v1.Price.
17
+ * Use `create(PriceSchema)` to create a new message.
18
+ */
19
+ exports.PriceSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_market_data_price_v1_price, 0);
@@ -0,0 +1,66 @@
1
+ import { Interceptor } from "@connectrpc/connect";
2
+ import { GetCurrentPriceByTokenPairRequest } from "./service_pb";
3
+ import { Price } from "./price_pb";
4
+ import { ConfigOpts } from "../../../common/config";
5
+ /**
6
+ * Node.js client for interacting with the meshtrade.market_data.price.v1 price v1 API resource service.
7
+ * Uses Connect-ES with gRPC transport for Node.js gRPC communication.
8
+ *
9
+ * Supports three authentication modes:
10
+ *
11
+ * 1. **No Authentication** (public APIs):
12
+ * ```typescript
13
+ * const client = new PriceServiceNode({ apiServerURL: "http://localhost:10000" });
14
+ * ```
15
+ *
16
+ * 2. **API Key Authentication** (backend services):
17
+ * ```typescript
18
+ * const client = new PriceServiceNode({
19
+ * apiServerURL: "https://api.example.com",
20
+ * apiKey: "your-api-key",
21
+ * group: "groups/01ARZ3NDEKTSV4YWVF8F5BH32"
22
+ * });
23
+ * ```
24
+ *
25
+ * 3. **JWT Token Authentication** (Next.js backend with user session):
26
+ * ```typescript
27
+ * const client = new PriceServiceNode({
28
+ * apiServerURL: "https://api.example.com",
29
+ * jwtToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
30
+ * });
31
+ * ```
32
+ */
33
+ export declare class PriceServiceNode {
34
+ private _client;
35
+ private readonly _config;
36
+ private readonly _interceptors;
37
+ /**
38
+ * Constructs an instance of PriceServiceNode.
39
+ * @param {ConfigOpts} [config] - Optional configuration for the client.
40
+ * @param {Interceptor[]} [interceptors] - For internal use by `withGroup`.
41
+ */
42
+ constructor(config?: ConfigOpts, interceptors?: Interceptor[]);
43
+ /**
44
+ * Returns a new client instance configured to send the specified group
45
+ * resource name in the request headers for subsequent API calls.
46
+ *
47
+ * **Important**: This method only works with API key authentication.
48
+ * - For **API key auth**: Creates a new client with updated group context
49
+ * - For **JWT auth**: Throws error (group comes from JWT token claims)
50
+ * - For **no auth**: Throws error (group requires authentication)
51
+ *
52
+ * @param {string} group - The operating group context to inject into the request
53
+ * in the format `groups/{ulid}` where {ulid} is a 26-character ULID.
54
+ * Example: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
55
+ * @returns {PriceServiceNode} A new, configured instance of the client.
56
+ * @throws {Error} If used with JWT authentication or no authentication
57
+ * @throws {Error} If the group format is invalid
58
+ */
59
+ withGroup(group: string): PriceServiceNode;
60
+ /**
61
+ * Retrieves a price.
62
+ * @param {GetCurrentPriceByTokenPairRequest} request - The request object for getcurrentpricebytokenpair.
63
+ * @returns {Promise<Price>} A promise that resolves with the price.
64
+ */
65
+ getCurrentPriceByTokenPair(request: GetCurrentPriceByTokenPairRequest): Promise<Price>;
66
+ }
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-meshts v1
3
+ // @generated from file meshtrade/market_data/price/v1/service.proto (package meshtrade.market_data.price.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PriceServiceNode = void 0;
7
+ const connect_1 = require("@connectrpc/connect");
8
+ const connect_node_1 = require("@connectrpc/connect-node");
9
+ const service_pb_1 = require("./service_pb");
10
+ const config_1 = require("../../../common/config");
11
+ const validation_1 = require("../../../common/validation");
12
+ const connectInterceptors_1 = require("../../../common/connectInterceptors");
13
+ /**
14
+ * Node.js client for interacting with the meshtrade.market_data.price.v1 price v1 API resource service.
15
+ * Uses Connect-ES with gRPC transport for Node.js gRPC communication.
16
+ *
17
+ * Supports three authentication modes:
18
+ *
19
+ * 1. **No Authentication** (public APIs):
20
+ * ```typescript
21
+ * const client = new PriceServiceNode({ apiServerURL: "http://localhost:10000" });
22
+ * ```
23
+ *
24
+ * 2. **API Key Authentication** (backend services):
25
+ * ```typescript
26
+ * const client = new PriceServiceNode({
27
+ * apiServerURL: "https://api.example.com",
28
+ * apiKey: "your-api-key",
29
+ * group: "groups/01ARZ3NDEKTSV4YWVF8F5BH32"
30
+ * });
31
+ * ```
32
+ *
33
+ * 3. **JWT Token Authentication** (Next.js backend with user session):
34
+ * ```typescript
35
+ * const client = new PriceServiceNode({
36
+ * apiServerURL: "https://api.example.com",
37
+ * jwtToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
38
+ * });
39
+ * ```
40
+ */
41
+ class PriceServiceNode {
42
+ /**
43
+ * Constructs an instance of PriceServiceNode.
44
+ * @param {ConfigOpts} [config] - Optional configuration for the client.
45
+ * @param {Interceptor[]} [interceptors] - For internal use by `withGroup`.
46
+ */
47
+ constructor(config, interceptors) {
48
+ this._config = (0, config_1.getConfigFromOpts)(config);
49
+ // If interceptors are provided (from withGroup), use them
50
+ // Otherwise, create auth interceptors based on config
51
+ if (interceptors) {
52
+ this._interceptors = interceptors;
53
+ }
54
+ else {
55
+ this._interceptors = [];
56
+ // Add authentication interceptor based on configuration
57
+ if (this._config.apiKey && this._config.group) {
58
+ // API Key authentication mode
59
+ this._interceptors.push((0, connectInterceptors_1.createApiKeyInterceptor)(this._config.apiKey, this._config.group));
60
+ }
61
+ else if (this._config.jwtToken) {
62
+ // JWT authentication mode
63
+ this._interceptors.push((0, connectInterceptors_1.createJwtInterceptor)(this._config.jwtToken));
64
+ }
65
+ // If neither is configured, no authentication (public API mode)
66
+ }
67
+ // Create the gRPC transport for Node.js with interceptors
68
+ // Note: gRPC transport uses HTTP/2 by default
69
+ const transport = (0, connect_node_1.createGrpcTransport)({
70
+ baseUrl: this._config.apiServerURL,
71
+ interceptors: this._interceptors,
72
+ });
73
+ // Construct the Connect-ES client
74
+ this._client = (0, connect_1.createClient)(service_pb_1.PriceService, transport);
75
+ }
76
+ /**
77
+ * Returns a new client instance configured to send the specified group
78
+ * resource name in the request headers for subsequent API calls.
79
+ *
80
+ * **Important**: This method only works with API key authentication.
81
+ * - For **API key auth**: Creates a new client with updated group context
82
+ * - For **JWT auth**: Throws error (group comes from JWT token claims)
83
+ * - For **no auth**: Throws error (group requires authentication)
84
+ *
85
+ * @param {string} group - The operating group context to inject into the request
86
+ * in the format `groups/{ulid}` where {ulid} is a 26-character ULID.
87
+ * Example: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
88
+ * @returns {PriceServiceNode} A new, configured instance of the client.
89
+ * @throws {Error} If used with JWT authentication or no authentication
90
+ * @throws {Error} If the group format is invalid
91
+ */
92
+ withGroup(group) {
93
+ // Check authentication mode
94
+ if (this._config.jwtToken) {
95
+ throw new Error("Cannot use withGroup() with JWT authentication. " +
96
+ "The group context is determined by the JWT token claims.");
97
+ }
98
+ if (!this._config.apiKey) {
99
+ throw new Error("Cannot use withGroup() without authentication. " +
100
+ "Please configure API key authentication to use group context.");
101
+ }
102
+ // For API key authentication, create new client with updated group
103
+ // Replace the existing API key interceptor with one that has the new group
104
+ const newInterceptors = [
105
+ (0, connectInterceptors_1.createApiKeyInterceptor)(this._config.apiKey, group)
106
+ ];
107
+ // Return a new client instance with updated group context
108
+ return new PriceServiceNode(this._config, newInterceptors);
109
+ }
110
+ /**
111
+ * Retrieves a price.
112
+ * @param {GetCurrentPriceByTokenPairRequest} request - The request object for getcurrentpricebytokenpair.
113
+ * @returns {Promise<Price>} A promise that resolves with the price.
114
+ */
115
+ getCurrentPriceByTokenPair(request) {
116
+ // Validate request
117
+ (0, validation_1.validateRequest)(request);
118
+ return this._client.getCurrentPriceByTokenPair(request);
119
+ }
120
+ }
121
+ exports.PriceServiceNode = PriceServiceNode;
@@ -0,0 +1,48 @@
1
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { PriceSchema } from "./price_pb";
3
+ import type { Token } from "../../../type/v1/token_pb";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file meshtrade/market_data/price/v1/service.proto.
7
+ */
8
+ export declare const file_meshtrade_market_data_price_v1_service: GenFile;
9
+ /**
10
+ * @generated from message meshtrade.market_data.price.v1.GetCurrentPriceByTokenPairRequest
11
+ */
12
+ export type GetCurrentPriceByTokenPairRequest = Message<"meshtrade.market_data.price.v1.GetCurrentPriceByTokenPairRequest"> & {
13
+ /**
14
+ *
15
+ * BaseToken is the token for which a price is rquired.
16
+ *
17
+ * @generated from field: meshtrade.type.v1.Token base_token = 1;
18
+ */
19
+ baseToken?: Token;
20
+ /**
21
+ *
22
+ * QuoteToken is the token in which price is to be quoted.
23
+ *
24
+ * @generated from field: meshtrade.type.v1.Token quote_token = 2;
25
+ */
26
+ quoteToken?: Token;
27
+ };
28
+ /**
29
+ * Describes the message meshtrade.market_data.price.v1.GetCurrentPriceByTokenPairRequest.
30
+ * Use `create(GetCurrentPriceByTokenPairRequestSchema)` to create a new message.
31
+ */
32
+ export declare const GetCurrentPriceByTokenPairRequestSchema: GenMessage<GetCurrentPriceByTokenPairRequest>;
33
+ /**
34
+ *
35
+ * PriceService provides prices.
36
+ *
37
+ * @generated from service meshtrade.market_data.price.v1.PriceService
38
+ */
39
+ export declare const PriceService: GenService<{
40
+ /**
41
+ * @generated from rpc meshtrade.market_data.price.v1.PriceService.GetCurrentPriceByTokenPair
42
+ */
43
+ getCurrentPriceByTokenPair: {
44
+ methodKind: "unary";
45
+ input: typeof GetCurrentPriceByTokenPairRequestSchema;
46
+ output: typeof PriceSchema;
47
+ };
48
+ }>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/market_data/price/v1/service.proto (package meshtrade.market_data.price.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PriceService = exports.GetCurrentPriceByTokenPairRequestSchema = exports.file_meshtrade_market_data_price_v1_service = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ const validate_pb_1 = require("../../../../buf/validate/validate_pb");
9
+ const price_pb_1 = require("./price_pb");
10
+ const method_options_pb_1 = require("../../../option/method_options/v1/method_options_pb");
11
+ const token_pb_1 = require("../../../type/v1/token_pb");
12
+ /**
13
+ * Describes the file meshtrade/market_data/price/v1/service.proto.
14
+ */
15
+ exports.file_meshtrade_market_data_price_v1_service = (0, codegenv2_1.fileDesc)("CixtZXNodHJhZGUvbWFya2V0X2RhdGEvcHJpY2UvdjEvc2VydmljZS5wcm90bxIebWVzaHRyYWRlLm1hcmtldF9kYXRhLnByaWNlLnYxIpABCiFHZXRDdXJyZW50UHJpY2VCeVRva2VuUGFpclJlcXVlc3QSNAoKYmFzZV90b2tlbhgBIAEoCzIYLm1lc2h0cmFkZS50eXBlLnYxLlRva2VuQga6SAPIAQESNQoLcXVvdGVfdG9rZW4YAiABKAsyGC5tZXNodHJhZGUudHlwZS52MS5Ub2tlbkIGukgDyAEBMrMBCgxQcmljZVNlcnZpY2USogEKGkdldEN1cnJlbnRQcmljZUJ5VG9rZW5QYWlyEkEubWVzaHRyYWRlLm1hcmtldF9kYXRhLnByaWNlLnYxLkdldEN1cnJlbnRQcmljZUJ5VG9rZW5QYWlyUmVxdWVzdBolLm1lc2h0cmFkZS5tYXJrZXRfZGF0YS5wcmljZS52MS5QcmljZSIasrUYFggBEAIaEICk6AOBpOgDgqToA4Ok6ANCYgolY28ubWVzaHRyYWRlLmFwaS5tYXJrZXRfZGF0YS5wcmljZS52MVo5Z2l0aHViLmNvbS9tZXNodHJhZGUvYXBpL2dvL21hcmtldF9kYXRhL3ByaWNlL3YxO3ByaWNlX3YxYgZwcm90bzM", [validate_pb_1.file_buf_validate_validate, price_pb_1.file_meshtrade_market_data_price_v1_price, method_options_pb_1.file_meshtrade_option_method_options_v1_method_options, token_pb_1.file_meshtrade_type_v1_token]);
16
+ /**
17
+ * Describes the message meshtrade.market_data.price.v1.GetCurrentPriceByTokenPairRequest.
18
+ * Use `create(GetCurrentPriceByTokenPairRequestSchema)` to create a new message.
19
+ */
20
+ exports.GetCurrentPriceByTokenPairRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_market_data_price_v1_service, 0);
21
+ /**
22
+ *
23
+ * PriceService provides prices.
24
+ *
25
+ * @generated from service meshtrade.market_data.price.v1.PriceService
26
+ */
27
+ exports.PriceService = (0, codegenv2_1.serviceDesc)(exports.file_meshtrade_market_data_price_v1_service, 0);
@@ -0,0 +1 @@
1
+ export * from "./method_options_pb";
@@ -0,0 +1,42 @@
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("./method_options_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
+ // ===================================================================
@@ -0,0 +1,132 @@
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { MethodOptions as MethodOptions$1 } from "@bufbuild/protobuf/wkt";
3
+ import type { Role } from "../../../iam/role/v1/role_pb";
4
+ import type { Message } from "@bufbuild/protobuf";
5
+ /**
6
+ * Describes the file meshtrade/option/method_options/v1/method_options.proto.
7
+ */
8
+ export declare const file_meshtrade_option_method_options_v1_method_options: GenFile;
9
+ /**
10
+ *
11
+ * MethodOptions consolidates three authorization dimensions for RPC methods.
12
+ *
13
+ * @generated from message meshtrade.option.method_options.v1.MethodOptions
14
+ */
15
+ export type MethodOptions = Message<"meshtrade.option.method_options.v1.MethodOptions"> & {
16
+ /**
17
+ *
18
+ * Method type: READ for queries, WRITE for mutations.
19
+ *
20
+ * @generated from field: meshtrade.option.method_options.v1.MethodType type = 1;
21
+ */
22
+ type: MethodType;
23
+ /**
24
+ *
25
+ * Access level: Defines authentication header requirements.
26
+ * PUBLIC allows anonymous, AUTHORISED requires key + group.
27
+ *
28
+ * @generated from field: meshtrade.option.method_options.v1.MethodAccessLevel access_level = 2;
29
+ */
30
+ accessLevel: MethodAccessLevel;
31
+ /**
32
+ *
33
+ * Roles that grant access to this method.
34
+ * Used for access control checking if group header is required and/or given.
35
+ *
36
+ * @generated from field: repeated meshtrade.iam.role.v1.Role roles = 3;
37
+ */
38
+ roles: Role[];
39
+ };
40
+ /**
41
+ * Describes the message meshtrade.option.method_options.v1.MethodOptions.
42
+ * Use `create(MethodOptionsSchema)` to create a new message.
43
+ */
44
+ export declare const MethodOptionsSchema: GenMessage<MethodOptions>;
45
+ /**
46
+ *
47
+ * MethodType classifies operations by their effect on system state.
48
+ *
49
+ * READ: Safe, idempotent read operations.
50
+ * Examples: Get, List, Search operations.
51
+ *
52
+ * WRITE: Operations that modify state.
53
+ * Examples: Create, Update, Delete, Activate, Deactivate operations.
54
+ *
55
+ * @generated from enum meshtrade.option.method_options.v1.MethodType
56
+ */
57
+ export declare enum MethodType {
58
+ /**
59
+ *
60
+ * Default value, should not be used. All methods must declare READ or WRITE.
61
+ *
62
+ * @generated from enum value: METHOD_TYPE_UNSPECIFIED = 0;
63
+ */
64
+ UNSPECIFIED = 0,
65
+ /**
66
+ *
67
+ * Safe, idempotent operation that does not change system state.
68
+ * Typically granted to both *_ADMIN and *_VIEWER roles.
69
+ *
70
+ * @generated from enum value: METHOD_TYPE_READ = 1;
71
+ */
72
+ READ = 1,
73
+ /**
74
+ *
75
+ * Operation that may change system state.
76
+ * Typically granted only to *_ADMIN roles.
77
+ *
78
+ * @generated from enum value: METHOD_TYPE_WRITE = 2;
79
+ */
80
+ WRITE = 2
81
+ }
82
+ /**
83
+ * Describes the enum meshtrade.option.method_options.v1.MethodType.
84
+ */
85
+ export declare const MethodTypeSchema: GenEnum<MethodType>;
86
+ /**
87
+ *
88
+ * MethodAccessLevel defines authentication header requirements for API methods.
89
+ *
90
+ * Specifies whether x-api-key and x-group headers are required and how executing
91
+ * group context is determined. Controls anonymous access, authentication requirements,
92
+ * and role authorization checks.
93
+ *
94
+ * @generated from enum meshtrade.option.method_options.v1.MethodAccessLevel
95
+ */
96
+ export declare enum MethodAccessLevel {
97
+ /**
98
+ *
99
+ * Default value, should not be used.
100
+ *
101
+ * @generated from enum value: METHOD_ACCESS_LEVEL_UNSPECIFIED = 0;
102
+ */
103
+ UNSPECIFIED = 0,
104
+ /**
105
+ *
106
+ * x-api-key: optional (if provided must be valid and identify an active API user).
107
+ * x-group: ignored
108
+ *
109
+ * Allows unauthenticated access. If credentials provided, authentication and role checks enforced.
110
+ *
111
+ * @generated from enum value: METHOD_ACCESS_LEVEL_PUBLIC = 1;
112
+ */
113
+ PUBLIC = 1,
114
+ /**
115
+ *
116
+ * x-api-key: required
117
+ * x-group: required
118
+ *
119
+ * Requires both valid API key and explicit group context. Most secure and explicit.
120
+ *
121
+ * @generated from enum value: METHOD_ACCESS_LEVEL_AUTHORISED = 2;
122
+ */
123
+ AUTHORISED = 2
124
+ }
125
+ /**
126
+ * Describes the enum meshtrade.option.method_options.v1.MethodAccessLevel.
127
+ */
128
+ export declare const MethodAccessLevelSchema: GenEnum<MethodAccessLevel>;
129
+ /**
130
+ * @generated from extension: meshtrade.option.method_options.v1.MethodOptions method_options = 50006;
131
+ */
132
+ export declare const method_options: GenExtension<MethodOptions$1, MethodOptions>;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
3
+ // @generated from file meshtrade/option/method_options/v1/method_options.proto (package meshtrade.option.method_options.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.method_options = exports.MethodAccessLevelSchema = exports.MethodAccessLevel = exports.MethodTypeSchema = exports.MethodType = exports.MethodOptionsSchema = exports.file_meshtrade_option_method_options_v1_method_options = void 0;
7
+ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
8
+ const wkt_1 = require("@bufbuild/protobuf/wkt");
9
+ const role_pb_1 = require("../../../iam/role/v1/role_pb");
10
+ /**
11
+ * Describes the file meshtrade/option/method_options/v1/method_options.proto.
12
+ */
13
+ exports.file_meshtrade_option_method_options_v1_method_options = (0, codegenv2_1.fileDesc)("CjdtZXNodHJhZGUvb3B0aW9uL21ldGhvZF9vcHRpb25zL3YxL21ldGhvZF9vcHRpb25zLnByb3RvEiJtZXNodHJhZGUub3B0aW9uLm1ldGhvZF9vcHRpb25zLnYxIsYBCg1NZXRob2RPcHRpb25zEjwKBHR5cGUYASABKA4yLi5tZXNodHJhZGUub3B0aW9uLm1ldGhvZF9vcHRpb25zLnYxLk1ldGhvZFR5cGUSSwoMYWNjZXNzX2xldmVsGAIgASgOMjUubWVzaHRyYWRlLm9wdGlvbi5tZXRob2Rfb3B0aW9ucy52MS5NZXRob2RBY2Nlc3NMZXZlbBIqCgVyb2xlcxgDIAMoDjIbLm1lc2h0cmFkZS5pYW0ucm9sZS52MS5Sb2xlKlYKCk1ldGhvZFR5cGUSGwoXTUVUSE9EX1RZUEVfVU5TUEVDSUZJRUQQABIUChBNRVRIT0RfVFlQRV9SRUFEEAESFQoRTUVUSE9EX1RZUEVfV1JJVEUQAip8ChFNZXRob2RBY2Nlc3NMZXZlbBIjCh9NRVRIT0RfQUNDRVNTX0xFVkVMX1VOU1BFQ0lGSUVEEAASHgoaTUVUSE9EX0FDQ0VTU19MRVZFTF9QVUJMSUMQARIiCh5NRVRIT0RfQUNDRVNTX0xFVkVMX0FVVEhPUklTRUQQAjp6Cg5tZXRob2Rfb3B0aW9ucxIeLmdvb2dsZS5wcm90b2J1Zi5NZXRob2RPcHRpb25zGNaGAyABKAsyMS5tZXNodHJhZGUub3B0aW9uLm1ldGhvZF9vcHRpb25zLnYxLk1ldGhvZE9wdGlvbnNSDW1ldGhvZE9wdGlvbnNCcwopY28ubWVzaHRyYWRlLmFwaS5vcHRpb24ubWV0aG9kX29wdGlvbnMudjFaRmdpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9vcHRpb24vbWV0aG9kX29wdGlvbnMvdjE7bWV0aG9kX29wdGlvbnNfdjFiBnByb3RvMw", [wkt_1.file_google_protobuf_descriptor, role_pb_1.file_meshtrade_iam_role_v1_role]);
14
+ /**
15
+ * Describes the message meshtrade.option.method_options.v1.MethodOptions.
16
+ * Use `create(MethodOptionsSchema)` to create a new message.
17
+ */
18
+ exports.MethodOptionsSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_option_method_options_v1_method_options, 0);
19
+ /**
20
+ *
21
+ * MethodType classifies operations by their effect on system state.
22
+ *
23
+ * READ: Safe, idempotent read operations.
24
+ * Examples: Get, List, Search operations.
25
+ *
26
+ * WRITE: Operations that modify state.
27
+ * Examples: Create, Update, Delete, Activate, Deactivate operations.
28
+ *
29
+ * @generated from enum meshtrade.option.method_options.v1.MethodType
30
+ */
31
+ var MethodType;
32
+ (function (MethodType) {
33
+ /**
34
+ *
35
+ * Default value, should not be used. All methods must declare READ or WRITE.
36
+ *
37
+ * @generated from enum value: METHOD_TYPE_UNSPECIFIED = 0;
38
+ */
39
+ MethodType[MethodType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
40
+ /**
41
+ *
42
+ * Safe, idempotent operation that does not change system state.
43
+ * Typically granted to both *_ADMIN and *_VIEWER roles.
44
+ *
45
+ * @generated from enum value: METHOD_TYPE_READ = 1;
46
+ */
47
+ MethodType[MethodType["READ"] = 1] = "READ";
48
+ /**
49
+ *
50
+ * Operation that may change system state.
51
+ * Typically granted only to *_ADMIN roles.
52
+ *
53
+ * @generated from enum value: METHOD_TYPE_WRITE = 2;
54
+ */
55
+ MethodType[MethodType["WRITE"] = 2] = "WRITE";
56
+ })(MethodType || (exports.MethodType = MethodType = {}));
57
+ /**
58
+ * Describes the enum meshtrade.option.method_options.v1.MethodType.
59
+ */
60
+ exports.MethodTypeSchema = (0, codegenv2_1.enumDesc)(exports.file_meshtrade_option_method_options_v1_method_options, 0);
61
+ /**
62
+ *
63
+ * MethodAccessLevel defines authentication header requirements for API methods.
64
+ *
65
+ * Specifies whether x-api-key and x-group headers are required and how executing
66
+ * group context is determined. Controls anonymous access, authentication requirements,
67
+ * and role authorization checks.
68
+ *
69
+ * @generated from enum meshtrade.option.method_options.v1.MethodAccessLevel
70
+ */
71
+ var MethodAccessLevel;
72
+ (function (MethodAccessLevel) {
73
+ /**
74
+ *
75
+ * Default value, should not be used.
76
+ *
77
+ * @generated from enum value: METHOD_ACCESS_LEVEL_UNSPECIFIED = 0;
78
+ */
79
+ MethodAccessLevel[MethodAccessLevel["UNSPECIFIED"] = 0] = "UNSPECIFIED";
80
+ /**
81
+ *
82
+ * x-api-key: optional (if provided must be valid and identify an active API user).
83
+ * x-group: ignored
84
+ *
85
+ * Allows unauthenticated access. If credentials provided, authentication and role checks enforced.
86
+ *
87
+ * @generated from enum value: METHOD_ACCESS_LEVEL_PUBLIC = 1;
88
+ */
89
+ MethodAccessLevel[MethodAccessLevel["PUBLIC"] = 1] = "PUBLIC";
90
+ /**
91
+ *
92
+ * x-api-key: required
93
+ * x-group: required
94
+ *
95
+ * Requires both valid API key and explicit group context. Most secure and explicit.
96
+ *
97
+ * @generated from enum value: METHOD_ACCESS_LEVEL_AUTHORISED = 2;
98
+ */
99
+ MethodAccessLevel[MethodAccessLevel["AUTHORISED"] = 2] = "AUTHORISED";
100
+ })(MethodAccessLevel || (exports.MethodAccessLevel = MethodAccessLevel = {}));
101
+ /**
102
+ * Describes the enum meshtrade.option.method_options.v1.MethodAccessLevel.
103
+ */
104
+ exports.MethodAccessLevelSchema = (0, codegenv2_1.enumDesc)(exports.file_meshtrade_option_method_options_v1_method_options, 1);
105
+ /**
106
+ * @generated from extension: meshtrade.option.method_options.v1.MethodOptions method_options = 50006;
107
+ */
108
+ exports.method_options = (0, codegenv2_1.extDesc)(exports.file_meshtrade_option_method_options_v1_method_options, 0);