rcs 2.0.19 → 2.0.20.pre.rc.2

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +5 -6
  3. data/lib/pinnacle/calls/client.rb +359 -0
  4. data/lib/pinnacle/calls/types/calls_download_recording_request.rb +13 -0
  5. data/lib/pinnacle/calls/types/calls_list_events_request.rb +15 -0
  6. data/lib/pinnacle/calls/types/calls_list_request.rb +25 -0
  7. data/lib/pinnacle/calls/types/create_call_params.rb +17 -0
  8. data/lib/pinnacle/calls/types/create_stream_token_params.rb +17 -0
  9. data/lib/pinnacle/calls/types/update_call_params.rb +13 -0
  10. data/lib/pinnacle/client.rb +11 -1
  11. data/lib/pinnacle/forms/client.rb +1 -1
  12. data/lib/pinnacle/network/client.rb +34 -0
  13. data/lib/pinnacle/network/requests/client.rb +94 -0
  14. data/lib/pinnacle/network/requests/types/list_network_requests_params.rb +21 -0
  15. data/lib/pinnacle/network/silent_auth/client.rb +107 -0
  16. data/lib/pinnacle/network/silent_auth/types/silent_auth_check_request.rb +15 -0
  17. data/lib/pinnacle/network/silent_auth/types/silent_auth_request.rb +17 -0
  18. data/lib/pinnacle/network/sim_swap/client.rb +55 -0
  19. data/lib/pinnacle/network/sim_swap/types/sim_swap_request.rb +15 -0
  20. data/lib/pinnacle/network/subscriber_match/client.rb +55 -0
  21. data/lib/pinnacle/network/subscriber_match/types/subscriber_match_request.rb +15 -0
  22. data/lib/pinnacle/pinnacle_client.rb +8 -0
  23. data/lib/pinnacle/types/agent_summary_carrier_launches.rb +1 -1
  24. data/lib/pinnacle/types/call.rb +31 -0
  25. data/lib/pinnacle/types/call_direction.rb +12 -0
  26. data/lib/pinnacle/types/call_event.rb +27 -0
  27. data/lib/pinnacle/types/call_event_source.rb +14 -0
  28. data/lib/pinnacle/types/call_metadata.rb +23 -0
  29. data/lib/pinnacle/types/call_state.rb +19 -0
  30. data/lib/pinnacle/types/call_status_event.rb +14 -0
  31. data/lib/pinnacle/types/call_status_event_call.rb +17 -0
  32. data/lib/pinnacle/types/call_stream_token.rb +13 -0
  33. data/lib/pinnacle/types/created_call.rb +33 -0
  34. data/lib/pinnacle/types/e_164_phone_number.rb +23 -0
  35. data/lib/pinnacle/types/hosted_silent_auth_response.rb +13 -0
  36. data/lib/pinnacle/types/json_silent_auth_response.rb +13 -0
  37. data/lib/pinnacle/types/list_call_events_response.rb +11 -0
  38. data/lib/pinnacle/types/list_calls_response.rb +11 -0
  39. data/lib/pinnacle/types/list_network_requests_response.rb +13 -0
  40. data/lib/pinnacle/types/network_insight_status.rb +14 -0
  41. data/lib/pinnacle/types/network_request_id.rb +23 -0
  42. data/lib/pinnacle/types/network_request_result.rb +16 -0
  43. data/lib/pinnacle/types/network_request_status.rb +15 -0
  44. data/lib/pinnacle/types/network_request_summary.rb +27 -0
  45. data/lib/pinnacle/types/network_request_type.rb +13 -0
  46. data/lib/pinnacle/types/recording_download.rb +11 -0
  47. data/lib/pinnacle/types/recording_state.rb +14 -0
  48. data/lib/pinnacle/types/silent_auth_check_response.rb +11 -0
  49. data/lib/pinnacle/types/silent_auth_check_response_status.rb +12 -0
  50. data/lib/pinnacle/types/silent_auth_response.rb +15 -0
  51. data/lib/pinnacle/types/sim_swap_response.rb +15 -0
  52. data/lib/pinnacle/types/subscriber_match_attributes.rb +30 -0
  53. data/lib/pinnacle/types/subscriber_match_response.rb +13 -0
  54. data/lib/pinnacle/types/subscriber_match_response_matches.rb +41 -0
  55. data/lib/pinnacle/types/subscriber_match_result.rb +18 -0
  56. data/lib/pinnacle/types/webhook_event_enum.rb +1 -0
  57. data/lib/pinnacle/version.rb +1 -1
  58. data/lib/pinnacle/wrapper/messages/client.rb +4 -1
  59. data/lib/pinnacle/wrapper/voice/client.rb +134 -0
  60. data/lib/pinnacle/wrapper/voice/types.rb +38 -0
  61. data/lib/pinnacle/wrapper/voice/voice_socket.rb +354 -0
  62. data/lib/pinnacle.rb +49 -0
  63. data/reference.md +1903 -696
  64. metadata +75 -3
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module Requests
6
+ module Types
7
+ class ListNetworkRequestsParams < Internal::Types::Model
8
+ field :page_index, -> { Integer }, optional: true, nullable: false, api_name: "pageIndex"
9
+
10
+ field :page_size, -> { Integer }, optional: true, nullable: false, api_name: "pageSize"
11
+
12
+ field :type, -> { Pinnacle::Types::NetworkRequestType }, optional: true, nullable: false
13
+
14
+ field :status, -> { Pinnacle::Types::NetworkRequestStatus }, optional: true, nullable: false
15
+
16
+ field :client_ref, -> { String }, optional: true, nullable: false, api_name: "clientRef"
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SilentAuth
6
+ class Client
7
+ # @param client [Pinnacle::Internal::Http::RawClient]
8
+ #
9
+ # @return [void]
10
+ def initialize(client:)
11
+ @client = client
12
+ end
13
+
14
+ # Start a Silent Authentication session to verify that the user controls the device attached to a phone number.
15
+ # Omit `format` to receive a `browserUrl` for the hosted browser/WebView flow, or set `format: "json"` to
16
+ # receive a `jsonUrl` for a native mobile app or custom client-side flow. The device check must run from the
17
+ # user's cellular device, not your server.
18
+ #
19
+ # The returned URL expires 60 seconds after creation. Open or fetch it immediately and use `expiresAt` to detect
20
+ # when a new Silent Auth session is required.
21
+ #
22
+ # <Note>
23
+ # Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
24
+ # </Note>
25
+ #
26
+ # @param request_options [Hash]
27
+ # @param params [Pinnacle::Network::SilentAuth::Types::SilentAuthRequest]
28
+ # @option request_options [String] :base_url
29
+ # @option request_options [Hash{String => Object}] :additional_headers
30
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
31
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
32
+ # @option request_options [Integer] :timeout_in_seconds
33
+ #
34
+ # @return [Pinnacle::Types::SilentAuthResponse]
35
+ def start(request_options: {}, **params)
36
+ params = Pinnacle::Internal::Types::Utils.normalize_keys(params)
37
+ request = Pinnacle::Internal::JSON::Request.new(
38
+ base_url: request_options[:base_url],
39
+ method: "POST",
40
+ path: "network/silent-auth",
41
+ body: Pinnacle::Network::SilentAuth::Types::SilentAuthRequest.new(params).to_h,
42
+ request_options: request_options
43
+ )
44
+ begin
45
+ response = @client.send(request)
46
+ rescue Net::HTTPRequestTimeout
47
+ raise Pinnacle::Errors::TimeoutError
48
+ end
49
+ code = response.code.to_i
50
+ if code.between?(200, 299)
51
+ Pinnacle::Types::SilentAuthResponse.load(response.body)
52
+ else
53
+ error_class = Pinnacle::Errors::ResponseError.subclass_for_code(code)
54
+ raise error_class.new(response.body, code: code)
55
+ end
56
+ end
57
+
58
+ # Complete a Silent Authentication request by exchanging the code returned from the JSON flow. Call this from
59
+ # your server after the user's mobile app fetches `jsonUrl`.
60
+ #
61
+ # This endpoint returns a terminal verification result. To inspect pending lifecycle states such as `started` or
62
+ # `challenge-issued`, use [Get Network Request](/api-reference/network/get-network-request).
63
+ #
64
+ # <Note>
65
+ # Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
66
+ # </Note>
67
+ #
68
+ # @param request_options [Hash]
69
+ # @param params [Pinnacle::Network::SilentAuth::Types::SilentAuthCheckRequest]
70
+ # @option request_options [String] :base_url
71
+ # @option request_options [Hash{String => Object}] :additional_headers
72
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
73
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
74
+ # @option request_options [Integer] :timeout_in_seconds
75
+ # @option params [Pinnacle::Types::NetworkRequestId] :request_id
76
+ #
77
+ # @return [Pinnacle::Types::SilentAuthCheckResponse]
78
+ def check(request_options: {}, **params)
79
+ params = Pinnacle::Internal::Types::Utils.normalize_keys(params)
80
+ request_data = Pinnacle::Network::SilentAuth::Types::SilentAuthCheckRequest.new(params).to_h
81
+ non_body_param_names = %w[requestId]
82
+ body = request_data.except(*non_body_param_names)
83
+
84
+ request = Pinnacle::Internal::JSON::Request.new(
85
+ base_url: request_options[:base_url],
86
+ method: "POST",
87
+ path: "network/silent-auth/#{URI.encode_uri_component(params[:request_id].to_s)}/check",
88
+ body: body,
89
+ request_options: request_options
90
+ )
91
+ begin
92
+ response = @client.send(request)
93
+ rescue Net::HTTPRequestTimeout
94
+ raise Pinnacle::Errors::TimeoutError
95
+ end
96
+ code = response.code.to_i
97
+ if code.between?(200, 299)
98
+ Pinnacle::Types::SilentAuthCheckResponse.load(response.body)
99
+ else
100
+ error_class = Pinnacle::Errors::ResponseError.subclass_for_code(code)
101
+ raise error_class.new(response.body, code: code)
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SilentAuth
6
+ module Types
7
+ class SilentAuthCheckRequest < Internal::Types::Model
8
+ field :request_id, -> { String }, optional: false, nullable: false, api_name: "requestId"
9
+
10
+ field :code, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SilentAuth
6
+ module Types
7
+ class SilentAuthRequest < Internal::Types::Model
8
+ field :phone_number, -> { String }, optional: false, nullable: false, api_name: "phoneNumber"
9
+
10
+ field :client_ref, -> { String }, optional: true, nullable: false, api_name: "clientRef"
11
+
12
+ field :format, -> { String }, optional: true, nullable: false
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SimSwap
6
+ class Client
7
+ # @param client [Pinnacle::Internal::Http::RawClient]
8
+ #
9
+ # @return [void]
10
+ def initialize(client:)
11
+ @client = client
12
+ end
13
+
14
+ # Check whether a phone number's SIM was changed during a recent lookback window. Use this to flag account
15
+ # takeover risk before sign-in, password reset, payment, or other sensitive actions.
16
+ #
17
+ # <Note>
18
+ # Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
19
+ # </Note>
20
+ #
21
+ # @param request_options [Hash]
22
+ # @param params [Pinnacle::Network::SimSwap::Types::SimSwapRequest]
23
+ # @option request_options [String] :base_url
24
+ # @option request_options [Hash{String => Object}] :additional_headers
25
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
26
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
27
+ # @option request_options [Integer] :timeout_in_seconds
28
+ #
29
+ # @return [Pinnacle::Types::SimSwapResponse]
30
+ def check(request_options: {}, **params)
31
+ params = Pinnacle::Internal::Types::Utils.normalize_keys(params)
32
+ request = Pinnacle::Internal::JSON::Request.new(
33
+ base_url: request_options[:base_url],
34
+ method: "POST",
35
+ path: "network/sim-swap",
36
+ body: Pinnacle::Network::SimSwap::Types::SimSwapRequest.new(params).to_h,
37
+ request_options: request_options
38
+ )
39
+ begin
40
+ response = @client.send(request)
41
+ rescue Net::HTTPRequestTimeout
42
+ raise Pinnacle::Errors::TimeoutError
43
+ end
44
+ code = response.code.to_i
45
+ if code.between?(200, 299)
46
+ Pinnacle::Types::SimSwapResponse.load(response.body)
47
+ else
48
+ error_class = Pinnacle::Errors::ResponseError.subclass_for_code(code)
49
+ raise error_class.new(response.body, code: code)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SimSwap
6
+ module Types
7
+ class SimSwapRequest < Internal::Types::Model
8
+ field :phone_number, -> { String }, optional: false, nullable: false, api_name: "phoneNumber"
9
+
10
+ field :period_hours, -> { Integer }, optional: true, nullable: false, api_name: "periodHours"
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SubscriberMatch
6
+ class Client
7
+ # @param client [Pinnacle::Internal::Http::RawClient]
8
+ #
9
+ # @return [void]
10
+ def initialize(client:)
11
+ @client = client
12
+ end
13
+
14
+ # Compare user-provided identity details against the carrier's subscriber record. Results return match strength
15
+ # per attribute, so you can use partial signals without receiving carrier PII.
16
+ #
17
+ # <Note>
18
+ # Limited availability. Contact [founders@pinnacle.sh](mailto:founders@pinnacle.sh) to request access.
19
+ # </Note>
20
+ #
21
+ # @param request_options [Hash]
22
+ # @param params [Pinnacle::Network::SubscriberMatch::Types::SubscriberMatchRequest]
23
+ # @option request_options [String] :base_url
24
+ # @option request_options [Hash{String => Object}] :additional_headers
25
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
26
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
27
+ # @option request_options [Integer] :timeout_in_seconds
28
+ #
29
+ # @return [Pinnacle::Types::SubscriberMatchResponse]
30
+ def check(request_options: {}, **params)
31
+ params = Pinnacle::Internal::Types::Utils.normalize_keys(params)
32
+ request = Pinnacle::Internal::JSON::Request.new(
33
+ base_url: request_options[:base_url],
34
+ method: "POST",
35
+ path: "network/subscriber-match",
36
+ body: Pinnacle::Network::SubscriberMatch::Types::SubscriberMatchRequest.new(params).to_h,
37
+ request_options: request_options
38
+ )
39
+ begin
40
+ response = @client.send(request)
41
+ rescue Net::HTTPRequestTimeout
42
+ raise Pinnacle::Errors::TimeoutError
43
+ end
44
+ code = response.code.to_i
45
+ if code.between?(200, 299)
46
+ Pinnacle::Types::SubscriberMatchResponse.load(response.body)
47
+ else
48
+ error_class = Pinnacle::Errors::ResponseError.subclass_for_code(code)
49
+ raise error_class.new(response.body, code: code)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Network
5
+ module SubscriberMatch
6
+ module Types
7
+ class SubscriberMatchRequest < Internal::Types::Model
8
+ field :phone_number, -> { String }, optional: false, nullable: false, api_name: "phoneNumber"
9
+
10
+ field :attributes, -> { Pinnacle::Types::SubscriberMatchAttributes }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -3,6 +3,7 @@
3
3
  require_relative "wrapper/messages/client"
