appwrite 23.0.0 → 23.1.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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +28 -2
  3. data/lib/appwrite/enums/auth_method.rb +13 -0
  4. data/lib/appwrite/enums/build_runtime.rb +1 -0
  5. data/lib/appwrite/enums/email_template_locale.rb +137 -0
  6. data/lib/appwrite/enums/email_template_type.rb +13 -0
  7. data/lib/appwrite/enums/o_auth_provider.rb +5 -0
  8. data/lib/appwrite/enums/project_policy.rb +15 -0
  9. data/lib/appwrite/enums/proxy_resource_type.rb +8 -0
  10. data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +8 -0
  11. data/lib/appwrite/enums/proxy_rule_status.rb +9 -0
  12. data/lib/appwrite/enums/runtime.rb +1 -0
  13. data/lib/appwrite/enums/scopes.rb +44 -31
  14. data/lib/appwrite/enums/secure.rb +8 -0
  15. data/lib/appwrite/enums/status_code.rb +10 -0
  16. data/lib/appwrite/models/attribute_bigint.rb +96 -0
  17. data/lib/appwrite/models/block.rb +28 -3
  18. data/lib/appwrite/models/column_bigint.rb +96 -0
  19. data/lib/appwrite/models/email_template.rb +62 -0
  20. data/lib/appwrite/models/email_template_list.rb +32 -0
  21. data/lib/appwrite/models/ephemeral_key.rb +67 -0
  22. data/lib/appwrite/models/membership.rb +5 -0
  23. data/lib/appwrite/models/mock_number.rb +18 -8
  24. data/lib/appwrite/models/mock_number_list.rb +32 -0
  25. data/lib/appwrite/models/o_auth2_amazon.rb +42 -0
  26. data/lib/appwrite/models/o_auth2_apple.rb +52 -0
  27. data/lib/appwrite/models/o_auth2_auth0.rb +47 -0
  28. data/lib/appwrite/models/o_auth2_authentik.rb +47 -0
  29. data/lib/appwrite/models/o_auth2_autodesk.rb +42 -0
  30. data/lib/appwrite/models/o_auth2_bitbucket.rb +42 -0
  31. data/lib/appwrite/models/o_auth2_bitly.rb +42 -0
  32. data/lib/appwrite/models/o_auth2_box.rb +42 -0
  33. data/lib/appwrite/models/o_auth2_dailymotion.rb +42 -0
  34. data/lib/appwrite/models/o_auth2_discord.rb +42 -0
  35. data/lib/appwrite/models/o_auth2_disqus.rb +42 -0
  36. data/lib/appwrite/models/o_auth2_dropbox.rb +42 -0
  37. data/lib/appwrite/models/o_auth2_etsy.rb +42 -0
  38. data/lib/appwrite/models/o_auth2_facebook.rb +42 -0
  39. data/lib/appwrite/models/o_auth2_figma.rb +42 -0
  40. data/lib/appwrite/models/o_auth2_fusion_auth.rb +47 -0
  41. data/lib/appwrite/models/o_auth2_github.rb +42 -0
  42. data/lib/appwrite/models/o_auth2_gitlab.rb +47 -0
  43. data/lib/appwrite/models/o_auth2_google.rb +42 -0
  44. data/lib/appwrite/models/o_auth2_keycloak.rb +52 -0
  45. data/lib/appwrite/models/o_auth2_kick.rb +42 -0
  46. data/lib/appwrite/models/o_auth2_linkedin.rb +42 -0
  47. data/lib/appwrite/models/o_auth2_microsoft.rb +47 -0
  48. data/lib/appwrite/models/o_auth2_notion.rb +42 -0
  49. data/lib/appwrite/models/o_auth2_oidc.rb +62 -0
  50. data/lib/appwrite/models/o_auth2_okta.rb +52 -0
  51. data/lib/appwrite/models/o_auth2_paypal.rb +42 -0
  52. data/lib/appwrite/models/o_auth2_podio.rb +42 -0
  53. data/lib/appwrite/models/o_auth2_provider_list.rb +32 -0
  54. data/lib/appwrite/models/o_auth2_salesforce.rb +42 -0
  55. data/lib/appwrite/models/o_auth2_slack.rb +42 -0
  56. data/lib/appwrite/models/o_auth2_spotify.rb +42 -0
  57. data/lib/appwrite/models/o_auth2_stripe.rb +42 -0
  58. data/lib/appwrite/models/o_auth2_tradeshift.rb +42 -0
  59. data/lib/appwrite/models/o_auth2_twitch.rb +42 -0
  60. data/lib/appwrite/models/o_auth2_word_press.rb +42 -0
  61. data/lib/appwrite/models/o_auth2_x.rb +42 -0
  62. data/lib/appwrite/models/o_auth2_yahoo.rb +42 -0
  63. data/lib/appwrite/models/o_auth2_yandex.rb +42 -0
  64. data/lib/appwrite/models/o_auth2_zoho.rb +42 -0
  65. data/lib/appwrite/models/o_auth2_zoom.rb +42 -0
  66. data/lib/appwrite/models/policy_list.rb +32 -0
  67. data/lib/appwrite/models/policy_membership_privacy.rb +52 -0
  68. data/lib/appwrite/models/policy_password_dictionary.rb +32 -0
  69. data/lib/appwrite/models/policy_password_history.rb +32 -0
  70. data/lib/appwrite/models/policy_password_personal_data.rb +32 -0
  71. data/lib/appwrite/models/policy_session_alert.rb +32 -0
  72. data/lib/appwrite/models/policy_session_duration.rb +32 -0
  73. data/lib/appwrite/models/policy_session_invalidation.rb +32 -0
  74. data/lib/appwrite/models/policy_session_limit.rb +32 -0
  75. data/lib/appwrite/models/policy_user_limit.rb +32 -0
  76. data/lib/appwrite/models/project.rb +20 -5
  77. data/lib/appwrite/models/proxy_rule.rb +127 -0
  78. data/lib/appwrite/models/proxy_rule_list.rb +32 -0
  79. data/lib/appwrite/services/account.rb +1 -1
  80. data/lib/appwrite/services/databases.rb +126 -0
  81. data/lib/appwrite/services/functions.rb +13 -7
  82. data/lib/appwrite/services/project.rb +2695 -288
  83. data/lib/appwrite/services/proxy.rb +303 -0
  84. data/lib/appwrite/services/sites.rb +13 -7
  85. data/lib/appwrite/services/tables_db.rb +120 -0
  86. data/lib/appwrite.rb +69 -0
  87. metadata +71 -2
