appwrite 27.0.0 → 28.0.0.rc1

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 (404) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +27 -24
  3. data/lib/appwrite/enums/adapter.rb +1 -1
  4. data/lib/appwrite/enums/attribute_status.rb +1 -1
  5. data/lib/appwrite/enums/authentication_factor.rb +1 -1
  6. data/lib/appwrite/enums/authenticator_type.rb +1 -1
  7. data/lib/appwrite/enums/backup_services.rb +1 -1
  8. data/lib/appwrite/enums/billing_plan_group.rb +1 -1
  9. data/lib/appwrite/enums/browser.rb +1 -1
  10. data/lib/appwrite/enums/browser_permission.rb +1 -1
  11. data/lib/appwrite/enums/browser_theme.rb +1 -1
  12. data/lib/appwrite/enums/build_runtime.rb +2 -1
  13. data/lib/appwrite/enums/column_status.rb +1 -1
  14. data/lib/appwrite/enums/compression.rb +1 -1
  15. data/lib/appwrite/enums/credit_card.rb +1 -1
  16. data/lib/appwrite/enums/database_status.rb +1 -1
  17. data/lib/appwrite/enums/database_type.rb +1 -1
  18. data/lib/appwrite/enums/databases_index_type.rb +1 -1
  19. data/lib/appwrite/enums/deployment_download_type.rb +1 -1
  20. data/lib/appwrite/enums/deployment_status.rb +1 -1
  21. data/lib/appwrite/enums/documents_db_index_type.rb +9 -0
  22. data/lib/appwrite/enums/embedding_model.rb +1 -3
  23. data/lib/appwrite/enums/execution_method.rb +1 -1
  24. data/lib/appwrite/enums/execution_resource_type.rb +8 -0
  25. data/lib/appwrite/enums/execution_status.rb +1 -1
  26. data/lib/appwrite/enums/execution_trigger.rb +1 -1
  27. data/lib/appwrite/enums/flag.rb +1 -1
  28. data/lib/appwrite/enums/framework.rb +1 -1
  29. data/lib/appwrite/enums/image_format.rb +1 -1
  30. data/lib/appwrite/enums/image_gravity.rb +1 -1
  31. data/lib/appwrite/enums/index_status.rb +1 -1
  32. data/lib/appwrite/enums/invalidation_type.rb +1 -1
  33. data/lib/appwrite/enums/message_priority.rb +1 -1
  34. data/lib/appwrite/enums/message_status.rb +1 -1
  35. data/lib/appwrite/enums/messaging_provider_type.rb +1 -1
  36. data/lib/appwrite/enums/o_auth2_google_prompt.rb +1 -1
  37. data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +1 -1
  38. data/lib/appwrite/enums/o_auth_provider.rb +2 -1
  39. data/lib/appwrite/enums/order_by.rb +1 -1
  40. data/lib/appwrite/enums/organization_key_scopes.rb +1 -1
  41. data/lib/appwrite/enums/password_hash.rb +1 -1
  42. data/lib/appwrite/enums/platform_type.rb +1 -1
  43. data/lib/appwrite/enums/project_auth_method_id.rb +1 -1
  44. data/lib/appwrite/enums/project_email_template_id.rb +1 -1
  45. data/lib/appwrite/enums/project_email_template_locale.rb +1 -1
  46. data/lib/appwrite/enums/project_key_scopes.rb +14 -3
  47. data/lib/appwrite/enums/project_o_auth2_google_prompt.rb +1 -1
  48. data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +1 -1
  49. data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -1
  50. data/lib/appwrite/enums/project_policy_id.rb +1 -1
  51. data/lib/appwrite/enums/project_protocol_id.rb +1 -1
  52. data/lib/appwrite/enums/project_service_id.rb +1 -1
  53. data/lib/appwrite/enums/project_smtp_secure.rb +1 -1
  54. data/lib/appwrite/enums/proxy_resource_type.rb +1 -1
  55. data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -1
  56. data/lib/appwrite/enums/proxy_rule_status.rb +1 -1
  57. data/lib/appwrite/enums/region.rb +1 -1
  58. data/lib/appwrite/enums/relation_mutate.rb +1 -1
  59. data/lib/appwrite/enums/relationship_type.rb +1 -1
  60. data/lib/appwrite/enums/runtime.rb +2 -1
  61. data/lib/appwrite/enums/smtp_encryption.rb +1 -1
  62. data/lib/appwrite/enums/status_code.rb +1 -1
  63. data/lib/appwrite/enums/tables_db_index_type.rb +1 -1
  64. data/lib/appwrite/enums/template_reference_type.rb +1 -1
  65. data/lib/appwrite/enums/timezone.rb +1 -1
  66. data/lib/appwrite/enums/vcs_reference_type.rb +1 -1
  67. data/lib/appwrite/enums/vectors_db_index_type.rb +12 -0
  68. data/lib/appwrite/exception.rb +1 -1
  69. data/lib/appwrite/id.rb +3 -3
  70. data/lib/appwrite/input_file.rb +1 -1
  71. data/lib/appwrite/models/activity_event.rb +1 -1
  72. data/lib/appwrite/models/activity_event_list.rb +1 -1
  73. data/lib/appwrite/models/additional_resource.rb +1 -1
  74. data/lib/appwrite/models/algo_argon2.rb +1 -1
  75. data/lib/appwrite/models/algo_bcrypt.rb +1 -1
  76. data/lib/appwrite/models/algo_md5.rb +1 -1
  77. data/lib/appwrite/models/algo_phpass.rb +1 -1
  78. data/lib/appwrite/models/algo_scrypt.rb +1 -1
  79. data/lib/appwrite/models/algo_scrypt_modified.rb +1 -1
  80. data/lib/appwrite/models/algo_sha.rb +1 -1
  81. data/lib/appwrite/models/app.rb +1 -1
  82. data/lib/appwrite/models/app_installation.rb +2 -2
  83. data/lib/appwrite/models/app_installation_list.rb +1 -1
  84. data/lib/appwrite/models/app_key.rb +2 -2
  85. data/lib/appwrite/models/app_key_list.rb +1 -1
  86. data/lib/appwrite/models/app_scope.rb +1 -1
  87. data/lib/appwrite/models/app_scope_list.rb +1 -1
  88. data/lib/appwrite/models/app_secret.rb +2 -2
  89. data/lib/appwrite/models/app_secret_list.rb +1 -1
  90. data/lib/appwrite/models/app_secret_plaintext.rb +2 -2
  91. data/lib/appwrite/models/apps_list.rb +1 -1
  92. data/lib/appwrite/models/attribute_bigint.rb +5 -6
  93. data/lib/appwrite/models/attribute_boolean.rb +3 -4
  94. data/lib/appwrite/models/attribute_datetime.rb +3 -4
  95. data/lib/appwrite/models/attribute_email.rb +3 -4
  96. data/lib/appwrite/models/attribute_enum.rb +3 -4
  97. data/lib/appwrite/models/attribute_float.rb +5 -6
  98. data/lib/appwrite/models/attribute_integer.rb +5 -6
  99. data/lib/appwrite/models/attribute_ip.rb +3 -4
  100. data/lib/appwrite/models/attribute_line.rb +3 -4
  101. data/lib/appwrite/models/attribute_list.rb +1 -1
  102. data/lib/appwrite/models/attribute_longtext.rb +4 -5
  103. data/lib/appwrite/models/attribute_mediumtext.rb +4 -5
  104. data/lib/appwrite/models/attribute_object.rb +80 -0
  105. data/lib/appwrite/models/attribute_point.rb +3 -4
  106. data/lib/appwrite/models/attribute_polygon.rb +3 -4
  107. data/lib/appwrite/models/attribute_relationship.rb +2 -3
  108. data/lib/appwrite/models/attribute_string.rb +4 -5
  109. data/lib/appwrite/models/attribute_text.rb +4 -5
  110. data/lib/appwrite/models/attribute_url.rb +3 -4
  111. data/lib/appwrite/models/attribute_varchar.rb +4 -5
  112. data/lib/appwrite/models/attribute_vector.rb +85 -0
  113. data/lib/appwrite/models/backup_archive.rb +3 -3
  114. data/lib/appwrite/models/backup_archive_list.rb +1 -1
  115. data/lib/appwrite/models/backup_policy.rb +3 -3
  116. data/lib/appwrite/models/backup_policy_list.rb +1 -1
  117. data/lib/appwrite/models/backup_restoration.rb +1 -1
  118. data/lib/appwrite/models/backup_restoration_list.rb +1 -1
  119. data/lib/appwrite/models/billing_limits.rb +9 -9
  120. data/lib/appwrite/models/billing_plan.rb +19 -10
  121. data/lib/appwrite/models/billing_plan_addon.rb +3 -3
  122. data/lib/appwrite/models/billing_plan_addon_details.rb +2 -2
  123. data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +20 -20
  124. data/lib/appwrite/models/billing_plan_limits.rb +3 -3
  125. data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -1
  126. data/lib/appwrite/models/block.rb +3 -3
  127. data/lib/appwrite/models/bucket.rb +1 -1
  128. data/lib/appwrite/models/bucket_list.rb +1 -1
  129. data/lib/appwrite/models/collection.rb +1 -1
  130. data/lib/appwrite/models/collection_list.rb +1 -1
  131. data/lib/appwrite/models/column_bigint.rb +5 -6
  132. data/lib/appwrite/models/column_boolean.rb +3 -4
  133. data/lib/appwrite/models/column_datetime.rb +3 -4
  134. data/lib/appwrite/models/column_email.rb +3 -4
  135. data/lib/appwrite/models/column_enum.rb +3 -4
  136. data/lib/appwrite/models/column_float.rb +5 -6
  137. data/lib/appwrite/models/column_index.rb +2 -2
  138. data/lib/appwrite/models/column_index_list.rb +1 -1
  139. data/lib/appwrite/models/column_integer.rb +5 -6
  140. data/lib/appwrite/models/column_ip.rb +3 -4
  141. data/lib/appwrite/models/column_line.rb +3 -4
  142. data/lib/appwrite/models/column_list.rb +1 -1
  143. data/lib/appwrite/models/column_longtext.rb +4 -5
  144. data/lib/appwrite/models/column_mediumtext.rb +4 -5
  145. data/lib/appwrite/models/column_point.rb +3 -4
  146. data/lib/appwrite/models/column_polygon.rb +3 -4
  147. data/lib/appwrite/models/column_relationship.rb +2 -3
  148. data/lib/appwrite/models/column_string.rb +4 -5
  149. data/lib/appwrite/models/column_text.rb +4 -5
  150. data/lib/appwrite/models/column_url.rb +3 -4
  151. data/lib/appwrite/models/column_varchar.rb +4 -5
  152. data/lib/appwrite/models/continent.rb +1 -1
  153. data/lib/appwrite/models/continent_list.rb +1 -1
  154. data/lib/appwrite/models/country.rb +1 -1
  155. data/lib/appwrite/models/country_list.rb +1 -1
  156. data/lib/appwrite/models/currency.rb +1 -1
  157. data/lib/appwrite/models/currency_list.rb +1 -1
  158. data/lib/appwrite/models/database.rb +22 -8
  159. data/lib/appwrite/models/database_list.rb +1 -1
  160. data/lib/appwrite/models/database_migration.rb +6 -1
  161. data/lib/appwrite/models/database_migration_list.rb +1 -1
  162. data/lib/appwrite/models/database_status.rb +3 -3
  163. data/lib/appwrite/models/database_status_connections.rb +1 -1
  164. data/lib/appwrite/models/database_status_replica.rb +7 -2
  165. data/lib/appwrite/models/database_status_volume.rb +1 -1
  166. data/lib/appwrite/models/dedicated_database.rb +3 -3
  167. data/lib/appwrite/models/dedicated_database_backup.rb +107 -0
  168. data/lib/appwrite/models/dedicated_database_backup_list.rb +32 -0
  169. data/lib/appwrite/models/dedicated_database_backup_storage.rb +47 -0
  170. data/lib/appwrite/models/dedicated_database_branch.rb +82 -0
  171. data/lib/appwrite/models/dedicated_database_branch_list.rb +32 -0
  172. data/lib/appwrite/models/dedicated_database_execution.rb +52 -0
  173. data/lib/appwrite/models/dedicated_database_execution_column.rb +32 -0
  174. data/lib/appwrite/models/dedicated_database_extensions.rb +37 -0
  175. data/lib/appwrite/models/dedicated_database_list.rb +32 -0
  176. data/lib/appwrite/models/dedicated_database_member.rb +7 -2
  177. data/lib/appwrite/models/dedicated_database_operation.rb +4 -4
  178. data/lib/appwrite/models/dedicated_database_operation_list.rb +1 -1
  179. data/lib/appwrite/models/dedicated_database_pitr_windows.rb +32 -0
  180. data/lib/appwrite/models/dedicated_database_pooler.rb +72 -0
  181. data/lib/appwrite/models/dedicated_database_replicas.rb +3 -3
  182. data/lib/appwrite/models/dedicated_database_restoration.rb +82 -0
  183. data/lib/appwrite/models/dedicated_database_restoration_list.rb +32 -0
  184. data/lib/appwrite/models/dedicated_database_specification.rb +1 -1
  185. data/lib/appwrite/models/dedicated_database_specification_list.rb +1 -1
  186. data/lib/appwrite/models/dedicated_database_specification_pricing.rb +1 -1
  187. data/lib/appwrite/models/deployment.rb +1 -2
  188. data/lib/appwrite/models/deployment_list.rb +1 -1
  189. data/lib/appwrite/models/dev_key.rb +1 -1
  190. data/lib/appwrite/models/document.rb +1 -1
  191. data/lib/appwrite/models/document_list.rb +1 -1
  192. data/lib/appwrite/models/email_template.rb +1 -1
  193. data/lib/appwrite/models/email_template_list.rb +1 -1
  194. data/lib/appwrite/models/embedding.rb +1 -1
  195. data/lib/appwrite/models/embedding_list.rb +1 -1
  196. data/lib/appwrite/models/ephemeral_key.rb +1 -1
  197. data/lib/appwrite/models/execution.rb +25 -8
  198. data/lib/appwrite/models/execution_list.rb +1 -1
  199. data/lib/appwrite/models/file.rb +1 -1
  200. data/lib/appwrite/models/file_list.rb +1 -1
  201. data/lib/appwrite/models/framework.rb +1 -1
  202. data/lib/appwrite/models/framework_adapter.rb +1 -1
  203. data/lib/appwrite/models/framework_list.rb +1 -1
  204. data/lib/appwrite/models/function.rb +1 -1
  205. data/lib/appwrite/models/function_list.rb +1 -1
  206. data/lib/appwrite/models/headers.rb +1 -1
  207. data/lib/appwrite/models/identity.rb +1 -1
  208. data/lib/appwrite/models/identity_list.rb +1 -1
  209. data/lib/appwrite/models/index.rb +2 -3
  210. data/lib/appwrite/models/index_list.rb +1 -1
  211. data/lib/appwrite/models/insight.rb +4 -4
  212. data/lib/appwrite/models/insight_cta.rb +1 -1
  213. data/lib/appwrite/models/insight_list.rb +1 -1
  214. data/lib/appwrite/models/jwt.rb +1 -1
  215. data/lib/appwrite/models/key.rb +1 -1
  216. data/lib/appwrite/models/key_list.rb +1 -1
  217. data/lib/appwrite/models/language.rb +1 -1
  218. data/lib/appwrite/models/language_list.rb +1 -1
  219. data/lib/appwrite/models/locale.rb +12 -12
  220. data/lib/appwrite/models/locale_code.rb +1 -1
  221. data/lib/appwrite/models/locale_code_list.rb +1 -1
  222. data/lib/appwrite/models/log.rb +1 -1
  223. data/lib/appwrite/models/log_list.rb +1 -1
  224. data/lib/appwrite/models/membership.rb +1 -1
  225. data/lib/appwrite/models/membership_list.rb +1 -1
  226. data/lib/appwrite/models/message.rb +4 -5
  227. data/lib/appwrite/models/message_list.rb +1 -1
  228. data/lib/appwrite/models/mfa_challenge.rb +1 -1
  229. data/lib/appwrite/models/mfa_challenge_secret.rb +1 -1
  230. data/lib/appwrite/models/mfa_factors.rb +1 -1
  231. data/lib/appwrite/models/mfa_recovery_codes.rb +1 -1
  232. data/lib/appwrite/models/mfa_type.rb +1 -1
  233. data/lib/appwrite/models/mock_number.rb +1 -1
  234. data/lib/appwrite/models/mock_number_list.rb +1 -1
  235. data/lib/appwrite/models/o_auth2_amazon.rb +1 -1
  236. data/lib/appwrite/models/o_auth2_apple.rb +1 -1
  237. data/lib/appwrite/models/o_auth2_appwrite.rb +1 -1
  238. data/lib/appwrite/models/o_auth2_auth0.rb +1 -1
  239. data/lib/appwrite/models/o_auth2_authentik.rb +1 -1
  240. data/lib/appwrite/models/o_auth2_autodesk.rb +1 -1
  241. data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -1
  242. data/lib/appwrite/models/o_auth2_bitly.rb +1 -1
  243. data/lib/appwrite/models/o_auth2_box.rb +1 -1
  244. data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -1
  245. data/lib/appwrite/models/o_auth2_discord.rb +1 -1
  246. data/lib/appwrite/models/o_auth2_disqus.rb +1 -1
  247. data/lib/appwrite/models/o_auth2_dropbox.rb +1 -1
  248. data/lib/appwrite/models/o_auth2_etsy.rb +1 -1
  249. data/lib/appwrite/models/o_auth2_facebook.rb +1 -1
  250. data/lib/appwrite/models/o_auth2_figma.rb +1 -1
  251. data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -1
  252. data/lib/appwrite/models/o_auth2_github.rb +1 -1
  253. data/lib/appwrite/models/o_auth2_gitlab.rb +1 -1
  254. data/lib/appwrite/models/o_auth2_google.rb +18 -2
  255. data/lib/appwrite/models/o_auth2_hugging_face.rb +42 -0
  256. data/lib/appwrite/models/o_auth2_keycloak.rb +1 -1
  257. data/lib/appwrite/models/o_auth2_kick.rb +1 -1
  258. data/lib/appwrite/models/o_auth2_linkedin.rb +1 -1
  259. data/lib/appwrite/models/o_auth2_microsoft.rb +1 -1
  260. data/lib/appwrite/models/o_auth2_notion.rb +1 -1
  261. data/lib/appwrite/models/o_auth2_oidc.rb +20 -3
  262. data/lib/appwrite/models/o_auth2_okta.rb +1 -1
  263. data/lib/appwrite/models/o_auth2_paypal.rb +1 -1
  264. data/lib/appwrite/models/o_auth2_podio.rb +1 -1
  265. data/lib/appwrite/models/o_auth2_provider_list.rb +1 -1
  266. data/lib/appwrite/models/o_auth2_salesforce.rb +1 -1
  267. data/lib/appwrite/models/o_auth2_slack.rb +1 -1
  268. data/lib/appwrite/models/o_auth2_spotify.rb +1 -1
  269. data/lib/appwrite/models/o_auth2_stripe.rb +1 -1
  270. data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -1
  271. data/lib/appwrite/models/o_auth2_twitch.rb +1 -1
  272. data/lib/appwrite/models/o_auth2_word_press.rb +1 -1
  273. data/lib/appwrite/models/o_auth2_x.rb +1 -1
  274. data/lib/appwrite/models/o_auth2_yahoo.rb +1 -1
  275. data/lib/appwrite/models/o_auth2_yandex.rb +1 -1
  276. data/lib/appwrite/models/o_auth2_zoho.rb +1 -1
  277. data/lib/appwrite/models/o_auth2_zoom.rb +1 -1
  278. data/lib/appwrite/models/oauth2_approve.rb +1 -1
  279. data/lib/appwrite/models/oauth2_authorize.rb +1 -1
  280. data/lib/appwrite/models/oauth2_consent.rb +1 -1
  281. data/lib/appwrite/models/oauth2_consent_list.rb +1 -1
  282. data/lib/appwrite/models/oauth2_consent_token.rb +1 -1
  283. data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -1
  284. data/lib/appwrite/models/oauth2_device_authorization.rb +1 -1
  285. data/lib/appwrite/models/oauth2_grant.rb +1 -1
  286. data/lib/appwrite/models/oauth2_organization.rb +1 -1
  287. data/lib/appwrite/models/oauth2_organization_list.rb +1 -1
  288. data/lib/appwrite/models/oauth2_par.rb +1 -1
  289. data/lib/appwrite/models/oauth2_project.rb +1 -1
  290. data/lib/appwrite/models/oauth2_project_list.rb +1 -1
  291. data/lib/appwrite/models/oauth2_reject.rb +1 -1
  292. data/lib/appwrite/models/oauth2_token.rb +3 -3
  293. data/lib/appwrite/models/organization.rb +14 -14
  294. data/lib/appwrite/models/phone.rb +1 -1
  295. data/lib/appwrite/models/phone_list.rb +1 -1
  296. data/lib/appwrite/models/platform_android.rb +1 -2
  297. data/lib/appwrite/models/platform_apple.rb +1 -2
  298. data/lib/appwrite/models/platform_linux.rb +1 -2
  299. data/lib/appwrite/models/platform_list.rb +1 -1
  300. data/lib/appwrite/models/platform_web.rb +1 -2
  301. data/lib/appwrite/models/platform_windows.rb +1 -2
  302. data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -1
  303. data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -1
  304. data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -1
  305. data/lib/appwrite/models/policy_deny_free_email.rb +1 -1
  306. data/lib/appwrite/models/policy_list.rb +1 -1
  307. data/lib/appwrite/models/policy_membership_privacy.rb +1 -1
  308. data/lib/appwrite/models/policy_mfa_factors.rb +1 -1
  309. data/lib/appwrite/models/policy_password_dictionary.rb +1 -1
  310. data/lib/appwrite/models/policy_password_history.rb +1 -1
  311. data/lib/appwrite/models/policy_password_personal_data.rb +1 -1
  312. data/lib/appwrite/models/policy_password_strength.rb +1 -1
  313. data/lib/appwrite/models/policy_session_alert.rb +1 -1
  314. data/lib/appwrite/models/policy_session_duration.rb +1 -1
  315. data/lib/appwrite/models/policy_session_invalidation.rb +1 -1
  316. data/lib/appwrite/models/policy_session_limit.rb +1 -1
  317. data/lib/appwrite/models/policy_user_limit.rb +1 -1
  318. data/lib/appwrite/models/postgres_extension.rb +42 -0
  319. data/lib/appwrite/models/preferences.rb +1 -1
  320. data/lib/appwrite/models/presence.rb +4 -4
  321. data/lib/appwrite/models/presence_list.rb +1 -1
  322. data/lib/appwrite/models/program.rb +1 -1
  323. data/lib/appwrite/models/project.rb +19 -19
  324. data/lib/appwrite/models/project_auth_method.rb +1 -2
  325. data/lib/appwrite/models/project_list.rb +1 -1
  326. data/lib/appwrite/models/project_protocol.rb +1 -2
  327. data/lib/appwrite/models/project_service.rb +1 -2
  328. data/lib/appwrite/models/provider.rb +2 -2
  329. data/lib/appwrite/models/provider_list.rb +1 -1
  330. data/lib/appwrite/models/proxy_invalidation.rb +1 -1
  331. data/lib/appwrite/models/proxy_rule.rb +2 -3
  332. data/lib/appwrite/models/proxy_rule_list.rb +1 -1
  333. data/lib/appwrite/models/report.rb +2 -2
  334. data/lib/appwrite/models/report_list.rb +1 -1
  335. data/lib/appwrite/models/resource_token.rb +1 -1
  336. data/lib/appwrite/models/resource_token_list.rb +1 -1
  337. data/lib/appwrite/models/row.rb +1 -1
  338. data/lib/appwrite/models/row_list.rb +1 -1
  339. data/lib/appwrite/models/runtime.rb +1 -1
  340. data/lib/appwrite/models/runtime_list.rb +1 -1
  341. data/lib/appwrite/models/session.rb +1 -1
  342. data/lib/appwrite/models/session_list.rb +1 -1
  343. data/lib/appwrite/models/site.rb +6 -1
  344. data/lib/appwrite/models/site_list.rb +1 -1
  345. data/lib/appwrite/models/specification.rb +1 -1
  346. data/lib/appwrite/models/specification_list.rb +1 -1
  347. data/lib/appwrite/models/subscriber.rb +1 -1
  348. data/lib/appwrite/models/subscriber_list.rb +1 -1
  349. data/lib/appwrite/models/table.rb +1 -1
  350. data/lib/appwrite/models/table_list.rb +1 -1
  351. data/lib/appwrite/models/target.rb +2 -2
  352. data/lib/appwrite/models/target_list.rb +1 -1
  353. data/lib/appwrite/models/team.rb +1 -1
  354. data/lib/appwrite/models/team_list.rb +1 -1
  355. data/lib/appwrite/models/token.rb +1 -1
  356. data/lib/appwrite/models/topic.rb +1 -1
  357. data/lib/appwrite/models/topic_list.rb +1 -1
  358. data/lib/appwrite/models/transaction.rb +1 -1
  359. data/lib/appwrite/models/transaction_list.rb +1 -1
  360. data/lib/appwrite/models/usage_billing_plan.rb +4 -4
  361. data/lib/appwrite/models/user.rb +11 -11
  362. data/lib/appwrite/models/user_list.rb +1 -1
  363. data/lib/appwrite/models/variable.rb +1 -1
  364. data/lib/appwrite/models/variable_list.rb +1 -1
  365. data/lib/appwrite/models/vectorsdb_collection.rb +87 -0
  366. data/lib/appwrite/models/vectorsdb_collection_list.rb +32 -0
  367. data/lib/appwrite/models/webhook.rb +1 -1
  368. data/lib/appwrite/models/webhook_list.rb +1 -1
  369. data/lib/appwrite/operator.rb +6 -0
  370. data/lib/appwrite/permission.rb +4 -0
  371. data/lib/appwrite/query.rb +4 -4
  372. data/lib/appwrite/role.rb +12 -14
  373. data/lib/appwrite/service.rb +1 -1
  374. data/lib/appwrite/services/account.rb +328 -289
  375. data/lib/appwrite/services/activities.rb +13 -14
  376. data/lib/appwrite/services/advisor.rb +41 -37
  377. data/lib/appwrite/services/apps.rb +185 -130
  378. data/lib/appwrite/services/avatars.rb +156 -55
  379. data/lib/appwrite/services/backups.rb +102 -83
  380. data/lib/appwrite/services/databases.rb +871 -512
  381. data/lib/appwrite/services/documents_db.rb +1683 -0
  382. data/lib/appwrite/services/embeddings.rb +9 -9
  383. data/lib/appwrite/services/functions.rb +276 -172
  384. data/lib/appwrite/services/graphql.rb +12 -12
  385. data/lib/appwrite/services/locale.rb +19 -37
  386. data/lib/appwrite/services/messaging.rb +544 -259
  387. data/lib/appwrite/services/mongo.rb +1359 -0
  388. data/lib/appwrite/services/mysql.rb +1503 -0
  389. data/lib/appwrite/services/oauth2.rb +122 -53
  390. data/lib/appwrite/services/organization.rb +153 -123
  391. data/lib/appwrite/services/postgresql.rb +1615 -0
  392. data/lib/appwrite/services/presences.rb +49 -35
  393. data/lib/appwrite/services/project.rb +842 -528
  394. data/lib/appwrite/services/proxy.rb +73 -58
  395. data/lib/appwrite/services/sites.rb +269 -164
  396. data/lib/appwrite/services/storage.rb +151 -92
  397. data/lib/appwrite/services/tables_db.rb +947 -568
  398. data/lib/appwrite/services/teams.rb +161 -122
  399. data/lib/appwrite/services/tokens.rb +38 -31
  400. data/lib/appwrite/services/users.rb +376 -274
  401. data/lib/appwrite/services/vectors_db.rb +1614 -0
  402. data/lib/appwrite/services/webhooks.rb +59 -40
  403. data/lib/appwrite.rb +27 -0
  404. metadata +31 -4
