crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.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 (259) hide show
  1. crypticorn/__init__.py +3 -3
  2. crypticorn/auth/__init__.py +2 -0
  3. crypticorn/auth/client/__init__.py +112 -0
  4. crypticorn/auth/client/api/__init__.py +8 -0
  5. crypticorn/auth/client/api/admin_api.py +522 -0
  6. crypticorn/auth/client/api/auth_api.py +2089 -0
  7. crypticorn/auth/client/api/service_api.py +309 -0
  8. crypticorn/auth/client/api/user_api.py +2540 -0
  9. crypticorn/auth/client/api/wallet_api.py +1698 -0
  10. crypticorn/auth/client/api_client.py +758 -0
  11. crypticorn/auth/client/api_response.py +20 -0
  12. crypticorn/auth/client/configuration.py +584 -0
  13. crypticorn/auth/client/exceptions.py +220 -0
  14. crypticorn/auth/client/models/__init__.py +91 -0
  15. crypticorn/auth/client/models/add_wallet200_response.py +86 -0
  16. crypticorn/auth/client/models/add_wallet_request.py +107 -0
  17. crypticorn/auth/client/models/authorize_user200_response.py +107 -0
  18. crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
  19. crypticorn/auth/client/models/authorize_user_request.py +96 -0
  20. crypticorn/auth/client/models/create_user_request.py +114 -0
  21. crypticorn/auth/client/models/list_wallets200_response.py +137 -0
  22. crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
  23. crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
  24. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
  25. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
  26. crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
  27. crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
  28. crypticorn/auth/client/models/logout_default_response.py +108 -0
  29. crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
  30. crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
  31. crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
  32. crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
  33. crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
  34. crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
  35. crypticorn/auth/client/models/token_info200_response.py +97 -0
  36. crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
  37. crypticorn/auth/client/models/update_user_request.py +93 -0
  38. crypticorn/auth/client/models/user_reset_password_request.py +87 -0
  39. crypticorn/auth/client/models/user_set_password_request.py +89 -0
  40. crypticorn/auth/client/models/verify200_response.py +110 -0
  41. crypticorn/auth/client/models/verify_email200_response.py +107 -0
  42. crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
  43. crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
  44. crypticorn/auth/client/models/verify_email_request.py +83 -0
  45. crypticorn/auth/client/models/verify_wallet_request.py +91 -0
  46. crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
  47. crypticorn/auth/client/models/whoami200_response.py +104 -0
  48. crypticorn/auth/client/rest.py +195 -0
  49. crypticorn/auth/main.py +45 -0
  50. crypticorn/client.py +46 -8
  51. crypticorn/common/__init__.py +5 -0
  52. crypticorn/common/auth.py +43 -0
  53. crypticorn/common/auth_client.py +163 -0
  54. crypticorn/common/errors.py +432 -0
  55. crypticorn/common/scopes.py +29 -0
  56. crypticorn/common/urls.py +25 -0
  57. crypticorn/hive/__init__.py +2 -1
  58. crypticorn/hive/client/__init__.py +57 -0
  59. crypticorn/hive/client/api/__init__.py +6 -0
  60. crypticorn/hive/client/api/data_api.py +594 -0
  61. crypticorn/hive/client/api/models_api.py +1680 -0
  62. crypticorn/hive/client/api/status_api.py +263 -0
  63. crypticorn/hive/client/api_client.py +758 -0
  64. crypticorn/hive/client/api_response.py +20 -0
  65. crypticorn/hive/client/configuration.py +612 -0
  66. crypticorn/hive/client/exceptions.py +220 -0
  67. crypticorn/hive/client/models/__init__.py +38 -0
  68. crypticorn/hive/client/models/coins.py +44 -0
  69. crypticorn/hive/client/models/data_download_response.py +113 -0
  70. crypticorn/hive/client/models/data_info.py +115 -0
  71. crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
  72. crypticorn/hive/client/models/data_version.py +35 -0
  73. crypticorn/hive/client/models/download_links.py +91 -0
  74. crypticorn/hive/client/models/evaluation.py +86 -0
  75. crypticorn/hive/client/models/evaluation_response.py +85 -0
  76. crypticorn/hive/client/models/feature_size.py +36 -0
  77. crypticorn/hive/client/models/http_validation_error.py +99 -0
  78. crypticorn/hive/client/models/model.py +133 -0
  79. crypticorn/hive/client/models/model_create.py +93 -0
  80. crypticorn/hive/client/models/model_status.py +35 -0
  81. crypticorn/hive/client/models/model_update.py +83 -0
  82. crypticorn/hive/client/models/target.py +36 -0
  83. crypticorn/hive/client/models/target_type.py +35 -0
  84. crypticorn/hive/client/models/validation_error.py +105 -0
  85. crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
  86. crypticorn/hive/client/py.typed +0 -0
  87. crypticorn/hive/client/rest.py +195 -0
  88. crypticorn/hive/main.py +27 -100
  89. crypticorn/klines/client/__init__.py +21 -7
  90. crypticorn/klines/client/api/__init__.py +0 -1
  91. crypticorn/klines/client/api/funding_rates_api.py +90 -79
  92. crypticorn/klines/client/api/health_check_api.py +29 -45
  93. crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
  94. crypticorn/klines/client/api/symbols_api.py +36 -54
  95. crypticorn/klines/client/api/udf_api.py +228 -352
  96. crypticorn/klines/client/api_client.py +106 -148
  97. crypticorn/klines/client/api_response.py +2 -3
  98. crypticorn/klines/client/configuration.py +64 -50
  99. crypticorn/klines/client/exceptions.py +20 -16
  100. crypticorn/klines/client/models/__init__.py +21 -7
  101. crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
  102. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
  103. crypticorn/klines/client/models/base_response_list_str.py +16 -14
  104. crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
  105. crypticorn/klines/client/models/error_response.py +23 -15
  106. crypticorn/klines/client/models/exchange.py +11 -11
  107. crypticorn/klines/client/models/funding_rate_response.py +11 -11
  108. crypticorn/klines/client/models/health_check_response.py +14 -12
  109. crypticorn/klines/client/models/history_error_response.py +11 -11
  110. crypticorn/klines/client/models/history_no_data_response.py +16 -16
  111. crypticorn/klines/client/models/history_success_response.py +16 -16
  112. crypticorn/klines/client/models/http_validation_error.py +14 -10
  113. crypticorn/klines/client/models/market.py +2 -4
  114. crypticorn/klines/client/models/ohlcv_response.py +22 -15
  115. crypticorn/klines/client/models/resolution.py +5 -7
  116. crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
  117. crypticorn/klines/client/models/search_symbol_response.py +22 -15
  118. crypticorn/klines/client/models/sort_direction.py +2 -4
  119. crypticorn/klines/client/models/symbol_group_response.py +5 -9
  120. crypticorn/klines/client/models/symbol_info_response.py +40 -24
  121. crypticorn/klines/client/models/symbol_type.py +5 -10
  122. crypticorn/klines/client/models/timeframe.py +5 -7
  123. crypticorn/klines/client/models/udf_config_response.py +60 -21
  124. crypticorn/klines/client/models/validation_error.py +19 -13
  125. crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
  126. crypticorn/klines/client/rest.py +30 -41
  127. crypticorn/klines/main.py +52 -15
  128. crypticorn/pay/__init__.py +2 -0
  129. crypticorn/pay/client/__init__.py +52 -0
  130. crypticorn/pay/client/api/__init__.py +7 -0
  131. crypticorn/pay/client/api/now_payments_api.py +813 -0
  132. crypticorn/pay/client/api/payments_api.py +799 -0
  133. crypticorn/pay/client/api/products_api.py +891 -0
  134. crypticorn/pay/client/api/status_api.py +260 -0
  135. crypticorn/pay/client/api_client.py +758 -0
  136. crypticorn/pay/client/api_response.py +20 -0
  137. crypticorn/pay/client/configuration.py +612 -0
  138. crypticorn/pay/client/exceptions.py +220 -0
  139. crypticorn/pay/client/models/__init__.py +32 -0
  140. crypticorn/pay/client/models/api_status_res.py +83 -0
  141. crypticorn/pay/client/models/combined_payment_history.py +101 -0
  142. crypticorn/pay/client/models/create_invoice_req.py +188 -0
  143. crypticorn/pay/client/models/create_invoice_res.py +188 -0
  144. crypticorn/pay/client/models/currency.py +165 -0
  145. crypticorn/pay/client/models/estimate_price_req.py +91 -0
  146. crypticorn/pay/client/models/estimate_price_res.py +102 -0
  147. crypticorn/pay/client/models/get_currencies_res.py +99 -0
  148. crypticorn/pay/client/models/get_payment_status_res.py +222 -0
  149. crypticorn/pay/client/models/get_payments_list_res.py +109 -0
  150. crypticorn/pay/client/models/http_validation_error.py +99 -0
  151. crypticorn/pay/client/models/min_amount_req.py +124 -0
  152. crypticorn/pay/client/models/min_amount_res.py +105 -0
  153. crypticorn/pay/client/models/now_api_status_res.py +83 -0
  154. crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
  155. crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
  156. crypticorn/pay/client/models/now_fee_structure.py +104 -0
  157. crypticorn/pay/client/models/now_payment_model.py +124 -0
  158. crypticorn/pay/client/models/now_payment_status.py +42 -0
  159. crypticorn/pay/client/models/now_webhook_payload.py +181 -0
  160. crypticorn/pay/client/models/payment.py +231 -0
  161. crypticorn/pay/client/models/payment_status.py +40 -0
  162. crypticorn/pay/client/models/product.py +87 -0
  163. crypticorn/pay/client/models/product_model.py +119 -0
  164. crypticorn/pay/client/models/product_subs_model.py +108 -0
  165. crypticorn/pay/client/models/services.py +34 -0
  166. crypticorn/pay/client/models/unified_payment_model.py +112 -0
  167. crypticorn/pay/client/models/validation_error.py +105 -0
  168. crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
  169. crypticorn/pay/client/py.typed +0 -0
  170. crypticorn/pay/client/rest.py +195 -0
  171. crypticorn/pay/main.py +35 -0
  172. crypticorn/trade/client/__init__.py +9 -4
  173. crypticorn/trade/client/api/__init__.py +0 -1
  174. crypticorn/trade/client/api/api_keys_api.py +203 -304
  175. crypticorn/trade/client/api/bots_api.py +177 -250
  176. crypticorn/trade/client/api/exchanges_api.py +38 -57
  177. crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
  178. crypticorn/trade/client/api/notifications_api.py +247 -364
  179. crypticorn/trade/client/api/orders_api.py +44 -63
  180. crypticorn/trade/client/api/status_api.py +35 -53
  181. crypticorn/trade/client/api/strategies_api.py +852 -64
  182. crypticorn/trade/client/api/trading_actions_api.py +126 -203
  183. crypticorn/trade/client/api_client.py +115 -154
  184. crypticorn/trade/client/api_response.py +2 -3
  185. crypticorn/trade/client/configuration.py +128 -90
  186. crypticorn/trade/client/exceptions.py +21 -17
  187. crypticorn/trade/client/models/__init__.py +9 -4
  188. crypticorn/trade/client/models/action_model.py +114 -50
  189. crypticorn/trade/client/models/api_error_identifier.py +60 -51
  190. crypticorn/trade/client/models/api_error_level.py +37 -0
  191. crypticorn/trade/client/models/api_error_type.py +37 -0
  192. crypticorn/trade/client/models/api_key_model.py +49 -28
  193. crypticorn/trade/client/models/bot_model.py +76 -31
  194. crypticorn/trade/client/models/bot_status.py +37 -0
  195. crypticorn/trade/client/models/exchange.py +3 -5
  196. crypticorn/trade/client/models/execution_ids.py +14 -14
  197. crypticorn/trade/client/models/futures_balance.py +39 -23
  198. crypticorn/trade/client/models/futures_trading_action.py +98 -46
  199. crypticorn/trade/client/models/http_validation_error.py +15 -11
  200. crypticorn/trade/client/models/margin_mode.py +3 -5
  201. crypticorn/trade/client/models/market_type.py +3 -5
  202. crypticorn/trade/client/models/notification_model.py +60 -27
  203. crypticorn/trade/client/models/notification_type.py +4 -6
  204. crypticorn/trade/client/models/order_model.py +125 -65
  205. crypticorn/trade/client/models/order_status.py +6 -8
  206. crypticorn/trade/client/models/post_futures_action.py +16 -12
  207. crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
  208. crypticorn/trade/client/models/strategy_model.py +66 -27
  209. crypticorn/trade/client/models/strategy_model_input.py +160 -0
  210. crypticorn/trade/client/models/strategy_model_output.py +160 -0
  211. crypticorn/trade/client/models/tpsl.py +35 -21
  212. crypticorn/trade/client/models/trading_action_type.py +5 -7
  213. crypticorn/trade/client/models/update_notification.py +17 -13
  214. crypticorn/trade/client/models/validation_error.py +20 -14
  215. crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
  216. crypticorn/trade/client/rest.py +108 -170
  217. crypticorn/trade/main.py +26 -19
  218. crypticorn-2.0.0.dist-info/METADATA +74 -0
  219. crypticorn-2.0.0.dist-info/RECORD +226 -0
  220. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
  221. crypticorn/hive/requirements.txt +0 -4
  222. crypticorn/hive/utils.py +0 -109
  223. crypticorn/klines/requirements.txt +0 -4
  224. crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
  225. crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
  226. crypticorn/klines/test/test_base_response_list_str.py +0 -56
  227. crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
  228. crypticorn/klines/test/test_error_response.py +0 -57
  229. crypticorn/klines/test/test_exchange.py +0 -56
  230. crypticorn/klines/test/test_funding_rate_response.py +0 -56
  231. crypticorn/klines/test/test_funding_rates_api.py +0 -38
  232. crypticorn/klines/test/test_health_check_api.py +0 -38
  233. crypticorn/klines/test/test_health_check_response.py +0 -52
  234. crypticorn/klines/test/test_history_error_response.py +0 -53
  235. crypticorn/klines/test/test_history_no_data_response.py +0 -69
  236. crypticorn/klines/test/test_history_success_response.py +0 -87
  237. crypticorn/klines/test/test_http_validation_error.py +0 -58
  238. crypticorn/klines/test/test_market.py +0 -33
  239. crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
  240. crypticorn/klines/test/test_ohlcv_response.py +0 -86
  241. crypticorn/klines/test/test_resolution.py +0 -33
  242. crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
  243. crypticorn/klines/test/test_search_symbol_response.py +0 -62
  244. crypticorn/klines/test/test_sort_direction.py +0 -33
  245. crypticorn/klines/test/test_symbol_group_response.py +0 -53
  246. crypticorn/klines/test/test_symbol_info_response.py +0 -84
  247. crypticorn/klines/test/test_symbol_type.py +0 -54
  248. crypticorn/klines/test/test_symbols_api.py +0 -38
  249. crypticorn/klines/test/test_timeframe.py +0 -33
  250. crypticorn/klines/test/test_udf_api.py +0 -80
  251. crypticorn/klines/test/test_udf_config_response.py +0 -95
  252. crypticorn/klines/test/test_validation_error.py +0 -60
  253. crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
  254. crypticorn/trade/requirements.txt +0 -4
  255. crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
  256. crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
  257. crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
  258. /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
  259. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List
