appwrite 25.1.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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +18 -4
  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 +7 -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 +1 -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/program.rb +67 -0
  32. data/lib/appwrite/models/project.rb +46 -11
  33. data/lib/appwrite/models/usage_billing_plan.rb +77 -0
  34. data/lib/appwrite/models/user.rb +25 -0
  35. data/lib/appwrite/query.rb +13 -1
  36. data/lib/appwrite/services/account.rb +42 -1
  37. data/lib/appwrite/services/activities.rb +2 -0
  38. data/lib/appwrite/services/advisor.rb +4 -0
  39. data/lib/appwrite/services/avatars.rb +8 -0
  40. data/lib/appwrite/services/backups.rb +25 -1
  41. data/lib/appwrite/services/databases.rb +107 -0
  42. data/lib/appwrite/services/functions.rb +30 -4
  43. data/lib/appwrite/services/graphql.rb +2 -0
  44. data/lib/appwrite/services/locale.rb +8 -0
  45. data/lib/appwrite/services/messaging.rb +42 -136
  46. data/lib/appwrite/services/organization.rb +268 -3
  47. data/lib/appwrite/services/presences.rb +4 -0
  48. data/lib/appwrite/services/project.rb +190 -9
  49. data/lib/appwrite/services/proxy.rb +7 -0
  50. data/lib/appwrite/services/sites.rb +25 -1
  51. data/lib/appwrite/services/storage.rb +11 -0
  52. data/lib/appwrite/services/tables_db.rb +68 -1
  53. data/lib/appwrite/services/teams.rb +11 -0
  54. data/lib/appwrite/services/tokens.rb +4 -0
  55. data/lib/appwrite/services/users.rb +38 -1
  56. data/lib/appwrite/services/webhooks.rb +5 -0
  57. data/lib/appwrite.rb +16 -15
  58. metadata +18 -17
  59. data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
  60. data/lib/appwrite/enums/health_check_status.rb +0 -8
  61. data/lib/appwrite/enums/health_queue_name.rb +0 -19
  62. data/lib/appwrite/models/health_antivirus.rb +0 -49
  63. data/lib/appwrite/models/health_certificate.rb +0 -52
  64. data/lib/appwrite/models/health_queue.rb +0 -27
  65. data/lib/appwrite/models/health_status.rb +0 -53
  66. data/lib/appwrite/models/health_status_list.rb +0 -32
  67. data/lib/appwrite/models/health_time.rb +0 -37
  68. data/lib/appwrite/models/usage_event.rb +0 -72
  69. data/lib/appwrite/models/usage_event_list.rb +0 -32
  70. data/lib/appwrite/models/usage_gauge.rb +0 -47
  71. data/lib/appwrite/models/usage_gauge_list.rb +0 -32
  72. data/lib/appwrite/services/health.rb +0 -681
  73. data/lib/appwrite/services/usage.rb +0 -88
@@ -1,88 +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
- "X-Appwrite-Project": @client.get_config('project'),
37
- }
38
-
39
- @client.call(
40
- method: 'GET',
41
- path: api_path,
42
- headers: api_headers,
43
- params: api_params,
44
- response_type: Models::UsageEventList
45
- )
46
-
47
- end
48
-
49
- # Query usage gauge metrics (point-in-time resource snapshots) from the usage
50
- # database. Returns individual gauge snapshots with metric, value, timestamp,
51
- # resourceType, and resourceId. Pass Query objects as JSON strings to filter,
52
- # paginate, and order results. Supported query methods: equal,
53
- # greaterThanEqual, lessThanEqual, orderAsc, orderDesc, limit, offset.
54
- # Supported filter attributes: metric, time. Use `orderDesc("time"),
55
- # limit(1)` to fetch the most recent snapshot. When no time filter is
56
- # supplied the endpoint defaults to the last 7 days. Default `limit(100)` is
57
- # applied if none is given; user-supplied limits are capped at 500. The
58
- # `total` field is capped at 5000 to keep counts predictable — pass
59
- # `total=false` to skip the count entirely.
60
- #
61
- # @param [Array] queries Array of query strings as JSON. Supported: equal("metric", [...]), greaterThanEqual("time", "..."), lessThanEqual("time", "..."), orderAsc("time"), orderDesc("time"), limit(N), offset(N).
62
- # @param [] total When set to false, the total count returned will be 0 and will not be calculated.
63
- #
64
- # @return [UsageGaugeList]
65
- def list_gauges(queries: nil, total: nil)
66
- api_path = '/usage/gauges'
67
-
68
- api_params = {
69
- queries: queries,
70
- total: total,
71
- }
72
-
73
- api_headers = {
74
- "X-Appwrite-Project": @client.get_config('project'),
75
- }
76
-
77
- @client.call(
78
- method: 'GET',
79
- path: api_path,
80
- headers: api_headers,
81
- params: api_params,
82
- response_type: Models::UsageGaugeList
83
- )
84
-
85
- end
86
-
87
- end
88
- end