@@ -1,13 +1,12 @@
1
- #frozen_string_literal: true
1
+ # frozen_string_literal: true
2
2
 
3
3
  module Appwrite
4
4
  class Functions < Service
5
-
6
5
  def initialize(client)
7
6
  @client = client
8
7
  end
9
8
 
10
- # Get a list of all the project's functions. You can use the query params to
9
+ # Get a list of all the project&#039;s functions. You can use the query params to
11
10
  # filter your results.
12
11
  #
13
12
  # @param [Array] queries 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. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
@@ -15,7 +14,11 @@ module Appwrite
15
14
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
16
15
  #
17
16
  # @return [FunctionList]
18
- def list(queries: nil, search: nil, total: nil)
17
+ def list(
18
+ queries: nil,
19
+ search: nil,
20
+ total: nil
21
+ )
19
22
  api_path = '/functions'
20
23
 
21
24
  api_params = {
@@ -23,7 +26,7 @@ module Appwrite
23
26
  search: search,
24
27
  total: total,
25
28
  }
26
-
29
+
27
30
  api_headers = {
28
31
  "X-Appwrite-Project": @client.get_config('project'),
29
32
  "accept": 'application/json',
@@ -36,7 +39,6 @@ module Appwrite
36
39
  params: api_params,
37
40
  response_type: Models::FunctionList
38
41
  )