@@ -0,0 +1,42 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Yahoo
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+ attr_reader :client_id
9
+ attr_reader :client_secret
10
+
11
+ def initialize(
12
+ id:,
13
+ enabled:,
14
+ client_id:,
15
+ client_secret:
16
+ )
17
+ @id = id
18
+ @enabled = enabled
19
+ @client_id = client_id
20
+ @client_secret = client_secret
21
+ end
22
+
23
+ def self.from(map:)
24
+ OAuth2Yahoo.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Yandex
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+ attr_reader :client_id
9
+ attr_reader :client_secret
10
+
11
+ def initialize(
12
+ id:,
13
+ enabled:,
14
+ client_id:,
15
+ client_secret:
16
+ )
17
+ @id = id
18
+ @enabled = enabled
19
+ @client_id = client_id
20
+ @client_secret = client_secret
21
+ end
22
+
23
+ def self.from(map:)
24
+ OAuth2Yandex.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Zoho
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+ attr_reader :client_id
9
+ attr_reader :client_secret
10
+
11
+ def initialize(
12
+ id:,
13
+ enabled:,
14
+ client_id:,
15
+ client_secret:
16
+ )
17
+ @id = id
18
+ @enabled = enabled
19
+ @client_id = client_id
20
+ @client_secret = client_secret
21
+ end
22
+
23
+ def self.from(map:)
24
+ OAuth2Zoho.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Zoom
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+ attr_reader :client_id
9
+ attr_reader :client_secret
10
+
11
+ def initialize(
12
+ id:,
13
+ enabled:,
14
+ client_id:,
15
+ client_secret:
16
+ )
17
+ @id = id
18
+ @enabled = enabled
19
+ @client_id = client_id
20
+ @client_secret = client_secret
21
+ end
22
+
23
+ def self.from(map:)
24
+ OAuth2Zoom.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyList
6
+ attr_reader :total
7
+ attr_reader :policies
8
+
9
+ def initialize(
10
+ total:,
11
+ policies:
12
+ )
13
+ @total = total
14
+ @policies = policies
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicyList.new(
19
+ total: map["total"],
20
+ policies: map["policies"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "total": @total,
27
+ "policies": @policies
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,52 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyMembershipPrivacy
6
+ attr_reader :id
7
+ attr_reader :user_id
8
+ attr_reader :user_email
9
+ attr_reader :user_phone
10
+ attr_reader :user_name
11
+ attr_reader :user_mfa
12
+
13
+ def initialize(
14
+ id:,
15
+ user_id:,
16
+ user_email:,
17
+ user_phone:,
18
+ user_name:,
19
+ user_mfa:
20
+ )
21
+ @id = id
22
+ @user_id = user_id
23
+ @user_email = user_email
24
+ @user_phone = user_phone
25
+ @user_name = user_name
26
+ @user_mfa = user_mfa
27
+ end
28
+
29
+ def self.from(map:)
30
+ PolicyMembershipPrivacy.new(
31
+ id: map["$id"],
32
+ user_id: map["userId"],
33
+ user_email: map["userEmail"],
34
+ user_phone: map["userPhone"],
35
+ user_name: map["userName"],
36
+ user_mfa: map["userMFA"]
37
+ )
38
+ end
39
+
40
+ def to_map
41
+ {
42
+ "$id": @id,
43
+ "userId": @user_id,
44
+ "userEmail": @user_email,
45
+ "userPhone": @user_phone,
46
+ "userName": @user_name,
47
+ "userMFA": @user_mfa
48
+ }
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyPasswordDictionary
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+
9
+ def initialize(
10
+ id:,
11
+ enabled:
12
+ )
13
+ @id = id
14
+ @enabled = enabled
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicyPasswordDictionary.new(
19
+ id: map["$id"],
20
+ enabled: map["enabled"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "enabled": @enabled
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyPasswordHistory
6
+ attr_reader :id
7
+ attr_reader :total
8
+
9
+ def initialize(
10
+ id:,
11
+ total:
12
+ )
13
+ @id = id
14
+ @total = total
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicyPasswordHistory.new(
19
+ id: map["$id"],
20
+ total: map["total"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "total": @total
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyPasswordPersonalData
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+
9
+ def initialize(
10
+ id:,
11
+ enabled:
12
+ )
13
+ @id = id
14
+ @enabled = enabled
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicyPasswordPersonalData.new(
19
+ id: map["$id"],
20
+ enabled: map["enabled"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "enabled": @enabled
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicySessionAlert
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+
9
+ def initialize(
10
+ id:,
11
+ enabled:
12
+ )
13
+ @id = id
14
+ @enabled = enabled
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicySessionAlert.new(
19
+ id: map["$id"],
20
+ enabled: map["enabled"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "enabled": @enabled
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicySessionDuration
6
+ attr_reader :id
7
+ attr_reader :duration
8
+
9
+ def initialize(
10
+ id:,
11
+ duration:
12
+ )
13
+ @id = id
14
+ @duration = duration
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicySessionDuration.new(
19
+ id: map["$id"],
20
+ duration: map["duration"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "duration": @duration
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicySessionInvalidation
6
+ attr_reader :id
7
+ attr_reader :enabled
8
+
9
+ def initialize(
10
+ id:,
11
+ enabled:
12
+ )
13
+ @id = id
14
+ @enabled = enabled
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicySessionInvalidation.new(
19
+ id: map["$id"],
20
+ enabled: map["enabled"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "enabled": @enabled
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicySessionLimit
6
+ attr_reader :id
7
+ attr_reader :total
8
+
9
+ def initialize(
10
+ id:,
11
+ total:
12
+ )
13
+ @id = id
14
+ @total = total
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicySessionLimit.new(
19
+ id: map["$id"],
20
+ total: map["total"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "total": @total
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyUserLimit
6
+ attr_reader :id
7
+ attr_reader :total
8
+
9
+ def initialize(
10
+ id:,
11
+ total:
12
+ )
13
+ @id = id
14
+ @total = total
15
+ end
16
+
17
+ def self.from(map:)
18
+ PolicyUserLimit.new(
19
+ id: map["$id"],
20
+ total: map["total"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "total": @total
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -31,6 +31,8 @@ module Appwrite
31
31
  attr_reader :auth_memberships_user_name
32
32
  attr_reader :auth_memberships_user_email
33
33
  attr_reader :auth_memberships_mfa
34
+ attr_reader :auth_memberships_user_id
35
+ attr_reader :auth_memberships_user_phone
34
36
  attr_reader :auth_invalidate_sessions
35
37
  attr_reader :o_auth_providers
36
38
  attr_reader :platforms
@@ -40,7 +42,8 @@ module Appwrite
40
42
  attr_reader :smtp_enabled
41
43
  attr_reader :smtp_sender_name
42
44
  attr_reader :smtp_sender_email
43
- attr_reader :smtp_reply_to
45
+ attr_reader :smtp_reply_to_name
46
+ attr_reader :smtp_reply_to_email
44
47
  attr_reader :smtp_host
45
48
  attr_reader :smtp_port
46
49
  attr_reader :smtp_username
@@ -111,6 +114,8 @@ module Appwrite
111
114
  auth_memberships_user_name:,
112
115
  auth_memberships_user_email:,
113
116
  auth_memberships_mfa:,
117
+ auth_memberships_user_id:,
118
+ auth_memberships_user_phone:,
114
119
  auth_invalidate_sessions:,
115
120
  o_auth_providers:,
116
121
  platforms:,
@@ -120,7 +125,8 @@ module Appwrite
120
125
  smtp_enabled:,
121
126
  smtp_sender_name:,
122
127
  smtp_sender_email:,
123
- smtp_reply_to:,
128
+ smtp_reply_to_name:,
129
+ smtp_reply_to_email:,
124
130
  smtp_host:,
125
131
  smtp_port:,
126
132
  smtp_username:,
@@ -190,6 +196,8 @@ module Appwrite
190
196
  @auth_memberships_user_name = auth_memberships_user_name
191
197
  @auth_memberships_user_email = auth_memberships_user_email
192
198
  @auth_memberships_mfa = auth_memberships_mfa
199
+ @auth_memberships_user_id = auth_memberships_user_id
200
+ @auth_memberships_user_phone = auth_memberships_user_phone
193
201
  @auth_invalidate_sessions = auth_invalidate_sessions
194
202
  @o_auth_providers = o_auth_providers
195
203
  @platforms = platforms
@@ -199,7 +207,8 @@ module Appwrite
199
207
  @smtp_enabled = smtp_enabled
200
208
  @smtp_sender_name = smtp_sender_name
201
209
  @smtp_sender_email = smtp_sender_email
202
- @smtp_reply_to = smtp_reply_to
210
+ @smtp_reply_to_name = smtp_reply_to_name
211
+ @smtp_reply_to_email = smtp_reply_to_email
203
212
  @smtp_host = smtp_host
204
213
  @smtp_port = smtp_port
205
214
  @smtp_username = smtp_username
@@ -272,6 +281,8 @@ module Appwrite
272
281
  auth_memberships_user_name: map["authMembershipsUserName"],
273
282
  auth_memberships_user_email: map["authMembershipsUserEmail"],
274
283
  auth_memberships_mfa: map["authMembershipsMfa"],
284
+ auth_memberships_user_id: map["authMembershipsUserId"],
285
+ auth_memberships_user_phone: map["authMembershipsUserPhone"],
275
286
  auth_invalidate_sessions: map["authInvalidateSessions"],
276
287
  o_auth_providers: map["oAuthProviders"].map { |it| AuthProvider.from(map: it) },
277
288
  platforms: map["platforms"],
@@ -281,7 +292,8 @@ module Appwrite
281
292
  smtp_enabled: map["smtpEnabled"],
282
293
  smtp_sender_name: map["smtpSenderName"],
283
294
  smtp_sender_email: map["smtpSenderEmail"],
284
- smtp_reply_to: map["smtpReplyTo"],
295
+ smtp_reply_to_name: map["smtpReplyToName"],
296
+ smtp_reply_to_email: map["smtpReplyToEmail"],
285
297
  smtp_host: map["smtpHost"],
286
298
  smtp_port: map["smtpPort"],
287
299
  smtp_username: map["smtpUsername"],
@@ -355,6 +367,8 @@ module Appwrite
355
367
  "authMembershipsUserName": @auth_memberships_user_name,
356
368
  "authMembershipsUserEmail": @auth_memberships_user_email,
357
369
  "authMembershipsMfa": @auth_memberships_mfa,
370
+ "authMembershipsUserId": @auth_memberships_user_id,
371
+ "authMembershipsUserPhone": @auth_memberships_user_phone,
358
372
  "authInvalidateSessions": @auth_invalidate_sessions,
359
373
  "oAuthProviders": @o_auth_providers.map { |it| it.to_map },
360
374
  "platforms": @platforms,
@@ -364,7 +378,8 @@ module Appwrite
364
378
  "smtpEnabled": @smtp_enabled,
365
379
  "smtpSenderName": @smtp_sender_name,
366
380
  "smtpSenderEmail": @smtp_sender_email,
367
- "smtpReplyTo": @smtp_reply_to,
381
+ "smtpReplyToName": @smtp_reply_to_name,
382
+ "smtpReplyToEmail": @smtp_reply_to_email,
368
383
  "smtpHost": @smtp_host,
369
384
  "smtpPort": @smtp_port,
370
385
  "smtpUsername": @smtp_username,