appwrite 30.3.0 → 30.5.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +1 -1
  3. data/lib/appwrite/enums/alert_comparator.rb +10 -0
  4. data/lib/appwrite/enums/alert_metric.rb +36 -0
  5. data/lib/appwrite/enums/alert_status.rb +8 -0
  6. data/lib/appwrite/enums/monitor_method.rb +13 -0
  7. data/lib/appwrite/enums/monitor_record.rb +12 -0
  8. data/lib/appwrite/enums/monitor_resource_type.rb +13 -0
  9. data/lib/appwrite/enums/monitor_result.rb +19 -0
  10. data/lib/appwrite/enums/monitor_severity.rb +10 -0
  11. data/lib/appwrite/enums/monitor_status.rb +8 -0
  12. data/lib/appwrite/enums/monitor_tls_mode.rb +10 -0
  13. data/lib/appwrite/enums/monitor_type.rb +12 -0
  14. data/lib/appwrite/enums/o_auth_provider.rb +13 -0
  15. data/lib/appwrite/enums/project_o_auth_provider_id.rb +13 -0
  16. data/lib/appwrite/models/alert.rb +308 -0
  17. data/lib/appwrite/models/alert_list.rb +33 -0
  18. data/lib/appwrite/models/escalation.rb +53 -0
  19. data/lib/appwrite/models/escalation_list.rb +33 -0
  20. data/lib/appwrite/models/escalation_step.rb +38 -0
  21. data/lib/appwrite/models/monitor.rb +342 -0
  22. data/lib/appwrite/models/monitor_list.rb +33 -0
  23. data/lib/appwrite/models/o_auth2_atlassian.rb +43 -0
  24. data/lib/appwrite/models/o_auth2_instagram.rb +43 -0
  25. data/lib/appwrite/models/o_auth2_line.rb +43 -0
  26. data/lib/appwrite/models/o_auth2_linear.rb +43 -0
  27. data/lib/appwrite/models/o_auth2_netlify.rb +43 -0
  28. data/lib/appwrite/models/o_auth2_patreon.rb +43 -0
  29. data/lib/appwrite/models/o_auth2_railway.rb +43 -0
  30. data/lib/appwrite/models/o_auth2_reddit.rb +43 -0
  31. data/lib/appwrite/models/o_auth2_roblox.rb +43 -0
  32. data/lib/appwrite/models/o_auth2_strava.rb +43 -0
  33. data/lib/appwrite/models/o_auth2_vercel.rb +43 -0
  34. data/lib/appwrite/models/o_auth2_vk.rb +43 -0
  35. data/lib/appwrite/models/o_auth2_work_os.rb +43 -0
  36. data/lib/appwrite/services/account.rb +1 -1
  37. data/lib/appwrite/services/alerts.rb +118 -0
  38. data/lib/appwrite/services/messaging.rb +208 -0
  39. data/lib/appwrite/services/monitors.rb +862 -0
  40. data/lib/appwrite/services/organization.rb +197 -0
  41. data/lib/appwrite/services/project.rb +521 -1
  42. data/lib/appwrite.rb +33 -0
  43. metadata +35 -2
@@ -835,6 +835,214 @@ module Appwrite
835
835
  )
836
836
  end
837
837
 
