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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +44 -24
  3. data/lib/appwrite/enums/appwrite_migration_resource.rb +46 -0
  4. data/lib/appwrite/enums/build_runtime.rb +4 -0
  5. data/lib/appwrite/enums/environment_resource.rb +40 -0
  6. data/lib/appwrite/enums/firebase_migration_resource.rb +16 -0
  7. data/lib/appwrite/enums/n_host_migration_resource.rb +17 -0
  8. data/lib/appwrite/enums/on_duplicate.rb +9 -0
  9. data/lib/appwrite/enums/project_policy_id.rb +1 -0
  10. data/lib/appwrite/enums/runtime.rb +4 -0
  11. data/lib/appwrite/enums/supabase_migration_resource.rb +17 -0
  12. data/lib/appwrite/models/billing_plan.rb +15 -0
  13. data/lib/appwrite/models/migration.rb +128 -0
  14. data/lib/appwrite/models/migration_list.rb +33 -0
  15. data/lib/appwrite/models/policy_deny_realtime_guests.rb +33 -0
  16. data/lib/appwrite/services/account.rb +19 -19
  17. data/lib/appwrite/services/activities.rb +1 -1
  18. data/lib/appwrite/services/advisor.rb +5 -5
  19. data/lib/appwrite/services/apps.rb +25 -25
  20. data/lib/appwrite/services/avatars.rb +3 -3
  21. data/lib/appwrite/services/backups.rb +6 -6
  22. data/lib/appwrite/services/databases.rb +157 -157
  23. data/lib/appwrite/services/documents_db.rb +63 -63
  24. data/lib/appwrite/services/domains.rb +77 -77
  25. data/lib/appwrite/services/functions.rb +33 -33
  26. data/lib/appwrite/services/messaging.rb +30 -30
  27. data/lib/appwrite/services/migrations.rb +653 -0
  28. data/lib/appwrite/services/mongo.rb +37 -37
  29. data/lib/appwrite/services/mysql.rb +40 -40
  30. data/lib/appwrite/services/oauth2.rb +14 -14
  31. data/lib/appwrite/services/organization.rb +17 -17
  32. data/lib/appwrite/services/postgresql.rb +44 -44
  33. data/lib/appwrite/services/presences.rb +4 -4
  34. data/lib/appwrite/services/project.rb +105 -28
  35. data/lib/appwrite/services/proxy.rb +3 -3
  36. data/lib/appwrite/services/sites.rb +32 -32
  37. data/lib/appwrite/services/storage.rb +17 -17
  38. data/lib/appwrite/services/tables_db.rb +169 -169
  39. data/lib/appwrite/services/teams.rb +23 -23
  40. data/lib/appwrite/services/tokens.rb +7 -7
  41. data/lib/appwrite/services/users.rb +50 -50
  42. data/lib/appwrite/services/vectors_db.rb +55 -55
  43. data/lib/appwrite/services/waf.rb +57 -35
  44. data/lib/appwrite/services/webhooks.rb +4 -4
  45. data/lib/appwrite.rb +12 -0
  46. metadata +12 -2
@@ -153,7 +153,7 @@ module Appwrite
153
153
  end
154
154
 
155
155
  api_path = '/mongo/{databaseId}'
156
- .gsub('{databaseId}', database_id)
156
+ .gsub('{databaseId}', @client.encode_path(database_id))
157
157
 
158
158
  api_params = {}
159
159
 
@@ -227,7 +227,7 @@ module Appwrite
227
227
  end
228
228
 
229
229
  api_path = '/mongo/{databaseId}'
230
- .gsub('{databaseId}', database_id)
230
+ .gsub('{databaseId}', @client.encode_path(database_id))
231
231
 
