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,1014 @@
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.waf_rule_list import WafRuleList
7
+ from ..models.waf_rule_bypass import WafRuleBypass
8
+ from ..models.waf_rule_challenge import WafRuleChallenge
9
+ from ..models.waf_rule_deny import WafRuleDeny
10
+ from ..models.waf_rule_rate_limit import WafRuleRateLimit
11
+ from ..models.waf_rule_redirect import WafRuleRedirect
12
+ from ..models.waf_rule import WafRule
13
+
14
+ class Waf(Service):
15
+
16
+ def __init__(self, client) -> None:
17
+ super(Waf, self).__init__(client)
18
+
19
+ def list_rules(
20
+ self,
21
+ queries: Optional[List[str]] = None,
22
+ search: Optional[str] = None,
23
+ total: Optional[bool] = None
24
+ ) -> WafRuleList:
25
+ """
26
+ List WAF rules for the current project.
27
+
28
+
29
+ Parameters
30
+ ----------
31
+ queries : Optional[List[str]]
32
+ Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
33
+ search : Optional[str]
34
+ Search term to filter your list results. Max length: 256 chars.
35
+ total : Optional[bool]
36
+ When set to false, the total count returned will be 0 and will not be calculated.
37
+
38
+ Returns
39
+ -------
40
+ WafRuleList
41
+ API response as a typed Pydantic model
42
+
43
+ Raises
44
+ ------
45
+ AppwriteException
46
+ If API request fails
47
+ """
48
+
49
+ api_path = '/waf/rules'
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
+ if total is not None:
57
+ api_params['total'] = self._normalize_value(total)
58
+
59
+ response = self.client.call('get', api_path, {
60
+ 'X-Appwrite-Project': self.client.get_config('project'),
61
+ 'accept': 'application/json',
62
+ }, api_params)
63
+
64
+ return self._parse_response(response, model=WafRuleList)
65
+
66
+
67
+ def create_bypass_rule(
68
+ self,
69
+ rule_id: str,
70
+ resource_type: str,
71
+ name: str,
72
+ resource_id: Optional[str] = None,
73
+ description: Optional[str] = None,
74
+ priority: Optional[float] = None,
75
+ enabled: Optional[bool] = None,
76
+ conditions: Optional[str] = None
77
+ ) -> WafRuleBypass:
78
+ """
79
+ Create a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
80
+
81
+
82
+ Parameters
83
+ ----------
84
+ rule_id : str
85
+ Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
86
+ resource_type : str
87
+ Resource type the rule applies to.
88
+ name : str
89
+ Rule name.
90
+ resource_id : Optional[str]
91
+ Resource identifier. Leave empty for the API resource type.
92
+ description : Optional[str]
93
+ Optional description for the rule.
94
+ priority : Optional[float]
95
+ Evaluation priority. Lower numbers run earlier.
96
+ enabled : Optional[bool]
97
+ Set to false to create the rule in a disabled state.
98
+ conditions : Optional[str]
99
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
100
+
101
+ Returns
102
+ -------
103
+ WafRuleBypass
104
+ API response as a typed Pydantic model
105
+
106
+ Raises
107
+ ------
108
+ AppwriteException
109
+ If API request fails
110
+ """
111
+
112
+ api_path = '/waf/rules/bypass'
113
+ api_params = {}
114
+ if rule_id is None:
115
+ raise AppwriteException('Missing required parameter: "rule_id"')
116
+
117
+ if resource_type is None:
118
+ raise AppwriteException('Missing required parameter: "resource_type"')
119
+
120
+ if name is None:
121
+ raise AppwriteException('Missing required parameter: "name"')
122
+
123
+
124
+ api_params['ruleId'] = self._normalize_value(rule_id)
125
+ api_params['resourceType'] = self._normalize_value(resource_type)
126
+ if resource_id is not None:
127
+ api_params['resourceId'] = self._normalize_value(resource_id)
128
+ api_params['name'] = self._normalize_value(name)
129
+ if description is not None:
130
+ api_params['description'] = self._normalize_value(description)
131
+ if priority is not None:
132
+ api_params['priority'] = self._normalize_value(priority)
133
+ if enabled is not None:
134
+ api_params['enabled'] = self._normalize_value(enabled)
135
+ if conditions is not None:
136
+ api_params['conditions'] = self._normalize_value(conditions)
137
+
138
+ response = self.client.call('post', api_path, {
139
+ 'X-Appwrite-Project': self.client.get_config('project'),
140
+ 'content-type': 'application/json',
141
+ 'accept': 'application/json',
142
+ }, api_params)
143
+
144
+ return self._parse_response(response, model=WafRuleBypass)
145
+
146
+
147
+ def update_bypass_rule(
148
+ self,
149
+ rule_id: str,
150
+ resource_type: Optional[str] = None,
151
+ resource_id: Optional[str] = None,
152
+ name: Optional[str] = None,
153
+ description: Optional[str] = None,
154
+ priority: Optional[float] = None,
155
+ enabled: Optional[bool] = None,
156
+ conditions: Optional[str] = None
157
+ ) -> WafRuleBypass:
158
+ """
159
+ Update a bypass WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
160
+
161
+
162
+ Parameters
163
+ ----------
164
+ rule_id : str
165
+ Rule ID.
166
+ resource_type : Optional[str]
167
+ Resource type the rule applies to.
168
+ resource_id : Optional[str]
169
+ Resource identifier. Required for functions and sites.
170
+ name : Optional[str]
171
+ Rule name.
172
+ description : Optional[str]
173
+ Optional description for the rule.
174
+ priority : Optional[float]
175
+ Evaluation priority. Lower numbers run earlier.
176
+ enabled : Optional[bool]
177
+ Set to false to disable the rule.
178
+ conditions : Optional[str]
179
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
180
+
181
+ Returns
182
+ -------
183
+ WafRuleBypass
184
+ API response as a typed Pydantic model
185
+
186
+ Raises
187
+ ------
188
+ AppwriteException
189
+ If API request fails
190
+ """
191
+
192
+ api_path = '/waf/rules/bypass/{ruleId}'
193
+ api_params = {}
194
+ if rule_id is None:
195
+ raise AppwriteException('Missing required parameter: "rule_id"')
196
+
197
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
198
+
199
+ if resource_type is not None:
200
+ api_params['resourceType'] = self._normalize_value(resource_type)
201
+ if resource_id is not None:
202
+ api_params['resourceId'] = self._normalize_value(resource_id)
203
+ if name is not None:
204
+ api_params['name'] = self._normalize_value(name)
205
+ if description is not None:
206
+ api_params['description'] = self._normalize_value(description)
207
+ if priority is not None:
208
+ api_params['priority'] = self._normalize_value(priority)
209
+ if enabled is not None:
210
+ api_params['enabled'] = self._normalize_value(enabled)
211
+ if conditions is not None:
212
+ api_params['conditions'] = self._normalize_value(conditions)
213
+
214
+ response = self.client.call('patch', api_path, {
215
+ 'X-Appwrite-Project': self.client.get_config('project'),
216
+ 'content-type': 'application/json',
217
+ 'accept': 'application/json',
218
+ }, api_params)
219
+
220
+ return self._parse_response(response, model=WafRuleBypass)
221
+
222
+
223
+ def create_challenge_rule(
224
+ self,
225
+ rule_id: str,
226
+ resource_type: str,
227
+ name: str,
228
+ resource_id: Optional[str] = None,
229
+ description: Optional[str] = None,
230
+ challenge_type: Optional[str] = None,
231
+ priority: Optional[float] = None,
232
+ enabled: Optional[bool] = None,
233
+ conditions: Optional[str] = None,
234
+ difficulty: Optional[float] = None,
235
+ ttl: Optional[float] = None
236
+ ) -> WafRuleChallenge:
237
+ """
238
+ Create a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
239
+
240
+
241
+ Parameters
242
+ ----------
243
+ rule_id : str
244
+ Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
245
+ resource_type : str
246
+ Resource type the rule applies to.
247
+ name : str
248
+ Rule name.
249
+ resource_id : Optional[str]
250
+ Resource identifier. Required for functions and sites.
251
+ description : Optional[str]
252
+ Optional description for the rule.
253
+ challenge_type : Optional[str]
254
+ Challenge type enforced by the rule.
255
+ priority : Optional[float]
256
+ Evaluation priority. Lower numbers run earlier.
257
+ enabled : Optional[bool]
258
+ Set to false to create the rule in a disabled state.
259
+ conditions : Optional[str]
260
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
261
+ difficulty : Optional[float]
262
+ Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
263
+ ttl : Optional[float]
264
+ How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
265
+
266
+ Returns
267
+ -------
268
+ WafRuleChallenge
269
+ API response as a typed Pydantic model
270
+
271
+ Raises
272
+ ------
273
+ AppwriteException
274
+ If API request fails
275
+ """
276
+
277
+ api_path = '/waf/rules/challenge'
278
+ api_params = {}
279
+ if rule_id is None:
280
+ raise AppwriteException('Missing required parameter: "rule_id"')
281
+
282
+ if resource_type is None:
283
+ raise AppwriteException('Missing required parameter: "resource_type"')
284
+
285
+ if name is None:
286
+ raise AppwriteException('Missing required parameter: "name"')
287
+
288
+
289
+ api_params['ruleId'] = self._normalize_value(rule_id)
290
+ api_params['resourceType'] = self._normalize_value(resource_type)
291
+ if resource_id is not None:
292
+ api_params['resourceId'] = self._normalize_value(resource_id)
293
+ api_params['name'] = self._normalize_value(name)
294
+ if description is not None:
295
+ api_params['description'] = self._normalize_value(description)
296
+ if challenge_type is not None:
297
+ api_params['challengeType'] = self._normalize_value(challenge_type)
298
+ if priority is not None:
299
+ api_params['priority'] = self._normalize_value(priority)
300
+ if enabled is not None:
301
+ api_params['enabled'] = self._normalize_value(enabled)
302
+ if conditions is not None:
303
+ api_params['conditions'] = self._normalize_value(conditions)
304
+ if difficulty is not None:
305
+ api_params['difficulty'] = self._normalize_value(difficulty)
306
+ if ttl is not None:
307
+ api_params['ttl'] = self._normalize_value(ttl)
308
+
309
+ response = self.client.call('post', api_path, {
310
+ 'X-Appwrite-Project': self.client.get_config('project'),
311
+ 'content-type': 'application/json',
312
+ 'accept': 'application/json',
313
+ }, api_params)
314
+
315
+ return self._parse_response(response, model=WafRuleChallenge)
316
+
317
+
318
+ def update_challenge_rule(
319
+ self,
320
+ rule_id: str,
321
+ resource_type: Optional[str] = None,
322
+ resource_id: Optional[str] = None,
323
+ name: Optional[str] = None,
324
+ description: Optional[str] = None,
325
+ challenge_type: Optional[str] = None,
326
+ priority: Optional[float] = None,
327
+ enabled: Optional[bool] = None,
328
+ conditions: Optional[str] = None,
329
+ difficulty: Optional[float] = None,
330
+ ttl: Optional[float] = None
331
+ ) -> WafRuleChallenge:
332
+ """
333
+ Update a challenge WAF rule. Use `difficulty` (1 easiest to 5 hardest) to tune the client-side proof-of-work cost, and `ttl` to control how long, in seconds, a visitor stays cleared after passing the challenge before being challenged again. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
334
+
335
+
336
+ Parameters
337
+ ----------
338
+ rule_id : str
339
+ Rule ID.
340
+ resource_type : Optional[str]
341
+ Resource type the rule applies to.
342
+ resource_id : Optional[str]
343
+ Resource identifier. Required for functions and sites.
344
+ name : Optional[str]
345
+ Rule name.
346
+ description : Optional[str]
347
+ Optional description for the rule.
348
+ challenge_type : Optional[str]
349
+ Challenge type enforced by the rule.
350
+ priority : Optional[float]
351
+ Evaluation priority. Lower numbers run earlier.
352
+ enabled : Optional[bool]
353
+ Set to false to disable the rule.
354
+ conditions : Optional[str]
355
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
356
+ difficulty : Optional[float]
357
+ Challenge difficulty from 1 (easiest) to 5 (hardest). Higher values demand more client-side proof-of-work.
358
+ ttl : Optional[float]
359
+ How long, in seconds, a visitor stays cleared after passing the challenge before being challenged again.
360
+
361
+ Returns
362
+ -------
363
+ WafRuleChallenge
364
+ API response as a typed Pydantic model
365
+
366
+ Raises
367
+ ------
368
+ AppwriteException
369
+ If API request fails
370
+ """
371
+
372
+ api_path = '/waf/rules/challenge/{ruleId}'
373
+ api_params = {}
374
+ if rule_id is None:
375
+ raise AppwriteException('Missing required parameter: "rule_id"')
376
+
377
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
378
+
379
+ if resource_type is not None:
380
+ api_params['resourceType'] = self._normalize_value(resource_type)
381
+ if resource_id is not None:
382
+ api_params['resourceId'] = self._normalize_value(resource_id)
383
+ if name is not None:
384
+ api_params['name'] = self._normalize_value(name)
385
+ if description is not None:
386
+ api_params['description'] = self._normalize_value(description)
387
+ if challenge_type is not None:
388
+ api_params['challengeType'] = self._normalize_value(challenge_type)
389
+ if priority is not None:
390
+ api_params['priority'] = self._normalize_value(priority)
391
+ if enabled is not None:
392
+ api_params['enabled'] = self._normalize_value(enabled)
393
+ if conditions is not None:
394
+ api_params['conditions'] = self._normalize_value(conditions)
395
+ if difficulty is not None:
396
+ api_params['difficulty'] = self._normalize_value(difficulty)
397
+ if ttl is not None:
398
+ api_params['ttl'] = self._normalize_value(ttl)
399
+
400
+ response = self.client.call('patch', api_path, {
401
+ 'X-Appwrite-Project': self.client.get_config('project'),
402
+ 'content-type': 'application/json',
403
+ 'accept': 'application/json',
404
+ }, api_params)
405
+
406
+ return self._parse_response(response, model=WafRuleChallenge)
407
+
408
+
409
+ def create_deny_rule(
410
+ self,
411
+ rule_id: str,
412
+ resource_type: str,
413
+ name: str,
414
+ resource_id: Optional[str] = None,
415
+ description: Optional[str] = None,
416
+ priority: Optional[float] = None,
417
+ enabled: Optional[bool] = None,
418
+ conditions: Optional[str] = None
419
+ ) -> WafRuleDeny:
420
+ """
421
+ Create a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
422
+
423
+
424
+ Parameters
425
+ ----------
426
+ rule_id : str
427
+ Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
428
+ resource_type : str
429
+ Resource type the rule applies to.
430
+ name : str
431
+ Rule name.
432
+ resource_id : Optional[str]
433
+ Resource identifier. Required for functions and sites.
434
+ description : Optional[str]
435
+ Optional description for the rule.
436
+ priority : Optional[float]
437
+ Evaluation priority. Lower numbers run earlier.
438
+ enabled : Optional[bool]
439
+ Set to false to create the rule in a disabled state.
440
+ conditions : Optional[str]
441
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
442
+
443
+ Returns
444
+ -------
445
+ WafRuleDeny
446
+ API response as a typed Pydantic model
447
+
448
+ Raises
449
+ ------
450
+ AppwriteException
451
+ If API request fails
452
+ """
453
+
454
+ api_path = '/waf/rules/deny'
455
+ api_params = {}
456
+ if rule_id is None:
457
+ raise AppwriteException('Missing required parameter: "rule_id"')
458
+
459
+ if resource_type is None:
460
+ raise AppwriteException('Missing required parameter: "resource_type"')
461
+
462
+ if name is None:
463
+ raise AppwriteException('Missing required parameter: "name"')
464
+
465
+
466
+ api_params['ruleId'] = self._normalize_value(rule_id)
467
+ api_params['resourceType'] = self._normalize_value(resource_type)
468
+ if resource_id is not None:
469
+ api_params['resourceId'] = self._normalize_value(resource_id)
470
+ api_params['name'] = self._normalize_value(name)
471
+ if description is not None:
472
+ api_params['description'] = self._normalize_value(description)
473
+ if priority is not None:
474
+ api_params['priority'] = self._normalize_value(priority)
475
+ if enabled is not None:
476
+ api_params['enabled'] = self._normalize_value(enabled)
477
+ if conditions is not None:
478
+ api_params['conditions'] = self._normalize_value(conditions)
479
+
480
+ response = self.client.call('post', api_path, {
481
+ 'X-Appwrite-Project': self.client.get_config('project'),
482
+ 'content-type': 'application/json',
483
+ 'accept': 'application/json',
484
+ }, api_params)
485
+
486
+ return self._parse_response(response, model=WafRuleDeny)
487
+
488
+
489
+ def update_deny_rule(
490
+ self,
491
+ rule_id: str,
492
+ resource_type: Optional[str] = None,
493
+ resource_id: Optional[str] = None,
494
+ name: Optional[str] = None,
495
+ description: Optional[str] = None,
496
+ priority: Optional[float] = None,
497
+ enabled: Optional[bool] = None,
498
+ conditions: Optional[str] = None
499
+ ) -> WafRuleDeny:
500
+ """
501
+ Update a deny WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
502
+
503
+
504
+ Parameters
505
+ ----------
506
+ rule_id : str
507
+ Rule ID.
508
+ resource_type : Optional[str]
509
+ Resource type the rule applies to.
510
+ resource_id : Optional[str]
511
+ Resource identifier. Required for functions and sites.
512
+ name : Optional[str]
513
+ Rule name.
514
+ description : Optional[str]
515
+ Optional description for the rule.
516
+ priority : Optional[float]
517
+ Evaluation priority. Lower numbers run earlier.
518
+ enabled : Optional[bool]
519
+ Set to false to disable the rule.
520
+ conditions : Optional[str]
521
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
522
+
523
+ Returns
524
+ -------
525
+ WafRuleDeny
526
+ API response as a typed Pydantic model
527
+
528
+ Raises
529
+ ------
530
+ AppwriteException
531
+ If API request fails
532
+ """
533
+
534
+ api_path = '/waf/rules/deny/{ruleId}'
535
+ api_params = {}
536
+ if rule_id is None:
537
+ raise AppwriteException('Missing required parameter: "rule_id"')
538
+
539
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
540
+
541
+ if resource_type is not None:
542
+ api_params['resourceType'] = self._normalize_value(resource_type)
543
+ if resource_id is not None:
544
+ api_params['resourceId'] = self._normalize_value(resource_id)
545
+ if name is not None:
546
+ api_params['name'] = self._normalize_value(name)
547
+ if description is not None:
548
+ api_params['description'] = self._normalize_value(description)
549
+ if priority is not None:
550
+ api_params['priority'] = self._normalize_value(priority)
551
+ if enabled is not None:
552
+ api_params['enabled'] = self._normalize_value(enabled)
553
+ if conditions is not None:
554
+ api_params['conditions'] = self._normalize_value(conditions)
555
+
556
+ response = self.client.call('patch', api_path, {
557
+ 'X-Appwrite-Project': self.client.get_config('project'),
558
+ 'content-type': 'application/json',
559
+ 'accept': 'application/json',
560
+ }, api_params)
561
+
562
+ return self._parse_response(response, model=WafRuleDeny)
563
+
564
+
565
+ def create_rate_limit_rule(
566
+ self,
567
+ rule_id: str,
568
+ resource_type: str,
569
+ name: str,
570
+ limit: float,
571
+ interval: float,
572
+ resource_id: Optional[str] = None,
573
+ description: Optional[str] = None,
574
+ key: Optional[str] = None,
575
+ priority: Optional[float] = None,
576
+ enabled: Optional[bool] = None,
577
+ conditions: Optional[str] = None
578
+ ) -> WafRuleRateLimit:
579
+ """
580
+ Create a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
581
+
582
+
583
+ Parameters
584
+ ----------
585
+ rule_id : str
586
+ Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
587
+ resource_type : str
588
+ Resource type the rule applies to.
589
+ name : str
590
+ Rule name.
591
+ limit : float
592
+ Maximum number of matching requests allowed in the configured interval.
593
+ interval : float
594
+ Interval in seconds used for rate limiting.
595
+ resource_id : Optional[str]
596
+ Resource identifier. Required for functions and sites.
597
+ description : Optional[str]
598
+ Optional description for the rule.
599
+ key : Optional[str]
600
+ Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
601
+ priority : Optional[float]
602
+ Evaluation priority. Lower numbers run earlier.
603
+ enabled : Optional[bool]
604
+ Set to false to create the rule in a disabled state.
605
+ conditions : Optional[str]
606
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
607
+
608
+ Returns
609
+ -------
610
+ WafRuleRateLimit
611
+ API response as a typed Pydantic model
612
+
613
+ Raises
614
+ ------
615
+ AppwriteException
616
+ If API request fails
617
+ """
618
+
619
+ api_path = '/waf/rules/rate-limit'
620
+ api_params = {}
621
+ if rule_id is None:
622
+ raise AppwriteException('Missing required parameter: "rule_id"')
623
+
624
+ if resource_type is None:
625
+ raise AppwriteException('Missing required parameter: "resource_type"')
626
+
627
+ if name is None:
628
+ raise AppwriteException('Missing required parameter: "name"')
629
+
630
+ if limit is None:
631
+ raise AppwriteException('Missing required parameter: "limit"')
632
+
633
+ if interval is None:
634
+ raise AppwriteException('Missing required parameter: "interval"')
635
+
636
+
637
+ api_params['ruleId'] = self._normalize_value(rule_id)
638
+ api_params['resourceType'] = self._normalize_value(resource_type)
639
+ if resource_id is not None:
640
+ api_params['resourceId'] = self._normalize_value(resource_id)
641
+ api_params['name'] = self._normalize_value(name)
642
+ if description is not None:
643
+ api_params['description'] = self._normalize_value(description)
644
+ api_params['limit'] = self._normalize_value(limit)
645
+ api_params['interval'] = self._normalize_value(interval)
646
+ if key is not None:
647
+ api_params['key'] = self._normalize_value(key)
648
+ if priority is not None:
649
+ api_params['priority'] = self._normalize_value(priority)
650
+ if enabled is not None:
651
+ api_params['enabled'] = self._normalize_value(enabled)
652
+ if conditions is not None:
653
+ api_params['conditions'] = self._normalize_value(conditions)
654
+
655
+ response = self.client.call('post', api_path, {
656
+ 'X-Appwrite-Project': self.client.get_config('project'),
657
+ 'content-type': 'application/json',
658
+ 'accept': 'application/json',
659
+ }, api_params)
660
+
661
+ return self._parse_response(response, model=WafRuleRateLimit)
662
+
663
+
664
+ def update_rate_limit_rule(
665
+ self,
666
+ rule_id: str,
667
+ resource_type: Optional[str] = None,
668
+ resource_id: Optional[str] = None,
669
+ name: Optional[str] = None,
670
+ description: Optional[str] = None,
671
+ limit: Optional[float] = None,
672
+ interval: Optional[float] = None,
673
+ key: Optional[str] = None,
674
+ priority: Optional[float] = None,
675
+ enabled: Optional[bool] = None,
676
+ conditions: Optional[str] = None
677
+ ) -> WafRuleRateLimit:
678
+ """
679
+ Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
680
+
681
+
682
+ Parameters
683
+ ----------
684
+ rule_id : str
685
+ Rule ID.
686
+ resource_type : Optional[str]
687
+ Resource type the rule applies to.
688
+ resource_id : Optional[str]
689
+ Resource identifier. Required for functions and sites.
690
+ name : Optional[str]
691
+ Rule name.
692
+ description : Optional[str]
693
+ Optional description for the rule.
694
+ limit : Optional[float]
695
+ Maximum number of matching requests allowed in the configured interval.
696
+ interval : Optional[float]
697
+ Interval in seconds used for rate limiting.
698
+ key : Optional[str]
699
+ Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
700
+ priority : Optional[float]
701
+ Evaluation priority. Lower numbers run earlier.
702
+ enabled : Optional[bool]
703
+ Set to false to disable the rule.
704
+ conditions : Optional[str]
705
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
706
+
707
+ Returns
708
+ -------
709
+ WafRuleRateLimit
710
+ API response as a typed Pydantic model
711
+
712
+ Raises
713
+ ------
714
+ AppwriteException
715
+ If API request fails
716
+ """
717
+
718
+ api_path = '/waf/rules/rate-limit/{ruleId}'
719
+ api_params = {}
720
+ if rule_id is None:
721
+ raise AppwriteException('Missing required parameter: "rule_id"')
722
+
723
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
724
+
725
+ if resource_type is not None:
726
+ api_params['resourceType'] = self._normalize_value(resource_type)
727
+ if resource_id is not None:
728
+ api_params['resourceId'] = self._normalize_value(resource_id)
729
+ if name is not None:
730
+ api_params['name'] = self._normalize_value(name)
731
+ if description is not None:
732
+ api_params['description'] = self._normalize_value(description)
733
+ if limit is not None:
734
+ api_params['limit'] = self._normalize_value(limit)
735
+ if interval is not None:
736
+ api_params['interval'] = self._normalize_value(interval)
737
+ if key is not None:
738
+ api_params['key'] = self._normalize_value(key)
739
+ if priority is not None:
740
+ api_params['priority'] = self._normalize_value(priority)
741
+ if enabled is not None:
742
+ api_params['enabled'] = self._normalize_value(enabled)
743
+ if conditions is not None:
744
+ api_params['conditions'] = self._normalize_value(conditions)
745
+
746
+ response = self.client.call('patch', api_path, {
747
+ 'X-Appwrite-Project': self.client.get_config('project'),
748
+ 'content-type': 'application/json',
749
+ 'accept': 'application/json',
750
+ }, api_params)
751
+
752
+ return self._parse_response(response, model=WafRuleRateLimit)
753
+
754
+
755
+ def create_redirect_rule(
756
+ self,
757
+ rule_id: str,
758
+ resource_type: str,
759
+ name: str,
760
+ location: str,
761
+ status_code: float,
762
+ resource_id: Optional[str] = None,
763
+ description: Optional[str] = None,
764
+ priority: Optional[float] = None,
765
+ enabled: Optional[bool] = None,
766
+ conditions: Optional[str] = None
767
+ ) -> WafRuleRedirect:
768
+ """
769
+ Create a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
770
+
771
+
772
+ Parameters
773
+ ----------
774
+ rule_id : str
775
+ Rule ID. Choose a custom ID or pass `ID.unique()` to generate a unique one.
776
+ resource_type : str
777
+ Resource type the rule applies to.
778
+ name : str
779
+ Rule name.
780
+ location : str
781
+ Location used for redirect responses.
782
+ status_code : float
783
+ Integer status code used for redirect responses.
784
+ resource_id : Optional[str]
785
+ Resource identifier. Required for functions and sites.
786
+ description : Optional[str]
787
+ Optional description for the rule.
788
+ priority : Optional[float]
789
+ Evaluation priority. Lower numbers run earlier.
790
+ enabled : Optional[bool]
791
+ Set to false to create the rule in a disabled state.
792
+ conditions : Optional[str]
793
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
794
+
795
+ Returns
796
+ -------
797
+ WafRuleRedirect
798
+ API response as a typed Pydantic model
799
+
800
+ Raises
801
+ ------
802
+ AppwriteException
803
+ If API request fails
804
+ """
805
+
806
+ api_path = '/waf/rules/redirect'
807
+ api_params = {}
808
+ if rule_id is None:
809
+ raise AppwriteException('Missing required parameter: "rule_id"')
810
+
811
+ if resource_type is None:
812
+ raise AppwriteException('Missing required parameter: "resource_type"')
813
+
814
+ if name is None:
815
+ raise AppwriteException('Missing required parameter: "name"')
816
+
817
+ if location is None:
818
+ raise AppwriteException('Missing required parameter: "location"')
819
+
820
+ if status_code is None:
821
+ raise AppwriteException('Missing required parameter: "status_code"')
822
+
823
+
824
+ api_params['ruleId'] = self._normalize_value(rule_id)
825
+ api_params['resourceType'] = self._normalize_value(resource_type)
826
+ if resource_id is not None:
827
+ api_params['resourceId'] = self._normalize_value(resource_id)
828
+ api_params['name'] = self._normalize_value(name)
829
+ if description is not None:
830
+ api_params['description'] = self._normalize_value(description)
831
+ api_params['location'] = self._normalize_value(location)
832
+ api_params['statusCode'] = self._normalize_value(status_code)
833
+ if priority is not None:
834
+ api_params['priority'] = self._normalize_value(priority)
835
+ if enabled is not None:
836
+ api_params['enabled'] = self._normalize_value(enabled)
837
+ if conditions is not None:
838
+ api_params['conditions'] = self._normalize_value(conditions)
839
+
840
+ response = self.client.call('post', api_path, {
841
+ 'X-Appwrite-Project': self.client.get_config('project'),
842
+ 'content-type': 'application/json',
843
+ 'accept': 'application/json',
844
+ }, api_params)
845
+
846
+ return self._parse_response(response, model=WafRuleRedirect)
847
+
848
+
849
+ def update_redirect_rule(
850
+ self,
851
+ rule_id: str,
852
+ resource_type: Optional[str] = None,
853
+ resource_id: Optional[str] = None,
854
+ name: Optional[str] = None,
855
+ description: Optional[str] = None,
856
+ location: Optional[str] = None,
857
+ status_code: Optional[float] = None,
858
+ priority: Optional[float] = None,
859
+ enabled: Optional[bool] = None,
860
+ conditions: Optional[str] = None
861
+ ) -> WafRuleRedirect:
862
+ """
863
+ Update a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
864
+
865
+
866
+ Parameters
867
+ ----------
868
+ rule_id : str
869
+ Rule ID.
870
+ resource_type : Optional[str]
871
+ Resource type the rule applies to.
872
+ resource_id : Optional[str]
873
+ Resource identifier. Required for functions and sites.
874
+ name : Optional[str]
875
+ Rule name.
876
+ description : Optional[str]
877
+ Optional description for the rule.
878
+ location : Optional[str]
879
+ Location used for redirect responses.
880
+ status_code : Optional[float]
881
+ Integer status code used for redirect responses.
882
+ priority : Optional[float]
883
+ Evaluation priority. Lower numbers run earlier.
884
+ enabled : Optional[bool]
885
+ Set to false to disable the rule.
886
+ conditions : Optional[str]
887
+ Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
888
+
889
+ Returns
890
+ -------
891
+ WafRuleRedirect
892
+ API response as a typed Pydantic model
893
+
894
+ Raises
895
+ ------
896
+ AppwriteException
897
+ If API request fails
898
+ """
899
+
900
+ api_path = '/waf/rules/redirect/{ruleId}'
901
+ api_params = {}
902
+ if rule_id is None:
903
+ raise AppwriteException('Missing required parameter: "rule_id"')
904
+
905
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
906
+
907
+ if resource_type is not None:
908
+ api_params['resourceType'] = self._normalize_value(resource_type)
909
+ if resource_id is not None:
910
+ api_params['resourceId'] = self._normalize_value(resource_id)
911
+ if name is not None:
912
+ api_params['name'] = self._normalize_value(name)
913
+ if description is not None:
914
+ api_params['description'] = self._normalize_value(description)
915
+ if location is not None:
916
+ api_params['location'] = self._normalize_value(location)
917
+ if status_code is not None:
918
+ api_params['statusCode'] = self._normalize_value(status_code)
919
+ if priority is not None:
920
+ api_params['priority'] = self._normalize_value(priority)
921
+ if enabled is not None:
922
+ api_params['enabled'] = self._normalize_value(enabled)
923
+ if conditions is not None:
924
+ api_params['conditions'] = self._normalize_value(conditions)
925
+
926
+ response = self.client.call('patch', api_path, {
927
+ 'X-Appwrite-Project': self.client.get_config('project'),
928
+ 'content-type': 'application/json',
929
+ 'accept': 'application/json',
930
+ }, api_params)
931
+
932
+ return self._parse_response(response, model=WafRuleRedirect)
933
+
934
+
935
+ def get_rule(
936
+ self,
937
+ rule_id: str
938
+ ) -> WafRule:
939
+ """
940
+ Get a WAF rule by its ID.
941
+
942
+
943
+ Parameters
944
+ ----------
945
+ rule_id : str
946
+ Rule ID.
947
+
948
+ Returns
949
+ -------
950
+ WafRule
951
+ API response as a typed Pydantic model
952
+
953
+ Raises
954
+ ------
955
+ AppwriteException
956
+ If API request fails
957
+ """
958
+
959
+ api_path = '/waf/rules/{ruleId}'
960
+ api_params = {}
961
+ if rule_id is None:
962
+ raise AppwriteException('Missing required parameter: "rule_id"')
963
+
964
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
965
+
966
+
967
+ response = self.client.call('get', api_path, {
968
+ 'X-Appwrite-Project': self.client.get_config('project'),
969
+ 'accept': 'application/json',
970
+ }, api_params)
971
+
972
+ return self._parse_response(response, model=WafRule)
973
+
974
+
975
+ def delete_rule(
976
+ self,
977
+ rule_id: str
978
+ ) -> Dict[str, Any]:
979
+ """
980
+ Delete a WAF rule.
981
+
982
+
983
+ Parameters
984
+ ----------
985
+ rule_id : str
986
+ Rule ID.
987
+
988
+ Returns
989
+ -------
990
+ Dict[str, Any]
991
+ API response as a dictionary
992
+
993
+ Raises
994
+ ------
995
+ AppwriteException
996
+ If API request fails
997
+ """
998
+
999
+ api_path = '/waf/rules/{ruleId}'
1000
+ api_params = {}
1001
+ if rule_id is None:
1002
+ raise AppwriteException('Missing required parameter: "rule_id"')
1003
+
1004
+ api_path = api_path.replace('{ruleId}', str(self._normalize_value(rule_id)))
1005
+
1006
+
1007
+ response = self.client.call('delete', api_path, {
1008
+ 'X-Appwrite-Project': self.client.get_config('project'),
1009
+ 'content-type': 'application/json',
1010
+ 'accept': 'application/json',
1011
+ }, api_params)
1012
+
1013
+ return response
1014
+