22
+ from crypticorn.auth.client.models.verify_email200_response_auth_auth import (
23
+ VerifyEmail200ResponseAuthAuth,
24
+ )
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+
29
+ class AuthorizeUser200ResponseAuth(BaseModel):
30
+ """
31
+ AuthorizeUser200ResponseAuth
32
+ """ # noqa: E501
33
+
34
+ access_token: StrictStr = Field(alias="accessToken")
35
+ refresh_token: StrictStr = Field(alias="refreshToken")
36
+ auth: VerifyEmail200ResponseAuthAuth
37
+ __properties: ClassVar[List[str]] = ["accessToken", "refreshToken", "auth"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of AuthorizeUser200ResponseAuth from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of auth
77
+ if self.auth:
78
+ _dict["auth"] = self.auth.to_dict()
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of AuthorizeUser200ResponseAuth from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate(
91
+ {
92
+ "accessToken": obj.get("accessToken"),
93
+ "refreshToken": obj.get("refreshToken"),
94
+ "auth": (
95
+ VerifyEmail200ResponseAuthAuth.from_dict(obj["auth"])
96
+ if obj.get("auth") is not None
97
+ else None
98
+ ),
99
+ }
100
+ )
101
+ return _obj
@@ -0,0 +1,96 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class AuthorizeUserRequest(BaseModel):
28
+ """
29
+ AuthorizeUserRequest
30
+ """ # noqa: E501
31
+
32
+ email: Annotated[str, Field(min_length=1, strict=True)]
33
+ password: Annotated[str, Field(min_length=1, strict=True)]
34
+ admin: Optional[StrictBool] = None
35
+ captcha_token: Annotated[str, Field(min_length=1, strict=True)] = Field(
36
+ alias="captchaToken"
37
+ )
38
+ __properties: ClassVar[List[str]] = ["email", "password", "admin", "captchaToken"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of AuthorizeUserRequest from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of AuthorizeUserRequest from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate(
89
+ {
90
+ "email": obj.get("email"),
91
+ "password": obj.get("password"),
92
+ "admin": obj.get("admin"),
93
+ "captchaToken": obj.get("captchaToken"),
94
+ }
95
+ )
96
+ return _obj
@@ -0,0 +1,114 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class CreateUserRequest(BaseModel):
28
+ """
29
+ CreateUserRequest
30
+ """ # noqa: E501
31
+
32
+ email: Annotated[str, Field(min_length=1, strict=True)]
33
+ password: Annotated[str, Field(min_length=8, strict=True)]
34
+ username: Optional[
35
+ Annotated[str, Field(min_length=3, strict=True, max_length=32)]
36
+ ] = None
37
+ name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
38
+ picture: Optional[StrictStr] = None
39
+ __properties: ClassVar[List[str]] = [
40
+ "email",
41
+ "password",
42
+ "username",
43
+ "name",
44
+ "picture",
45
+ ]
46
+
47
+ @field_validator("username")
48
+ def username_validate_regular_expression(cls, value):
49
+ """Validates the regular expression"""
50
+ if value is None:
51
+ return value
52
+
53
+ if not re.match(r"^[a-zA-Z0-9_]+$", value):
54
+ raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9_]+$/")
55
+ return value
56
+
57
+ model_config = ConfigDict(
58
+ populate_by_name=True,
59
+ validate_assignment=True,
60
+ protected_namespaces=(),
61
+ )
62
+
63
+ def to_str(self) -> str:
64
+ """Returns the string representation of the model using alias"""
65
+ return pprint.pformat(self.model_dump(by_alias=True))
66
+
67
+ def to_json(self) -> str:
68
+ """Returns the JSON representation of the model using alias"""
69
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
70
+ return json.dumps(self.to_dict())
71
+
72
+ @classmethod
73
+ def from_json(cls, json_str: str) -> Optional[Self]:
74
+ """Create an instance of CreateUserRequest from a JSON string"""
75
+ return cls.from_dict(json.loads(json_str))
76
+
77
+ def to_dict(self) -> Dict[str, Any]:
78
+ """Return the dictionary representation of the model using alias.
79
+
80
+ This has the following differences from calling pydantic's
81
+ `self.model_dump(by_alias=True)`:
82
+
83
+ * `None` is only added to the output dict for nullable fields that
84
+ were set at model initialization. Other fields with value `None`
85
+ are ignored.
86
+ """
87
+ excluded_fields: Set[str] = set([])
88
+
89
+ _dict = self.model_dump(
90
+ by_alias=True,
91
+ exclude=excluded_fields,
92
+ exclude_none=True,
93
+ )
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98
+ """Create an instance of CreateUserRequest from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return cls.model_validate(obj)
104
+
105
+ _obj = cls.model_validate(
106
+ {
107
+ "email": obj.get("email"),
108
+ "password": obj.get("password"),
109
+ "username": obj.get("username"),
110
+ "name": obj.get("name"),
111
+ "picture": obj.get("picture"),
112
+ }
113
+ )
114
+ return _obj
@@ -0,0 +1,137 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from crypticorn.auth.client.models.list_wallets200_response_balances_inner import (
23
+ ListWallets200ResponseBalancesInner,
24
+ )
25
+ from crypticorn.auth.client.models.list_wallets200_response_data_inner import (
26
+ ListWallets200ResponseDataInner,
27
+ )
28
+ from crypticorn.auth.client.models.list_wallets200_response_user_value import (
29
+ ListWallets200ResponseUserValue,
30
+ )
31
+ from typing import Optional, Set
32
+ from typing_extensions import Self
33
+
34
+
35
+ class ListWallets200Response(BaseModel):
36
+ """
37
+ ListWallets200Response
38
+ """ # noqa: E501
39
+
40
+ data: List[ListWallets200ResponseDataInner]
41
+ count: Union[StrictFloat, StrictInt]
42
+ balances: List[ListWallets200ResponseBalancesInner]
43
+ user_value: ListWallets200ResponseUserValue = Field(alias="userValue")
44
+ __properties: ClassVar[List[str]] = ["data", "count", "balances", "userValue"]
45
+
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of ListWallets200Response from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([])
77
+
78
+ _dict = self.model_dump(
79
+ by_alias=True,
80
+ exclude=excluded_fields,
81
+ exclude_none=True,
82
+ )
83
+ # override the default output from pydantic by calling `to_dict()` of each item in data (list)
84
+ _items = []
85
+ if self.data:
86
+ for _item_data in self.data:
87
+ if _item_data:
88
+ _items.append(_item_data.to_dict())
89
+ _dict["data"] = _items
90
+ # override the default output from pydantic by calling `to_dict()` of each item in balances (list)
91
+ _items = []
92
+ if self.balances:
93
+ for _item_balances in self.balances:
94
+ if _item_balances:
95
+ _items.append(_item_balances.to_dict())
96
+ _dict["balances"] = _items
97
+ # override the default output from pydantic by calling `to_dict()` of user_value
98
+ if self.user_value:
99
+ _dict["userValue"] = self.user_value.to_dict()
100
+ return _dict
101
+
102
+ @classmethod
103
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
104
+ """Create an instance of ListWallets200Response from a dict"""
105
+ if obj is None:
106
+ return None
107
+
108
+ if not isinstance(obj, dict):
109
+ return cls.model_validate(obj)
110
+
111
+ _obj = cls.model_validate(
112
+ {
113
+ "data": (
114
+ [
115
+ ListWallets200ResponseDataInner.from_dict(_item)
116
+ for _item in obj["data"]
117
+ ]
118
+ if obj.get("data") is not None
119
+ else None
120
+ ),
121
+ "count": obj.get("count"),
122
+ "balances": (
123
+ [
124
+ ListWallets200ResponseBalancesInner.from_dict(_item)
125
+ for _item in obj["balances"]
126
+ ]
127
+ if obj.get("balances") is not None
128
+ else None
129
+ ),
130
+ "userValue": (
131
+ ListWallets200ResponseUserValue.from_dict(obj["userValue"])
132
+ if obj.get("userValue") is not None
133
+ else None
134
+ ),
135
+ }
136
+ )
137
+ return _obj
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Union
22
+ from crypticorn.auth.client.models.list_wallets200_response_balances_inner_sale_round import (
23
+ ListWallets200ResponseBalancesInnerSaleRound,
24
+ )
25
+ from crypticorn.auth.client.models.list_wallets200_response_balances_inner_wallet import (
26
+ ListWallets200ResponseBalancesInnerWallet,
27
+ )
28
+ from typing import Optional, Set
29
+ from typing_extensions import Self
30
+
31
+
32
+ class ListWallets200ResponseBalancesInner(BaseModel):
33
+ """
34
+ ListWallets200ResponseBalancesInner
35
+ """ # noqa: E501
36
+
37
+ wallet: ListWallets200ResponseBalancesInnerWallet
38
+ sale_round: ListWallets200ResponseBalancesInnerSaleRound = Field(alias="saleRound")
39
+ value_usd: Union[StrictFloat, StrictInt] = Field(alias="valueUsd")
40
+ value_aic: Union[StrictFloat, StrictInt] = Field(alias="valueAic")
41
+ __properties: ClassVar[List[str]] = ["wallet", "saleRound", "valueUsd", "valueAic"]
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of ListWallets200ResponseBalancesInner from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([])
74
+
75
+ _dict = self.model_dump(
76
+ by_alias=True,
77
+ exclude=excluded_fields,
78
+ exclude_none=True,
79
+ )
80
+ # override the default output from pydantic by calling `to_dict()` of wallet
81
+ if self.wallet:
82
+ _dict["wallet"] = self.wallet.to_dict()
83
+ # override the default output from pydantic by calling `to_dict()` of sale_round
84
+ if self.sale_round:
85
+ _dict["saleRound"] = self.sale_round.to_dict()
86
+ return _dict
87
+
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of ListWallets200ResponseBalancesInner from a dict"""
91
+ if obj is None:
92
+ return None
93
+
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
96
+
97
+ _obj = cls.model_validate(
98
+ {
99
+ "wallet": (
100
+ ListWallets200ResponseBalancesInnerWallet.from_dict(obj["wallet"])
101
+ if obj.get("wallet") is not None
102
+ else None
103
+ ),
104
+ "saleRound": (
105
+ ListWallets200ResponseBalancesInnerSaleRound.from_dict(
106
+ obj["saleRound"]
107
+ )
108
+ if obj.get("saleRound") is not None
109
+ else None
110
+ ),
111
+ "valueUsd": obj.get("valueUsd"),
112
+ "valueAic": obj.get("valueAic"),
113
+ }
114
+ )
115
+ return _obj
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Crypticorn Auth API
5
+
6
+ OpenAPI compliant REST API built using tRPC with Express
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+
27
+ class ListWallets200ResponseBalancesInnerSaleRound(BaseModel):
28
+ """
29
+ ListWallets200ResponseBalancesInnerSaleRound
30
+ """ # noqa: E501
31
+
32
+ id: Union[StrictFloat, StrictInt]
33
+ name: StrictStr
34
+ price_usd: Union[StrictFloat, StrictInt] = Field(alias="priceUsd")
35
+ recommended_usd: Optional[Union[StrictFloat, StrictInt]] = Field(
36
+ default=None, alias="recommendedUsd"
37
+ )
38
+ contract_sales_to_date: Optional[Union[StrictFloat, StrictInt]] = Field(
39
+ default=None, alias="contractSalesToDate"
40
+ )
41
+ allocation: Union[StrictFloat, StrictInt]
42
+ start: datetime
43
+ state: StrictStr
44
+ __properties: ClassVar[List[str]] = [
45
+ "id",
46
+ "name",
47
+ "priceUsd",
48
+ "recommendedUsd",
49
+ "contractSalesToDate",
50
+ "allocation",
51
+ "start",
52
+ "state",
53
+ ]
54
+
55
+ model_config = ConfigDict(
56
+ populate_by_name=True,
57
+ validate_assignment=True,
58
+ protected_namespaces=(),
59
+ )
60
+
61
+ def to_str(self) -> str:
62
+ """Returns the string representation of the model using alias"""
63
+ return pprint.pformat(self.model_dump(by_alias=True))
64
+
65
+ def to_json(self) -> str:
66
+ """Returns the JSON representation of the model using alias"""
67
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
68
+ return json.dumps(self.to_dict())
69
+
70
+ @classmethod
71
+ def from_json(cls, json_str: str) -> Optional[Self]:
72
+ """Create an instance of ListWallets200ResponseBalancesInnerSaleRound from a JSON string"""
73
+ return cls.from_dict(json.loads(json_str))
74
+
75
+ def to_dict(self) -> Dict[str, Any]:
76
+ """Return the dictionary representation of the model using alias.
77
+
78
+ This has the following differences from calling pydantic's
79
+ `self.model_dump(by_alias=True)`:
80
+
81
+ * `None` is only added to the output dict for nullable fields that
82
+ were set at model initialization. Other fields with value `None`
83
+ are ignored.
84
+ """
85
+ excluded_fields: Set[str] = set([])
86
+
87
+ _dict = self.model_dump(
88
+ by_alias=True,
89
+ exclude=excluded_fields,
90
+ exclude_none=True,
91
+ )
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
+ """Create an instance of ListWallets200ResponseBalancesInnerSaleRound from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate(
104
+ {
105
+ "id": obj.get("id"),
106
+ "name": obj.get("name"),
107
+ "priceUsd": obj.get("priceUsd"),
108
+ "recommendedUsd": obj.get("recommendedUsd"),
109
+ "contractSalesToDate": obj.get("contractSalesToDate"),
110
+ "allocation": obj.get("allocation"),
111
+ "start": obj.get("start"),
112
+ "state": obj.get("state"),
113
+ }
114
+ )
115
+ return _obj