appwrite-console 0.1.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 (552) hide show
  1. appwrite_console/__init__.py +1 -0
  2. appwrite_console/client.py +371 -0
  3. appwrite_console/encoders/__init__.py +1 -0
  4. appwrite_console/encoders/value_class_encoder.py +373 -0
  5. appwrite_console/enums/__init__.py +1 -0
  6. appwrite_console/enums/account_key_scopes.py +6 -0
  7. appwrite_console/enums/adapter.py +5 -0
  8. appwrite_console/enums/addon.py +7 -0
  9. appwrite_console/enums/appwrite_migration_resource.py +42 -0
  10. appwrite_console/enums/attribute_status.py +8 -0
  11. appwrite_console/enums/authentication_factor.py +7 -0
  12. appwrite_console/enums/authenticator_type.py +4 -0
  13. appwrite_console/enums/backup_services.py +10 -0
  14. appwrite_console/enums/billing_plan_group.py +6 -0
  15. appwrite_console/enums/block_mode.py +5 -0
  16. appwrite_console/enums/block_resource_type.py +12 -0
  17. appwrite_console/enums/browser.py +17 -0
  18. appwrite_console/enums/browser_permission.py +23 -0
  19. appwrite_console/enums/browser_theme.py +5 -0
  20. appwrite_console/enums/build_runtime.py +95 -0
  21. appwrite_console/enums/cache_database.py +6 -0
  22. appwrite_console/enums/cache_target.py +9 -0
  23. appwrite_console/enums/column_status.py +8 -0
  24. appwrite_console/enums/compression.py +6 -0
  25. appwrite_console/enums/console_resource_type.py +4 -0
  26. appwrite_console/enums/credit_card.py +20 -0
  27. appwrite_console/enums/database_status.py +17 -0
  28. appwrite_console/enums/database_type.py +10 -0
  29. appwrite_console/enums/databases_index_type.py +7 -0
  30. appwrite_console/enums/deployment_download_type.py +5 -0
  31. appwrite_console/enums/deployment_status.py +9 -0
  32. appwrite_console/enums/detection_framework_type.py +4 -0
  33. appwrite_console/enums/detection_runtime_type.py +4 -0
  34. appwrite_console/enums/documents_db_index_type.py +6 -0
  35. appwrite_console/enums/domain_purchase_status.py +7 -0
  36. appwrite_console/enums/domain_registration_type.py +7 -0
  37. appwrite_console/enums/domain_suggestion_type.py +5 -0
  38. appwrite_console/enums/domain_transfer_status_enum.py +11 -0
  39. appwrite_console/enums/embedding_model.py +7 -0
  40. appwrite_console/enums/execution_method.py +10 -0
  41. appwrite_console/enums/execution_status.py +8 -0
  42. appwrite_console/enums/execution_trigger.py +6 -0
  43. appwrite_console/enums/firebase_migration_resource.py +13 -0
  44. appwrite_console/enums/flag.py +198 -0
  45. appwrite_console/enums/framework.py +18 -0
  46. appwrite_console/enums/function_template_use_case.py +10 -0
  47. appwrite_console/enums/image_format.py +10 -0
  48. appwrite_console/enums/image_gravity.py +12 -0
  49. appwrite_console/enums/index_status.py +8 -0
  50. appwrite_console/enums/message_priority.py +5 -0
  51. appwrite_console/enums/message_status.py +8 -0
  52. appwrite_console/enums/messaging_provider_type.py +6 -0
  53. appwrite_console/enums/n_host_migration_resource.py +14 -0
  54. appwrite_console/enums/o_auth2_google_prompt.py +6 -0
  55. appwrite_console/enums/o_auth2_oidc_prompt.py +7 -0
  56. appwrite_console/enums/o_auth_provider.py +47 -0
  57. appwrite_console/enums/on_duplicate.py +6 -0
  58. appwrite_console/enums/order_by.py +5 -0
  59. appwrite_console/enums/organization_key_scopes.py +19 -0
  60. appwrite_console/enums/password_hash.py +14 -0
  61. appwrite_console/enums/platform.py +5 -0
  62. appwrite_console/enums/platform_type.py +8 -0
  63. appwrite_console/enums/project_auth_method_id.py +10 -0
  64. appwrite_console/enums/project_email_template_id.py +10 -0
  65. appwrite_console/enums/project_email_template_locale.py +134 -0
  66. appwrite_console/enums/project_key_scopes.py +107 -0
  67. appwrite_console/enums/project_o_auth2_google_prompt.py +6 -0
  68. appwrite_console/enums/project_o_auth2_oidc_prompt.py +7 -0
  69. appwrite_console/enums/project_o_auth_provider_id.py +47 -0
  70. appwrite_console/enums/project_policy_id.py +17 -0
  71. appwrite_console/enums/project_protocol_id.py +6 -0
  72. appwrite_console/enums/project_service_id.py +22 -0
  73. appwrite_console/enums/project_smtp_secure.py +5 -0
  74. appwrite_console/enums/project_usage_range.py +5 -0
  75. appwrite_console/enums/proxy_resource_type.py +5 -0
  76. appwrite_console/enums/proxy_rule_deployment_resource_type.py +5 -0
  77. appwrite_console/enums/proxy_rule_status.py +6 -0
  78. appwrite_console/enums/query_suggestion_resource.py +97 -0
  79. appwrite_console/enums/region.py +9 -0
  80. appwrite_console/enums/relation_mutate.py +6 -0
  81. appwrite_console/enums/relationship_type.py +7 -0
  82. appwrite_console/enums/runtime.py +95 -0
  83. appwrite_console/enums/schedule_resource_type.py +7 -0
  84. appwrite_console/enums/site_template_use_case.py +12 -0
  85. appwrite_console/enums/smtp_encryption.py +6 -0
  86. appwrite_console/enums/status.py +4 -0
  87. appwrite_console/enums/status_code.py +7 -0
  88. appwrite_console/enums/supabase_migration_resource.py +14 -0
  89. appwrite_console/enums/tables_db_index_type.py +7 -0
  90. appwrite_console/enums/template_reference_type.py +6 -0
  91. appwrite_console/enums/timezone.py +422 -0
  92. appwrite_console/enums/usage_range.py +6 -0
  93. appwrite_console/enums/vcs_detection_type.py +5 -0
  94. appwrite_console/enums/vcs_reference_type.py +6 -0
  95. appwrite_console/enums/vectors_db_index_type.py +9 -0
  96. appwrite_console/enums/waf_rule_action.py +8 -0
  97. appwrite_console/exception.py +7 -0
  98. appwrite_console/id.py +26 -0
  99. appwrite_console/input_file.py +21 -0
  100. appwrite_console/models/__init__.py +803 -0
  101. appwrite_console/models/activity_event.py +99 -0
  102. appwrite_console/models/activity_event_list.py +19 -0
  103. appwrite_console/models/additional_resource.py +30 -0
  104. appwrite_console/models/addon.py +42 -0
  105. appwrite_console/models/addon_list.py +19 -0
  106. appwrite_console/models/addon_price.py +36 -0
  107. appwrite_console/models/aggregation_breakdown.py +28 -0
  108. appwrite_console/models/aggregation_team.py +101 -0
  109. appwrite_console/models/aggregation_team_list.py +19 -0
  110. appwrite_console/models/algo_argon2.py +24 -0
  111. appwrite_console/models/algo_bcrypt.py +15 -0
  112. appwrite_console/models/algo_md5.py +15 -0
  113. appwrite_console/models/algo_phpass.py +15 -0
  114. appwrite_console/models/algo_scrypt.py +27 -0
  115. appwrite_console/models/algo_scrypt_modified.py +24 -0
  116. appwrite_console/models/algo_sha.py +15 -0
  117. appwrite_console/models/app.py +91 -0
  118. appwrite_console/models/app_installation.py +42 -0
  119. appwrite_console/models/app_installation_list.py +19 -0
  120. appwrite_console/models/app_key.py +39 -0
  121. appwrite_console/models/app_key_list.py +19 -0
  122. appwrite_console/models/app_scope.py +27 -0
  123. appwrite_console/models/app_scope_list.py +19 -0
  124. appwrite_console/models/app_secret.py +39 -0
  125. appwrite_console/models/app_secret_list.py +19 -0
  126. appwrite_console/models/app_secret_plaintext.py +39 -0
  127. appwrite_console/models/apps_list.py +19 -0
  128. appwrite_console/models/attribute_bigint.py +46 -0
  129. appwrite_console/models/attribute_boolean.py +40 -0
  130. appwrite_console/models/attribute_datetime.py +43 -0
  131. appwrite_console/models/attribute_email.py +43 -0
  132. appwrite_console/models/attribute_enum.py +46 -0
  133. appwrite_console/models/attribute_float.py +46 -0
  134. appwrite_console/models/attribute_integer.py +46 -0
  135. appwrite_console/models/attribute_ip.py +43 -0
  136. appwrite_console/models/attribute_line.py +40 -0
  137. appwrite_console/models/attribute_list.py +36 -0
  138. appwrite_console/models/attribute_longtext.py +43 -0
  139. appwrite_console/models/attribute_mediumtext.py +43 -0
  140. appwrite_console/models/attribute_object.py +37 -0
  141. appwrite_console/models/attribute_point.py +40 -0
  142. appwrite_console/models/attribute_polygon.py +40 -0
  143. appwrite_console/models/attribute_relationship.py +55 -0
  144. appwrite_console/models/attribute_string.py +46 -0
  145. appwrite_console/models/attribute_text.py +43 -0
  146. appwrite_console/models/attribute_url.py +43 -0
  147. appwrite_console/models/attribute_varchar.py +46 -0
  148. appwrite_console/models/attribute_vector.py +40 -0
  149. appwrite_console/models/backup_archive.py +48 -0
  150. appwrite_console/models/backup_archive_list.py +19 -0
  151. appwrite_console/models/backup_policy.py +48 -0
  152. appwrite_console/models/backup_policy_list.py +19 -0
  153. appwrite_console/models/backup_restoration.py +45 -0
  154. appwrite_console/models/backup_restoration_list.py +19 -0
  155. appwrite_console/models/base_model.py +27 -0
  156. appwrite_console/models/billing_address.py +36 -0
  157. appwrite_console/models/billing_address_list.py +19 -0
  158. appwrite_console/models/billing_limits.py +36 -0
  159. appwrite_console/models/billing_plan.py +226 -0
  160. appwrite_console/models/billing_plan_addon.py +19 -0
  161. appwrite_console/models/billing_plan_addon_details.py +36 -0
  162. appwrite_console/models/billing_plan_dedicated_database_limits.py +69 -0
  163. appwrite_console/models/billing_plan_limits.py +18 -0
  164. appwrite_console/models/billing_plan_list.py +19 -0
  165. appwrite_console/models/billing_plan_supported_addons.py +21 -0
  166. appwrite_console/models/block.py +45 -0
  167. appwrite_console/models/block_delete.py +19 -0
  168. appwrite_console/models/block_list.py +19 -0
  169. appwrite_console/models/branch.py +15 -0
  170. appwrite_console/models/branch_list.py +19 -0
  171. appwrite_console/models/bucket.py +54 -0
  172. appwrite_console/models/bucket_list.py +19 -0
  173. appwrite_console/models/campaign.py +49 -0
  174. appwrite_console/models/collection.py +67 -0
  175. appwrite_console/models/collection_list.py +19 -0
  176. appwrite_console/models/column_bigint.py +46 -0
  177. appwrite_console/models/column_boolean.py +40 -0
  178. appwrite_console/models/column_datetime.py +43 -0
  179. appwrite_console/models/column_email.py +43 -0
  180. appwrite_console/models/column_enum.py +46 -0
  181. appwrite_console/models/column_float.py +46 -0
  182. appwrite_console/models/column_index.py +42 -0
  183. appwrite_console/models/column_index_list.py +19 -0
  184. appwrite_console/models/column_integer.py +46 -0
  185. appwrite_console/models/column_ip.py +43 -0
  186. appwrite_console/models/column_line.py +40 -0
  187. appwrite_console/models/column_list.py +36 -0
  188. appwrite_console/models/column_longtext.py +43 -0
  189. appwrite_console/models/column_mediumtext.py +43 -0
  190. appwrite_console/models/column_point.py +40 -0
  191. appwrite_console/models/column_polygon.py +40 -0
  192. appwrite_console/models/column_relationship.py +55 -0
  193. appwrite_console/models/column_string.py +46 -0
  194. appwrite_console/models/column_text.py +43 -0
  195. appwrite_console/models/column_url.py +43 -0
  196. appwrite_console/models/column_varchar.py +46 -0
  197. appwrite_console/models/console_key_scope.py +24 -0
  198. appwrite_console/models/console_key_scope_list.py +19 -0
  199. appwrite_console/models/console_o_auth2_provider.py +19 -0
  200. appwrite_console/models/console_o_auth2_provider_list.py +19 -0
  201. appwrite_console/models/console_o_auth2_provider_parameter.py +24 -0
  202. appwrite_console/models/console_region.py +30 -0
  203. appwrite_console/models/console_region_list.py +19 -0
  204. appwrite_console/models/console_variables.py +96 -0
  205. appwrite_console/models/continent.py +18 -0
  206. appwrite_console/models/continent_list.py +19 -0
  207. appwrite_console/models/country.py +18 -0
  208. appwrite_console/models/country_list.py +19 -0
  209. appwrite_console/models/coupon.py +36 -0
  210. appwrite_console/models/credit.py +45 -0
  211. appwrite_console/models/credit_available.py +15 -0
  212. appwrite_console/models/credit_list.py +22 -0
  213. appwrite_console/models/currency.py +33 -0
  214. appwrite_console/models/currency_list.py +19 -0
  215. appwrite_console/models/database.py +52 -0
  216. appwrite_console/models/database_list.py +19 -0
  217. appwrite_console/models/database_migration.py +57 -0
  218. appwrite_console/models/database_migration_list.py +19 -0
  219. appwrite_console/models/database_status.py +57 -0
  220. appwrite_console/models/database_status_connections.py +18 -0
  221. appwrite_console/models/database_status_replica.py +24 -0
  222. appwrite_console/models/database_status_volume.py +24 -0
  223. appwrite_console/models/dedicated_database.py +159 -0
  224. appwrite_console/models/dedicated_database_backup.py +63 -0
  225. appwrite_console/models/dedicated_database_backup_list.py +19 -0
  226. appwrite_console/models/dedicated_database_backup_storage.py +27 -0
  227. appwrite_console/models/dedicated_database_branch.py +48 -0
  228. appwrite_console/models/dedicated_database_branch_list.py +16 -0
  229. appwrite_console/models/dedicated_database_execution.py +31 -0
  230. appwrite_console/models/dedicated_database_execution_column.py +18 -0
  231. appwrite_console/models/dedicated_database_extensions.py +22 -0
  232. appwrite_console/models/dedicated_database_list.py +19 -0
  233. appwrite_console/models/dedicated_database_member.py +24 -0
  234. appwrite_console/models/dedicated_database_operation.py +45 -0
  235. appwrite_console/models/dedicated_database_operation_list.py +19 -0
  236. appwrite_console/models/dedicated_database_pitr_windows.py +18 -0
  237. appwrite_console/models/dedicated_database_pooler.py +42 -0
  238. appwrite_console/models/dedicated_database_replicas.py +37 -0
  239. appwrite_console/models/dedicated_database_restoration.py +45 -0
  240. appwrite_console/models/dedicated_database_restoration_list.py +19 -0
  241. appwrite_console/models/dedicated_database_specification.py +39 -0
  242. appwrite_console/models/dedicated_database_specification_list.py +23 -0
  243. appwrite_console/models/dedicated_database_specification_pricing.py +27 -0
  244. appwrite_console/models/deployment.py +94 -0
  245. appwrite_console/models/deployment_list.py +19 -0
  246. appwrite_console/models/detection_framework.py +32 -0
  247. appwrite_console/models/detection_runtime.py +29 -0
  248. appwrite_console/models/detection_variable.py +18 -0
  249. appwrite_console/models/dev_key.py +36 -0
  250. appwrite_console/models/dev_key_list.py +19 -0
  251. appwrite_console/models/dns_record.py +48 -0
  252. appwrite_console/models/dns_records_list.py +19 -0
  253. appwrite_console/models/document.py +80 -0
  254. appwrite_console/models/document_list.py +32 -0
  255. appwrite_console/models/domain.py +53 -0
  256. appwrite_console/models/domain_price.py +30 -0
  257. appwrite_console/models/domain_purchase.py +43 -0
  258. appwrite_console/models/domain_suggestion.py +24 -0
  259. appwrite_console/models/domain_suggestions_list.py +19 -0
  260. appwrite_console/models/domain_transfer_out.py +15 -0
  261. appwrite_console/models/domain_transfer_status.py +22 -0
  262. appwrite_console/models/domains_list.py +19 -0
  263. appwrite_console/models/downgrade_feedback.py +42 -0
  264. appwrite_console/models/email_template.py +36 -0
  265. appwrite_console/models/email_template_list.py +19 -0
  266. appwrite_console/models/embedding.py +24 -0
  267. appwrite_console/models/embedding_list.py +19 -0
  268. appwrite_console/models/ephemeral_key.py +39 -0
  269. appwrite_console/models/estimation.py +37 -0
  270. appwrite_console/models/estimation_delete_organization.py +16 -0
  271. appwrite_console/models/estimation_item.py +18 -0
  272. appwrite_console/models/estimation_plan_change.py +29 -0
  273. appwrite_console/models/estimation_update_plan.py +40 -0
  274. appwrite_console/models/execution.py +69 -0
  275. appwrite_console/models/execution_list.py +19 -0
  276. appwrite_console/models/file.py +60 -0
  277. appwrite_console/models/file_list.py +19 -0
  278. appwrite_console/models/framework.py +28 -0
  279. appwrite_console/models/framework_adapter.py +27 -0
  280. appwrite_console/models/framework_list.py +19 -0
  281. appwrite_console/models/function.py +109 -0
  282. appwrite_console/models/function_list.py +19 -0
  283. appwrite_console/models/headers.py +18 -0
  284. appwrite_console/models/identity.py +42 -0
  285. appwrite_console/models/identity_list.py +19 -0
  286. appwrite_console/models/index.py +43 -0
  287. appwrite_console/models/index_list.py +19 -0
  288. appwrite_console/models/insight.py +64 -0
  289. appwrite_console/models/insight_cta.py +24 -0
  290. appwrite_console/models/insight_list.py +19 -0
  291. appwrite_console/models/installation.py +30 -0
  292. appwrite_console/models/installation_list.py +19 -0
  293. appwrite_console/models/invoice.py +82 -0
  294. appwrite_console/models/invoice_list.py +19 -0
  295. appwrite_console/models/jwt.py +15 -0
  296. appwrite_console/models/key.py +39 -0
  297. appwrite_console/models/key_list.py +19 -0
  298. appwrite_console/models/language.py +21 -0
  299. appwrite_console/models/language_list.py +19 -0
  300. appwrite_console/models/locale.py +66 -0
  301. appwrite_console/models/locale_code.py +18 -0
  302. appwrite_console/models/locale_code_list.py +19 -0
  303. appwrite_console/models/log.py +78 -0
  304. appwrite_console/models/log_list.py +19 -0
  305. appwrite_console/models/membership.py +57 -0
  306. appwrite_console/models/membership_list.py +19 -0
  307. appwrite_console/models/message.py +52 -0
  308. appwrite_console/models/message_list.py +19 -0
  309. appwrite_console/models/metric.py +18 -0
  310. appwrite_console/models/metric_breakdown.py +24 -0
  311. appwrite_console/models/mfa_challenge.py +24 -0
  312. appwrite_console/models/mfa_factors.py +24 -0
  313. appwrite_console/models/mfa_recovery_codes.py +15 -0
  314. appwrite_console/models/mfa_type.py +18 -0
  315. appwrite_console/models/migration.py +75 -0
  316. appwrite_console/models/migration_list.py +19 -0
  317. appwrite_console/models/migration_report.py +96 -0
  318. appwrite_console/models/mock_number.py +24 -0
  319. appwrite_console/models/mock_number_list.py +19 -0
  320. appwrite_console/models/notification.py +60 -0
  321. appwrite_console/models/notification_list.py +19 -0
  322. appwrite_console/models/o_auth2_amazon.py +24 -0
  323. appwrite_console/models/o_auth2_apple.py +30 -0
  324. appwrite_console/models/o_auth2_appwrite.py +24 -0
  325. appwrite_console/models/o_auth2_auth0.py +27 -0
  326. appwrite_console/models/o_auth2_authentik.py +27 -0
  327. appwrite_console/models/o_auth2_autodesk.py +24 -0
  328. appwrite_console/models/o_auth2_bitbucket.py +24 -0
  329. appwrite_console/models/o_auth2_bitly.py +24 -0
  330. appwrite_console/models/o_auth2_box.py +24 -0
  331. appwrite_console/models/o_auth2_dailymotion.py +24 -0
  332. appwrite_console/models/o_auth2_discord.py +24 -0
  333. appwrite_console/models/o_auth2_disqus.py +24 -0
  334. appwrite_console/models/o_auth2_dropbox.py +24 -0
  335. appwrite_console/models/o_auth2_etsy.py +24 -0
  336. appwrite_console/models/o_auth2_facebook.py +24 -0
  337. appwrite_console/models/o_auth2_figma.py +24 -0
  338. appwrite_console/models/o_auth2_fusion_auth.py +27 -0
  339. appwrite_console/models/o_auth2_github.py +24 -0
  340. appwrite_console/models/o_auth2_gitlab.py +27 -0
  341. appwrite_console/models/o_auth2_google.py +28 -0
  342. appwrite_console/models/o_auth2_keycloak.py +30 -0
  343. appwrite_console/models/o_auth2_kick.py +24 -0
  344. appwrite_console/models/o_auth2_linkedin.py +24 -0
  345. appwrite_console/models/o_auth2_microsoft.py +27 -0
  346. appwrite_console/models/o_auth2_notion.py +24 -0
  347. appwrite_console/models/o_auth2_oidc.py +43 -0
  348. appwrite_console/models/o_auth2_okta.py +30 -0
  349. appwrite_console/models/o_auth2_paypal.py +24 -0
  350. appwrite_console/models/o_auth2_podio.py +24 -0
  351. appwrite_console/models/o_auth2_provider_list.py +59 -0
  352. appwrite_console/models/o_auth2_salesforce.py +24 -0
  353. appwrite_console/models/o_auth2_slack.py +24 -0
  354. appwrite_console/models/o_auth2_spotify.py +24 -0
  355. appwrite_console/models/o_auth2_stripe.py +24 -0
  356. appwrite_console/models/o_auth2_tradeshift.py +24 -0
  357. appwrite_console/models/o_auth2_twitch.py +24 -0
  358. appwrite_console/models/o_auth2_word_press.py +24 -0
  359. appwrite_console/models/o_auth2_x.py +24 -0
  360. appwrite_console/models/o_auth2_yahoo.py +24 -0
  361. appwrite_console/models/o_auth2_yandex.py +24 -0
  362. appwrite_console/models/o_auth2_zoho.py +24 -0
  363. appwrite_console/models/o_auth2_zoom.py +24 -0
  364. appwrite_console/models/oauth2_approve.py +15 -0
  365. appwrite_console/models/oauth2_authorize.py +18 -0
  366. appwrite_console/models/oauth2_consent.py +42 -0
  367. appwrite_console/models/oauth2_consent_list.py +19 -0
  368. appwrite_console/models/oauth2_consent_token.py +45 -0
  369. appwrite_console/models/oauth2_consent_token_list.py +19 -0
  370. appwrite_console/models/oauth2_device_authorization.py +30 -0
  371. appwrite_console/models/oauth2_grant.py +48 -0
  372. appwrite_console/models/oauth2_organization.py +15 -0
  373. appwrite_console/models/oauth2_organization_list.py +19 -0
  374. appwrite_console/models/oauth2_par.py +18 -0
  375. appwrite_console/models/oauth2_project.py +21 -0
  376. appwrite_console/models/oauth2_project_list.py +19 -0
  377. appwrite_console/models/oauth2_reject.py +15 -0
  378. appwrite_console/models/oauth2_token.py +33 -0
  379. appwrite_console/models/organization.py +132 -0
  380. appwrite_console/models/organization_list.py +32 -0
  381. appwrite_console/models/payment_authentication.py +30 -0
  382. appwrite_console/models/payment_method.py +72 -0
  383. appwrite_console/models/payment_method_list.py +19 -0
  384. appwrite_console/models/phone.py +21 -0
  385. appwrite_console/models/phone_list.py +19 -0
  386. appwrite_console/models/plan_change_estimation_details.py +39 -0
  387. appwrite_console/models/plan_change_limits.py +28 -0
  388. appwrite_console/models/plan_change_project_compliance.py +28 -0
  389. appwrite_console/models/plan_change_resource_compliance.py +30 -0
  390. appwrite_console/models/platform_android.py +31 -0
  391. appwrite_console/models/platform_apple.py +31 -0
  392. appwrite_console/models/platform_linux.py +31 -0
  393. appwrite_console/models/platform_list.py +23 -0
  394. appwrite_console/models/platform_web.py +31 -0
  395. appwrite_console/models/platform_windows.py +31 -0
  396. appwrite_console/models/policy_deny_aliased_email.py +18 -0
  397. appwrite_console/models/policy_deny_corporate_email.py +18 -0
  398. appwrite_console/models/policy_deny_disposable_email.py +18 -0
  399. appwrite_console/models/policy_deny_free_email.py +18 -0
  400. appwrite_console/models/policy_list.py +32 -0
  401. appwrite_console/models/policy_membership_privacy.py +33 -0
  402. appwrite_console/models/policy_password_dictionary.py +18 -0
  403. appwrite_console/models/policy_password_history.py +18 -0
  404. appwrite_console/models/policy_password_personal_data.py +18 -0
  405. appwrite_console/models/policy_password_strength.py +30 -0
  406. appwrite_console/models/policy_session_alert.py +18 -0
  407. appwrite_console/models/policy_session_duration.py +18 -0
  408. appwrite_console/models/policy_session_invalidation.py +18 -0
  409. appwrite_console/models/policy_session_limit.py +18 -0
  410. appwrite_console/models/policy_user_limit.py +18 -0
  411. appwrite_console/models/postgres_extension.py +24 -0
  412. appwrite_console/models/postgres_extension_list.py +19 -0
  413. appwrite_console/models/preferences.py +52 -0
  414. appwrite_console/models/presence.py +39 -0
  415. appwrite_console/models/presence_list.py +19 -0
  416. appwrite_console/models/program.py +39 -0
  417. appwrite_console/models/project.py +153 -0
  418. appwrite_console/models/project_auth_method.py +19 -0
  419. appwrite_console/models/project_list.py +19 -0
  420. appwrite_console/models/project_protocol.py +19 -0
  421. appwrite_console/models/project_service.py +19 -0
  422. appwrite_console/models/provider.py +39 -0
  423. appwrite_console/models/provider_list.py +19 -0
  424. appwrite_console/models/provider_repository.py +42 -0
  425. appwrite_console/models/provider_repository_framework.py +45 -0
  426. appwrite_console/models/provider_repository_framework_list.py +22 -0
  427. appwrite_console/models/provider_repository_runtime.py +45 -0
  428. appwrite_console/models/provider_repository_runtime_list.py +22 -0
  429. appwrite_console/models/proxy_rule.py +59 -0
  430. appwrite_console/models/proxy_rule_list.py +19 -0
  431. appwrite_console/models/report.py +49 -0
  432. appwrite_console/models/report_list.py +19 -0
  433. appwrite_console/models/resource_token.py +33 -0
  434. appwrite_console/models/resource_token_list.py +19 -0
  435. appwrite_console/models/review.py +24 -0
  436. appwrite_console/models/roles.py +18 -0
  437. appwrite_console/models/row.py +80 -0
  438. appwrite_console/models/row_list.py +32 -0
  439. appwrite_console/models/runtime.py +36 -0
  440. appwrite_console/models/runtime_list.py +19 -0
  441. appwrite_console/models/schedule.py +45 -0
  442. appwrite_console/models/schedule_list.py +19 -0
  443. appwrite_console/models/session.py +99 -0
  444. appwrite_console/models/session_list.py +19 -0
  445. appwrite_console/models/site.py +115 -0
  446. appwrite_console/models/site_list.py +19 -0
  447. appwrite_console/models/specification.py +24 -0
  448. appwrite_console/models/specification_list.py +19 -0
  449. appwrite_console/models/stage.py +27 -0
  450. appwrite_console/models/stage_list.py +16 -0
  451. appwrite_console/models/subscriber.py +40 -0
  452. appwrite_console/models/subscriber_list.py +19 -0
  453. appwrite_console/models/table.py +67 -0
  454. appwrite_console/models/table_list.py +19 -0
  455. appwrite_console/models/target.py +39 -0
  456. appwrite_console/models/target_list.py +19 -0
  457. appwrite_console/models/team.py +43 -0
  458. appwrite_console/models/team_list.py +32 -0
  459. appwrite_console/models/template_framework.py +39 -0
  460. appwrite_console/models/template_function.py +65 -0
  461. appwrite_console/models/template_function_list.py +19 -0
  462. appwrite_console/models/template_runtime.py +24 -0
  463. appwrite_console/models/template_site.py +53 -0
  464. appwrite_console/models/template_site_list.py +19 -0
  465. appwrite_console/models/template_variable.py +33 -0
  466. appwrite_console/models/token.py +30 -0
  467. appwrite_console/models/topic.py +36 -0
  468. appwrite_console/models/topic_list.py +19 -0
  469. appwrite_console/models/transaction.py +30 -0
  470. appwrite_console/models/transaction_list.py +19 -0
  471. appwrite_console/models/usage_billing_plan.py +46 -0
  472. appwrite_console/models/usage_data_point.py +99 -0
  473. appwrite_console/models/usage_event_list.py +19 -0
  474. appwrite_console/models/usage_gauge_list.py +19 -0
  475. appwrite_console/models/usage_metric.py +19 -0
  476. appwrite_console/models/usage_organization.py +104 -0
  477. appwrite_console/models/usage_organization_project.py +73 -0
  478. appwrite_console/models/usage_presence.py +22 -0
  479. appwrite_console/models/usage_project.py +218 -0
  480. appwrite_console/models/usage_resources.py +36 -0
  481. appwrite_console/models/usage_users.py +28 -0
  482. appwrite_console/models/user.py +111 -0
  483. appwrite_console/models/user_list.py +32 -0
  484. appwrite_console/models/variable.py +36 -0
  485. appwrite_console/models/variable_list.py +19 -0
  486. appwrite_console/models/vcs_content.py +21 -0
  487. appwrite_console/models/vcs_content_list.py +19 -0
  488. appwrite_console/models/vcs_namespace.py +27 -0
  489. appwrite_console/models/vcs_namespace_list.py +19 -0
  490. appwrite_console/models/vectorsdb_collection.py +54 -0
  491. appwrite_console/models/vectorsdb_collection_list.py +19 -0
  492. appwrite_console/models/waf_rule.py +55 -0
  493. appwrite_console/models/waf_rule_bypass.py +55 -0
  494. appwrite_console/models/waf_rule_challenge.py +64 -0
  495. appwrite_console/models/waf_rule_deny.py +55 -0
  496. appwrite_console/models/waf_rule_list.py +19 -0
  497. appwrite_console/models/waf_rule_rate_limit.py +64 -0
  498. appwrite_console/models/waf_rule_redirect.py +61 -0
  499. appwrite_console/models/webhook.py +51 -0
  500. appwrite_console/models/webhook_list.py +19 -0
  501. appwrite_console/operator.py +150 -0
  502. appwrite_console/permission.py +21 -0
  503. appwrite_console/query.py +293 -0
  504. appwrite_console/role.py +111 -0
  505. appwrite_console/service.py +50 -0
  506. appwrite_console/services/__init__.py +1 -0
  507. appwrite_console/services/account.py +3328 -0
  508. appwrite_console/services/activities.py +89 -0
  509. appwrite_console/services/advisor.py +234 -0
  510. appwrite_console/services/apps.py +1156 -0
  511. appwrite_console/services/assistant.py +50 -0
  512. appwrite_console/services/avatars.py +531 -0
  513. appwrite_console/services/backups.py +572 -0
  514. appwrite_console/services/console.py +807 -0
  515. appwrite_console/services/databases.py +4976 -0
  516. appwrite_console/services/documents_db.py +2052 -0
  517. appwrite_console/services/domains.py +3047 -0
  518. appwrite_console/services/functions.py +1659 -0
  519. appwrite_console/services/graphql.py +92 -0
  520. appwrite_console/services/locale.py +243 -0
  521. appwrite_console/services/manager.py +301 -0
  522. appwrite_console/services/messaging.py +3137 -0
  523. appwrite_console/services/migrations.py +1036 -0
  524. appwrite_console/services/mongo.py +1683 -0
  525. appwrite_console/services/mysql.py +1861 -0
  526. appwrite_console/services/notifications.py +98 -0
  527. appwrite_console/services/oauth2.py +914 -0
  528. appwrite_console/services/organization.py +1039 -0
  529. appwrite_console/services/organizations.py +2245 -0
  530. appwrite_console/services/postgresql.py +1995 -0
  531. appwrite_console/services/presences.py +309 -0
  532. appwrite_console/services/project.py +5271 -0
  533. appwrite_console/services/projects.py +885 -0
  534. appwrite_console/services/proxy.py +394 -0
  535. appwrite_console/services/sites.py +1593 -0
  536. appwrite_console/services/storage.py +818 -0
  537. appwrite_console/services/tables_db.py +5189 -0
  538. appwrite_console/services/teams.py +993 -0
  539. appwrite_console/services/tokens.py +243 -0
  540. appwrite_console/services/usage.py +194 -0
  541. appwrite_console/services/users.py +2314 -0
  542. appwrite_console/services/vcs.py +599 -0
  543. appwrite_console/services/vectors_db.py +2054 -0
  544. appwrite_console/services/waf.py +1014 -0
  545. appwrite_console/services/webhooks.py +344 -0
  546. appwrite_console/utils/__init__.py +1 -0
  547. appwrite_console/utils/deprecated.py +51 -0
  548. appwrite_console-0.1.0.dist-info/METADATA +189 -0
  549. appwrite_console-0.1.0.dist-info/RECORD +552 -0
  550. appwrite_console-0.1.0.dist-info/WHEEL +5 -0
  551. appwrite_console-0.1.0.dist-info/licenses/LICENSE +12 -0
  552. appwrite_console-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3047 @@