39
-
40
42
  end
41
43
 
42
44
  # Create a new function. You can pass a list of
@@ -44,16 +46,16 @@ module Appwrite
44
46
  # project users or team with access to execute the function using the client
45
47
  # API.
46
48
  #
47
- # @param [String] function_id Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
49
+ # @param [String] function_id Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
48
50
  # @param [String] name Function name. Max length: 128 chars.
49
51
  # @param [Runtime] runtime Execution runtime.
50
52
  # @param [Array] execute An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
51
53
  # @param [Array] events Events list. Maximum of 100 events are allowed.
52
54
  # @param [String] schedule Schedule CRON syntax.
53
55
  # @param [Integer] timeout Function maximum execution time in seconds.
54
- # @param [] enabled Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
56
+ # @param [] enabled Is function enabled? When set to &#039;disabled&#039;, users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
55
57
  # @param [] logging When disabled, executions will exclude logs and errors, and will be slightly faster.
56
- # @param [String] entrypoint Entrypoint File. This path is relative to the "providerRootDirectory".
58
+ # @param [String] entrypoint Entrypoint File. This path is relative to the &quot;providerRootDirectory&quot;.
57
59
  # @param [String] commands Build Commands.
58
60
  # @param [Array] scopes List of scopes allowed for API key auto-generated for every execution. Maximum of 200 scopes are allowed.
