appwrite 30.0.1 → 30.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 +44 -24
- data/lib/appwrite/enums/appwrite_migration_resource.rb +46 -0
- data/lib/appwrite/enums/build_runtime.rb +4 -0
- data/lib/appwrite/enums/environment_resource.rb +40 -0
- data/lib/appwrite/enums/firebase_migration_resource.rb +16 -0
- data/lib/appwrite/enums/n_host_migration_resource.rb +17 -0
- data/lib/appwrite/enums/on_duplicate.rb +9 -0
- data/lib/appwrite/enums/project_policy_id.rb +1 -0
- data/lib/appwrite/enums/runtime.rb +4 -0
- data/lib/appwrite/enums/supabase_migration_resource.rb +17 -0
- data/lib/appwrite/models/billing_plan.rb +15 -0
- data/lib/appwrite/models/migration.rb +128 -0
- data/lib/appwrite/models/migration_list.rb +33 -0
- data/lib/appwrite/models/policy_deny_realtime_guests.rb +33 -0
- data/lib/appwrite/services/account.rb +19 -19
- data/lib/appwrite/services/activities.rb +1 -1
- data/lib/appwrite/services/advisor.rb +5 -5
- data/lib/appwrite/services/apps.rb +25 -25
- data/lib/appwrite/services/avatars.rb +3 -3
- data/lib/appwrite/services/backups.rb +6 -6
- data/lib/appwrite/services/databases.rb +157 -157
- data/lib/appwrite/services/documents_db.rb +63 -63
- data/lib/appwrite/services/domains.rb +77 -77
- data/lib/appwrite/services/functions.rb +33 -33
- data/lib/appwrite/services/messaging.rb +30 -30
- data/lib/appwrite/services/migrations.rb +653 -0
- data/lib/appwrite/services/mongo.rb +37 -37
- data/lib/appwrite/services/mysql.rb +40 -40
- data/lib/appwrite/services/oauth2.rb +14 -14
- data/lib/appwrite/services/organization.rb +17 -17
- data/lib/appwrite/services/postgresql.rb +44 -44
- data/lib/appwrite/services/presences.rb +4 -4
- data/lib/appwrite/services/project.rb +105 -28
- data/lib/appwrite/services/proxy.rb +3 -3
- data/lib/appwrite/services/sites.rb +32 -32
- data/lib/appwrite/services/storage.rb +17 -17
- data/lib/appwrite/services/tables_db.rb +169 -169
- data/lib/appwrite/services/teams.rb +23 -23
- data/lib/appwrite/services/tokens.rb +7 -7
- data/lib/appwrite/services/users.rb +50 -50
- data/lib/appwrite/services/vectors_db.rb +55 -55
- data/lib/appwrite/services/waf.rb +57 -35
- data/lib/appwrite/services/webhooks.rb +4 -4
- data/lib/appwrite.rb +12 -0
- metadata +12 -2
|
@@ -192,7 +192,7 @@ module Appwrite
|
|
|
192
192
|
end
|
|
193
193
|
|
|
194
194
|
api_path = '/documentsdb/transactions/{transactionId}'
|
|
195
|
-
.gsub('{transactionId}', transaction_id)
|
|
195
|
+
.gsub('{transactionId}', @client.encode_path(transaction_id))
|
|
196
196
|
|
|
197
197
|
api_params = {}
|
|
198
198
|
|
|
@@ -227,7 +227,7 @@ module Appwrite
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
api_path = '/documentsdb/transactions/{transactionId}'
|
|
230
|
-
.gsub('{transactionId}', transaction_id)
|
|
230
|
+
.gsub('{transactionId}', @client.encode_path(transaction_id))
|
|
231
231
|
|
|
232
232
|
api_params = {
|
|
233
233
|
commit: commit,
|
|
@@ -262,7 +262,7 @@ module Appwrite
|
|
|
262
262
|
end
|
|
263
263
|
|
|
264
264
|
api_path = '/documentsdb/transactions/{transactionId}'
|
|
265
|
-
.gsub('{transactionId}', transaction_id)
|
|
265
|
+
.gsub('{transactionId}', @client.encode_path(transaction_id))
|
|
266
266
|
|
|
267
267
|
api_params = {}
|
|
268
268
|
|
|
@@ -295,7 +295,7 @@ module Appwrite
|
|
|
295
295
|
end
|
|
296
296
|
|
|
297
297
|
api_path = '/documentsdb/transactions/{transactionId}/operations'
|
|
298
|
-
.gsub('{transactionId}', transaction_id)
|
|
298
|
+
.gsub('{transactionId}', @client.encode_path(transaction_id))
|
|
299
299
|
|
|
300
300
|
api_params = {
|
|
301
301
|
operations: operations,
|
|
@@ -330,7 +330,7 @@ module Appwrite
|
|
|
330
330
|
end
|
|
331
331
|
|
|
332
332
|
api_path = '/documentsdb/{databaseId}'
|
|
333
|
-
.gsub('{databaseId}', database_id)
|
|
333
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
334
334
|
|
|
335
335
|
api_params = {}
|
|
336
336
|
|
|
@@ -377,7 +377,7 @@ module Appwrite
|
|
|
377
377
|
end
|
|
378
378
|
|
|
379
379
|
api_path = '/documentsdb/{databaseId}'
|
|
380
|
-
.gsub('{databaseId}', database_id)
|
|
380
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
381
381
|
|
|
382
382
|
api_params = {
|
|
383
383
|
name: name,
|
|
@@ -417,7 +417,7 @@ module Appwrite
|
|
|
417
417
|
end
|
|
418
418
|
|
|
419
419
|
api_path = '/documentsdb/{databaseId}'
|
|
420
|
-
.gsub('{databaseId}', database_id)
|
|
420
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
421
421
|
|
|
422
422
|
api_params = {}
|
|
423
423
|
|
|
@@ -455,7 +455,7 @@ module Appwrite
|
|
|
455
455
|
end
|
|
456
456
|
|
|
457
457
|
api_path = '/documentsdb/{databaseId}/collections'
|
|
458
|
-
.gsub('{databaseId}', database_id)
|
|
458
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
459
459
|
|
|
460
460
|
api_params = {
|
|
461
461
|
queries: queries,
|
|
@@ -517,7 +517,7 @@ module Appwrite
|
|
|
517
517
|
end
|
|
518
518
|
|
|
519
519
|
api_path = '/documentsdb/{databaseId}/collections'
|
|
520
|
-
.gsub('{databaseId}', database_id)
|
|
520
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
521
521
|
|
|
522
522
|
api_params = {
|
|
523
523
|
collectionId: collection_id,
|
|
@@ -565,8 +565,8 @@ module Appwrite
|
|
|
565
565
|
end
|
|
566
566
|
|
|
567
567
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}'
|
|
568
|
-
.gsub('{databaseId}', database_id)
|
|
569
|
-
.gsub('{collectionId}', collection_id)
|
|
568
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
569
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
570
570
|
|
|
571
571
|
api_params = {}
|
|
572
572
|
|
|
@@ -619,8 +619,8 @@ module Appwrite
|
|
|
619
619
|
end
|
|
620
620
|
|
|
621
621
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}'
|
|
622
|
-
.gsub('{databaseId}', database_id)
|
|
623
|
-
.gsub('{collectionId}', collection_id)
|
|
622
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
623
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
624
624
|
|
|
625
625
|
api_params = {
|
|
626
626
|
name: name,
|
|
@@ -666,8 +666,8 @@ module Appwrite
|
|
|
666
666
|
end
|
|
667
667
|
|
|
668
668
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}'
|
|
669
|
-
.gsub('{databaseId}', database_id)
|
|
670
|
-
.gsub('{collectionId}', collection_id)
|
|
669
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
670
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
671
671
|
|
|
672
672
|
api_params = {}
|
|
673
673
|
|
|
@@ -713,8 +713,8 @@ module Appwrite
|
|
|
713
713
|
end
|
|
714
714
|
|
|
715
715
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
|
|
716
|
-
.gsub('{databaseId}', database_id)
|
|
717
|
-
.gsub('{collectionId}', collection_id)
|
|
716
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
717
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
718
718
|
|
|
719
719
|
api_params = {
|
|
720
720
|
queries: queries,
|
|
@@ -775,8 +775,8 @@ module Appwrite
|
|
|
775
775
|
end
|
|
776
776
|
|
|
777
777
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
|
|
778
|
-
.gsub('{databaseId}', database_id)
|
|
779
|
-
.gsub('{collectionId}', collection_id)
|
|
778
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
779
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
780
780
|
|
|
781
781
|
api_params = {
|
|
782
782
|
documentId: document_id,
|
|
@@ -830,8 +830,8 @@ module Appwrite
|
|
|
830
830
|
end
|
|
831
831
|
|
|
832
832
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
|
|
833
|
-
.gsub('{databaseId}', database_id)
|
|
834
|
-
.gsub('{collectionId}', collection_id)
|
|
833
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
834
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
835
835
|
|
|
836
836
|
api_params = {
|
|
837
837
|
documents: documents,
|
|
@@ -884,8 +884,8 @@ module Appwrite
|
|
|
884
884
|
end
|
|
885
885
|
|
|
886
886
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
|
|
887
|
-
.gsub('{databaseId}', database_id)
|
|
888
|
-
.gsub('{collectionId}', collection_id)
|
|
887
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
888
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
889
889
|
|
|
890
890
|
api_params = {
|
|
891
891
|
documents: documents,
|
|
@@ -934,8 +934,8 @@ module Appwrite
|
|
|
934
934
|
end
|
|
935
935
|
|
|
936
936
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
|
|
937
|
-
.gsub('{databaseId}', database_id)
|
|
938
|
-
.gsub('{collectionId}', collection_id)
|
|
937
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
938
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
939
939
|
|
|
940
940
|
api_params = {
|
|
941
941
|
data: data,
|
|
@@ -982,8 +982,8 @@ module Appwrite
|
|
|
982
982
|
end
|
|
983
983
|
|
|
984
984
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents'
|
|
985
|
-
.gsub('{databaseId}', database_id)
|
|
986
|
-
.gsub('{collectionId}', collection_id)
|
|
985
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
986
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
987
987
|
|
|
988
988
|
api_params = {
|
|
989
989
|
queries: queries,
|
|
@@ -1036,8 +1036,8 @@ module Appwrite
|
|
|
1036
1036
|
end
|
|
1037
1037
|
|
|
1038
1038
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/query'
|
|
1039
|
-
.gsub('{databaseId}', database_id)
|
|
1040
|
-
.gsub('{collectionId}', collection_id)
|
|
1039
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1040
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1041
1041
|
|
|
1042
1042
|
api_params = {
|
|
1043
1043
|
queries: queries,
|
|
@@ -1091,9 +1091,9 @@ module Appwrite
|
|
|
1091
1091
|
end
|
|
1092
1092
|
|
|
1093
1093
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
1094
|
-
.gsub('{databaseId}', database_id)
|
|
1095
|
-
.gsub('{collectionId}', collection_id)
|
|
1096
|
-
.gsub('{documentId}', document_id)
|
|
1094
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1095
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1096
|
+
.gsub('{documentId}', @client.encode_path(document_id))
|
|
1097
1097
|
|
|
1098
1098
|
api_params = {
|
|
1099
1099
|
queries: queries,
|
|
@@ -1148,9 +1148,9 @@ module Appwrite
|
|
|
1148
1148
|
end
|
|
1149
1149
|
|
|
1150
1150
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
1151
|
-
.gsub('{databaseId}', database_id)
|
|
1152
|
-
.gsub('{collectionId}', collection_id)
|
|
1153
|
-
.gsub('{documentId}', document_id)
|
|
1151
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1152
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1153
|
+
.gsub('{documentId}', @client.encode_path(document_id))
|
|
1154
1154
|
|
|
1155
1155
|
api_params = {
|
|
1156
1156
|
data: data,
|
|
@@ -1205,9 +1205,9 @@ module Appwrite
|
|
|
1205
1205
|
end
|
|
1206
1206
|
|
|
1207
1207
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
1208
|
-
.gsub('{databaseId}', database_id)
|
|
1209
|
-
.gsub('{collectionId}', collection_id)
|
|
1210
|
-
.gsub('{documentId}', document_id)
|
|
1208
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1209
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1210
|
+
.gsub('{documentId}', @client.encode_path(document_id))
|
|
1211
1211
|
|
|
1212
1212
|
api_params = {
|
|
1213
1213
|
data: data,
|
|
@@ -1257,9 +1257,9 @@ module Appwrite
|
|
|
1257
1257
|
end
|
|
1258
1258
|
|
|
1259
1259
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
1260
|
-
.gsub('{databaseId}', database_id)
|
|
1261
|
-
.gsub('{collectionId}', collection_id)
|
|
1262
|
-
.gsub('{documentId}', document_id)
|
|
1260
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1261
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1262
|
+
.gsub('{documentId}', @client.encode_path(document_id))
|
|
1263
1263
|
|
|
1264
1264
|
api_params = {
|
|
1265
1265
|
transactionId: transaction_id,
|
|
@@ -1316,10 +1316,10 @@ module Appwrite
|
|
|
1316
1316
|
end
|
|
1317
1317
|
|
|
1318
1318
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'
|
|
1319
|
-
.gsub('{databaseId}', database_id)
|
|
1320
|
-
.gsub('{collectionId}', collection_id)
|
|
1321
|
-
.gsub('{documentId}', document_id)
|
|
1322
|
-
.gsub('{attribute}', attribute)
|
|
1319
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1320
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1321
|
+
.gsub('{documentId}', @client.encode_path(document_id))
|
|
1322
|
+
.gsub('{attribute}', @client.encode_path(attribute))
|
|
1323
1323
|
|
|
1324
1324
|
api_params = {
|
|
1325
1325
|
value: value,
|
|
@@ -1379,10 +1379,10 @@ module Appwrite
|
|
|
1379
1379
|
end
|
|
1380
1380
|
|
|
1381
1381
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'
|
|
1382
|
-
.gsub('{databaseId}', database_id)
|
|
1383
|
-
.gsub('{collectionId}', collection_id)
|
|
1384
|
-
.gsub('{documentId}', document_id)
|
|
1385
|
-
.gsub('{attribute}', attribute)
|
|
1382
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1383
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1384
|
+
.gsub('{documentId}', @client.encode_path(document_id))
|
|
1385
|
+
.gsub('{attribute}', @client.encode_path(attribute))
|
|
1386
1386
|
|
|
1387
1387
|
api_params = {
|
|
1388
1388
|
value: value,
|
|
@@ -1428,8 +1428,8 @@ module Appwrite
|
|
|
1428
1428
|
end
|
|
1429
1429
|
|
|
1430
1430
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/indexes'
|
|
1431
|
-
.gsub('{databaseId}', database_id)
|
|
1432
|
-
.gsub('{collectionId}', collection_id)
|
|
1431
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1432
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1433
1433
|
|
|
1434
1434
|
api_params = {
|
|
1435
1435
|
queries: queries,
|
|
@@ -1495,8 +1495,8 @@ module Appwrite
|
|
|
1495
1495
|
end
|
|
1496
1496
|
|
|
1497
1497
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/indexes'
|
|
1498
|
-
.gsub('{databaseId}', database_id)
|
|
1499
|
-
.gsub('{collectionId}', collection_id)
|
|
1498
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1499
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1500
1500
|
|
|
1501
1501
|
api_params = {
|
|
1502
1502
|
key: key,
|
|
@@ -1547,9 +1547,9 @@ module Appwrite
|
|
|
1547
1547
|
end
|
|
1548
1548
|
|
|
1549
1549
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key}'
|
|
1550
|
-
.gsub('{databaseId}', database_id)
|
|
1551
|
-
.gsub('{collectionId}', collection_id)
|
|
1552
|
-
.gsub('{key}', key)
|
|
1550
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1551
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1552
|
+
.gsub('{key}', @client.encode_path(key))
|
|
1553
1553
|
|
|
1554
1554
|
api_params = {}
|
|
1555
1555
|
|
|
@@ -1592,9 +1592,9 @@ module Appwrite
|
|
|
1592
1592
|
end
|
|
1593
1593
|
|
|
1594
1594
|
api_path = '/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key}'
|
|
1595
|
-
.gsub('{databaseId}', database_id)
|
|
1596
|
-
.gsub('{collectionId}', collection_id)
|
|
1597
|
-
.gsub('{key}', key)
|
|
1595
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1596
|
+
.gsub('{collectionId}', @client.encode_path(collection_id))
|
|
1597
|
+
.gsub('{key}', @client.encode_path(key))
|
|
1598
1598
|
|
|
1599
1599
|
api_params = {}
|
|
1600
1600
|
|
|
@@ -1635,7 +1635,7 @@ module Appwrite
|
|
|
1635
1635
|
end
|
|
1636
1636
|
|
|
1637
1637
|
api_path = '/documentsdb/{databaseId}/failovers'
|
|
1638
|
-
.gsub('{databaseId}', database_id)
|
|
1638
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1639
1639
|
|
|
1640
1640
|
api_params = {
|
|
1641
1641
|
targetReplicaId: target_replica_id,
|
|
@@ -1678,7 +1678,7 @@ module Appwrite
|
|
|
1678
1678
|
end
|
|
1679
1679
|
|
|
1680
1680
|
api_path = '/documentsdb/{databaseId}/operations'
|
|
1681
|
-
.gsub('{databaseId}', database_id)
|
|
1681
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1682
1682
|
|
|
1683
1683
|
api_params = {
|
|
1684
1684
|
status: status,
|
|
@@ -1714,7 +1714,7 @@ module Appwrite
|
|
|
1714
1714
|
end
|
|
1715
1715
|
|
|
1716
1716
|
api_path = '/documentsdb/{databaseId}/replicas'
|
|
1717
|
-
.gsub('{databaseId}', database_id)
|
|
1717
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1718
1718
|
|
|
1719
1719
|
api_params = {}
|
|
1720
1720
|
|
|
@@ -1747,7 +1747,7 @@ module Appwrite
|
|
|
1747
1747
|
end
|
|
1748
1748
|
|
|
1749
1749
|
api_path = '/documentsdb/{databaseId}/status'
|
|
1750
|
-
.gsub('{databaseId}', database_id)
|
|
1750
|
+
.gsub('{databaseId}', @client.encode_path(database_id))
|
|
1751
1751
|
|
|
1752
1752
|
api_params = {}
|
|
1753
1753
|
|