appwrite 8.0.0 → 9.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/models/attribute_boolean.rb +5 -0
- data/lib/appwrite/models/attribute_datetime.rb +5 -0
- data/lib/appwrite/models/attribute_email.rb +5 -0
- data/lib/appwrite/models/attribute_enum.rb +5 -0
- data/lib/appwrite/models/attribute_float.rb +5 -0
- data/lib/appwrite/models/attribute_integer.rb +5 -0
- data/lib/appwrite/models/attribute_ip.rb +5 -0
- data/lib/appwrite/models/attribute_relationship.rb +5 -0
- data/lib/appwrite/models/attribute_string.rb +5 -0
- data/lib/appwrite/models/attribute_url.rb +5 -0
- data/lib/appwrite/models/database.rb +8 -3
- data/lib/appwrite/models/deployment.rb +63 -13
- data/lib/appwrite/models/execution.rb +40 -20
- data/lib/appwrite/models/function.rb +53 -13
- data/lib/appwrite/models/headers.rb +32 -0
- data/lib/appwrite/models/health_status.rb +5 -0
- data/lib/appwrite/models/identity.rb +72 -0
- data/lib/appwrite/models/identity_list.rb +32 -0
- data/lib/appwrite/models/index.rb +5 -0
- data/lib/appwrite/models/locale_code.rb +32 -0
- data/lib/appwrite/models/locale_code_list.rb +32 -0
- data/lib/appwrite/models/user.rb +13 -3
- data/lib/appwrite/models/variable.rb +10 -5
- data/lib/appwrite/services/account.rb +105 -50
- data/lib/appwrite/services/avatars.rb +14 -14
- data/lib/appwrite/services/databases.rb +106 -94
- data/lib/appwrite/services/functions.rb +149 -63
- data/lib/appwrite/services/graphql.rb +4 -4
- data/lib/appwrite/services/health.rb +71 -22
- data/lib/appwrite/services/locale.rb +39 -14
- data/lib/appwrite/services/storage.rb +33 -31
- data/lib/appwrite/services/teams.rb +28 -27
- data/lib/appwrite/services/users.rb +148 -50
- data/lib/appwrite.rb +5 -0
- metadata +7 -2
@@ -15,7 +15,7 @@ module Appwrite
|
|
15
15
|
#
|
16
16
|
# @return [TeamList]
|
17
17
|
def list(queries: nil, search: nil)
|
18
|
-
|
18
|
+
api_path = '/teams'
|
19
19
|
|
20
20
|
params = {
|
21
21
|
queries: queries,
|
@@ -28,7 +28,7 @@ module Appwrite
|
|
28
28
|
|
29
29
|
@client.call(
|
30
30
|
method: 'GET',
|
31
|
-
path:
|
31
|
+
path: api_path,
|
32
32
|
headers: headers,
|
33
33
|
params: params,
|
34
34
|
response_type: Models::TeamList
|
@@ -46,7 +46,7 @@ module Appwrite
|
|
46
46
|
#
|
47
47
|
# @return [Team]
|
48
48
|
def create(team_id:, name:, roles: nil)
|
49
|
-
|
49
|
+
api_path = '/teams'
|
50
50
|
|
51
51
|
if team_id.nil?
|
52
52
|
raise Appwrite::Exception.new('Missing required parameter: "teamId"')
|
@@ -68,7 +68,7 @@ module Appwrite
|
|
68
68
|
|
69
69
|
@client.call(
|
70
70
|
method: 'POST',
|
71
|
-
path:
|
71
|
+
path: api_path,
|
72
72
|
headers: headers,
|
73
73
|
params: params,
|
74
74
|
response_type: Models::Team
|
@@ -82,7 +82,7 @@ module Appwrite
|
|
82
82
|
#
|
83
83
|
# @return [Team]
|
84
84
|
def get(team_id:)
|
85
|
-
|
85
|
+
api_path = '/teams/{teamId}'
|
86
86
|
.gsub('{teamId}', team_id)
|
87
87
|
|
88
88
|
if team_id.nil?
|
@@ -98,7 +98,7 @@ module Appwrite
|
|
98
98
|
|
99
99
|
@client.call(
|
100
100
|
method: 'GET',
|
101
|
-
path:
|
101
|
+
path: api_path,
|
102
102
|
headers: headers,
|
103
103
|
params: params,
|
104
104
|
response_type: Models::Team
|
@@ -113,7 +113,7 @@ module Appwrite
|
|
113
113
|
#
|
114
114
|
# @return [Team]
|
115
115
|
def update_name(team_id:, name:)
|
116
|
-
|
116
|
+
api_path = '/teams/{teamId}'
|
117
117
|
.gsub('{teamId}', team_id)
|
118
118
|
|
119
119
|
if team_id.nil?
|
@@ -134,7 +134,7 @@ module Appwrite
|
|
134
134
|
|
135
135
|
@client.call(
|
136
136
|
method: 'PUT',
|
137
|
-
path:
|
137
|
+
path: api_path,
|
138
138
|
headers: headers,
|
139
139
|
params: params,
|
140
140
|
response_type: Models::Team
|
@@ -149,7 +149,7 @@ module Appwrite
|
|
149
149
|
#
|
150
150
|
# @return []
|
151
151
|
def delete(team_id:)
|
152
|
-
|
152
|
+
api_path = '/teams/{teamId}'
|
153
153
|
.gsub('{teamId}', team_id)
|
154
154
|
|
155
155
|
if team_id.nil?
|
@@ -165,7 +165,7 @@ module Appwrite
|
|
165
165
|
|
166
166
|
@client.call(
|
167
167
|
method: 'DELETE',
|
168
|
-
path:
|
168
|
+
path: api_path,
|
169
169
|
headers: headers,
|
170
170
|
params: params,
|
171
171
|
)
|
@@ -181,7 +181,7 @@ module Appwrite
|
|
181
181
|
#
|
182
182
|
# @return [MembershipList]
|
183
183
|
def list_memberships(team_id:, queries: nil, search: nil)
|
184
|
-
|
184
|
+
api_path = '/teams/{teamId}/memberships'
|
185
185
|
.gsub('{teamId}', team_id)
|
186
186
|
|
187
187
|
if team_id.nil?
|
@@ -199,7 +199,7 @@ module Appwrite
|
|
199
199
|
|
200
200
|
@client.call(
|
201
201
|
method: 'GET',
|
202
|
-
path:
|
202
|
+
path: api_path,
|
203
203
|
headers: headers,
|
204
204
|
params: params,
|
205
205
|
response_type: Models::MembershipList
|
@@ -239,7 +239,7 @@ module Appwrite
|
|
239
239
|
#
|
240
240
|
# @return [Membership]
|
241
241
|
def create_membership(team_id:, roles:, url:, email: nil, user_id: nil, phone: nil, name: nil)
|
242
|
-
|
242
|
+
api_path = '/teams/{teamId}/memberships'
|
243
243
|
.gsub('{teamId}', team_id)
|
244
244
|
|
245
245
|
if team_id.nil?
|
@@ -269,7 +269,7 @@ module Appwrite
|
|
269
269
|
|
270
270
|
@client.call(
|
271
271
|
method: 'POST',
|
272
|
-
path:
|
272
|
+
path: api_path,
|
273
273
|
headers: headers,
|
274
274
|
params: params,
|
275
275
|
response_type: Models::Membership
|
@@ -285,7 +285,7 @@ module Appwrite
|
|
285
285
|
#
|
286
286
|
# @return [Membership]
|
287
287
|
def get_membership(team_id:, membership_id:)
|
288
|
-
|
288
|
+
api_path = '/teams/{teamId}/memberships/{membershipId}'
|
289
289
|
.gsub('{teamId}', team_id)
|
290
290
|
.gsub('{membershipId}', membership_id)
|
291
291
|
|
@@ -306,7 +306,7 @@ module Appwrite
|
|
306
306
|
|
307
307
|
@client.call(
|
308
308
|
method: 'GET',
|
309
|
-
path:
|
309
|
+
path: api_path,
|
310
310
|
headers: headers,
|
311
311
|
params: params,
|
312
312
|
response_type: Models::Membership
|
@@ -317,14 +317,15 @@ module Appwrite
|
|
317
317
|
# Modify the roles of a team member. Only team members with the owner role
|
318
318
|
# have access to this endpoint. Learn more about [roles and
|
319
319
|
# permissions](/docs/permissions).
|
320
|
+
#
|
320
321
|
#
|
321
322
|
# @param [String] team_id Team ID.
|
322
323
|
# @param [String] membership_id Membership ID.
|
323
324
|
# @param [Array] roles An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
|
324
325
|
#
|
325
326
|
# @return [Membership]
|
326
|
-
def
|
327
|
-
|
327
|
+
def update_membership(team_id:, membership_id:, roles:)
|
328
|
+
api_path = '/teams/{teamId}/memberships/{membershipId}'
|
328
329
|
.gsub('{teamId}', team_id)
|
329
330
|
.gsub('{membershipId}', membership_id)
|
330
331
|
|
@@ -350,7 +351,7 @@ module Appwrite
|
|
350
351
|
|
351
352
|
@client.call(
|
352
353
|
method: 'PATCH',
|
353
|
-
path:
|
354
|
+
path: api_path,
|
354
355
|
headers: headers,
|
355
356
|
params: params,
|
356
357
|
response_type: Models::Membership
|
@@ -367,7 +368,7 @@ module Appwrite
|
|
367
368
|
#
|
368
369
|
# @return []
|
369
370
|
def delete_membership(team_id:, membership_id:)
|
370
|
-
|
371
|
+
api_path = '/teams/{teamId}/memberships/{membershipId}'
|
371
372
|
.gsub('{teamId}', team_id)
|
372
373
|
.gsub('{membershipId}', membership_id)
|
373
374
|
|
@@ -388,7 +389,7 @@ module Appwrite
|
|
388
389
|
|
389
390
|
@client.call(
|
390
391
|
method: 'DELETE',
|
391
|
-
path:
|
392
|
+
path: api_path,
|
392
393
|
headers: headers,
|
393
394
|
params: params,
|
394
395
|
)
|
@@ -410,7 +411,7 @@ module Appwrite
|
|
410
411
|
#
|
411
412
|
# @return [Membership]
|
412
413
|
def update_membership_status(team_id:, membership_id:, user_id:, secret:)
|
413
|
-
|
414
|
+
api_path = '/teams/{teamId}/memberships/{membershipId}/status'
|
414
415
|
.gsub('{teamId}', team_id)
|
415
416
|
.gsub('{membershipId}', membership_id)
|
416
417
|
|
@@ -441,7 +442,7 @@ module Appwrite
|
|
441
442
|
|
442
443
|
@client.call(
|
443
444
|
method: 'PATCH',
|
444
|
-
path:
|
445
|
+
path: api_path,
|
445
446
|
headers: headers,
|
446
447
|
params: params,
|
447
448
|
response_type: Models::Membership
|
@@ -457,7 +458,7 @@ module Appwrite
|
|
457
458
|
#
|
458
459
|
# @return [Preferences]
|
459
460
|
def get_prefs(team_id:)
|
460
|
-
|
461
|
+
api_path = '/teams/{teamId}/prefs'
|
461
462
|
.gsub('{teamId}', team_id)
|
462
463
|
|
463
464
|
if team_id.nil?
|
@@ -473,7 +474,7 @@ module Appwrite
|
|
473
474
|
|
474
475
|
@client.call(
|
475
476
|
method: 'GET',
|
476
|
-
path:
|
477
|
+
path: api_path,
|
477
478
|
headers: headers,
|
478
479
|
params: params,
|
479
480
|
response_type: Models::Preferences
|
@@ -490,7 +491,7 @@ module Appwrite
|
|
490
491
|
#
|
491
492
|
# @return [Preferences]
|
492
493
|
def update_prefs(team_id:, prefs:)
|
493
|
-
|
494
|
+
api_path = '/teams/{teamId}/prefs'
|
494
495
|
.gsub('{teamId}', team_id)
|
495
496
|
|
496
497
|
if team_id.nil?
|
@@ -511,7 +512,7 @@ module Appwrite
|
|
511
512
|
|
512
513
|
@client.call(
|
513
514
|
method: 'PUT',
|
514
|
-
path:
|
515
|
+
path: api_path,
|
515
516
|
headers: headers,
|
516
517
|
params: params,
|
517
518
|
response_type: Models::Preferences
|