meshtrade 1.0.1__py3-none-any.whl → 1.29.0__py3-none-any.whl

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 (163) hide show
  1. meshtrade/common/__init__.py +2 -4
  2. meshtrade/common/config.py +3 -4
  3. meshtrade/common/grpc_client.py +140 -0
  4. meshtrade/common/service_options.py +46 -0
  5. meshtrade/compliance/client/v1/__init__.py +0 -2
  6. meshtrade/compliance/client/v1/client_pb2.py +15 -4
  7. meshtrade/compliance/client/v1/client_pb2.pyi +1 -0
  8. meshtrade/compliance/client/v1/company_pb2.py +25 -8
  9. meshtrade/compliance/client/v1/company_pb2.pyi +1 -0
  10. meshtrade/compliance/client/v1/company_representative_pb2.py +9 -4
  11. meshtrade/compliance/client/v1/company_representative_pb2.pyi +1 -0
  12. meshtrade/compliance/client/v1/company_representative_role_pb2.py +2 -2
  13. meshtrade/compliance/client/v1/fund_pb2.py +13 -4
  14. meshtrade/compliance/client/v1/fund_pb2.pyi +1 -0
  15. meshtrade/compliance/client/v1/identification_document_type_pb2.py +2 -2
  16. meshtrade/compliance/client/v1/industry_classification_pb2.py +2 -2
  17. meshtrade/compliance/client/v1/natural_person_connection_type_pb2.py +2 -2
  18. meshtrade/compliance/client/v1/natural_person_pb2.py +19 -4
  19. meshtrade/compliance/client/v1/natural_person_pb2.pyi +1 -0
  20. meshtrade/compliance/client/v1/pep_status_pb2.py +2 -2
  21. meshtrade/compliance/client/v1/service_meshpy.py +2 -1
  22. meshtrade/compliance/client/v1/service_pb2.py +21 -17
  23. meshtrade/compliance/client/v1/service_pb2.pyi +2 -2
  24. meshtrade/compliance/client/v1/source_of_income_and_wealth_pb2.py +2 -2
  25. meshtrade/compliance/client/v1/tax_residency_pb2.py +9 -4
  26. meshtrade/compliance/client/v1/tax_residency_pb2.pyi +1 -0
  27. meshtrade/compliance/client/v1/trust_pb2.py +13 -4
  28. meshtrade/compliance/client/v1/trust_pb2.pyi +1 -0
  29. meshtrade/compliance/client/v1/verification_status_pb2.py +2 -2
  30. meshtrade/iam/api_user/v1/__init__.py +34 -26
  31. meshtrade/iam/api_user/v1/api_credentials_pb2.py +5 -5
  32. meshtrade/iam/api_user/v1/api_user_pb2.py +13 -9
  33. meshtrade/iam/api_user/v1/api_user_pb2.pyi +2 -4
  34. meshtrade/iam/api_user/v1/api_user_state_machine.py +104 -0
  35. meshtrade/iam/api_user/v1/service_meshpy.py +96 -61
  36. meshtrade/iam/api_user/v1/service_pb2.py +61 -40
  37. meshtrade/iam/api_user/v1/service_pb2.pyi +26 -11
  38. meshtrade/iam/api_user/v1/service_pb2_grpc.py +179 -135
  39. meshtrade/iam/group/v1/__init__.py +4 -2
  40. meshtrade/iam/group/v1/group_pb2.py +13 -4
  41. meshtrade/iam/group/v1/group_pb2.pyi +9 -2
  42. meshtrade/iam/group/v1/service_meshpy.py +41 -6
  43. meshtrade/iam/group/v1/service_pb2.py +47 -20
  44. meshtrade/iam/group/v1/service_pb2.pyi +46 -13
  45. meshtrade/iam/group/v1/service_pb2_grpc.py +151 -16
  46. meshtrade/iam/role/v1/__init__.py +17 -4
  47. meshtrade/iam/role/v1/role.py +162 -11
  48. meshtrade/iam/role/v1/role_pb2.py +4 -7
  49. meshtrade/iam/role/v1/role_pb2.pyi +53 -23
  50. meshtrade/iam/user/v1/__init__.py +22 -4
  51. meshtrade/iam/user/v1/service_meshpy.py +129 -7
  52. meshtrade/iam/user/v1/service_pb2.py +66 -16
  53. meshtrade/iam/user/v1/service_pb2.pyi +81 -9
  54. meshtrade/iam/user/v1/service_pb2_grpc.py +385 -14
  55. meshtrade/iam/user/v1/user_pb2.py +13 -4
  56. meshtrade/iam/user/v1/user_pb2.pyi +7 -2
  57. meshtrade/ledger/transaction/v1/__init__.py +25 -1
  58. meshtrade/ledger/transaction/v1/service_meshpy.py +176 -0
  59. meshtrade/ledger/transaction/v1/service_pb2.py +56 -0
  60. meshtrade/ledger/transaction/v1/service_pb2.pyi +32 -0
  61. meshtrade/ledger/transaction/v1/service_pb2_grpc.py +131 -0
  62. meshtrade/ledger/transaction/v1/transaction_action_pb2.py +2 -2
  63. meshtrade/ledger/transaction/v1/transaction_state_machine.py +75 -0
  64. meshtrade/ledger/transaction/v1/transaction_state_pb2.py +2 -2
  65. meshtrade/{reporting/income_report → market_data/price}/v1/__init__.py +11 -20
  66. meshtrade/market_data/price/v1/price_pb2.py +40 -0
  67. meshtrade/market_data/price/v1/price_pb2.pyi +23 -0
  68. meshtrade/market_data/price/v1/service_meshpy.py +152 -0
  69. meshtrade/market_data/price/v1/service_pb2.py +49 -0
  70. meshtrade/market_data/price/v1/service_pb2.pyi +18 -0
  71. meshtrade/market_data/price/v1/service_pb2_grpc.py +84 -0
  72. meshtrade/option/method_options/v1/__init__.py +41 -0
  73. meshtrade/option/method_options/v1/method_options_pb2.py +43 -0
  74. meshtrade/option/method_options/v1/method_options_pb2.pyi +40 -0
  75. meshtrade/reporting/account_report/v1/__init__.py +66 -0
  76. meshtrade/reporting/account_report/v1/account_report_pb2.py +46 -0
  77. meshtrade/reporting/account_report/v1/account_report_pb2.pyi +49 -0
  78. meshtrade/reporting/{income_report → account_report}/v1/disclaimer_pb2.py +7 -7
  79. meshtrade/reporting/account_report/v1/fee_entry_pb2.py +39 -0
  80. meshtrade/reporting/account_report/v1/fee_entry_pb2.pyi +26 -0
  81. meshtrade/reporting/account_report/v1/fee_entry_pb2_grpc.py +4 -0
  82. meshtrade/reporting/account_report/v1/income_entry.py +35 -0
  83. meshtrade/reporting/account_report/v1/income_entry_pb2.py +42 -0
  84. meshtrade/reporting/{income_report/v1/entry_pb2.pyi → account_report/v1/income_entry_pb2.pyi} +18 -10
  85. meshtrade/reporting/account_report/v1/income_entry_pb2_grpc.py +4 -0
  86. meshtrade/reporting/{income_report → account_report}/v1/service_meshpy.py +37 -36
  87. meshtrade/reporting/account_report/v1/service_pb2.py +72 -0
  88. meshtrade/reporting/account_report/v1/service_pb2.pyi +43 -0
  89. meshtrade/reporting/account_report/v1/service_pb2_grpc.py +161 -0
  90. meshtrade/reporting/account_report/v1/trading_statement_entry_pb2.py +39 -0
  91. meshtrade/reporting/account_report/v1/trading_statement_entry_pb2.pyi +30 -0
  92. meshtrade/reporting/account_report/v1/trading_statement_entry_pb2_grpc.py +4 -0
  93. meshtrade/studio/instrument/v1/__init__.py +43 -0
  94. meshtrade/studio/instrument/v1/instrument_pb2.py +45 -0
  95. meshtrade/studio/instrument/v1/instrument_pb2.pyi +20 -0
  96. meshtrade/studio/instrument/v1/instrument_pb2_grpc.py +4 -0
  97. meshtrade/studio/instrument/v1/instrument_type_pb2.py +37 -0
  98. meshtrade/studio/instrument/v1/instrument_type_pb2.pyi +64 -0
  99. meshtrade/studio/instrument/v1/instrument_type_pb2_grpc.py +4 -0
  100. meshtrade/studio/instrument/v1/unit_pb2.py +37 -0
  101. meshtrade/studio/instrument/v1/unit_pb2.pyi +46 -0
  102. meshtrade/studio/instrument/v1/unit_pb2_grpc.py +4 -0
  103. meshtrade/trading/limit_order/v1/__init__.py +22 -4
  104. meshtrade/trading/limit_order/v1/limit_order_pb2.py +24 -4
  105. meshtrade/trading/limit_order/v1/limit_order_pb2.pyi +55 -5
  106. meshtrade/trading/limit_order/v1/service_meshpy.py +113 -2
  107. meshtrade/trading/limit_order/v1/service_pb2.py +49 -9
  108. meshtrade/trading/limit_order/v1/service_pb2.pyi +67 -7
  109. meshtrade/trading/limit_order/v1/service_pb2_grpc.py +321 -4
  110. meshtrade/trading/market_order/v1/__init__.py +0 -2
  111. meshtrade/trading/market_order/v1/market_order_pb2.py +2 -2
  112. meshtrade/trading/market_order/v1/service_meshpy.py +3 -2
  113. meshtrade/trading/market_order/v1/service_pb2.py +8 -9
  114. meshtrade/trading/market_order/v1/service_pb2.pyi +1 -2
  115. meshtrade/type/v1/__init__.py +82 -12
  116. meshtrade/type/v1/address_pb2.py +2 -2
  117. meshtrade/type/v1/amount.py +429 -5
  118. meshtrade/type/v1/amount_pb2.py +2 -2
  119. meshtrade/type/v1/contact_details_pb2.py +2 -2
  120. meshtrade/type/v1/date_pb2.py +2 -2
  121. meshtrade/type/v1/decimal_built_in_conversions.py +8 -3
  122. meshtrade/type/v1/decimal_operations.py +354 -0
  123. meshtrade/type/v1/decimal_pb2.py +2 -2
  124. meshtrade/type/v1/ledger.py +76 -1
  125. meshtrade/type/v1/ledger_pb2.py +2 -2
  126. meshtrade/type/v1/sorting_pb2.py +2 -2
  127. meshtrade/type/v1/time_of_day_pb2.py +2 -2
  128. meshtrade/type/v1/token.py +144 -0
  129. meshtrade/type/v1/token_pb2.py +2 -2
  130. meshtrade/wallet/account/v1/__init__.py +21 -3
  131. meshtrade/wallet/account/v1/account_pb2.py +28 -4
  132. meshtrade/wallet/account/v1/account_pb2.pyi +57 -3
  133. meshtrade/wallet/account/v1/service_meshpy.py +72 -1
  134. meshtrade/wallet/account/v1/service_pb2.py +67 -23
  135. meshtrade/wallet/account/v1/service_pb2.pyi +81 -21
  136. meshtrade/wallet/account/v1/service_pb2_grpc.py +242 -8
  137. {meshtrade-1.0.1.dist-info → meshtrade-1.29.0.dist-info}/METADATA +1 -1
  138. meshtrade-1.29.0.dist-info/RECORD +217 -0
  139. meshtrade/compliance/client/v1/service_options_meshpy.py +0 -65
  140. meshtrade/iam/api_user/v1/service.py +0 -58
  141. meshtrade/iam/api_user/v1/service_options_meshpy.py +0 -65
  142. meshtrade/iam/group/v1/service_options_meshpy.py +0 -65
  143. meshtrade/iam/user/v1/service_options_meshpy.py +0 -65
  144. meshtrade/option/v1/method_type_pb2.py +0 -38
  145. meshtrade/option/v1/method_type_pb2.pyi +0 -17
  146. meshtrade/reporting/income_report/v1/entry_pb2.py +0 -42
  147. meshtrade/reporting/income_report/v1/income_report_pb2.py +0 -44
  148. meshtrade/reporting/income_report/v1/income_report_pb2.pyi +0 -42
  149. meshtrade/reporting/income_report/v1/service_options_meshpy.py +0 -65
  150. meshtrade/reporting/income_report/v1/service_pb2.py +0 -58
  151. meshtrade/reporting/income_report/v1/service_pb2.pyi +0 -37
  152. meshtrade/reporting/income_report/v1/service_pb2_grpc.py +0 -170
  153. meshtrade/trading/limit_order/v1/service_options_meshpy.py +0 -65
  154. meshtrade/trading/market_order/v1/service_options_meshpy.py +0 -65
  155. meshtrade/wallet/account/v1/service_options_meshpy.py +0 -65
  156. meshtrade-1.0.1.dist-info/RECORD +0 -191
  157. /meshtrade/{option/v1/method_type_pb2_grpc.py → market_data/price/v1/price_pb2_grpc.py} +0 -0
  158. /meshtrade/{reporting/income_report/v1/disclaimer_pb2_grpc.py → option/method_options/v1/method_options_pb2_grpc.py} +0 -0
  159. /meshtrade/reporting/{income_report/v1/entry_pb2_grpc.py → account_report/v1/account_report_pb2_grpc.py} +0 -0
  160. /meshtrade/reporting/{income_report → account_report}/v1/disclaimer_pb2.pyi +0 -0
  161. /meshtrade/reporting/{income_report/v1/income_report_pb2_grpc.py → account_report/v1/disclaimer_pb2_grpc.py} +0 -0
  162. {meshtrade-1.0.1.dist-info → meshtrade-1.29.0.dist-info}/WHEEL +0 -0
  163. {meshtrade-1.0.1.dist-info → meshtrade-1.29.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,39 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/reporting/account_report/v1/fee_entry.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'meshtrade/reporting/account_report/v1/fee_entry.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+ from meshtrade.type.v1 import amount_pb2 as meshtrade_dot_type_dot_v1_dot_amount__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5meshtrade/reporting/account_report/v1/fee_entry.proto\x12%meshtrade.reporting.account_report.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1emeshtrade/type/v1/amount.proto\"\xc7\x02\n\x08\x46\x65\x65\x45ntry\x12\x45\n\x10transaction_date\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0ftransactionDate\x12%\n\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x31\n\x06\x61mount\x18\x04 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x06\x61mount\x12Q\n\x17reported_currency_value\x18\x05 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x15reportedCurrencyValue\x12%\n\x0etoken_currency\x18\x06 \x01(\tR\rtokenCurrencyBy\n,co.meshtrade.api.reporting.account_report.v1ZIgithub.com/meshtrade/api/go/reporting/account_report/v1;account_report_v1b\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.reporting.account_report.v1.fee_entry_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n,co.meshtrade.api.reporting.account_report.v1ZIgithub.com/meshtrade/api/go/reporting/account_report/v1;account_report_v1'
37
+ _globals['_FEEENTRY']._serialized_start=162
38
+ _globals['_FEEENTRY']._serialized_end=489
39
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,26 @@
1
+ import datetime
2
+
3
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
4
+ from meshtrade.type.v1 import amount_pb2 as _amount_pb2
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from collections.abc import Mapping as _Mapping
8
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
9
+
10
+ DESCRIPTOR: _descriptor.FileDescriptor
11
+
12
+ class FeeEntry(_message.Message):
13
+ __slots__ = ("transaction_date", "transaction_id", "description", "amount", "reported_currency_value", "token_currency")
14
+ TRANSACTION_DATE_FIELD_NUMBER: _ClassVar[int]
15
+ TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int]
16
+ DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
17
+ AMOUNT_FIELD_NUMBER: _ClassVar[int]
18
+ REPORTED_CURRENCY_VALUE_FIELD_NUMBER: _ClassVar[int]
19
+ TOKEN_CURRENCY_FIELD_NUMBER: _ClassVar[int]
20
+ transaction_date: _timestamp_pb2.Timestamp
21
+ transaction_id: str
22
+ description: str
23
+ amount: _amount_pb2.Amount
24
+ reported_currency_value: _amount_pb2.Amount
25
+ token_currency: str
26
+ def __init__(self, transaction_date: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., transaction_id: _Optional[str] = ..., description: _Optional[str] = ..., amount: _Optional[_Union[_amount_pb2.Amount, _Mapping]] = ..., reported_currency_value: _Optional[_Union[_amount_pb2.Amount, _Mapping]] = ..., token_currency: _Optional[str] = ...) -> None: ...
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
@@ -0,0 +1,35 @@
1
+ """Income entry utility functions."""
2
+
3
+ from meshtrade.reporting.account_report.v1.income_entry_pb2 import IncomeNarrative
4
+
5
+
6
+ def income_narrative_pretty_string(narrative: IncomeNarrative) -> str:
7
+ """Generate human-readable string for income narrative.
8
+
9
+ Converts enum values to concise, display-friendly strings suitable for
10
+ reports and user interfaces.
11
+
12
+ Args:
13
+ narrative: IncomeNarrative enum value
14
+
15
+ Returns:
16
+ Pretty-printed string representation:
17
+ - "-" for unspecified narratives
18
+ - Descriptive names for known types (e.g., "Yield", "Dividend")
19
+ - Empty string for unknown values
20
+ """
21
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_UNSPECIFIED:
22
+ return "-"
23
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_YIELD:
24
+ return "Yield"
25
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_DIVIDEND:
26
+ return "Dividend"
27
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_INTEREST:
28
+ return "Interest"
29
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_PRINCIPAL:
30
+ return "Principal"
31
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_DISTRIBUTION:
32
+ return "Distribution"
33
+ if narrative == IncomeNarrative.INCOME_NARRATIVE_PROFIT_DISTRIBUTION:
34
+ return "Profit Distribution"
35
+ return ""
@@ -0,0 +1,42 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/reporting/account_report/v1/income_entry.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'meshtrade/reporting/account_report/v1/income_entry.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from meshtrade.type.v1 import token_pb2 as meshtrade_dot_type_dot_v1_dot_token__pb2
26
+ from meshtrade.type.v1 import amount_pb2 as meshtrade_dot_type_dot_v1_dot_amount__pb2
27
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8meshtrade/reporting/account_report/v1/income_entry.proto\x12%meshtrade.reporting.account_report.v1\x1a\x1dmeshtrade/type/v1/token.proto\x1a\x1emeshtrade/type/v1/amount.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8a\x03\n\x0bIncomeEntry\x12\x1d\n\nasset_name\x18\x01 \x01(\tR\tassetName\x12.\n\x05token\x18\x02 \x01(\x0b\x32\x18.meshtrade.type.v1.TokenR\x05token\x12.\n\x04\x64\x61te\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x04\x64\x61te\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12T\n\tnarrative\x18\x05 \x01(\x0e\x32\x36.meshtrade.reporting.account_report.v1.IncomeNarrativeR\tnarrative\x12\x31\n\x06\x61mount\x18\x06 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x06\x61mount\x12Q\n\x17reported_currency_value\x18\x07 \x01(\x0b\x32\x19.meshtrade.type.v1.AmountR\x15reportedCurrencyValue*\xfa\x01\n\x0fIncomeNarrative\x12 \n\x1cINCOME_NARRATIVE_UNSPECIFIED\x10\x00\x12\x1a\n\x16INCOME_NARRATIVE_YIELD\x10\x01\x12\x1d\n\x19INCOME_NARRATIVE_DIVIDEND\x10\x02\x12\x1d\n\x19INCOME_NARRATIVE_INTEREST\x10\x03\x12\x1e\n\x1aINCOME_NARRATIVE_PRINCIPAL\x10\x04\x12!\n\x1dINCOME_NARRATIVE_DISTRIBUTION\x10\x05\x12(\n$INCOME_NARRATIVE_PROFIT_DISTRIBUTION\x10\x06\x42y\n,co.meshtrade.api.reporting.account_report.v1ZIgithub.com/meshtrade/api/go/reporting/account_report/v1;account_report_v1b\x06proto3')
31
+
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.reporting.account_report.v1.income_entry_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ _globals['DESCRIPTOR']._loaded_options = None
37
+ _globals['DESCRIPTOR']._serialized_options = b'\n,co.meshtrade.api.reporting.account_report.v1ZIgithub.com/meshtrade/api/go/reporting/account_report/v1;account_report_v1'
38
+ _globals['_INCOMENARRATIVE']._serialized_start=593
39
+ _globals['_INCOMENARRATIVE']._serialized_end=843
40
+ _globals['_INCOMEENTRY']._serialized_start=196
41
+ _globals['_INCOMEENTRY']._serialized_end=590
42
+ # @@protoc_insertion_point(module_scope)
@@ -11,16 +11,24 @@ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
11
11
 
12
12
  DESCRIPTOR: _descriptor.FileDescriptor
13
13
 
14
- class Narrative(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
14
+ class IncomeNarrative(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
15
15
  __slots__ = ()
16
- NARRATIVE_UNSPECIFIED: _ClassVar[Narrative]
17
- NARRATIVE_YIELD: _ClassVar[Narrative]
18
- NARRATIVE_COUPON: _ClassVar[Narrative]
19
- NARRATIVE_UNSPECIFIED: Narrative
20
- NARRATIVE_YIELD: Narrative
21
- NARRATIVE_COUPON: Narrative
16
+ INCOME_NARRATIVE_UNSPECIFIED: _ClassVar[IncomeNarrative]
17
+ INCOME_NARRATIVE_YIELD: _ClassVar[IncomeNarrative]
18
+ INCOME_NARRATIVE_DIVIDEND: _ClassVar[IncomeNarrative]
19
+ INCOME_NARRATIVE_INTEREST: _ClassVar[IncomeNarrative]
20
+ INCOME_NARRATIVE_PRINCIPAL: _ClassVar[IncomeNarrative]
21
+ INCOME_NARRATIVE_DISTRIBUTION: _ClassVar[IncomeNarrative]
22
+ INCOME_NARRATIVE_PROFIT_DISTRIBUTION: _ClassVar[IncomeNarrative]
23
+ INCOME_NARRATIVE_UNSPECIFIED: IncomeNarrative
24
+ INCOME_NARRATIVE_YIELD: IncomeNarrative
25
+ INCOME_NARRATIVE_DIVIDEND: IncomeNarrative
26
+ INCOME_NARRATIVE_INTEREST: IncomeNarrative
27
+ INCOME_NARRATIVE_PRINCIPAL: IncomeNarrative
28
+ INCOME_NARRATIVE_DISTRIBUTION: IncomeNarrative
29
+ INCOME_NARRATIVE_PROFIT_DISTRIBUTION: IncomeNarrative
22
30
 
23
- class Entry(_message.Message):
31
+ class IncomeEntry(_message.Message):
24
32
  __slots__ = ("asset_name", "token", "date", "description", "narrative", "amount", "reported_currency_value")
25
33
  ASSET_NAME_FIELD_NUMBER: _ClassVar[int]
26
34
  TOKEN_FIELD_NUMBER: _ClassVar[int]
@@ -33,7 +41,7 @@ class Entry(_message.Message):
33
41
  token: _token_pb2.Token
34
42
  date: _timestamp_pb2.Timestamp
35
43
  description: str
36
- narrative: Narrative
44
+ narrative: IncomeNarrative
37
45
  amount: _amount_pb2.Amount
38
46
  reported_currency_value: _amount_pb2.Amount
39
- def __init__(self, asset_name: _Optional[str] = ..., token: _Optional[_Union[_token_pb2.Token, _Mapping]] = ..., date: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., description: _Optional[str] = ..., narrative: _Optional[_Union[Narrative, str]] = ..., amount: _Optional[_Union[_amount_pb2.Amount, _Mapping]] = ..., reported_currency_value: _Optional[_Union[_amount_pb2.Amount, _Mapping]] = ...) -> None: ...
47
+ def __init__(self, asset_name: _Optional[str] = ..., token: _Optional[_Union[_token_pb2.Token, _Mapping]] = ..., date: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., description: _Optional[str] = ..., narrative: _Optional[_Union[IncomeNarrative, str]] = ..., amount: _Optional[_Union[_amount_pb2.Amount, _Mapping]] = ..., reported_currency_value: _Optional[_Union[_amount_pb2.Amount, _Mapping]] = ...) -> None: ...
@@ -0,0 +1,4 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
@@ -1,45 +1,46 @@
1
1
  # Code generated by protoc-gen-meshpy. DO NOT EDIT.
2
- # source: meshtrade/reporting/income_report/v1/service.proto
2
+ # source: meshtrade/reporting/account_report/v1/service.proto
3
3
 
4
4
  """
5
- IncomeReportService gRPC service wrapper with authentication, timeouts, and resource management.
5
+ AccountReportService gRPC service wrapper with authentication, timeouts, and resource management.
6
6
 
7
- This module provides a high-level gRPC service for the IncomeReportService service that combines
7
+ This module provides a high-level gRPC service for the AccountReportService service that combines
8
8
  the service interface with resource management capabilities, providing authentication,
9
9
  timeouts, and proper connection handling.
10
10
  """
11
11
 
12
+ from collections.abc import Iterator
12
13
  from datetime import timedelta
13
14
  from typing import Optional
14
15
 
15
16
  from meshtrade.common import BaseGRPCClient
16
17
  from meshtrade.iam.api_user.v1.api_credentials import find_credentials
17
18
 
18
- from .service_options_meshpy import ServiceOptions
19
+ from .account_report_pb2 import AccountReport
20
+ from meshtrade.common.service_options import ServiceOptions
19
21
  from .service_pb2 import (
20
- GetExcelIncomeReportRequest,
21
- GetExcelIncomeReportResponse,
22
- GetIncomeReportRequest,
23
- IncomeReport,
22
+ GetAccountReportRequest,
23
+ GetExcelAccountReportRequest,
24
+ GetExcelAccountReportResponse,
24
25
  )
25
- from .service_pb2_grpc import IncomeReportServiceStub
26
+ from .service_pb2_grpc import AccountReportServiceStub
26
27
 
27
28
 
28
- def _create_incomereportservice_stub(channel):
29
- """Factory function to create IncomeReportServiceStub from gRPC channel."""
30
- return IncomeReportServiceStub(channel)
29
+ def _create_accountreportservice_stub(channel):
30
+ """Factory function to create AccountReportServiceStub from gRPC channel."""
31
+ return AccountReportServiceStub(channel)
31
32
 
32
33
 
33
- class IncomeReportService(BaseGRPCClient):
34
- """IncomeReportService gRPC service with authentication, timeouts, and resource management.
34
+ class AccountReportService(BaseGRPCClient):
35
+ """AccountReportService gRPC service with authentication, timeouts, and resource management.
35
36
 
36
- This service provides a complete implementation of the IncomeReportService with proper authentication, timeout handling, and automatic resource cleanup.
37
+ This service provides a complete implementation of the AccountReportService with proper authentication, timeout handling, and automatic resource cleanup.
37
38
 
38
- Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/reporting/income_report/v1
39
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/reporting/account_report/v1
39
40
 
40
41
  Basic service usage with default SDK Configuration:
41
42
  ```python
42
- service = IncomeReportService()
43
+ service = AccountReportService()
43
44
 
44
45
  with service: # `with` ensures proper clean up of underlying connection after use
45
46
  response = service.get_api_user(request)
@@ -70,7 +71,7 @@ class IncomeReportService(BaseGRPCClient):
70
71
  timeout=timedelta(seconds=60)
71
72
  )
72
73
 
73
- service = IncomeReportService(options)
74
+ service = AccountReportService(options)
74
75
 
75
76
  with service: # `with` ensures proper clean up of underlying connection after use
76
77
  response = service.get_api_user(request)
@@ -80,9 +81,9 @@ class IncomeReportService(BaseGRPCClient):
80
81
  """
81
82
 
82
83
  def __init__(self, options: Optional[ServiceOptions] = None):
83
- """Construct and initialize the IncomeReportService service.
84
+ """Construct and initialize the AccountReportService service.
84
85
 
85
- Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/reporting/income_report/v1
86
+ Full Service documentation: https://meshtrade.github.io/api/docs/api-reference/reporting/account_report/v1
86
87
 
87
88
  Args:
88
89
  options: Optional ServiceOptions for configuring the service.
@@ -104,7 +105,7 @@ class IncomeReportService(BaseGRPCClient):
104
105
  Example:
105
106
  ```python
106
107
  # construct with default configuration
107
- service = IncomeReportService()
108
+ service = AccountReportService()
108
109
 
109
110
  # construct with custom configuration
110
111
  options = ServiceOptions(
@@ -112,7 +113,7 @@ class IncomeReportService(BaseGRPCClient):
112
113
  api_key="your-key",
113
114
  group="groups/your-group"
114
115
  )
115
- service = IncomeReportService(options)
116
+ service = AccountReportService(options)
116
117
  ```
117
118
  """
118
119
  if options is None:
@@ -120,8 +121,8 @@ class IncomeReportService(BaseGRPCClient):
120
121
 
121
122
  # Initialize the base client with all common functionality
122
123
  super().__init__(
123
- service_name="IncomeReportService",
124
- stub_factory=_create_incomereportservice_stub,
124
+ service_name="AccountReportService",
125
+ stub_factory=_create_accountreportservice_stub,
125
126
  find_credentials_func=find_credentials,
126
127
  url=options.url,
127
128
  port=options.port,
@@ -131,39 +132,39 @@ class IncomeReportService(BaseGRPCClient):
131
132
  tls=options.tls,
132
133
  )
133
134
 
134
- def get_income_report(self, request: GetIncomeReportRequest, timeout: Optional[timedelta] = None) -> IncomeReport:
135
- """GetIncomeReport method.
135
+ def get_account_report(self, request: GetAccountReportRequest, timeout: Optional[timedelta] = None) -> AccountReport:
136
+ """GetAccountReport method.
136
137
 
137
138
  Args:
138
- request: The GetIncomeReport request message
139
+ request: The GetAccountReport request message
139
140
  timeout: Optional timeout override for this call
140
141
 
141
142
  Returns:
142
- The GetIncomeReport response message
143
+ The GetAccountReport response message
143
144
 
144
145
  Raises:
145
146
  grpc.RpcError: If the gRPC call fails
146
147
  ValueError: If authentication credentials are missing
147
148
  """
148
- return self._execute_method("GetIncomeReport", request, timeout)
149
+ return self._execute_method("GetAccountReport", request, timeout)
149
150
 
150
- def get_excel_income_report(self, request: GetExcelIncomeReportRequest, timeout: Optional[timedelta] = None) -> GetExcelIncomeReportResponse:
151
- """GetExcelIncomeReport method.
151
+ def get_excel_account_report(self, request: GetExcelAccountReportRequest, timeout: Optional[timedelta] = None) -> GetExcelAccountReportResponse:
152
+ """GetExcelAccountReport method.
152
153
 
153
154
  Args:
154
- request: The GetExcelIncomeReport request message
155
+ request: The GetExcelAccountReport request message
155
156
  timeout: Optional timeout override for this call
156
157
 
157
158
  Returns:
158
- The GetExcelIncomeReport response message
159
+ The GetExcelAccountReport response message
159
160
 
160
161
  Raises:
161
162
  grpc.RpcError: If the gRPC call fails
162
163
  ValueError: If authentication credentials are missing
163
164
  """
164
- return self._execute_method("GetExcelIncomeReport", request, timeout)
165
+ return self._execute_method("GetExcelAccountReport", request, timeout)
165
166
 
166
167
 
167
168
  # Create aliases to match expected exports
168
- IncomeReportServiceGRPCClient = IncomeReportService
169
- IncomeReportServiceGRPCClientInterface = IncomeReportService
169
+ AccountReportServiceGRPCClient = AccountReportService
170
+ AccountReportServiceGRPCClientInterface = AccountReportService
@@ -0,0 +1,72 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: meshtrade/reporting/account_report/v1/service.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'meshtrade/reporting/account_report/v1/service.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
27
+ from meshtrade.option.method_options.v1 import method_options_pb2 as meshtrade_dot_option_dot_method__options_dot_v1_dot_method__options__pb2
28
+ from meshtrade.reporting.account_report.v1 import account_report_pb2 as meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2
29
+ from meshtrade.type.v1 import token_pb2 as meshtrade_dot_type_dot_v1_dot_token__pb2
30
+
31
+
32
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n3meshtrade/reporting/account_report/v1/service.proto\x12%meshtrade.reporting.account_report.v1\x1a\x1b\x62uf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x37meshtrade/option/method_options/v1/method_options.proto\x1a:meshtrade/reporting/account_report/v1/account_report.proto\x1a\x1dmeshtrade/type/v1/token.proto\"\xa7\x03\n\x17GetAccountReportRequest\x12\x39\n\x0e\x61\x63\x63ount_number\x18\x01 \x01(\tB\x12\xbaH\x0fr\r2\x0b^1[0-9]{6}$R\raccountNumber\x12\x45\n\x0cperiod_start\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\x0bperiodStart\x12\x41\n\nperiod_end\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tperiodEnd\x12T\n\x15reporting_asset_token\x18\x04 \x01(\x0b\x32\x18.meshtrade.type.v1.TokenB\x06\xbaH\x03\xc8\x01\x01R\x13reportingAssetToken:q\xbaHn\x1al\n\x18period.chronological.get\x12+period_end must be on or after period_start\x1a#this.period_end > this.period_start\"\xaf\x03\n\x1cGetExcelAccountReportRequest\x12\x39\n\x0e\x61\x63\x63ount_number\x18\x01 \x01(\tB\x12\xbaH\x0fr\r2\x0b^1[0-9]{6}$R\raccountNumber\x12\x45\n\x0cperiod_start\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\x0bperiodStart\x12\x41\n\nperiod_end\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xbaH\x03\xc8\x01\x01R\tperiodEnd\x12T\n\x15reporting_asset_token\x18\x04 \x01(\x0b\x32\x18.meshtrade.type.v1.TokenB\x06\xbaH\x03\xc8\x01\x01R\x13reportingAssetToken:t\xbaHq\x1ao\n\x1aperiod.chronological.excel\x12+period_end must be on or after period_start\x1a$this.period_end >= this.period_start\"B\n\x1dGetExcelAccountReportResponse\x12!\n\x0c\x65xcel_base64\x18\x01 \x01(\tR\x0b\x65xcelBase642\xee\x02\n\x14\x41\x63\x63ountReportService\x12\x9c\x01\n\x10GetAccountReport\x12>.meshtrade.reporting.account_report.v1.GetAccountReportRequest\x1a\x34.meshtrade.reporting.account_report.v1.AccountReport\"\x12\xb2\xb5\x18\x0e\x08\x01\x10\x02\x1a\x08\x80\x9b\xee\x02\x81\x9b\xee\x02\x12\xb6\x01\n\x15GetExcelAccountReport\x12\x43.meshtrade.reporting.account_report.v1.GetExcelAccountReportRequest\x1a\x44.meshtrade.reporting.account_report.v1.GetExcelAccountReportResponse\"\x12\xb2\xb5\x18\x0e\x08\x01\x10\x02\x1a\x08\x80\x9b\xee\x02\x81\x9b\xee\x02\x42y\n,co.meshtrade.api.reporting.account_report.v1ZIgithub.com/meshtrade/api/go/reporting/account_report/v1;account_report_v1b\x06proto3')
33
+
34
+ _globals = globals()
35
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
36
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtrade.reporting.account_report.v1.service_pb2', _globals)
37
+ if not _descriptor._USE_C_DESCRIPTORS:
38
+ _globals['DESCRIPTOR']._loaded_options = None
39
+ _globals['DESCRIPTOR']._serialized_options = b'\n,co.meshtrade.api.reporting.account_report.v1ZIgithub.com/meshtrade/api/go/reporting/account_report/v1;account_report_v1'
40
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['account_number']._loaded_options = None
41
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['account_number']._serialized_options = b'\272H\017r\r2\013^1[0-9]{6}$'
42
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['period_start']._loaded_options = None
43
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['period_start']._serialized_options = b'\272H\003\310\001\001'
44
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['period_end']._loaded_options = None
45
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['period_end']._serialized_options = b'\272H\003\310\001\001'
46
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['reporting_asset_token']._loaded_options = None
47
+ _globals['_GETACCOUNTREPORTREQUEST'].fields_by_name['reporting_asset_token']._serialized_options = b'\272H\003\310\001\001'
48
+ _globals['_GETACCOUNTREPORTREQUEST']._loaded_options = None
49
+ _globals['_GETACCOUNTREPORTREQUEST']._serialized_options = b'\272Hn\032l\n\030period.chronological.get\022+period_end must be on or after period_start\032#this.period_end > this.period_start'
50
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['account_number']._loaded_options = None
51
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['account_number']._serialized_options = b'\272H\017r\r2\013^1[0-9]{6}$'
52
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['period_start']._loaded_options = None
53
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['period_start']._serialized_options = b'\272H\003\310\001\001'
54
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['period_end']._loaded_options = None
55
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['period_end']._serialized_options = b'\272H\003\310\001\001'
56
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['reporting_asset_token']._loaded_options = None
57
+ _globals['_GETEXCELACCOUNTREPORTREQUEST'].fields_by_name['reporting_asset_token']._serialized_options = b'\272H\003\310\001\001'
58
+ _globals['_GETEXCELACCOUNTREPORTREQUEST']._loaded_options = None
59
+ _globals['_GETEXCELACCOUNTREPORTREQUEST']._serialized_options = b'\272Hq\032o\n\032period.chronological.excel\022+period_end must be on or after period_start\032$this.period_end >= this.period_start'
60
+ _globals['_ACCOUNTREPORTSERVICE'].methods_by_name['GetAccountReport']._loaded_options = None
61
+ _globals['_ACCOUNTREPORTSERVICE'].methods_by_name['GetAccountReport']._serialized_options = b'\262\265\030\016\010\001\020\002\032\010\200\233\356\002\201\233\356\002'
62
+ _globals['_ACCOUNTREPORTSERVICE'].methods_by_name['GetExcelAccountReport']._loaded_options = None
63
+ _globals['_ACCOUNTREPORTSERVICE'].methods_by_name['GetExcelAccountReport']._serialized_options = b'\262\265\030\016\010\001\020\002\032\010\200\233\356\002\201\233\356\002'
64
+ _globals['_GETACCOUNTREPORTREQUEST']._serialized_start=305
65
+ _globals['_GETACCOUNTREPORTREQUEST']._serialized_end=728
66
+ _globals['_GETEXCELACCOUNTREPORTREQUEST']._serialized_start=731
67
+ _globals['_GETEXCELACCOUNTREPORTREQUEST']._serialized_end=1162
68
+ _globals['_GETEXCELACCOUNTREPORTRESPONSE']._serialized_start=1164
69
+ _globals['_GETEXCELACCOUNTREPORTRESPONSE']._serialized_end=1230
70
+ _globals['_ACCOUNTREPORTSERVICE']._serialized_start=1233
71
+ _globals['_ACCOUNTREPORTSERVICE']._serialized_end=1599
72
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,43 @@
1
+ import datetime
2
+
3
+ from buf.validate import validate_pb2 as _validate_pb2
4
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
5
+ from meshtrade.option.method_options.v1 import method_options_pb2 as _method_options_pb2
6
+ from meshtrade.reporting.account_report.v1 import account_report_pb2 as _account_report_pb2
7
+ from meshtrade.type.v1 import token_pb2 as _token_pb2
8
+ from google.protobuf import descriptor as _descriptor
9
+ from google.protobuf import message as _message
10
+ from collections.abc import Mapping as _Mapping
11
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
12
+
13
+ DESCRIPTOR: _descriptor.FileDescriptor
14
+
15
+ class GetAccountReportRequest(_message.Message):
16
+ __slots__ = ("account_number", "period_start", "period_end", "reporting_asset_token")
17
+ ACCOUNT_NUMBER_FIELD_NUMBER: _ClassVar[int]
18
+ PERIOD_START_FIELD_NUMBER: _ClassVar[int]
19
+ PERIOD_END_FIELD_NUMBER: _ClassVar[int]
20
+ REPORTING_ASSET_TOKEN_FIELD_NUMBER: _ClassVar[int]
21
+ account_number: str
22
+ period_start: _timestamp_pb2.Timestamp
23
+ period_end: _timestamp_pb2.Timestamp
24
+ reporting_asset_token: _token_pb2.Token
25
+ def __init__(self, account_number: _Optional[str] = ..., period_start: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., period_end: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., reporting_asset_token: _Optional[_Union[_token_pb2.Token, _Mapping]] = ...) -> None: ...
26
+
27
+ class GetExcelAccountReportRequest(_message.Message):
28
+ __slots__ = ("account_number", "period_start", "period_end", "reporting_asset_token")
29
+ ACCOUNT_NUMBER_FIELD_NUMBER: _ClassVar[int]
30
+ PERIOD_START_FIELD_NUMBER: _ClassVar[int]
31
+ PERIOD_END_FIELD_NUMBER: _ClassVar[int]
32
+ REPORTING_ASSET_TOKEN_FIELD_NUMBER: _ClassVar[int]
33
+ account_number: str
34
+ period_start: _timestamp_pb2.Timestamp
35
+ period_end: _timestamp_pb2.Timestamp
36
+ reporting_asset_token: _token_pb2.Token
37
+ def __init__(self, account_number: _Optional[str] = ..., period_start: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., period_end: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., reporting_asset_token: _Optional[_Union[_token_pb2.Token, _Mapping]] = ...) -> None: ...
38
+
39
+ class GetExcelAccountReportResponse(_message.Message):
40
+ __slots__ = ("excel_base64",)
41
+ EXCEL_BASE64_FIELD_NUMBER: _ClassVar[int]
42
+ excel_base64: str
43
+ def __init__(self, excel_base64: _Optional[str] = ...) -> None: ...
@@ -0,0 +1,161 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from meshtrade.reporting.account_report.v1 import account_report_pb2 as meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2
6
+ from meshtrade.reporting.account_report.v1 import service_pb2 as meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2
7
+
8
+
9
+ class AccountReportServiceStub(object):
10
+ """
11
+ The AccountReportService provides endpoints for generating and exporting
12
+ comprehensive account activity reports.
13
+
14
+ Clients can use this service to retrieve structured reports containing income,
15
+ fees, and trading statements for a specified account and time period. All
16
+ financial values within the reports are denominated in a user-specified
17
+ reporting currency.
18
+
19
+ Access to all service methods requires appropriate Reporting domain permissions.
20
+ """
21
+
22
+ def __init__(self, channel):
23
+ """Constructor.
24
+
25
+ Args:
26
+ channel: A grpc.Channel.
27
+ """
28
+ self.GetAccountReport = channel.unary_unary(
29
+ '/meshtrade.reporting.account_report.v1.AccountReportService/GetAccountReport',
30
+ request_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetAccountReportRequest.SerializeToString,
31
+ response_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2.AccountReport.FromString,
32
+ _registered_method=True)
33
+ self.GetExcelAccountReport = channel.unary_unary(
34
+ '/meshtrade.reporting.account_report.v1.AccountReportService/GetExcelAccountReport',
35
+ request_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportRequest.SerializeToString,
36
+ response_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportResponse.FromString,
37
+ _registered_method=True)
38
+
39
+
40
+ class AccountReportServiceServicer(object):
41
+ """
42
+ The AccountReportService provides endpoints for generating and exporting
43
+ comprehensive account activity reports.
44
+
45
+ Clients can use this service to retrieve structured reports containing income,
46
+ fees, and trading statements for a specified account and time period. All
47
+ financial values within the reports are denominated in a user-specified
48
+ reporting currency.
49
+
50
+ Access to all service methods requires appropriate Reporting domain permissions.
51
+ """
52
+
53
+ def GetAccountReport(self, request, context):
54
+ """
55
+ Retrieves a structured account report.
56
+
57
+ Generates a detailed report for the given account and time range, with all
58
+ values denominated in the specified reporting asset token.
59
+ """
60
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
61
+ context.set_details('Method not implemented!')
62
+ raise NotImplementedError('Method not implemented!')
63
+
64
+ def GetExcelAccountReport(self, request, context):
65
+ """
66
+ Exports an account report as a downloadable Excel file.
67
+
68
+ Generates the same report as GetAccountReport but returns it as a
69
+ base64-encoded string representing an Excel (.xlsx) file.
70
+ """
71
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
72
+ context.set_details('Method not implemented!')
73
+ raise NotImplementedError('Method not implemented!')
74
+
75
+
76
+ def add_AccountReportServiceServicer_to_server(servicer, server):
77
+ rpc_method_handlers = {
78
+ 'GetAccountReport': grpc.unary_unary_rpc_method_handler(
79
+ servicer.GetAccountReport,
80
+ request_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetAccountReportRequest.FromString,
81
+ response_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2.AccountReport.SerializeToString,
82
+ ),
83
+ 'GetExcelAccountReport': grpc.unary_unary_rpc_method_handler(
84
+ servicer.GetExcelAccountReport,
85
+ request_deserializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportRequest.FromString,
86
+ response_serializer=meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportResponse.SerializeToString,
87
+ ),
88
+ }
89
+ generic_handler = grpc.method_handlers_generic_handler(
90
+ 'meshtrade.reporting.account_report.v1.AccountReportService', rpc_method_handlers)
91
+ server.add_generic_rpc_handlers((generic_handler,))
92
+ server.add_registered_method_handlers('meshtrade.reporting.account_report.v1.AccountReportService', rpc_method_handlers)
93
+
94
+
95
+ # This class is part of an EXPERIMENTAL API.
96
+ class AccountReportService(object):
97
+ """
98
+ The AccountReportService provides endpoints for generating and exporting
99
+ comprehensive account activity reports.
100
+
101
+ Clients can use this service to retrieve structured reports containing income,
102
+ fees, and trading statements for a specified account and time period. All
103
+ financial values within the reports are denominated in a user-specified
104
+ reporting currency.
105
+
106
+ Access to all service methods requires appropriate Reporting domain permissions.
107
+ """
108
+
109
+ @staticmethod
110
+ def GetAccountReport(request,
111
+ target,
112
+ options=(),
113
+ channel_credentials=None,
114
+ call_credentials=None,
115
+ insecure=False,
116
+ compression=None,
117
+ wait_for_ready=None,
118
+ timeout=None,
119
+ metadata=None):
120
+ return grpc.experimental.unary_unary(
121
+ request,
122
+ target,
123
+ '/meshtrade.reporting.account_report.v1.AccountReportService/GetAccountReport',
124
+ meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetAccountReportRequest.SerializeToString,
125
+ meshtrade_dot_reporting_dot_account__report_dot_v1_dot_account__report__pb2.AccountReport.FromString,
126
+ options,
127
+ channel_credentials,
128
+ insecure,
129
+ call_credentials,
130
+ compression,
131
+ wait_for_ready,
132
+ timeout,
133
+ metadata,
134
+ _registered_method=True)
135
+
136
+ @staticmethod
137
+ def GetExcelAccountReport(request,
138
+ target,
139
+ options=(),
140
+ channel_credentials=None,
141
+ call_credentials=None,
142
+ insecure=False,
143
+ compression=None,
144
+ wait_for_ready=None,
145
+ timeout=None,
146
+ metadata=None):
147
+ return grpc.experimental.unary_unary(
148
+ request,
149
+ target,
150
+ '/meshtrade.reporting.account_report.v1.AccountReportService/GetExcelAccountReport',
151
+ meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportRequest.SerializeToString,
152
+ meshtrade_dot_reporting_dot_account__report_dot_v1_dot_service__pb2.GetExcelAccountReportResponse.FromString,
153
+ options,
154
+ channel_credentials,
155
+ insecure,
156
+ call_credentials,
157
+ compression,
158
+ wait_for_ready,
159
+ timeout,
160
+ metadata,
161
+ _registered_method=True)