1
+ from ..service import Service
2
+ from urllib.parse import quote
3
+ from typing import Any, Dict, List, Optional, Union
4
+ from ..exception import AppwriteException
5
+ from appwrite_console.utils.deprecated import deprecated
6
+ from ..models.domains_list import DomainsList
7
+ from ..models.domain import Domain
8
+ from ..enums.domain_registration_type import DomainRegistrationType
9
+ from ..models.domain_price import DomainPrice
10
+ from ..models.domain_purchase import DomainPurchase
11
+ from ..enums.domain_suggestion_type import DomainSuggestionType
12
+ from ..models.domain_suggestions_list import DomainSuggestionsList
13
+ from ..models.domain_transfer_out import DomainTransferOut
14
+ from ..models.dns_records_list import DnsRecordsList
15
+ from ..models.dns_record import DnsRecord
16
+ from ..models.domain_transfer_status import DomainTransferStatus
17
+
18
+ class Domains(Service):
19
+
20
+ def __init__(self, client) -> None:
21
+ super(Domains, self).__init__(client)
22
+
23
+ def list(
24
+ self,
25
+ queries: Optional[List[str]] = None,
26
+ search: Optional[str] = None
27
+ ) -> DomainsList:
28
+ """
29
+ List all domains registered for this project. This endpoint supports pagination.
30
+
31
+ Parameters
32
+ ----------
33
+ queries : Optional[List[str]]
34
+ Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as domain name, teamInternalId, expiration, etc.
35
+ search : Optional[str]
36
+ Search term to filter your list results. Max length: 256 chars.
37
+
38
+ Returns
39
+ -------
40
+ DomainsList
41
+ API response as a typed Pydantic model
42
+
43
+ Raises
44
+ ------
45
+ AppwriteException
46
+ If API request fails
47
+ """
48
+
49
+ api_path = '/domains'
50
+ api_params = {}
51
+
52
+ if queries is not None:
53
+ api_params['queries'] = self._normalize_value(queries)
54
+ if search is not None:
55
+ api_params['search'] = self._normalize_value(search)
56
+
57
+ response = self.client.call('get', api_path, {
58
+ 'X-Appwrite-Project': self.client.get_config('project'),
59
+ 'accept': 'application/json',
60
+ }, api_params)
61
+
62
+ return self._parse_response(response, model=DomainsList)
63
+
64
+
65
+ def create(
66
+ self,
67
+ team_id: str,
68
+ domain: str
69
+ ) -> Domain:
70
+ """
71
+ Create a new domain. Before creating a domain, you need to ensure that your DNS provider is properly configured. After creating the domain, you can use the verification endpoint to check if the domain is ready to be used.
72
+
73
+ Parameters
74
+ ----------
75
+ team_id : str
76
+ Team unique ID.
77
+ domain : str
78
+ Domain name (e.g. "example.com").
79
+
80
+ Returns
81
+ -------
82
+ Domain
83
+ API response as a typed Pydantic model
84
+
85
+ Raises
86
+ ------
87
+ AppwriteException
88
+ If API request fails
89
+ """
90
+
91
+ api_path = '/domains'
92
+ api_params = {}
93
+ if team_id is None:
94
+ raise AppwriteException('Missing required parameter: "team_id"')
95
+
96
+ if domain is None:
97
+ raise AppwriteException('Missing required parameter: "domain"')
98
+
99
+
100
+ api_params['teamId'] = self._normalize_value(team_id)
101
+ api_params['domain'] = self._normalize_value(domain)
102
+
103
+ response = self.client.call('post', api_path, {
104
+ 'X-Appwrite-Project': self.client.get_config('project'),
105
+ 'content-type': 'application/json',
106
+ 'accept': 'application/json',
107
+ }, api_params)
108
+
109
+ return self._parse_response(response, model=Domain)
110
+
111
+
112
+ def get_price(
113
+ self,
114
+ domain: str,
115
+ period_years: Optional[float] = None,
116
+ registration_type: Optional[DomainRegistrationType] = None
117
+ ) -> DomainPrice:
118
+ """
119
+ Get the registration price for a domain name.
120
+
121
+ Parameters
122
+ ----------
123
+ domain : str
124
+ Domain name to get price for.
125
+ period_years : Optional[float]
126
+ Number of years to calculate the domain price for. Must be at least 1.
127
+ registration_type : Optional[DomainRegistrationType]
128
+ Type of registration pricing to fetch. Allowed values: new, transfer, renewal, trade.
129
+
130
+ Returns
131
+ -------
132
+ DomainPrice
133
+ API response as a typed Pydantic model
134
+
135
+ Raises
136
+ ------
137
+ AppwriteException
138
+ If API request fails
139
+ """
140
+
141
+ api_path = '/domains/price'
142
+ api_params = {}
143
+ if domain is None:
144
+ raise AppwriteException('Missing required parameter: "domain"')
145
+
146
+
147
+ api_params['domain'] = self._normalize_value(domain)
148
+ if period_years is not None:
149
+ api_params['periodYears'] = self._normalize_value(period_years)
150
+ if registration_type is not None:
151
+ api_params['registrationType'] = self._normalize_value(registration_type)
152
+
153
+ response = self.client.call('get', api_path, {
154
+ 'X-Appwrite-Project': self.client.get_config('project'),
155
+ 'accept': 'application/json',
156
+ }, api_params)
157
+
158
+ return self._parse_response(response, model=DomainPrice)
159
+
160
+
161
+ def create_purchase(
162
+ self,
163
+ domain: str,
164
+ organization_id: str,
165
+ first_name: str,
166
+ last_name: str,
167
+ email: str,
168
+ phone: str,
169
+ billing_address_id: str,
170
+ payment_method_id: str,
171
+ address_line3: Optional[str] = None,
172
+ company_name: Optional[str] = None,
173
+ period_years: Optional[float] = None,
174
+ auto_renewal: Optional[bool] = None
175
+ ) -> DomainPurchase:
176
+ """
177
+ Initiate a domain purchase by providing registrant details and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Purchase endpoint to capture the payment and finalize the purchase.
178
+
179
+ Parameters
180
+ ----------
181
+ domain : str
182
+ Fully qualified domain name to purchase (for example, example.com).
183
+ organization_id : str
184
+ Team ID that will own the domain.
185
+ first_name : str
186
+ Registrant first name used for domain registration.
187
+ last_name : str
188
+ Registrant last name used for domain registration.
189
+ email : str
190
+ Registrant email address for registration and notices.
191
+ phone : str
192
+ Registrant phone number in E.164 format (for example, +15555551234).
193
+ billing_address_id : str
194
+ Billing address ID used for registration contact details.
195
+ payment_method_id : str
196
+ Payment method ID to authorize and capture the purchase.
197
+ address_line3 : Optional[str]
198
+ Additional address line for the registrant (line 3).
199
+ company_name : Optional[str]
200
+ Company or organization name for the registrant.
201
+ period_years : Optional[float]
202
+ Registration term in years (1-10).
203
+ auto_renewal : Optional[bool]
204
+ Whether the domain should renew automatically after purchase.
205
+
206
+ Returns
207
+ -------
208
+ DomainPurchase
209
+ API response as a typed Pydantic model
210
+
211
+ Raises
212
+ ------
213
+ AppwriteException
214
+ If API request fails
215
+ """
216
+
217
+ api_path = '/domains/purchases'
218
+ api_params = {}
219
+ if domain is None:
220
+ raise AppwriteException('Missing required parameter: "domain"')
221
+
222
+ if organization_id is None:
223
+ raise AppwriteException('Missing required parameter: "organization_id"')
224
+
225
+ if first_name is None:
226
+ raise AppwriteException('Missing required parameter: "first_name"')
227
+
228
+ if last_name is None:
229
+ raise AppwriteException('Missing required parameter: "last_name"')
230
+
231
+ if email is None:
232
+ raise AppwriteException('Missing required parameter: "email"')
233
+
234
+ if phone is None:
235
+ raise AppwriteException('Missing required parameter: "phone"')
236
+
237
+ if billing_address_id is None:
238
+ raise AppwriteException('Missing required parameter: "billing_address_id"')
239
+
240
+ if payment_method_id is None:
241
+ raise AppwriteException('Missing required parameter: "payment_method_id"')
242
+
243
+
244
+ api_params['domain'] = self._normalize_value(domain)
245
+ api_params['organizationId'] = self._normalize_value(organization_id)
246
+ api_params['firstName'] = self._normalize_value(first_name)
247
+ api_params['lastName'] = self._normalize_value(last_name)
248
+ api_params['email'] = self._normalize_value(email)
249
+ api_params['phone'] = self._normalize_value(phone)
250
+ api_params['billingAddressId'] = self._normalize_value(billing_address_id)
251
+ if address_line3 is not None:
252
+ api_params['addressLine3'] = self._normalize_value(address_line3)
253
+ if company_name is not None:
254
+ api_params['companyName'] = self._normalize_value(company_name)
255
+ if period_years is not None:
256
+ api_params['periodYears'] = self._normalize_value(period_years)
257
+ if auto_renewal is not None:
258
+ api_params['autoRenewal'] = self._normalize_value(auto_renewal)
259
+ api_params['paymentMethodId'] = self._normalize_value(payment_method_id)
260
+
261
+ response = self.client.call('post', api_path, {
262
+ 'X-Appwrite-Project': self.client.get_config('project'),
263
+ 'content-type': 'application/json',
264
+ 'accept': 'application/json',
265
+ }, api_params)
266
+
267
+ return self._parse_response(response, model=DomainPurchase)
268
+
269
+
270
+ def update_purchase(
271
+ self,
272
+ invoice_id: str,
273
+ organization_id: str
274
+ ) -> DomainPurchase:
275
+ """
276
+ Finalize a domain purchase initiated with Create Purchase. Verifies that any required 3D Secure authentication is complete, registers the domain, captures the payment, and provisions default DNS records. Returns a 402 error if authentication is still pending.
277
+
278
+ Parameters
279
+ ----------
280
+ invoice_id : str
281
+ Invoice ID.
282
+ organization_id : str
283
+ Team ID that owns the domain.
284
+
285
+ Returns
286
+ -------
287
+ DomainPurchase
288
+ API response as a typed Pydantic model
289
+
290
+ Raises
291
+ ------
292
+ AppwriteException
293
+ If API request fails
294
+ """
295
+
296
+ api_path = '/domains/purchases/{invoiceId}'
297
+ api_params = {}
298
+ if invoice_id is None:
299
+ raise AppwriteException('Missing required parameter: "invoice_id"')
300
+
301
+ if organization_id is None:
302
+ raise AppwriteException('Missing required parameter: "organization_id"')
303
+
304
+ api_path = api_path.replace('{invoiceId}', str(self._normalize_value(invoice_id)))
305
+
306
+ api_params['organizationId'] = self._normalize_value(organization_id)
307
+
308
+ response = self.client.call('patch', api_path, {
309
+ 'X-Appwrite-Project': self.client.get_config('project'),
310
+ 'content-type': 'application/json',
311
+ 'accept': 'application/json',
312
+ }, api_params)
313
+
314
+ return self._parse_response(response, model=DomainPurchase)
315
+
316
+
317
+ def list_suggestions(
318
+ self,
319
+ query: str,
320
+ tlds: Optional[List[str]] = None,
321
+ limit: Optional[float] = None,
322
+ filter_type: Optional[DomainSuggestionType] = None,
323
+ price_max: Optional[float] = None,
324
+ price_min: Optional[float] = None
325
+ ) -> DomainSuggestionsList:
326
+ """
327
+ List domain suggestions.
328
+
329
+ Parameters
330
+ ----------
331
+ query : str
332
+ Query to find available domains and suggestions. Max length: 256 chars.
333
+ tlds : Optional[List[str]]
334
+ TLDs to suggest.
335
+ limit : Optional[float]
336
+ Maximum number of suggestions to return.
337
+ filter_type : Optional[DomainSuggestionType]
338
+ Filter type: premium, suggestion.
339
+ price_max : Optional[float]
340
+ Filter premium domains by maximum price. Only premium domains at or below this price will be returned. Does not affect regular domain suggestions.
341
+ price_min : Optional[float]
342
+ Filter premium domains by minimum price. Only premium domains at or above this price will be returned. Does not affect regular domain suggestions.
343
+
344
+ Returns
345
+ -------
346
+ DomainSuggestionsList
347
+ API response as a typed Pydantic model
348
+
349
+ Raises
350
+ ------
351
+ AppwriteException
352
+ If API request fails
353
+ """
354
+
355
+ api_path = '/domains/suggestions'
356
+ api_params = {}
357
+ if query is None:
358
+ raise AppwriteException('Missing required parameter: "query"')
359
+
360
+
361
+ api_params['query'] = self._normalize_value(query)
362
+ if tlds is not None:
363
+ api_params['tlds'] = self._normalize_value(tlds)
364
+ if limit is not None:
365
+ api_params['limit'] = self._normalize_value(limit)
366
+ if filter_type is not None:
367
+ api_params['filterType'] = self._normalize_value(filter_type)
368
+ if price_max is not None:
369
+ api_params['priceMax'] = self._normalize_value(price_max)
370
+ if price_min is not None:
371
+ api_params['priceMin'] = self._normalize_value(price_min)
372
+
373
+ response = self.client.call('get', api_path, {
374
+ 'X-Appwrite-Project': self.client.get_config('project'),
375
+ 'accept': 'application/json',
376
+ }, api_params)
377
+
378
+ return self._parse_response(response, model=DomainSuggestionsList)
379
+
380
+
381
+ def create_transfer_in(
382
+ self,
383
+ domain: str,
384
+ organization_id: str,
385
+ auth_code: str,
386
+ payment_method_id: str,
387
+ auto_renewal: Optional[bool] = None
388
+ ) -> DomainPurchase:
389
+ """
390
+ Initiate a domain transfer-in by providing an authorization code, registrant details, and a payment method. Authorizes the payment and returns a `clientSecret`. If 3D Secure is required, use the `clientSecret` on the client to complete the authentication challenge. Once authentication is complete (or if none is needed), call the Update Transfer In endpoint to capture the payment and submit the transfer.
391
+
392
+ Parameters
393
+ ----------
394
+ domain : str
395
+ Domain name to transfer in.
396
+ organization_id : str
397
+ Organization ID that this domain will belong to.
398
+ auth_code : str
399
+ Authorization code for the domain transfer.
400
+ payment_method_id : str
401
+ Payment method ID to authorize and capture the transfer.
402
+ auto_renewal : Optional[bool]
403
+ Whether the domain should renew automatically after transfer.
404
+
405
+ Returns
406
+ -------
407
+ DomainPurchase
408
+ API response as a typed Pydantic model
409
+
410
+ Raises
411
+ ------
412
+ AppwriteException
413
+ If API request fails
414
+ """
415
+
416
+ api_path = '/domains/transfers/in'
417
+ api_params = {}
418
+ if domain is None:
419
+ raise AppwriteException('Missing required parameter: "domain"')
420
+
421
+ if organization_id is None:
422
+ raise AppwriteException('Missing required parameter: "organization_id"')
423
+
424
+ if auth_code is None:
425
+ raise AppwriteException('Missing required parameter: "auth_code"')
426
+
427
+ if payment_method_id is None:
428
+ raise AppwriteException('Missing required parameter: "payment_method_id"')
429
+
430
+
431
+ api_params['domain'] = self._normalize_value(domain)
432
+ api_params['organizationId'] = self._normalize_value(organization_id)
433
+ api_params['authCode'] = self._normalize_value(auth_code)
434
+ if auto_renewal is not None:
435
+ api_params['autoRenewal'] = self._normalize_value(auto_renewal)
436
+ api_params['paymentMethodId'] = self._normalize_value(payment_method_id)
437
+
438
+ response = self.client.call('post', api_path, {
439
+ 'X-Appwrite-Project': self.client.get_config('project'),
440
+ 'content-type': 'application/json',
441
+ 'accept': 'application/json',
442
+ }, api_params)
443
+
444
+ return self._parse_response(response, model=DomainPurchase)
445
+
446
+
447
+ def update_transfer_in(
448
+ self,
449
+ invoice_id: str,
450
+ organization_id: str
451
+ ) -> DomainPurchase:
452
+ """
453
+ Finalize a domain transfer-in initiated with Create Transfer In. Verifies that any required 3D Secure authentication is complete, submits the transfer with the authorization code, captures the payment, and sends a confirmation email. Returns a 402 error if authentication is still pending.
454
+
455
+ Parameters
456
+ ----------
457
+ invoice_id : str
458
+ Invoice ID.
459
+ organization_id : str
460
+ Team ID that owns the domain.
461
+
462
+ Returns
463
+ -------
464
+ DomainPurchase
465
+ API response as a typed Pydantic model
466
+
467
+ Raises
468
+ ------
469
+ AppwriteException
470
+ If API request fails
471
+ """
472
+
473
+ api_path = '/domains/transfers/in/{invoiceId}'
474
+ api_params = {}
475
+ if invoice_id is None:
476
+ raise AppwriteException('Missing required parameter: "invoice_id"')
477
+
478
+ if organization_id is None:
479
+ raise AppwriteException('Missing required parameter: "organization_id"')
480
+
481
+ api_path = api_path.replace('{invoiceId}', str(self._normalize_value(invoice_id)))
482
+
483
+ api_params['organizationId'] = self._normalize_value(organization_id)
484
+
485
+ response = self.client.call('patch', api_path, {
486
+ 'X-Appwrite-Project': self.client.get_config('project'),
487
+ 'content-type': 'application/json',
488
+ 'accept': 'application/json',
489
+ }, api_params)
490
+
491
+ return self._parse_response(response, model=DomainPurchase)
492
+
493
+
494
+ def create_transfer_out(
495
+ self,
496
+ domain_id: str,
497
+ organization_id: str
498
+ ) -> DomainTransferOut:
499
+ """
500
+ Initiate a domain transfer-out by generating an authorization code for the specified domain. The returned `authCode` should be provided to the gaining provider to complete the transfer. If the domain has auto-renewal enabled, it will be automatically disabled as part of this operation.
501
+
502
+ Parameters
503
+ ----------
504
+ domain_id : str
505
+ Domain unique ID.
506
+ organization_id : str
507
+ Organization ID that this domain belongs to.
508
+
509
+ Returns
510
+ -------
511
+ DomainTransferOut
512
+ API response as a typed Pydantic model
513
+
514
+ Raises
515
+ ------
516
+ AppwriteException
517
+ If API request fails
518
+ """
519
+
520
+ api_path = '/domains/transfers/out'
521
+ api_params = {}
522
+ if domain_id is None:
523
+ raise AppwriteException('Missing required parameter: "domain_id"')
524
+
525
+ if organization_id is None:
526
+ raise AppwriteException('Missing required parameter: "organization_id"')
527
+
528
+
529
+ api_params['domainId'] = self._normalize_value(domain_id)
530
+ api_params['organizationId'] = self._normalize_value(organization_id)
531
+
532
+ response = self.client.call('post', api_path, {
533
+ 'X-Appwrite-Project': self.client.get_config('project'),
534
+ 'content-type': 'application/json',
535
+ 'accept': 'application/json',
536
+ }, api_params)
537
+
538
+ return self._parse_response(response, model=DomainTransferOut)
539
+
540
+
541
+ def get(
542
+ self,
543
+ domain_id: str
544
+ ) -> Domain:
545
+ """
546
+ Get a domain by its unique ID.
547
+
548
+ Parameters
549
+ ----------
550
+ domain_id : str
551
+ Domain unique ID.
552
+
553
+ Returns
554
+ -------
555
+ Domain
556
+ API response as a typed Pydantic model
557
+
558
+ Raises
559
+ ------
560
+ AppwriteException
561
+ If API request fails
562
+ """
563
+
564
+ api_path = '/domains/{domainId}'
565
+ api_params = {}
566
+ if domain_id is None:
567
+ raise AppwriteException('Missing required parameter: "domain_id"')
568
+
569
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
570
+
571
+
572
+ response = self.client.call('get', api_path, {
573
+ 'X-Appwrite-Project': self.client.get_config('project'),
574
+ 'accept': 'application/json',
575
+ }, api_params)
576
+
577
+ return self._parse_response(response, model=Domain)
578
+
579
+
580
+ def delete(
581
+ self,
582
+ domain_id: str
583
+ ) -> Dict[str, Any]:
584
+ """
585
+ Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.
586
+ Once deleted, the domain will no longer be available for use and all associated resources will be removed.
587
+
588
+ Parameters
589
+ ----------
590
+ domain_id : str
591
+ Domain unique ID.
592
+
593
+ Returns
594
+ -------
595
+ Dict[str, Any]
596
+ API response as a dictionary
597
+
598
+ Raises
599
+ ------
600
+ AppwriteException
601
+ If API request fails
602
+ """
603
+
604
+ api_path = '/domains/{domainId}'
605
+ api_params = {}
606
+ if domain_id is None:
607
+ raise AppwriteException('Missing required parameter: "domain_id"')
608
+
609
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
610
+
611
+
612
+ response = self.client.call('delete', api_path, {
613
+ 'X-Appwrite-Project': self.client.get_config('project'),
614
+ 'content-type': 'application/json',
615
+ 'accept': 'application/json',
616
+ }, api_params)
617
+
618
+ return response
619
+
620
+
621
+ def update_auto_renewal(
622
+ self,
623
+ domain_id: str,
624
+ auto_renewal: bool
625
+ ) -> Domain:
626
+ """
627
+ Enable or disable auto-renewal for a domain.
628
+
629
+ Parameters
630
+ ----------
631
+ domain_id : str
632
+ Domain unique ID.
633
+ auto_renewal : bool
634
+ Whether the domain should renew automatically.
635
+
636
+ Returns
637
+ -------
638
+ Domain
639
+ API response as a typed Pydantic model
640
+
641
+ Raises
642
+ ------
643
+ AppwriteException
644
+ If API request fails
645
+ """
646
+
647
+ api_path = '/domains/{domainId}/auto-renewal'
648
+ api_params = {}
649
+ if domain_id is None:
650
+ raise AppwriteException('Missing required parameter: "domain_id"')
651
+
652
+ if auto_renewal is None:
653
+ raise AppwriteException('Missing required parameter: "auto_renewal"')
654
+
655
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
656
+
657
+ api_params['autoRenewal'] = self._normalize_value(auto_renewal)
658
+
659
+ response = self.client.call('patch', api_path, {
660
+ 'X-Appwrite-Project': self.client.get_config('project'),
661
+ 'content-type': 'application/json',
662
+ 'accept': 'application/json',
663
+ }, api_params)
664
+
665
+ return self._parse_response(response, model=Domain)
666
+
667
+
668
+ def update_nameservers(
669
+ self,
670
+ domain_id: str,
671
+ nameservers: Optional[List[str]] = None
672
+ ) -> Domain:
673
+ """
674
+ Update the registrar nameservers for the given domain. When nameservers are not provided,
675
+ the domain will be updated to use Appwrite nameservers.
676
+
677
+ Parameters
678
+ ----------
679
+ domain_id : str
680
+ Domain unique ID.
681
+ nameservers : Optional[List[str]]
682
+ Nameservers to set for the domain. Defaults to Appwrite nameservers when omitted.
683
+
684
+ Returns
685
+ -------
686
+ Domain
687
+ API response as a typed Pydantic model
688
+
689
+ Raises
690
+ ------
691
+ AppwriteException
692
+ If API request fails
693
+ """
694
+
695
+ api_path = '/domains/{domainId}/nameservers'
696
+ api_params = {}
697
+ if domain_id is None:
698
+ raise AppwriteException('Missing required parameter: "domain_id"')
699
+
700
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
701
+
702
+ if nameservers is not None:
703
+ api_params['nameservers'] = self._normalize_value(nameservers)
704
+
705
+ response = self.client.call('patch', api_path, {
706
+ 'X-Appwrite-Project': self.client.get_config('project'),
707
+ 'content-type': 'application/json',
708
+ 'accept': 'application/json',
709
+ }, api_params)
710
+
711
+ return self._parse_response(response, model=Domain)
712
+
713
+
714
+ def verify_nameservers(
715
+ self,
716
+ domain_id: str
717
+ ) -> Domain:
718
+ """
719
+ Verify which NS records are used and update the domain accordingly. This will check the domain's
720
+ nameservers and update the domain's status based on whether the nameservers match the expected
721
+ Appwrite nameservers.
722
+
723
+ Parameters
724
+ ----------
725
+ domain_id : str
726
+ Domain unique ID.
727
+
728
+ Returns
729
+ -------
730
+ Domain
731
+ API response as a typed Pydantic model
732
+
733
+ Raises
734
+ ------
735
+ AppwriteException
736
+ If API request fails
737
+ """
738
+
739
+ api_path = '/domains/{domainId}/nameservers/verification'
740
+ api_params = {}
741
+ if domain_id is None:
742
+ raise AppwriteException('Missing required parameter: "domain_id"')
743
+
744
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
745
+
746
+
747
+ response = self.client.call('patch', api_path, {
748
+ 'X-Appwrite-Project': self.client.get_config('project'),
749
+ 'content-type': 'application/json',
750
+ 'accept': 'application/json',
751
+ }, api_params)
752
+
753
+ return self._parse_response(response, model=Domain)
754
+
755
+
756
+ def get_preset_google_workspace(
757
+ self,
758
+ domain_id: str
759
+ ) -> DnsRecordsList:
760
+ """
761
+ List Google Workspace DNS records.
762
+
763
+ Parameters
764
+ ----------
765
+ domain_id : str
766
+ Domain unique ID.
767
+
768
+ Returns
769
+ -------
770
+ DnsRecordsList
771
+ API response as a typed Pydantic model
772
+
773
+ Raises
774
+ ------
775
+ AppwriteException
776
+ If API request fails
777
+ """
778
+
779
+ api_path = '/domains/{domainId}/presets/google-workspace'
780
+ api_params = {}
781
+ if domain_id is None:
782
+ raise AppwriteException('Missing required parameter: "domain_id"')
783
+
784
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
785
+
786
+
787
+ response = self.client.call('get', api_path, {
788
+ 'X-Appwrite-Project': self.client.get_config('project'),
789
+ 'accept': 'application/json',
790
+ }, api_params)
791
+
792
+ return self._parse_response(response, model=DnsRecordsList)
793
+
794
+
795
+ def create_preset_google_workspace(
796
+ self,
797
+ domain_id: str
798
+ ) -> DnsRecordsList:
799
+ """
800
+ Add Google Workspace DNS records to the domain. This will create the required MX records
801
+ for Google Workspace email hosting.
802
+
803
+ Parameters
804
+ ----------
805
+ domain_id : str
806
+ Domain unique ID.
807
+
808
+ Returns
809
+ -------
810
+ DnsRecordsList
811
+ API response as a typed Pydantic model
812
+
813
+ Raises
814
+ ------
815
+ AppwriteException
816
+ If API request fails
817
+ """
818
+
819
+ api_path = '/domains/{domainId}/presets/google-workspace'
820
+ api_params = {}
821
+ if domain_id is None:
822
+ raise AppwriteException('Missing required parameter: "domain_id"')
823
+
824
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
825
+
826
+
827
+ response = self.client.call('post', api_path, {
828
+ 'X-Appwrite-Project': self.client.get_config('project'),
829
+ 'content-type': 'application/json',
830
+ 'accept': 'application/json',
831
+ }, api_params)
832
+
833
+ return self._parse_response(response, model=DnsRecordsList)
834
+
835
+
836
+ def get_preset_i_cloud(
837
+ self,
838
+ domain_id: str
839
+ ) -> DnsRecordsList:
840
+ """
841
+ List iCloud DNS records.
842
+
843
+ Parameters
844
+ ----------
845
+ domain_id : str
846
+ Domain unique ID.
847
+
848
+ Returns
849
+ -------
850
+ DnsRecordsList
851
+ API response as a typed Pydantic model
852
+
853
+ Raises
854
+ ------
855
+ AppwriteException
856
+ If API request fails
857
+ """
858
+
859
+ api_path = '/domains/{domainId}/presets/icloud'
860
+ api_params = {}
861
+ if domain_id is None:
862
+ raise AppwriteException('Missing required parameter: "domain_id"')
863
+
864
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
865
+
866
+
867
+ response = self.client.call('get', api_path, {
868
+ 'X-Appwrite-Project': self.client.get_config('project'),
869
+ 'accept': 'application/json',
870
+ }, api_params)
871
+
872
+ return self._parse_response(response, model=DnsRecordsList)
873
+
874
+
875
+ def create_preset_i_cloud(
876
+ self,
877
+ domain_id: str
878
+ ) -> DnsRecordsList:
879
+ """
880
+ Add iCloud DNS records to the domain. This will create the required MX and SPF records
881
+ for using iCloud email services with your domain.
882
+
883
+ Parameters
884
+ ----------
885
+ domain_id : str
886
+ Domain unique ID.
887
+
888
+ Returns
889
+ -------
890
+ DnsRecordsList
891
+ API response as a typed Pydantic model
892
+
893
+ Raises
894
+ ------
895
+ AppwriteException
896
+ If API request fails
897
+ """
898
+
899
+ api_path = '/domains/{domainId}/presets/icloud'
900
+ api_params = {}
901
+ if domain_id is None:
902
+ raise AppwriteException('Missing required parameter: "domain_id"')
903
+
904
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
905
+
906
+
907
+ response = self.client.call('post', api_path, {
908
+ 'X-Appwrite-Project': self.client.get_config('project'),
909
+ 'content-type': 'application/json',
910
+ 'accept': 'application/json',
911
+ }, api_params)
912
+
913
+ return self._parse_response(response, model=DnsRecordsList)
914
+
915
+
916
+ def get_preset_mailgun(
917
+ self,
918
+ domain_id: str
919
+ ) -> DnsRecordsList:
920
+ """
921
+ List Mailgun DNS records.
922
+
923
+ Parameters
924
+ ----------
925
+ domain_id : str
926
+ Domain unique ID.
927
+
928
+ Returns
929
+ -------
930
+ DnsRecordsList
931
+ API response as a typed Pydantic model
932
+
933
+ Raises
934
+ ------
935
+ AppwriteException
936
+ If API request fails
937
+ """
938
+
939
+ api_path = '/domains/{domainId}/presets/mailgun'
940
+ api_params = {}
941
+ if domain_id is None:
942
+ raise AppwriteException('Missing required parameter: "domain_id"')
943
+
944
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
945
+
946
+
947
+ response = self.client.call('get', api_path, {
948
+ 'X-Appwrite-Project': self.client.get_config('project'),
949
+ 'accept': 'application/json',
950
+ }, api_params)
951
+
952
+ return self._parse_response(response, model=DnsRecordsList)
953
+
954
+
955
+ def create_preset_mailgun(
956
+ self,
957
+ domain_id: str
958
+ ) -> DnsRecordsList:
959
+ """
960
+ Add Mailgun DNS records to the domain. This endpoint will create the required DNS records
961
+ for Mailgun in the specified domain.
962
+
963
+ Parameters
964
+ ----------
965
+ domain_id : str
966
+ Domain unique ID.
967
+
968
+ Returns
969
+ -------
970
+ DnsRecordsList
971
+ API response as a typed Pydantic model
972
+
973
+ Raises
974
+ ------
975
+ AppwriteException
976
+ If API request fails
977
+ """
978
+
979
+ api_path = '/domains/{domainId}/presets/mailgun'
980
+ api_params = {}
981
+ if domain_id is None:
982
+ raise AppwriteException('Missing required parameter: "domain_id"')
983
+
984
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
985
+
986
+
987
+ response = self.client.call('post', api_path, {
988
+ 'X-Appwrite-Project': self.client.get_config('project'),
989
+ 'content-type': 'application/json',
990
+ 'accept': 'application/json',
991
+ }, api_params)
992
+
993
+ return self._parse_response(response, model=DnsRecordsList)
994
+
995
+
996
+ def get_preset_outlook(
997
+ self,
998
+ domain_id: str
999
+ ) -> DnsRecordsList:
1000
+ """
1001
+ List Outlook DNS records.
1002
+
1003
+ Parameters
1004
+ ----------
1005
+ domain_id : str
1006
+ Domain unique ID.
1007
+
1008
+ Returns
1009
+ -------
1010
+ DnsRecordsList
1011
+ API response as a typed Pydantic model
1012
+
1013
+ Raises
1014
+ ------
1015
+ AppwriteException
1016
+ If API request fails
1017
+ """
1018
+
1019
+ api_path = '/domains/{domainId}/presets/outlook'
1020
+ api_params = {}
1021
+ if domain_id is None:
1022
+ raise AppwriteException('Missing required parameter: "domain_id"')
1023
+
1024
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1025
+
1026
+
1027
+ response = self.client.call('get', api_path, {
1028
+ 'X-Appwrite-Project': self.client.get_config('project'),
1029
+ 'accept': 'application/json',
1030
+ }, api_params)
1031
+
1032
+ return self._parse_response(response, model=DnsRecordsList)
1033
+
1034
+
1035
+ def create_preset_outlook(
1036
+ self,
1037
+ domain_id: str
1038
+ ) -> DnsRecordsList:
1039
+ """
1040
+ Add Outlook DNS records to the domain. This will create the required MX records
1041
+ for setting up Outlook email hosting for your domain.
1042
+
1043
+ Parameters
1044
+ ----------
1045
+ domain_id : str
1046
+ Domain unique ID.
1047
+
1048
+ Returns
1049
+ -------
1050
+ DnsRecordsList
1051
+ API response as a typed Pydantic model
1052
+
1053
+ Raises
1054
+ ------
1055
+ AppwriteException
1056
+ If API request fails
1057
+ """
1058
+
1059
+ api_path = '/domains/{domainId}/presets/outlook'
1060
+ api_params = {}
1061
+ if domain_id is None:
1062
+ raise AppwriteException('Missing required parameter: "domain_id"')
1063
+
1064
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1065
+
1066
+
1067
+ response = self.client.call('post', api_path, {
1068
+ 'X-Appwrite-Project': self.client.get_config('project'),
1069
+ 'content-type': 'application/json',
1070
+ 'accept': 'application/json',
1071
+ }, api_params)
1072
+
1073
+ return self._parse_response(response, model=DnsRecordsList)
1074
+
1075
+
1076
+ def get_preset_proton_mail(
1077
+ self,
1078
+ domain_id: str
1079
+ ) -> DnsRecordsList:
1080
+ """
1081
+ List ProtonMail DNS records.
1082
+
1083
+ Parameters
1084
+ ----------
1085
+ domain_id : str
1086
+ Domain unique ID.
1087
+
1088
+ Returns
1089
+ -------
1090
+ DnsRecordsList
1091
+ API response as a typed Pydantic model
1092
+
1093
+ Raises
1094
+ ------
1095
+ AppwriteException
1096
+ If API request fails
1097
+ """
1098
+
1099
+ api_path = '/domains/{domainId}/presets/proton-mail'
1100
+ api_params = {}
1101
+ if domain_id is None:
1102
+ raise AppwriteException('Missing required parameter: "domain_id"')
1103
+
1104
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1105
+
1106
+
1107
+ response = self.client.call('get', api_path, {
1108
+ 'X-Appwrite-Project': self.client.get_config('project'),
1109
+ 'accept': 'application/json',
1110
+ }, api_params)
1111
+
1112
+ return self._parse_response(response, model=DnsRecordsList)
1113
+
1114
+
1115
+ def create_preset_proton_mail(
1116
+ self,
1117
+ domain_id: str
1118
+ ) -> DnsRecordsList:
1119
+ """
1120
+ Add ProtonMail DNS records to the domain. This will create the required MX records
1121
+ for using ProtonMail with your custom domain.
1122
+
1123
+ Parameters
1124
+ ----------
1125
+ domain_id : str
1126
+ Domain unique ID.
1127
+
1128
+ Returns
1129
+ -------
1130
+ DnsRecordsList
1131
+ API response as a typed Pydantic model
1132
+
1133
+ Raises
1134
+ ------
1135
+ AppwriteException
1136
+ If API request fails
1137
+ """
1138
+
1139
+ api_path = '/domains/{domainId}/presets/proton-mail'
1140
+ api_params = {}
1141
+ if domain_id is None:
1142
+ raise AppwriteException('Missing required parameter: "domain_id"')
1143
+
1144
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1145
+
1146
+
1147
+ response = self.client.call('post', api_path, {
1148
+ 'X-Appwrite-Project': self.client.get_config('project'),
1149
+ 'content-type': 'application/json',
1150
+ 'accept': 'application/json',
1151
+ }, api_params)
1152
+
1153
+ return self._parse_response(response, model=DnsRecordsList)
1154
+
1155
+
1156
+ def get_preset_zoho(
1157
+ self,
1158
+ domain_id: str
1159
+ ) -> DnsRecordsList:
1160
+ """
1161
+ List Zoho DNS records.
1162
+
1163
+ Parameters
1164
+ ----------
1165
+ domain_id : str
1166
+ Domain unique ID.
1167
+
1168
+ Returns
1169
+ -------
1170
+ DnsRecordsList
1171
+ API response as a typed Pydantic model
1172
+
1173
+ Raises
1174
+ ------
1175
+ AppwriteException
1176
+ If API request fails
1177
+ """
1178
+
1179
+ api_path = '/domains/{domainId}/presets/zoho'
1180
+ api_params = {}
1181
+ if domain_id is None:
1182
+ raise AppwriteException('Missing required parameter: "domain_id"')
1183
+
1184
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1185
+
1186
+
1187
+ response = self.client.call('get', api_path, {
1188
+ 'X-Appwrite-Project': self.client.get_config('project'),
1189
+ 'accept': 'application/json',
1190
+ }, api_params)
1191
+
1192
+ return self._parse_response(response, model=DnsRecordsList)
1193
+
1194
+
1195
+ def create_preset_zoho(
1196
+ self,
1197
+ domain_id: str
1198
+ ) -> DnsRecordsList:
1199
+ """
1200
+ Add Zoho Mail DNS records to the domain. This will create the required MX records
1201
+ for setting up Zoho Mail on your domain.
1202
+
1203
+ Parameters
1204
+ ----------
1205
+ domain_id : str
1206
+ Domain unique ID.
1207
+
1208
+ Returns
1209
+ -------
1210
+ DnsRecordsList
1211
+ API response as a typed Pydantic model
1212
+
1213
+ Raises
1214
+ ------
1215
+ AppwriteException
1216
+ If API request fails
1217
+ """
1218
+
1219
+ api_path = '/domains/{domainId}/presets/zoho'
1220
+ api_params = {}
1221
+ if domain_id is None:
1222
+ raise AppwriteException('Missing required parameter: "domain_id"')
1223
+
1224
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1225
+
1226
+
1227
+ response = self.client.call('post', api_path, {
1228
+ 'X-Appwrite-Project': self.client.get_config('project'),
1229
+ 'content-type': 'application/json',
1230
+ 'accept': 'application/json',
1231
+ }, api_params)
1232
+
1233
+ return self._parse_response(response, model=DnsRecordsList)
1234
+
1235
+
1236
+ def list_records(
1237
+ self,
1238
+ domain_id: str,
1239
+ queries: Optional[List[str]] = None
1240
+ ) -> DnsRecordsList:
1241
+ """
1242
+ List DNS records for a given domain. You can use this endpoint to list all the DNS records
1243
+ associated with your domain.
1244
+
1245
+ Parameters
1246
+ ----------
1247
+ domain_id : str
1248
+ Domain unique ID.
1249
+ queries : Optional[List[str]]
1250
+ Array of query strings generated using the Query class provided by the SDK. You may filter on attributes such as type, name, value, etc. Maximum of 100 queries are allowed, each 4096 characters long.
1251
+
1252
+ Returns
1253
+ -------
1254
+ DnsRecordsList
1255
+ API response as a typed Pydantic model
1256
+
1257
+ Raises
1258
+ ------
1259
+ AppwriteException
1260
+ If API request fails
1261
+ """
1262
+
1263
+ api_path = '/domains/{domainId}/records'
1264
+ api_params = {}
1265
+ if domain_id is None:
1266
+ raise AppwriteException('Missing required parameter: "domain_id"')
1267
+
1268
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1269
+
1270
+ if queries is not None:
1271
+ api_params['queries'] = self._normalize_value(queries)
1272
+
1273
+ response = self.client.call('get', api_path, {
1274
+ 'X-Appwrite-Project': self.client.get_config('project'),
1275
+ 'accept': 'application/json',
1276
+ }, api_params)
1277
+
1278
+ return self._parse_response(response, model=DnsRecordsList)
1279
+
1280
+
1281
+ def create_record_a(
1282
+ self,
1283
+ domain_id: str,
1284
+ name: str,
1285
+ value: str,
1286
+ ttl: float,
1287
+ comment: Optional[str] = None
1288
+ ) -> DnsRecord:
1289
+ """
1290
+ Create a new A record for the given domain. A records are used to point a domain name
1291
+ to an IPv4 address. The record value should be a valid IPv4 address.
1292
+
1293
+ Parameters
1294
+ ----------
1295
+ domain_id : str
1296
+ Domain unique ID.
1297
+ name : str
1298
+ Record name (subdomain).
1299
+ value : str
1300
+ IPv4 address for this A record.
1301
+ ttl : float
1302
+ Time to live, in seconds. Must be greater than 0.
1303
+ comment : Optional[str]
1304
+ A comment explaining what this record is for.
1305
+
1306
+ Returns
1307
+ -------
1308
+ DnsRecord
1309
+ API response as a typed Pydantic model
1310
+
1311
+ Raises
1312
+ ------
1313
+ AppwriteException
1314
+ If API request fails
1315
+ """
1316
+
1317
+ api_path = '/domains/{domainId}/records/a'
1318
+ api_params = {}
1319
+ if domain_id is None:
1320
+ raise AppwriteException('Missing required parameter: "domain_id"')
1321
+
1322
+ if name is None:
1323
+ raise AppwriteException('Missing required parameter: "name"')
1324
+
1325
+ if value is None:
1326
+ raise AppwriteException('Missing required parameter: "value"')
1327
+
1328
+ if ttl is None:
1329
+ raise AppwriteException('Missing required parameter: "ttl"')
1330
+
1331
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1332
+
1333
+ api_params['name'] = self._normalize_value(name)
1334
+ api_params['value'] = self._normalize_value(value)
1335
+ api_params['ttl'] = self._normalize_value(ttl)
1336
+ if comment is not None:
1337
+ api_params['comment'] = self._normalize_value(comment)
1338
+
1339
+ response = self.client.call('post', api_path, {
1340
+ 'X-Appwrite-Project': self.client.get_config('project'),
1341
+ 'content-type': 'application/json',
1342
+ 'accept': 'application/json',
1343
+ }, api_params)
1344
+
1345
+ return self._parse_response(response, model=DnsRecord)
1346
+
1347
+
1348
+ def update_record_a(
1349
+ self,
1350
+ domain_id: str,
1351
+ record_id: str,
1352
+ name: str,
1353
+ value: str,
1354
+ ttl: float,
1355
+ comment: Optional[str] = None
1356
+ ) -> DnsRecord:
1357
+ """
1358
+ Update an existing A record for the given domain. This endpoint allows you to modify
1359
+ the properties of an A record including its name (subdomain), IPv4 address, TTL,
1360
+ and optional comment.
1361
+
1362
+ Parameters
1363
+ ----------
1364
+ domain_id : str
1365
+ Domain unique ID.
1366
+ record_id : str
1367
+ DNS record unique ID.
1368
+ name : str
1369
+ Record name (subdomain).
1370
+ value : str
1371
+ IPv4 address for this A record.
1372
+ ttl : float
1373
+ Time to live, in seconds. Must be greater than 0.
1374
+ comment : Optional[str]
1375
+ A comment explaining what this record is for.
1376
+
1377
+ Returns
1378
+ -------
1379
+ DnsRecord
1380
+ API response as a typed Pydantic model
1381
+
1382
+ Raises
1383
+ ------
1384
+ AppwriteException
1385
+ If API request fails
1386
+ """
1387
+
1388
+ api_path = '/domains/{domainId}/records/a/{recordId}'
1389
+ api_params = {}
1390
+ if domain_id is None:
1391
+ raise AppwriteException('Missing required parameter: "domain_id"')
1392
+
1393
+ if record_id is None:
1394
+ raise AppwriteException('Missing required parameter: "record_id"')
1395
+
1396
+ if name is None:
1397
+ raise AppwriteException('Missing required parameter: "name"')
1398
+
1399
+ if value is None:
1400
+ raise AppwriteException('Missing required parameter: "value"')
1401
+
1402
+ if ttl is None:
1403
+ raise AppwriteException('Missing required parameter: "ttl"')
1404
+
1405
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1406
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
1407
+
1408
+ api_params['name'] = self._normalize_value(name)
1409
+ api_params['value'] = self._normalize_value(value)
1410
+ api_params['ttl'] = self._normalize_value(ttl)
1411
+ if comment is not None:
1412
+ api_params['comment'] = self._normalize_value(comment)
1413
+
1414
+ response = self.client.call('put', api_path, {
1415
+ 'X-Appwrite-Project': self.client.get_config('project'),
1416
+ 'content-type': 'application/json',
1417
+ 'accept': 'application/json',
1418
+ }, api_params)
1419
+
1420
+ return self._parse_response(response, model=DnsRecord)
1421
+
1422
+
1423
+ def create_record_aaaa(
1424
+ self,
1425
+ domain_id: str,
1426
+ name: str,
1427
+ value: str,
1428
+ ttl: float,
1429
+ comment: Optional[str] = None
1430
+ ) -> DnsRecord:
1431
+ """
1432
+ Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record
1433
+ to your domain. The record will be used to point a hostname to an IPv6 address.
1434
+
1435
+ Parameters
1436
+ ----------
1437
+ domain_id : str
1438
+ Domain unique ID.
1439
+ name : str
1440
+ Record name (subdomain).
1441
+ value : str
1442
+ IPv6 address for this AAAA record.
1443
+ ttl : float
1444
+ Time to live, in seconds. Must be greater than 0.
1445
+ comment : Optional[str]
1446
+ A comment explaining what this record is for.
1447
+
1448
+ Returns
1449
+ -------
1450
+ DnsRecord
1451
+ API response as a typed Pydantic model
1452
+
1453
+ Raises
1454
+ ------
1455
+ AppwriteException
1456
+ If API request fails
1457
+ """
1458
+
1459
+ api_path = '/domains/{domainId}/records/aaaa'
1460
+ api_params = {}
1461
+ if domain_id is None:
1462
+ raise AppwriteException('Missing required parameter: "domain_id"')
1463
+
1464
+ if name is None:
1465
+ raise AppwriteException('Missing required parameter: "name"')
1466
+
1467
+ if value is None:
1468
+ raise AppwriteException('Missing required parameter: "value"')
1469
+
1470
+ if ttl is None:
1471
+ raise AppwriteException('Missing required parameter: "ttl"')
1472
+
1473
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1474
+
1475
+ api_params['name'] = self._normalize_value(name)
1476
+ api_params['value'] = self._normalize_value(value)
1477
+ api_params['ttl'] = self._normalize_value(ttl)
1478
+ if comment is not None:
1479
+ api_params['comment'] = self._normalize_value(comment)
1480
+
1481
+ response = self.client.call('post', api_path, {
1482
+ 'X-Appwrite-Project': self.client.get_config('project'),
1483
+ 'content-type': 'application/json',
1484
+ 'accept': 'application/json',
1485
+ }, api_params)
1486
+
1487
+ return self._parse_response(response, model=DnsRecord)
1488
+
1489
+
1490
+ def update_record_aaaa(
1491
+ self,
1492
+ domain_id: str,
1493
+ record_id: str,
1494
+ name: str,
1495
+ value: str,
1496
+ ttl: float,
1497
+ comment: Optional[str] = None
1498
+ ) -> DnsRecord:
1499
+ """
1500
+ Update an existing AAAA record for the given domain. This endpoint allows you to modify
1501
+ the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
1502
+ TTL, and optional comment.
1503
+
1504
+ Parameters
1505
+ ----------
1506
+ domain_id : str
1507
+ Domain unique ID.
1508
+ record_id : str
1509
+ DNS record unique ID.
1510
+ name : str
1511
+ Record name (subdomain).
1512
+ value : str
1513
+ IPv6 address for this AAAA record.
1514
+ ttl : float
1515
+ Time to live, in seconds. Must be greater than 0.
1516
+ comment : Optional[str]
1517
+ A comment for this record.
1518
+
1519
+ Returns
1520
+ -------
1521
+ DnsRecord
1522
+ API response as a typed Pydantic model
1523
+
1524
+ Raises
1525
+ ------
1526
+ AppwriteException
1527
+ If API request fails
1528
+ """
1529
+
1530
+ api_path = '/domains/{domainId}/records/aaaa/{recordId}'
1531
+ api_params = {}
1532
+ if domain_id is None:
1533
+ raise AppwriteException('Missing required parameter: "domain_id"')
1534
+
1535
+ if record_id is None:
1536
+ raise AppwriteException('Missing required parameter: "record_id"')
1537
+
1538
+ if name is None:
1539
+ raise AppwriteException('Missing required parameter: "name"')
1540
+
1541
+ if value is None:
1542
+ raise AppwriteException('Missing required parameter: "value"')
1543
+
1544
+ if ttl is None:
1545
+ raise AppwriteException('Missing required parameter: "ttl"')
1546
+
1547
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1548
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
1549
+
1550
+ api_params['name'] = self._normalize_value(name)
1551
+ api_params['value'] = self._normalize_value(value)
1552
+ api_params['ttl'] = self._normalize_value(ttl)
1553
+ if comment is not None:
1554
+ api_params['comment'] = self._normalize_value(comment)
1555
+
1556
+ response = self.client.call('put', api_path, {
1557
+ 'X-Appwrite-Project': self.client.get_config('project'),
1558
+ 'content-type': 'application/json',
1559
+ 'accept': 'application/json',
1560
+ }, api_params)
1561
+
1562
+ return self._parse_response(response, model=DnsRecord)
1563
+
1564
+
1565
+ def create_record_alias(
1566
+ self,
1567
+ domain_id: str,
1568
+ name: str,
1569
+ value: str,
1570
+ ttl: float,
1571
+ comment: Optional[str] = None
1572
+ ) -> DnsRecord:
1573
+ """
1574
+ Create a new ALIAS record for the given domain. This record type can be used to point your domain
1575
+ to another domain name that will serve as an alias. This is particularly useful when you want to
1576
+ map your domain to a target domain that may change its IP address.
1577
+
1578
+ Parameters
1579
+ ----------
1580
+ domain_id : str
1581
+ Domain unique ID.
1582
+ name : str
1583
+ Record name.
1584
+ value : str
1585
+ Target domain for this ALIAS record.
1586
+ ttl : float
1587
+ Time to live, in seconds. Must be greater than 0.
1588
+ comment : Optional[str]
1589
+ A comment for this record.
1590
+
1591
+ Returns
1592
+ -------
1593
+ DnsRecord
1594
+ API response as a typed Pydantic model
1595
+
1596
+ Raises
1597
+ ------
1598
+ AppwriteException
1599
+ If API request fails
1600
+ """
1601
+
1602
+ api_path = '/domains/{domainId}/records/alias'
1603
+ api_params = {}
1604
+ if domain_id is None:
1605
+ raise AppwriteException('Missing required parameter: "domain_id"')
1606
+
1607
+ if name is None:
1608
+ raise AppwriteException('Missing required parameter: "name"')
1609
+
1610
+ if value is None:
1611
+ raise AppwriteException('Missing required parameter: "value"')
1612
+
1613
+ if ttl is None:
1614
+ raise AppwriteException('Missing required parameter: "ttl"')
1615
+
1616
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1617
+
1618
+ api_params['name'] = self._normalize_value(name)
1619
+ api_params['value'] = self._normalize_value(value)
1620
+ api_params['ttl'] = self._normalize_value(ttl)
1621
+ if comment is not None:
1622
+ api_params['comment'] = self._normalize_value(comment)
1623
+
1624
+ response = self.client.call('post', api_path, {
1625
+ 'X-Appwrite-Project': self.client.get_config('project'),
1626
+ 'content-type': 'application/json',
1627
+ 'accept': 'application/json',
1628
+ }, api_params)
1629
+
1630
+ return self._parse_response(response, model=DnsRecord)
1631
+
1632
+
1633
+ def update_record_alias(
1634
+ self,
1635
+ domain_id: str,
1636
+ record_id: str,
1637
+ name: str,
1638
+ value: str,
1639
+ ttl: float,
1640
+ comment: Optional[str] = None
1641
+ ) -> DnsRecord:
1642
+ """
1643
+ Update an existing ALIAS record for the specified domain. This endpoint allows you to modify
1644
+ the properties of an existing ALIAS record including its name, target domain, TTL, and comment.
1645
+
1646
+ The ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).
1647
+ It provides a way to map one domain name to another.
1648
+
1649
+ Parameters
1650
+ ----------
1651
+ domain_id : str
1652
+ Domain unique ID.
1653
+ record_id : str
1654
+ DNS record unique ID.
1655
+ name : str
1656
+ Record name.
1657
+ value : str
1658
+ Target domain for this ALIAS record.
1659
+ ttl : float
1660
+ Time to live, in seconds. Must be greater than 0.
1661
+ comment : Optional[str]
1662
+ A comment for this record.
1663
+
1664
+ Returns
1665
+ -------
1666
+ DnsRecord
1667
+ API response as a typed Pydantic model
1668
+
1669
+ Raises
1670
+ ------
1671
+ AppwriteException
1672
+ If API request fails
1673
+ """
1674
+
1675
+ api_path = '/domains/{domainId}/records/alias/{recordId}'
1676
+ api_params = {}
1677
+ if domain_id is None:
1678
+ raise AppwriteException('Missing required parameter: "domain_id"')
1679
+
1680
+ if record_id is None:
1681
+ raise AppwriteException('Missing required parameter: "record_id"')
1682
+
1683
+ if name is None:
1684
+ raise AppwriteException('Missing required parameter: "name"')
1685
+
1686
+ if value is None:
1687
+ raise AppwriteException('Missing required parameter: "value"')
1688
+
1689
+ if ttl is None:
1690
+ raise AppwriteException('Missing required parameter: "ttl"')
1691
+
1692
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1693
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
1694
+
1695
+ api_params['name'] = self._normalize_value(name)
1696
+ api_params['value'] = self._normalize_value(value)
1697
+ api_params['ttl'] = self._normalize_value(ttl)
1698
+ if comment is not None:
1699
+ api_params['comment'] = self._normalize_value(comment)
1700
+
1701
+ response = self.client.call('put', api_path, {
1702
+ 'X-Appwrite-Project': self.client.get_config('project'),
1703
+ 'content-type': 'application/json',
1704
+ 'accept': 'application/json',
1705
+ }, api_params)
1706
+
1707
+ return self._parse_response(response, model=DnsRecord)
1708
+
1709
+
1710
+ def create_record_caa(
1711
+ self,
1712
+ domain_id: str,
1713
+ name: str,
1714
+ value: str,
1715
+ ttl: float,
1716
+ comment: Optional[str] = None
1717
+ ) -> DnsRecord:
1718
+ """
1719
+ Create a new CAA record for the given domain. CAA records are used to specify which
1720
+ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your domain.
1721
+
1722
+ Parameters
1723
+ ----------
1724
+ domain_id : str
1725
+ Domain unique ID.
1726
+ name : str
1727
+ Record name.
1728
+ value : str
1729
+ CAA value (e.g. issuer domain).
1730
+ ttl : float
1731
+ Time to live, in seconds. Must be greater than 0.
1732
+ comment : Optional[str]
1733
+ A comment for this record.
1734
+
1735
+ Returns
1736
+ -------
1737
+ DnsRecord
1738
+ API response as a typed Pydantic model
1739
+
1740
+ Raises
1741
+ ------
1742
+ AppwriteException
1743
+ If API request fails
1744
+ """
1745
+
1746
+ api_path = '/domains/{domainId}/records/caa'
1747
+ api_params = {}
1748
+ if domain_id is None:
1749
+ raise AppwriteException('Missing required parameter: "domain_id"')
1750
+
1751
+ if name is None:
1752
+ raise AppwriteException('Missing required parameter: "name"')
1753
+
1754
+ if value is None:
1755
+ raise AppwriteException('Missing required parameter: "value"')
1756
+
1757
+ if ttl is None:
1758
+ raise AppwriteException('Missing required parameter: "ttl"')
1759
+
1760
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1761
+
1762
+ api_params['name'] = self._normalize_value(name)
1763
+ api_params['value'] = self._normalize_value(value)
1764
+ api_params['ttl'] = self._normalize_value(ttl)
1765
+ if comment is not None:
1766
+ api_params['comment'] = self._normalize_value(comment)
1767
+
1768
+ response = self.client.call('post', api_path, {
1769
+ 'X-Appwrite-Project': self.client.get_config('project'),
1770
+ 'content-type': 'application/json',
1771
+ 'accept': 'application/json',
1772
+ }, api_params)
1773
+
1774
+ return self._parse_response(response, model=DnsRecord)
1775
+
1776
+
1777
+ def update_record_caa(
1778
+ self,
1779
+ domain_id: str,
1780
+ record_id: str,
1781
+ name: str,
1782
+ value: str,
1783
+ ttl: float,
1784
+ comment: Optional[str] = None
1785
+ ) -> DnsRecord:
1786
+ """
1787
+ Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization)
1788
+ record is used to specify which certificate authorities (CAs) are authorized to issue certificates
1789
+ for a domain.
1790
+
1791
+ Parameters
1792
+ ----------
1793
+ domain_id : str
1794
+ Domain unique ID.
1795
+ record_id : str
1796
+ DNS record unique ID.
1797
+ name : str
1798
+ Record name.
1799
+ value : str
1800
+ CAA value (e.g. issuer domain).
1801
+ ttl : float
1802
+ Time to live, in seconds. Must be greater than 0.
1803
+ comment : Optional[str]
1804
+ A comment for this record.
1805
+
1806
+ Returns
1807
+ -------
1808
+ DnsRecord
1809
+ API response as a typed Pydantic model
1810
+
1811
+ Raises
1812
+ ------
1813
+ AppwriteException
1814
+ If API request fails
1815
+ """
1816
+
1817
+ api_path = '/domains/{domainId}/records/caa/{recordId}'
1818
+ api_params = {}
1819
+ if domain_id is None:
1820
+ raise AppwriteException('Missing required parameter: "domain_id"')
1821
+
1822
+ if record_id is None:
1823
+ raise AppwriteException('Missing required parameter: "record_id"')
1824
+
1825
+ if name is None:
1826
+ raise AppwriteException('Missing required parameter: "name"')
1827
+
1828
+ if value is None:
1829
+ raise AppwriteException('Missing required parameter: "value"')
1830
+
1831
+ if ttl is None:
1832
+ raise AppwriteException('Missing required parameter: "ttl"')
1833
+
1834
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1835
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
1836
+
1837
+ api_params['name'] = self._normalize_value(name)
1838
+ api_params['value'] = self._normalize_value(value)
1839
+ api_params['ttl'] = self._normalize_value(ttl)
1840
+ if comment is not None:
1841
+ api_params['comment'] = self._normalize_value(comment)
1842
+
1843
+ response = self.client.call('put', api_path, {
1844
+ 'X-Appwrite-Project': self.client.get_config('project'),
1845
+ 'content-type': 'application/json',
1846
+ 'accept': 'application/json',
1847
+ }, api_params)
1848
+
1849
+ return self._parse_response(response, model=DnsRecord)
1850
+
1851
+
1852
+ def create_record_cname(
1853
+ self,
1854
+ domain_id: str,
1855
+ name: str,
1856
+ value: str,
1857
+ ttl: float,
1858
+ comment: Optional[str] = None
1859
+ ) -> DnsRecord:
1860
+ """
1861
+ Create a new CNAME record for the given domain.
1862
+
1863
+ A CNAME record maps a subdomain to another domain name, allowing you to create aliases
1864
+ for your domain. For example, you can create a CNAME record to point 'blog.example.com'
1865
+ to 'example.wordpress.com'.
1866
+
1867
+ Parameters
1868
+ ----------
1869
+ domain_id : str
1870
+ Domain unique ID.
1871
+ name : str
1872
+ Record name (subdomain).
1873
+ value : str
1874
+ Canonical target for this CNAME record.
1875
+ ttl : float
1876
+ Time to live, in seconds. Must be greater than 0.
1877
+ comment : Optional[str]
1878
+ A comment for this record.
1879
+
1880
+ Returns
1881
+ -------
1882
+ DnsRecord
1883
+ API response as a typed Pydantic model
1884
+
1885
+ Raises
1886
+ ------
1887
+ AppwriteException
1888
+ If API request fails
1889
+ """
1890
+
1891
+ api_path = '/domains/{domainId}/records/cname'
1892
+ api_params = {}
1893
+ if domain_id is None:
1894
+ raise AppwriteException('Missing required parameter: "domain_id"')
1895
+
1896
+ if name is None:
1897
+ raise AppwriteException('Missing required parameter: "name"')
1898
+
1899
+ if value is None:
1900
+ raise AppwriteException('Missing required parameter: "value"')
1901
+
1902
+ if ttl is None:
1903
+ raise AppwriteException('Missing required parameter: "ttl"')
1904
+
1905
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1906
+
1907
+ api_params['name'] = self._normalize_value(name)
1908
+ api_params['value'] = self._normalize_value(value)
1909
+ api_params['ttl'] = self._normalize_value(ttl)
1910
+ if comment is not None:
1911
+ api_params['comment'] = self._normalize_value(comment)
1912
+
1913
+ response = self.client.call('post', api_path, {
1914
+ 'X-Appwrite-Project': self.client.get_config('project'),
1915
+ 'content-type': 'application/json',
1916
+ 'accept': 'application/json',
1917
+ }, api_params)
1918
+
1919
+ return self._parse_response(response, model=DnsRecord)
1920
+
1921
+
1922
+ def update_record_cname(
1923
+ self,
1924
+ domain_id: str,
1925
+ record_id: str,
1926
+ name: str,
1927
+ value: str,
1928
+ ttl: float,
1929
+ comment: Optional[str] = None
1930
+ ) -> DnsRecord:
1931
+ """
1932
+ Update an existing CNAME record for the given domain.
1933
+
1934
+ Parameters
1935
+ ----------
1936
+ domain_id : str
1937
+ Domain unique ID.
1938
+ record_id : str
1939
+ DNS record unique ID.
1940
+ name : str
1941
+ Record name (subdomain).
1942
+ value : str
1943
+ Canonical target for this CNAME record.
1944
+ ttl : float
1945
+ Time to live, in seconds. Must be greater than 0.
1946
+ comment : Optional[str]
1947
+ A comment for this record.
1948
+
1949
+ Returns
1950
+ -------
1951
+ DnsRecord
1952
+ API response as a typed Pydantic model
1953
+
1954
+ Raises
1955
+ ------
1956
+ AppwriteException
1957
+ If API request fails
1958
+ """
1959
+
1960
+ api_path = '/domains/{domainId}/records/cname/{recordId}'
1961
+ api_params = {}
1962
+ if domain_id is None:
1963
+ raise AppwriteException('Missing required parameter: "domain_id"')
1964
+
1965
+ if record_id is None:
1966
+ raise AppwriteException('Missing required parameter: "record_id"')
1967
+
1968
+ if name is None:
1969
+ raise AppwriteException('Missing required parameter: "name"')
1970
+
1971
+ if value is None:
1972
+ raise AppwriteException('Missing required parameter: "value"')
1973
+
1974
+ if ttl is None:
1975
+ raise AppwriteException('Missing required parameter: "ttl"')
1976
+
1977
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
1978
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
1979
+
1980
+ api_params['name'] = self._normalize_value(name)
1981
+ api_params['value'] = self._normalize_value(value)
1982
+ api_params['ttl'] = self._normalize_value(ttl)
1983
+ if comment is not None:
1984
+ api_params['comment'] = self._normalize_value(comment)
1985
+
1986
+ response = self.client.call('put', api_path, {
1987
+ 'X-Appwrite-Project': self.client.get_config('project'),
1988
+ 'content-type': 'application/json',
1989
+ 'accept': 'application/json',
1990
+ }, api_params)
1991
+
1992
+ return self._parse_response(response, model=DnsRecord)
1993
+
1994
+
1995
+ def create_record_https(
1996
+ self,
1997
+ domain_id: str,
1998
+ name: str,
1999
+ value: str,
2000
+ ttl: float,
2001
+ comment: Optional[str] = None
2002
+ ) -> DnsRecord:
2003
+ """
2004
+ Create a new HTTPS record for the given domain. This record is used to configure HTTPS
2005
+ settings for your domain, enabling secure communication over SSL/TLS.
2006
+
2007
+ Parameters
2008
+ ----------
2009
+ domain_id : str
2010
+ Domain unique ID.
2011
+ name : str
2012
+ Record name (subdomain).
2013
+ value : str
2014
+ Target for the HTTPS record.
2015
+ ttl : float
2016
+ Time to live, in seconds. Must be greater than 0.
2017
+ comment : Optional[str]
2018
+ A comment for this record.
2019
+
2020
+ Returns
2021
+ -------
2022
+ DnsRecord
2023
+ API response as a typed Pydantic model
2024
+
2025
+ Raises
2026
+ ------
2027
+ AppwriteException
2028
+ If API request fails
2029
+ """
2030
+
2031
+ api_path = '/domains/{domainId}/records/https'
2032
+ api_params = {}
2033
+ if domain_id is None:
2034
+ raise AppwriteException('Missing required parameter: "domain_id"')
2035
+
2036
+ if name is None:
2037
+ raise AppwriteException('Missing required parameter: "name"')
2038
+
2039
+ if value is None:
2040
+ raise AppwriteException('Missing required parameter: "value"')
2041
+
2042
+ if ttl is None:
2043
+ raise AppwriteException('Missing required parameter: "ttl"')
2044
+
2045
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2046
+
2047
+ api_params['name'] = self._normalize_value(name)
2048
+ api_params['value'] = self._normalize_value(value)
2049
+ api_params['ttl'] = self._normalize_value(ttl)
2050
+ if comment is not None:
2051
+ api_params['comment'] = self._normalize_value(comment)
2052
+
2053
+ response = self.client.call('post', api_path, {
2054
+ 'X-Appwrite-Project': self.client.get_config('project'),
2055
+ 'content-type': 'application/json',
2056
+ 'accept': 'application/json',
2057
+ }, api_params)
2058
+
2059
+ return self._parse_response(response, model=DnsRecord)
2060
+
2061
+
2062
+ def update_record_https(
2063
+ self,
2064
+ domain_id: str,
2065
+ record_id: str,
2066
+ name: str,
2067
+ value: str,
2068
+ ttl: float,
2069
+ comment: Optional[str] = None
2070
+ ) -> DnsRecord:
2071
+ """
2072
+ Update an existing HTTPS record for the given domain. This endpoint allows you to modify
2073
+ the properties of an HTTPS record associated with your domain, including the name (subdomain),
2074
+ target value, TTL, and optional comment.
2075
+
2076
+ Parameters
2077
+ ----------
2078
+ domain_id : str
2079
+ Domain unique ID.
2080
+ record_id : str
2081
+ DNS record unique ID.
2082
+ name : str
2083
+ Record name (subdomain).
2084
+ value : str
2085
+ Target for the HTTPS record.
2086
+ ttl : float
2087
+ Time to live, in seconds. Must be greater than 0.
2088
+ comment : Optional[str]
2089
+ A comment for this record.
2090
+
2091
+ Returns
2092
+ -------
2093
+ DnsRecord
2094
+ API response as a typed Pydantic model
2095
+
2096
+ Raises
2097
+ ------
2098
+ AppwriteException
2099
+ If API request fails
2100
+ """
2101
+
2102
+ api_path = '/domains/{domainId}/records/https/{recordId}'
2103
+ api_params = {}
2104
+ if domain_id is None:
2105
+ raise AppwriteException('Missing required parameter: "domain_id"')
2106
+
2107
+ if record_id is None:
2108
+ raise AppwriteException('Missing required parameter: "record_id"')
2109
+
2110
+ if name is None:
2111
+ raise AppwriteException('Missing required parameter: "name"')
2112
+
2113
+ if value is None:
2114
+ raise AppwriteException('Missing required parameter: "value"')
2115
+
2116
+ if ttl is None:
2117
+ raise AppwriteException('Missing required parameter: "ttl"')
2118
+
2119
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2120
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2121
+
2122
+ api_params['name'] = self._normalize_value(name)
2123
+ api_params['value'] = self._normalize_value(value)
2124
+ api_params['ttl'] = self._normalize_value(ttl)
2125
+ if comment is not None:
2126
+ api_params['comment'] = self._normalize_value(comment)
2127
+
2128
+ response = self.client.call('put', api_path, {
2129
+ 'X-Appwrite-Project': self.client.get_config('project'),
2130
+ 'content-type': 'application/json',
2131
+ 'accept': 'application/json',
2132
+ }, api_params)
2133
+
2134
+ return self._parse_response(response, model=DnsRecord)
2135
+
2136
+
2137
+ def create_record_mx(
2138
+ self,
2139
+ domain_id: str,
2140
+ name: str,
2141
+ value: str,
2142
+ ttl: float,
2143
+ priority: float,
2144
+ comment: Optional[str] = None
2145
+ ) -> DnsRecord:
2146
+ """
2147
+ Create a new MX record for the given domain. MX records are used to define the mail servers responsible
2148
+ for accepting email messages for the domain. Multiple MX records can be created with different priorities.
2149
+ The priority parameter determines the order in which mail servers are used, with lower values indicating
2150
+ higher priority.
2151
+
2152
+ Parameters
2153
+ ----------
2154
+ domain_id : str
2155
+ Domain unique ID.
2156
+ name : str
2157
+ Record name (subdomain).
2158
+ value : str
2159
+ Mail server domain for this MX record.
2160
+ ttl : float
2161
+ Time to live, in seconds. Must be greater than 0.
2162
+ priority : float
2163
+ MX priority.
2164
+ comment : Optional[str]
2165
+ A comment for this record.
2166
+
2167
+ Returns
2168
+ -------
2169
+ DnsRecord
2170
+ API response as a typed Pydantic model
2171
+
2172
+ Raises
2173
+ ------
2174
+ AppwriteException
2175
+ If API request fails
2176
+ """
2177
+
2178
+ api_path = '/domains/{domainId}/records/mx'
2179
+ api_params = {}
2180
+ if domain_id is None:
2181
+ raise AppwriteException('Missing required parameter: "domain_id"')
2182
+
2183
+ if name is None:
2184
+ raise AppwriteException('Missing required parameter: "name"')
2185
+
2186
+ if value is None:
2187
+ raise AppwriteException('Missing required parameter: "value"')
2188
+
2189
+ if ttl is None:
2190
+ raise AppwriteException('Missing required parameter: "ttl"')
2191
+
2192
+ if priority is None:
2193
+ raise AppwriteException('Missing required parameter: "priority"')
2194
+
2195
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2196
+
2197
+ api_params['name'] = self._normalize_value(name)
2198
+ api_params['value'] = self._normalize_value(value)
2199
+ api_params['ttl'] = self._normalize_value(ttl)
2200
+ api_params['priority'] = self._normalize_value(priority)
2201
+ if comment is not None:
2202
+ api_params['comment'] = self._normalize_value(comment)
2203
+
2204
+ response = self.client.call('post', api_path, {
2205
+ 'X-Appwrite-Project': self.client.get_config('project'),
2206
+ 'content-type': 'application/json',
2207
+ 'accept': 'application/json',
2208
+ }, api_params)
2209
+
2210
+ return self._parse_response(response, model=DnsRecord)
2211
+
2212
+
2213
+ def update_record_mx(
2214
+ self,
2215
+ domain_id: str,
2216
+ record_id: str,
2217
+ name: str,
2218
+ value: str,
2219
+ ttl: float,
2220
+ priority: float,
2221
+ comment: Optional[str] = None
2222
+ ) -> DnsRecord:
2223
+ """
2224
+ Update an existing MX record for the given domain.
2225
+
2226
+ Parameters
2227
+ ----------
2228
+ domain_id : str
2229
+ Domain unique ID.
2230
+ record_id : str
2231
+ DNS record unique ID.
2232
+ name : str
2233
+ Record name (subdomain).
2234
+ value : str
2235
+ Mail server domain for this MX record.
2236
+ ttl : float
2237
+ Time to live, in seconds. Must be greater than 0.
2238
+ priority : float
2239
+ MX priority.
2240
+ comment : Optional[str]
2241
+ A comment for this record.
2242
+
2243
+ Returns
2244
+ -------
2245
+ DnsRecord
2246
+ API response as a typed Pydantic model
2247
+
2248
+ Raises
2249
+ ------
2250
+ AppwriteException
2251
+ If API request fails
2252
+ """
2253
+
2254
+ api_path = '/domains/{domainId}/records/mx/{recordId}'
2255
+ api_params = {}
2256
+ if domain_id is None:
2257
+ raise AppwriteException('Missing required parameter: "domain_id"')
2258
+
2259
+ if record_id is None:
2260
+ raise AppwriteException('Missing required parameter: "record_id"')
2261
+
2262
+ if name is None:
2263
+ raise AppwriteException('Missing required parameter: "name"')
2264
+
2265
+ if value is None:
2266
+ raise AppwriteException('Missing required parameter: "value"')
2267
+
2268
+ if ttl is None:
2269
+ raise AppwriteException('Missing required parameter: "ttl"')
2270
+
2271
+ if priority is None:
2272
+ raise AppwriteException('Missing required parameter: "priority"')
2273
+
2274
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2275
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2276
+
2277
+ api_params['name'] = self._normalize_value(name)
2278
+ api_params['value'] = self._normalize_value(value)
2279
+ api_params['ttl'] = self._normalize_value(ttl)
2280
+ api_params['priority'] = self._normalize_value(priority)
2281
+ if comment is not None:
2282
+ api_params['comment'] = self._normalize_value(comment)
2283
+
2284
+ response = self.client.call('put', api_path, {
2285
+ 'X-Appwrite-Project': self.client.get_config('project'),
2286
+ 'content-type': 'application/json',
2287
+ 'accept': 'application/json',
2288
+ }, api_params)
2289
+
2290
+ return self._parse_response(response, model=DnsRecord)
2291
+
2292
+
2293
+ def create_record_ns(
2294
+ self,
2295
+ domain_id: str,
2296
+ name: str,
2297
+ value: str,
2298
+ ttl: float,
2299
+ comment: Optional[str] = None
2300
+ ) -> DnsRecord:
2301
+ """
2302
+ Create a new NS record for the given domain. NS records specify the nameservers that are used
2303
+ to resolve the domain name to IP addresses. Each domain can have multiple NS records.
2304
+
2305
+ Parameters
2306
+ ----------
2307
+ domain_id : str
2308
+ Domain unique ID.
2309
+ name : str
2310
+ Record name (subdomain).
2311
+ value : str
2312
+ Nameserver target for this NS record.
2313
+ ttl : float
2314
+ Time to live, in seconds. Must be greater than 0.
2315
+ comment : Optional[str]
2316
+ A comment for this record.
2317
+
2318
+ Returns
2319
+ -------
2320
+ DnsRecord
2321
+ API response as a typed Pydantic model
2322
+
2323
+ Raises
2324
+ ------
2325
+ AppwriteException
2326
+ If API request fails
2327
+ """
2328
+
2329
+ api_path = '/domains/{domainId}/records/ns'
2330
+ api_params = {}
2331
+ if domain_id is None:
2332
+ raise AppwriteException('Missing required parameter: "domain_id"')
2333
+
2334
+ if name is None:
2335
+ raise AppwriteException('Missing required parameter: "name"')
2336
+
2337
+ if value is None:
2338
+ raise AppwriteException('Missing required parameter: "value"')
2339
+
2340
+ if ttl is None:
2341
+ raise AppwriteException('Missing required parameter: "ttl"')
2342
+
2343
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2344
+
2345
+ api_params['name'] = self._normalize_value(name)
2346
+ api_params['value'] = self._normalize_value(value)
2347
+ api_params['ttl'] = self._normalize_value(ttl)
2348
+ if comment is not None:
2349
+ api_params['comment'] = self._normalize_value(comment)
2350
+
2351
+ response = self.client.call('post', api_path, {
2352
+ 'X-Appwrite-Project': self.client.get_config('project'),
2353
+ 'content-type': 'application/json',
2354
+ 'accept': 'application/json',
2355
+ }, api_params)
2356
+
2357
+ return self._parse_response(response, model=DnsRecord)
2358
+
2359
+
2360
+ def update_record_ns(
2361
+ self,
2362
+ domain_id: str,
2363
+ record_id: str,
2364
+ name: str,
2365
+ value: str,
2366
+ ttl: float,
2367
+ comment: Optional[str] = None
2368
+ ) -> DnsRecord:
2369
+ """
2370
+ Update an existing NS record for the given domain. This endpoint allows you to modify
2371
+ the properties of an NS (nameserver) record associated with your domain. You can update
2372
+ the record name (subdomain), target nameserver value, TTL, and add or modify comments
2373
+ for better record management.
2374
+
2375
+ Parameters
2376
+ ----------
2377
+ domain_id : str
2378
+ Domain unique ID.
2379
+ record_id : str
2380
+ DNS record unique ID.
2381
+ name : str
2382
+ Record name (subdomain).
2383
+ value : str
2384
+ Nameserver target for this NS record.
2385
+ ttl : float
2386
+ Time to live, in seconds. Must be greater than 0.
2387
+ comment : Optional[str]
2388
+ A comment for this record.
2389
+
2390
+ Returns
2391
+ -------
2392
+ DnsRecord
2393
+ API response as a typed Pydantic model
2394
+
2395
+ Raises
2396
+ ------
2397
+ AppwriteException
2398
+ If API request fails
2399
+ """
2400
+
2401
+ api_path = '/domains/{domainId}/records/ns/{recordId}'
2402
+ api_params = {}
2403
+ if domain_id is None:
2404
+ raise AppwriteException('Missing required parameter: "domain_id"')
2405
+
2406
+ if record_id is None:
2407
+ raise AppwriteException('Missing required parameter: "record_id"')
2408
+
2409
+ if name is None:
2410
+ raise AppwriteException('Missing required parameter: "name"')
2411
+
2412
+ if value is None:
2413
+ raise AppwriteException('Missing required parameter: "value"')
2414
+
2415
+ if ttl is None:
2416
+ raise AppwriteException('Missing required parameter: "ttl"')
2417
+
2418
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2419
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2420
+
2421
+ api_params['name'] = self._normalize_value(name)
2422
+ api_params['value'] = self._normalize_value(value)
2423
+ api_params['ttl'] = self._normalize_value(ttl)
2424
+ if comment is not None:
2425
+ api_params['comment'] = self._normalize_value(comment)
2426
+
2427
+ response = self.client.call('put', api_path, {
2428
+ 'X-Appwrite-Project': self.client.get_config('project'),
2429
+ 'content-type': 'application/json',
2430
+ 'accept': 'application/json',
2431
+ }, api_params)
2432
+
2433
+ return self._parse_response(response, model=DnsRecord)
2434
+
2435
+
2436
+ def create_record_srv(
2437
+ self,
2438
+ domain_id: str,
2439
+ name: str,
2440
+ value: str,
2441
+ ttl: float,
2442
+ priority: float,
2443
+ weight: float,
2444
+ port: float,
2445
+ comment: Optional[str] = None
2446
+ ) -> DnsRecord:
2447
+ """
2448
+ Create a new SRV record for the given domain. SRV records are used to define the location
2449
+ of servers for specific services. For example, they can be used to specify which server
2450
+ handles a specific service like SIP or XMPP for the domain.
2451
+
2452
+ Parameters
2453
+ ----------
2454
+ domain_id : str
2455
+ Domain unique ID.
2456
+ name : str
2457
+ Record name (service name).
2458
+ value : str
2459
+ Target hostname for this SRV record.
2460
+ ttl : float
2461
+ Time to live, in seconds. Must be greater than 0.
2462
+ priority : float
2463
+ Record priority.
2464
+ weight : float
2465
+ Record weight.
2466
+ port : float
2467
+ Port number for the service.
2468
+ comment : Optional[str]
2469
+ A comment for this record.
2470
+
2471
+ Returns
2472
+ -------
2473
+ DnsRecord
2474
+ API response as a typed Pydantic model
2475
+
2476
+ Raises
2477
+ ------
2478
+ AppwriteException
2479
+ If API request fails
2480
+ """
2481
+
2482
+ api_path = '/domains/{domainId}/records/srv'
2483
+ api_params = {}
2484
+ if domain_id is None:
2485
+ raise AppwriteException('Missing required parameter: "domain_id"')
2486
+
2487
+ if name is None:
2488
+ raise AppwriteException('Missing required parameter: "name"')
2489
+
2490
+ if value is None:
2491
+ raise AppwriteException('Missing required parameter: "value"')
2492
+
2493
+ if ttl is None:
2494
+ raise AppwriteException('Missing required parameter: "ttl"')
2495
+
2496
+ if priority is None:
2497
+ raise AppwriteException('Missing required parameter: "priority"')
2498
+
2499
+ if weight is None:
2500
+ raise AppwriteException('Missing required parameter: "weight"')
2501
+
2502
+ if port is None:
2503
+ raise AppwriteException('Missing required parameter: "port"')
2504
+
2505
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2506
+
2507
+ api_params['name'] = self._normalize_value(name)
2508
+ api_params['value'] = self._normalize_value(value)
2509
+ api_params['ttl'] = self._normalize_value(ttl)
2510
+ api_params['priority'] = self._normalize_value(priority)
2511
+ api_params['weight'] = self._normalize_value(weight)
2512
+ api_params['port'] = self._normalize_value(port)
2513
+ if comment is not None:
2514
+ api_params['comment'] = self._normalize_value(comment)
2515
+
2516
+ response = self.client.call('post', api_path, {
2517
+ 'X-Appwrite-Project': self.client.get_config('project'),
2518
+ 'content-type': 'application/json',
2519
+ 'accept': 'application/json',
2520
+ }, api_params)
2521
+
2522
+ return self._parse_response(response, model=DnsRecord)
2523
+
2524
+
2525
+ def update_record_srv(
2526
+ self,
2527
+ domain_id: str,
2528
+ record_id: str,
2529
+ name: str,
2530
+ value: str,
2531
+ ttl: float,
2532
+ priority: float,
2533
+ weight: float,
2534
+ port: float,
2535
+ comment: Optional[str] = None
2536
+ ) -> DnsRecord:
2537
+ """
2538
+ Update an existing SRV record for the given domain.
2539
+
2540
+ Required parameters:
2541
+ - domainId: Domain unique ID
2542
+ - recordId: DNS record unique ID
2543
+ - name: Record name (service name)
2544
+ - value: Target hostname for this SRV record
2545
+ - ttl: Time to live, in seconds
2546
+ - priority: Record priority
2547
+ - weight: Record weight
2548
+ - port: Port number for the service
2549
+
2550
+ Optional parameters:
2551
+ - comment: A comment for this record
2552
+
2553
+ Parameters
2554
+ ----------
2555
+ domain_id : str
2556
+ Domain unique ID.
2557
+ record_id : str
2558
+ DNS record unique ID.
2559
+ name : str
2560
+ Record name (service name).
2561
+ value : str
2562
+ Target hostname for this SRV record.
2563
+ ttl : float
2564
+ Time to live, in seconds. Must be greater than 0.
2565
+ priority : float
2566
+ Record priority.
2567
+ weight : float
2568
+ Record weight.
2569
+ port : float
2570
+ Port number for the service.
2571
+ comment : Optional[str]
2572
+ A comment for this record.
2573
+
2574
+ Returns
2575
+ -------
2576
+ DnsRecord
2577
+ API response as a typed Pydantic model
2578
+
2579
+ Raises
2580
+ ------
2581
+ AppwriteException
2582
+ If API request fails
2583
+ """
2584
+
2585
+ api_path = '/domains/{domainId}/records/srv/{recordId}'
2586
+ api_params = {}
2587
+ if domain_id is None:
2588
+ raise AppwriteException('Missing required parameter: "domain_id"')
2589
+
2590
+ if record_id is None:
2591
+ raise AppwriteException('Missing required parameter: "record_id"')
2592
+
2593
+ if name is None:
2594
+ raise AppwriteException('Missing required parameter: "name"')
2595
+
2596
+ if value is None:
2597
+ raise AppwriteException('Missing required parameter: "value"')
2598
+
2599
+ if ttl is None:
2600
+ raise AppwriteException('Missing required parameter: "ttl"')
2601
+
2602
+ if priority is None:
2603
+ raise AppwriteException('Missing required parameter: "priority"')
2604
+
2605
+ if weight is None:
2606
+ raise AppwriteException('Missing required parameter: "weight"')
2607
+
2608
+ if port is None:
2609
+ raise AppwriteException('Missing required parameter: "port"')
2610
+
2611
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2612
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2613
+
2614
+ api_params['name'] = self._normalize_value(name)
2615
+ api_params['value'] = self._normalize_value(value)
2616
+ api_params['ttl'] = self._normalize_value(ttl)
2617
+ api_params['priority'] = self._normalize_value(priority)
2618
+ api_params['weight'] = self._normalize_value(weight)
2619
+ api_params['port'] = self._normalize_value(port)
2620
+ if comment is not None:
2621
+ api_params['comment'] = self._normalize_value(comment)
2622
+
2623
+ response = self.client.call('put', api_path, {
2624
+ 'X-Appwrite-Project': self.client.get_config('project'),
2625
+ 'content-type': 'application/json',
2626
+ 'accept': 'application/json',
2627
+ }, api_params)
2628
+
2629
+ return self._parse_response(response, model=DnsRecord)
2630
+
2631
+
2632
+ def create_record_txt(
2633
+ self,
2634
+ domain_id: str,
2635
+ name: str,
2636
+ ttl: float,
2637
+ value: Optional[str] = None,
2638
+ comment: Optional[str] = None
2639
+ ) -> DnsRecord:
2640
+ """
2641
+ Create a new TXT record for the given domain. TXT records can be used
2642
+ to provide additional information about your domain, such as domain
2643
+ verification records, SPF records, or DKIM records.
2644
+
2645
+ Parameters
2646
+ ----------
2647
+ domain_id : str
2648
+ Domain unique ID.
2649
+ name : str
2650
+ Record name (subdomain) for the TXT record.
2651
+ ttl : float
2652
+ Time to live, in seconds. Must be greater than 0.
2653
+ value : Optional[str]
2654
+ TXT record value.
2655
+ comment : Optional[str]
2656
+ A comment for this record.
2657
+
2658
+ Returns
2659
+ -------
2660
+ DnsRecord
2661
+ API response as a typed Pydantic model
2662
+
2663
+ Raises
2664
+ ------
2665
+ AppwriteException
2666
+ If API request fails
2667
+ """
2668
+
2669
+ api_path = '/domains/{domainId}/records/txt'
2670
+ api_params = {}
2671
+ if domain_id is None:
2672
+ raise AppwriteException('Missing required parameter: "domain_id"')
2673
+
2674
+ if name is None:
2675
+ raise AppwriteException('Missing required parameter: "name"')
2676
+
2677
+ if ttl is None:
2678
+ raise AppwriteException('Missing required parameter: "ttl"')
2679
+
2680
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2681
+
2682
+ api_params['name'] = self._normalize_value(name)
2683
+ if value is not None:
2684
+ api_params['value'] = self._normalize_value(value)
2685
+ api_params['ttl'] = self._normalize_value(ttl)
2686
+ if comment is not None:
2687
+ api_params['comment'] = self._normalize_value(comment)
2688
+
2689
+ response = self.client.call('post', api_path, {
2690
+ 'X-Appwrite-Project': self.client.get_config('project'),
2691
+ 'content-type': 'application/json',
2692
+ 'accept': 'application/json',
2693
+ }, api_params)
2694
+
2695
+ return self._parse_response(response, model=DnsRecord)
2696
+
2697
+
2698
+ def update_record_txt(
2699
+ self,
2700
+ domain_id: str,
2701
+ record_id: str,
2702
+ name: str,
2703
+ value: str,
2704
+ ttl: float,
2705
+ comment: Optional[str] = None
2706
+ ) -> DnsRecord:
2707
+ """
2708
+ Update an existing TXT record for the given domain.
2709
+
2710
+ Update the TXT record details for a specific domain by providing the domain ID,
2711
+ record ID, and the new record configuration including name, value, TTL, and an optional comment.
2712
+
2713
+ Parameters
2714
+ ----------
2715
+ domain_id : str
2716
+ Domain unique ID.
2717
+ record_id : str
2718
+ DNS record unique ID.
2719
+ name : str
2720
+ Record name (subdomain) for the TXT record.
2721
+ value : str
2722
+ TXT record value.
2723
+ ttl : float
2724
+ Time to live, in seconds. Must be greater than 0.
2725
+ comment : Optional[str]
2726
+ A comment for this record.
2727
+
2728
+ Returns
2729
+ -------
2730
+ DnsRecord
2731
+ API response as a typed Pydantic model
2732
+
2733
+ Raises
2734
+ ------
2735
+ AppwriteException
2736
+ If API request fails
2737
+ """
2738
+
2739
+ api_path = '/domains/{domainId}/records/txt/{recordId}'
2740
+ api_params = {}
2741
+ if domain_id is None:
2742
+ raise AppwriteException('Missing required parameter: "domain_id"')
2743
+
2744
+ if record_id is None:
2745
+ raise AppwriteException('Missing required parameter: "record_id"')
2746
+
2747
+ if name is None:
2748
+ raise AppwriteException('Missing required parameter: "name"')
2749
+
2750
+ if value is None:
2751
+ raise AppwriteException('Missing required parameter: "value"')
2752
+
2753
+ if ttl is None:
2754
+ raise AppwriteException('Missing required parameter: "ttl"')
2755
+
2756
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2757
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2758
+
2759
+ api_params['name'] = self._normalize_value(name)
2760
+ api_params['value'] = self._normalize_value(value)
2761
+ api_params['ttl'] = self._normalize_value(ttl)
2762
+ if comment is not None:
2763
+ api_params['comment'] = self._normalize_value(comment)
2764
+
2765
+ response = self.client.call('put', api_path, {
2766
+ 'X-Appwrite-Project': self.client.get_config('project'),
2767
+ 'content-type': 'application/json',
2768
+ 'accept': 'application/json',
2769
+ }, api_params)
2770
+
2771
+ return self._parse_response(response, model=DnsRecord)
2772
+
2773
+
2774
+ def get_record(
2775
+ self,
2776
+ domain_id: str,
2777
+ record_id: str
2778
+ ) -> DnsRecord:
2779
+ """
2780
+ Get a single DNS record for a given domain by record ID.
2781
+
2782
+ This endpoint allows you to retrieve a specific DNS record associated with a domain
2783
+ using its unique identifier. The record contains information about the DNS configuration
2784
+ such as type, value, and TTL settings.
2785
+
2786
+ Parameters
2787
+ ----------
2788
+ domain_id : str
2789
+ Domain unique ID.
2790
+ record_id : str
2791
+ DNS record unique ID.
2792
+
2793
+ Returns
2794
+ -------
2795
+ DnsRecord
2796
+ API response as a typed Pydantic model
2797
+
2798
+ Raises
2799
+ ------
2800
+ AppwriteException
2801
+ If API request fails
2802
+ """
2803
+
2804
+ api_path = '/domains/{domainId}/records/{recordId}'
2805
+ api_params = {}
2806
+ if domain_id is None:
2807
+ raise AppwriteException('Missing required parameter: "domain_id"')
2808
+
2809
+ if record_id is None:
2810
+ raise AppwriteException('Missing required parameter: "record_id"')
2811
+
2812
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2813
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2814
+
2815
+
2816
+ response = self.client.call('get', api_path, {
2817
+ 'X-Appwrite-Project': self.client.get_config('project'),
2818
+ 'accept': 'application/json',
2819
+ }, api_params)
2820
+
2821
+ return self._parse_response(response, model=DnsRecord)
2822
+
2823
+
2824
+ def delete_record(
2825
+ self,
2826
+ domain_id: str,
2827
+ record_id: str
2828
+ ) -> Dict[str, Any]:
2829
+ """
2830
+ Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record
2831
+ from a specific domain.
2832
+
2833
+ Parameters
2834
+ ----------
2835
+ domain_id : str
2836
+ Domain unique ID.
2837
+ record_id : str
2838
+ DNS record unique ID.
2839
+
2840
+ Returns
2841
+ -------
2842
+ Dict[str, Any]
2843
+ API response as a dictionary
2844
+
2845
+ Raises
2846
+ ------
2847
+ AppwriteException
2848
+ If API request fails
2849
+ """
2850
+
2851
+ api_path = '/domains/{domainId}/records/{recordId}'
2852
+ api_params = {}
2853
+ if domain_id is None:
2854
+ raise AppwriteException('Missing required parameter: "domain_id"')
2855
+
2856
+ if record_id is None:
2857
+ raise AppwriteException('Missing required parameter: "record_id"')
2858
+
2859
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2860
+ api_path = api_path.replace('{recordId}', str(self._normalize_value(record_id)))
2861
+
2862
+
2863
+ response = self.client.call('delete', api_path, {
2864
+ 'X-Appwrite-Project': self.client.get_config('project'),
2865
+ 'content-type': 'application/json',
2866
+ 'accept': 'application/json',
2867
+ }, api_params)
2868
+
2869
+ return response
2870
+
2871
+
2872
+ def update_team(
2873
+ self,
2874
+ domain_id: str,
2875
+ team_id: str
2876
+ ) -> Domain:
2877
+ """
2878
+ Update the team ID for a specific domain. This endpoint requires admin access.
2879
+
2880
+ Updating the team ID will transfer ownership and access control of the domain
2881
+ and all its DNS records to the new team.
2882
+
2883
+ Parameters
2884
+ ----------
2885
+ domain_id : str
2886
+ Domain unique ID.
2887
+ team_id : str
2888
+ New team unique ID.
2889
+
2890
+ Returns
2891
+ -------
2892
+ Domain
2893
+ API response as a typed Pydantic model
2894
+
2895
+ Raises
2896
+ ------
2897
+ AppwriteException
2898
+ If API request fails
2899
+ """
2900
+
2901
+ api_path = '/domains/{domainId}/team'
2902
+ api_params = {}
2903
+ if domain_id is None:
2904
+ raise AppwriteException('Missing required parameter: "domain_id"')
2905
+
2906
+ if team_id is None:
2907
+ raise AppwriteException('Missing required parameter: "team_id"')
2908
+
2909
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2910
+
2911
+ api_params['teamId'] = self._normalize_value(team_id)
2912
+
2913
+ response = self.client.call('patch', api_path, {
2914
+ 'X-Appwrite-Project': self.client.get_config('project'),
2915
+ 'content-type': 'application/json',
2916
+ 'accept': 'application/json',
2917
+ }, api_params)
2918
+
2919
+ return self._parse_response(response, model=Domain)
2920
+
2921
+
2922
+ def get_transfer_status(
2923
+ self,
2924
+ domain_id: str
2925
+ ) -> DomainTransferStatus:
2926
+ """
2927
+ Retrieve the current transfer status for a domain. Returns the status, an optional reason, and a timestamp of the last status change.
2928
+
2929
+ Parameters
2930
+ ----------
2931
+ domain_id : str
2932
+ Domain unique ID.
2933
+
2934
+ Returns
2935
+ -------
2936
+ DomainTransferStatus
2937
+ API response as a typed Pydantic model
2938
+
2939
+ Raises
2940
+ ------
2941
+ AppwriteException
2942
+ If API request fails
2943
+ """
2944
+
2945
+ api_path = '/domains/{domainId}/transfers/status'
2946
+ api_params = {}
2947
+ if domain_id is None:
2948
+ raise AppwriteException('Missing required parameter: "domain_id"')
2949
+
2950
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2951
+
2952
+
2953
+ response = self.client.call('get', api_path, {
2954
+ 'X-Appwrite-Project': self.client.get_config('project'),
2955
+ 'accept': 'application/json',
2956
+ }, api_params)
2957
+
2958
+ return self._parse_response(response, model=DomainTransferStatus)
2959
+
2960
+
2961
+ def get_zone(
2962
+ self,
2963
+ domain_id: str
2964
+ ) -> Dict[str, Any]:
2965
+ """
2966
+ Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
2967
+ zone file in a standardized format that can be used to configure DNS servers.
2968
+
2969
+ Parameters
2970
+ ----------
2971
+ domain_id : str
2972
+ Domain unique ID.
2973
+
2974
+ Returns
2975
+ -------
2976
+ Dict[str, Any]
2977
+ API response as a dictionary
2978
+
2979
+ Raises
2980
+ ------
2981
+ AppwriteException
2982
+ If API request fails
2983
+ """
2984
+
2985
+ api_path = '/domains/{domainId}/zone'
2986
+ api_params = {}
2987
+ if domain_id is None:
2988
+ raise AppwriteException('Missing required parameter: "domain_id"')
2989
+
2990
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
2991
+
2992
+
2993
+ response = self.client.call('get', api_path, {
2994
+ 'X-Appwrite-Project': self.client.get_config('project'),
2995
+ 'accept': 'text/plain',
2996
+ }, api_params)
2997
+
2998
+ return response
2999
+
3000
+
3001
+ def update_zone(
3002
+ self,
3003
+ domain_id: str,
3004
+ content: str
3005
+ ) -> Domain:
3006
+ """
3007
+ Update the DNS zone for the given domain using the provided zone file content.
3008
+ All parsed records are imported and then the main domain document is returned.
3009
+
3010
+ Parameters
3011
+ ----------
3012
+ domain_id : str
3013
+ Domain unique ID.
3014
+ content : str
3015
+ DNS zone file content as a string.
3016
+
3017
+ Returns
3018
+ -------
3019
+ Domain
3020
+ API response as a typed Pydantic model
3021
+
3022
+ Raises
3023
+ ------
3024
+ AppwriteException
3025
+ If API request fails
3026
+ """
3027
+
3028
+ api_path = '/domains/{domainId}/zone'
3029
+ api_params = {}
3030
+ if domain_id is None:
3031
+ raise AppwriteException('Missing required parameter: "domain_id"')
3032
+
3033
+ if content is None:
3034
+ raise AppwriteException('Missing required parameter: "content"')
3035
+
3036
+ api_path = api_path.replace('{domainId}', str(self._normalize_value(domain_id)))
3037
+
3038
+ api_params['content'] = self._normalize_value(content)
3039
+
3040
+ response = self.client.call('put', api_path, {
3041
+ 'X-Appwrite-Project': self.client.get_config('project'),
3042
+ 'content-type': 'application/json',
3043
+ 'accept': 'application/json',
3044
+ }, api_params)
3045
+
3046
+ return self._parse_response(response, model=Domain)
3047
+