4
4
  require_relative "wrapper/tools/file_uploader"
5
5
  require_relative "wrapper/tools/client"
6
+ require_relative "wrapper/voice/client"
6
7
 
7
8
  module Pinnacle
8
9
  # Client class that extends PinnacleBaseClient with custom methods for webhook processing and file uploads.
@@ -20,5 +21,12 @@ module Pinnacle
20
21
  def tools
21
22
  @tools ||= Pinnacle::Wrapper::Tools::Client.new(client: @raw_client)
22
23
  end
24
+
25
+ # Returns an enhanced voice client with WebSocket stream helpers.
26
+ #
27
+ # @return [Pinnacle::Wrapper::Voice::Client]
28
+ def voice
29
+ @voice ||= Pinnacle::Wrapper::Voice::Client.new(client: @raw_client)
30
+ end
23
31
  end
24
32
  end
@@ -5,7 +5,7 @@ module Pinnacle
5
5
  # Raw per-carrier launch + verification state for the agent. Each
6
6
  # value is tri-state — `null` means "no launch requested" or "not
7
7
  # sent yet"; `false` means "pending" / "sent"; `true` means
8
- # "launched" / "verified". Use the [GET /rcs/{agentId}](/api-reference/rcs-agents/get)
8
+ # "launched" / "verified". Use the [GET /rcs/{agentId}](/api-reference/rcs-agents/get-agent)
9
9
  # endpoint for the resolved enum representation.
