freeclimb 4.7.0 → 4.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +21 -21
- data/README.md +7 -4
- data/docs/CompletionRequest.md +18 -0
- data/docs/CompletionResult.md +20 -0
- data/docs/DefaultApi.md +76 -0
- data/docs/SMSTenDLCCampaign.md +1 -1
- data/lib/freeclimb/api/default_api.rb +69 -0
- data/lib/freeclimb/models/completion_request.rb +246 -0
- data/lib/freeclimb/models/completion_result.rb +274 -0
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +2 -0
- data/openapi.json +76 -6
- data/package.json +3 -1
- data/spec/api/default_api_spec.rb +29 -0
- data/spec/models/account_request_spec.rb +2 -1
- data/spec/models/account_result_spec.rb +2 -1
- data/spec/models/add_to_conference_spec.rb +2 -7
- data/spec/models/application_list_spec.rb +2 -1
- data/spec/models/application_request_spec.rb +2 -1
- data/spec/models/application_result_spec.rb +2 -1
- data/spec/models/available_number_list_spec.rb +2 -1
- data/spec/models/available_number_spec.rb +2 -3
- data/spec/models/buy_incoming_number_request_spec.rb +2 -3
- data/spec/models/call_list_spec.rb +2 -1
- data/spec/models/call_result_spec.rb +2 -1
- data/spec/models/capabilities_spec.rb +2 -16
- data/spec/models/completion_request_spec.rb +165 -0
- data/spec/models/completion_result_spec.rb +203 -0
- data/spec/models/conference_list_spec.rb +2 -1
- data/spec/models/conference_participant_list_spec.rb +2 -1
- data/spec/models/conference_participant_result_spec.rb +2 -4
- data/spec/models/conference_result_spec.rb +2 -2
- data/spec/models/create_conference_request_spec.rb +2 -2
- data/spec/models/create_conference_spec.rb +2 -5
- data/spec/models/create_web_rtc_token_spec.rb +2 -5
- data/spec/models/enqueue_spec.rb +2 -7
- data/spec/models/filter_logs_request_spec.rb +2 -3
- data/spec/models/get_digits_spec.rb +2 -5
- data/spec/models/get_speech_spec.rb +2 -7
- data/spec/models/hangup_spec.rb +2 -1
- data/spec/models/incoming_number_list_spec.rb +2 -1
- data/spec/models/incoming_number_request_spec.rb +2 -1
- data/spec/models/incoming_number_result_spec.rb +2 -4
- data/spec/models/log_list_spec.rb +2 -1
- data/spec/models/log_result_spec.rb +2 -1
- data/spec/models/make_call_request_spec.rb +2 -6
- data/spec/models/message_request_spec.rb +2 -7
- data/spec/models/message_result_spec.rb +2 -1
- data/spec/models/messages_list_spec.rb +2 -1
- data/spec/models/mutable_resource_model_spec.rb +2 -1
- data/spec/models/out_dial_spec.rb +2 -10
- data/spec/models/pagination_model_spec.rb +2 -1
- data/spec/models/park_spec.rb +2 -5
- data/spec/models/pause_spec.rb +2 -3
- data/spec/models/percl_command_spec.rb +2 -1
- data/spec/models/percl_script_spec.rb +2 -1
- data/spec/models/play_early_media_spec.rb +2 -3
- data/spec/models/play_spec.rb +2 -4
- data/spec/models/queue_list_spec.rb +2 -1
- data/spec/models/queue_member_list_spec.rb +2 -1
- data/spec/models/queue_member_spec.rb +2 -1
- data/spec/models/queue_request_spec.rb +2 -1
- data/spec/models/queue_result_spec.rb +2 -1
- data/spec/models/record_utterance_spec.rb +2 -6
- data/spec/models/recording_list_spec.rb +2 -1
- data/spec/models/recording_result_spec.rb +2 -1
- data/spec/models/redirect_spec.rb +2 -3
- data/spec/models/reject_spec.rb +2 -1
- data/spec/models/say_spec.rb +2 -4
- data/spec/models/send_digits_spec.rb +2 -4
- data/spec/models/set_listen_spec.rb +2 -2
- data/spec/models/set_talk_spec.rb +2 -2
- data/spec/models/sms_spec.rb +2 -7
- data/spec/models/sms_ten_dlc_brand_spec.rb +132 -103
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +2 -1
- data/spec/models/sms_ten_dlc_campaign_spec.rb +21 -53
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +2 -1
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +2 -8
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +21 -43
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +2 -1
- data/spec/models/sms_toll_free_campaign_spec.rb +24 -29
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +2 -1
- data/spec/models/tfn_spec.rb +2 -3
- data/spec/models/transcribe_utterance_all_of_record_spec.rb +2 -6
- data/spec/models/transcribe_utterance_spec.rb +2 -6
- data/spec/models/update_call_request_spec.rb +2 -3
- data/spec/models/update_conference_participant_request_spec.rb +2 -3
- data/spec/models/update_conference_request_spec.rb +2 -1
- data/yarn.lock +27 -8
- metadata +89 -81
@@ -0,0 +1,274 @@
|
|
1
|
+
=begin
|
2
|
+
#FreeClimb API
|
3
|
+
|
4
|
+
#FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@freeclimb.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Freeclimb
|
17
|
+
class CompletionResult
|
18
|
+
# The generative response from the KnowledgeBase
|
19
|
+
attr_accessor :response
|
20
|
+
|
21
|
+
# Completion result status. Possible values: success, no_context
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
class EnumAttributeValidator
|
25
|
+
attr_reader :datatype
|
26
|
+
attr_reader :allowable_values
|
27
|
+
|
28
|
+
def initialize(datatype, allowable_values)
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
30
|
+
case datatype.to_s
|
31
|
+
when /Integer/i
|
32
|
+
value.to_i
|
33
|
+
when /Float/i
|
34
|
+
value.to_f
|
35
|
+
else
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(value)
|
42
|
+
!value || allowable_values.include?(value)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'response' => :'response',
|
50
|
+
:'status' => :'status'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.openapi_types
|
61
|
+
{
|
62
|
+
:'response' => :'String',
|
63
|
+
:'status' => :'String'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# List of attributes with nullable: true
|
68
|
+
def self.openapi_nullable
|
69
|
+
Set.new([
|
70
|
+
])
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
def initialize(attributes = {})
|
76
|
+
if (!attributes.is_a?(Hash))
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Freeclimb::CompletionResult` initialize method"
|
78
|
+
end
|
79
|
+
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Freeclimb::CompletionResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
|
+
end
|
85
|
+
h[k.to_sym] = v
|
86
|
+
}
|
87
|
+
|
88
|
+
if attributes.key?(:'response')
|
89
|
+
self.response = attributes[:'response']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'status')
|
93
|
+
self.status = attributes[:'status']
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
98
|
+
# @return Array for valid properties with the reasons
|
99
|
+
def list_invalid_properties
|
100
|
+
invalid_properties = Array.new
|
101
|
+
if @response.nil?
|
102
|
+
invalid_properties.push('invalid value for "response", response cannot be nil.')
|
103
|
+
end
|
104
|
+
|
105
|
+
if @status.nil?
|
106
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
107
|
+
end
|
108
|
+
|
109
|
+
invalid_properties
|
110
|
+
end
|
111
|
+
|
112
|
+
# Check to see if the all the properties in the model are valid
|
113
|
+
# @return true if the model is valid
|
114
|
+
def valid?
|
115
|
+
|
116
|
+
if @response.nil?
|
117
|
+
false
|
118
|
+
else
|
119
|
+
list_invalid_properties.length() == 0
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# Custom attribute writer method checking allowed values (enum).
|
124
|
+
# @param [Object] status Object to be assigned
|
125
|
+
def status=(status)
|
126
|
+
validator = EnumAttributeValidator.new('String', ["success", "no_context"])
|
127
|
+
unless validator.valid?(status)
|
128
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
129
|
+
end
|
130
|
+
@status = status
|
131
|
+
end
|
132
|
+
|
133
|
+
# Checks equality by comparing each attribute.
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def ==(o)
|
136
|
+
return true if self.equal?(o)
|
137
|
+
self.class == o.class &&
|
138
|
+
response == o.response &&
|
139
|
+
status == o.status
|
140
|
+
end
|
141
|
+
|
142
|
+
# @see the `==` method
|
143
|
+
# @param [Object] Object to be compared
|
144
|
+
def eql?(o)
|
145
|
+
self == o
|
146
|
+
end
|
147
|
+
|
148
|
+
# Calculates hash code according to all attributes.
|
149
|
+
# @return [Integer] Hash code
|
150
|
+
def hash
|
151
|
+
[response, status].hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Builds the object from hash
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
156
|
+
# @return [Object] Returns the model itself
|
157
|
+
def self.build_from_hash(attributes)
|
158
|
+
new.build_from_hash(attributes)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Builds the object from hash
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
+
# @return [Object] Returns the model itself
|
164
|
+
def build_from_hash(attributes)
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
166
|
+
self.class.openapi_types.each_pair do |key, type|
|
167
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
168
|
+
self.send("#{key}=", nil)
|
169
|
+
elsif type =~ /\AArray<(.*)>/i
|
170
|
+
# check to ensure the input is an array given that the attribute
|
171
|
+
# is documented as an array but the input is not
|
172
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
173
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
174
|
+
end
|
175
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
176
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
self
|
181
|
+
end
|
182
|
+
|
183
|
+
# Deserializes the data based on type
|
184
|
+
# @param string type Data type
|
185
|
+
# @param string value Value to be deserialized
|
186
|
+
# @return [Object] Deserialized data
|
187
|
+
def _deserialize(type, value)
|
188
|
+
case type.to_sym
|
189
|
+
when :Time
|
190
|
+
Time.parse(value)
|
191
|
+
when :Date
|
192
|
+
Date.parse(value)
|
193
|
+
when :String
|
194
|
+
value.to_s
|
195
|
+
when :Integer
|
196
|
+
value.to_i
|
197
|
+
when :Float
|
198
|
+
value.to_f
|
199
|
+
when :Boolean
|
200
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
201
|
+
true
|
202
|
+
else
|
203
|
+
false
|
204
|
+
end
|
205
|
+
when :Object
|
206
|
+
# generic object (usually a Hash), return directly
|
207
|
+
value
|
208
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
209
|
+
inner_type = Regexp.last_match[:inner_type]
|
210
|
+
value.map { |v| _deserialize(inner_type, v) }
|
211
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
212
|
+
k_type = Regexp.last_match[:k_type]
|
213
|
+
v_type = Regexp.last_match[:v_type]
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each do |k, v|
|
216
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
else # model
|
220
|
+
# models (e.g. Pet) or oneOf
|
221
|
+
klass = Freeclimb.const_get(type)
|
222
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the string representation of the object
|
227
|
+
# @return [String] String presentation of the object
|
228
|
+
def to_s
|
229
|
+
to_hash.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_body
|
235
|
+
to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the object in the form of hash
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_hash
|
241
|
+
hash = {}
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
243
|
+
value = self.send(attr)
|
244
|
+
if value.nil?
|
245
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
246
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
247
|
+
end
|
248
|
+
|
249
|
+
hash[param] = _to_hash(value)
|
250
|
+
end
|
251
|
+
hash
|
252
|
+
end
|
253
|
+
|
254
|
+
# Outputs non-array value in the form of hash
|
255
|
+
# For object, use to_hash. Otherwise, just return the value
|
256
|
+
# @param [Object] value Any valid value
|
257
|
+
# @return [Hash] Returns the value in the form of hash
|
258
|
+
def _to_hash(value)
|
259
|
+
if value.is_a?(Array)
|
260
|
+
value.compact.map { |v| _to_hash(v) }
|
261
|
+
elsif value.is_a?(Hash)
|
262
|
+
{}.tap do |hash|
|
263
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
264
|
+
end
|
265
|
+
elsif value.respond_to? :to_hash
|
266
|
+
value.to_hash
|
267
|
+
else
|
268
|
+
value
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
data/lib/freeclimb/version.rb
CHANGED
data/lib/freeclimb.rb
CHANGED
@@ -40,6 +40,8 @@ require 'freeclimb/models/call_result'
|
|
40
40
|
require 'freeclimb/models/call_result_all_of'
|
41
41
|
require 'freeclimb/models/call_status'
|
42
42
|
require 'freeclimb/models/capabilities'
|
43
|
+
require 'freeclimb/models/completion_request'
|
44
|
+
require 'freeclimb/models/completion_result'
|
43
45
|
require 'freeclimb/models/conference_list'
|
44
46
|
require 'freeclimb/models/conference_list_all_of'
|
45
47
|
require 'freeclimb/models/conference_participant_list'
|
data/openapi.json
CHANGED
@@ -1235,7 +1235,6 @@
|
|
1235
1235
|
"type": "string"
|
1236
1236
|
},
|
1237
1237
|
"from": {
|
1238
|
-
"x-is-private-property": true,
|
1239
1238
|
"description": "E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb.",
|
1240
1239
|
"type": "string"
|
1241
1240
|
},
|
@@ -1791,7 +1790,6 @@
|
|
1791
1790
|
"nullable": true
|
1792
1791
|
},
|
1793
1792
|
"from": {
|
1794
|
-
"x-is-private-property": true,
|
1795
1793
|
"type": "string",
|
1796
1794
|
"description": "Phone number that initiated this Call.",
|
1797
1795
|
"nullable": true
|
@@ -1863,7 +1861,6 @@
|
|
1863
1861
|
"required": ["from", "to"],
|
1864
1862
|
"properties": {
|
1865
1863
|
"from": {
|
1866
|
-
"x-is-private-property": true,
|
1867
1864
|
"type": "string",
|
1868
1865
|
"description": "Phone number to use as the caller ID. This can be: (a) The To or From number provided in FreeClimb's initial request to your app or (b) Any incoming phone number you have purchased from FreeClimb."
|
1869
1866
|
},
|
@@ -2136,7 +2133,6 @@
|
|
2136
2133
|
"required": ["from", "to", "text"],
|
2137
2134
|
"properties": {
|
2138
2135
|
"from": {
|
2139
|
-
"x-is-private-property": true,
|
2140
2136
|
"type": "string",
|
2141
2137
|
"description": "Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb."
|
2142
2138
|
},
|
@@ -2165,6 +2161,38 @@
|
|
2165
2161
|
}
|
2166
2162
|
]
|
2167
2163
|
},
|
2164
|
+
"CompletionRequest": {
|
2165
|
+
"type": "object",
|
2166
|
+
"required": ["query"],
|
2167
|
+
"properties": {
|
2168
|
+
"query": {
|
2169
|
+
"type": "string",
|
2170
|
+
"maxLength": 2000,
|
2171
|
+
"description": "Question to ask the Knowledge Base"
|
2172
|
+
}
|
2173
|
+
}
|
2174
|
+
},
|
2175
|
+
"CompletionResult": {
|
2176
|
+
"type": "object",
|
2177
|
+
"required": ["response", "status"],
|
2178
|
+
"x-completion-result": true,
|
2179
|
+
"properties": {
|
2180
|
+
"response": {
|
2181
|
+
"type": "string",
|
2182
|
+
"description": "The generative response from the KnowledgeBase"
|
2183
|
+
},
|
2184
|
+
"status": {
|
2185
|
+
"type": "string",
|
2186
|
+
"x-has-writer": true,
|
2187
|
+
"description": "Completion result status. Possible values: success, no_context",
|
2188
|
+
"x-enum-type": "CompletionResultStatusEnum",
|
2189
|
+
"x-enum-type-c-sharp": "StatusEnum",
|
2190
|
+
"enum": ["success", "no_context"],
|
2191
|
+
"x-enum-varnames": ["SUCCESS", "NO_CONTEXT"],
|
2192
|
+
"x-enum-varnames-values": ["success", "no_context"]
|
2193
|
+
}
|
2194
|
+
}
|
2195
|
+
},
|
2168
2196
|
"ConferenceList": {
|
2169
2197
|
"x-implements": "Pagination",
|
2170
2198
|
"allOf": [
|
@@ -2208,7 +2236,6 @@
|
|
2208
2236
|
"$ref": "#/components/schemas/MessageStatus"
|
2209
2237
|
},
|
2210
2238
|
"from": {
|
2211
|
-
"x-is-private-property": true,
|
2212
2239
|
"type": "string",
|
2213
2240
|
"description": "Phone number in E.164 format that sent the message.",
|
2214
2241
|
"nullable": true
|
@@ -3623,7 +3650,6 @@
|
|
3623
3650
|
"description": "E.164 formatted phone number to which calls using this token will be made."
|
3624
3651
|
},
|
3625
3652
|
"from": {
|
3626
|
-
"x-is-private-property": true,
|
3627
3653
|
"type": "string",
|
3628
3654
|
"description": "E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made."
|
3629
3655
|
},
|
@@ -4226,6 +4252,50 @@
|
|
4226
4252
|
}
|
4227
4253
|
}
|
4228
4254
|
},
|
4255
|
+
"/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion": {
|
4256
|
+
"post": {
|
4257
|
+
"tags": [],
|
4258
|
+
"summary": "Query the knowledge base",
|
4259
|
+
"operationId": "create-knowledge-base-completion",
|
4260
|
+
"parameters": [
|
4261
|
+
{
|
4262
|
+
"$ref": "#/components/parameters/AccountId"
|
4263
|
+
},
|
4264
|
+
{
|
4265
|
+
"name": "knowledgeBaseId",
|
4266
|
+
"in": "path",
|
4267
|
+
"description": "A string that uniquely identifies the KnowledgeBase resource.",
|
4268
|
+
"required": true,
|
4269
|
+
"schema": {
|
4270
|
+
"type": "string"
|
4271
|
+
}
|
4272
|
+
}
|
4273
|
+
],
|
4274
|
+
"requestBody": {
|
4275
|
+
"description": "Completion request details",
|
4276
|
+
"content": {
|
4277
|
+
"application/json": {
|
4278
|
+
"schema": {
|
4279
|
+
"$ref": "#/components/schemas/CompletionRequest"
|
4280
|
+
}
|
4281
|
+
}
|
4282
|
+
}
|
4283
|
+
},
|
4284
|
+
"deprecated": false,
|
4285
|
+
"responses": {
|
4286
|
+
"200": {
|
4287
|
+
"description": "KnowledgeaBase completion response",
|
4288
|
+
"content": {
|
4289
|
+
"application/json": {
|
4290
|
+
"schema": {
|
4291
|
+
"$ref": "#/components/schemas/CompletionResult"
|
4292
|
+
}
|
4293
|
+
}
|
4294
|
+
}
|
4295
|
+
}
|
4296
|
+
}
|
4297
|
+
}
|
4298
|
+
},
|
4229
4299
|
"/Accounts/{accountId}/Calls/{callId}": {
|
4230
4300
|
"get": {
|
4231
4301
|
"tags": [],
|
data/package.json
CHANGED
@@ -252,6 +252,9 @@ describe 'DefaultApi' do
|
|
252
252
|
|
253
253
|
@create_web_rtc_token_make_a_webrtc_jwt_test_value=Freeclimb::CreateWebRTCToken.new({to: 'to_example', from: 'from_example', uses: 2})
|
254
254
|
|
255
|
+
@knowledge_base_id_create_knowledge_base_completion_test_value= 'knowledgeBaseId_example'
|
256
|
+
|
257
|
+
@completion_request_create_knowledge_base_completion_test_value=Freeclimb::CompletionRequest.new({query: 'query_example'})
|
255
258
|
end
|
256
259
|
|
257
260
|
after do
|
@@ -361,6 +364,32 @@ describe 'DefaultApi' do
|
|
361
364
|
end
|
362
365
|
end
|
363
366
|
|
367
|
+
# unit tests for create_knowledge_base_completion
|
368
|
+
# Query the knowledge base
|
369
|
+
# @param knowledge_base_id A string that uniquely identifies the KnowledgeBase resource.
|
370
|
+
# @param [Hash] opts the optional parameters
|
371
|
+
# @option opts [CompletionRequest] :completion_request Completion request details
|
372
|
+
# @return [CompletionResult]
|
373
|
+
describe 'create_knowledge_base_completion test' do
|
374
|
+
it 'should work' do
|
375
|
+
|
376
|
+
knowledge_base_id = @knowledge_base_id_create_knowledge_base_completion_test_value
|
377
|
+
completion_request = @completion_request_create_knowledge_base_completion_test_value
|
378
|
+
|
379
|
+
result = @api_instance.create_knowledge_base_completion(
|
380
|
+
knowledge_base_id,
|
381
|
+
{
|
382
|
+
:completion_request => completion_request,
|
383
|
+
}
|
384
|
+
)
|
385
|
+
false
|
386
|
+
|
387
|
+
expect(result).to be_a Freeclimb::CompletionResult
|
388
|
+
|
389
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
364
393
|
# unit tests for delete_a_recording
|
365
394
|
# Delete a Recording
|
366
395
|
# @param recording_id String that uniquely identifies this recording resource.
|
@@ -158,14 +158,9 @@ describe Freeclimb::AddToConference do
|
|
158
158
|
expect(instance.valid?).to eq(true)
|
159
159
|
end
|
160
160
|
|
161
|
-
|
161
|
+
|
162
|
+
skip 'checks if properties are invalid' do
|
162
163
|
instance = Freeclimb::AddToConference.new(
|
163
|
-
allow_call_control: nil,
|
164
|
-
|
165
|
-
conference_id: nil,
|
166
|
-
listen: nil,
|
167
|
-
start_conf_on_enter: nil,
|
168
|
-
talk: nil,
|
169
164
|
|
170
165
|
)
|
171
166
|
expect(instance.valid?).to eq(false)
|
@@ -158,7 +158,8 @@ describe Freeclimb::AvailableNumberList do
|
|
158
158
|
expect(instance.valid?).to eq(true)
|
159
159
|
end
|
160
160
|
|
161
|
-
|
161
|
+
|
162
|
+
skip 'checks if properties are invalid' do
|
162
163
|
instance = Freeclimb::AvailableNumberList.new(
|
163
164
|
|
164
165
|
)
|
@@ -134,10 +134,9 @@ describe Freeclimb::AvailableNumber do
|
|
134
134
|
expect(instance.valid?).to eq(true)
|
135
135
|
end
|
136
136
|
|
137
|
-
|
137
|
+
|
138
|
+
skip 'checks if properties are invalid' do
|
138
139
|
instance = Freeclimb::AvailableNumber.new(
|
139
|
-
voice_enabled: nil,
|
140
|
-
sms_enabled: nil,
|
141
140
|
|
142
141
|
)
|
143
142
|
expect(instance.valid?).to eq(false)
|
@@ -86,11 +86,10 @@ describe Freeclimb::BuyIncomingNumberRequest do
|
|
86
86
|
expect(instance.valid?).to eq(true)
|
87
87
|
end
|
88
88
|
|
89
|
-
|
89
|
+
|
90
|
+
skip 'checks if properties are invalid' do
|
90
91
|
instance = Freeclimb::BuyIncomingNumberRequest.new(
|
91
92
|
|
92
|
-
phone_number: nil,
|
93
|
-
|
94
93
|
)
|
95
94
|
expect(instance.valid?).to eq(false)
|
96
95
|
end
|
@@ -110,23 +110,9 @@ describe Freeclimb::Capabilities do
|
|
110
110
|
expect(instance.valid?).to eq(true)
|
111
111
|
end
|
112
112
|
|
113
|
-
|
113
|
+
|
114
|
+
skip 'checks if properties are invalid' do
|
114
115
|
instance = Freeclimb::Capabilities.new(
|
115
|
-
voice: nil,
|
116
|
-
|
117
|
-
voice: nil,
|
118
|
-
sms: nil,
|
119
|
-
|
120
|
-
sms: nil,
|
121
|
-
toll_free: nil,
|
122
|
-
|
123
|
-
toll_free: nil,
|
124
|
-
ten_dlc: nil,
|
125
|
-
|
126
|
-
ten_dlc: nil,
|
127
|
-
short_code: nil,
|
128
|
-
|
129
|
-
short_code: nil,
|
130
116
|
|
131
117
|
)
|
132
118
|
expect(instance.valid?).to eq(false)
|