appwrite 25.0.0 → 26.0.0

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +36 -6
  3. data/lib/appwrite/enums/billing_plan_group.rb +9 -0
  4. data/lib/appwrite/enums/database_status.rb +9 -0
  5. data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +10 -0
  6. data/lib/appwrite/enums/o_auth_provider.rb +1 -0
  7. data/lib/appwrite/enums/organization_key_scopes.rb +4 -0
  8. data/lib/appwrite/enums/project_key_scopes.rb +9 -2
  9. data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +10 -0
  10. data/lib/appwrite/enums/project_o_auth_provider_id.rb +1 -0
  11. data/lib/appwrite/enums/project_policy_id.rb +2 -0
  12. data/lib/appwrite/enums/project_service_id.rb +1 -0
  13. data/lib/appwrite/models/activity_event.rb +3 -73
  14. data/lib/appwrite/models/additional_resource.rb +52 -0
  15. data/lib/appwrite/models/backup_policy.rb +5 -0
  16. data/lib/appwrite/models/billing_plan.rb +379 -0
  17. data/lib/appwrite/models/billing_plan_addon.rb +32 -0
  18. data/lib/appwrite/models/billing_plan_addon_details.rb +62 -0
  19. data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +117 -0
  20. data/lib/appwrite/models/billing_plan_limits.rb +32 -0
  21. data/lib/appwrite/models/billing_plan_supported_addons.rb +37 -0
  22. data/lib/appwrite/models/block.rb +5 -0
  23. data/lib/appwrite/models/database.rb +19 -0
  24. data/lib/appwrite/models/locale.rb +58 -3
  25. data/lib/appwrite/models/membership.rb +5 -0
  26. data/lib/appwrite/models/o_auth2_appwrite.rb +42 -0
  27. data/lib/appwrite/models/o_auth2_oidc.rb +13 -3
  28. data/lib/appwrite/models/organization.rb +197 -0
  29. data/lib/appwrite/models/policy_deny_corporate_email.rb +32 -0
  30. data/lib/appwrite/models/policy_membership_privacy.rb +8 -3
  31. data/lib/appwrite/models/policy_password_strength.rb +52 -0
  32. data/lib/appwrite/models/program.rb +67 -0
  33. data/lib/appwrite/models/project.rb +93 -13
  34. data/lib/appwrite/models/usage_billing_plan.rb +77 -0
  35. data/lib/appwrite/models/user.rb +25 -0
  36. data/lib/appwrite/query.rb +13 -1
  37. data/lib/appwrite/services/account.rb +88 -2
  38. data/lib/appwrite/services/activities.rb +4 -0
  39. data/lib/appwrite/services/advisor.rb +9 -0
  40. data/lib/appwrite/services/avatars.rb +16 -0
  41. data/lib/appwrite/services/backups.rb +37 -1
  42. data/lib/appwrite/services/databases.rb +178 -0
  43. data/lib/appwrite/services/functions.rb +56 -4
  44. data/lib/appwrite/services/graphql.rb +4 -0
  45. data/lib/appwrite/services/locale.rb +16 -0
  46. data/lib/appwrite/services/messaging.rb +188 -132
  47. data/lib/appwrite/services/organization.rb +278 -3
  48. data/lib/appwrite/services/presences.rb +9 -0
  49. data/lib/appwrite/services/project.rb +417 -49
  50. data/lib/appwrite/services/proxy.rb +15 -0
  51. data/lib/appwrite/services/sites.rb +50 -1
  52. data/lib/appwrite/services/storage.rb +24 -0
  53. data/lib/appwrite/services/tables_db.rb +139 -1
  54. data/lib/appwrite/services/teams.rb +24 -0
  55. data/lib/appwrite/services/tokens.rb +9 -0
  56. data/lib/appwrite/services/users.rb +81 -1
  57. data/lib/appwrite/services/webhooks.rb +11 -0
  58. data/lib/appwrite.rb +17 -15
  59. metadata +19 -17
  60. data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
  61. data/lib/appwrite/enums/health_check_status.rb +0 -8
  62. data/lib/appwrite/enums/health_queue_name.rb +0 -19
  63. data/lib/appwrite/models/health_antivirus.rb +0 -49
  64. data/lib/appwrite/models/health_certificate.rb +0 -52
  65. data/lib/appwrite/models/health_queue.rb +0 -27
  66. data/lib/appwrite/models/health_status.rb +0 -53
  67. data/lib/appwrite/models/health_status_list.rb +0 -32
  68. data/lib/appwrite/models/health_time.rb +0 -37
  69. data/lib/appwrite/models/usage_event.rb +0 -72
  70. data/lib/appwrite/models/usage_event_list.rb +0 -32
  71. data/lib/appwrite/models/usage_gauge.rb +0 -47
  72. data/lib/appwrite/models/usage_gauge_list.rb +0 -32
  73. data/lib/appwrite/services/health.rb +0 -630
  74. data/lib/appwrite/services/usage.rb +0 -86
