appwrite 16.1.0 → 17.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/column_boolean.rb +67 -0
- data/lib/appwrite/models/column_datetime.rb +72 -0
- data/lib/appwrite/models/column_email.rb +72 -0
- data/lib/appwrite/models/column_enum.rb +77 -0
- data/lib/appwrite/models/column_float.rb +77 -0
- data/lib/appwrite/models/column_index.rb +72 -0
- data/lib/appwrite/models/column_index_list.rb +32 -0
- data/lib/appwrite/models/column_integer.rb +77 -0
- data/lib/appwrite/models/column_ip.rb +72 -0
- data/lib/appwrite/models/column_list.rb +32 -0
- data/lib/appwrite/models/column_relationship.rb +92 -0
- data/lib/appwrite/models/column_string.rb +77 -0
- data/lib/appwrite/models/column_url.rb +72 -0
- data/lib/appwrite/models/database.rb +8 -3
- data/lib/appwrite/models/execution.rb +5 -0
- data/lib/appwrite/models/index.rb +18 -13
- data/lib/appwrite/models/row.rb +66 -0
- data/lib/appwrite/models/row_list.rb +36 -0
- data/lib/appwrite/models/table.rb +72 -0
- data/lib/appwrite/models/table_list.rb +32 -0
- data/lib/appwrite/query.rb +36 -0
- data/lib/appwrite/services/account.rb +15 -48
- data/lib/appwrite/services/avatars.rb +0 -7
- data/lib/appwrite/services/databases.rb +198 -120
- data/lib/appwrite/services/functions.rb +0 -26
- data/lib/appwrite/services/graphql.rb +0 -2
- data/lib/appwrite/services/health.rb +0 -22
- data/lib/appwrite/services/locale.rb +0 -8
- data/lib/appwrite/services/messaging.rb +0 -46
- data/lib/appwrite/services/sites.rb +0 -25
- data/lib/appwrite/services/storage.rb +0 -13
- data/lib/appwrite/services/tables_db.rb +2318 -0
- data/lib/appwrite/services/teams.rb +0 -13
- data/lib/appwrite/services/tokens.rb +0 -5
- data/lib/appwrite/services/users.rb +0 -42
- data/lib/appwrite.rb +18 -0
- metadata +20 -2
@@ -29,7 +29,6 @@ module Appwrite
|
|
29
29
|
)
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
32
|
# Use this endpoint to allow a new user to register a new account in your
|
34
33
|
# project. After the user registration completes successfully, you can use
|
35
34
|
# the
|
@@ -79,7 +78,6 @@ module Appwrite
|
|
79
78
|
)
|
80
79
|
end
|
81
80
|
|
82
|
-
|
83
81
|
# Update currently logged in user account email address. After changing user
|
84
82
|
# address, the user confirmation status will get reset. A new confirmation
|
85
83
|
# email is not sent automatically however you can use the send confirmation
|
@@ -122,7 +120,6 @@ module Appwrite
|
|
122
120
|
)
|
123
121
|
end
|
124
122
|
|
125
|
-
|
126
123
|
# Get the list of identities for the currently logged in user.
|
127
124
|
#
|
128
125
|
# @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: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
|
@@ -147,7 +144,6 @@ module Appwrite
|
|
147
144
|
)
|
148
145
|
end
|
149
146
|
|
150
|
-
|
151
147
|
# Delete an identity by its unique ID.
|
152
148
|
#
|
153
149
|
# @param [String] identity_id Identity ID.
|
@@ -176,7 +172,6 @@ module Appwrite
|
|
176
172
|
)
|
177
173
|
end
|
178
174
|
|
179
|
-
|
180
175
|
# Use this endpoint to create a JSON Web Token. You can use the resulting JWT
|
181
176
|
# to authenticate on behalf of the current user when working with the
|
182
177
|
# Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes
|
@@ -204,7 +199,6 @@ module Appwrite
|
|
204
199
|
)
|
205
200
|
end
|
206
201
|
|
207
|
-
|
208
202
|
# Get the list of latest security activity logs for the currently logged in
|
209
203
|
# user. Each log returns user IP address, location and date and time of log.
|
210
204
|
#
|
@@ -230,7 +224,6 @@ module Appwrite
|
|
230
224
|
)
|
231
225
|
end
|
232
226
|
|
233
|
-
|
234
227
|
# Enable or disable MFA on an account.
|
235
228
|
#
|
236
229
|
# @param [] mfa Enable or disable MFA.
|
@@ -260,7 +253,6 @@ module Appwrite
|
|
260
253
|
)
|
261
254
|
end
|
262
255
|
|
263
|
-
|
264
256
|
# Add an authenticator app to be used as an MFA factor. Verify the
|
265
257
|
# authenticator using the [verify
|
266
258
|
# authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator)
|
@@ -293,7 +285,6 @@ module Appwrite
|
|
293
285
|
)
|
294
286
|
end
|
295
287
|
|
296
|
-
|
297
288
|
# Verify an authenticator app after adding it using the [add
|
298
289
|
# authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
|
299
290
|
# method.
|
@@ -331,7 +322,6 @@ module Appwrite
|
|
331
322
|
)
|
332
323
|
end
|
333
324
|
|
334
|
-
|
335
325
|
# Delete an authenticator for a user by ID.
|
336
326
|
#
|
337
327
|
# @param [AuthenticatorType] type Type of authenticator.
|
@@ -360,7 +350,6 @@ module Appwrite
|
|
360
350
|
)
|
361
351
|
end
|
362
352
|
|
363
|
-
|
364
353
|
# Begin the process of MFA verification after sign-in. Finish the flow with
|
365
354
|
# [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge)
|
366
355
|
# method.
|
@@ -392,7 +381,6 @@ module Appwrite
|
|
392
381
|
)
|
393
382
|
end
|
394
383
|
|
395
|
-
|
396
384
|
# Complete the MFA challenge by providing the one-time password. Finish the
|
397
385
|
# process of MFA verification by providing the one-time password. To begin
|
398
386
|
# the flow, use
|
@@ -432,7 +420,6 @@ module Appwrite
|
|
432
420
|
)
|
433
421
|
end
|
434
422
|
|
435
|
-
|
436
423
|
# List the factors available on the account to be used as a MFA challange.
|
437
424
|
#
|
438
425
|
#
|
@@ -455,7 +442,6 @@ module Appwrite
|
|
455
442
|
)
|
456
443
|
end
|
457
444
|
|
458
|
-
|
459
445
|
# Get recovery codes that can be used as backup for MFA flow. Before getting
|
460
446
|
# codes, they must be generated using
|
461
447
|
# [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
@@ -481,7 +467,6 @@ module Appwrite
|
|
481
467
|
)
|
482
468
|
end
|
483
469
|
|
484
|
-
|
485
470
|
# Generate recovery codes as backup for MFA flow. It's recommended to
|
486
471
|
# generate and show then immediately after user successfully adds their
|
487
472
|
# authehticator. Recovery codes can be used as a MFA verification type in
|
@@ -509,7 +494,6 @@ module Appwrite
|
|
509
494
|
)
|
510
495
|
end
|
511
496
|
|
512
|
-
|
513
497
|
# Regenerate recovery codes that can be used as backup for MFA flow. Before
|
514
498
|
# regenerating codes, they must be first generated using
|
515
499
|
# [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes)
|
@@ -536,7 +520,6 @@ module Appwrite
|
|
536
520
|
)
|
537
521
|
end
|
538
522
|
|
539
|
-
|
540
523
|
# Update currently logged in user account name.
|
541
524
|
#
|
542
525
|
# @param [String] name User name. Max length: 128 chars.
|
@@ -566,7 +549,6 @@ module Appwrite
|
|
566
549
|
)
|
567
550
|
end
|
568
551
|
|
569
|
-
|
570
552
|
# Update currently logged in user password. For validation, user is required
|
571
553
|
# to pass in the new password, and the old password. For users created with
|
572
554
|
# OAuth, Team Invites and Magic URL, oldPassword is optional.
|
@@ -600,7 +582,6 @@ module Appwrite
|
|
600
582
|
)
|
601
583
|
end
|
602
584
|
|
603
|
-
|
604
585
|
# Update the currently logged in user's phone number. After updating the
|
605
586
|
# phone number, the phone verification status will be reset. A confirmation
|
606
587
|
# SMS is not sent automatically, however you can use the [POST
|
@@ -640,7 +621,6 @@ module Appwrite
|
|
640
621
|
)
|
641
622
|
end
|
642
623
|
|
643
|
-
|
644
624
|
# Get the preferences as a key-value object for the currently logged in user.
|
645
625
|
#
|
646
626
|
#
|
@@ -663,7 +643,6 @@ module Appwrite
|
|
663
643
|
)
|
664
644
|
end
|
665
645
|
|
666
|
-
|
667
646
|
# Update currently logged in user account preferences. The object you pass is
|
668
647
|
# stored as is, and replaces any previous value. The maximum allowed prefs
|
669
648
|
# size is 64kB and throws error if exceeded.
|
@@ -695,7 +674,6 @@ module Appwrite
|
|
695
674
|
)
|
696
675
|
end
|
697
676
|
|
698
|
-
|
699
677
|
# Sends the user an email with a temporary secret key for password reset.
|
700
678
|
# When the user clicks the confirmation link he is redirected back to your
|
701
679
|
# app password reset URL with the secret key and email address values
|
@@ -738,7 +716,6 @@ module Appwrite
|
|
738
716
|
)
|
739
717
|
end
|
740
718
|
|
741
|
-
|
742
719
|
# Use this endpoint to complete the user account password reset. Both the
|
743
720
|
# **userId** and **secret** arguments will be passed as query parameters to
|
744
721
|
# the redirect URL you have provided when sending your request to the [POST
|
@@ -789,7 +766,6 @@ module Appwrite
|
|
789
766
|
)
|
790
767
|
end
|
791
768
|
|
792
|
-
|
793
769
|
# Get the list of active sessions across different devices for the currently
|
794
770
|
# logged in user.
|
795
771
|
#
|
@@ -813,7 +789,6 @@ module Appwrite
|
|
813
789
|
)
|
814
790
|
end
|
815
791
|
|
816
|
-
|
817
792
|
# Delete all sessions from the user account and remove any sessions cookies
|
818
793
|
# from the end client.
|
819
794
|
#
|
@@ -837,7 +812,6 @@ module Appwrite
|
|
837
812
|
)
|
838
813
|
end
|
839
814
|
|
840
|
-
|
841
815
|
# Use this endpoint to allow a new user to register an anonymous account in
|
842
816
|
# your project. This route will also create a new session for the user. To
|
843
817
|
# allow the new user to convert an anonymous account to a normal account, you
|
@@ -867,7 +841,6 @@ module Appwrite
|
|
867
841
|
)
|
868
842
|
end
|
869
843
|
|
870
|
-
|
871
844
|
# Allow the user to login into their account by providing a valid email and
|
872
845
|
# password combination. This route will create a new session for the user.
|
873
846
|
#
|
@@ -908,7 +881,9 @@ module Appwrite
|
|
908
881
|
)
|
909
882
|
end
|
910
883
|
|
911
|
-
|
884
|
+
#
|
885
|
+
# @deprecated This API has been deprecated.
|
886
|
+
#
|
912
887
|
# Use this endpoint to create a session from token. Provide the **userId**
|
913
888
|
# and **secret** parameters from the successful response of authentication
|
914
889
|
# flows initiated by token creation. For example, magic URL and phone login.
|
@@ -946,7 +921,9 @@ module Appwrite
|
|
946
921
|
)
|
947
922
|
end
|
948
923
|
|
949
|
-
|
924
|
+
#
|
925
|
+
# @deprecated This API has been deprecated.
|
926
|
+
#
|
950
927
|
# Use this endpoint to create a session from token. Provide the **userId**
|
951
928
|
# and **secret** parameters from the successful response of authentication
|
952
929
|
# flows initiated by token creation. For example, magic URL and phone login.
|
@@ -984,7 +961,6 @@ module Appwrite
|
|
984
961
|
)
|
985
962
|
end
|
986
963
|
|
987
|
-
|
988
964
|
# Use this endpoint to create a session from token. Provide the **userId**
|
989
965
|
# and **secret** parameters from the successful response of authentication
|
990
966
|
# flows initiated by token creation. For example, magic URL and phone login.
|
@@ -1022,7 +998,6 @@ module Appwrite
|
|
1022
998
|
)
|
1023
999
|
end
|
1024
1000
|
|
1025
|
-
|
1026
1001
|
# Use this endpoint to get a logged in user's session using a Session ID.
|
1027
1002
|
# Inputting 'current' will return the current session being used.
|
1028
1003
|
#
|
@@ -1052,7 +1027,6 @@ module Appwrite
|
|
1052
1027
|
)
|
1053
1028
|
end
|
1054
1029
|
|
1055
|
-
|
1056
1030
|
# Use this endpoint to extend a session's length. Extending a session is
|
1057
1031
|
# useful when session expiry is short. If the session was created using an
|
1058
1032
|
# OAuth provider, this endpoint refreshes the access token from the provider.
|
@@ -1084,7 +1058,6 @@ module Appwrite
|
|
1084
1058
|
)
|
1085
1059
|
end
|
1086
1060
|
|
1087
|
-
|
1088
1061
|
# Logout the user. Use 'current' as the session ID to logout on this device,
|
1089
1062
|
# use a session ID to logout on another device. If you're looking to logout
|
1090
1063
|
# the user on all devices, use [Delete
|
@@ -1117,7 +1090,6 @@ module Appwrite
|
|
1117
1090
|
)
|
1118
1091
|
end
|
1119
1092
|
|
1120
|
-
|
1121
1093
|
# Block the currently logged in user account. Behind the scene, the user
|
1122
1094
|
# record is not deleted but permanently blocked from any access. To
|
1123
1095
|
# completely delete a user, use the Users API instead.
|
@@ -1143,10 +1115,12 @@ module Appwrite
|
|
1143
1115
|
)
|
1144
1116
|
end
|
1145
1117
|
|
1146
|
-
|
1147
1118
|
# Sends the user an email with a secret key for creating a session. If the
|
1148
|
-
#
|
1149
|
-
#
|
1119
|
+
# email address has never been used, a **new account is created** using the
|
1120
|
+
# provided `userId`. Otherwise, if the email address is already attached to
|
1121
|
+
# an account, the **user ID is ignored**. Then, the user will receive an
|
1122
|
+
# email with the one-time password. Use the returned user ID and secret and
|
1123
|
+
# submit a request to the [POST
|
1150
1124
|
# /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
1151
1125
|
# endpoint to complete the login process. The secret sent to the user's email
|
1152
1126
|
# is valid for 15 minutes.
|
@@ -1154,8 +1128,9 @@ module Appwrite
|
|
1154
1128
|
# A user is limited to 10 active sessions at a time by default. [Learn more
|
1155
1129
|
# about session
|
1156
1130
|
# limits](https://appwrite.io/docs/authentication-security#limits).
|
1131
|
+
#
|
1157
1132
|
#
|
1158
|
-
# @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.
|
1133
|
+
# @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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
|
1159
1134
|
# @param [String] email User email.
|
1160
1135
|
# @param [] phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
1161
1136
|
#
|
@@ -1190,7 +1165,6 @@ module Appwrite
|
|
1190
1165
|
)
|
1191
1166
|
end
|
1192
1167
|
|
1193
|
-
|
1194
1168
|
# Sends the user an email with a secret key for creating a session. If the
|
1195
1169
|
# provided user ID has not been registered, a new user will be created. When
|
1196
1170
|
# the user clicks the link in the email, the user is redirected back to the
|
@@ -1206,7 +1180,7 @@ module Appwrite
|
|
1206
1180
|
# limits](https://appwrite.io/docs/authentication-security#limits).
|
1207
1181
|
#
|
1208
1182
|
#
|
1209
|
-
# @param [String] user_id Unique 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.
|
1183
|
+
# @param [String] user_id Unique 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. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
|
1210
1184
|
# @param [String] email User email.
|
1211
1185
|
# @param [String] url URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
1212
1186
|
# @param [] phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
@@ -1243,7 +1217,6 @@ module Appwrite
|
|
1243
1217
|
)
|
1244
1218
|
end
|
1245
1219
|
|
1246
|
-
|
1247
1220
|
# Allow the user to login to their account using the OAuth2 provider of their
|
1248
1221
|
# choice. Each OAuth2 provider should be enabled from the Appwrite console
|
1249
1222
|
# first. Use the success and failure arguments to provide a redirect URL's
|
@@ -1291,7 +1264,6 @@ module Appwrite
|
|
1291
1264
|
)
|
1292
1265
|
end
|
1293
1266
|
|
1294
|
-
|
1295
1267
|
# Sends the user an SMS with a secret key for creating a session. If the
|
1296
1268
|
# provided user ID has not be registered, a new user will be created. Use the
|
1297
1269
|
# returned user ID and secret and submit a request to the [POST
|
@@ -1303,7 +1275,7 @@ module Appwrite
|
|
1303
1275
|
# about session
|
1304
1276
|
# limits](https://appwrite.io/docs/authentication-security#limits).
|
1305
1277
|
#
|
1306
|
-
# @param [String] user_id Unique 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.
|
1278
|
+
# @param [String] user_id Unique 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. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
|
1307
1279
|
# @param [String] phone Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
1308
1280
|
#
|
1309
1281
|
# @return [Token]
|
@@ -1336,7 +1308,6 @@ module Appwrite
|
|
1336
1308
|
)
|
1337
1309
|
end
|
1338
1310
|
|
1339
|
-
|
1340
1311
|
# Use this endpoint to send a verification message to your user email address
|
1341
1312
|
# to confirm they are the valid owners of that address. Both the **userId**
|
1342
1313
|
# and **secret** arguments will be passed as query parameters to the URL you
|
@@ -1380,7 +1351,6 @@ module Appwrite
|
|
1380
1351
|
)
|
1381
1352
|
end
|
1382
1353
|
|
1383
|
-
|
1384
1354
|
# Use this endpoint to complete the user email verification process. Use both
|
1385
1355
|
# the **userId** and **secret** parameters that were attached to your app URL
|
1386
1356
|
# to verify the user email ownership. If confirmed this route will return a
|
@@ -1419,7 +1389,6 @@ module Appwrite
|
|
1419
1389
|
)
|
1420
1390
|
end
|
1421
1391
|
|
1422
|
-
|
1423
1392
|
# Use this endpoint to send a verification SMS to the currently logged in
|
1424
1393
|
# user. This endpoint is meant for use after updating a user's phone number
|
1425
1394
|
# using the
|
@@ -1450,7 +1419,6 @@ module Appwrite
|
|
1450
1419
|
)
|
1451
1420
|
end
|
1452
1421
|
|
1453
|
-
|
1454
1422
|
# Use this endpoint to complete the user phone verification process. Use the
|
1455
1423
|
# **userId** and **secret** that were sent to your user's phone number to
|
1456
1424
|
# verify the user email ownership. If confirmed this route will return a 200
|
@@ -1489,6 +1457,5 @@ module Appwrite
|
|
1489
1457
|
)
|
1490
1458
|
end
|
1491
1459
|
|
1492
|
-
|
1493
1460
|
end
|
1494
1461
|
end
|
@@ -49,7 +49,6 @@ module Appwrite
|
|
49
49
|
)
|
50
50
|
end
|
51
51
|
|
52
|
-
|
53
52
|
# The credit card endpoint will return you the icon of the credit card
|
54
53
|
# provider you need. Use width, height and quality arguments to change the
|
55
54
|
# output settings.
|
@@ -91,7 +90,6 @@ module Appwrite
|
|
91
90
|
)
|
92
91
|
end
|
93
92
|
|
94
|
-
|
95
93
|
# Use this endpoint to fetch the favorite icon (AKA favicon) of any remote
|
96
94
|
# website URL.
|
97
95
|
#
|
@@ -122,7 +120,6 @@ module Appwrite
|
|
122
120
|
)
|
123
121
|
end
|
124
122
|
|
125
|
-
|
126
123
|
# You can use this endpoint to show different country flags icons to your
|
127
124
|
# users. The code argument receives the 2 letter country code. Use width,
|
128
125
|
# height and quality arguments to change the output settings. Country codes
|
@@ -165,7 +162,6 @@ module Appwrite
|
|
165
162
|
)
|
166
163
|
end
|
167
164
|
|
168
|
-
|
169
165
|
# Use this endpoint to fetch a remote image URL and crop it to any image size
|
170
166
|
# you want. This endpoint is very useful if you need to crop and display
|
171
167
|
# remote images in your app or in case you want to make sure a 3rd party
|
@@ -207,7 +203,6 @@ module Appwrite
|
|
207
203
|
)
|
208
204
|
end
|
209
205
|
|
210
|
-
|
211
206
|
# Use this endpoint to show your user initials avatar icon on your website or
|
212
207
|
# app. By default, this route will try to print your logged-in user name or
|
213
208
|
# email initials. You can also overwrite the user name if you pass the 'name'
|
@@ -252,7 +247,6 @@ module Appwrite
|
|
252
247
|
)
|
253
248
|
end
|
254
249
|
|
255
|
-
|
256
250
|
# Converts a given plain text to a QR code image. You can use the query
|
257
251
|
# parameters to change the size and style of the resulting image.
|
258
252
|
#
|
@@ -288,6 +282,5 @@ module Appwrite
|
|
288
282
|
)
|
289
283
|
end
|
290
284
|
|
291
|
-
|
292
285
|
end
|
293
286
|
end
|