vonage 7.29.1 → 8.0.0.beta

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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -476
  3. data/lib/vonage/applications.rb +4 -12
  4. data/lib/vonage/basic.rb +1 -1
  5. data/lib/vonage/bearer_token.rb +1 -1
  6. data/lib/vonage/client.rb +0 -65
  7. data/lib/vonage/client_error.rb +1 -1
  8. data/lib/vonage/config.rb +1 -9
  9. data/lib/vonage/conversations/events.rb +0 -12
  10. data/lib/vonage/conversations/legs.rb +0 -6
  11. data/lib/vonage/conversations/members.rb +0 -15
  12. data/lib/vonage/conversations/users.rb +0 -15
  13. data/lib/vonage/conversations.rb +0 -30
  14. data/lib/vonage/errors.rb +20 -37
  15. data/lib/vonage/gsm7.rb +1 -1
  16. data/lib/vonage/http.rb +3 -3
  17. data/lib/vonage/jwt.rb +0 -17
  18. data/lib/vonage/key_secret_params.rb +2 -3
  19. data/lib/vonage/keys.rb +1 -14
  20. data/lib/vonage/logger.rb +3 -5
  21. data/lib/vonage/messaging/channels/viber.rb +2 -9
  22. data/lib/vonage/messaging/channels/whats_app.rb +1 -3
  23. data/lib/vonage/messaging/message.rb +0 -1
  24. data/lib/vonage/messaging.rb +4 -34
  25. data/lib/vonage/namespace.rb +68 -137
  26. data/lib/vonage/numbers.rb +17 -40
  27. data/lib/vonage/server_error.rb +1 -1
  28. data/lib/vonage/signature.rb +5 -5
  29. data/lib/vonage/sms.rb +20 -20
  30. data/lib/vonage/version.rb +1 -1
  31. data/lib/vonage/video/archives.rb +58 -25
  32. data/lib/vonage/video/list_response.rb +11 -0
  33. data/lib/vonage/video/moderation.rb +22 -7
  34. data/lib/vonage/video/signals.rb +9 -4
  35. data/lib/vonage/video/streams.rb +12 -6
  36. data/lib/vonage/video.rb +13 -50
  37. data/lib/vonage/voice/actions/connect.rb +5 -34
  38. data/lib/vonage/voice/actions/conversation.rb +4 -10
  39. data/lib/vonage/voice/actions/input.rb +3 -19
  40. data/lib/vonage/voice/actions/notify.rb +3 -8
  41. data/lib/vonage/voice/actions/pay.rb +107 -0
  42. data/lib/vonage/voice/actions/record.rb +4 -52
  43. data/lib/vonage/voice/actions/stream.rb +4 -48
  44. data/lib/vonage/voice/actions/talk.rb +4 -54
  45. data/lib/vonage/voice/talk.rb +1 -11
  46. data/lib/vonage/voice.rb +0 -24
  47. data/lib/vonage.rb +0 -4
  48. data/vonage.gemspec +1 -3
  49. metadata +12 -108
  50. data/lib/vonage/api_error.rb +0 -33
  51. data/lib/vonage/conversation/event/list_response.rb +0 -11
  52. data/lib/vonage/conversation/event.rb +0 -108
  53. data/lib/vonage/conversation/list_response.rb +0 -11
  54. data/lib/vonage/conversation/member/list_response.rb +0 -11
  55. data/lib/vonage/conversation/member.rb +0 -134
  56. data/lib/vonage/conversation/user/conversations_list_response.rb +0 -11
  57. data/lib/vonage/conversation/user/sessions_list_response.rb +0 -11
  58. data/lib/vonage/conversation/user.rb +0 -67
  59. data/lib/vonage/conversation.rb +0 -164
  60. data/lib/vonage/meetings/applications.rb +0 -28
  61. data/lib/vonage/meetings/dial_in_numbers/list_response.rb +0 -11
  62. data/lib/vonage/meetings/dial_in_numbers.rb +0 -26
  63. data/lib/vonage/meetings/recordings.rb +0 -42
  64. data/lib/vonage/meetings/rooms/list_response.rb +0 -11
  65. data/lib/vonage/meetings/rooms.rb +0 -167
  66. data/lib/vonage/meetings/sessions/list_response.rb +0 -11
  67. data/lib/vonage/meetings/sessions.rb +0 -31
  68. data/lib/vonage/meetings/themes/list_response.rb +0 -11
  69. data/lib/vonage/meetings/themes.rb +0 -239
  70. data/lib/vonage/meetings.rb +0 -50
  71. data/lib/vonage/messaging/channels/rcs.rb +0 -42
  72. data/lib/vonage/network_authentication/client_authentication.rb +0 -39
  73. data/lib/vonage/network_authentication/server_authentication.rb +0 -47
  74. data/lib/vonage/network_authentication.rb +0 -22
  75. data/lib/vonage/network_number_verification.rb +0 -92
  76. data/lib/vonage/network_sim_swap.rb +0 -84
  77. data/lib/vonage/number_insight_2.rb +0 -36
  78. data/lib/vonage/proactive_connect/events/list_response.rb +0 -11
  79. data/lib/vonage/proactive_connect/events.rb +0 -71
  80. data/lib/vonage/proactive_connect/item.rb +0 -116
  81. data/lib/vonage/proactive_connect/items/file_response.rb +0 -32
  82. data/lib/vonage/proactive_connect/items/list_response.rb +0 -11
  83. data/lib/vonage/proactive_connect/items.rb +0 -116
  84. data/lib/vonage/proactive_connect/list.rb +0 -186
  85. data/lib/vonage/proactive_connect/lists/list_response.rb +0 -11
  86. data/lib/vonage/proactive_connect/lists.rb +0 -38
  87. data/lib/vonage/proactive_connect.rb +0 -43
  88. data/lib/vonage/subaccounts/balance_transfers/list_response.rb +0 -11
  89. data/lib/vonage/subaccounts/credit_transfers/list_response.rb +0 -11
  90. data/lib/vonage/subaccounts/list_response.rb +0 -15
  91. data/lib/vonage/subaccounts.rb +0 -203
  92. data/lib/vonage/users/list_response.rb +0 -11
  93. data/lib/vonage/users.rb +0 -156
  94. data/lib/vonage/verify2/channels/email.rb +0 -36
  95. data/lib/vonage/verify2/channels/silent_auth.rb +0 -45
  96. data/lib/vonage/verify2/channels/sms.rb +0 -63
  97. data/lib/vonage/verify2/channels/voice.rb +0 -32
  98. data/lib/vonage/verify2/channels/whats_app.rb +0 -39
  99. data/lib/vonage/verify2/channels/whats_app_interactive.rb +0 -32
  100. data/lib/vonage/verify2/start_verification_options.rb +0 -63
  101. data/lib/vonage/verify2/template_fragments/list_response.rb +0 -11
  102. data/lib/vonage/verify2/template_fragments.rb +0 -125
  103. data/lib/vonage/verify2/templates/list_response.rb +0 -11
  104. data/lib/vonage/verify2/templates.rb +0 -86
  105. data/lib/vonage/verify2/workflow.rb +0 -39
  106. data/lib/vonage/verify2/workflow_builder.rb +0 -25
  107. data/lib/vonage/verify2.rb +0 -112
  108. data/lib/vonage/video/archives/list_response.rb +0 -11
  109. data/lib/vonage/video/broadcasts/list_response.rb +0 -11
  110. data/lib/vonage/video/broadcasts.rb +0 -75
  111. data/lib/vonage/video/captions.rb +0 -67
  112. data/lib/vonage/video/renders/list_response.rb +0 -11
  113. data/lib/vonage/video/renders.rb +0 -107
  114. data/lib/vonage/video/sip.rb +0 -48
  115. data/lib/vonage/video/streams/list_response.rb +0 -11
  116. data/lib/vonage/video/web_socket.rb +0 -61
