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
@@ -67,7 +67,7 @@ module Appwrite
67
67
  # @param [Array] provider_paths List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
68
68
  # @param [String] build_specification Build specification for the function deployments.
69
69
  # @param [String] runtime_specification Runtime specification for the function executions.
70
- # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
70
+ # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 keeps all deployments unless the server applies a default retention.
71
71
  # @param [Integer] interval Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule.
72
72
  # @param [String] description Optional description for the function.
73
73
  #
@@ -226,7 +226,7 @@ module Appwrite
226
226
  end
227
227
 
228
228
  api_path = '/functions/{functionId}'
229
- .gsub('{functionId}', function_id)
229
+ .gsub('{functionId}', @client.encode_path(function_id))
230
230
 
231
231
  api_params = {}
232
232
 
@@ -267,7 +267,7 @@ module Appwrite
267
267
  # @param [Array] provider_paths List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
268
268
  # @param [String] build_specification Build specification for the function deployments.
269
269
  # @param [String] runtime_specification Runtime specification for the function executions.
270
- # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
270
+ # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 keeps all deployments unless the server applies a default retention.
271
271
  # @param [Integer] interval Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set.
272
272
  # @param [String] description Optional description for the function.
273
273
  # @param [] email_enabled Enable inbound email triggering for this function. When false or omitted on create, SMTP recipients are rejected. Opt-in; default is off.
@@ -309,7 +309,7 @@ module Appwrite
309
309
  end
310
310
 
311
311
  api_path = '/functions/{functionId}'
312
- .gsub('{functionId}', function_id)
312
+ .gsub('{functionId}', @client.encode_path(function_id))
313
313
 
