appwrite 7.1.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/algo_argon2.rb +5 -0
- data/lib/appwrite/models/algo_bcrypt.rb +5 -0
- data/lib/appwrite/models/algo_md5.rb +5 -0
- data/lib/appwrite/models/algo_phpass.rb +5 -0
- data/lib/appwrite/models/algo_scrypt.rb +5 -0
- data/lib/appwrite/models/algo_scrypt_modified.rb +5 -0
- data/lib/appwrite/models/algo_sha.rb +5 -0
- 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 +82 -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 +65 -10
- 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/team.rb +8 -3
- data/lib/appwrite/models/user.rb +16 -6
- data/lib/appwrite/models/variable.rb +10 -5
- data/lib/appwrite/query.rb +41 -17
- data/lib/appwrite/services/account.rb +120 -65
- data/lib/appwrite/services/avatars.rb +14 -14
- data/lib/appwrite/services/databases.rb +834 -188
- data/lib/appwrite/services/functions.rb +150 -74
- data/lib/appwrite/services/graphql.rb +71 -0
- data/lib/appwrite/services/health.rb +71 -22
- data/lib/appwrite/services/locale.rb +39 -14
- data/lib/appwrite/services/storage.rb +43 -42
- data/lib/appwrite/services/teams.rb +123 -50
- data/lib/appwrite/services/users.rb +158 -60
- data/lib/appwrite.rb +7 -1
- metadata +10 -4
- data/lib/appwrite/models/account.rb +0 -82
@@ -10,12 +10,12 @@ module Appwrite
|
|
10
10
|
# Get a list of all the project's users. You can use the query params to
|
11
11
|
# filter your results.
|
12
12
|
#
|
13
|
-
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/
|
13
|
+
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification
|
14
14
|
# @param [String] search Search term to filter your list results. Max length: 256 chars.
|
15
15
|
#
|
16
16
|
# @return [UserList]
|
17
17
|
def list(queries: nil, search: nil)
|
18
|
-
|
18
|
+
api_path = '/users'
|
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::UserList
|
@@ -38,7 +38,7 @@ module Appwrite
|
|
38
38
|
|
39
39
|
# Create a new user.
|
40
40
|
#
|
41
|
-
# @param [String] user_id User ID. Choose
|
41
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
42
42
|
# @param [String] email User email.
|
43
43
|
# @param [String] phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
44
44
|
# @param [String] password Plain text user password. Must be at least 8 chars.
|
@@ -46,7 +46,7 @@ module Appwrite
|
|
46
46
|
#
|
47
47
|
# @return [User]
|
48
48
|
def create(user_id:, email: nil, phone: nil, password: nil, name: nil)
|
49
|
-
|
49
|
+
api_path = '/users'
|
50
50
|
|
51
51
|
if user_id.nil?
|
52
52
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -66,7 +66,7 @@ module Appwrite
|
|
66
66
|
|
67
67
|
@client.call(
|
68
68
|
method: 'POST',
|
69
|
-
path:
|
69
|
+
path: api_path,
|
70
70
|
headers: headers,
|
71
71
|
params: params,
|
72
72
|
response_type: Models::User
|
@@ -79,14 +79,14 @@ module Appwrite
|
|
79
79
|
# /users](/docs/server/users#usersCreate) endpoint to create users with a
|
80
80
|
# plain text password.
|
81
81
|
#
|
82
|
-
# @param [String] user_id User ID. Choose
|
82
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
83
83
|
# @param [String] email User email.
|
84
84
|
# @param [String] password User password hashed using Argon2.
|
85
85
|
# @param [String] name User name. Max length: 128 chars.
|
86
86
|
#
|
87
87
|
# @return [User]
|
88
88
|
def create_argon2_user(user_id:, email:, password:, name: nil)
|
89
|
-
|
89
|
+
api_path = '/users/argon2'
|
90
90
|
|
91
91
|
if user_id.nil?
|
92
92
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -113,7 +113,7 @@ module Appwrite
|
|
113
113
|
|
114
114
|
@client.call(
|
115
115
|
method: 'POST',
|
116
|
-
path:
|
116
|
+
path: api_path,
|
117
117
|
headers: headers,
|
118
118
|
params: params,
|
119
119
|
response_type: Models::User
|
@@ -126,14 +126,14 @@ module Appwrite
|
|
126
126
|
# /users](/docs/server/users#usersCreate) endpoint to create users with a
|
127
127
|
# plain text password.
|
128
128
|
#
|
129
|
-
# @param [String] user_id User ID. Choose
|
129
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
130
130
|
# @param [String] email User email.
|
131
131
|
# @param [String] password User password hashed using Bcrypt.
|
132
132
|
# @param [String] name User name. Max length: 128 chars.
|
133
133
|
#
|
134
134
|
# @return [User]
|
135
135
|
def create_bcrypt_user(user_id:, email:, password:, name: nil)
|
136
|
-
|
136
|
+
api_path = '/users/bcrypt'
|
137
137
|
|
138
138
|
if user_id.nil?
|
139
139
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -160,7 +160,7 @@ module Appwrite
|
|
160
160
|
|
161
161
|
@client.call(
|
162
162
|
method: 'POST',
|
163
|
-
path:
|
163
|
+
path: api_path,
|
164
164
|
headers: headers,
|
165
165
|
params: params,
|
166
166
|
response_type: Models::User
|
@@ -168,19 +168,76 @@ module Appwrite
|
|
168
168
|
end
|
169
169
|
|
170
170
|
|
171
|
+
# Get identities for all users.
|
172
|
+
#
|
173
|
+
# @param [String] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
|
174
|
+
# @param [String] search Search term to filter your list results. Max length: 256 chars.
|
175
|
+
#
|
176
|
+
# @return [IdentityList]
|
177
|
+
def list_identities(queries: nil, search: nil)
|
178
|
+
api_path = '/users/identities'
|
179
|
+
|
180
|
+
params = {
|
181
|
+
queries: queries,
|
182
|
+
search: search,
|
183
|
+
}
|
184
|
+
|
185
|
+
headers = {
|
186
|
+
"content-type": 'application/json',
|
187
|
+
}
|
188
|
+
|
189
|
+
@client.call(
|
190
|
+
method: 'GET',
|
191
|
+
path: api_path,
|
192
|
+
headers: headers,
|
193
|
+
params: params,
|
194
|
+
response_type: Models::IdentityList
|
195
|
+
)
|
196
|
+
end
|
197
|
+
|
198
|
+
|
199
|
+
# Delete an identity by its unique ID.
|
200
|
+
#
|
201
|
+
# @param [String] identity_id Identity ID.
|
202
|
+
#
|
203
|
+
# @return []
|
204
|
+
def delete_identity(identity_id:)
|
205
|
+
api_path = '/users/identities/{identityId}'
|
206
|
+
.gsub('{identityId}', identity_id)
|
207
|
+
|
208
|
+
if identity_id.nil?
|
209
|
+
raise Appwrite::Exception.new('Missing required parameter: "identityId"')
|
210
|
+
end
|
211
|
+
|
212
|
+
params = {
|
213
|
+
}
|
214
|
+
|
215
|
+
headers = {
|
216
|
+
"content-type": 'application/json',
|
217
|
+
}
|
218
|
+
|
219
|
+
@client.call(
|
220
|
+
method: 'DELETE',
|
221
|
+
path: api_path,
|
222
|
+
headers: headers,
|
223
|
+
params: params,
|
224
|
+
)
|
225
|
+
end
|
226
|
+
|
227
|
+
|
171
228
|
# Create a new user. Password provided must be hashed with the
|
172
229
|
# [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST
|
173
230
|
# /users](/docs/server/users#usersCreate) endpoint to create users with a
|
174
231
|
# plain text password.
|
175
232
|
#
|
176
|
-
# @param [String] user_id User ID. Choose
|
233
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
177
234
|
# @param [String] email User email.
|
178
235
|
# @param [String] password User password hashed using MD5.
|
179
236
|
# @param [String] name User name. Max length: 128 chars.
|
180
237
|
#
|
181
238
|
# @return [User]
|
182
239
|
def create_md5_user(user_id:, email:, password:, name: nil)
|
183
|
-
|
240
|
+
api_path = '/users/md5'
|
184
241
|
|
185
242
|
if user_id.nil?
|
186
243
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -207,7 +264,7 @@ module Appwrite
|
|
207
264
|
|
208
265
|
@client.call(
|
209
266
|
method: 'POST',
|
210
|
-
path:
|
267
|
+
path: api_path,
|
211
268
|
headers: headers,
|
212
269
|
params: params,
|
213
270
|
response_type: Models::User
|
@@ -220,14 +277,14 @@ module Appwrite
|
|
220
277
|
# /users](/docs/server/users#usersCreate) endpoint to create users with a
|
221
278
|
# plain text password.
|
222
279
|
#
|
223
|
-
# @param [String] user_id User ID. Choose
|
280
|
+
# @param [String] user_id User ID. Choose a custom ID or pass the string `ID.unique()`to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
224
281
|
# @param [String] email User email.
|
225
282
|
# @param [String] password User password hashed using PHPass.
|
226
283
|
# @param [String] name User name. Max length: 128 chars.
|
227
284
|
#
|
228
285
|
# @return [User]
|
229
286
|
def create_ph_pass_user(user_id:, email:, password:, name: nil)
|
230
|
-
|
287
|
+
api_path = '/users/phpass'
|
231
288
|
|
232
289
|
if user_id.nil?
|
233
290
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -254,7 +311,7 @@ module Appwrite
|
|
254
311
|
|
255
312
|
@client.call(
|
256
313
|
method: 'POST',
|
257
|
-
path:
|
314
|
+
path: api_path,
|
258
315
|
headers: headers,
|
259
316
|
params: params,
|
260
317
|
response_type: Models::User
|
@@ -267,7 +324,7 @@ module Appwrite
|
|
267
324
|
# /users](/docs/server/users#usersCreate) endpoint to create users with a
|
268
325
|
# plain text password.
|
269
326
|
#
|
270
|
-
# @param [String] user_id User ID. Choose
|
327
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
271
328
|
# @param [String] email User email.
|
272
329
|
# @param [String] password User password hashed using Scrypt.
|
273
330
|
# @param [String] password_salt Optional salt used to hash password.
|
@@ -279,7 +336,7 @@ module Appwrite
|
|
279
336
|
#
|
280
337
|
# @return [User]
|
281
338
|
def create_scrypt_user(user_id:, email:, password:, password_salt:, password_cpu:, password_memory:, password_parallel:, password_length:, name: nil)
|
282
|
-
|
339
|
+
api_path = '/users/scrypt'
|
283
340
|
|
284
341
|
if user_id.nil?
|
285
342
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -331,7 +388,7 @@ module Appwrite
|
|
331
388
|
|
332
389
|
@client.call(
|
333
390
|
method: 'POST',
|
334
|
-
path:
|
391
|
+
path: api_path,
|
335
392
|
headers: headers,
|
336
393
|
params: params,
|
337
394
|
response_type: Models::User
|
@@ -344,7 +401,7 @@ module Appwrite
|
|
344
401
|
# algorithm. Use the [POST /users](/docs/server/users#usersCreate) endpoint
|
345
402
|
# to create users with a plain text password.
|
346
403
|
#
|
347
|
-
# @param [String] user_id User ID. Choose
|
404
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
348
405
|
# @param [String] email User email.
|
349
406
|
# @param [String] password User password hashed using Scrypt Modified.
|
350
407
|
# @param [String] password_salt Salt used to hash password.
|
@@ -354,7 +411,7 @@ module Appwrite
|
|
354
411
|
#
|
355
412
|
# @return [User]
|
356
413
|
def create_scrypt_modified_user(user_id:, email:, password:, password_salt:, password_salt_separator:, password_signer_key:, name: nil)
|
357
|
-
|
414
|
+
api_path = '/users/scrypt-modified'
|
358
415
|
|
359
416
|
if user_id.nil?
|
360
417
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -396,7 +453,7 @@ module Appwrite
|
|
396
453
|
|
397
454
|
@client.call(
|
398
455
|
method: 'POST',
|
399
|
-
path:
|
456
|
+
path: api_path,
|
400
457
|
headers: headers,
|
401
458
|
params: params,
|
402
459
|
response_type: Models::User
|
@@ -409,7 +466,7 @@ module Appwrite
|
|
409
466
|
# the [POST /users](/docs/server/users#usersCreate) endpoint to create users
|
410
467
|
# with a plain text password.
|
411
468
|
#
|
412
|
-
# @param [String] user_id User ID. Choose
|
469
|
+
# @param [String] user_id User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
413
470
|
# @param [String] email User email.
|
414
471
|
# @param [String] password User password hashed using SHA.
|
415
472
|
# @param [String] password_version Optional SHA version used to hash password. Allowed values are: 'sha1', 'sha224', 'sha256', 'sha384', 'sha512/224', 'sha512/256', 'sha512', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512'
|
@@ -417,7 +474,7 @@ module Appwrite
|
|
417
474
|
#
|
418
475
|
# @return [User]
|
419
476
|
def create_sha_user(user_id:, email:, password:, password_version: nil, name: nil)
|
420
|
-
|
477
|
+
api_path = '/users/sha'
|
421
478
|
|
422
479
|
if user_id.nil?
|
423
480
|
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
@@ -445,7 +502,7 @@ module Appwrite
|
|
445
502
|
|
446
503
|
@client.call(
|
447
504
|
method: 'POST',
|
448
|
-
path:
|
505
|
+
path: api_path,
|
449
506
|
headers: headers,
|
450
507
|
params: params,
|
451
508
|
response_type: Models::User
|
@@ -459,7 +516,7 @@ module Appwrite
|
|
459
516
|
#
|
460
517
|
# @return [User]
|
461
518
|
def get(user_id:)
|
462
|
-
|
519
|
+
api_path = '/users/{userId}'
|
463
520
|
.gsub('{userId}', user_id)
|
464
521
|
|
465
522
|
if user_id.nil?
|
@@ -475,7 +532,7 @@ module Appwrite
|
|
475
532
|
|
476
533
|
@client.call(
|
477
534
|
method: 'GET',
|
478
|
-
path:
|
535
|
+
path: api_path,
|
479
536
|
headers: headers,
|
480
537
|
params: params,
|
481
538
|
response_type: Models::User
|
@@ -493,7 +550,7 @@ module Appwrite
|
|
493
550
|
#
|
494
551
|
# @return []
|
495
552
|
def delete(user_id:)
|
496
|
-
|
553
|
+
api_path = '/users/{userId}'
|
497
554
|
.gsub('{userId}', user_id)
|
498
555
|
|
499
556
|
if user_id.nil?
|
@@ -509,7 +566,7 @@ module Appwrite
|
|
509
566
|
|
510
567
|
@client.call(
|
511
568
|
method: 'DELETE',
|
512
|
-
path:
|
569
|
+
path: api_path,
|
513
570
|
headers: headers,
|
514
571
|
params: params,
|
515
572
|
)
|
@@ -523,7 +580,7 @@ module Appwrite
|
|
523
580
|
#
|
524
581
|
# @return [User]
|
525
582
|
def update_email(user_id:, email:)
|
526
|
-
|
583
|
+
api_path = '/users/{userId}/email'
|
527
584
|
.gsub('{userId}', user_id)
|
528
585
|
|
529
586
|
if user_id.nil?
|
@@ -544,7 +601,48 @@ module Appwrite
|
|
544
601
|
|
545
602
|
@client.call(
|
546
603
|
method: 'PATCH',
|
547
|
-
path:
|
604
|
+
path: api_path,
|
605
|
+
headers: headers,
|
606
|
+
params: params,
|
607
|
+
response_type: Models::User
|
608
|
+
)
|
609
|
+
end
|
610
|
+
|
611
|
+
|
612
|
+
# Update the user labels by its unique ID.
|
613
|
+
#
|
614
|
+
# Labels can be used to grant access to resources. While teams are a way for
|
615
|
+
# user's to share access to a resource, labels can be defined by the
|
616
|
+
# developer to grant access without an invitation. See the [Permissions
|
617
|
+
# docs](/docs/permissions) for more info.
|
618
|
+
#
|
619
|
+
# @param [String] user_id User ID.
|
620
|
+
# @param [Array] labels Array of user labels. Replaces the previous labels. Maximum of 5 labels are allowed, each up to 36 alphanumeric characters long.
|
621
|
+
#
|
622
|
+
# @return [User]
|
623
|
+
def update_labels(user_id:, labels:)
|
624
|
+
api_path = '/users/{userId}/labels'
|
625
|
+
.gsub('{userId}', user_id)
|
626
|
+
|
627
|
+
if user_id.nil?
|
628
|
+
raise Appwrite::Exception.new('Missing required parameter: "userId"')
|
629
|
+
end
|
630
|
+
|
631
|
+
if labels.nil?
|
632
|
+
raise Appwrite::Exception.new('Missing required parameter: "labels"')
|
633
|
+
end
|
634
|
+
|
635
|
+
params = {
|
636
|
+
labels: labels,
|
637
|
+
}
|
638
|
+
|
639
|
+
headers = {
|
640
|
+
"content-type": 'application/json',
|
641
|
+
}
|
642
|
+
|
643
|
+
@client.call(
|
644
|
+
method: 'PUT',
|
645
|
+
path: api_path,
|
548
646
|
headers: headers,
|
549
647
|
params: params,
|
550
648
|
response_type: Models::User
|
@@ -555,11 +653,11 @@ module Appwrite
|
|
555
653
|
# Get the user activity logs list by its unique ID.
|
556
654
|
#
|
557
655
|
# @param [String] user_id User ID.
|
558
|
-
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/
|
656
|
+
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
559
657
|
#
|
560
658
|
# @return [LogList]
|
561
659
|
def list_logs(user_id:, queries: nil)
|
562
|
-
|
660
|
+
api_path = '/users/{userId}/logs'
|
563
661
|
.gsub('{userId}', user_id)
|
564
662
|
|
565
663
|
if user_id.nil?
|
@@ -576,7 +674,7 @@ module Appwrite
|
|
576
674
|
|
577
675
|
@client.call(
|
578
676
|
method: 'GET',
|
579
|
-
path:
|
677
|
+
path: api_path,
|
580
678
|
headers: headers,
|
581
679
|
params: params,
|
582
680
|
response_type: Models::LogList
|
@@ -590,7 +688,7 @@ module Appwrite
|
|
590
688
|
#
|
591
689
|
# @return [MembershipList]
|
592
690
|
def list_memberships(user_id:)
|
593
|
-
|
691
|
+
api_path = '/users/{userId}/memberships'
|
594
692
|
.gsub('{userId}', user_id)
|
595
693
|
|
596
694
|
if user_id.nil?
|
@@ -606,7 +704,7 @@ module Appwrite
|
|
606
704
|
|
607
705
|
@client.call(
|
608
706
|
method: 'GET',
|
609
|
-
path:
|
707
|
+
path: api_path,
|
610
708
|
headers: headers,
|
611
709
|
params: params,
|
612
710
|
response_type: Models::MembershipList
|
@@ -621,7 +719,7 @@ module Appwrite
|
|
621
719
|
#
|
622
720
|
# @return [User]
|
623
721
|
def update_name(user_id:, name:)
|
624
|
-
|
722
|
+
api_path = '/users/{userId}/name'
|
625
723
|
.gsub('{userId}', user_id)
|
626
724
|
|
627
725
|
if user_id.nil?
|
@@ -642,7 +740,7 @@ module Appwrite
|
|
642
740
|
|
643
741
|
@client.call(
|
644
742
|
method: 'PATCH',
|
645
|
-
path:
|
743
|
+
path: api_path,
|
646
744
|
headers: headers,
|
647
745
|
params: params,
|
648
746
|
response_type: Models::User
|
@@ -657,7 +755,7 @@ module Appwrite
|
|
657
755
|
#
|
658
756
|
# @return [User]
|
659
757
|
def update_password(user_id:, password:)
|
660
|
-
|
758
|
+
api_path = '/users/{userId}/password'
|
661
759
|
.gsub('{userId}', user_id)
|
662
760
|
|
663
761
|
if user_id.nil?
|
@@ -678,7 +776,7 @@ module Appwrite
|
|
678
776
|
|
679
777
|
@client.call(
|
680
778
|
method: 'PATCH',
|
681
|
-
path:
|
779
|
+
path: api_path,
|
682
780
|
headers: headers,
|
683
781
|
params: params,
|
684
782
|
response_type: Models::User
|
@@ -693,7 +791,7 @@ module Appwrite
|
|
693
791
|
#
|
694
792
|
# @return [User]
|
695
793
|
def update_phone(user_id:, number:)
|
696
|
-
|
794
|
+
api_path = '/users/{userId}/phone'
|
697
795
|
.gsub('{userId}', user_id)
|
698
796
|
|
699
797
|
if user_id.nil?
|
@@ -714,7 +812,7 @@ module Appwrite
|
|
714
812
|
|
715
813
|
@client.call(
|
716
814
|
method: 'PATCH',
|
717
|
-
path:
|
815
|
+
path: api_path,
|
718
816
|
headers: headers,
|
719
817
|
params: params,
|
720
818
|
response_type: Models::User
|
@@ -728,7 +826,7 @@ module Appwrite
|
|
728
826
|
#
|
729
827
|
# @return [Preferences]
|
730
828
|
def get_prefs(user_id:)
|
731
|
-
|
829
|
+
api_path = '/users/{userId}/prefs'
|
732
830
|
.gsub('{userId}', user_id)
|
733
831
|
|
734
832
|
if user_id.nil?
|
@@ -744,7 +842,7 @@ module Appwrite
|
|
744
842
|
|
745
843
|
@client.call(
|
746
844
|
method: 'GET',
|
747
|
-
path:
|
845
|
+
path: api_path,
|
748
846
|
headers: headers,
|
749
847
|
params: params,
|
750
848
|
response_type: Models::Preferences
|
@@ -761,7 +859,7 @@ module Appwrite
|
|
761
859
|
#
|
762
860
|
# @return [Preferences]
|
763
861
|
def update_prefs(user_id:, prefs:)
|
764
|
-
|
862
|
+
api_path = '/users/{userId}/prefs'
|
765
863
|
.gsub('{userId}', user_id)
|
766
864
|
|
767
865
|
if user_id.nil?
|
@@ -782,7 +880,7 @@ module Appwrite
|
|
782
880
|
|
783
881
|
@client.call(
|
784
882
|
method: 'PATCH',
|
785
|
-
path:
|
883
|
+
path: api_path,
|
786
884
|
headers: headers,
|
787
885
|
params: params,
|
788
886
|
response_type: Models::Preferences
|
@@ -796,7 +894,7 @@ module Appwrite
|
|
796
894
|
#
|
797
895
|
# @return [SessionList]
|
798
896
|
def list_sessions(user_id:)
|
799
|
-
|
897
|
+
api_path = '/users/{userId}/sessions'
|
800
898
|
.gsub('{userId}', user_id)
|
801
899
|
|
802
900
|
if user_id.nil?
|
@@ -812,7 +910,7 @@ module Appwrite
|
|
812
910
|
|
813
911
|
@client.call(
|
814
912
|
method: 'GET',
|
815
|
-
path:
|
913
|
+
path: api_path,
|
816
914
|
headers: headers,
|
817
915
|
params: params,
|
818
916
|
response_type: Models::SessionList
|
@@ -826,7 +924,7 @@ module Appwrite
|
|
826
924
|
#
|
827
925
|
# @return []
|
828
926
|
def delete_sessions(user_id:)
|
829
|
-
|
927
|
+
api_path = '/users/{userId}/sessions'
|
830
928
|
.gsub('{userId}', user_id)
|
831
929
|
|
832
930
|
if user_id.nil?
|
@@ -842,7 +940,7 @@ module Appwrite
|
|
842
940
|
|
843
941
|
@client.call(
|
844
942
|
method: 'DELETE',
|
845
|
-
path:
|
943
|
+
path: api_path,
|
846
944
|
headers: headers,
|
847
945
|
params: params,
|
848
946
|
)
|
@@ -856,7 +954,7 @@ module Appwrite
|
|
856
954
|
#
|
857
955
|
# @return []
|
858
956
|
def delete_session(user_id:, session_id:)
|
859
|
-
|
957
|
+
api_path = '/users/{userId}/sessions/{sessionId}'
|
860
958
|
.gsub('{userId}', user_id)
|
861
959
|
.gsub('{sessionId}', session_id)
|
862
960
|
|
@@ -877,7 +975,7 @@ module Appwrite
|
|
877
975
|
|
878
976
|
@client.call(
|
879
977
|
method: 'DELETE',
|
880
|
-
path:
|
978
|
+
path: api_path,
|
881
979
|
headers: headers,
|
882
980
|
params: params,
|
883
981
|
)
|
@@ -892,7 +990,7 @@ module Appwrite
|
|
892
990
|
#
|
893
991
|
# @return [User]
|
894
992
|
def update_status(user_id:, status:)
|
895
|
-
|
993
|
+
api_path = '/users/{userId}/status'
|
896
994
|
.gsub('{userId}', user_id)
|
897
995
|
|
898
996
|
if user_id.nil?
|
@@ -913,7 +1011,7 @@ module Appwrite
|
|
913
1011
|
|
914
1012
|
@client.call(
|
915
1013
|
method: 'PATCH',
|
916
|
-
path:
|
1014
|
+
path: api_path,
|
917
1015
|
headers: headers,
|
918
1016
|
params: params,
|
919
1017
|
response_type: Models::User
|
@@ -928,7 +1026,7 @@ module Appwrite
|
|
928
1026
|
#
|
929
1027
|
# @return [User]
|
930
1028
|
def update_email_verification(user_id:, email_verification:)
|
931
|
-
|
1029
|
+
api_path = '/users/{userId}/verification'
|
932
1030
|
.gsub('{userId}', user_id)
|
933
1031
|
|
934
1032
|
if user_id.nil?
|
@@ -949,7 +1047,7 @@ module Appwrite
|
|
949
1047
|
|
950
1048
|
@client.call(
|
951
1049
|
method: 'PATCH',
|
952
|
-
path:
|
1050
|
+
path: api_path,
|
953
1051
|
headers: headers,
|
954
1052
|
params: params,
|
955
1053
|
response_type: Models::User
|
@@ -964,7 +1062,7 @@ module Appwrite
|
|
964
1062
|
#
|
965
1063
|
# @return [User]
|
966
1064
|
def update_phone_verification(user_id:, phone_verification:)
|
967
|
-
|
1065
|
+
api_path = '/users/{userId}/verification/phone'
|
968
1066
|
.gsub('{userId}', user_id)
|
969
1067
|
|
970
1068
|
if user_id.nil?
|
@@ -985,7 +1083,7 @@ module Appwrite
|
|
985
1083
|
|
986
1084
|
@client.call(
|
987
1085
|
method: 'PATCH',
|
988
|
-
path:
|
1086
|
+
path: api_path,
|
989
1087
|
headers: headers,
|
990
1088
|
params: params,
|
991
1089
|
response_type: Models::User
|
data/lib/appwrite.rb
CHANGED
@@ -18,6 +18,7 @@ require_relative 'appwrite/models/database_list'
|
|
18
18
|
require_relative 'appwrite/models/index_list'
|
19
19
|
require_relative 'appwrite/models/user_list'
|
20
20
|
require_relative 'appwrite/models/session_list'
|
21
|
+
require_relative 'appwrite/models/identity_list'
|
21
22
|
require_relative 'appwrite/models/log_list'
|
22
23
|
require_relative 'appwrite/models/file_list'
|
23
24
|
require_relative 'appwrite/models/bucket_list'
|
@@ -33,6 +34,7 @@ require_relative 'appwrite/models/language_list'
|
|
33
34
|
require_relative 'appwrite/models/currency_list'
|
34
35
|
require_relative 'appwrite/models/phone_list'
|
35
36
|
require_relative 'appwrite/models/variable_list'
|
37
|
+
require_relative 'appwrite/models/locale_code_list'
|
36
38
|
require_relative 'appwrite/models/database'
|
37
39
|
require_relative 'appwrite/models/collection'
|
38
40
|
require_relative 'appwrite/models/attribute_list'
|
@@ -45,6 +47,7 @@ require_relative 'appwrite/models/attribute_enum'
|
|
45
47
|
require_relative 'appwrite/models/attribute_ip'
|
46
48
|
require_relative 'appwrite/models/attribute_url'
|
47
49
|
require_relative 'appwrite/models/attribute_datetime'
|
50
|
+
require_relative 'appwrite/models/attribute_relationship'
|
48
51
|
require_relative 'appwrite/models/index'
|
49
52
|
require_relative 'appwrite/models/document'
|
50
53
|
require_relative 'appwrite/models/log'
|
@@ -56,11 +59,12 @@ require_relative 'appwrite/models/algo_bcrypt'
|
|
56
59
|
require_relative 'appwrite/models/algo_scrypt'
|
57
60
|
require_relative 'appwrite/models/algo_scrypt_modified'
|
58
61
|
require_relative 'appwrite/models/algo_argon2'
|
59
|
-
require_relative 'appwrite/models/account'
|
60
62
|
require_relative 'appwrite/models/preferences'
|
61
63
|
require_relative 'appwrite/models/session'
|
64
|
+
require_relative 'appwrite/models/identity'
|
62
65
|
require_relative 'appwrite/models/token'
|
63
66
|
require_relative 'appwrite/models/locale'
|
67
|
+
require_relative 'appwrite/models/locale_code'
|
64
68
|
require_relative 'appwrite/models/file'
|
65
69
|
require_relative 'appwrite/models/bucket'
|
66
70
|
require_relative 'appwrite/models/team'
|
@@ -79,11 +83,13 @@ require_relative 'appwrite/models/health_antivirus'
|
|
79
83
|
require_relative 'appwrite/models/health_queue'
|
80
84
|
require_relative 'appwrite/models/health_status'
|
81
85
|
require_relative 'appwrite/models/health_time'
|
86
|
+
require_relative 'appwrite/models/headers'
|
82
87
|
|
83
88
|
require_relative 'appwrite/services/account'
|
84
89
|
require_relative 'appwrite/services/avatars'
|
85
90
|
require_relative 'appwrite/services/databases'
|
86
91
|
require_relative 'appwrite/services/functions'
|
92
|
+
require_relative 'appwrite/services/graphql'
|
87
93
|
require_relative 'appwrite/services/health'
|
88
94
|
require_relative 'appwrite/services/locale'
|
89
95
|
require_relative 'appwrite/services/storage'
|