appwrite 25.1.0 → 26.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.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +18 -4
- data/lib/appwrite/enums/billing_plan_group.rb +9 -0
- data/lib/appwrite/enums/database_status.rb +20 -0
- data/lib/appwrite/enums/database_type.rb +3 -0
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth_provider.rb +1 -0
- data/lib/appwrite/enums/organization_key_scopes.rb +6 -0
- data/lib/appwrite/enums/project_key_scopes.rb +10 -2
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +1 -0
- data/lib/appwrite/enums/project_policy_id.rb +1 -0
- data/lib/appwrite/enums/project_service_id.rb +1 -0
- data/lib/appwrite/models/activity_event.rb +55 -70
- data/lib/appwrite/models/additional_resource.rb +52 -0
- data/lib/appwrite/models/app.rb +152 -0
- data/lib/appwrite/models/app_installation.rb +72 -0
- data/lib/appwrite/models/app_installation_list.rb +32 -0
- data/lib/appwrite/models/app_key.rb +67 -0
- data/lib/appwrite/models/{usage_gauge_list.rb → app_key_list.rb} +7 -7
- data/lib/appwrite/models/app_scope.rb +47 -0
- data/lib/appwrite/models/{usage_event_list.rb → app_scope_list.rb} +7 -7
- data/lib/appwrite/models/app_secret.rb +67 -0
- data/lib/appwrite/models/{health_status_list.rb → app_secret_list.rb} +7 -7
- data/lib/appwrite/models/app_secret_plaintext.rb +67 -0
- data/lib/appwrite/models/apps_list.rb +32 -0
- data/lib/appwrite/models/backup_policy.rb +5 -0
- data/lib/appwrite/models/billing_plan.rb +384 -0
- data/lib/appwrite/models/billing_plan_addon.rb +32 -0
- data/lib/appwrite/models/billing_plan_addon_details.rb +62 -0
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +117 -0
- data/lib/appwrite/models/billing_plan_limits.rb +32 -0
- data/lib/appwrite/models/billing_plan_supported_addons.rb +37 -0
- data/lib/appwrite/models/block.rb +5 -0
- data/lib/appwrite/models/database.rb +54 -6
- data/lib/appwrite/models/database_status.rb +62 -0
- data/lib/appwrite/models/database_status_connections.rb +32 -0
- data/lib/appwrite/models/database_status_replica.rb +42 -0
- data/lib/appwrite/models/database_status_volume.rb +42 -0
- data/lib/appwrite/models/dedicated_database.rb +267 -0
- data/lib/appwrite/models/dedicated_database_member.rb +42 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +37 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +67 -0
- data/lib/appwrite/models/dedicated_database_specification_list.rb +37 -0
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +47 -0
- data/lib/appwrite/models/locale.rb +58 -3
- data/lib/appwrite/models/membership.rb +5 -0
- data/lib/appwrite/models/o_auth2_appwrite.rb +42 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +13 -3
- data/lib/appwrite/models/oauth2_approve.rb +27 -0
- data/lib/appwrite/models/oauth2_authorize.rb +32 -0
- data/lib/appwrite/models/oauth2_consent.rb +72 -0
- data/lib/appwrite/models/oauth2_consent_list.rb +32 -0
- data/lib/appwrite/models/oauth2_consent_token.rb +77 -0
- data/lib/appwrite/models/oauth2_consent_token_list.rb +32 -0
- data/lib/appwrite/models/oauth2_device_authorization.rb +52 -0
- data/lib/appwrite/models/oauth2_grant.rb +82 -0
- data/lib/appwrite/models/{health_queue.rb → oauth2_organization.rb} +7 -7
- data/lib/appwrite/models/oauth2_organization_list.rb +32 -0
- data/lib/appwrite/models/oauth2_par.rb +32 -0
- data/lib/appwrite/models/oauth2_project.rb +37 -0
- data/lib/appwrite/models/oauth2_project_list.rb +32 -0
- data/lib/appwrite/models/oauth2_reject.rb +27 -0
- data/lib/appwrite/models/oauth2_token.rb +57 -0
- data/lib/appwrite/models/organization.rb +197 -0
- data/lib/appwrite/models/policy_deny_corporate_email.rb +32 -0
- data/lib/appwrite/models/policy_membership_privacy.rb +8 -3
- data/lib/appwrite/models/program.rb +67 -0
- data/lib/appwrite/models/project.rb +56 -11
- data/lib/appwrite/models/project_auth_method.rb +3 -3
- data/lib/appwrite/models/usage_billing_plan.rb +77 -0
- data/lib/appwrite/models/user.rb +25 -0
- data/lib/appwrite/query.rb +13 -1
- data/lib/appwrite/services/account.rb +251 -1
- data/lib/appwrite/services/activities.rb +2 -0
- data/lib/appwrite/services/advisor.rb +4 -0
- data/lib/appwrite/services/apps.rb +813 -0
- data/lib/appwrite/services/avatars.rb +8 -0
- data/lib/appwrite/services/backups.rb +38 -1
- data/lib/appwrite/services/databases.rb +107 -0
- data/lib/appwrite/services/functions.rb +30 -4
- data/lib/appwrite/services/graphql.rb +2 -0
- data/lib/appwrite/services/locale.rb +8 -0
- data/lib/appwrite/services/messaging.rb +42 -136
- data/lib/appwrite/services/oauth2.rb +525 -0
- data/lib/appwrite/services/organization.rb +436 -3
- data/lib/appwrite/services/presences.rb +4 -0
- data/lib/appwrite/services/project.rb +192 -9
- data/lib/appwrite/services/proxy.rb +7 -0
- data/lib/appwrite/services/sites.rb +28 -2
- data/lib/appwrite/services/storage.rb +11 -0
- data/lib/appwrite/services/tables_db.rb +201 -2
- data/lib/appwrite/services/teams.rb +209 -0
- data/lib/appwrite/services/tokens.rb +4 -0
- data/lib/appwrite/services/users.rb +38 -1
- data/lib/appwrite/services/webhooks.rb +5 -0
- data/lib/appwrite.rb +54 -15
- metadata +56 -17
- data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
- data/lib/appwrite/enums/health_check_status.rb +0 -8
- data/lib/appwrite/enums/health_queue_name.rb +0 -19
- data/lib/appwrite/models/health_antivirus.rb +0 -49
- data/lib/appwrite/models/health_certificate.rb +0 -52
- data/lib/appwrite/models/health_status.rb +0 -53
- data/lib/appwrite/models/health_time.rb +0 -37
- data/lib/appwrite/models/usage_event.rb +0 -72
- data/lib/appwrite/models/usage_gauge.rb +0 -47
- data/lib/appwrite/services/health.rb +0 -681
- data/lib/appwrite/services/usage.rb +0 -88
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class Program
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :title
|
|
8
|
+
attr_reader :description
|
|
9
|
+
attr_reader :tag
|
|
10
|
+
attr_reader :icon
|
|
11
|
+
attr_reader :url
|
|
12
|
+
attr_reader :active
|
|
13
|
+
attr_reader :external
|
|
14
|
+
attr_reader :billing_plan_id
|
|
15
|
+
|
|
16
|
+
def initialize(
|
|
17
|
+
id:,
|
|
18
|
+
title:,
|
|
19
|
+
description:,
|
|
20
|
+
tag:,
|
|
21
|
+
icon:,
|
|
22
|
+
url:,
|
|
23
|
+
active:,
|
|
24
|
+
external:,
|
|
25
|
+
billing_plan_id:
|
|
26
|
+
)
|
|
27
|
+
@id = id
|
|
28
|
+
@title = title
|
|
29
|
+
@description = description
|
|
30
|
+
@tag = tag
|
|
31
|
+
@icon = icon
|
|
32
|
+
@url = url
|
|
33
|
+
@active = active
|
|
34
|
+
@external = external
|
|
35
|
+
@billing_plan_id = billing_plan_id
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.from(map:)
|
|
39
|
+
Program.new(
|
|
40
|
+
id: map["$id"],
|
|
41
|
+
title: map["title"],
|
|
42
|
+
description: map["description"],
|
|
43
|
+
tag: map["tag"],
|
|
44
|
+
icon: map["icon"],
|
|
45
|
+
url: map["url"],
|
|
46
|
+
active: map["active"],
|
|
47
|
+
external: map["external"],
|
|
48
|
+
billing_plan_id: map["billingPlanId"]
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def to_map
|
|
53
|
+
{
|
|
54
|
+
"$id": @id,
|
|
55
|
+
"title": @title,
|
|
56
|
+
"description": @description,
|
|
57
|
+
"tag": @tag,
|
|
58
|
+
"icon": @icon,
|
|
59
|
+
"url": @url,
|
|
60
|
+
"active": @active,
|
|
61
|
+
"external": @external,
|
|
62
|
+
"billingPlanId": @billing_plan_id
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -24,20 +24,29 @@ module Appwrite
|
|
|
24
24
|
attr_reader :pinged_at
|
|
25
25
|
attr_reader :labels
|
|
26
26
|
attr_reader :status
|
|
27
|
+
attr_reader :onboarding
|
|
27
28
|
attr_reader :auth_methods
|
|
28
29
|
attr_reader :services
|
|
29
30
|
attr_reader :protocols
|
|
30
31
|
attr_reader :blocks
|
|
31
32
|
attr_reader :console_accessed_at
|
|
33
|
+
attr_reader :waf_enabled
|
|
32
34
|
attr_reader :billing_limits
|
|
33
35
|
attr_reader :o_auth2_server_enabled
|
|
34
36
|
attr_reader :o_auth2_server_authorization_url
|
|
35
37
|
attr_reader :o_auth2_server_scopes
|
|
38
|
+
attr_reader :o_auth2_server_default_scopes
|
|
39
|
+
attr_reader :o_auth2_server_authorization_details_types
|
|
36
40
|
attr_reader :o_auth2_server_access_token_duration
|
|
37
41
|
attr_reader :o_auth2_server_refresh_token_duration
|
|
38
42
|
attr_reader :o_auth2_server_public_access_token_duration
|
|
39
43
|
attr_reader :o_auth2_server_public_refresh_token_duration
|
|
44
|
+
attr_reader :o_auth2_server_installation_access_token_duration
|
|
40
45
|
attr_reader :o_auth2_server_confidential_pkce
|
|
46
|
+
attr_reader :o_auth2_server_verification_url
|
|
47
|
+
attr_reader :o_auth2_server_user_code_length
|
|
48
|
+
attr_reader :o_auth2_server_user_code_format
|
|
49
|
+
attr_reader :o_auth2_server_device_code_duration
|
|
41
50
|
attr_reader :o_auth2_server_discovery_url
|
|
42
51
|
|
|
43
52
|
def initialize(
|
|
@@ -62,21 +71,30 @@ module Appwrite
|
|
|
62
71
|
pinged_at:,
|
|
63
72
|
labels:,
|
|
64
73
|
status:,
|
|
74
|
+
onboarding:,
|
|
65
75
|
auth_methods:,
|
|
66
76
|
services:,
|
|
67
77
|
protocols:,
|
|
68
78
|
blocks:,
|
|
69
79
|
console_accessed_at:,
|
|
80
|
+
waf_enabled:,
|
|
70
81
|
billing_limits: ,
|
|
71
|
-
o_auth2_server_enabled
|
|
72
|
-
o_auth2_server_authorization_url
|
|
73
|
-
o_auth2_server_scopes
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
o_auth2_server_enabled: ,
|
|
83
|
+
o_auth2_server_authorization_url: ,
|
|
84
|
+
o_auth2_server_scopes: ,
|
|
85
|
+
o_auth2_server_default_scopes: ,
|
|
86
|
+
o_auth2_server_authorization_details_types: ,
|
|
87
|
+
o_auth2_server_access_token_duration: ,
|
|
88
|
+
o_auth2_server_refresh_token_duration: ,
|
|
89
|
+
o_auth2_server_public_access_token_duration: ,
|
|
90
|
+
o_auth2_server_public_refresh_token_duration: ,
|
|
91
|
+
o_auth2_server_installation_access_token_duration: ,
|
|
92
|
+
o_auth2_server_confidential_pkce: ,
|
|
93
|
+
o_auth2_server_verification_url: ,
|
|
94
|
+
o_auth2_server_user_code_length: ,
|
|
95
|
+
o_auth2_server_user_code_format: ,
|
|
96
|
+
o_auth2_server_device_code_duration: ,
|
|
97
|
+
o_auth2_server_discovery_url:
|
|
80
98
|
)
|
|
81
99
|
@id = id
|
|
82
100
|
@created_at = created_at
|
|
@@ -99,20 +117,29 @@ module Appwrite
|
|
|
99
117
|
@pinged_at = pinged_at
|
|
100
118
|
@labels = labels
|
|
101
119
|
@status = status
|
|
120
|
+
@onboarding = onboarding
|
|
102
121
|
@auth_methods = auth_methods
|
|
103
122
|
@services = services
|
|
104
123
|
@protocols = protocols
|
|
105
124
|
@blocks = blocks
|
|
106
125
|
@console_accessed_at = console_accessed_at
|
|
126
|
+
@waf_enabled = waf_enabled
|
|
107
127
|
@billing_limits = billing_limits
|
|
108
128
|
@o_auth2_server_enabled = o_auth2_server_enabled
|
|
109
129
|
@o_auth2_server_authorization_url = o_auth2_server_authorization_url
|
|
110
130
|
@o_auth2_server_scopes = o_auth2_server_scopes
|
|
131
|
+
@o_auth2_server_default_scopes = o_auth2_server_default_scopes
|
|
132
|
+
@o_auth2_server_authorization_details_types = o_auth2_server_authorization_details_types
|
|
111
133
|
@o_auth2_server_access_token_duration = o_auth2_server_access_token_duration
|
|
112
134
|
@o_auth2_server_refresh_token_duration = o_auth2_server_refresh_token_duration
|
|
113
135
|
@o_auth2_server_public_access_token_duration = o_auth2_server_public_access_token_duration
|
|
114
136
|
@o_auth2_server_public_refresh_token_duration = o_auth2_server_public_refresh_token_duration
|
|
137
|
+
@o_auth2_server_installation_access_token_duration = o_auth2_server_installation_access_token_duration
|
|
115
138
|
@o_auth2_server_confidential_pkce = o_auth2_server_confidential_pkce
|
|
139
|
+
@o_auth2_server_verification_url = o_auth2_server_verification_url
|
|
140
|
+
@o_auth2_server_user_code_length = o_auth2_server_user_code_length
|
|
141
|
+
@o_auth2_server_user_code_format = o_auth2_server_user_code_format
|
|
142
|
+
@o_auth2_server_device_code_duration = o_auth2_server_device_code_duration
|
|
116
143
|
@o_auth2_server_discovery_url = o_auth2_server_discovery_url
|
|
117
144
|
end
|
|
118
145
|
|
|
@@ -139,20 +166,29 @@ module Appwrite
|
|
|
139
166
|
pinged_at: map["pingedAt"],
|
|
140
167
|
labels: map["labels"],
|
|
141
168
|
status: map["status"],
|
|
169
|
+
onboarding: map["onboarding"],
|
|
142
170
|
auth_methods: map["authMethods"].map { |it| ProjectAuthMethod.from(map: it) },
|
|
143
171
|
services: map["services"].map { |it| ProjectService.from(map: it) },
|
|
144
172
|
protocols: map["protocols"].map { |it| ProjectProtocol.from(map: it) },
|
|
145
173
|
blocks: map["blocks"].map { |it| Block.from(map: it) },
|
|
146
174
|
console_accessed_at: map["consoleAccessedAt"],
|
|
147
|
-
|
|
175
|
+
waf_enabled: map["wafEnabled"],
|
|
176
|
+
billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]),
|
|
148
177
|
o_auth2_server_enabled: map["oAuth2ServerEnabled"],
|
|
149
178
|
o_auth2_server_authorization_url: map["oAuth2ServerAuthorizationUrl"],
|
|
150
179
|
o_auth2_server_scopes: map["oAuth2ServerScopes"],
|
|
180
|
+
o_auth2_server_default_scopes: map["oAuth2ServerDefaultScopes"],
|
|
181
|
+
o_auth2_server_authorization_details_types: map["oAuth2ServerAuthorizationDetailsTypes"],
|
|
151
182
|
o_auth2_server_access_token_duration: map["oAuth2ServerAccessTokenDuration"],
|
|
152
183
|
o_auth2_server_refresh_token_duration: map["oAuth2ServerRefreshTokenDuration"],
|
|
153
184
|
o_auth2_server_public_access_token_duration: map["oAuth2ServerPublicAccessTokenDuration"],
|
|
154
185
|
o_auth2_server_public_refresh_token_duration: map["oAuth2ServerPublicRefreshTokenDuration"],
|
|
186
|
+
o_auth2_server_installation_access_token_duration: map["oAuth2ServerInstallationAccessTokenDuration"],
|
|
155
187
|
o_auth2_server_confidential_pkce: map["oAuth2ServerConfidentialPkce"],
|
|
188
|
+
o_auth2_server_verification_url: map["oAuth2ServerVerificationUrl"],
|
|
189
|
+
o_auth2_server_user_code_length: map["oAuth2ServerUserCodeLength"],
|
|
190
|
+
o_auth2_server_user_code_format: map["oAuth2ServerUserCodeFormat"],
|
|
191
|
+
o_auth2_server_device_code_duration: map["oAuth2ServerDeviceCodeDuration"],
|
|
156
192
|
o_auth2_server_discovery_url: map["oAuth2ServerDiscoveryUrl"]
|
|
157
193
|
)
|
|
158
194
|
end
|
|
@@ -180,20 +216,29 @@ module Appwrite
|
|
|
180
216
|
"pingedAt": @pinged_at,
|
|
181
217
|
"labels": @labels,
|
|
182
218
|
"status": @status,
|
|
219
|
+
"onboarding": @onboarding,
|
|
183
220
|
"authMethods": @auth_methods.map { |it| it.to_map },
|
|
184
221
|
"services": @services.map { |it| it.to_map },
|
|
185
222
|
"protocols": @protocols.map { |it| it.to_map },
|
|
186
223
|
"blocks": @blocks.map { |it| it.to_map },
|
|
187
224
|
"consoleAccessedAt": @console_accessed_at,
|
|
188
|
-
"
|
|
225
|
+
"wafEnabled": @waf_enabled,
|
|
226
|
+
"billingLimits": @billing_limits&.to_map,
|
|
189
227
|
"oAuth2ServerEnabled": @o_auth2_server_enabled,
|
|
190
228
|
"oAuth2ServerAuthorizationUrl": @o_auth2_server_authorization_url,
|
|
191
229
|
"oAuth2ServerScopes": @o_auth2_server_scopes,
|
|
230
|
+
"oAuth2ServerDefaultScopes": @o_auth2_server_default_scopes,
|
|
231
|
+
"oAuth2ServerAuthorizationDetailsTypes": @o_auth2_server_authorization_details_types,
|
|
192
232
|
"oAuth2ServerAccessTokenDuration": @o_auth2_server_access_token_duration,
|
|
193
233
|
"oAuth2ServerRefreshTokenDuration": @o_auth2_server_refresh_token_duration,
|
|
194
234
|
"oAuth2ServerPublicAccessTokenDuration": @o_auth2_server_public_access_token_duration,
|
|
195
235
|
"oAuth2ServerPublicRefreshTokenDuration": @o_auth2_server_public_refresh_token_duration,
|
|
236
|
+
"oAuth2ServerInstallationAccessTokenDuration": @o_auth2_server_installation_access_token_duration,
|
|
196
237
|
"oAuth2ServerConfidentialPkce": @o_auth2_server_confidential_pkce,
|
|
238
|
+
"oAuth2ServerVerificationUrl": @o_auth2_server_verification_url,
|
|
239
|
+
"oAuth2ServerUserCodeLength": @o_auth2_server_user_code_length,
|
|
240
|
+
"oAuth2ServerUserCodeFormat": @o_auth2_server_user_code_format,
|
|
241
|
+
"oAuth2ServerDeviceCodeDuration": @o_auth2_server_device_code_duration,
|
|
197
242
|
"oAuth2ServerDiscoveryUrl": @o_auth2_server_discovery_url
|
|
198
243
|
}
|
|
199
244
|
end
|
|
@@ -32,9 +32,9 @@ module Appwrite
|
|
|
32
32
|
|
|
33
33
|
def validate_id(id)
|
|
34
34
|
valid_id = [
|
|
35
|
-
Appwrite::Enums::ProjectAuthMethodId::
|
|
36
|
-
Appwrite::Enums::ProjectAuthMethodId::
|
|
37
|
-
Appwrite::Enums::ProjectAuthMethodId::
|
|
35
|
+
Appwrite::Enums::ProjectAuthMethodId::EMAIL_PASSWORD,
|
|
36
|
+
Appwrite::Enums::ProjectAuthMethodId::MAGIC_URL,
|
|
37
|
+
Appwrite::Enums::ProjectAuthMethodId::EMAIL_OTP,
|
|
38
38
|
Appwrite::Enums::ProjectAuthMethodId::ANONYMOUS,
|
|
39
39
|
Appwrite::Enums::ProjectAuthMethodId::INVITES,
|
|
40
40
|
Appwrite::Enums::ProjectAuthMethodId::JWT,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class UsageBillingPlan
|
|
6
|
+
attr_reader :bandwidth
|
|
7
|
+
attr_reader :executions
|
|
8
|
+
attr_reader :member
|
|
9
|
+
attr_reader :realtime
|
|
10
|
+
attr_reader :realtime_messages
|
|
11
|
+
attr_reader :realtime_bandwidth
|
|
12
|
+
attr_reader :storage
|
|
13
|
+
attr_reader :users
|
|
14
|
+
attr_reader :gb_hours
|
|
15
|
+
attr_reader :image_transformations
|
|
16
|
+
attr_reader :credits
|
|
17
|
+
|
|
18
|
+
def initialize(
|
|
19
|
+
bandwidth:,
|
|
20
|
+
executions:,
|
|
21
|
+
member:,
|
|
22
|
+
realtime:,
|
|
23
|
+
realtime_messages:,
|
|
24
|
+
realtime_bandwidth:,
|
|
25
|
+
storage:,
|
|
26
|
+
users:,
|
|
27
|
+
gb_hours:,
|
|
28
|
+
image_transformations:,
|
|
29
|
+
credits:
|
|
30
|
+
)
|
|
31
|
+
@bandwidth = bandwidth
|
|
32
|
+
@executions = executions
|
|
33
|
+
@member = member
|
|
34
|
+
@realtime = realtime
|
|
35
|
+
@realtime_messages = realtime_messages
|
|
36
|
+
@realtime_bandwidth = realtime_bandwidth
|
|
37
|
+
@storage = storage
|
|
38
|
+
@users = users
|
|
39
|
+
@gb_hours = gb_hours
|
|
40
|
+
@image_transformations = image_transformations
|
|
41
|
+
@credits = credits
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.from(map:)
|
|
45
|
+
UsageBillingPlan.new(
|
|
46
|
+
bandwidth: AdditionalResource.from(map: map["bandwidth"]),
|
|
47
|
+
executions: AdditionalResource.from(map: map["executions"]),
|
|
48
|
+
member: AdditionalResource.from(map: map["member"]),
|
|
49
|
+
realtime: AdditionalResource.from(map: map["realtime"]),
|
|
50
|
+
realtime_messages: AdditionalResource.from(map: map["realtimeMessages"]),
|
|
51
|
+
realtime_bandwidth: AdditionalResource.from(map: map["realtimeBandwidth"]),
|
|
52
|
+
storage: AdditionalResource.from(map: map["storage"]),
|
|
53
|
+
users: AdditionalResource.from(map: map["users"]),
|
|
54
|
+
gb_hours: AdditionalResource.from(map: map["GBHours"]),
|
|
55
|
+
image_transformations: AdditionalResource.from(map: map["imageTransformations"]),
|
|
56
|
+
credits: AdditionalResource.from(map: map["credits"])
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def to_map
|
|
61
|
+
{
|
|
62
|
+
"bandwidth": @bandwidth.to_map,
|
|
63
|
+
"executions": @executions.to_map,
|
|
64
|
+
"member": @member.to_map,
|
|
65
|
+
"realtime": @realtime.to_map,
|
|
66
|
+
"realtimeMessages": @realtime_messages.to_map,
|
|
67
|
+
"realtimeBandwidth": @realtime_bandwidth.to_map,
|
|
68
|
+
"storage": @storage.to_map,
|
|
69
|
+
"users": @users.to_map,
|
|
70
|
+
"GBHours": @gb_hours.to_map,
|
|
71
|
+
"imageTransformations": @image_transformations.to_map,
|
|
72
|
+
"credits": @credits.to_map
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
data/lib/appwrite/models/user.rb
CHANGED
|
@@ -17,6 +17,11 @@ module Appwrite
|
|
|
17
17
|
attr_reader :email
|
|
18
18
|
attr_reader :phone
|
|
19
19
|
attr_reader :email_verification
|
|
20
|
+
attr_reader :email_canonical
|
|
21
|
+
attr_reader :email_is_free
|
|
22
|
+
attr_reader :email_is_disposable
|
|
23
|
+
attr_reader :email_is_corporate
|
|
24
|
+
attr_reader :email_is_canonical
|
|
20
25
|
attr_reader :phone_verification
|
|
21
26
|
attr_reader :mfa
|
|
22
27
|
attr_reader :prefs
|
|
@@ -40,6 +45,11 @@ module Appwrite
|
|
|
40
45
|
email:,
|
|
41
46
|
phone:,
|
|
42
47
|
email_verification:,
|
|
48
|
+
email_canonical: ,
|
|
49
|
+
email_is_free: ,
|
|
50
|
+
email_is_disposable: ,
|
|
51
|
+
email_is_corporate: ,
|
|
52
|
+
email_is_canonical: ,
|
|
43
53
|
phone_verification:,
|
|
44
54
|
mfa:,
|
|
45
55
|
prefs:,
|
|
@@ -62,6 +72,11 @@ module Appwrite
|
|
|
62
72
|
@email = email
|
|
63
73
|
@phone = phone
|
|
64
74
|
@email_verification = email_verification
|
|
75
|
+
@email_canonical = email_canonical
|
|
76
|
+
@email_is_free = email_is_free
|
|
77
|
+
@email_is_disposable = email_is_disposable
|
|
78
|
+
@email_is_corporate = email_is_corporate
|
|
79
|
+
@email_is_canonical = email_is_canonical
|
|
65
80
|
@phone_verification = phone_verification
|
|
66
81
|
@mfa = mfa
|
|
67
82
|
@prefs = prefs
|
|
@@ -87,6 +102,11 @@ module Appwrite
|
|
|
87
102
|
email: map["email"],
|
|
88
103
|
phone: map["phone"],
|
|
89
104
|
email_verification: map["emailVerification"],
|
|
105
|
+
email_canonical: map["emailCanonical"],
|
|
106
|
+
email_is_free: map["emailIsFree"],
|
|
107
|
+
email_is_disposable: map["emailIsDisposable"],
|
|
108
|
+
email_is_corporate: map["emailIsCorporate"],
|
|
109
|
+
email_is_canonical: map["emailIsCanonical"],
|
|
90
110
|
phone_verification: map["phoneVerification"],
|
|
91
111
|
mfa: map["mfa"],
|
|
92
112
|
prefs: Preferences.from(map: map["prefs"]),
|
|
@@ -113,6 +133,11 @@ module Appwrite
|
|
|
113
133
|
"email": @email,
|
|
114
134
|
"phone": @phone,
|
|
115
135
|
"emailVerification": @email_verification,
|
|
136
|
+
"emailCanonical": @email_canonical,
|
|
137
|
+
"emailIsFree": @email_is_free,
|
|
138
|
+
"emailIsDisposable": @email_is_disposable,
|
|
139
|
+
"emailIsCorporate": @email_is_corporate,
|
|
140
|
+
"emailIsCanonical": @email_is_canonical,
|
|
116
141
|
"phoneVerification": @phone_verification,
|
|
117
142
|
"mfa": @mfa,
|
|
118
143
|
"prefs": @prefs.to_map,
|
data/lib/appwrite/query.rb
CHANGED
|
@@ -232,6 +232,18 @@ module Appwrite
|
|
|
232
232
|
return Query.new("distanceLessThan", attribute, [[values, distance, meters]]).to_s
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
+
def vector_dot(attribute, vector)
|
|
236
|
+
return Query.new("vectorDot", attribute, [vector]).to_s
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
def vector_cosine(attribute, vector)
|
|
240
|
+
return Query.new("vectorCosine", attribute, [vector]).to_s
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
def vector_euclidean(attribute, vector)
|
|
244
|
+
return Query.new("vectorEuclidean", attribute, [vector]).to_s
|
|
245
|
+
end
|
|
246
|
+
|
|
235
247
|
def intersects(attribute, values)
|
|
236
248
|
return Query.new("intersects", attribute, [values]).to_s
|
|
237
249
|
end
|
|
@@ -265,4 +277,4 @@ module Appwrite
|
|
|
265
277
|
end
|
|
266
278
|
end
|
|
267
279
|
end
|
|
268
|
-
end
|
|
280
|
+
end
|