10
10
  class AgentSummaryCarrierLaunches < Internal::Types::Model
11
11
  field :att, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "ATT"
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class Call < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+
8
+ field :state, -> { Pinnacle::Types::CallState }, optional: false, nullable: false
9
+
10
+ field :direction, -> { Pinnacle::Types::CallDirection }, optional: false, nullable: false
11
+
12
+ field :to, -> { String }, optional: false, nullable: false
13
+
14
+ field :from, -> { String }, optional: false, nullable: false
15
+
16
+ field :created_at, -> { String }, optional: false, nullable: false
17
+
18
+ field :started_at, -> { String }, optional: false, nullable: true
19
+
20
+ field :answered_at, -> { String }, optional: false, nullable: true
21
+
22
+ field :ended_at, -> { String }, optional: false, nullable: true
23
+
24
+ field :metadata, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false
25
+
26
+ field :recording_state, -> { Pinnacle::Types::RecordingState }, optional: false, nullable: true
27
+
28
+ field :hangup_cause, -> { String }, optional: false, nullable: true
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ module CallDirection
6
+ extend Pinnacle::Internal::Types::Enum
7
+
8
+ INBOUND = "INBOUND"
9
+ OUTBOUND = "OUTBOUND"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class CallEvent < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+
8
+ field :call_session_id, -> { String }, optional: false, nullable: false
9
+
10
+ field :event_type, -> { String }, optional: false, nullable: false
11
+
12
+ field :source, -> { Pinnacle::Types::CallEventSource }, optional: false, nullable: false
13
+
14
+ field :direction, -> { Pinnacle::Types::CallDirection }, optional: false, nullable: true
15
+
16
+ field :command_id, -> { String }, optional: false, nullable: true
17
+
18
+ field :latency_ms, -> { Integer }, optional: false, nullable: true
19
+
20
+ field :occurred_at, -> { String }, optional: false, nullable: false
21
+
22
+ field :received_at, -> { String }, optional: false, nullable: false
23
+
24
+ field :payload, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ module CallEventSource
6
+ extend Pinnacle::Internal::Types::Enum
7
+
8
+ WEBHOOK = "WEBHOOK"
9
+ REST = "REST"
10
+ WS = "WS"
11
+ SYSTEM = "SYSTEM"
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ module CallMetadata
6
+ # CallMetadata is an alias for Hash
7
+
8
+ # @option str [String]
9
+ #
10
+ # @return [untyped]
11
+ def self.load(str)
12
+ ::JSON.parse(str)
13
+ end
14
+
15
+ # @option value [untyped]
16
+ #
17
+ # @return [String]
18
+ def self.dump(value)
19
+ ::JSON.generate(value)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ module CallState
6
+ extend Pinnacle::Internal::Types::Enum
7
+
8
+ INITIATED = "INITIATED"
9
+ RINGING = "RINGING"
10
+ ANSWERED = "ANSWERED"
11
+ BRIDGED = "BRIDGED"
12
+ ENDED = "ENDED"
13
+ FAILED = "FAILED"
14
+ NO_ANSWER = "NO_ANSWER"
15
+ BUSY = "BUSY"
16
+ CANCELED = "CANCELED"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ # Voice call lifecycle update delivered to webhooks attached to a phone number.
6
+ class CallStatusEvent < Internal::Types::Model
7
+ field :type, -> { String }, optional: false, nullable: false
8
+
9
+ field :sender, -> { String }, optional: false, nullable: false
10
+
11
+ field :call, -> { Pinnacle::Types::CallStatusEventCall }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class CallStatusEventCall < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+
8
+ field :from, -> { String }, optional: false, nullable: false
9
+
10
+ field :to, -> { String }, optional: false, nullable: false
11
+
12
+ field :direction, -> { Pinnacle::Types::CallDirection }, optional: false, nullable: false
13
+
14
+ field :status, -> { Pinnacle::Types::CallState }, optional: false, nullable: false
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class CallStreamToken < Internal::Types::Model
6
+ field :token, -> { String }, optional: false, nullable: false
7
+
8
+ field :expires_at, -> { String }, optional: false, nullable: false
9
+
10
+ field :stream_url, -> { String }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class CreatedCall < Internal::Types::Model
6
+ field :id, -> { String }, optional: false, nullable: false
7
+
8
+ field :state, -> { Pinnacle::Types::CallState }, optional: false, nullable: false
9
+
10
+ field :direction, -> { Pinnacle::Types::CallDirection }, optional: false, nullable: false
11
+
12
+ field :to, -> { String }, optional: false, nullable: false
13
+
14
+ field :from, -> { String }, optional: false, nullable: false
15
+
16
+ field :created_at, -> { String }, optional: false, nullable: false
17
+
18
+ field :started_at, -> { String }, optional: false, nullable: true
19
+
20
+ field :answered_at, -> { String }, optional: false, nullable: true
21
+
22
+ field :ended_at, -> { String }, optional: false, nullable: true
23
+
24
+ field :metadata, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: false
25
+
26
+ field :recording_state, -> { Pinnacle::Types::RecordingState }, optional: false, nullable: true
27
+
28
+ field :hangup_cause, -> { String }, optional: false, nullable: true
29
+
30
+ field :record, -> { Internal::Types::Boolean }, optional: false, nullable: false
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ module E164PhoneNumber
6
+ # E164PhoneNumber is an alias for String
7
+
8
+ # @option str [String]
9
+ #
10
+ # @return [untyped]
11
+ def self.load(str)
12
+ ::JSON.parse(str)
13
+ end
14
+
15
+ # @option value [untyped]
16
+ #
17
+ # @return [String]
18
+ def self.dump(value)
19
+ ::JSON.generate(value)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class HostedSilentAuthResponse < Internal::Types::Model
6
+ field :request_id, -> { String }, optional: false, nullable: false, api_name: "requestId"
7
+
8
+ field :browser_url, -> { String }, optional: false, nullable: false, api_name: "browserUrl"
9
+
10
+ field :expires_at, -> { String }, optional: false, nullable: false, api_name: "expiresAt"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class JsonSilentAuthResponse < Internal::Types::Model
6
+ field :request_id, -> { String }, optional: false, nullable: false, api_name: "requestId"
7
+
8
+ field :json_url, -> { String }, optional: false, nullable: false, api_name: "jsonUrl"
9
+
10
+ field :expires_at, -> { String }, optional: false, nullable: false, api_name: "expiresAt"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class ListCallEventsResponse < Internal::Types::Model
6
+ field :data, -> { Internal::Types::Array[Pinnacle::Types::CallEvent] }, optional: false, nullable: false
7
+
8
+ field :next_cursor, -> { String }, optional: false, nullable: true
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class ListCallsResponse < Internal::Types::Model
6
+ field :data, -> { Internal::Types::Array[Pinnacle::Types::Call] }, optional: false, nullable: false
7
+
8
+ field :next_cursor, -> { String }, optional: false, nullable: true
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ class ListNetworkRequestsResponse < Internal::Types::Model
6
+ field :data, -> { Internal::Types::Array[Pinnacle::Types::NetworkRequestSummary] }, optional: false, nullable: false
7
+
8
+ field :has_more, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "hasMore"
9
+
10
+ field :count, -> { Integer }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Pinnacle
4
+ module Types
5
+ module NetworkInsightStatus
6
+ extend Pinnacle::Internal::Types::Enum
7
+
8
+ AVAILABLE = "available"
9
+ UNAVAILABLE = "unavailable"
10
+ UNSUPPORTED = "unsupported"
11
+ FAILED = "failed"
12
+ end
13
+ end
14
+ end