@@ -1,107 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::Renders < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Start an Experience Composer Render
15
- #
16
- # @example
17
- # response = client.video.renders.start(
18
- # session_id: "12312312-3811-4726-b508-e41a0f96c68f",
19
- # token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJp...",
20
- # url: 'https://example.com/',
21
- # max_duration: 1800,
22
- # resolution: '1280x720',
23
- # properties: {
24
- # name: 'foo'
25
- # }
26
- # )
27
- #
28
- # @params [required, String] :session_id The session ID of the Vonage Video session you are working with.
29
- #
30
- # @param [required, String] :token A valid OpenTok JWT token with a Publisher role and (optionally) connection data to be associated with the output stream.
31
- #
32
- # @params [required, String] :url A publicly reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention.
33
- #
34
- # @params [optional, Integer] :max_duration The maximum duration of the rendered video in seconds.
35
- # - After this time, it is stopped automatically, if it is still running.
36
- # - Min: 60
37
- # - Max: 3600
38
- # - Default: 3600
39
- #
40
- # @params [optional, String] :resolution The resolution of the Experience Composer render.
41
- # - Must be one of: '640x480', '480x640', '1280x720', '720x1280', '1080x1920', '1920x1080'
42
- #
43
- # @params [optional, Hash] :properties The initial configuration of Publisher properties for the composed output stream.
44
- # @option properties [required, String] :name The name of the composed output stream which is published to the session.
45
- #
46
- # @return [Response]
47
- #
48
- # @see TODO: Add document link here
49
- #
50
- def start(session_id:, token:, url:, **params)
51
- request(
52
- '/v2/project/' + @config.application_id + '/render',
53
- params: camelcase(params.merge({sessionId: session_id, token: token, url: url})),
54
- type: Post)
55
- end
56
-
57
- # Stop an Experience Composer render
58
- #
59
- # @example
60
- # response = client.video.renders.stop(experience_composer_id: "1248e7070b81464c9789f46ad10e7764")
61
- #
62
- # @params [required, String] :experience_composer_id ID of the Experience Composer instance that you want to stop.
63
- #
64
- # @return [Response]
65
- #
66
- # @see TODO: Add document link here
67
- #
68
- def stop(experience_composer_id:)
69
- request('/v2/project/' + @config.application_id + '/render/' + experience_composer_id, type: Delete)
70
- end
71
-
72
- # Get information about an Experience Composer session
73
- #
74
- # @example
75
- # response = client.video.renders.info(experience_composer_id: "1248e7070b81464c9789f46ad10e7764")
76
- #
77
- # @params [required, String] :experience_composer_id ID of the Experience Composer instance for which you are requesitng information.
78
- #
79
- # @return [Response]
80
- #
81
- # @see TODO: Add document link here
82
- #
83
- def info(experience_composer_id:)
84
- request('/v2/project/' + @config.application_id + '/render/' + experience_composer_id)
85
- end
86
-
87
- # List all Experience Composer renders in an application
88
- #
89
- # @example
90
- # response = client.video.renders.list
91
- #
92
- # @params [optional, Integer] :offset Specify the index offset of the first experience composer. 0 is offset of the most recently started render.
93
- #
94
- # @params [optional, Integer] :count Limit the number of experience composers to be returned.
95
- #
96
- # @return [Video::Renders::ListResponse]
97
- #
98
- # @see TODO: Add document link here
99
- #
100
- def list(**params)
101
- path = '/v2/project/' + @config.application_id + '/render'
102
- path += "?#{Params.encode(camelcase(params))}" unless params.empty?
103
-
104
- request(path, response_class: ListResponse)
105
- end
106
- end
107
- end
@@ -1,48 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::SIP < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Initiate an outbound SIP call.
15
- #
16
- def dial(session_id:, token:, sip_uri:, **params)
17
- request(
18
- '/v2/project/' + @config.application_id + '/dial',
19
- params: camelcase({
20
- session_id: session_id,
21
- token: token,
22
- sip: params.merge({uri: sip_uri})
23
- }),
24
- type: Post
25
- )
26
- end
27
-
28
- # Play DTMF tones into a SIP call.
29
- #
30
- def play_dtmf_to_session(session_id:, dtmf_digits:)
31
- request(
32
- '/v2/project/' + @config.application_id + '/session/' + session_id + '/play-dtmf',
33
- params: {digits: dtmf_digits},
34
- type: Post
35
- )
36
- end
37
-
38
- # Play DMTF tones into a specific connection.
39
- #
40
- def play_dtmf_to_connection(session_id:, connection_id:, dtmf_digits:)
41
- request(
42
- '/v2/project/' + @config.application_id + '/session/' + session_id + '/connection/' + connection_id + '/play-dtmf',
43
- params: {digits: dtmf_digits},
44
- type: Post
45
- )
46
- end
47
- end
48
- end
@@ -1,11 +0,0 @@
1
- # typed: true
2
-
3
- class Vonage::Video::Streams::ListResponse < Vonage::Response
4
- include Enumerable
5
-
6
- def each
7
- return enum_for(:each) unless block_given?
8
-
9
- @entity.items.each { |item| yield item }
10
- end
11
- end
@@ -1,61 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
- module Vonage
5
- class Video::WebSocket < Namespace
6
- include Keys
7
-
8
- self.authentication = BearerToken
9
-
10
- self.request_body = JSON
11
-
12
- self.host = :video_host
13
-
14
- # Start an audio connector websocket connection
15
- #
16
- # @example
17
- # response = client.video.web_socket.connect(
18
- # session_id: "12312312-3811-4726-b508-e41a0f96c68f",
19
- # token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJp...",
20
- # websocket: {
21
- # uri: 'wss://example.com/ws-endpoint',
22
- # streams: ["8b732909-0a06-46a2-8ea8-074e64d43422"],
23
- # headers: { property1: 'foo', property2: 'bar' },
24
- # audio_rate: 16000
25
- # }
26
- # )
27
- #
28
- # @params [required, String] :session_id The Vonage Video session ID that includes the Vonage Video streams you want to include in the WebSocket stream.
29
- # - The Audio Connector feature is only supported in routed sessions
30
- #
31
- # @param [required, String] :token A valid Vonage Video token for the Audio Connector connection to the Vonage Video Session.
32
- # - You can add additional data to the JWT to identify that the connection is the Audio Connector endpoint or for any other identifying data.
33
- #
34
- # @params [required, Hash] :websocket The WebSocket configuration for the Audio Connector connection.
35
- # @option websocket [required, String] :uri A publicly reachable WebSocket URI to be used for the destination of the audio stream
36
- # @option websocket [optional, String] :streams An array of stream IDs for the Vonage Video streams you want to include in the WebSocket audio.
37
- # - If you omit this property, all streams in the session will be included.
38
- # @option websocket [optional, Hash] :headers An object of key-value pairs of headers to be sent to your WebSocket server with each message, with a maximum length of 512 bytes.
39
- # @option websocket [optional, Integer] :audio_rate A number representing the audio sampling rate in Hz
40
- # - Must be one of: 8000, 16000
41
- #
42
- # @return [Response]
43
- #
44
- # @see TODO: Add document link here
45
- #
46
- def connect(session_id:, token:, websocket:)
47
- raise ArgumentError, 'websocket must be a Hash' unless websocket.is_a?(Hash)
48
- raise ArgumentError, 'websocket must contain a uri' unless websocket.key?(:uri)
49
-
50
- request(
51
- '/v2/project/' + @config.application_id + '/connect',
52
- params: {
53
- sessionId: session_id,
54
- token: token,
55
- websocket: camelcase(websocket)
56
- },
57
- type: Post
58
- )
59
- end
60
- end
61
- end