appwrite 23.1.0 → 24.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.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +2 -2
- data/lib/appwrite/enums/o_auth2_google_prompt.rb +9 -0
- data/lib/appwrite/enums/o_auth_provider.rb +0 -2
- data/lib/appwrite/enums/{auth_method.rb → project_auth_method_id.rb} +1 -1
- data/lib/appwrite/enums/{email_template_type.rb → project_email_template_id.rb} +1 -1
- data/lib/appwrite/enums/{email_template_locale.rb → project_email_template_locale.rb} +1 -1
- data/lib/appwrite/enums/project_key_scopes.rb +100 -0
- data/lib/appwrite/enums/project_o_auth2_google_prompt.rb +9 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +51 -0
- data/lib/appwrite/enums/{project_policy.rb → project_policy_id.rb} +1 -1
- data/lib/appwrite/enums/{protocol_id.rb → project_protocol_id.rb} +1 -1
- data/lib/appwrite/enums/{service_id.rb → project_service_id.rb} +2 -1
- data/lib/appwrite/enums/{secure.rb → project_smtp_secure.rb} +1 -1
- data/lib/appwrite/enums/scopes.rb +7 -0
- data/lib/appwrite/models/database.rb +2 -2
- data/lib/appwrite/models/insight.rb +107 -0
- data/lib/appwrite/models/insight_cta.rb +42 -0
- data/lib/appwrite/models/insight_list.rb +32 -0
- data/lib/appwrite/models/o_auth2_google.rb +8 -3
- data/lib/appwrite/models/presence.rb +71 -0
- data/lib/appwrite/models/presence_list.rb +36 -0
- data/lib/appwrite/models/project.rb +15 -285
- data/lib/appwrite/models/project_auth_method.rb +53 -0
- data/lib/appwrite/models/project_protocol.rb +49 -0
- data/lib/appwrite/models/project_service.rb +64 -0
- data/lib/appwrite/models/report.rb +82 -0
- data/lib/appwrite/models/report_list.rb +32 -0
- data/lib/appwrite/models/usage_event.rb +72 -0
- data/lib/appwrite/models/usage_event_list.rb +32 -0
- data/lib/appwrite/models/usage_gauge.rb +37 -0
- data/lib/appwrite/models/usage_gauge_list.rb +32 -0
- data/lib/appwrite/services/advisor.rb +173 -0
- data/lib/appwrite/services/presences.rb +199 -0
- data/lib/appwrite/services/project.rb +170 -52
- data/lib/appwrite/services/usage.rb +86 -0
- data/lib/appwrite.rb +28 -8
- metadata +30 -10
- data/lib/appwrite/models/auth_provider.rb +0 -47
|
@@ -7,37 +7,7 @@ module Appwrite
|
|
|
7
7
|
attr_reader :created_at
|
|
8
8
|
attr_reader :updated_at
|
|
9
9
|
attr_reader :name
|
|
10
|
-
attr_reader :description
|
|
11
10
|
attr_reader :team_id
|
|
12
|
-
attr_reader :logo
|
|
13
|
-
attr_reader :url
|
|
14
|
-
attr_reader :legal_name
|
|
15
|
-
attr_reader :legal_country
|
|
16
|
-
attr_reader :legal_state
|
|
17
|
-
attr_reader :legal_city
|
|
18
|
-
attr_reader :legal_address
|
|
19
|
-
attr_reader :legal_tax_id
|
|
20
|
-
attr_reader :auth_duration
|
|
21
|
-
attr_reader :auth_limit
|
|
22
|
-
attr_reader :auth_sessions_limit
|
|
23
|
-
attr_reader :auth_password_history
|
|
24
|
-
attr_reader :auth_password_dictionary
|
|
25
|
-
attr_reader :auth_personal_data_check
|
|
26
|
-
attr_reader :auth_disposable_emails
|
|
27
|
-
attr_reader :auth_canonical_emails
|
|
28
|
-
attr_reader :auth_free_emails
|
|
29
|
-
attr_reader :auth_mock_numbers
|
|
30
|
-
attr_reader :auth_session_alerts
|
|
31
|
-
attr_reader :auth_memberships_user_name
|
|
32
|
-
attr_reader :auth_memberships_user_email
|
|
33
|
-
attr_reader :auth_memberships_mfa
|
|
34
|
-
attr_reader :auth_memberships_user_id
|
|
35
|
-
attr_reader :auth_memberships_user_phone
|
|
36
|
-
attr_reader :auth_invalidate_sessions
|
|
37
|
-
attr_reader :o_auth_providers
|
|
38
|
-
attr_reader :platforms
|
|
39
|
-
attr_reader :webhooks
|
|
40
|
-
attr_reader :keys
|
|
41
11
|
attr_reader :dev_keys
|
|
42
12
|
attr_reader :smtp_enabled
|
|
43
13
|
attr_reader :smtp_sender_name
|
|
@@ -53,33 +23,9 @@ module Appwrite
|
|
|
53
23
|
attr_reader :pinged_at
|
|
54
24
|
attr_reader :labels
|
|
55
25
|
attr_reader :status
|
|
56
|
-
attr_reader :
|
|
57
|
-
attr_reader :
|
|
58
|
-
attr_reader :
|
|
59
|
-
attr_reader :auth_anonymous
|
|
60
|
-
attr_reader :auth_invites
|
|
61
|
-
attr_reader :auth_jwt
|
|
62
|
-
attr_reader :auth_phone
|
|
63
|
-
attr_reader :service_status_for_account
|
|
64
|
-
attr_reader :service_status_for_avatars
|
|
65
|
-
attr_reader :service_status_for_databases
|
|
66
|
-
attr_reader :service_status_for_tablesdb
|
|
67
|
-
attr_reader :service_status_for_locale
|
|
68
|
-
attr_reader :service_status_for_health
|
|
69
|
-
attr_reader :service_status_for_project
|
|
70
|
-
attr_reader :service_status_for_storage
|
|
71
|
-
attr_reader :service_status_for_teams
|
|
72
|
-
attr_reader :service_status_for_users
|
|
73
|
-
attr_reader :service_status_for_vcs
|
|
74
|
-
attr_reader :service_status_for_sites
|
|
75
|
-
attr_reader :service_status_for_functions
|
|
76
|
-
attr_reader :service_status_for_proxy
|
|
77
|
-
attr_reader :service_status_for_graphql
|
|
78
|
-
attr_reader :service_status_for_migrations
|
|
79
|
-
attr_reader :service_status_for_messaging
|
|
80
|
-
attr_reader :protocol_status_for_rest
|
|
81
|
-
attr_reader :protocol_status_for_graphql
|
|
82
|
-
attr_reader :protocol_status_for_websocket
|
|
26
|
+
attr_reader :auth_methods
|
|
27
|
+
attr_reader :services
|
|
28
|
+
attr_reader :protocols
|
|
83
29
|
attr_reader :region
|
|
84
30
|
attr_reader :billing_limits
|
|
85
31
|
attr_reader :blocks
|
|
@@ -90,37 +36,7 @@ module Appwrite
|
|
|
90
36
|
created_at:,
|
|
91
37
|
updated_at:,
|
|
92
38
|
name:,
|
|
93
|
-
description:,
|
|
94
39
|
team_id:,
|
|
95
|
-
logo:,
|
|
96
|
-
url:,
|
|
97
|
-
legal_name:,
|
|
98
|
-
legal_country:,
|
|
99
|
-
legal_state:,
|
|
100
|
-
legal_city:,
|
|
101
|
-
legal_address:,
|
|
102
|
-
legal_tax_id:,
|
|
103
|
-
auth_duration:,
|
|
104
|
-
auth_limit:,
|
|
105
|
-
auth_sessions_limit:,
|
|
106
|
-
auth_password_history:,
|
|
107
|
-
auth_password_dictionary:,
|
|
108
|
-
auth_personal_data_check:,
|
|
109
|
-
auth_disposable_emails:,
|
|
110
|
-
auth_canonical_emails:,
|
|
111
|
-
auth_free_emails:,
|
|
112
|
-
auth_mock_numbers:,
|
|
113
|
-
auth_session_alerts:,
|
|
114
|
-
auth_memberships_user_name:,
|
|
115
|
-
auth_memberships_user_email:,
|
|
116
|
-
auth_memberships_mfa:,
|
|
117
|
-
auth_memberships_user_id:,
|
|
118
|
-
auth_memberships_user_phone:,
|
|
119
|
-
auth_invalidate_sessions:,
|
|
120
|
-
o_auth_providers:,
|
|
121
|
-
platforms:,
|
|
122
|
-
webhooks:,
|
|
123
|
-
keys:,
|
|
124
40
|
dev_keys:,
|
|
125
41
|
smtp_enabled:,
|
|
126
42
|
smtp_sender_name:,
|
|
@@ -136,33 +52,9 @@ module Appwrite
|
|
|
136
52
|
pinged_at:,
|
|
137
53
|
labels:,
|
|
138
54
|
status:,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
auth_anonymous:,
|
|
143
|
-
auth_invites:,
|
|
144
|
-
auth_jwt:,
|
|
145
|
-
auth_phone:,
|
|
146
|
-
service_status_for_account:,
|
|
147
|
-
service_status_for_avatars:,
|
|
148
|
-
service_status_for_databases:,
|
|
149
|
-
service_status_for_tablesdb:,
|
|
150
|
-
service_status_for_locale:,
|
|
151
|
-
service_status_for_health:,
|
|
152
|
-
service_status_for_project:,
|
|
153
|
-
service_status_for_storage:,
|
|
154
|
-
service_status_for_teams:,
|
|
155
|
-
service_status_for_users:,
|
|
156
|
-
service_status_for_vcs:,
|
|
157
|
-
service_status_for_sites:,
|
|
158
|
-
service_status_for_functions:,
|
|
159
|
-
service_status_for_proxy:,
|
|
160
|
-
service_status_for_graphql:,
|
|
161
|
-
service_status_for_migrations:,
|
|
162
|
-
service_status_for_messaging:,
|
|
163
|
-
protocol_status_for_rest:,
|
|
164
|
-
protocol_status_for_graphql:,
|
|
165
|
-
protocol_status_for_websocket:,
|
|
55
|
+
auth_methods:,
|
|
56
|
+
services:,
|
|
57
|
+
protocols:,
|
|
166
58
|
region:,
|
|
167
59
|
billing_limits:,
|
|
168
60
|
blocks:,
|
|
@@ -172,37 +64,7 @@ module Appwrite
|
|
|
172
64
|
@created_at = created_at
|
|
173
65
|
@updated_at = updated_at
|
|
174
66
|
@name = name
|
|
175
|
-
@description = description
|
|
176
67
|
@team_id = team_id
|
|
177
|
-
@logo = logo
|
|
178
|
-
@url = url
|
|
179
|
-
@legal_name = legal_name
|
|
180
|
-
@legal_country = legal_country
|
|
181
|
-
@legal_state = legal_state
|
|
182
|
-
@legal_city = legal_city
|
|
183
|
-
@legal_address = legal_address
|
|
184
|
-
@legal_tax_id = legal_tax_id
|
|
185
|
-
@auth_duration = auth_duration
|
|
186
|
-
@auth_limit = auth_limit
|
|
187
|
-
@auth_sessions_limit = auth_sessions_limit
|
|
188
|
-
@auth_password_history = auth_password_history
|
|
189
|
-
@auth_password_dictionary = auth_password_dictionary
|
|
190
|
-
@auth_personal_data_check = auth_personal_data_check
|
|
191
|
-
@auth_disposable_emails = auth_disposable_emails
|
|
192
|
-
@auth_canonical_emails = auth_canonical_emails
|
|
193
|
-
@auth_free_emails = auth_free_emails
|
|
194
|
-
@auth_mock_numbers = auth_mock_numbers
|
|
195
|
-
@auth_session_alerts = auth_session_alerts
|
|
196
|
-
@auth_memberships_user_name = auth_memberships_user_name
|
|
197
|
-
@auth_memberships_user_email = auth_memberships_user_email
|
|
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
|
|
201
|
-
@auth_invalidate_sessions = auth_invalidate_sessions
|
|
202
|
-
@o_auth_providers = o_auth_providers
|
|
203
|
-
@platforms = platforms
|
|
204
|
-
@webhooks = webhooks
|
|
205
|
-
@keys = keys
|
|
206
68
|
@dev_keys = dev_keys
|
|
207
69
|
@smtp_enabled = smtp_enabled
|
|
208
70
|
@smtp_sender_name = smtp_sender_name
|
|
@@ -218,33 +80,9 @@ module Appwrite
|
|
|
218
80
|
@pinged_at = pinged_at
|
|
219
81
|
@labels = labels
|
|
220
82
|
@status = status
|
|
221
|
-
@
|
|
222
|
-
@
|
|
223
|
-
@
|
|
224
|
-
@auth_anonymous = auth_anonymous
|
|
225
|
-
@auth_invites = auth_invites
|
|
226
|
-
@auth_jwt = auth_jwt
|
|
227
|
-
@auth_phone = auth_phone
|
|
228
|
-
@service_status_for_account = service_status_for_account
|
|
229
|
-
@service_status_for_avatars = service_status_for_avatars
|
|
230
|
-
@service_status_for_databases = service_status_for_databases
|
|
231
|
-
@service_status_for_tablesdb = service_status_for_tablesdb
|
|
232
|
-
@service_status_for_locale = service_status_for_locale
|
|
233
|
-
@service_status_for_health = service_status_for_health
|
|
234
|
-
@service_status_for_project = service_status_for_project
|
|
235
|
-
@service_status_for_storage = service_status_for_storage
|
|
236
|
-
@service_status_for_teams = service_status_for_teams
|
|
237
|
-
@service_status_for_users = service_status_for_users
|
|
238
|
-
@service_status_for_vcs = service_status_for_vcs
|
|
239
|
-
@service_status_for_sites = service_status_for_sites
|
|
240
|
-
@service_status_for_functions = service_status_for_functions
|
|
241
|
-
@service_status_for_proxy = service_status_for_proxy
|
|
242
|
-
@service_status_for_graphql = service_status_for_graphql
|
|
243
|
-
@service_status_for_migrations = service_status_for_migrations
|
|
244
|
-
@service_status_for_messaging = service_status_for_messaging
|
|
245
|
-
@protocol_status_for_rest = protocol_status_for_rest
|
|
246
|
-
@protocol_status_for_graphql = protocol_status_for_graphql
|
|
247
|
-
@protocol_status_for_websocket = protocol_status_for_websocket
|
|
83
|
+
@auth_methods = auth_methods
|
|
84
|
+
@services = services
|
|
85
|
+
@protocols = protocols
|
|
248
86
|
@region = region
|
|
249
87
|
@billing_limits = billing_limits
|
|
250
88
|
@blocks = blocks
|
|
@@ -257,37 +95,7 @@ module Appwrite
|
|
|
257
95
|
created_at: map["$createdAt"],
|
|
258
96
|
updated_at: map["$updatedAt"],
|
|
259
97
|
name: map["name"],
|
|
260
|
-
description: map["description"],
|
|
261
98
|
team_id: map["teamId"],
|
|
262
|
-
logo: map["logo"],
|
|
263
|
-
url: map["url"],
|
|
264
|
-
legal_name: map["legalName"],
|
|
265
|
-
legal_country: map["legalCountry"],
|
|
266
|
-
legal_state: map["legalState"],
|
|
267
|
-
legal_city: map["legalCity"],
|
|
268
|
-
legal_address: map["legalAddress"],
|
|
269
|
-
legal_tax_id: map["legalTaxId"],
|
|
270
|
-
auth_duration: map["authDuration"],
|
|
271
|
-
auth_limit: map["authLimit"],
|
|
272
|
-
auth_sessions_limit: map["authSessionsLimit"],
|
|
273
|
-
auth_password_history: map["authPasswordHistory"],
|
|
274
|
-
auth_password_dictionary: map["authPasswordDictionary"],
|
|
275
|
-
auth_personal_data_check: map["authPersonalDataCheck"],
|
|
276
|
-
auth_disposable_emails: map["authDisposableEmails"],
|
|
277
|
-
auth_canonical_emails: map["authCanonicalEmails"],
|
|
278
|
-
auth_free_emails: map["authFreeEmails"],
|
|
279
|
-
auth_mock_numbers: map["authMockNumbers"].map { |it| MockNumber.from(map: it) },
|
|
280
|
-
auth_session_alerts: map["authSessionAlerts"],
|
|
281
|
-
auth_memberships_user_name: map["authMembershipsUserName"],
|
|
282
|
-
auth_memberships_user_email: map["authMembershipsUserEmail"],
|
|
283
|
-
auth_memberships_mfa: map["authMembershipsMfa"],
|
|
284
|
-
auth_memberships_user_id: map["authMembershipsUserId"],
|
|
285
|
-
auth_memberships_user_phone: map["authMembershipsUserPhone"],
|
|
286
|
-
auth_invalidate_sessions: map["authInvalidateSessions"],
|
|
287
|
-
o_auth_providers: map["oAuthProviders"].map { |it| AuthProvider.from(map: it) },
|
|
288
|
-
platforms: map["platforms"],
|
|
289
|
-
webhooks: map["webhooks"].map { |it| Webhook.from(map: it) },
|
|
290
|
-
keys: map["keys"].map { |it| Key.from(map: it) },
|
|
291
99
|
dev_keys: map["devKeys"].map { |it| DevKey.from(map: it) },
|
|
292
100
|
smtp_enabled: map["smtpEnabled"],
|
|
293
101
|
smtp_sender_name: map["smtpSenderName"],
|
|
@@ -303,33 +111,9 @@ module Appwrite
|
|
|
303
111
|
pinged_at: map["pingedAt"],
|
|
304
112
|
labels: map["labels"],
|
|
305
113
|
status: map["status"],
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
auth_anonymous: map["authAnonymous"],
|
|
310
|
-
auth_invites: map["authInvites"],
|
|
311
|
-
auth_jwt: map["authJWT"],
|
|
312
|
-
auth_phone: map["authPhone"],
|
|
313
|
-
service_status_for_account: map["serviceStatusForAccount"],
|
|
314
|
-
service_status_for_avatars: map["serviceStatusForAvatars"],
|
|
315
|
-
service_status_for_databases: map["serviceStatusForDatabases"],
|
|
316
|
-
service_status_for_tablesdb: map["serviceStatusForTablesdb"],
|
|
317
|
-
service_status_for_locale: map["serviceStatusForLocale"],
|
|
318
|
-
service_status_for_health: map["serviceStatusForHealth"],
|
|
319
|
-
service_status_for_project: map["serviceStatusForProject"],
|
|
320
|
-
service_status_for_storage: map["serviceStatusForStorage"],
|
|
321
|
-
service_status_for_teams: map["serviceStatusForTeams"],
|
|
322
|
-
service_status_for_users: map["serviceStatusForUsers"],
|
|
323
|
-
service_status_for_vcs: map["serviceStatusForVcs"],
|
|
324
|
-
service_status_for_sites: map["serviceStatusForSites"],
|
|
325
|
-
service_status_for_functions: map["serviceStatusForFunctions"],
|
|
326
|
-
service_status_for_proxy: map["serviceStatusForProxy"],
|
|
327
|
-
service_status_for_graphql: map["serviceStatusForGraphql"],
|
|
328
|
-
service_status_for_migrations: map["serviceStatusForMigrations"],
|
|
329
|
-
service_status_for_messaging: map["serviceStatusForMessaging"],
|
|
330
|
-
protocol_status_for_rest: map["protocolStatusForRest"],
|
|
331
|
-
protocol_status_for_graphql: map["protocolStatusForGraphql"],
|
|
332
|
-
protocol_status_for_websocket: map["protocolStatusForWebsocket"],
|
|
114
|
+
auth_methods: map["authMethods"].map { |it| ProjectAuthMethod.from(map: it) },
|
|
115
|
+
services: map["services"].map { |it| ProjectService.from(map: it) },
|
|
116
|
+
protocols: map["protocols"].map { |it| ProjectProtocol.from(map: it) },
|
|
333
117
|
region: map["region"],
|
|
334
118
|
billing_limits: BillingLimits.from(map: map["billingLimits"]),
|
|
335
119
|
blocks: map["blocks"].map { |it| Block.from(map: it) },
|
|
@@ -343,37 +127,7 @@ module Appwrite
|
|
|
343
127
|
"$createdAt": @created_at,
|
|
344
128
|
"$updatedAt": @updated_at,
|
|
345
129
|
"name": @name,
|
|
346
|
-
"description": @description,
|
|
347
130
|
"teamId": @team_id,
|
|
348
|
-
"logo": @logo,
|
|
349
|
-
"url": @url,
|
|
350
|
-
"legalName": @legal_name,
|
|
351
|
-
"legalCountry": @legal_country,
|
|
352
|
-
"legalState": @legal_state,
|
|
353
|
-
"legalCity": @legal_city,
|
|
354
|
-
"legalAddress": @legal_address,
|
|
355
|
-
"legalTaxId": @legal_tax_id,
|
|
356
|
-
"authDuration": @auth_duration,
|
|
357
|
-
"authLimit": @auth_limit,
|
|
358
|
-
"authSessionsLimit": @auth_sessions_limit,
|
|
359
|
-
"authPasswordHistory": @auth_password_history,
|
|
360
|
-
"authPasswordDictionary": @auth_password_dictionary,
|
|
361
|
-
"authPersonalDataCheck": @auth_personal_data_check,
|
|
362
|
-
"authDisposableEmails": @auth_disposable_emails,
|
|
363
|
-
"authCanonicalEmails": @auth_canonical_emails,
|
|
364
|
-
"authFreeEmails": @auth_free_emails,
|
|
365
|
-
"authMockNumbers": @auth_mock_numbers.map { |it| it.to_map },
|
|
366
|
-
"authSessionAlerts": @auth_session_alerts,
|
|
367
|
-
"authMembershipsUserName": @auth_memberships_user_name,
|
|
368
|
-
"authMembershipsUserEmail": @auth_memberships_user_email,
|
|
369
|
-
"authMembershipsMfa": @auth_memberships_mfa,
|
|
370
|
-
"authMembershipsUserId": @auth_memberships_user_id,
|
|
371
|
-
"authMembershipsUserPhone": @auth_memberships_user_phone,
|
|
372
|
-
"authInvalidateSessions": @auth_invalidate_sessions,
|
|
373
|
-
"oAuthProviders": @o_auth_providers.map { |it| it.to_map },
|
|
374
|
-
"platforms": @platforms,
|
|
375
|
-
"webhooks": @webhooks.map { |it| it.to_map },
|
|
376
|
-
"keys": @keys.map { |it| it.to_map },
|
|
377
131
|
"devKeys": @dev_keys.map { |it| it.to_map },
|
|
378
132
|
"smtpEnabled": @smtp_enabled,
|
|
379
133
|
"smtpSenderName": @smtp_sender_name,
|
|
@@ -389,33 +143,9 @@ module Appwrite
|
|
|
389
143
|
"pingedAt": @pinged_at,
|
|
390
144
|
"labels": @labels,
|
|
391
145
|
"status": @status,
|
|
392
|
-
"
|
|
393
|
-
"
|
|
394
|
-
"
|
|
395
|
-
"authAnonymous": @auth_anonymous,
|
|
396
|
-
"authInvites": @auth_invites,
|
|
397
|
-
"authJWT": @auth_jwt,
|
|
398
|
-
"authPhone": @auth_phone,
|
|
399
|
-
"serviceStatusForAccount": @service_status_for_account,
|
|
400
|
-
"serviceStatusForAvatars": @service_status_for_avatars,
|
|
401
|
-
"serviceStatusForDatabases": @service_status_for_databases,
|
|
402
|
-
"serviceStatusForTablesdb": @service_status_for_tablesdb,
|
|
403
|
-
"serviceStatusForLocale": @service_status_for_locale,
|
|
404
|
-
"serviceStatusForHealth": @service_status_for_health,
|
|
405
|
-
"serviceStatusForProject": @service_status_for_project,
|
|
406
|
-
"serviceStatusForStorage": @service_status_for_storage,
|
|
407
|
-
"serviceStatusForTeams": @service_status_for_teams,
|
|
408
|
-
"serviceStatusForUsers": @service_status_for_users,
|
|
409
|
-
"serviceStatusForVcs": @service_status_for_vcs,
|
|
410
|
-
"serviceStatusForSites": @service_status_for_sites,
|
|
411
|
-
"serviceStatusForFunctions": @service_status_for_functions,
|
|
412
|
-
"serviceStatusForProxy": @service_status_for_proxy,
|
|
413
|
-
"serviceStatusForGraphql": @service_status_for_graphql,
|
|
414
|
-
"serviceStatusForMigrations": @service_status_for_migrations,
|
|
415
|
-
"serviceStatusForMessaging": @service_status_for_messaging,
|
|
416
|
-
"protocolStatusForRest": @protocol_status_for_rest,
|
|
417
|
-
"protocolStatusForGraphql": @protocol_status_for_graphql,
|
|
418
|
-
"protocolStatusForWebsocket": @protocol_status_for_websocket,
|
|
146
|
+
"authMethods": @auth_methods.map { |it| it.to_map },
|
|
147
|
+
"services": @services.map { |it| it.to_map },
|
|
148
|
+
"protocols": @protocols.map { |it| it.to_map },
|
|
419
149
|
"region": @region,
|
|
420
150
|
"billingLimits": @billing_limits.to_map,
|
|
421
151
|
"blocks": @blocks.map { |it| it.to_map },
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class ProjectAuthMethod
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
id:,
|
|
11
|
+
enabled:
|
|
12
|
+
)
|
|
13
|
+
@id = validate_id(id)
|
|
14
|
+
@enabled = enabled
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
ProjectAuthMethod.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
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def validate_id(id)
|
|
34
|
+
valid_id = [
|
|
35
|
+
Appwrite::Enums::ProjectAuthMethodId::EMAIL-PASSWORD,
|
|
36
|
+
Appwrite::Enums::ProjectAuthMethodId::MAGIC-URL,
|
|
37
|
+
Appwrite::Enums::ProjectAuthMethodId::EMAIL-OTP,
|
|
38
|
+
Appwrite::Enums::ProjectAuthMethodId::ANONYMOUS,
|
|
39
|
+
Appwrite::Enums::ProjectAuthMethodId::INVITES,
|
|
40
|
+
Appwrite::Enums::ProjectAuthMethodId::JWT,
|
|
41
|
+
Appwrite::Enums::ProjectAuthMethodId::PHONE,
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
unless valid_id.include?(id)
|
|
45
|
+
raise ArgumentError, "Invalid " + id + ". Must be one of: " + valid_id.join(', ')
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
id
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class ProjectProtocol
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
id:,
|
|
11
|
+
enabled:
|
|
12
|
+
)
|
|
13
|
+
@id = validate_id(id)
|
|
14
|
+
@enabled = enabled
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
ProjectProtocol.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
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def validate_id(id)
|
|
34
|
+
valid_id = [
|
|
35
|
+
Appwrite::Enums::ProjectProtocolId::REST,
|
|
36
|
+
Appwrite::Enums::ProjectProtocolId::GRAPHQL,
|
|
37
|
+
Appwrite::Enums::ProjectProtocolId::WEBSOCKET,
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
unless valid_id.include?(id)
|
|
41
|
+
raise ArgumentError, "Invalid " + id + ". Must be one of: " + valid_id.join(', ')
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
id
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class ProjectService
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
id:,
|
|
11
|
+
enabled:
|
|
12
|
+
)
|
|
13
|
+
@id = validate_id(id)
|
|
14
|
+
@enabled = enabled
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
ProjectService.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
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def validate_id(id)
|
|
34
|
+
valid_id = [
|
|
35
|
+
Appwrite::Enums::ProjectServiceId::ACCOUNT,
|
|
36
|
+
Appwrite::Enums::ProjectServiceId::AVATARS,
|
|
37
|
+
Appwrite::Enums::ProjectServiceId::DATABASES,
|
|
38
|
+
Appwrite::Enums::ProjectServiceId::TABLESDB,
|
|
39
|
+
Appwrite::Enums::ProjectServiceId::LOCALE,
|
|
40
|
+
Appwrite::Enums::ProjectServiceId::HEALTH,
|
|
41
|
+
Appwrite::Enums::ProjectServiceId::PROJECT,
|
|
42
|
+
Appwrite::Enums::ProjectServiceId::STORAGE,
|
|
43
|
+
Appwrite::Enums::ProjectServiceId::TEAMS,
|
|
44
|
+
Appwrite::Enums::ProjectServiceId::USERS,
|
|
45
|
+
Appwrite::Enums::ProjectServiceId::VCS,
|
|
46
|
+
Appwrite::Enums::ProjectServiceId::SITES,
|
|
47
|
+
Appwrite::Enums::ProjectServiceId::FUNCTIONS,
|
|
48
|
+
Appwrite::Enums::ProjectServiceId::PROXY,
|
|
49
|
+
Appwrite::Enums::ProjectServiceId::GRAPHQL,
|
|
50
|
+
Appwrite::Enums::ProjectServiceId::MIGRATIONS,
|
|
51
|
+
Appwrite::Enums::ProjectServiceId::MESSAGING,
|
|
52
|
+
Appwrite::Enums::ProjectServiceId::ADVISOR,
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
unless valid_id.include?(id)
|
|
56
|
+
raise ArgumentError, "Invalid " + id + ". Must be one of: " + valid_id.join(', ')
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
id
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class Report
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :updated_at
|
|
9
|
+
attr_reader :app_id
|
|
10
|
+
attr_reader :type
|
|
11
|
+
attr_reader :title
|
|
12
|
+
attr_reader :summary
|
|
13
|
+
attr_reader :target_type
|
|
14
|
+
attr_reader :target
|
|
15
|
+
attr_reader :categories
|
|
16
|
+
attr_reader :insights
|
|
17
|
+
attr_reader :analyzed_at
|
|
18
|
+
|
|
19
|
+
def initialize(
|
|
20
|
+
id:,
|
|
21
|
+
created_at:,
|
|
22
|
+
updated_at:,
|
|
23
|
+
app_id:,
|
|
24
|
+
type:,
|
|
25
|
+
title:,
|
|
26
|
+
summary:,
|
|
27
|
+
target_type:,
|
|
28
|
+
target:,
|
|
29
|
+
categories:,
|
|
30
|
+
insights:,
|
|
31
|
+
analyzed_at:
|
|
32
|
+
)
|
|
33
|
+
@id = id
|
|
34
|
+
@created_at = created_at
|
|
35
|
+
@updated_at = updated_at
|
|
36
|
+
@app_id = app_id
|
|
37
|
+
@type = type
|
|
38
|
+
@title = title
|
|
39
|
+
@summary = summary
|
|
40
|
+
@target_type = target_type
|
|
41
|
+
@target = target
|
|
42
|
+
@categories = categories
|
|
43
|
+
@insights = insights
|
|
44
|
+
@analyzed_at = analyzed_at
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.from(map:)
|
|
48
|
+
Report.new(
|
|
49
|
+
id: map["$id"],
|
|
50
|
+
created_at: map["$createdAt"],
|
|
51
|
+
updated_at: map["$updatedAt"],
|
|
52
|
+
app_id: map["appId"],
|
|
53
|
+
type: map["type"],
|
|
54
|
+
title: map["title"],
|
|
55
|
+
summary: map["summary"],
|
|
56
|
+
target_type: map["targetType"],
|
|
57
|
+
target: map["target"],
|
|
58
|
+
categories: map["categories"],
|
|
59
|
+
insights: map["insights"].map { |it| Insight.from(map: it) },
|
|
60
|
+
analyzed_at: map["analyzedAt"]
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def to_map
|
|
65
|
+
{
|
|
66
|
+
"$id": @id,
|
|
67
|
+
"$createdAt": @created_at,
|
|
68
|
+
"$updatedAt": @updated_at,
|
|
69
|
+
"appId": @app_id,
|
|
70
|
+
"type": @type,
|
|
71
|
+
"title": @title,
|
|
72
|
+
"summary": @summary,
|
|
73
|
+
"targetType": @target_type,
|
|
74
|
+
"target": @target,
|
|
75
|
+
"categories": @categories,
|
|
76
|
+
"insights": @insights.map { |it| it.to_map },
|
|
77
|
+
"analyzedAt": @analyzed_at
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class ReportList
|
|
6
|
+
attr_reader :total
|
|
7
|
+
attr_reader :reports
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
total:,
|
|
11
|
+
reports:
|
|
12
|
+
)
|
|
13
|
+
@total = total
|
|
14
|
+
@reports = reports
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
ReportList.new(
|
|
19
|
+
total: map["total"],
|
|
20
|
+
reports: map["reports"].map { |it| Report.from(map: it) }
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def to_map
|
|
25
|
+
{
|
|
26
|
+
"total": @total,
|
|
27
|
+
"reports": @reports.map { |it| it.to_map }
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|