@@ -1,86 +0,0 @@
1
- #frozen_string_literal: true
2
-
3
- module Appwrite
4
- class Usage < Service
5
-
6
- def initialize(client)
7
- @client = client
8
- end
9
-
10
- # Query usage event metrics from the usage database. Returns individual event
11
- # rows with full metadata. Pass Query objects as JSON strings to filter,
12
- # paginate, and order results. Supported query methods: equal,
13
- # greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset.
14
- # Supported filter attributes: metric, path, method, status, resource,
15
- # resourceId, country, userAgent, time (these match the underlying column
16
- # names — note that the response surfaces `resource` as `resourceType` and
17
- # `country` as `countryCode`). When no time filter is supplied the endpoint
18
- # defaults to the last 7 days. Default `limit(100)` is applied if none is
19
- # given; user-supplied limits are capped at 500. The `total` field is capped
20
- # at 5000 to keep counts predictable — pass `total=false` to skip the count
21
- # entirely.
22
- #
23
- # @param [Array] queries Array of query strings as JSON. Supported: equal("metric", [...]), equal("path", [...]), equal("method", [...]), equal("status", [...]), equal("resource", [...]), equal("resourceId", [...]), equal("country", [...]), equal("userAgent", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
24
- # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
25
- #
26
- # @return [UsageEventList]
27
- def list_events(queries: nil, total: nil)
28
- api_path = '/usage/events'
29
-
30
- api_params = {
31
- queries: queries,
32
- total: total,
33
- }
34
-
35
- api_headers = {
36
- }
37
-
38
- @client.call(
39
- method: 'GET',
40
- path: api_path,
41
- headers: api_headers,
42
- params: api_params,
43
- response_type: Models::UsageEventList
44
- )
45
-
46
- end
47
-
48
- # Query usage gauge metrics (point-in-time resource snapshots) from the usage
49
- # database. Returns individual gauge snapshots with metric, value, timestamp,
50
- # resourceType, and resourceId. Pass Query objects as JSON strings to filter,
51
- # paginate, and order results. Supported query methods: equal,
52
- # greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset.
53
- # Supported filter attributes: metric, time. Use `orderDesc("time"),
54
- # limit(1)` to fetch the most recent snapshot. When no time filter is
55
- # supplied the endpoint defaults to the last 7 days. Default `limit(100)` is
56
- # applied if none is given; user-supplied limits are capped at 500. The
57
- # `total` field is capped at 5000 to keep counts predictable — pass
58
- # `total=false` to skip the count entirely.
59
- #
60
- # @param [Array] queries Array of query strings as JSON. Supported: equal("metric", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
61
- # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
62
- #
63
- # @return [UsageGaugeList]
64
- def list_gauges(queries: nil, total: nil)
65
- api_path = '/usage/gauges'
66
-
67
- api_params = {
68
- queries: queries,
69
- total: total,
70
- }
71
-
72
- api_headers = {
73
- }
74
-
75
- @client.call(
76
- method: 'GET',
77
- path: api_path,
78
- headers: api_headers,
79
- params: api_params,
80
- response_type: Models::UsageGaugeList
81
- )
82
-
83
- end
84
-
85
- end
86
- end