314
314
  api_params = {
315
315
  name: name,
@@ -366,7 +366,7 @@ module Appwrite
366
366
  end
367
367
 
368
368
  api_path = '/functions/{functionId}'
369
- .gsub('{functionId}', function_id)
369
+ .gsub('{functionId}', @client.encode_path(function_id))
370
370
 
371
371
  api_params = {}
372
372
 
@@ -404,7 +404,7 @@ module Appwrite
404
404
  end
405
405
 
406
406
  api_path = '/functions/{functionId}/deployment'
407
- .gsub('{functionId}', function_id)
407
+ .gsub('{functionId}', @client.encode_path(function_id))
408
408
 
409
409
  api_params = {
410
410
  deploymentId: deployment_id,
@@ -445,7 +445,7 @@ module Appwrite
445
445
  end
446
446
 
447
447
  api_path = '/functions/{functionId}/deployments'
448
- .gsub('{functionId}', function_id)
448
+ .gsub('{functionId}', @client.encode_path(function_id))
449
449
 
450
450
  api_params = {
451
451
  queries: queries,
@@ -506,7 +506,7 @@ module Appwrite
506
506
  end
507
507
 
508
508
  api_path = '/functions/{functionId}/deployments'
509
- .gsub('{functionId}', function_id)
509
+ .gsub('{functionId}', @client.encode_path(function_id))
510
510
 
511
511
  api_params = {
512
512
  entrypoint: entrypoint,
@@ -561,7 +561,7 @@ module Appwrite
561
561
  end
562
562
 
563
563
  api_path = '/functions/{functionId}/deployments/duplicate'
564
- .gsub('{functionId}', function_id)
564
+ .gsub('{functionId}', @client.encode_path(function_id))
565
565
 
566
566
  api_params = {
567
567
  deploymentId: deployment_id,
@@ -632,7 +632,7 @@ module Appwrite
632
632
  end
633
633
 
634
634
  api_path = '/functions/{functionId}/deployments/template'
635
- .gsub('{functionId}', function_id)
635
+ .gsub('{functionId}', @client.encode_path(function_id))
636
636
 
637
637
  api_params = {
638
638
  repository: repository,
@@ -687,7 +687,7 @@ module Appwrite
687
687
  end
688
688
 
689
689
  api_path = '/functions/{functionId}/deployments/vcs'
690
- .gsub('{functionId}', function_id)
690
+ .gsub('{functionId}', @client.encode_path(function_id))
691
691
 
692
692
  api_params = {
693
693
  type: type,
@@ -729,8 +729,8 @@ module Appwrite
729
729
  end
730
730
 
731
731
  api_path = '/functions/{functionId}/deployments/{deploymentId}'
732
- .gsub('{functionId}', function_id)
733
- .gsub('{deploymentId}', deployment_id)
732
+ .gsub('{functionId}', @client.encode_path(function_id))
733
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
734
734
 
735
735
  api_params = {}
736
736
 
@@ -767,8 +767,8 @@ module Appwrite
767
767
  end
768
768
 
769
769
  api_path = '/functions/{functionId}/deployments/{deploymentId}'
770
- .gsub('{functionId}', function_id)
771
- .gsub('{deploymentId}', deployment_id)
770
+ .gsub('{functionId}', @client.encode_path(function_id))
771
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
772
772
 
773
773
  api_params = {}
774
774
 
@@ -811,8 +811,8 @@ module Appwrite
811
811
  end
812
812
 
813
813
  api_path = '/functions/{functionId}/deployments/{deploymentId}/download'
814
- .gsub('{functionId}', function_id)
815
- .gsub('{deploymentId}', deployment_id)
814
+ .gsub('{functionId}', @client.encode_path(function_id))
815
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
816
816
 
817
817
  api_params = {
818
818
  type: type,
@@ -855,8 +855,8 @@ module Appwrite
855
855
  end
856
856
 
857
857
  api_path = '/functions/{functionId}/deployments/{deploymentId}/status'
858
- .gsub('{functionId}', function_id)
859
- .gsub('{deploymentId}', deployment_id)
858
+ .gsub('{functionId}', @client.encode_path(function_id))
859
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
860
860
 
861
861
  api_params = {}
862
862
 
@@ -893,7 +893,7 @@ module Appwrite
893
893
  end
894
894
 
895
895
  api_path = '/functions/{functionId}/executions'
896
- .gsub('{functionId}', function_id)
896
+ .gsub('{functionId}', @client.encode_path(function_id))
897
897
 
898
898
  api_params = {
899
899
  queries: queries,
@@ -942,7 +942,7 @@ module Appwrite
942
942
  end
943
943
 
944
944
  api_path = '/functions/{functionId}/executions'
945
- .gsub('{functionId}', function_id)
945
+ .gsub('{functionId}', @client.encode_path(function_id))
946
946
 
947
947
  api_params = {
948
948
  body: body,
@@ -987,8 +987,8 @@ module Appwrite
987
987
  end
988
988
 
989
989
  api_path = '/functions/{functionId}/executions/{executionId}'
990
- .gsub('{functionId}', function_id)
991
- .gsub('{executionId}', execution_id)
990
+ .gsub('{functionId}', @client.encode_path(function_id))
991
+ .gsub('{executionId}', @client.encode_path(execution_id))
992
992
 
993
993
  api_params = {}
994
994
 
@@ -1025,8 +1025,8 @@ module Appwrite
1025
1025
  end
1026
1026
 
1027
1027
  api_path = '/functions/{functionId}/executions/{executionId}'
1028
- .gsub('{functionId}', function_id)
1029
- .gsub('{executionId}', execution_id)
1028
+ .gsub('{functionId}', @client.encode_path(function_id))
1029
+ .gsub('{executionId}', @client.encode_path(execution_id))
1030
1030
 
1031
1031
  api_params = {}
1032
1032
 
@@ -1061,7 +1061,7 @@ module Appwrite
1061
1061
  end
1062
1062
 
1063
1063
  api_path = '/functions/{functionId}/variables'
1064
- .gsub('{functionId}', function_id)
1064
+ .gsub('{functionId}', @client.encode_path(function_id))
1065
1065
 
1066
1066
  api_params = {
1067
1067
  queries: queries,
@@ -1118,7 +1118,7 @@ module Appwrite
1118
1118
  end
1119
1119
 
1120
1120
  api_path = '/functions/{functionId}/variables'
1121
- .gsub('{functionId}', function_id)
1121
+ .gsub('{functionId}', @client.encode_path(function_id))
1122
1122
 
1123
1123
  api_params = {
1124
1124
  variableId: variable_id,
@@ -1162,8 +1162,8 @@ module Appwrite
1162
1162
  end
1163
1163
 
1164
1164
  api_path = '/functions/{functionId}/variables/{variableId}'
1165
- .gsub('{functionId}', function_id)
1166
- .gsub('{variableId}', variable_id)
1165
+ .gsub('{functionId}', @client.encode_path(function_id))
1166
+ .gsub('{variableId}', @client.encode_path(variable_id))
1167
1167
 
1168
1168
  api_params = {}
1169
1169
 
@@ -1208,8 +1208,8 @@ module Appwrite
1208
1208
  end
1209
1209
 
1210
1210
  api_path = '/functions/{functionId}/variables/{variableId}'
1211
- .gsub('{functionId}', function_id)
1212
- .gsub('{variableId}', variable_id)
1211
+ .gsub('{functionId}', @client.encode_path(function_id))
1212
+ .gsub('{variableId}', @client.encode_path(variable_id))
1213
1213
 
1214
1214
  api_params = {
1215
1215
  key: key,
@@ -1252,8 +1252,8 @@ module Appwrite
1252
1252
  end
1253
1253
 
1254
1254
  api_path = '/functions/{functionId}/variables/{variableId}'
1255
- .gsub('{functionId}', function_id)
1256
- .gsub('{variableId}', variable_id)
1255
+ .gsub('{functionId}', @client.encode_path(function_id))
1256
+ .gsub('{variableId}', @client.encode_path(variable_id))
1257
1257
 
1258
1258
  api_params = {}
1259
1259
 
@@ -167,7 +167,7 @@ module Appwrite
167
167
  end
168
168
 
169
169
  api_path = '/messaging/messages/email/{messageId}'
170
- .gsub('{messageId}', message_id)
170
+ .gsub('{messageId}', @client.encode_path(message_id))
171
171
 
172
172
  api_params = {
173
173
  topics: topics,
@@ -345,7 +345,7 @@ module Appwrite
345
345
  end
346
346
 
347
347
  api_path = '/messaging/messages/push/{messageId}'
348
- .gsub('{messageId}', message_id)
348
+ .gsub('{messageId}', @client.encode_path(message_id))
349
349
 
350
350
  api_params = {
351
351
  topics: topics,
@@ -467,7 +467,7 @@ module Appwrite
467
467
  end
468
468
 
469
469
  api_path = '/messaging/messages/sms/{messageId}'
470
- .gsub('{messageId}', message_id)
470
+ .gsub('{messageId}', @client.encode_path(message_id))
471
471
 
472
472
  api_params = {
473
473
  topics: topics,
@@ -507,7 +507,7 @@ module Appwrite
507
507
  end
508
508
 
509
509
  api_path = '/messaging/messages/{messageId}'
510
- .gsub('{messageId}', message_id)
510
+ .gsub('{messageId}', @client.encode_path(message_id))
511
511
 
512
512
  api_params = {}
513
513
 
@@ -539,7 +539,7 @@ module Appwrite
539
539
  end
540
540
 
541
541
  api_path = '/messaging/messages/{messageId}'
542
- .gsub('{messageId}', message_id)
542
+ .gsub('{messageId}', @client.encode_path(message_id))
543
543
 
544
544
  api_params = {}
545
545
 
@@ -574,7 +574,7 @@ module Appwrite
574
574
  end
575
575
 
576
576
  api_path = '/messaging/messages/{messageId}/targets'
577
- .gsub('{messageId}', message_id)
577
+ .gsub('{messageId}', @client.encode_path(message_id))
578
578
 
579
579
  api_params = {
580
580
  queries: queries,
@@ -714,7 +714,7 @@ module Appwrite
714
714
  end
715
715
 
716
716
  api_path = '/messaging/providers/apns/{providerId}'
717
- .gsub('{providerId}', provider_id)
717
+ .gsub('{providerId}', @client.encode_path(provider_id))
718
718
 
719
719
  api_params = {
720
720
  name: name,
@@ -811,7 +811,7 @@ module Appwrite
811
811
  end
812
812
 
813
813
  api_path = '/messaging/providers/appwrite/{providerId}'
814
- .gsub('{providerId}', provider_id)
814
+ .gsub('{providerId}', @client.encode_path(provider_id))
815
815
 
816
816
  api_params = {
817
817
  name: name,
@@ -900,7 +900,7 @@ module Appwrite
900
900
  end
901
901
 
902
902
  api_path = '/messaging/providers/fcm/{providerId}'
903
- .gsub('{providerId}', provider_id)
903
+ .gsub('{providerId}', @client.encode_path(provider_id))
904
904
 
905
905
  api_params = {
906
906
  name: name,
@@ -1018,7 +1018,7 @@ module Appwrite
1018
1018
  end
1019
1019
 
1020
1020
  api_path = '/messaging/providers/mailgun/{providerId}'
1021
- .gsub('{providerId}', provider_id)
1021
+ .gsub('{providerId}', @client.encode_path(provider_id))
1022
1022
 
1023
1023
  api_params = {
1024
1024
  name: name,
@@ -1122,7 +1122,7 @@ module Appwrite
1122
1122
  end
1123
1123
 
1124
1124
  api_path = '/messaging/providers/msg91/{providerId}'
1125
- .gsub('{providerId}', provider_id)
1125
+ .gsub('{providerId}', @client.encode_path(provider_id))
1126
1126
 
1127
1127
  api_params = {
1128
1128
  name: name,
@@ -1232,7 +1232,7 @@ module Appwrite
1232
1232
  end
1233
1233
 
1234
1234
  api_path = '/messaging/providers/resend/{providerId}'
1235
- .gsub('{providerId}', provider_id)
1235
+ .gsub('{providerId}', @client.encode_path(provider_id))
1236
1236
 
1237
1237
  api_params = {
1238
1238
  name: name,
@@ -1344,7 +1344,7 @@ module Appwrite
1344
1344
  end
1345
1345
 
1346
1346
  api_path = '/messaging/providers/sendgrid/{providerId}'
1347
- .gsub('{providerId}', provider_id)
1347
+ .gsub('{providerId}', @client.encode_path(provider_id))
1348
1348
 
1349
1349
  api_params = {
1350
1350
  name: name,
@@ -1466,7 +1466,7 @@ module Appwrite
1466
1466
  end
1467
1467
 
1468
1468
  api_path = '/messaging/providers/ses/{providerId}'
1469
- .gsub('{providerId}', provider_id)
1469
+ .gsub('{providerId}', @client.encode_path(provider_id))
1470
1470
 
1471
1471
  api_params = {
1472
1472
  name: name,
@@ -1614,7 +1614,7 @@ module Appwrite
1614
1614
  end
1615
1615
 
1616
1616
  api_path = '/messaging/providers/smtp/{providerId}'
1617
- .gsub('{providerId}', provider_id)
1617
+ .gsub('{providerId}', @client.encode_path(provider_id))
1618
1618
 
1619
1619
  api_params = {
1620
1620
  name: name,
@@ -1722,7 +1722,7 @@ module Appwrite
1722
1722
  end
1723
1723
 
1724
1724
  api_path = '/messaging/providers/telesign/{providerId}'
1725
- .gsub('{providerId}', provider_id)
1725
+ .gsub('{providerId}', @client.encode_path(provider_id))
1726
1726
 
1727
1727
  api_params = {
1728
1728
  name: name,
@@ -1822,7 +1822,7 @@ module Appwrite
1822
1822
  end
1823
1823
 
1824
1824
  api_path = '/messaging/providers/textmagic/{providerId}'
1825
- .gsub('{providerId}', provider_id)
1825
+ .gsub('{providerId}', @client.encode_path(provider_id))
1826
1826
 
1827
1827
  api_params = {
1828
1828
  name: name,
@@ -1922,7 +1922,7 @@ module Appwrite
1922
1922
  end
1923
1923
 
1924
1924
  api_path = '/messaging/providers/twilio/{providerId}'
1925
- .gsub('{providerId}', provider_id)
1925
+ .gsub('{providerId}', @client.encode_path(provider_id))
1926
1926
 
1927
1927
  api_params = {
1928
1928
  name: name,
@@ -2022,7 +2022,7 @@ module Appwrite
2022
2022
  end
2023
2023
 
2024
2024
  api_path = '/messaging/providers/vonage/{providerId}'
2025
- .gsub('{providerId}', provider_id)
2025
+ .gsub('{providerId}', @client.encode_path(provider_id))
2026
2026
 
2027
2027
  api_params = {
2028
2028
  name: name,
@@ -2061,7 +2061,7 @@ module Appwrite
2061
2061
  end
2062
2062
 
2063
2063
  api_path = '/messaging/providers/{providerId}'
2064
- .gsub('{providerId}', provider_id)
2064
+ .gsub('{providerId}', @client.encode_path(provider_id))
2065
2065
 
2066
2066
  api_params = {}
2067
2067
 
@@ -2092,7 +2092,7 @@ module Appwrite
2092
2092
  end
2093
2093
 
2094
2094
  api_path = '/messaging/providers/{providerId}'
2095
- .gsub('{providerId}', provider_id)
2095
+ .gsub('{providerId}', @client.encode_path(provider_id))
2096
2096
 
2097
2097
  api_params = {}
2098
2098
 
@@ -2210,7 +2210,7 @@ module Appwrite
2210
2210
  end
2211
2211
 
2212
2212
  api_path = '/messaging/topics/{topicId}'
2213
- .gsub('{topicId}', topic_id)
2213
+ .gsub('{topicId}', @client.encode_path(topic_id))
2214
2214
 
2215
2215
  api_params = {}
2216
2216
 
@@ -2252,7 +2252,7 @@ module Appwrite
2252
2252
  end
2253
2253
 
2254
2254
  api_path = '/messaging/topics/{topicId}'
2255
- .gsub('{topicId}', topic_id)
2255
+ .gsub('{topicId}', @client.encode_path(topic_id))
2256
2256
 
2257
2257
  api_params = {
2258
2258
  name: name,
@@ -2290,7 +2290,7 @@ module Appwrite
2290
2290
  end
2291
2291
 
2292
2292
  api_path = '/messaging/topics/{topicId}'
2293
- .gsub('{topicId}', topic_id)
2293
+ .gsub('{topicId}', @client.encode_path(topic_id))
2294
2294
 
2295
2295
  api_params = {}
2296
2296
 
@@ -2327,7 +2327,7 @@ module Appwrite
2327
2327
  end
2328
2328
 
2329
2329
  api_path = '/messaging/topics/{topicId}/subscribers'
2330
- .gsub('{topicId}', topic_id)
2330
+ .gsub('{topicId}', @client.encode_path(topic_id))
2331
2331
 
2332
2332
  api_params = {
2333
2333
  queries: queries,
@@ -2374,7 +2374,7 @@ module Appwrite
2374
2374
  end
2375
2375
 
2376
2376
  api_path = '/messaging/topics/{topicId}/subscribers'
2377
- .gsub('{topicId}', topic_id)
2377
+ .gsub('{topicId}', @client.encode_path(topic_id))
2378
2378
 
2379
2379
  api_params = {
2380
2380
  subscriberId: subscriber_id,
@@ -2416,8 +2416,8 @@ module Appwrite
2416
2416
  end
2417
2417
 
2418
2418
  api_path = '/messaging/topics/{topicId}/subscribers/{subscriberId}'
2419
- .gsub('{topicId}', topic_id)
2420
- .gsub('{subscriberId}', subscriber_id)
2419
+ .gsub('{topicId}', @client.encode_path(topic_id))
2420
+ .gsub('{subscriberId}', @client.encode_path(subscriber_id))
2421
2421
 
2422
2422
  api_params = {}
2423
2423
 
@@ -2454,8 +2454,8 @@ module Appwrite
2454
2454
  end
2455
2455
 
2456
2456
  api_path = '/messaging/topics/{topicId}/subscribers/{subscriberId}'
2457
- .gsub('{topicId}', topic_id)
2458
- .gsub('{subscriberId}', subscriber_id)
2457
+ .gsub('{topicId}', @client.encode_path(topic_id))
2458
+ .gsub('{subscriberId}', @client.encode_path(subscriber_id))
2459
2459
 
2460
2460
  api_params = {}
2461
2461