838
+ # Create a new Bird email provider. It sends email through Bird's email API
839
+ # with a workspace API key that holds the `emails:write` scope.
840
+ #
841
+ # @param [String] provider_id Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
842
+ # @param [String] name Provider name.
843
+ # @param [String] api_key Bird workspace API key.
844
+ # @param [String] from_name Sender Name.
845
+ # @param [String] from_email Sender email address. Its domain must be verified in the Bird workspace.
846
+ # @param [String] reply_to_name Name set in the reply to field for the mail. Default value is sender name.
847
+ # @param [String] reply_to_email Email set in the reply to field for the mail. Default value is sender email.
848
+ # @param [] enabled Set as enabled.
849
+ #
850
+ # @return [Provider]
851
+ def create_bird_email_provider(
852
+ provider_id:,
853
+ name:,
854
+ api_key: nil,
855
+ from_name: nil,
856
+ from_email: nil,
857
+ reply_to_name: nil,
858
+ reply_to_email: nil,
859
+ enabled: nil
860
+ )
861
+ if provider_id.nil?
862
+ raise Appwrite::Exception.new('Missing required parameter: "providerId"')
863
+ end
864
+
865
+ if name.nil?
866
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
867
+ end
868
+
869
+ api_path = '/messaging/providers/bird-email'
870
+
871
+ api_params = {
872
+ providerId: provider_id,
873
+ name: name,
874
+ apiKey: api_key,
875
+ fromName: from_name,
876
+ fromEmail: from_email,
877
+ replyToName: reply_to_name,
878
+ replyToEmail: reply_to_email,
879
+ enabled: enabled,
880
+ }
881
+
882
+ api_headers = {
883
+ "X-Appwrite-Project": @client.get_config('project'),
884
+ "content-type": 'application/json',
885
+ "accept": 'application/json',
886
+ }
887
+
888
+ @client.call(
889
+ method: 'POST',
890
+ path: api_path,
891
+ headers: api_headers,
892
+ params: api_params,
893
+ response_type: Models::Provider
894
+ )
895
+ end
896
+
897
+ # Update a Bird email provider by its unique ID.
898
+ #
899
+ # @param [String] provider_id Provider ID.
900
+ # @param [String] name Provider name.
901
+ # @param [] enabled Set as enabled.
902
+ # @param [String] api_key Bird workspace API key.
903
+ # @param [String] from_name Sender Name.
904
+ # @param [String] from_email Sender email address. Its domain must be verified in the Bird workspace.
905
+ # @param [String] reply_to_name Name set in the Reply To field for the mail. Default value is Sender Name.
906
+ # @param [String] reply_to_email Email set in the Reply To field for the mail. Default value is Sender Email.
907
+ #
908
+ # @return [Provider]
909
+ def update_bird_email_provider(
910
+ provider_id:,
911
+ name: nil,
912
+ enabled: nil,
913
+ api_key: nil,
914
+ from_name: nil,
915
+ from_email: nil,
916
+ reply_to_name: nil,
917
+ reply_to_email: nil
918
+ )
919
+ if provider_id.nil? || provider_id == ''
920
+ raise Appwrite::Exception.new('Missing required parameter: "providerId"')
921
+ end
922
+
923
+ api_path = '/messaging/providers/bird-email/{providerId}'
924
+ .gsub('{providerId}', @client.encode_path(provider_id))
925
+
926
+ api_params = {
927
+ name: name,
928
+ enabled: enabled,
929
+ apiKey: api_key,
930
+ fromName: from_name,
931
+ fromEmail: from_email,
932
+ replyToName: reply_to_name,
933
+ replyToEmail: reply_to_email,
934
+ }
935
+
936
+ api_headers = {
937
+ "X-Appwrite-Project": @client.get_config('project'),
938
+ "content-type": 'application/json',
939
+ "accept": 'application/json',
940
+ }
941
+
942
+ @client.call(
943
+ method: 'PATCH',
944
+ path: api_path,
945
+ headers: api_headers,
946
+ params: api_params,
947
+ response_type: Models::Provider
948
+ )
949
+ end
950
+
951
+ # Create a new Bird SMS provider. It sends SMS through Bird with a workspace
952
+ # API key that holds the `sms:write` scope.
953
+ #
954
+ # @param [String] provider_id Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
955
+ # @param [String] name Provider name.
956
+ # @param [String] from Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.
957
+ # @param [String] api_key Bird workspace API key.
958
+ # @param [] enabled Set as enabled.
959
+ #
960
+ # @return [Provider]
961
+ def create_bird_sms_provider(
962
+ provider_id:,
963
+ name:,
964
+ from: nil,
965
+ api_key: nil,
966
+ enabled: nil
967
+ )
968
+ if provider_id.nil?
969
+ raise Appwrite::Exception.new('Missing required parameter: "providerId"')
970
+ end
971
+
972
+ if name.nil?
973
+ raise Appwrite::Exception.new('Missing required parameter: "name"')
974
+ end
975
+
976
+ api_path = '/messaging/providers/bird-sms'
977
+
978
+ api_params = {
979
+ providerId: provider_id,
980
+ name: name,
981
+ from: from,
982
+ apiKey: api_key,
983
+ enabled: enabled,
984
+ }
985
+
986
+ api_headers = {
987
+ "X-Appwrite-Project": @client.get_config('project'),
988
+ "content-type": 'application/json',
989
+ "accept": 'application/json',
990
+ }
991
+
992
+ @client.call(
993
+ method: 'POST',
994
+ path: api_path,
995
+ headers: api_headers,
996
+ params: api_params,
997
+ response_type: Models::Provider
998
+ )
999
+ end
1000
+
1001
+ # Update a Bird SMS provider by its unique ID.
1002
+ #
1003
+ # @param [String] provider_id Provider ID.
1004
+ # @param [String] name Provider name.
1005
+ # @param [] enabled Set as enabled.
1006
+ # @param [String] api_key Bird workspace API key.
1007
+ # @param [String] from Sender phone number or alphanumeric sender ID. Format phone numbers with a leading '+' and a country code, e.g., +16175551212.
1008
+ #
1009
+ # @return [Provider]
1010
+ def update_bird_sms_provider(
1011
+ provider_id:,
1012
+ name: nil,
1013
+ enabled: nil,
1014
+ api_key: nil,
1015
+ from: nil
1016
+ )
1017
+ if provider_id.nil? || provider_id == ''
1018
+ raise Appwrite::Exception.new('Missing required parameter: "providerId"')
1019
+ end
1020
+
1021
+ api_path = '/messaging/providers/bird-sms/{providerId}'
1022
+ .gsub('{providerId}', @client.encode_path(provider_id))
1023
+
1024
+ api_params = {
1025
+ name: name,
1026
+ enabled: enabled,
1027
+ apiKey: api_key,
1028
+ from: from,
1029
+ }
1030
+
1031
+ api_headers = {
1032
+ "X-Appwrite-Project": @client.get_config('project'),
1033
+ "content-type": 'application/json',
1034
+ "accept": 'application/json',
1035
+ }
1036
+
1037
+ @client.call(
1038
+ method: 'PATCH',
1039
+ path: api_path,
1040
+ headers: api_headers,
1041
+ params: api_params,
1042
+ response_type: Models::Provider
1043
+ )
1044
+ end
1045
+
838
1046
  # Create a new Firebase Cloud Messaging provider.
839
1047
  #
840
1048
  # @param [String] provider_id Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.