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
@@ -176,7 +176,7 @@ module Appwrite
176
176
  end
177
177
 
178
178
  api_path = '/databases/transactions/{transactionId}'
179
- .gsub('{transactionId}', transaction_id)
179
+ .gsub('{transactionId}', @client.encode_path(transaction_id))
180
180
 
181
181
  api_params = {}
182
182
 
@@ -214,7 +214,7 @@ module Appwrite
214
214
  end
215
215
 
216
216
  api_path = '/databases/transactions/{transactionId}'
217
- .gsub('{transactionId}', transaction_id)
217
+ .gsub('{transactionId}', @client.encode_path(transaction_id))
218
218
 
219
219
  api_params = {
220
220
  commit: commit,
@@ -252,7 +252,7 @@ module Appwrite
252
252
  end
253
253
 
254
254
  api_path = '/databases/transactions/{transactionId}'
255
- .gsub('{transactionId}', transaction_id)
255
+ .gsub('{transactionId}', @client.encode_path(transaction_id))
256
256
 
257
257
  api_params = {}
258
258
 
@@ -288,7 +288,7 @@ module Appwrite
288
288
  end
289
289
 
290
290
  api_path = '/databases/transactions/{transactionId}/operations'
291
- .gsub('{transactionId}', transaction_id)
291
+ .gsub('{transactionId}', @client.encode_path(transaction_id))
292
292
 
293
293
  api_params = {
294
294
  operations: operations,
@@ -326,7 +326,7 @@ module Appwrite
326
326
  end
327
327
 
328
328
  api_path = '/databases/{databaseId}'
329
- .gsub('{databaseId}', database_id)
329
+ .gsub('{databaseId}', @client.encode_path(database_id))
330
330
 
331
331
  api_params = {}
332
332
 
@@ -366,7 +366,7 @@ module Appwrite
366
366
  end
367
367
 
368
368
  api_path = '/databases/{databaseId}'
369
- .gsub('{databaseId}', database_id)
369
+ .gsub('{databaseId}', @client.encode_path(database_id))
370
370
 
371
371
  api_params = {
372
372
  name: name,
@@ -406,7 +406,7 @@ module Appwrite
406
406
  end
407
407
 
408
408
  api_path = '/databases/{databaseId}'
409
- .gsub('{databaseId}', database_id)
409
+ .gsub('{databaseId}', @client.encode_path(database_id))
410
410
 
411
411
  api_params = {}
412
412
 
@@ -447,7 +447,7 @@ module Appwrite
447
447
  end
448
448
 
449
449
  api_path = '/databases/{databaseId}/collections'
450
- .gsub('{databaseId}', database_id)
450
+ .gsub('{databaseId}', @client.encode_path(database_id))
451
451
 
452
452
  api_params = {
453
453
  queries: queries,
@@ -512,7 +512,7 @@ module Appwrite
512
512
  end
513
513
 
514
514
  api_path = '/databases/{databaseId}/collections'
515
- .gsub('{databaseId}', database_id)
515
+ .gsub('{databaseId}', @client.encode_path(database_id))
516
516
 
517
517
  api_params = {
518
518
  collectionId: collection_id,
@@ -563,8 +563,8 @@ module Appwrite
563
563
  end
564
564
 
565
565
  api_path = '/databases/{databaseId}/collections/{collectionId}'
566
- .gsub('{databaseId}', database_id)
567
- .gsub('{collectionId}', collection_id)
566
+ .gsub('{databaseId}', @client.encode_path(database_id))
567
+ .gsub('{collectionId}', @client.encode_path(collection_id))
568
568
 
569
569
  api_params = {}
570
570
 
@@ -616,8 +616,8 @@ module Appwrite
616
616
  end
617
617
 
618
618
  api_path = '/databases/{databaseId}/collections/{collectionId}'
619
- .gsub('{databaseId}', database_id)
620
- .gsub('{collectionId}', collection_id)
619
+ .gsub('{databaseId}', @client.encode_path(database_id))
620
+ .gsub('{collectionId}', @client.encode_path(collection_id))
621
621
 
622
622
  api_params = {
623
623
  name: name,
@@ -666,8 +666,8 @@ module Appwrite
666
666
  end
667
667
 
668
668
  api_path = '/databases/{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
 
@@ -711,8 +711,8 @@ module Appwrite
711
711
  end
712
712
 
713
713
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes'
714
- .gsub('{databaseId}', database_id)
715
- .gsub('{collectionId}', collection_id)
714
+ .gsub('{databaseId}', @client.encode_path(database_id))
715
+ .gsub('{collectionId}', @client.encode_path(collection_id))
716
716
 
717
717
  api_params = {
718
718
  queries: queries,
@@ -779,8 +779,8 @@ module Appwrite
779
779
  end
780
780
 
781
781
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint'
782
- .gsub('{databaseId}', database_id)
783
- .gsub('{collectionId}', collection_id)
782
+ .gsub('{databaseId}', @client.encode_path(database_id))
783
+ .gsub('{collectionId}', @client.encode_path(collection_id))
784
784
 
785
785
  api_params = {
786
786
  key: key,
@@ -857,9 +857,9 @@ module Appwrite
857
857
  end
858
858
 
859
859
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}'
860
- .gsub('{databaseId}', database_id)
861
- .gsub('{collectionId}', collection_id)
862
- .gsub('{key}', key)
860
+ .gsub('{databaseId}', @client.encode_path(database_id))
861
+ .gsub('{collectionId}', @client.encode_path(collection_id))
862
+ .gsub('{key}', @client.encode_path(key))
863
863
 
864
864
  api_params = {
865
865
  required: required,
@@ -926,8 +926,8 @@ module Appwrite
926
926
  end
927
927
 
928
928
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'
929
- .gsub('{databaseId}', database_id)
930
- .gsub('{collectionId}', collection_id)
929
+ .gsub('{databaseId}', @client.encode_path(database_id))
930
+ .gsub('{collectionId}', @client.encode_path(collection_id))
931
931
 
932
932
  api_params = {
933
933
  key: key,
@@ -997,9 +997,9 @@ module Appwrite
997
997
  end
998
998
 
999
999
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'
1000
- .gsub('{databaseId}', database_id)
1001
- .gsub('{collectionId}', collection_id)
1002
- .gsub('{key}', key)
1000
+ .gsub('{databaseId}', @client.encode_path(database_id))
1001
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1002
+ .gsub('{key}', @client.encode_path(key))
1003
1003
 
1004
1004
  api_params = {
1005
1005
  required: required,
@@ -1063,8 +1063,8 @@ module Appwrite
1063
1063
  end
1064
1064
 
1065
1065
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'
1066
- .gsub('{databaseId}', database_id)
1067
- .gsub('{collectionId}', collection_id)
1066
+ .gsub('{databaseId}', @client.encode_path(database_id))
1067
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1068
1068
 
1069
1069
  api_params = {
1070
1070
  key: key,
@@ -1134,9 +1134,9 @@ module Appwrite
1134
1134
  end
1135
1135
 
1136
1136
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'
1137
- .gsub('{databaseId}', database_id)
1138
- .gsub('{collectionId}', collection_id)
1139
- .gsub('{key}', key)
1137
+ .gsub('{databaseId}', @client.encode_path(database_id))
1138
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1139
+ .gsub('{key}', @client.encode_path(key))
1140
1140
 
1141
1141
  api_params = {
1142
1142
  required: required,
@@ -1201,8 +1201,8 @@ module Appwrite
1201
1201
  end
1202
1202
 
1203
1203
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email'
1204
- .gsub('{databaseId}', database_id)
1205
- .gsub('{collectionId}', collection_id)
1204
+ .gsub('{databaseId}', @client.encode_path(database_id))
1205
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1206
1206
 
1207
1207
  api_params = {
1208
1208
  key: key,
@@ -1273,9 +1273,9 @@ module Appwrite
1273
1273
  end
1274
1274
 
1275
1275
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'
1276
- .gsub('{databaseId}', database_id)
1277
- .gsub('{collectionId}', collection_id)
1278
- .gsub('{key}', key)
1276
+ .gsub('{databaseId}', @client.encode_path(database_id))
1277
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1278
+ .gsub('{key}', @client.encode_path(key))
1279
1279
 
1280
1280
  api_params = {
1281
1281
  required: required,
@@ -1347,8 +1347,8 @@ module Appwrite
1347
1347
  end
1348
1348
 
1349
1349
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'
1350
- .gsub('{databaseId}', database_id)
1351
- .gsub('{collectionId}', collection_id)
1350
+ .gsub('{databaseId}', @client.encode_path(database_id))
1351
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1352
1352
 
1353
1353
  api_params = {
1354
1354
  key: key,
@@ -1426,9 +1426,9 @@ module Appwrite
1426
1426
  end
1427
1427
 
1428
1428
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'
1429
- .gsub('{databaseId}', database_id)
1430
- .gsub('{collectionId}', collection_id)
1431
- .gsub('{key}', key)
1429
+ .gsub('{databaseId}', @client.encode_path(database_id))
1430
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1431
+ .gsub('{key}', @client.encode_path(key))
1432
1432
 
1433
1433
  api_params = {
1434
1434
  elements: elements,
@@ -1499,8 +1499,8 @@ module Appwrite
1499
1499
  end
1500
1500
 
1501
1501
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float'
1502
- .gsub('{databaseId}', database_id)
1503
- .gsub('{collectionId}', collection_id)
1502
+ .gsub('{databaseId}', @client.encode_path(database_id))
1503
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1504
1504
 
1505
1505
  api_params = {
1506
1506
  key: key,
@@ -1577,9 +1577,9 @@ module Appwrite
1577
1577
  end
1578
1578
 
1579
1579
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'
1580
- .gsub('{databaseId}', database_id)
1581
- .gsub('{collectionId}', collection_id)
1582
- .gsub('{key}', key)
1580
+ .gsub('{databaseId}', @client.encode_path(database_id))
1581
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1582
+ .gsub('{key}', @client.encode_path(key))
1583
1583
 
1584
1584
  api_params = {
1585
1585
  required: required,
@@ -1651,8 +1651,8 @@ module Appwrite
1651
1651
  end
1652
1652
 
1653
1653
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'
1654
- .gsub('{databaseId}', database_id)
1655
- .gsub('{collectionId}', collection_id)
1654
+ .gsub('{databaseId}', @client.encode_path(database_id))
1655
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1656
1656
 
1657
1657
  api_params = {
1658
1658
  key: key,
@@ -1729,9 +1729,9 @@ module Appwrite
1729
1729
  end
1730
1730
 
1731
1731
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'
1732
- .gsub('{databaseId}', database_id)
1733
- .gsub('{collectionId}', collection_id)
1734
- .gsub('{key}', key)
1732
+ .gsub('{databaseId}', @client.encode_path(database_id))
1733
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1734
+ .gsub('{key}', @client.encode_path(key))
1735
1735
 
1736
1736
  api_params = {
1737
1737
  required: required,
@@ -1798,8 +1798,8 @@ module Appwrite
1798
1798
  end
1799
1799
 
1800
1800
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'
1801
- .gsub('{databaseId}', database_id)
1802
- .gsub('{collectionId}', collection_id)
1801
+ .gsub('{databaseId}', @client.encode_path(database_id))
1802
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1803
1803
 
1804
1804
  api_params = {
1805
1805
  key: key,
@@ -1870,9 +1870,9 @@ module Appwrite
1870
1870
  end
1871
1871
 
1872
1872
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'
1873
- .gsub('{databaseId}', database_id)
1874
- .gsub('{collectionId}', collection_id)
1875
- .gsub('{key}', key)
1873
+ .gsub('{databaseId}', @client.encode_path(database_id))
1874
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1875
+ .gsub('{key}', @client.encode_path(key))
1876
1876
 
1877
1877
  api_params = {
1878
1878
  required: required,
@@ -1934,8 +1934,8 @@ module Appwrite
1934
1934
  end
1935
1935
 
1936
1936
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line'
1937
- .gsub('{databaseId}', database_id)
1938
- .gsub('{collectionId}', collection_id)
1937
+ .gsub('{databaseId}', @client.encode_path(database_id))
1938
+ .gsub('{collectionId}', @client.encode_path(collection_id))
1939
1939
 
1940
1940
  api_params = {
1941
1941
  key: key,
@@ -2000,9 +2000,9 @@ module Appwrite
2000
2000
  end
2001
2001
 
2002
2002
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'
2003
- .gsub('{databaseId}', database_id)
2004
- .gsub('{collectionId}', collection_id)
2005
- .gsub('{key}', key)
2003
+ .gsub('{databaseId}', @client.encode_path(database_id))
2004
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2005
+ .gsub('{key}', @client.encode_path(key))
2006
2006
 
2007
2007
  api_params = {
2008
2008
  required: required,
@@ -2069,8 +2069,8 @@ module Appwrite
2069
2069
  end
2070
2070
 
2071
2071
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'
2072
- .gsub('{databaseId}', database_id)
2073
- .gsub('{collectionId}', collection_id)
2072
+ .gsub('{databaseId}', @client.encode_path(database_id))
2073
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2074
2074
 
2075
2075
  api_params = {
2076
2076
  key: key,
@@ -2142,9 +2142,9 @@ module Appwrite
2142
2142
  end
2143
2143
 
2144
2144
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'
2145
- .gsub('{databaseId}', database_id)
2146
- .gsub('{collectionId}', collection_id)
2147
- .gsub('{key}', key)
2145
+ .gsub('{databaseId}', @client.encode_path(database_id))
2146
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2147
+ .gsub('{key}', @client.encode_path(key))
2148
2148
 
2149
2149
  api_params = {
2150
2150
  required: required,
@@ -2211,8 +2211,8 @@ module Appwrite
2211
2211
  end
2212
2212
 
2213
2213
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'
2214
- .gsub('{databaseId}', database_id)
2215
- .gsub('{collectionId}', collection_id)
2214
+ .gsub('{databaseId}', @client.encode_path(database_id))
2215
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2216
2216
 
2217
2217
  api_params = {
2218
2218
  key: key,
@@ -2284,9 +2284,9 @@ module Appwrite
2284
2284
  end
2285
2285
 
2286
2286
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'
2287
- .gsub('{databaseId}', database_id)
2288
- .gsub('{collectionId}', collection_id)
2289
- .gsub('{key}', key)
2287
+ .gsub('{databaseId}', @client.encode_path(database_id))
2288
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2289
+ .gsub('{key}', @client.encode_path(key))
2290
2290
 
2291
2291
  api_params = {
2292
2292
  required: required,
@@ -2348,8 +2348,8 @@ module Appwrite
2348
2348
  end
2349
2349
 
2350
2350
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point'
2351
- .gsub('{databaseId}', database_id)
2352
- .gsub('{collectionId}', collection_id)
2351
+ .gsub('{databaseId}', @client.encode_path(database_id))
2352
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2353
2353
 
2354
2354
  api_params = {
2355
2355
  key: key,
@@ -2414,9 +2414,9 @@ module Appwrite
2414
2414
  end
2415
2415
 
2416
2416
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'
2417
- .gsub('{databaseId}', database_id)
2418
- .gsub('{collectionId}', collection_id)
2419
- .gsub('{key}', key)
2417
+ .gsub('{databaseId}', @client.encode_path(database_id))
2418
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2419
+ .gsub('{key}', @client.encode_path(key))
2420
2420
 
2421
2421
  api_params = {
2422
2422
  required: required,
@@ -2478,8 +2478,8 @@ module Appwrite
2478
2478
  end
2479
2479
 
2480
2480
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'
2481
- .gsub('{databaseId}', database_id)
2482
- .gsub('{collectionId}', collection_id)
2481
+ .gsub('{databaseId}', @client.encode_path(database_id))
2482
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2483
2483
 
2484
2484
  api_params = {
2485
2485
  key: key,
@@ -2544,9 +2544,9 @@ module Appwrite
2544
2544
  end
2545
2545
 
2546
2546
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'
2547
- .gsub('{databaseId}', database_id)
2548
- .gsub('{collectionId}', collection_id)
2549
- .gsub('{key}', key)
2547
+ .gsub('{databaseId}', @client.encode_path(database_id))
2548
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2549
+ .gsub('{key}', @client.encode_path(key))
2550
2550
 
2551
2551
  api_params = {
2552
2552
  required: required,
@@ -2616,8 +2616,8 @@ module Appwrite
2616
2616
  end
2617
2617
 
2618
2618
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'
2619
- .gsub('{databaseId}', database_id)
2620
- .gsub('{collectionId}', collection_id)
2619
+ .gsub('{databaseId}', @client.encode_path(database_id))
2620
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2621
2621
 
2622
2622
  api_params = {
2623
2623
  relatedCollectionId: related_collection_id,
@@ -2680,9 +2680,9 @@ module Appwrite
2680
2680
  end
2681
2681
 
2682
2682
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'
2683
- .gsub('{databaseId}', database_id)
2684
- .gsub('{collectionId}', collection_id)
2685
- .gsub('{key}', key)
2683
+ .gsub('{databaseId}', @client.encode_path(database_id))
2684
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2685
+ .gsub('{key}', @client.encode_path(key))
2686
2686
 
2687
2687
  api_params = {
2688
2688
  onDelete: on_delete,
@@ -2754,8 +2754,8 @@ module Appwrite
2754
2754
  end
2755
2755
 
2756
2756
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string'
2757
- .gsub('{databaseId}', database_id)
2758
- .gsub('{collectionId}', collection_id)
2757
+ .gsub('{databaseId}', @client.encode_path(database_id))
2758
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2759
2759
 
2760
2760
  api_params = {
2761
2761
  key: key,
@@ -2830,9 +2830,9 @@ module Appwrite
2830
2830
  end
2831
2831
 
2832
2832
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'
2833
- .gsub('{databaseId}', database_id)
2834
- .gsub('{collectionId}', collection_id)
2835
- .gsub('{key}', key)
2833
+ .gsub('{databaseId}', @client.encode_path(database_id))
2834
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2835
+ .gsub('{key}', @client.encode_path(key))
2836
2836
 
2837
2837
  api_params = {
2838
2838
  required: required,
@@ -2900,8 +2900,8 @@ module Appwrite
2900
2900
  end
2901
2901
 
2902
2902
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text'
2903
- .gsub('{databaseId}', database_id)
2904
- .gsub('{collectionId}', collection_id)
2903
+ .gsub('{databaseId}', @client.encode_path(database_id))
2904
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2905
2905
 
2906
2906
  api_params = {
2907
2907
  key: key,
@@ -2973,9 +2973,9 @@ module Appwrite
2973
2973
  end
2974
2974
 
2975
2975
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'
2976
- .gsub('{databaseId}', database_id)
2977
- .gsub('{collectionId}', collection_id)
2978
- .gsub('{key}', key)
2976
+ .gsub('{databaseId}', @client.encode_path(database_id))
2977
+ .gsub('{collectionId}', @client.encode_path(collection_id))
2978
+ .gsub('{key}', @client.encode_path(key))
2979
2979
 
2980
2980
  api_params = {
2981
2981
  required: required,
@@ -3040,8 +3040,8 @@ module Appwrite
3040
3040
  end
3041
3041
 
3042
3042
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url'
3043
- .gsub('{databaseId}', database_id)
3044
- .gsub('{collectionId}', collection_id)
3043
+ .gsub('{databaseId}', @client.encode_path(database_id))
3044
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3045
3045
 
3046
3046
  api_params = {
3047
3047
  key: key,
@@ -3112,9 +3112,9 @@ module Appwrite
3112
3112
  end
3113
3113
 
3114
3114
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'
3115
- .gsub('{databaseId}', database_id)
3116
- .gsub('{collectionId}', collection_id)
3117
- .gsub('{key}', key)
3115
+ .gsub('{databaseId}', @client.encode_path(database_id))
3116
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3117
+ .gsub('{key}', @client.encode_path(key))
3118
3118
 
3119
3119
  api_params = {
3120
3120
  required: required,
@@ -3187,8 +3187,8 @@ module Appwrite
3187
3187
  end
3188
3188
 
3189
3189
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'
3190
- .gsub('{databaseId}', database_id)
3191
- .gsub('{collectionId}', collection_id)
3190
+ .gsub('{databaseId}', @client.encode_path(database_id))
3191
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3192
3192
 
3193
3193
  api_params = {
3194
3194
  key: key,
@@ -3263,9 +3263,9 @@ module Appwrite
3263
3263
  end
3264
3264
 
3265
3265
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'
3266
- .gsub('{databaseId}', database_id)
3267
- .gsub('{collectionId}', collection_id)
3268
- .gsub('{key}', key)
3266
+ .gsub('{databaseId}', @client.encode_path(database_id))
3267
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3268
+ .gsub('{key}', @client.encode_path(key))
3269
3269
 
3270
3270
  api_params = {
3271
3271
  required: required,
@@ -3318,9 +3318,9 @@ module Appwrite
3318
3318
  end
3319
3319
 
3320
3320
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'
3321
- .gsub('{databaseId}', database_id)
3322
- .gsub('{collectionId}', collection_id)
3323
- .gsub('{key}', key)
3321
+ .gsub('{databaseId}', @client.encode_path(database_id))
3322
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3323
+ .gsub('{key}', @client.encode_path(key))
3324
3324
 
3325
3325
  api_params = {}
3326
3326
 
@@ -3461,9 +3461,9 @@ module Appwrite
3461
3461
  end
3462
3462
 
3463
3463
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'
3464
- .gsub('{databaseId}', database_id)
3465
- .gsub('{collectionId}', collection_id)
3466
- .gsub('{key}', key)
3464
+ .gsub('{databaseId}', @client.encode_path(database_id))
3465
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3466
+ .gsub('{key}', @client.encode_path(key))
3467
3467
 
3468
3468
  api_params = {}
3469
3469
 
@@ -3521,8 +3521,8 @@ module Appwrite
3521
3521
  end
3522
3522
 
3523
3523
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
3524
- .gsub('{databaseId}', database_id)
3525
- .gsub('{collectionId}', collection_id)
3524
+ .gsub('{databaseId}', @client.encode_path(database_id))
3525
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3526
3526
 
3527
3527
  api_params = {
3528
3528
  queries: queries,
@@ -3586,8 +3586,8 @@ module Appwrite
3586
3586
  end
3587
3587
 
3588
3588
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
3589
- .gsub('{databaseId}', database_id)
3590
- .gsub('{collectionId}', collection_id)
3589
+ .gsub('{databaseId}', @client.encode_path(database_id))
3590
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3591
3591
 
3592
3592
  api_params = {
3593
3593
  documentId: document_id,
@@ -3644,8 +3644,8 @@ module Appwrite
3644
3644
  end
3645
3645
 
3646
3646
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
3647
- .gsub('{databaseId}', database_id)
3648
- .gsub('{collectionId}', collection_id)
3647
+ .gsub('{databaseId}', @client.encode_path(database_id))
3648
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3649
3649
 
3650
3650
  api_params = {
3651
3651
  documents: documents,
@@ -3701,8 +3701,8 @@ module Appwrite
3701
3701
  end
3702
3702
 
3703
3703
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
3704
- .gsub('{databaseId}', database_id)
3705
- .gsub('{collectionId}', collection_id)
3704
+ .gsub('{databaseId}', @client.encode_path(database_id))
3705
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3706
3706
 
3707
3707
  api_params = {
3708
3708
  documents: documents,
@@ -3754,8 +3754,8 @@ module Appwrite
3754
3754
  end
3755
3755
 
3756
3756
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
3757
- .gsub('{databaseId}', database_id)
3758
- .gsub('{collectionId}', collection_id)
3757
+ .gsub('{databaseId}', @client.encode_path(database_id))
3758
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3759
3759
 
3760
3760
  api_params = {
3761
3761
  data: data,
@@ -3805,8 +3805,8 @@ module Appwrite
3805
3805
  end
3806
3806
 
3807
3807
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
3808
- .gsub('{databaseId}', database_id)
3809
- .gsub('{collectionId}', collection_id)
3808
+ .gsub('{databaseId}', @client.encode_path(database_id))
3809
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3810
3810
 
3811
3811
  api_params = {
3812
3812
  queries: queries,
@@ -3862,8 +3862,8 @@ module Appwrite
3862
3862
  end
3863
3863
 
3864
3864
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/query'
3865
- .gsub('{databaseId}', database_id)
3866
- .gsub('{collectionId}', collection_id)
3865
+ .gsub('{databaseId}', @client.encode_path(database_id))
3866
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3867
3867
 
3868
3868
  api_params = {
3869
3869
  queries: queries,
@@ -3920,9 +3920,9 @@ module Appwrite
3920
3920
  end
3921
3921
 
3922
3922
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
3923
- .gsub('{databaseId}', database_id)
3924
- .gsub('{collectionId}', collection_id)
3925
- .gsub('{documentId}', document_id)
3923
+ .gsub('{databaseId}', @client.encode_path(database_id))
3924
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3925
+ .gsub('{documentId}', @client.encode_path(document_id))
3926
3926
 
3927
3927
  api_params = {
3928
3928
  queries: queries,
@@ -3980,9 +3980,9 @@ module Appwrite
3980
3980
  end
3981
3981
 
3982
3982
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
3983
- .gsub('{databaseId}', database_id)
3984
- .gsub('{collectionId}', collection_id)
3985
- .gsub('{documentId}', document_id)
3983
+ .gsub('{databaseId}', @client.encode_path(database_id))
3984
+ .gsub('{collectionId}', @client.encode_path(collection_id))
3985
+ .gsub('{documentId}', @client.encode_path(document_id))
3986
3986
 
3987
3987
  api_params = {
3988
3988
  data: data,
@@ -4040,9 +4040,9 @@ module Appwrite
4040
4040
  end
4041
4041
 
4042
4042
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
4043
- .gsub('{databaseId}', database_id)
4044
- .gsub('{collectionId}', collection_id)
4045
- .gsub('{documentId}', document_id)
4043
+ .gsub('{databaseId}', @client.encode_path(database_id))
4044
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4045
+ .gsub('{documentId}', @client.encode_path(document_id))
4046
4046
 
4047
4047
  api_params = {
4048
4048
  data: data,
@@ -4095,9 +4095,9 @@ module Appwrite
4095
4095
  end
4096
4096
 
4097
4097
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
4098
- .gsub('{databaseId}', database_id)
4099
- .gsub('{collectionId}', collection_id)
4100
- .gsub('{documentId}', document_id)
4098
+ .gsub('{databaseId}', @client.encode_path(database_id))
4099
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4100
+ .gsub('{documentId}', @client.encode_path(document_id))
4101
4101
 
4102
4102
  api_params = {
4103
4103
  transactionId: transaction_id,
@@ -4157,10 +4157,10 @@ module Appwrite
4157
4157
  end
4158
4158
 
4159
4159
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'
4160
- .gsub('{databaseId}', database_id)
4161
- .gsub('{collectionId}', collection_id)
4162
- .gsub('{documentId}', document_id)
4163
- .gsub('{attribute}', attribute)
4160
+ .gsub('{databaseId}', @client.encode_path(database_id))
4161
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4162
+ .gsub('{documentId}', @client.encode_path(document_id))
4163
+ .gsub('{attribute}', @client.encode_path(attribute))
4164
4164
 
4165
4165
  api_params = {
4166
4166
  value: value,
@@ -4223,10 +4223,10 @@ module Appwrite
4223
4223
  end
4224
4224
 
4225
4225
  api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'
4226
- .gsub('{databaseId}', database_id)
4227
- .gsub('{collectionId}', collection_id)
4228
- .gsub('{documentId}', document_id)
4229
- .gsub('{attribute}', attribute)
4226
+ .gsub('{databaseId}', @client.encode_path(database_id))
4227
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4228
+ .gsub('{documentId}', @client.encode_path(document_id))
4229
+ .gsub('{attribute}', @client.encode_path(attribute))
4230
4230
 
4231
4231
  api_params = {
4232
4232
  value: value,
@@ -4275,8 +4275,8 @@ module Appwrite
4275
4275
  end
4276
4276
 
4277
4277
  api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
4278
- .gsub('{databaseId}', database_id)
4279
- .gsub('{collectionId}', collection_id)
4278
+ .gsub('{databaseId}', @client.encode_path(database_id))
4279
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4280
4280
 
4281
4281
  api_params = {
4282
4282
  queries: queries,
@@ -4347,8 +4347,8 @@ module Appwrite
4347
4347
  end
4348
4348
 
4349
4349
  api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
4350
- .gsub('{databaseId}', database_id)
4351
- .gsub('{collectionId}', collection_id)
4350
+ .gsub('{databaseId}', @client.encode_path(database_id))
4351
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4352
4352
 
4353
4353
  api_params = {
4354
4354
  key: key,
@@ -4402,9 +4402,9 @@ module Appwrite
4402
4402
  end
4403
4403
 
4404
4404
  api_path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'
4405
- .gsub('{databaseId}', database_id)
4406
- .gsub('{collectionId}', collection_id)
4407
- .gsub('{key}', key)
4405
+ .gsub('{databaseId}', @client.encode_path(database_id))
4406
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4407
+ .gsub('{key}', @client.encode_path(key))
4408
4408
 
4409
4409
  api_params = {}
4410
4410
 
@@ -4450,9 +4450,9 @@ module Appwrite
4450
4450
  end
4451
4451
 
4452
4452
  api_path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'
4453
- .gsub('{databaseId}', database_id)
4454
- .gsub('{collectionId}', collection_id)
4455
- .gsub('{key}', key)
4453
+ .gsub('{databaseId}', @client.encode_path(database_id))
4454
+ .gsub('{collectionId}', @client.encode_path(collection_id))
4455
+ .gsub('{key}', @client.encode_path(key))
4456
4456
 
4457
4457
  api_params = {}
4458
4458