232
232
  api_params = {
233
233
  name: name,
@@ -283,7 +283,7 @@ module Appwrite
283
283
  end
284
284
 
285
285
  api_path = '/mongo/{databaseId}'
286
- .gsub('{databaseId}', database_id)
286
+ .gsub('{databaseId}', @client.encode_path(database_id))
287
287
 
288
288
  api_params = {}
289
289
 
@@ -319,7 +319,7 @@ module Appwrite
319
319
  end
320
320
 
321
321
  api_path = '/mongo/{databaseId}/backups'
322
- .gsub('{databaseId}', database_id)
322
+ .gsub('{databaseId}', @client.encode_path(database_id))
323
323
 
324
324
  api_params = {
325
325
  queries: queries,
@@ -356,7 +356,7 @@ module Appwrite
356
356
  end
357
357
 
358
358
  api_path = '/mongo/{databaseId}/backups'
359
- .gsub('{databaseId}', database_id)
359
+ .gsub('{databaseId}', @client.encode_path(database_id))
360
360
 
361
361
  api_params = {
362
362
  type: type,
@@ -394,7 +394,7 @@ module Appwrite
394
394
  end
395
395
 
396
396
  api_path = '/mongo/{databaseId}/backups/policies'
397
- .gsub('{databaseId}', database_id)
397
+ .gsub('{databaseId}', @client.encode_path(database_id))
398
398
 
399
399
  api_params = {
400
400
  queries: queries,
@@ -456,7 +456,7 @@ module Appwrite
456
456
  end
457
457
 
458
458
  api_path = '/mongo/{databaseId}/backups/policies'
459
- .gsub('{databaseId}', database_id)
459
+ .gsub('{databaseId}', @client.encode_path(database_id))
460
460
 
461
461
  api_params = {
462
462
  policyId: policy_id,
@@ -501,8 +501,8 @@ module Appwrite
501
501
  end
502
502
 
503
503
  api_path = '/mongo/{databaseId}/backups/policies/{policyId}'
504
- .gsub('{databaseId}', database_id)
505
- .gsub('{policyId}', policy_id)
504
+ .gsub('{databaseId}', @client.encode_path(database_id))
505
+ .gsub('{policyId}', @client.encode_path(policy_id))
506
506
 
507
507
  api_params = {}
508
508
 
@@ -547,8 +547,8 @@ module Appwrite
547
547
  end
548
548
 
549
549
  api_path = '/mongo/{databaseId}/backups/policies/{policyId}'
550
- .gsub('{databaseId}', database_id)
551
- .gsub('{policyId}', policy_id)
550
+ .gsub('{databaseId}', @client.encode_path(database_id))
551
+ .gsub('{policyId}', @client.encode_path(policy_id))
552
552
 
553
553
  api_params = {
554
554
  name: name,
@@ -592,8 +592,8 @@ module Appwrite
592
592
  end
593
593
 
594
594
  api_path = '/mongo/{databaseId}/backups/policies/{policyId}'
595
- .gsub('{databaseId}', database_id)
596
- .gsub('{policyId}', policy_id)
595
+ .gsub('{databaseId}', @client.encode_path(database_id))
596
+ .gsub('{policyId}', @client.encode_path(policy_id))
597
597
 
598
598
  api_params = {}
599
599
 
@@ -656,7 +656,7 @@ module Appwrite
656
656
  end
657
657
 
658
658
  api_path = '/mongo/{databaseId}/backups/storage'
659
- .gsub('{databaseId}', database_id)
659
+ .gsub('{databaseId}', @client.encode_path(database_id))
660
660
 
661
661
  api_params = {
662
662
  provider: provider,
@@ -703,8 +703,8 @@ module Appwrite
703
703
  end
704
704
 
705
705
  api_path = '/mongo/{databaseId}/backups/{backupId}'
706
- .gsub('{databaseId}', database_id)
707
- .gsub('{backupId}', backup_id)
706
+ .gsub('{databaseId}', @client.encode_path(database_id))
707
+ .gsub('{backupId}', @client.encode_path(backup_id))
708
708
 
709
709
  api_params = {}
710
710
 
@@ -742,8 +742,8 @@ module Appwrite
742
742
  end
743
743
 
744
744
  api_path = '/mongo/{databaseId}/backups/{backupId}'
745
- .gsub('{databaseId}', database_id)
746
- .gsub('{backupId}', backup_id)
745
+ .gsub('{databaseId}', @client.encode_path(database_id))
746
+ .gsub('{backupId}', @client.encode_path(backup_id))
747
747
 
748
748
  api_params = {}
749
749
 
@@ -775,7 +775,7 @@ module Appwrite
775
775
  end
776
776
 
777
777
  api_path = '/mongo/{databaseId}/branches'
778
- .gsub('{databaseId}', database_id)
778
+ .gsub('{databaseId}', @client.encode_path(database_id))
779
779
 
780
780
  api_params = {}
781
781
 
@@ -814,7 +814,7 @@ module Appwrite
814
814
  end
815
815
 
816
816
  api_path = '/mongo/{databaseId}/branches'
817
- .gsub('{databaseId}', database_id)
817
+ .gsub('{databaseId}', @client.encode_path(database_id))
818
818
 
819
819
  api_params = {
820
820
  branchId: branch_id,
@@ -857,8 +857,8 @@ module Appwrite
857
857
  end
858
858
 
859
859
  api_path = '/mongo/{databaseId}/branches/{branchId}'
860
- .gsub('{databaseId}', database_id)
861
- .gsub('{branchId}', branch_id)
860
+ .gsub('{databaseId}', @client.encode_path(database_id))
861
+ .gsub('{branchId}', @client.encode_path(branch_id))
862
862
 
863
863
  api_params = {}
864
864
 
@@ -893,7 +893,7 @@ module Appwrite
893
893
  end
894
894
 
895
895
  api_path = '/mongo/{databaseId}/credentials'
896
- .gsub('{databaseId}', database_id)
896
+ .gsub('{databaseId}', @client.encode_path(database_id))
897
897
 
898
898
  api_params = {}
899
899
 
@@ -935,7 +935,7 @@ module Appwrite
935
935
  end
936
936
 
937
937
  api_path = '/mongo/{databaseId}/failovers'
938
- .gsub('{databaseId}', database_id)
938
+ .gsub('{databaseId}', @client.encode_path(database_id))
939
939
 
940
940
  api_params = {
941
941
  targetReplicaId: target_replica_id,
@@ -983,7 +983,7 @@ module Appwrite
983
983
  end
984
984
 
985
985
  api_path = '/mongo/{databaseId}/maintenance'
986
- .gsub('{databaseId}', database_id)
986
+ .gsub('{databaseId}', @client.encode_path(database_id))
987
987
 
988
988
  api_params = {
989
989
  day: day,
@@ -1029,7 +1029,7 @@ module Appwrite
1029
1029
  end
1030
1030
 
1031
1031
  api_path = '/mongo/{databaseId}/migrations'
1032
- .gsub('{databaseId}', database_id)
1032
+ .gsub('{databaseId}', @client.encode_path(database_id))
1033
1033
 
1034
1034
  api_params = {
1035
1035
  targetType: target_type,
@@ -1073,7 +1073,7 @@ module Appwrite
1073
1073
  end
1074
1074
 
1075
1075
  api_path = '/mongo/{databaseId}/operations'
1076
- .gsub('{databaseId}', database_id)
1076
+ .gsub('{databaseId}', @client.encode_path(database_id))
1077
1077
 
1078
1078
  api_params = {
1079
1079
  status: status,
@@ -1109,7 +1109,7 @@ module Appwrite
1109
1109
  end
1110
1110
 
1111
1111
  api_path = '/mongo/{databaseId}/pitr'
1112
- .gsub('{databaseId}', database_id)
1112
+ .gsub('{databaseId}', @client.encode_path(database_id))
1113
1113
 
1114
1114
  api_params = {}
1115
1115
 
@@ -1141,7 +1141,7 @@ module Appwrite
1141
1141
  end
1142
1142
 
1143
1143
  api_path = '/mongo/{databaseId}/replicas'
1144
- .gsub('{databaseId}', database_id)
1144
+ .gsub('{databaseId}', @client.encode_path(database_id))
1145
1145
 
1146
1146
  api_params = {}
1147
1147
 
@@ -1181,7 +1181,7 @@ module Appwrite
1181
1181
  end
1182
1182
 
1183
1183
  api_path = '/mongo/{databaseId}/restorations'
1184
- .gsub('{databaseId}', database_id)
1184
+ .gsub('{databaseId}', @client.encode_path(database_id))
1185
1185
 
1186
1186
  api_params = {
1187
1187
  status: status,
@@ -1245,7 +1245,7 @@ module Appwrite
1245
1245
  end
1246
1246
 
1247
1247
  api_path = '/mongo/{databaseId}/restorations'
1248
- .gsub('{databaseId}', database_id)
1248
+ .gsub('{databaseId}', @client.encode_path(database_id))
1249
1249
 
1250
1250
  api_params = {
1251
1251
  type: type,
@@ -1292,8 +1292,8 @@ module Appwrite
1292
1292
  end
1293
1293
 
1294
1294
  api_path = '/mongo/{databaseId}/restorations/{restorationId}'
1295
- .gsub('{databaseId}', database_id)
1296
- .gsub('{restorationId}', restoration_id)
1295
+ .gsub('{databaseId}', @client.encode_path(database_id))
1296
+ .gsub('{restorationId}', @client.encode_path(restoration_id))
1297
1297
 
1298
1298
  api_params = {}
1299
1299
 
@@ -1335,8 +1335,8 @@ module Appwrite
1335
1335
  end
1336
1336
 
1337
1337
  api_path = '/mongo/{databaseId}/restorations/{restorationId}/promotions'
1338
- .gsub('{databaseId}', database_id)
1339
- .gsub('{restorationId}', restoration_id)
1338
+ .gsub('{databaseId}', @client.encode_path(database_id))
1339
+ .gsub('{restorationId}', @client.encode_path(restoration_id))
1340
1340
 
1341
1341
  api_params = {}
1342
1342
 
@@ -1370,7 +1370,7 @@ module Appwrite
1370
1370
  end
1371
1371
 
1372
1372
  api_path = '/mongo/{databaseId}/status'
1373
- .gsub('{databaseId}', database_id)
1373
+ .gsub('{databaseId}', @client.encode_path(database_id))
1374
1374
 
1375
1375
  api_params = {}
1376
1376
 
@@ -1408,7 +1408,7 @@ module Appwrite
1408
1408
  end
1409
1409
 
1410
1410
  api_path = '/mongo/{databaseId}/upgrades'
1411
- .gsub('{databaseId}', database_id)
1411
+ .gsub('{databaseId}', @client.encode_path(database_id))
1412
1412
 
1413
1413
  api_params = {
1414
1414
  targetVersion: target_version,
@@ -153,7 +153,7 @@ module Appwrite
153
153
  end
154
154
 
155
155
  api_path = '/mysql/{databaseId}'
156
- .gsub('{databaseId}', database_id)
156
+ .gsub('{databaseId}', @client.encode_path(database_id))
157
157
 
158
158
  api_params = {}
159
159
 
@@ -227,7 +227,7 @@ module Appwrite
227
227
  end
228
228
 
229
229
  api_path = '/mysql/{databaseId}'
230
- .gsub('{databaseId}', database_id)
230
+ .gsub('{databaseId}', @client.encode_path(database_id))
231
231
 
232
232
  api_params = {
233
233
  name: name,
@@ -283,7 +283,7 @@ module Appwrite
283
283
  end
284
284
 
285
285
  api_path = '/mysql/{databaseId}'
286
- .gsub('{databaseId}', database_id)
286
+ .gsub('{databaseId}', @client.encode_path(database_id))
287
287
 
288
288
  api_params = {}
289
289
 
@@ -319,7 +319,7 @@ module Appwrite
319
319
  end
320
320
 
321
321
  api_path = '/mysql/{databaseId}/backups'
322
- .gsub('{databaseId}', database_id)
322
+ .gsub('{databaseId}', @client.encode_path(database_id))
323
323
 
324
324
  api_params = {
325
325
  queries: queries,
@@ -356,7 +356,7 @@ module Appwrite
356
356
  end
357
357
 
358
358
  api_path = '/mysql/{databaseId}/backups'
359
- .gsub('{databaseId}', database_id)
359
+ .gsub('{databaseId}', @client.encode_path(database_id))
360
360
 
361
361
  api_params = {
362
362
  type: type,
@@ -394,7 +394,7 @@ module Appwrite
394
394
  end
395
395
 
396
396
  api_path = '/mysql/{databaseId}/backups/policies'
397
- .gsub('{databaseId}', database_id)
397
+ .gsub('{databaseId}', @client.encode_path(database_id))
398
398
 
399
399
  api_params = {
400
400
  queries: queries,
@@ -456,7 +456,7 @@ module Appwrite
456
456
  end
457
457
 
458
458
  api_path = '/mysql/{databaseId}/backups/policies'
459
- .gsub('{databaseId}', database_id)
459
+ .gsub('{databaseId}', @client.encode_path(database_id))
460
460
 
461
461
  api_params = {
462
462
  policyId: policy_id,
@@ -501,8 +501,8 @@ module Appwrite
501
501
  end
502
502
 
503
503
  api_path = '/mysql/{databaseId}/backups/policies/{policyId}'
504
- .gsub('{databaseId}', database_id)
505
- .gsub('{policyId}', policy_id)
504
+ .gsub('{databaseId}', @client.encode_path(database_id))
505
+ .gsub('{policyId}', @client.encode_path(policy_id))
506
506
 
507
507
  api_params = {}
508
508
 
@@ -547,8 +547,8 @@ module Appwrite
547
547
  end
548
548
 
549
549
  api_path = '/mysql/{databaseId}/backups/policies/{policyId}'
550
- .gsub('{databaseId}', database_id)
551
- .gsub('{policyId}', policy_id)
550
+ .gsub('{databaseId}', @client.encode_path(database_id))
551
+ .gsub('{policyId}', @client.encode_path(policy_id))
552
552
 
553
553
  api_params = {
554
554
  name: name,
@@ -592,8 +592,8 @@ module Appwrite
592
592
  end
593
593
 
594
594
  api_path = '/mysql/{databaseId}/backups/policies/{policyId}'
595
- .gsub('{databaseId}', database_id)
596
- .gsub('{policyId}', policy_id)
595
+ .gsub('{databaseId}', @client.encode_path(database_id))
596
+ .gsub('{policyId}', @client.encode_path(policy_id))
597
597
 
598
598
  api_params = {}
599
599
 
@@ -656,7 +656,7 @@ module Appwrite
656
656
  end
657
657
 
658
658
  api_path = '/mysql/{databaseId}/backups/storage'
659
- .gsub('{databaseId}', database_id)
659
+ .gsub('{databaseId}', @client.encode_path(database_id))
660
660
 
661
661
  api_params = {
662
662
  provider: provider,
@@ -703,8 +703,8 @@ module Appwrite
703
703
  end
704
704
 
705
705
  api_path = '/mysql/{databaseId}/backups/{backupId}'
706
- .gsub('{databaseId}', database_id)
707
- .gsub('{backupId}', backup_id)
706
+ .gsub('{databaseId}', @client.encode_path(database_id))
707
+ .gsub('{backupId}', @client.encode_path(backup_id))
708
708
 
709
709
  api_params = {}
710
710
 
@@ -742,8 +742,8 @@ module Appwrite
742
742
  end
743
743
 
744
744
  api_path = '/mysql/{databaseId}/backups/{backupId}'
745
- .gsub('{databaseId}', database_id)
746
- .gsub('{backupId}', backup_id)
745
+ .gsub('{databaseId}', @client.encode_path(database_id))
746
+ .gsub('{backupId}', @client.encode_path(backup_id))
747
747
 
748
748
  api_params = {}
749
749
 
@@ -775,7 +775,7 @@ module Appwrite
775
775
  end
776
776
 
777
777
  api_path = '/mysql/{databaseId}/branches'
778
- .gsub('{databaseId}', database_id)
778
+ .gsub('{databaseId}', @client.encode_path(database_id))
779
779
 
780
780
  api_params = {}
781
781
 
@@ -814,7 +814,7 @@ module Appwrite
814
814
  end
815
815
 
816
816
  api_path = '/mysql/{databaseId}/branches'
817
- .gsub('{databaseId}', database_id)
817
+ .gsub('{databaseId}', @client.encode_path(database_id))
818
818
 
819
819
  api_params = {
820
820
  branchId: branch_id,
@@ -857,8 +857,8 @@ module Appwrite
857
857
  end
858
858
 
859
859
  api_path = '/mysql/{databaseId}/branches/{branchId}'
860
- .gsub('{databaseId}', database_id)
861
- .gsub('{branchId}', branch_id)
860
+ .gsub('{databaseId}', @client.encode_path(database_id))
861
+ .gsub('{branchId}', @client.encode_path(branch_id))
862
862
 
863
863
  api_params = {}
864
864
 
@@ -893,7 +893,7 @@ module Appwrite
893
893
  end
894
894
 
895
895
  api_path = '/mysql/{databaseId}/credentials'
896
- .gsub('{databaseId}', database_id)
896
+ .gsub('{databaseId}', @client.encode_path(database_id))
897
897
 
898
898
  api_params = {}
899
899
 
@@ -947,7 +947,7 @@ module Appwrite
947
947
  end
948
948
 
949
949
  api_path = '/mysql/{databaseId}/executions'
950
- .gsub('{databaseId}', database_id)
950
+ .gsub('{databaseId}', @client.encode_path(database_id))
951
951
 
952
952
  api_params = {
953
953
  sql: sql,
@@ -993,7 +993,7 @@ module Appwrite
993
993
  end
994
994
 
995
995
  api_path = '/mysql/{databaseId}/failovers'
996
- .gsub('{databaseId}', database_id)
996
+ .gsub('{databaseId}', @client.encode_path(database_id))
997
997
 
998
998
  api_params = {
999
999
  targetReplicaId: target_replica_id,
@@ -1041,7 +1041,7 @@ module Appwrite
1041
1041
  end
1042
1042
 
1043
1043
  api_path = '/mysql/{databaseId}/maintenance'
1044
- .gsub('{databaseId}', database_id)
1044
+ .gsub('{databaseId}', @client.encode_path(database_id))
1045
1045
 
1046
1046
  api_params = {
1047
1047
  day: day,
@@ -1087,7 +1087,7 @@ module Appwrite
1087
1087
  end
1088
1088
 
1089
1089
  api_path = '/mysql/{databaseId}/migrations'
1090
- .gsub('{databaseId}', database_id)
1090
+ .gsub('{databaseId}', @client.encode_path(database_id))
1091
1091
 
1092
1092
  api_params = {
1093
1093
  targetType: target_type,
@@ -1131,7 +1131,7 @@ module Appwrite
1131
1131
  end
1132
1132
 
1133
1133
  api_path = '/mysql/{databaseId}/operations'
1134
- .gsub('{databaseId}', database_id)
1134
+ .gsub('{databaseId}', @client.encode_path(database_id))
1135
1135
 
1136
1136
  api_params = {
1137
1137
  status: status,
@@ -1167,7 +1167,7 @@ module Appwrite
1167
1167
  end
1168
1168
 
1169
1169
  api_path = '/mysql/{databaseId}/pitr'
1170
- .gsub('{databaseId}', database_id)
1170
+ .gsub('{databaseId}', @client.encode_path(database_id))
1171
1171
 
1172
1172
  api_params = {}
1173
1173
 
@@ -1199,7 +1199,7 @@ module Appwrite
1199
1199
  end
1200
1200
 
1201
1201
  api_path = '/mysql/{databaseId}/pooler'
1202
- .gsub('{databaseId}', database_id)
1202
+ .gsub('{databaseId}', @client.encode_path(database_id))
1203
1203
 
1204
1204
  api_params = {}
1205
1205
 
@@ -1247,7 +1247,7 @@ module Appwrite
1247
1247
  end
1248
1248
 
1249
1249
  api_path = '/mysql/{databaseId}/pooler'
1250
- .gsub('{databaseId}', database_id)
1250
+ .gsub('{databaseId}', @client.encode_path(database_id))
1251
1251
 
1252
1252
  api_params = {
1253
1253
  mode: mode,
@@ -1289,7 +1289,7 @@ module Appwrite
1289
1289
  end
1290
1290
 
1291
1291
  api_path = '/mysql/{databaseId}/replicas'
1292
- .gsub('{databaseId}', database_id)
1292
+ .gsub('{databaseId}', @client.encode_path(database_id))
1293
1293
 
1294
1294
  api_params = {}
1295
1295
 
@@ -1329,7 +1329,7 @@ module Appwrite
1329
1329
  end
1330
1330
 
1331
1331
  api_path = '/mysql/{databaseId}/restorations'
1332
- .gsub('{databaseId}', database_id)
1332
+ .gsub('{databaseId}', @client.encode_path(database_id))
1333
1333
 
1334
1334
  api_params = {
1335
1335
  status: status,
@@ -1393,7 +1393,7 @@ module Appwrite
1393
1393
  end
1394
1394
 
1395
1395
  api_path = '/mysql/{databaseId}/restorations'
1396
- .gsub('{databaseId}', database_id)
1396
+ .gsub('{databaseId}', @client.encode_path(database_id))
1397
1397
 
1398
1398
  api_params = {
1399
1399
  type: type,
@@ -1440,8 +1440,8 @@ module Appwrite
1440
1440
  end
1441
1441
 
1442
1442
  api_path = '/mysql/{databaseId}/restorations/{restorationId}'
1443
- .gsub('{databaseId}', database_id)
1444
- .gsub('{restorationId}', restoration_id)
1443
+ .gsub('{databaseId}', @client.encode_path(database_id))
1444
+ .gsub('{restorationId}', @client.encode_path(restoration_id))
1445
1445
 
1446
1446
  api_params = {}
1447
1447
 
@@ -1483,8 +1483,8 @@ module Appwrite
1483
1483
  end
1484
1484
 
1485
1485
  api_path = '/mysql/{databaseId}/restorations/{restorationId}/promotions'
1486
- .gsub('{databaseId}', database_id)
1487
- .gsub('{restorationId}', restoration_id)
1486
+ .gsub('{databaseId}', @client.encode_path(database_id))
1487
+ .gsub('{restorationId}', @client.encode_path(restoration_id))
1488
1488
 
1489
1489
  api_params = {}
1490
1490
 
@@ -1518,7 +1518,7 @@ module Appwrite
1518
1518
  end
1519
1519
 
1520
1520
  api_path = '/mysql/{databaseId}/status'
1521
- .gsub('{databaseId}', database_id)
1521
+ .gsub('{databaseId}', @client.encode_path(database_id))
1522
1522
 
1523
1523
  api_params = {}
1524
1524
 
@@ -1556,7 +1556,7 @@ module Appwrite
1556
1556
  end
1557
1557
 
1558
1558
  api_path = '/mysql/{databaseId}/upgrades'
1559
- .gsub('{databaseId}', database_id)
1559
+ .gsub('{databaseId}', @client.encode_path(database_id))
1560
1560
 
1561
1561
  api_params = {
1562
1562
  targetVersion: target_version,
@@ -27,7 +27,7 @@ module Appwrite
27
27
  end
28
28
 
29
29
  api_path = '/oauth2/{project_id}/approve'
30
- .gsub('{project_id}', @client.get_config('project'))
30
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
31
31
 
32
32
  api_params = {
33
33
  grant_id: grant_id,
@@ -88,7 +88,7 @@ module Appwrite
88
88
  request_uri: nil
89
89
  )
90
90
  api_path = '/oauth2/{project_id}/authorize'
91
- .gsub('{project_id}', @client.get_config('project'))
91
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
92
92
 
93
93
  api_params = {
94
94
  client_id: client_id,
@@ -159,7 +159,7 @@ module Appwrite
159
159
  request_uri: nil
160
160
  )
161
161
  api_path = '/oauth2/{project_id}/authorize'
162
- .gsub('{project_id}', @client.get_config('project'))
162
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
163
163
 
164
164
  api_params = {
165
165
  client_id: client_id,
@@ -210,7 +210,7 @@ module Appwrite
210
210
  audience: nil
211
211
  )
212
212
  api_path = '/oauth2/{project_id}/device_authorization'
213
- .gsub('{project_id}', @client.get_config('project'))
213
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
214
214
 
215
215
  api_params = {
216
216
  client_id: client_id,
@@ -250,7 +250,7 @@ module Appwrite
250
250
  end
251
251
 
252
252
  api_path = '/oauth2/{project_id}/grants'
253
- .gsub('{project_id}', @client.get_config('project'))
253
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
254
254
 
255
255
  api_params = {
256
256
  user_code: user_code,
@@ -285,8 +285,8 @@ module Appwrite
285
285
  end
286
286
 
287
287
  api_path = '/oauth2/{project_id}/grants/{grant_id}'
288
- .gsub('{project_id}', @client.get_config('project'))
289
- .gsub('{grant_id}', grant_id)
288
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
289
+ .gsub('{grant_id}', @client.encode_path(grant_id))
290
290
 
291
291
  api_params = {}
292
292
 
@@ -325,7 +325,7 @@ module Appwrite
325
325
  end
326
326
 
327
327
  api_path = '/oauth2/{project_id}/introspect'
328
- .gsub('{project_id}', @client.get_config('project'))
328
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
329
329
 
330
330
  api_params = {
331
331
  token: token,
@@ -363,7 +363,7 @@ module Appwrite
363
363
  search: nil
364
364
  )
365
365
  api_path = '/oauth2/{project_id}/organizations'
366
- .gsub('{project_id}', @client.get_config('project'))
366
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
367
367
 
368
368
  api_params = {
369
369
  limit: limit,
@@ -430,7 +430,7 @@ module Appwrite
430
430
  end
431
431
 
432
432
  api_path = '/oauth2/{project_id}/par'
433
- .gsub('{project_id}', @client.get_config('project'))
433
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
434
434
 
435
435
  api_params = {
436
436
  client_id: client_id,
@@ -477,7 +477,7 @@ module Appwrite
477
477
  search: nil
478
478
  )
479
479
  api_path = '/oauth2/{project_id}/projects'
480
- .gsub('{project_id}', @client.get_config('project'))
480
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
481
481
 
482
482
  api_params = {
483
483
  limit: limit,
@@ -514,7 +514,7 @@ module Appwrite
514
514
  end
515
515
 
516
516
  api_path = '/oauth2/{project_id}/reject'
517
- .gsub('{project_id}', @client.get_config('project'))
517
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
518
518
 
519
519
  api_params = {
520
520
  grant_id: grant_id,
@@ -553,7 +553,7 @@ module Appwrite
553
553
  end
554
554
 
555
555
  api_path = '/oauth2/{project_id}/revoke'
556
- .gsub('{project_id}', @client.get_config('project'))
556
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
557
557
 
558
558
  api_params = {
559
559
  token: token,
@@ -607,7 +607,7 @@ module Appwrite
607
607
  end
608
608
 
609
609
  api_path = '/oauth2/{project_id}/token'
610
- .gsub('{project_id}', @client.get_config('project'))
610
+ .gsub('{project_id}', @client.encode_path(@client.get_config('project')))
611
611
 
612
612
  api_params = {
613
613
  grant_type: grant_type,