59
61
  # @param [String] installation_id Appwrite Installation ID for VCS (Version Control System) deployment.
@@ -68,19 +70,42 @@ module Appwrite
68
70
  # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
69
71
  #
70
72
  # @return [Function]
71
- def create(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, provider_branches: nil, provider_paths: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
73
+ def create(
74
+ function_id:,
75
+ name:,
76
+ runtime:,
77
+ execute: nil,
78
+ events: nil,
79
+ schedule: nil,
80
+ timeout: nil,
81
+ enabled: nil,
82
+ logging: nil,
83
+ entrypoint: nil,
84
+ commands: nil,
85
+ scopes: nil,
86
+ installation_id: nil,
87
+ provider_repository_id: nil,
88
+ provider_branch: nil,
89
+ provider_silent_mode: nil,
90
+ provider_root_directory: nil,
91
+ provider_branches: nil,
92
+ provider_paths: nil,
93
+ build_specification: nil,
94
+ runtime_specification: nil,
95
+ deployment_retention: nil
96
+ )
72
97
  api_path = '/functions'
73
98
 
74
99
  if function_id.nil?
75
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
100
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
76
101
  end
77
102
 
78
103
  if name.nil?
79
- raise Appwrite::Exception.new('Missing required parameter: "name"')
104
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
80
105
  end
81
106
 
82
107
  if runtime.nil?
83
- raise Appwrite::Exception.new('Missing required parameter: "runtime"')
108
+ raise Appwrite::Exception.new('Missing required parameter: "runtime"')
84
109
  end
85
110
 
86
111
  api_params = {
@@ -107,7 +132,7 @@ module Appwrite
107
132
  runtimeSpecification: runtime_specification,
108
133
  deploymentRetention: deployment_retention,
109
134
  }
110
-
135
+
111
136
  api_headers = {
112
137
  "X-Appwrite-Project": @client.get_config('project'),
113
138
  "content-type": 'application/json',
@@ -121,7 +146,6 @@ module Appwrite
121
146
  params: api_params,
122
147
  response_type: Models::Function
123
148
  )
124
-
125
149
  end
126
150
 
127
151
  # Get a list of all runtimes that are currently active on your instance.
@@ -131,9 +155,8 @@ module Appwrite
131
155
  def list_runtimes()
132
156
  api_path = '/functions/runtimes'
133
157
 
134
- api_params = {
135
- }
136
-
158
+ api_params = {}
159
+
137
160
  api_headers = {
138
161
  "X-Appwrite-Project": @client.get_config('project'),
139
162
  "accept": 'application/json',
@@ -146,7 +169,6 @@ module Appwrite
146
169
  params: api_params,
147
170
  response_type: Models::RuntimeList
148
171
  )
149
-
150
172
  end
151
173
 
152
174
  # List allowed function specifications for this instance.
@@ -154,13 +176,15 @@ module Appwrite
154
176
  # @param [String] type Specification type to list. Can be one of: runtimes, builds. Defaults to runtimes.
155
177
  #
156
178
  # @return [SpecificationList]
157
- def list_specifications(type: nil)
179
+ def list_specifications(
180
+ type: nil
181
+ )
158
182
  api_path = '/functions/specifications'
159
183
 
160
184
  api_params = {
161
185
  type: type,
162
186
  }
163
-
187
+
164
188
  api_headers = {
165
189
  "X-Appwrite-Project": @client.get_config('project'),
166
190
  "accept": 'application/json',
@@ -173,7 +197,6 @@ module Appwrite
173
197
  params: api_params,
174
198
  response_type: Models::SpecificationList
175
199
  )
176
-
177
200
  end
178
201
 
179
202
  # Get a function by its unique ID.
@@ -181,17 +204,18 @@ module Appwrite
181
204
  # @param [String] function_id Function ID.
182
205
  #
183
206
  # @return [Function]
184
- def get(function_id:)
207
+ def get(
208
+ function_id:
209
+ )
185
210
  api_path = '/functions/{functionId}'
186
211
  .gsub('{functionId}', function_id)
187
212
 
188
213
  if function_id.nil?
189
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
214
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
190
215
  end
191
216
 
192
- api_params = {
193
- }
194
-
217
+ api_params = {}
218
+
195
219
  api_headers = {
196
220
  "X-Appwrite-Project": @client.get_config('project'),
197
221
  "accept": 'application/json',
@@ -204,7 +228,6 @@ module Appwrite
204
228
  params: api_params,
205
229
  response_type: Models::Function
206
230
  )
207
-
208
231
  end
209
232
 
210
233
  # Update function by its unique ID.
@@ -216,9 +239,9 @@ module Appwrite
216
239
  # @param [Array] events Events list. Maximum of 100 events are allowed.
217
240
  # @param [String] schedule Schedule CRON syntax.
218
241
  # @param [Integer] timeout Maximum execution time in seconds.
219
- # @param [] enabled Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
242
+ # @param [] enabled Is function enabled? When set to &#039;disabled&#039;, users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
220
243
  # @param [] logging When disabled, executions will exclude logs and errors, and will be slightly faster.
221
- # @param [String] entrypoint Entrypoint File. This path is relative to the "providerRootDirectory".
244
+ # @param [String] entrypoint Entrypoint File. This path is relative to the &quot;providerRootDirectory&quot;.
222
245
  # @param [String] commands Build Commands.
223
246
  # @param [Array] scopes List of scopes allowed for API Key auto-generated for every execution. Maximum of 200 scopes are allowed.
224
247
  # @param [String] installation_id Appwrite Installation ID for VCS (Version Controle System) deployment.
@@ -233,16 +256,39 @@ module Appwrite
233
256
  # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
234
257
  #
235
258
  # @return [Function]
236
- def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, provider_branches: nil, provider_paths: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
259
+ def update(
260
+ function_id:,
261
+ name:,
262
+ runtime: nil,
263
+ execute: nil,
264
+ events: nil,
265
+ schedule: nil,
266
+ timeout: nil,
267
+ enabled: nil,
268
+ logging: nil,
269
+ entrypoint: nil,
270
+ commands: nil,
271
+ scopes: nil,
272
+ installation_id: nil,
273
+ provider_repository_id: nil,
274
+ provider_branch: nil,
275
+ provider_silent_mode: nil,
276
+ provider_root_directory: nil,
277
+ provider_branches: nil,
278
+ provider_paths: nil,
279
+ build_specification: nil,
280
+ runtime_specification: nil,
281
+ deployment_retention: nil
282
+ )
237
283
  api_path = '/functions/{functionId}'
238
284
  .gsub('{functionId}', function_id)
239
285
 
240
286
  if function_id.nil?
241
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
287
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
242
288
  end
243
289
 
244
290
  if name.nil?
245
- raise Appwrite::Exception.new('Missing required parameter: "name"')
291
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
246
292
  end
247
293
 
248
294
  api_params = {
@@ -268,7 +314,7 @@ module Appwrite
268
314
  runtimeSpecification: runtime_specification,
269
315
  deploymentRetention: deployment_retention,
270
316
  }
271
-
317
+
272
318
  api_headers = {
273
319
  "X-Appwrite-Project": @client.get_config('project'),
274
320
  "content-type": 'application/json',
@@ -282,7 +328,6 @@ module Appwrite
282
328
  params: api_params,
283
329
  response_type: Models::Function
284
330
  )
285
-
286
331
  end
287
332
 
288
333
  # Delete a function by its unique ID.
@@ -290,17 +335,18 @@ module Appwrite
290
335
  # @param [String] function_id Function ID.
291
336
  #
292
337
  # @return []
293
- def delete(function_id:)
338
+ def delete(
339
+ function_id:
340
+ )
294
341
  api_path = '/functions/{functionId}'
295
342
  .gsub('{functionId}', function_id)
296
343
 
297
344
  if function_id.nil?
298
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
345
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
299
346
  end
300
347
 
301
- api_params = {
302
- }
303
-
348
+ api_params = {}
349
+
304
350
  api_headers = {
305
351
  "X-Appwrite-Project": @client.get_config('project'),
306
352
  "content-type": 'application/json',
@@ -312,7 +358,6 @@ module Appwrite
312
358
  headers: api_headers,
313
359
  params: api_params,
314
360
  )
315
-
316
361
  end
317
362
 
318
363
  # Update the function active deployment. Use this endpoint to switch the code
@@ -322,22 +367,25 @@ module Appwrite
322
367
  # @param [String] deployment_id Deployment ID.
323
368
  #
324
369
  # @return [Function]
325
- def update_function_deployment(function_id:, deployment_id:)
370
+ def update_function_deployment(
371
+ function_id:,
372
+ deployment_id:
373
+ )
326
374
  api_path = '/functions/{functionId}/deployment'
327
375
  .gsub('{functionId}', function_id)
328
376
 
329
377
  if function_id.nil?
330
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
378
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
331
379
  end
332
380
 
333
381
  if deployment_id.nil?
334
- raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
382
+ raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
335
383
  end
336
384
 
337
385
  api_params = {
338
386
  deploymentId: deployment_id,
339
387
  }
340
-
388
+
341
389
  api_headers = {
342
390
  "X-Appwrite-Project": @client.get_config('project'),
343
391
  "content-type": 'application/json',
@@ -351,10 +399,9 @@ module Appwrite
351
399
  params: api_params,
352
400
  response_type: Models::Function
353
401
  )
354
-
355
402
  end
356
403
 
357
- # Get a list of all the function's code deployments. You can use the query
404
+ # Get a list of all the function&#039;s code deployments. You can use the query
358
405
  # params to filter your results.
359
406
  #
360
407
  # @param [String] function_id Function ID.
@@ -363,12 +410,17 @@ module Appwrite
363
410
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
364
411
  #
365
412
  # @return [DeploymentList]
366
- def list_deployments(function_id:, queries: nil, search: nil, total: nil)
413
+ def list_deployments(
414
+ function_id:,
415
+ queries: nil,
416
+ search: nil,
417
+ total: nil
418
+ )
367
419
  api_path = '/functions/{functionId}/deployments'
368
420
  .gsub('{functionId}', function_id)
369
421
 
370
422
  if function_id.nil?
371
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
423
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
372
424
  end
373
425
 
374
426
  api_params = {
@@ -376,7 +428,7 @@ module Appwrite
376
428
  search: search,
377
429
  total: total,
378
430
  }
379
-
431
+
380
432
  api_headers = {
381
433
  "X-Appwrite-Project": @client.get_config('project'),
382
434
  "accept": 'application/json',
@@ -389,19 +441,18 @@ module Appwrite
389
441
  params: api_params,
390
442
  response_type: Models::DeploymentList
391
443
  )
392
-
393
444
  end
394
445
 
395
446
  # Create a new function code deployment. Use this endpoint to upload a new
396
- # version of your code function. To execute your newly uploaded code, you'll
397
- # need to update the function's deployment to use your new deployment UID.
398
- #
447
+ # version of your code function. To execute your newly uploaded code, you&#039;ll
448
+ # need to update the function&#039;s deployment to use your new deployment UID.
449
+ #
399
450
  # This endpoint accepts a tar.gz file compressed with your code. Make sure to
400
451
  # include any dependencies your code has within the compressed file. You can
401
452
  # learn more about code packaging in the [Appwrite Cloud Functions
402
453
  # tutorial](https://appwrite.io/docs/functions).
403
- #
404
- # Use the "command" param to set the entrypoint used to execute your code.
454
+ #
455
+ # Use the &quot;command&quot; param to set the entrypoint used to execute your code.
405
456
  #
406
457
  # @param [String] function_id Function ID.
407
458
  # @param [file] code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
@@ -410,20 +461,27 @@ module Appwrite
410
461
  # @param [String] commands Build Commands.
411
462
  #
412
463
  # @return [Deployment]
413
- def create_deployment(function_id:, code:, activate:, entrypoint: nil, commands: nil, on_progress: nil)
464
+ def create_deployment(
465
+ function_id:,
466
+ code:,
467
+ activate:,
468
+ entrypoint: nil,
469
+ commands: nil,
470
+ on_progress: nil
471
+ )
414
472
  api_path = '/functions/{functionId}/deployments'
415
473
  .gsub('{functionId}', function_id)
416
474
 
417
475
  if function_id.nil?
418
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
476
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
419
477
  end
420
478
 
421
479
  if code.nil?
422
- raise Appwrite::Exception.new('Missing required parameter: "code"')
480
+ raise Appwrite::Exception.new('Missing required parameter: "code"')
423
481
  end
424
482
 
425
483
  if activate.nil?
426
- raise Appwrite::Exception.new('Missing required parameter: "activate"')
484
+ raise Appwrite::Exception.new('Missing required parameter: "activate"')
427
485
  end
428
486
 
429
487
  api_params = {
@@ -432,7 +490,7 @@ module Appwrite
432
490
  code: code,
433
491
  activate: activate,
434
492
  }
435
-
493
+
436
494
  api_headers = {
437
495
  "X-Appwrite-Project": @client.get_config('project'),
438
496
  "content-type": 'multipart/form-data',
@@ -451,37 +509,40 @@ module Appwrite
451
509
  on_progress: on_progress,
452
510
  response_type: Models::Deployment
453
511
  )
454
-
455
512
  end
456
513
 
457
514
  # Create a new build for an existing function deployment. This endpoint
458
515
  # allows you to rebuild a deployment with the updated function configuration,
459
516
  # including its entrypoint and build commands if they have been modified. The
460
517
  # build process will be queued and executed asynchronously. The original
461
- # deployment's code will be preserved and used for the new build.
518
+ # deployment&#039;s code will be preserved and used for the new build.
462
519
  #
463
520
  # @param [String] function_id Function ID.
464
521
  # @param [String] deployment_id Deployment ID.
465
522
  # @param [String] build_id Build unique ID.
466
523
  #
467
524
  # @return [Deployment]
468
- def create_duplicate_deployment(function_id:, deployment_id:, build_id: nil)
525
+ def create_duplicate_deployment(
526
+ function_id:,
527
+ deployment_id:,
528
+ build_id: nil
529
+ )
469
530
  api_path = '/functions/{functionId}/deployments/duplicate'
470
531
  .gsub('{functionId}', function_id)
471
532
 
472
533
  if function_id.nil?
473
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
534
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
474
535
  end
475
536
 
476
537
  if deployment_id.nil?
477
- raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
538
+ raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
478
539
  end
479
540
 
480
541
  api_params = {
481
542
  deploymentId: deployment_id,
482
543
  buildId: build_id,
483
544
  }
484
-
545
+
485
546
  api_headers = {
486
547
  "X-Appwrite-Project": @client.get_config('project'),
487
548
  "content-type": 'application/json',
@@ -495,11 +556,10 @@ module Appwrite
495
556
  params: api_params,
496
557
  response_type: Models::Deployment
497
558
  )
498
-
499
559
  end
500
560
 
501
561
  # Create a deployment based on a template.
502
- #
562
+ #
503
563
  # Use this endpoint with combination of
504
564
  # [listTemplates](https://appwrite.io/docs/products/functions/templates) to
505
565
  # find the template details.
@@ -513,32 +573,40 @@ module Appwrite
513
573
  # @param [] activate Automatically activate the deployment when it is finished building.
514
574
  #
515
575
  # @return [Deployment]
516
- def create_template_deployment(function_id:, repository:, owner:, root_directory:, type:, reference:, activate: nil)
576
+ def create_template_deployment(
577
+ function_id:,
578
+ repository:,
579
+ owner:,
580
+ root_directory:,
581
+ type:,
582
+ reference:,
583
+ activate: nil
584
+ )
517
585
  api_path = '/functions/{functionId}/deployments/template'
518
586
  .gsub('{functionId}', function_id)
519
587
 
520
588
  if function_id.nil?
521
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
589
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
522
590
  end
523
591
 
524
592
  if repository.nil?
525
- raise Appwrite::Exception.new('Missing required parameter: "repository"')
593
+ raise Appwrite::Exception.new('Missing required parameter: "repository"')
526
594
  end
527
595
 
528
596
  if owner.nil?
529
- raise Appwrite::Exception.new('Missing required parameter: "owner"')
597
+ raise Appwrite::Exception.new('Missing required parameter: "owner"')
530
598
  end
531
599
 
532
600
  if root_directory.nil?
533
- raise Appwrite::Exception.new('Missing required parameter: "rootDirectory"')
601
+ raise Appwrite::Exception.new('Missing required parameter: "rootDirectory"')
534
602
  end
535
603
 
536
604
  if type.nil?
537
- raise Appwrite::Exception.new('Missing required parameter: "type"')
605
+ raise Appwrite::Exception.new('Missing required parameter: "type"')
538
606
  end
539
607
 
540
608
  if reference.nil?
541
- raise Appwrite::Exception.new('Missing required parameter: "reference"')
609
+ raise Appwrite::Exception.new('Missing required parameter: "reference"')
542
610
  end
543
611
 
544
612
  api_params = {
@@ -549,7 +617,7 @@ module Appwrite
549
617
  reference: reference,
550
618
  activate: activate,
551
619
  }
552
-
620
+
553
621
  api_headers = {
554
622
  "X-Appwrite-Project": @client.get_config('project'),
555
623
  "content-type": 'application/json',
@@ -563,11 +631,10 @@ module Appwrite
563
631
  params: api_params,
564
632
  response_type: Models::Deployment
565
633
  )
566
-
567
634
  end
568
635
 
569
636
  # Create a deployment when a function is connected to VCS.
570
- #
637
+ #
571
638
  # This endpoint lets you create deployment from a branch, commit, or a tag.
572
639
  #
573
640
  # @param [String] function_id Function ID.
@@ -576,20 +643,25 @@ module Appwrite
576
643
  # @param [] activate Automatically activate the deployment when it is finished building.
577
644
  #
578
645
  # @return [Deployment]
579
- def create_vcs_deployment(function_id:, type:, reference:, activate: nil)
646
+ def create_vcs_deployment(
647
+ function_id:,
648
+ type:,
649
+ reference:,
650
+ activate: nil
651
+ )
580
652
  api_path = '/functions/{functionId}/deployments/vcs'
581
653
  .gsub('{functionId}', function_id)
582
654
 
583
655
  if function_id.nil?
584
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
656
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
585
657
  end
586
658
 
587
659
  if type.nil?
588
- raise Appwrite::Exception.new('Missing required parameter: "type"')
660
+ raise Appwrite::Exception.new('Missing required parameter: "type"')
589
661
  end
590
662
 
591
663
  if reference.nil?
592
- raise Appwrite::Exception.new('Missing required parameter: "reference"')
664
+ raise Appwrite::Exception.new('Missing required parameter: "reference"')
593
665
  end
594
666
 
595
667
  api_params = {
@@ -597,7 +669,7 @@ module Appwrite
597
669
  reference: reference,
598
670
  activate: activate,
599
671
  }
600
-
672
+
601
673
  api_headers = {
602
674
  "X-Appwrite-Project": @client.get_config('project'),
603
675
  "content-type": 'application/json',
@@ -611,7 +683,6 @@ module Appwrite
611
683
  params: api_params,
612
684
  response_type: Models::Deployment
613
685
  )
614
-
615
686
  end
616
687
 
617
688
  # Get a function deployment by its unique ID.
@@ -620,22 +691,24 @@ module Appwrite
620
691
  # @param [String] deployment_id Deployment ID.
621
692
  #
622
693
  # @return [Deployment]
623
- def get_deployment(function_id:, deployment_id:)
694
+ def get_deployment(
695
+ function_id:,
696
+ deployment_id:
697
+ )
624
698
  api_path = '/functions/{functionId}/deployments/{deploymentId}'
625
699
  .gsub('{functionId}', function_id)
626
700
  .gsub('{deploymentId}', deployment_id)
627
701
 
628
702
  if function_id.nil?
629
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
703
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
630
704
  end
631
705
 
632
706
  if deployment_id.nil?
633
- raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
707
+ raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
634
708
  end
635
709
 
636
- api_params = {
637
- }
638
-
710
+ api_params = {}
711
+
639
712
  api_headers = {
640
713
  "X-Appwrite-Project": @client.get_config('project'),
641
714
  "accept": 'application/json',
@@ -648,7 +721,6 @@ module Appwrite
648
721
  params: api_params,
649
722
  response_type: Models::Deployment
650
723
  )
651
-
652
724
  end
653
725
 
654
726
  # Delete a code deployment by its unique ID.
@@ -657,22 +729,24 @@ module Appwrite
657
729
  # @param [String] deployment_id Deployment ID.
658
730
  #
659
731
  # @return []
660
- def delete_deployment(function_id:, deployment_id:)
732
+ def delete_deployment(
733
+ function_id:,
734
+ deployment_id:
735
+ )
661
736
  api_path = '/functions/{functionId}/deployments/{deploymentId}'
662
737
  .gsub('{functionId}', function_id)
663
738
  .gsub('{deploymentId}', deployment_id)
664
739
 
665
740
  if function_id.nil?
666
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
741
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
667
742
  end
668
743
 
669
744
  if deployment_id.nil?
670
- raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
745
+ raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
671
746
  end
672
747
 
673
- api_params = {
674
- }
675
-
748
+ api_params = {}
749
+
676
750
  api_headers = {
677
751
  "X-Appwrite-Project": @client.get_config('project'),
678
752
  "content-type": 'application/json',
@@ -684,37 +758,41 @@ module Appwrite
684
758
  headers: api_headers,
685
759
  params: api_params,
686
760
  )
687
-
688
761
  end
689
762
 
690
763
  # Get a function deployment content by its unique ID. The endpoint response
691
- # return with a 'Content-Disposition: attachment' header that tells the
764
+ # return with a &#039;Content-Disposition: attachment&#039; header that tells the
692
765
  # browser to start downloading the file to user downloads directory.
693
766
  #
694
767
  # @param [String] function_id Function ID.
695
768
  # @param [String] deployment_id Deployment ID.
696
- # @param [DeploymentDownloadType] type Deployment file to download. Can be: "source", "output".
769
+ # @param [DeploymentDownloadType] type Deployment file to download. Can be: &quot;source&quot;, &quot;output&quot;.
697
770
  # @param [String] token Presigned source-download token for accessing this deployment without a session (jobs-service).
698
771
  #
699
772
  # @return []
700
- def get_deployment_download(function_id:, deployment_id:, type: nil, token: nil)
773
+ def get_deployment_download(
774
+ function_id:,
775
+ deployment_id:,
776
+ type: nil,
777
+ token: nil
778
+ )
701
779
  api_path = '/functions/{functionId}/deployments/{deploymentId}/download'
702
780
  .gsub('{functionId}', function_id)
703
781
  .gsub('{deploymentId}', deployment_id)
704
782
 
705
783
  if function_id.nil?
706
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
784
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
707
785
  end
708
786
 
709
787
  if deployment_id.nil?
710
- raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
788
+ raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
711
789
  end
712
790
 
713
791
  api_params = {
714
792
  type: type,
715
793
  token: token,
716
794
  }
717
-
795
+
718
796
  api_headers = {
719
797
  "X-Appwrite-Project": @client.get_config('project'),
720
798
  "accept": '*/*',
@@ -726,35 +804,36 @@ module Appwrite
726
804
  headers: api_headers,
727
805
  params: api_params,
728
806
  )
729
-
730
807
  end
731
808
 
732
809
  # Cancel an ongoing function deployment build. If the build is already in
733
- # progress, it will be stopped and marked as canceled. If the build hasn't
810
+ # progress, it will be stopped and marked as canceled. If the build hasn&#039;t
734
811
  # started yet, it will be marked as canceled without executing. You cannot
735
- # cancel builds that have already completed (status 'ready') or failed. The
812
+ # cancel builds that have already completed (status &#039;ready&#039;) or failed. The
736
813
  # response includes the final build status and details.
737
814
  #
738
815
  # @param [String] function_id Function ID.
739
816
  # @param [String] deployment_id Deployment ID.
740
817
  #
741
818
  # @return [Deployment]
742
- def update_deployment_status(function_id:, deployment_id:)
819
+ def update_deployment_status(
820
+ function_id:,
821
+ deployment_id:
822
+ )
743
823
  api_path = '/functions/{functionId}/deployments/{deploymentId}/status'
744
824
  .gsub('{functionId}', function_id)
745
825
  .gsub('{deploymentId}', deployment_id)
746
826
 
747
827
  if function_id.nil?
748
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
828
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
749
829
  end
750
830
 
751
831
  if deployment_id.nil?
752
- raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
832
+ raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
753
833
  end
754
834
 
755
- api_params = {
756
- }
757
-
835
+ api_params = {}
836
+
758
837
  api_headers = {
759
838
  "X-Appwrite-Project": @client.get_config('project'),
760
839
  "content-type": 'application/json',
@@ -768,7 +847,6 @@ module Appwrite
768
847
  params: api_params,
769
848
  response_type: Models::Deployment
770
849
  )
771
-
772
850
  end
773
851
 
774
852
  # Get a list of all the current user function execution logs. You can use the
@@ -779,19 +857,23 @@ module Appwrite
779
857
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
780
858
  #
781
859
  # @return [ExecutionList]
782
- def list_executions(function_id:, queries: nil, total: nil)
860
+ def list_executions(
861
+ function_id:,
862
+ queries: nil,
863
+ total: nil
864
+ )
783
865
  api_path = '/functions/{functionId}/executions'
784
866
  .gsub('{functionId}', function_id)
785
867
 
786
868
  if function_id.nil?
787
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
869
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
788
870
  end
789
871
 
790
872
  api_params = {
791
873
  queries: queries,
792
874
  total: total,
793
875
  }
794
-
876
+
795
877
  api_headers = {
796
878
  "X-Appwrite-Project": @client.get_config('project'),
797
879
  "accept": 'application/json',
@@ -804,7 +886,6 @@ module Appwrite
804
886
  params: api_params,
805
887
  response_type: Models::ExecutionList
806
888
  )
807
-
808
889
  end
809
890
 
810
891
  # Trigger a function execution. The returned object will return you the
@@ -821,12 +902,20 @@ module Appwrite
821
902
  # @param [String] scheduled_at Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
822
903
  #
823
904
  # @return [Execution]
824
- def create_execution(function_id:, body: nil, async: nil, xpath: nil, method: nil, headers: nil, scheduled_at: nil)
905
+ def create_execution(
906
+ function_id:,
907
+ body: nil,
908
+ async: nil,
909
+ xpath: nil,
910
+ method: nil,
911
+ headers: nil,
912
+ scheduled_at: nil
913
+ )
825
914
  api_path = '/functions/{functionId}/executions'
826
915
  .gsub('{functionId}', function_id)
827
916
 
828
917
  if function_id.nil?
829
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
918
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
830
919
  end
831
920
 
832
921
  api_params = {
@@ -837,7 +926,7 @@ module Appwrite
837
926
  headers: headers,
838
927
  scheduledAt: scheduled_at,
839
928
  }
840
-
929
+
841
930
  api_headers = {
842
931
  "X-Appwrite-Project": @client.get_config('project'),
843
932
  "content-type": 'application/json',
@@ -851,7 +940,6 @@ module Appwrite
851
940
  params: api_params,
852
941
  response_type: Models::Execution
853
942
  )
854
-
855
943
  end
856
944
 
857
945
  # Get a function execution log by its unique ID.
@@ -860,22 +948,24 @@ module Appwrite
860
948
  # @param [String] execution_id Execution ID.
861
949
  #
862
950
  # @return [Execution]
863
- def get_execution(function_id:, execution_id:)
951
+ def get_execution(
952
+ function_id:,
953
+ execution_id:
954
+ )
864
955
  api_path = '/functions/{functionId}/executions/{executionId}'
865
956
  .gsub('{functionId}', function_id)
866
957
  .gsub('{executionId}', execution_id)
867
958
 
868
959
  if function_id.nil?
869
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
960
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
870
961
  end
871
962
 
872
963
  if execution_id.nil?
873
- raise Appwrite::Exception.new('Missing required parameter: "executionId"')
964
+ raise Appwrite::Exception.new('Missing required parameter: "executionId"')
874
965
  end
875
966
 
876
- api_params = {
877
- }
878
-
967
+ api_params = {}
968
+
879
969
  api_headers = {
880
970
  "X-Appwrite-Project": @client.get_config('project'),
881
971
  "accept": 'application/json',
@@ -888,7 +978,6 @@ module Appwrite
888
978
  params: api_params,
889
979
  response_type: Models::Execution
890
980
  )
891
-
892
981
  end
893
982
 
894
983
  # Delete a function execution by its unique ID.
@@ -897,22 +986,24 @@ module Appwrite
897
986
  # @param [String] execution_id Execution ID.
898
987
  #
899
988
  # @return []
900
- def delete_execution(function_id:, execution_id:)
989
+ def delete_execution(
990
+ function_id:,
991
+ execution_id:
992
+ )
901
993
  api_path = '/functions/{functionId}/executions/{executionId}'
902
994
  .gsub('{functionId}', function_id)
903
995
  .gsub('{executionId}', execution_id)
904
996
 
905
997
  if function_id.nil?
906
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
998
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
907
999
  end
908
1000
 
909
1001
  if execution_id.nil?
910
- raise Appwrite::Exception.new('Missing required parameter: "executionId"')
1002
+ raise Appwrite::Exception.new('Missing required parameter: "executionId"')
911
1003
  end
912
1004
 
913
- api_params = {
914
- }
915
-
1005
+ api_params = {}
1006
+
916
1007
  api_headers = {
917
1008
  "X-Appwrite-Project": @client.get_config('project'),
918
1009
  "content-type": 'application/json',
@@ -924,7 +1015,6 @@ module Appwrite
924
1015
  headers: api_headers,
925
1016
  params: api_params,
926
1017
  )
927
-
928
1018
  end
929
1019
 
930
1020
  # Get a list of all variables of a specific function.
@@ -934,19 +1024,23 @@ module Appwrite
934
1024
  # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
935
1025
  #
936
1026
  # @return [VariableList]
937
- def list_variables(function_id:, queries: nil, total: nil)
1027
+ def list_variables(
1028
+ function_id:,
1029
+ queries: nil,
1030
+ total: nil
1031
+ )
938
1032
  api_path = '/functions/{functionId}/variables'
939
1033
  .gsub('{functionId}', function_id)
940
1034
 
941
1035
  if function_id.nil?
942
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1036
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
943
1037
  end
944
1038
 
945
1039
  api_params = {
946
1040
  queries: queries,
947
1041
  total: total,
948
1042
  }
949
-
1043
+
950
1044
  api_headers = {
951
1045
  "X-Appwrite-Project": @client.get_config('project'),
952
1046
  "accept": 'application/json',
@@ -959,37 +1053,42 @@ module Appwrite
959
1053
  params: api_params,
960
1054
  response_type: Models::VariableList
961
1055
  )
962
-
963
1056
  end
964
1057
 
965
1058
  # Create a new function environment variable. These variables can be accessed
966
1059
  # in the function at runtime as environment variables.
967
1060
  #
968
1061
  # @param [String] function_id Function unique ID.
969
- # @param [String] variable_id Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
970
- # @param [String] key Variable key. Max length: 255 chars.
1062
+ # @param [String] variable_id Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1063
+ # @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
971
1064
  # @param [String] value Variable value. Max length: 8192 chars.
972
1065
  # @param [] secret Secret variables can be updated or deleted, but only functions can read them during build and runtime.
973
1066
  #
974
1067
  # @return [Variable]
975
- def create_variable(function_id:, variable_id:, key:, value:, secret: nil)
1068
+ def create_variable(
1069
+ function_id:,
1070
+ variable_id:,
1071
+ key:,
1072
+ value:,
1073
+ secret: nil
1074
+ )
976
1075
  api_path = '/functions/{functionId}/variables'
977
1076
  .gsub('{functionId}', function_id)
978
1077
 
979
1078
  if function_id.nil?
980
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1079
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
981
1080
  end
982
1081
 
983
1082
  if variable_id.nil?
984
- raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1083
+ raise Appwrite::Exception.new('Missing required parameter: "variableId"')
985
1084
  end
986
1085
 
987
1086
  if key.nil?
988
- raise Appwrite::Exception.new('Missing required parameter: "key"')
1087
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
989
1088
  end
990
1089
 
991
1090
  if value.nil?
992
- raise Appwrite::Exception.new('Missing required parameter: "value"')
1091
+ raise Appwrite::Exception.new('Missing required parameter: "value"')
993
1092
  end
994
1093
 
995
1094
  api_params = {
@@ -998,7 +1097,7 @@ module Appwrite
998
1097
  value: value,
999
1098
  secret: secret,
1000
1099
  }
1001
-
1100
+
1002
1101
  api_headers = {
1003
1102
  "X-Appwrite-Project": @client.get_config('project'),
1004
1103
  "content-type": 'application/json',
@@ -1012,7 +1111,6 @@ module Appwrite
1012
1111
  params: api_params,
1013
1112
  response_type: Models::Variable
1014
1113
  )
1015
-
1016
1114
  end
1017
1115
 
1018
1116
  # Get a variable by its unique ID.
@@ -1021,22 +1119,24 @@ module Appwrite
1021
1119
  # @param [String] variable_id Variable unique ID.
1022
1120
  #
1023
1121
  # @return [Variable]
1024
- def get_variable(function_id:, variable_id:)
1122
+ def get_variable(
1123
+ function_id:,
1124
+ variable_id:
1125
+ )
1025
1126
  api_path = '/functions/{functionId}/variables/{variableId}'
1026
1127
  .gsub('{functionId}', function_id)
1027
1128
  .gsub('{variableId}', variable_id)
1028
1129
 
1029
1130
  if function_id.nil?
1030
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1131
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1031
1132
  end
1032
1133
 
1033
1134
  if variable_id.nil?
1034
- raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1135
+ raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1035
1136
  end
1036
1137
 
1037
- api_params = {
1038
- }
1039
-
1138
+ api_params = {}
1139
+
1040
1140
  api_headers = {
1041
1141
  "X-Appwrite-Project": @client.get_config('project'),
1042
1142
  "accept": 'application/json',
@@ -1049,29 +1149,34 @@ module Appwrite
1049
1149
  params: api_params,
1050
1150
  response_type: Models::Variable
1051
1151
  )
1052
-
1053
1152
  end
1054
1153
 
1055
1154
  # Update variable by its unique ID.
1056
1155
  #
1057
1156
  # @param [String] function_id Function unique ID.
1058
1157
  # @param [String] variable_id Variable unique ID.
1059
- # @param [String] key Variable key. Max length: 255 chars.
1158
+ # @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
1060
1159
  # @param [String] value Variable value. Max length: 8192 chars.
1061
1160
  # @param [] secret Secret variables can be updated or deleted, but only functions can read them during build and runtime.
1062
1161
  #
1063
1162
  # @return [Variable]
1064
- def update_variable(function_id:, variable_id:, key: nil, value: nil, secret: nil)
1163
+ def update_variable(
1164
+ function_id:,
1165
+ variable_id:,
1166
+ key: nil,
1167
+ value: nil,
1168
+ secret: nil
1169
+ )
1065
1170
  api_path = '/functions/{functionId}/variables/{variableId}'
1066
1171
  .gsub('{functionId}', function_id)
1067
1172
  .gsub('{variableId}', variable_id)
1068
1173
 
1069
1174
  if function_id.nil?
1070
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1175
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1071
1176
  end
1072
1177
 
1073
1178
  if variable_id.nil?
1074
- raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1179
+ raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1075
1180
  end
1076
1181
 
1077
1182
  api_params = {
@@ -1079,7 +1184,7 @@ module Appwrite
1079
1184
  value: value,
1080
1185
  secret: secret,
1081
1186
  }
1082
-
1187
+
1083
1188
  api_headers = {
1084
1189
  "X-Appwrite-Project": @client.get_config('project'),
1085
1190
  "content-type": 'application/json',
@@ -1093,7 +1198,6 @@ module Appwrite
1093
1198
  params: api_params,
1094
1199
  response_type: Models::Variable
1095
1200
  )
1096
-
1097
1201
  end
1098
1202
 
1099
1203
  # Delete a variable by its unique ID.
@@ -1102,22 +1206,24 @@ module Appwrite
1102
1206
  # @param [String] variable_id Variable unique ID.
1103
1207
  #
1104
1208
  # @return []
1105
- def delete_variable(function_id:, variable_id:)
1209
+ def delete_variable(
1210
+ function_id:,
1211
+ variable_id:
1212
+ )
1106
1213
  api_path = '/functions/{functionId}/variables/{variableId}'
1107
1214
  .gsub('{functionId}', function_id)
1108
1215
  .gsub('{variableId}', variable_id)
1109
1216
 
1110
1217
  if function_id.nil?
1111
- raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1218
+ raise Appwrite::Exception.new('Missing required parameter: "functionId"')
1112
1219
  end
1113
1220
 
1114
1221
  if variable_id.nil?
1115
- raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1222
+ raise Appwrite::Exception.new('Missing required parameter: "variableId"')
1116
1223
  end
1117
1224
 
1118
- api_params = {
1119
- }
1120
-
1225
+ api_params = {}
1226
+
1121
1227
  api_headers = {
1122
1228
  "X-Appwrite-Project": @client.get_config('project'),
1123
1229
  "content-type": 'application/json',
@@ -1129,8 +1235,6 @@ module Appwrite
1129
1235
  headers: api_headers,
1130
1236
  params: api_params,
1131
1237
  )
1132
-
1133
1238
  end
1134
-
1135
- end
1239
+ end
1136
1240
  end