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
@@ -131,7 +131,7 @@ module Appwrite
131
131
  end
132
132
 
133
133
  api_path = '/account/consents/{consentId}'
134
- .gsub('{consentId}', consent_id)
134
+ .gsub('{consentId}', @client.encode_path(consent_id))
135
135
 
136
136
  api_params = {}
137
137
 
@@ -164,7 +164,7 @@ module Appwrite
164
164
  end
165
165
 
166
166
  api_path = '/account/consents/{consentId}'
167
- .gsub('{consentId}', consent_id)
167
+ .gsub('{consentId}', @client.encode_path(consent_id))
168
168
 
169
169
  api_params = {}
170
170
 
@@ -201,7 +201,7 @@ module Appwrite
201
201
  end
202
202
 
203
203
  api_path = '/account/consents/{consentId}/tokens'
204
- .gsub('{consentId}', consent_id)
204
+ .gsub('{consentId}', @client.encode_path(consent_id))
205
205
 
206
206
  api_params = {
207
207
  queries: queries,
@@ -242,8 +242,8 @@ module Appwrite
242
242
  end
243
243
 
244
244
  api_path = '/account/consents/{consentId}/tokens/{tokenId}'
245
- .gsub('{consentId}', consent_id)
246
- .gsub('{tokenId}', token_id)
245
+ .gsub('{consentId}', @client.encode_path(consent_id))
246
+ .gsub('{tokenId}', @client.encode_path(token_id))
247
247
 
248
248
  api_params = {}
249
249
 
@@ -282,8 +282,8 @@ module Appwrite
282
282
  end
283
283
 
284
284
  api_path = '/account/consents/{consentId}/tokens/{tokenId}'
285
- .gsub('{consentId}', consent_id)
286
- .gsub('{tokenId}', token_id)
285
+ .gsub('{consentId}', @client.encode_path(consent_id))
286
+ .gsub('{tokenId}', @client.encode_path(token_id))
287
287
 
288
288
  api_params = {}
289
289
 
@@ -392,7 +392,7 @@ module Appwrite
392
392
  end
393
393
 
394
394
  api_path = '/account/identities/{identityId}'
395
- .gsub('{identityId}', identity_id)
395
+ .gsub('{identityId}', @client.encode_path(identity_id))
396
396
 
397
397
  api_params = {}
398
398
 
@@ -490,7 +490,7 @@ module Appwrite
490
490
  end
491
491
 
492
492
  api_path = '/account/mfa/authenticators/{type}'
493
- .gsub('{type}', type)
493
+ .gsub('{type}', @client.encode_path(type))
494
494
 
495
495
  api_params = {}
496
496
 
@@ -530,7 +530,7 @@ module Appwrite
530
530
  end
531
531
 
532
532
  api_path = '/account/mfa/authenticators/{type}'
533
- .gsub('{type}', type)
533
+ .gsub('{type}', @client.encode_path(type))
534
534
 
535
535
  api_params = {
536
536
  otp: otp,
@@ -564,7 +564,7 @@ module Appwrite
564
564
  end
565
565
 
566
566
  api_path = '/account/mfa/authenticators/{type}'
567
- .gsub('{type}', type)
567
+ .gsub('{type}', @client.encode_path(type))
568
568
 
569
569
  api_params = {}
570
570
 
@@ -882,7 +882,7 @@ module Appwrite
882
882
  end
883
883
 
884
884
  api_path = '/account/passkeys/{passkeyId}'
885
- .gsub('{passkeyId}', passkey_id)
885
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
886
886
 
887
887
  api_params = {}
888
888
 
@@ -919,7 +919,7 @@ module Appwrite
919
919
  end
920
920
 
921
921
  api_path = '/account/passkeys/{passkeyId}'
922
- .gsub('{passkeyId}', passkey_id)
922
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
923
923
 
924
924
  api_params = {
925
925
  name: name,
@@ -956,7 +956,7 @@ module Appwrite
956
956
  end
957
957
 
958
958
  api_path = '/account/passkeys/{passkeyId}'
959
- .gsub('{passkeyId}', passkey_id)
959
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
960
960
 
961
961
  api_params = {}
962
962
 
@@ -997,7 +997,7 @@ module Appwrite
997
997
  end
998
998
 
999
999
  api_path = '/account/passkeys/{passkeyId}/verification'
1000
- .gsub('{passkeyId}', passkey_id)
1000
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
1001
1001
 
1002
1002
  api_params = {
1003
1003
  credential: credential,
@@ -1759,7 +1759,7 @@ module Appwrite
1759
1759
  end
1760
1760
 
1761
1761
  api_path = '/account/sessions/{sessionId}'
1762
- .gsub('{sessionId}', session_id)
1762
+ .gsub('{sessionId}', @client.encode_path(session_id))
1763
1763
 
1764
1764
  api_params = {}
1765
1765
 
@@ -1792,7 +1792,7 @@ module Appwrite
1792
1792
  end
1793
1793
 
1794
1794
  api_path = '/account/sessions/{sessionId}'
1795
- .gsub('{sessionId}', session_id)
1795
+ .gsub('{sessionId}', @client.encode_path(session_id))
1796
1796
 
1797
1797
  api_params = {}
1798
1798
 
@@ -1828,7 +1828,7 @@ module Appwrite
1828
1828
  end
1829
1829
 
1830
1830
  api_path = '/account/sessions/{sessionId}'
1831
- .gsub('{sessionId}', session_id)
1831
+ .gsub('{sessionId}', @client.encode_path(session_id))
1832
1832
 
1833
1833
  api_params = {}
1834
1834
 
@@ -2025,7 +2025,7 @@ module Appwrite
2025
2025
  end
2026
2026
 
2027
2027
  api_path = '/account/tokens/oauth2/{provider}'
2028
- .gsub('{provider}', provider)
2028
+ .gsub('{provider}', @client.encode_path(provider))
2029
2029
 
2030
2030
  api_params = {
2031
2031
  success: success,
@@ -51,7 +51,7 @@ module Appwrite
51
51
  end
52
52
 
53
53
  api_path = '/activities/events/{eventId}'
54
- .gsub('{eventId}', event_id)
54
+ .gsub('{eventId}', @client.encode_path(event_id))
55
55
 
56
56
  api_params = {}
57
57
 
@@ -54,7 +54,7 @@ module Appwrite
54
54
  end
55
55
 
56
56
  api_path = '/reports/{reportId}'
57
- .gsub('{reportId}', report_id)
57
+ .gsub('{reportId}', @client.encode_path(report_id))
58
58
 
59
59
  api_params = {}
60
60
 
@@ -87,7 +87,7 @@ module Appwrite
87
87
  end
88
88
 
89
89
  api_path = '/reports/{reportId}'
90
- .gsub('{reportId}', report_id)
90
+ .gsub('{reportId}', @client.encode_path(report_id))
91
91
 
92
92
  api_params = {}
93
93
 
@@ -124,7 +124,7 @@ module Appwrite
124
124
  end
125
125
 
126
126
  api_path = '/reports/{reportId}/insights'
127
- .gsub('{reportId}', report_id)
127
+ .gsub('{reportId}', @client.encode_path(report_id))
128
128
 
129
129
  api_params = {
130
130
  queries: queries,
@@ -165,8 +165,8 @@ module Appwrite
165
165
  end
166
166
 
167
167
  api_path = '/reports/{reportId}/insights/{insightId}'
168
- .gsub('{reportId}', report_id)
169
- .gsub('{insightId}', insight_id)
168
+ .gsub('{reportId}', @client.encode_path(report_id))
169
+ .gsub('{insightId}', @client.encode_path(insight_id))
170
170
 
171
171
  api_params = {}
172
172
 
@@ -191,7 +191,7 @@ module Appwrite
191
191
  end
192
192
 
193
193
  api_path = '/apps/{appId}'
194
- .gsub('{appId}', app_id)
194
+ .gsub('{appId}', @client.encode_path(app_id))
195
195
 
196
196
  api_params = {}
197
197
 
@@ -264,7 +264,7 @@ module Appwrite
264
264
  end
265
265
 
266
266
  api_path = '/apps/{appId}'
267
- .gsub('{appId}', app_id)
267
+ .gsub('{appId}', @client.encode_path(app_id))
268
268
 
269
269
  api_params = {
270
270
  name: name,
@@ -316,7 +316,7 @@ module Appwrite
316
316
  end
317
317
 
318
318
  api_path = '/apps/{appId}'
319
- .gsub('{appId}', app_id)
319
+ .gsub('{appId}', @client.encode_path(app_id))
320
320
 
321
321
  api_params = {}
322
322
 
@@ -353,7 +353,7 @@ module Appwrite
353
353
  end
354
354
 
355
355
  api_path = '/apps/{appId}/installations'
356
- .gsub('{appId}', app_id)
356
+ .gsub('{appId}', @client.encode_path(app_id))
357
357
 
358
358
  api_params = {
359
359
  queries: queries,
@@ -395,8 +395,8 @@ module Appwrite
395
395
  end
396
396
 
397
397
  api_path = '/apps/{appId}/installations/{installationId}'
398
- .gsub('{appId}', app_id)
399
- .gsub('{installationId}', installation_id)
398
+ .gsub('{appId}', @client.encode_path(app_id))
399
+ .gsub('{installationId}', @client.encode_path(installation_id))
400
400
 
401
401
  api_params = {}
402
402
 
@@ -435,8 +435,8 @@ module Appwrite
435
435
  end
436
436
 
437
437
  api_path = '/apps/{appId}/installations/{installationId}'
438
- .gsub('{appId}', app_id)
439
- .gsub('{installationId}', installation_id)
438
+ .gsub('{appId}', @client.encode_path(app_id))
439
+ .gsub('{installationId}', @client.encode_path(installation_id))
440
440
 
441
441
  api_params = {}
442
442
 
@@ -480,8 +480,8 @@ module Appwrite
480
480
  end
481
481
 
482
482
  api_path = '/apps/{appId}/installations/{installationId}/tokens'
483
- .gsub('{appId}', app_id)
484
- .gsub('{installationId}', installation_id)
483
+ .gsub('{appId}', @client.encode_path(app_id))
484
+ .gsub('{installationId}', @client.encode_path(installation_id))
485
485
 
486
486
  api_params = {}
487
487
 
@@ -517,7 +517,7 @@ module Appwrite
517
517
  end
518
518
 
519
519
  api_path = '/apps/{appId}/keys'
520
- .gsub('{appId}', app_id)
520
+ .gsub('{appId}', @client.encode_path(app_id))
521
521
 
522
522
  api_params = {
523
523
  queries: queries,
@@ -553,7 +553,7 @@ module Appwrite
553
553
  end
554
554
 
555
555
  api_path = '/apps/{appId}/keys'
556
- .gsub('{appId}', app_id)
556
+ .gsub('{appId}', @client.encode_path(app_id))
557
557
 
558
558
  api_params = {}
559
559
 
@@ -591,8 +591,8 @@ module Appwrite
591
591
  end
592
592
 
593
593
  api_path = '/apps/{appId}/keys/{keyId}'
594
- .gsub('{appId}', app_id)
595
- .gsub('{keyId}', key_id)
594
+ .gsub('{appId}', @client.encode_path(app_id))
595
+ .gsub('{keyId}', @client.encode_path(key_id))
596
596
 
597
597
  api_params = {}
598
598
 
@@ -629,8 +629,8 @@ module Appwrite
629
629
  end
630
630
 
631
631
  api_path = '/apps/{appId}/keys/{keyId}'
632
- .gsub('{appId}', app_id)
633
- .gsub('{keyId}', key_id)
632
+ .gsub('{appId}', @client.encode_path(app_id))
633
+ .gsub('{keyId}', @client.encode_path(key_id))
634
634
 
635
635
  api_params = {}
636
636
 
@@ -669,7 +669,7 @@ module Appwrite
669
669
  end
670
670
 
671
671
  api_path = '/apps/{appId}/labels'
672
- .gsub('{appId}', app_id)
672
+ .gsub('{appId}', @client.encode_path(app_id))
673
673
 
674
674
  api_params = {
675
675
  labels: labels,
@@ -707,7 +707,7 @@ module Appwrite
707
707
  end
708
708
 
709
709
  api_path = '/apps/{appId}/secrets'
710
- .gsub('{appId}', app_id)
710
+ .gsub('{appId}', @client.encode_path(app_id))
711
711
 
712
712
  api_params = {
713
713
  queries: queries,
@@ -741,7 +741,7 @@ module Appwrite
741
741
  end
742
742
 
743
743
  api_path = '/apps/{appId}/secrets'
744
- .gsub('{appId}', app_id)
744
+ .gsub('{appId}', @client.encode_path(app_id))
745
745
 
746
746
  api_params = {}
747
747
 
@@ -779,8 +779,8 @@ module Appwrite
779
779
  end
780
780
 
781
781
  api_path = '/apps/{appId}/secrets/{secretId}'
782
- .gsub('{appId}', app_id)
783
- .gsub('{secretId}', secret_id)
782
+ .gsub('{appId}', @client.encode_path(app_id))
783
+ .gsub('{secretId}', @client.encode_path(secret_id))
784
784
 
785
785
  api_params = {}
786
786
 
@@ -817,8 +817,8 @@ module Appwrite
817
817
  end
818
818
 
819
819
  api_path = '/apps/{appId}/secrets/{secretId}'
820
- .gsub('{appId}', app_id)
821
- .gsub('{secretId}', secret_id)
820
+ .gsub('{appId}', @client.encode_path(app_id))
821
+ .gsub('{secretId}', @client.encode_path(secret_id))
822
822
 
823
823
  api_params = {}
824
824
 
@@ -855,7 +855,7 @@ module Appwrite
855
855
  end
856
856
 
857
857
  api_path = '/apps/{appId}/team'
858
- .gsub('{appId}', app_id)
858
+ .gsub('{appId}', @client.encode_path(app_id))
859
859
 
860
860
  api_params = {
861
861
  teamId: team_id,
@@ -889,7 +889,7 @@ module Appwrite
889
889
  end
890
890
 
891
891
  api_path = '/apps/{appId}/tokens'
892
- .gsub('{appId}', app_id)
892
+ .gsub('{appId}', @client.encode_path(app_id))
893
893
 
894
894
  api_params = {}
895
895
 
@@ -34,7 +34,7 @@ module Appwrite
34
34
  end
35
35
 
36
36
  api_path = '/avatars/browsers/{code}'
37
- .gsub('{code}', code)
37
+ .gsub('{code}', @client.encode_path(code))
38
38
 
39
39
  api_params = {
40
40
  width: width,
@@ -82,7 +82,7 @@ module Appwrite
82
82
  end
83
83
 
84
84
  api_path = '/avatars/credit-cards/{code}'
85
- .gsub('{code}', code)
85
+ .gsub('{code}', @client.encode_path(code))
86
86
 
87
87
  api_params = {
88
88
  width: width,
@@ -165,7 +165,7 @@ module Appwrite
165
165
  end
166
166
 
167
167
  api_path = '/avatars/flags/{code}'
168
- .gsub('{code}', code)
168
+ .gsub('{code}', @client.encode_path(code))
169
169
 
170
170
  api_params = {
171
171
  width: width,
@@ -86,7 +86,7 @@ module Appwrite
86
86
  end
87
87
 
88
88
  api_path = '/backups/archives/{archiveId}'
89
- .gsub('{archiveId}', archive_id)
89
+ .gsub('{archiveId}', @client.encode_path(archive_id))
90
90
 
91
91
  api_params = {}
92
92
 
@@ -117,7 +117,7 @@ module Appwrite
117
117
  end
118
118
 
119
119
  api_path = '/backups/archives/{archiveId}'
120
- .gsub('{archiveId}', archive_id)
120
+ .gsub('{archiveId}', @client.encode_path(archive_id))
121
121
 
122
122
  api_params = {}
123
123
 
@@ -242,7 +242,7 @@ module Appwrite
242
242
  end
243
243
 
244
244
  api_path = '/backups/policies/{policyId}'
245
- .gsub('{policyId}', policy_id)
245
+ .gsub('{policyId}', @client.encode_path(policy_id))
246
246
 
247
247
  api_params = {}
248
248
 
@@ -281,7 +281,7 @@ module Appwrite
281
281
  end
282
282
 
283
283
  api_path = '/backups/policies/{policyId}'
284
- .gsub('{policyId}', policy_id)
284
+ .gsub('{policyId}', @client.encode_path(policy_id))
285
285
 
286
286
  api_params = {
287
287
  name: name,
@@ -318,7 +318,7 @@ module Appwrite
318
318
  end
319
319
 
320
320
  api_path = '/backups/policies/{policyId}'
321
- .gsub('{policyId}', policy_id)
321
+ .gsub('{policyId}', @client.encode_path(policy_id))
322
322
 
323
323
  api_params = {}
324
324
 
@@ -457,7 +457,7 @@ module Appwrite
457
457
  end
458
458
 
459
459
  api_path = '/backups/restorations/{restorationId}'
460
- .gsub('{restorationId}', restoration_id)
460
+ .gsub('{restorationId}', @client.encode_path(restoration_id))
461
461
 
462
462
  api_params = {}
463
463