carbon_ruby_sdk 0.2.34 → 0.2.36
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/Gemfile.lock +1 -1
- data/README.md +460 -2
- data/lib/carbon_ruby_sdk/api/crm_api.rb +909 -0
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +298 -0
- data/lib/carbon_ruby_sdk/models/account.rb +398 -0
- data/lib/carbon_ruby_sdk/models/account_filters.rb +226 -0
- data/lib/carbon_ruby_sdk/models/account_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/accounts_order_by.rb +39 -0
- data/lib/carbon_ruby_sdk/models/accounts_order_by_nullable.rb +39 -0
- data/lib/carbon_ruby_sdk/models/accounts_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/address.rb +276 -0
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +32 -6
- data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +245 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +379 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_get_file_input.rb +226 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/base_includes.rb +36 -0
- data/lib/carbon_ruby_sdk/models/contact.rb +434 -0
- data/lib/carbon_ruby_sdk/models/contact_filters.rb +236 -0
- data/lib/carbon_ruby_sdk/models/contacts_order_by.rb +39 -0
- data/lib/carbon_ruby_sdk/models/contacts_order_by_nullable.rb +39 -0
- data/lib/carbon_ruby_sdk/models/contacts_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/contacts_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/email.rb +230 -0
- data/lib/carbon_ruby_sdk/models/event.rb +370 -0
- data/lib/carbon_ruby_sdk/models/lead.rb +468 -0
- data/lib/carbon_ruby_sdk/models/lead_filters.rb +246 -0
- data/lib/carbon_ruby_sdk/models/leads_order_by.rb +38 -0
- data/lib/carbon_ruby_sdk/models/leads_order_by_nullable.rb +38 -0
- data/lib/carbon_ruby_sdk/models/leads_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/leads_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +250 -0
- data/lib/carbon_ruby_sdk/models/opportunities_order_by.rb +40 -0
- data/lib/carbon_ruby_sdk/models/opportunities_order_by_nullable.rb +40 -0
- data/lib/carbon_ruby_sdk/models/opportunities_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/opportunities_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/opportunity.rb +400 -0
- data/lib/carbon_ruby_sdk/models/opportunity_filters.rb +246 -0
- data/lib/carbon_ruby_sdk/models/opportunity_status.rb +36 -0
- data/lib/carbon_ruby_sdk/models/opportunity_status_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/order_dir_v2_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/partial_account.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_account_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_contact.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_contact_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_owner.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_owner_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/phone_number.rb +230 -0
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +1 -5
- data/lib/carbon_ruby_sdk/models/task.rb +346 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +47 -0
- data/spec/api/crm_api_spec.rb +129 -0
- data/spec/api/integrations_api_spec.rb +24 -0
- data/spec/models/account_filters_spec.rb +34 -0
- data/spec/models/account_response_spec.rb +40 -0
- data/spec/models/account_spec.rb +118 -0
- data/spec/models/accounts_order_by_nullable_spec.rb +22 -0
- data/spec/models/accounts_order_by_spec.rb +22 -0
- data/spec/models/accounts_request_spec.rb +70 -0
- data/spec/models/address_spec.rb +64 -0
- data/spec/models/authentication_property_spec.rb +12 -0
- data/spec/models/azure_blob_auth_request_spec.rb +40 -0
- data/spec/models/azure_blob_file_sync_input_spec.rb +112 -0
- data/spec/models/azure_blob_get_file_input_spec.rb +34 -0
- data/spec/models/azure_blob_storage_authentication_spec.rb +40 -0
- data/spec/models/base_includes_spec.rb +22 -0
- data/spec/models/contact_filters_spec.rb +40 -0
- data/spec/models/contact_spec.rb +136 -0
- data/spec/models/contacts_order_by_nullable_spec.rb +22 -0
- data/spec/models/contacts_order_by_spec.rb +22 -0
- data/spec/models/contacts_request_spec.rb +70 -0
- data/spec/models/contacts_response_spec.rb +40 -0
- data/spec/models/email_spec.rb +34 -0
- data/spec/models/event_spec.rb +106 -0
- data/spec/models/lead_filters_spec.rb +46 -0
- data/spec/models/lead_spec.rb +154 -0
- data/spec/models/leads_order_by_nullable_spec.rb +22 -0
- data/spec/models/leads_order_by_spec.rb +22 -0
- data/spec/models/leads_request_spec.rb +70 -0
- data/spec/models/leads_response_spec.rb +40 -0
- data/spec/models/one_drive_authentication_spec.rb +46 -0
- data/spec/models/opportunities_order_by_nullable_spec.rb +22 -0
- data/spec/models/opportunities_order_by_spec.rb +22 -0
- data/spec/models/opportunities_request_spec.rb +70 -0
- data/spec/models/opportunities_response_spec.rb +40 -0
- data/spec/models/opportunity_filters_spec.rb +46 -0
- data/spec/models/opportunity_spec.rb +124 -0
- data/spec/models/opportunity_status_nullable_spec.rb +22 -0
- data/spec/models/opportunity_status_spec.rb +22 -0
- data/spec/models/order_dir_v2_nullable_spec.rb +22 -0
- data/spec/models/partial_account_nullable_spec.rb +28 -0
- data/spec/models/partial_account_spec.rb +28 -0
- data/spec/models/partial_contact_nullable_spec.rb +28 -0
- data/spec/models/partial_contact_spec.rb +28 -0
- data/spec/models/partial_owner_nullable_spec.rb +28 -0
- data/spec/models/partial_owner_spec.rb +28 -0
- data/spec/models/phone_number_spec.rb +34 -0
- data/spec/models/sent_webhook_payload_spec.rb +1 -1
- data/spec/models/task_spec.rb +94 -0
- metadata +137 -2
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'date'
|
|
10
|
+
require 'time'
|
|
11
|
+
|
|
12
|
+
module Carbon
|
|
13
|
+
class Task
|
|
14
|
+
attr_accessor :description
|
|
15
|
+
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
attr_accessor :owner
|
|
19
|
+
|
|
20
|
+
attr_accessor :subject
|
|
21
|
+
|
|
22
|
+
attr_accessor :status
|
|
23
|
+
|
|
24
|
+
attr_accessor :priority
|
|
25
|
+
|
|
26
|
+
attr_accessor :account
|
|
27
|
+
|
|
28
|
+
attr_accessor :contact
|
|
29
|
+
|
|
30
|
+
attr_accessor :created_at
|
|
31
|
+
|
|
32
|
+
attr_accessor :updated_at
|
|
33
|
+
|
|
34
|
+
attr_accessor :is_deleted
|
|
35
|
+
|
|
36
|
+
attr_accessor :remote_data
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'description' => :'description',
|
|
42
|
+
:'id' => :'id',
|
|
43
|
+
:'owner' => :'owner',
|
|
44
|
+
:'subject' => :'subject',
|
|
45
|
+
:'status' => :'status',
|
|
46
|
+
:'priority' => :'priority',
|
|
47
|
+
:'account' => :'account',
|
|
48
|
+
:'contact' => :'contact',
|
|
49
|
+
:'created_at' => :'created_at',
|
|
50
|
+
:'updated_at' => :'updated_at',
|
|
51
|
+
:'is_deleted' => :'is_deleted',
|
|
52
|
+
:'remote_data' => :'remote_data'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'description' => :'String',
|
|
65
|
+
:'id' => :'String',
|
|
66
|
+
:'owner' => :'PartialOwner',
|
|
67
|
+
:'subject' => :'String',
|
|
68
|
+
:'status' => :'String',
|
|
69
|
+
:'priority' => :'String',
|
|
70
|
+
:'account' => :'PartialAccountNullable',
|
|
71
|
+
:'contact' => :'PartialContactNullable',
|
|
72
|
+
:'created_at' => :'String',
|
|
73
|
+
:'updated_at' => :'String',
|
|
74
|
+
:'is_deleted' => :'Boolean',
|
|
75
|
+
:'remote_data' => :'Object'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# List of attributes with nullable: true
|
|
80
|
+
def self.openapi_nullable
|
|
81
|
+
Set.new([
|
|
82
|
+
:'description',
|
|
83
|
+
:'subject',
|
|
84
|
+
:'status',
|
|
85
|
+
:'priority',
|
|
86
|
+
:'account',
|
|
87
|
+
:'contact',
|
|
88
|
+
:'remote_data'
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::Task` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::Task`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
103
|
+
end
|
|
104
|
+
h[k.to_sym] = v
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'description')
|
|
108
|
+
self.description = attributes[:'description']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'id')
|
|
112
|
+
self.id = attributes[:'id']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'owner')
|
|
116
|
+
self.owner = attributes[:'owner']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'subject')
|
|
120
|
+
self.subject = attributes[:'subject']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'status')
|
|
124
|
+
self.status = attributes[:'status']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'priority')
|
|
128
|
+
self.priority = attributes[:'priority']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'account')
|
|
132
|
+
self.account = attributes[:'account']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'contact')
|
|
136
|
+
self.contact = attributes[:'contact']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'created_at')
|
|
140
|
+
self.created_at = attributes[:'created_at']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'updated_at')
|
|
144
|
+
self.updated_at = attributes[:'updated_at']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'is_deleted')
|
|
148
|
+
self.is_deleted = attributes[:'is_deleted']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'remote_data')
|
|
152
|
+
self.remote_data = attributes[:'remote_data']
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
157
|
+
# @return Array for valid properties with the reasons
|
|
158
|
+
def list_invalid_properties
|
|
159
|
+
invalid_properties = Array.new
|
|
160
|
+
if @id.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @owner.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @created_at.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @updated_at.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if @is_deleted.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "is_deleted", is_deleted cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
invalid_properties
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Check to see if the all the properties in the model are valid
|
|
184
|
+
# @return true if the model is valid
|
|
185
|
+
def valid?
|
|
186
|
+
return false if @id.nil?
|
|
187
|
+
return false if @owner.nil?
|
|
188
|
+
return false if @created_at.nil?
|
|
189
|
+
return false if @updated_at.nil?
|
|
190
|
+
return false if @is_deleted.nil?
|
|
191
|
+
true
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Checks equality by comparing each attribute.
|
|
195
|
+
# @param [Object] Object to be compared
|
|
196
|
+
def ==(o)
|
|
197
|
+
return true if self.equal?(o)
|
|
198
|
+
self.class == o.class &&
|
|
199
|
+
description == o.description &&
|
|
200
|
+
id == o.id &&
|
|
201
|
+
owner == o.owner &&
|
|
202
|
+
subject == o.subject &&
|
|
203
|
+
status == o.status &&
|
|
204
|
+
priority == o.priority &&
|
|
205
|
+
account == o.account &&
|
|
206
|
+
contact == o.contact &&
|
|
207
|
+
created_at == o.created_at &&
|
|
208
|
+
updated_at == o.updated_at &&
|
|
209
|
+
is_deleted == o.is_deleted &&
|
|
210
|
+
remote_data == o.remote_data
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Integer] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[description, id, owner, subject, status, priority, account, contact, created_at, updated_at, is_deleted, remote_data].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Builds the object from hash
|
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
227
|
+
# @return [Object] Returns the model itself
|
|
228
|
+
def self.build_from_hash(attributes)
|
|
229
|
+
new.build_from_hash(attributes)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Builds the object from hash
|
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
234
|
+
# @return [Object] Returns the model itself
|
|
235
|
+
def build_from_hash(attributes)
|
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
|
237
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
238
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
239
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
240
|
+
self.send("#{key}=", nil)
|
|
241
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
242
|
+
# check to ensure the input is an array given that the attribute
|
|
243
|
+
# is documented as an array but the input is not
|
|
244
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
245
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
246
|
+
end
|
|
247
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
248
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
self
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Deserializes the data based on type
|
|
256
|
+
# @param string type Data type
|
|
257
|
+
# @param string value Value to be deserialized
|
|
258
|
+
# @return [Object] Deserialized data
|
|
259
|
+
def _deserialize(type, value)
|
|
260
|
+
case type.to_sym
|
|
261
|
+
when :Time
|
|
262
|
+
Time.parse(value)
|
|
263
|
+
when :Date
|
|
264
|
+
Date.parse(value)
|
|
265
|
+
when :String
|
|
266
|
+
value.to_s
|
|
267
|
+
when :Integer
|
|
268
|
+
value.to_i
|
|
269
|
+
when :Float
|
|
270
|
+
value.to_f
|
|
271
|
+
when :Boolean
|
|
272
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
273
|
+
true
|
|
274
|
+
else
|
|
275
|
+
false
|
|
276
|
+
end
|
|
277
|
+
when :Object
|
|
278
|
+
# generic object (usually a Hash), return directly
|
|
279
|
+
value
|
|
280
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
281
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
282
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
283
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
284
|
+
k_type = Regexp.last_match[:k_type]
|
|
285
|
+
v_type = Regexp.last_match[:v_type]
|
|
286
|
+
{}.tap do |hash|
|
|
287
|
+
value.each do |k, v|
|
|
288
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
else # model
|
|
292
|
+
# models (e.g. Pet) or oneOf
|
|
293
|
+
klass = Carbon.const_get(type)
|
|
294
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Returns the string representation of the object
|
|
299
|
+
# @return [String] String presentation of the object
|
|
300
|
+
def to_s
|
|
301
|
+
to_hash.to_s
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
305
|
+
# @return [Hash] Returns the object in the form of hash
|
|
306
|
+
def to_body
|
|
307
|
+
to_hash
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Returns the object in the form of hash
|
|
311
|
+
# @return [Hash] Returns the object in the form of hash
|
|
312
|
+
def to_hash
|
|
313
|
+
hash = {}
|
|
314
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
315
|
+
value = self.send(attr)
|
|
316
|
+
if value.nil?
|
|
317
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
318
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
hash[param] = _to_hash(value)
|
|
322
|
+
end
|
|
323
|
+
hash
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Outputs non-array value in the form of hash
|
|
327
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
328
|
+
# @param [Object] value Any valid value
|
|
329
|
+
# @return [Hash] Returns the value in the form of hash
|
|
330
|
+
def _to_hash(value)
|
|
331
|
+
if value.is_a?(Array)
|
|
332
|
+
value.compact.map { |v| _to_hash(v) }
|
|
333
|
+
elsif value.is_a?(Hash)
|
|
334
|
+
{}.tap do |hash|
|
|
335
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
336
|
+
end
|
|
337
|
+
elsif value.respond_to? :to_hash
|
|
338
|
+
value.to_hash
|
|
339
|
+
else
|
|
340
|
+
value
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
end
|
data/lib/carbon_ruby_sdk.rb
CHANGED
|
@@ -15,10 +15,22 @@ require 'carbon_ruby_sdk/version'
|
|
|
15
15
|
require 'carbon_ruby_sdk/configuration'
|
|
16
16
|
|
|
17
17
|
# Models
|
|
18
|
+
require 'carbon_ruby_sdk/models/account'
|
|
19
|
+
require 'carbon_ruby_sdk/models/account_filters'
|
|
20
|
+
require 'carbon_ruby_sdk/models/account_response'
|
|
21
|
+
require 'carbon_ruby_sdk/models/accounts_order_by'
|
|
22
|
+
require 'carbon_ruby_sdk/models/accounts_order_by_nullable'
|
|
23
|
+
require 'carbon_ruby_sdk/models/accounts_request'
|
|
18
24
|
require 'carbon_ruby_sdk/models/add_webhook_props'
|
|
25
|
+
require 'carbon_ruby_sdk/models/address'
|
|
19
26
|
require 'carbon_ruby_sdk/models/authentication_property'
|
|
20
27
|
require 'carbon_ruby_sdk/models/auto_sync_enabled_sources_property'
|
|
21
28
|
require 'carbon_ruby_sdk/models/auto_synced_source_types_property_inner'
|
|
29
|
+
require 'carbon_ruby_sdk/models/azure_blob_auth_request'
|
|
30
|
+
require 'carbon_ruby_sdk/models/azure_blob_file_sync_input'
|
|
31
|
+
require 'carbon_ruby_sdk/models/azure_blob_get_file_input'
|
|
32
|
+
require 'carbon_ruby_sdk/models/azure_blob_storage_authentication'
|
|
33
|
+
require 'carbon_ruby_sdk/models/base_includes'
|
|
22
34
|
require 'carbon_ruby_sdk/models/body_create_upload_file_uploadfile_post'
|
|
23
35
|
require 'carbon_ruby_sdk/models/chunk_properties'
|
|
24
36
|
require 'carbon_ruby_sdk/models/chunk_properties_nullable'
|
|
@@ -28,6 +40,12 @@ require 'carbon_ruby_sdk/models/cold_storage_props'
|
|
|
28
40
|
require 'carbon_ruby_sdk/models/confluence_authentication'
|
|
29
41
|
require 'carbon_ruby_sdk/models/connect_data_source_input'
|
|
30
42
|
require 'carbon_ruby_sdk/models/connect_data_source_response'
|
|
43
|
+
require 'carbon_ruby_sdk/models/contact'
|
|
44
|
+
require 'carbon_ruby_sdk/models/contact_filters'
|
|
45
|
+
require 'carbon_ruby_sdk/models/contacts_order_by'
|
|
46
|
+
require 'carbon_ruby_sdk/models/contacts_order_by_nullable'
|
|
47
|
+
require 'carbon_ruby_sdk/models/contacts_request'
|
|
48
|
+
require 'carbon_ruby_sdk/models/contacts_response'
|
|
31
49
|
require 'carbon_ruby_sdk/models/custom_credentials_type'
|
|
32
50
|
require 'carbon_ruby_sdk/models/data_source_configuration'
|
|
33
51
|
require 'carbon_ruby_sdk/models/data_source_last_sync_actions'
|
|
@@ -40,6 +58,7 @@ require 'carbon_ruby_sdk/models/delete_users_input'
|
|
|
40
58
|
require 'carbon_ruby_sdk/models/directory_item'
|
|
41
59
|
require 'carbon_ruby_sdk/models/document_response'
|
|
42
60
|
require 'carbon_ruby_sdk/models/document_response_list'
|
|
61
|
+
require 'carbon_ruby_sdk/models/email'
|
|
43
62
|
require 'carbon_ruby_sdk/models/embedding_and_chunk'
|
|
44
63
|
require 'carbon_ruby_sdk/models/embedding_generators'
|
|
45
64
|
require 'carbon_ruby_sdk/models/embedding_generators_nullable'
|
|
@@ -51,6 +70,7 @@ require 'carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns'
|
|
|
51
70
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input'
|
|
52
71
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2'
|
|
53
72
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_response'
|
|
73
|
+
require 'carbon_ruby_sdk/models/event'
|
|
54
74
|
require 'carbon_ruby_sdk/models/external_file_sync_statuses'
|
|
55
75
|
require 'carbon_ruby_sdk/models/external_source_item'
|
|
56
76
|
require 'carbon_ruby_sdk/models/external_source_items_order_by'
|
|
@@ -83,6 +103,12 @@ require 'carbon_ruby_sdk/models/helpdesk_file_types'
|
|
|
83
103
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params'
|
|
84
104
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable'
|
|
85
105
|
require 'carbon_ruby_sdk/models/ids_property'
|
|
106
|
+
require 'carbon_ruby_sdk/models/lead'
|
|
107
|
+
require 'carbon_ruby_sdk/models/lead_filters'
|
|
108
|
+
require 'carbon_ruby_sdk/models/leads_order_by'
|
|
109
|
+
require 'carbon_ruby_sdk/models/leads_order_by_nullable'
|
|
110
|
+
require 'carbon_ruby_sdk/models/leads_request'
|
|
111
|
+
require 'carbon_ruby_sdk/models/leads_response'
|
|
86
112
|
require 'carbon_ruby_sdk/models/list_data_source_items_request'
|
|
87
113
|
require 'carbon_ruby_sdk/models/list_data_source_items_response'
|
|
88
114
|
require 'carbon_ruby_sdk/models/list_items_filters'
|
|
@@ -102,8 +128,18 @@ require 'carbon_ruby_sdk/models/o_auth_authentication'
|
|
|
102
128
|
require 'carbon_ruby_sdk/models/o_auth_url_request'
|
|
103
129
|
require 'carbon_ruby_sdk/models/oauth_based_connectors'
|
|
104
130
|
require 'carbon_ruby_sdk/models/object_type'
|
|
131
|
+
require 'carbon_ruby_sdk/models/one_drive_authentication'
|
|
132
|
+
require 'carbon_ruby_sdk/models/opportunities_order_by'
|
|
133
|
+
require 'carbon_ruby_sdk/models/opportunities_order_by_nullable'
|
|
134
|
+
require 'carbon_ruby_sdk/models/opportunities_request'
|
|
135
|
+
require 'carbon_ruby_sdk/models/opportunities_response'
|
|
136
|
+
require 'carbon_ruby_sdk/models/opportunity'
|
|
137
|
+
require 'carbon_ruby_sdk/models/opportunity_filters'
|
|
138
|
+
require 'carbon_ruby_sdk/models/opportunity_status'
|
|
139
|
+
require 'carbon_ruby_sdk/models/opportunity_status_nullable'
|
|
105
140
|
require 'carbon_ruby_sdk/models/order_dir'
|
|
106
141
|
require 'carbon_ruby_sdk/models/order_dir_v2'
|
|
142
|
+
require 'carbon_ruby_sdk/models/order_dir_v2_nullable'
|
|
107
143
|
require 'carbon_ruby_sdk/models/organization_response'
|
|
108
144
|
require 'carbon_ruby_sdk/models/organization_user_data_source_api'
|
|
109
145
|
require 'carbon_ruby_sdk/models/organization_user_data_source_filters'
|
|
@@ -118,6 +154,13 @@ require 'carbon_ruby_sdk/models/organization_user_files_to_sync_query_input'
|
|
|
118
154
|
require 'carbon_ruby_sdk/models/outh_url_response'
|
|
119
155
|
require 'carbon_ruby_sdk/models/outlook_sync_input'
|
|
120
156
|
require 'carbon_ruby_sdk/models/pagination'
|
|
157
|
+
require 'carbon_ruby_sdk/models/partial_account'
|
|
158
|
+
require 'carbon_ruby_sdk/models/partial_account_nullable'
|
|
159
|
+
require 'carbon_ruby_sdk/models/partial_contact'
|
|
160
|
+
require 'carbon_ruby_sdk/models/partial_contact_nullable'
|
|
161
|
+
require 'carbon_ruby_sdk/models/partial_owner'
|
|
162
|
+
require 'carbon_ruby_sdk/models/partial_owner_nullable'
|
|
163
|
+
require 'carbon_ruby_sdk/models/phone_number'
|
|
121
164
|
require 'carbon_ruby_sdk/models/presigned_url_response'
|
|
122
165
|
require 'carbon_ruby_sdk/models/rss_feed_input'
|
|
123
166
|
require 'carbon_ruby_sdk/models/rank_property'
|
|
@@ -154,6 +197,7 @@ require 'carbon_ruby_sdk/models/sync_files_request'
|
|
|
154
197
|
require 'carbon_ruby_sdk/models/sync_options'
|
|
155
198
|
require 'carbon_ruby_sdk/models/tags'
|
|
156
199
|
require 'carbon_ruby_sdk/models/tags1'
|
|
200
|
+
require 'carbon_ruby_sdk/models/task'
|
|
157
201
|
require 'carbon_ruby_sdk/models/text_embedding_generators'
|
|
158
202
|
require 'carbon_ruby_sdk/models/token_response'
|
|
159
203
|
require 'carbon_ruby_sdk/models/transcription_service'
|
|
@@ -187,6 +231,7 @@ require 'carbon_ruby_sdk/models/zotero_authentication'
|
|
|
187
231
|
|
|
188
232
|
# APIs
|
|
189
233
|
require 'carbon_ruby_sdk/api/auth_api'
|
|
234
|
+
require 'carbon_ruby_sdk/api/crm_api'
|
|
190
235
|
require 'carbon_ruby_sdk/api/data_sources_api'
|
|
191
236
|
require 'carbon_ruby_sdk/api/embeddings_api'
|
|
192
237
|
require 'carbon_ruby_sdk/api/files_api'
|
|
@@ -253,6 +298,7 @@ module Carbon
|
|
|
253
298
|
|
|
254
299
|
class Client
|
|
255
300
|
attr_reader :auth
|
|
301
|
+
attr_reader :crm
|
|
256
302
|
attr_reader :data_sources
|
|
257
303
|
attr_reader :embeddings
|
|
258
304
|
attr_reader :files
|
|
@@ -265,6 +311,7 @@ module Carbon
|
|
|
265
311
|
def initialize(config = Configuration.default)
|
|
266
312
|
@api_client = ApiClient::new(config)
|
|
267
313
|
@auth = Carbon::AuthApi.new(@api_client)
|
|
314
|
+
@crm = Carbon::CRMApi.new(@api_client)
|
|
268
315
|
@data_sources = Carbon::DataSourcesApi.new(@api_client)
|
|
269
316
|
@embeddings = Carbon::EmbeddingsApi.new(@api_client)
|
|
270
317
|
@files = Carbon::FilesApi.new(@api_client)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'spec_helper'
|
|
10
|
+
require 'json'
|
|
11
|
+
|
|
12
|
+
# Unit tests for Carbon::CRMApi
|
|
13
|
+
describe 'CRMApi' do
|
|
14
|
+
before do
|
|
15
|
+
# run before each test
|
|
16
|
+
@api_instance = Carbon::CRMApi.new
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
after do
|
|
20
|
+
# run after each test
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CRMApi' do
|
|
24
|
+
it 'should create an instance of CRMApi' do
|
|
25
|
+
expect(@api_instance).to be_instance_of(Carbon::CRMApi)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# unit tests for get_account
|
|
30
|
+
# Get Account
|
|
31
|
+
# @param id
|
|
32
|
+
# @param data_source_id
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @option opts [Boolean] :include_remote_data
|
|
35
|
+
# @option opts [Array<BaseIncludes>] :includes
|
|
36
|
+
# @return [Account]
|
|
37
|
+
describe 'get_account test' do
|
|
38
|
+
it 'should work' do
|
|
39
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# unit tests for get_accounts
|
|
44
|
+
# Get Accounts
|
|
45
|
+
# @param accounts_request
|
|
46
|
+
# @param [Hash] opts the optional parameters
|
|
47
|
+
# @return [AccountResponse]
|
|
48
|
+
describe 'get_accounts test' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# unit tests for get_contact
|
|
55
|
+
# Get Contact
|
|
56
|
+
# @param id
|
|
57
|
+
# @param data_source_id
|
|
58
|
+
# @param [Hash] opts the optional parameters
|
|
59
|
+
# @option opts [Boolean] :include_remote_data
|
|
60
|
+
# @option opts [Array<BaseIncludes>] :includes
|
|
61
|
+
# @return [Contact]
|
|
62
|
+
describe 'get_contact test' do
|
|
63
|
+
it 'should work' do
|
|
64
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# unit tests for get_contacts
|
|
69
|
+
# Get Contacts
|
|
70
|
+
# @param contacts_request
|
|
71
|
+
# @param [Hash] opts the optional parameters
|
|
72
|
+
# @return [ContactsResponse]
|
|
73
|
+
describe 'get_contacts test' do
|
|
74
|
+
it 'should work' do
|
|
75
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# unit tests for get_lead
|
|
80
|
+
# Get Lead
|
|
81
|
+
# @param id
|
|
82
|
+
# @param data_source_id
|
|
83
|
+
# @param [Hash] opts the optional parameters
|
|
84
|
+
# @option opts [Boolean] :include_remote_data
|
|
85
|
+
# @option opts [Array<BaseIncludes>] :includes
|
|
86
|
+
# @return [Lead]
|
|
87
|
+
describe 'get_lead test' do
|
|
88
|
+
it 'should work' do
|
|
89
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# unit tests for get_leads
|
|
94
|
+
# Get Leads
|
|
95
|
+
# @param leads_request
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [LeadsResponse]
|
|
98
|
+
describe 'get_leads test' do
|
|
99
|
+
it 'should work' do
|
|
100
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# unit tests for get_opportunities
|
|
105
|
+
# Get Opportunities
|
|
106
|
+
# @param opportunities_request
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [OpportunitiesResponse]
|
|
109
|
+
describe 'get_opportunities test' do
|
|
110
|
+
it 'should work' do
|
|
111
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# unit tests for get_opportunity
|
|
116
|
+
# Get Opportunity
|
|
117
|
+
# @param id
|
|
118
|
+
# @param data_source_id
|
|
119
|
+
# @param [Hash] opts the optional parameters
|
|
120
|
+
# @option opts [Boolean] :include_remote_data
|
|
121
|
+
# @option opts [Array<BaseIncludes>] :includes
|
|
122
|
+
# @return [Opportunity]
|
|
123
|
+
describe 'get_opportunity test' do
|
|
124
|
+
it 'should work' do
|
|
125
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
end
|
|
@@ -208,6 +208,30 @@ describe 'IntegrationsApi' do
|
|
|
208
208
|
end
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
+
# unit tests for sync_azure_blob_files
|
|
212
|
+
# Azure Blob Files
|
|
213
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the container name and file name as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate data with the selected items or modify the sync behavior
|
|
214
|
+
# @param azure_blob_file_sync_input
|
|
215
|
+
# @param [Hash] opts the optional parameters
|
|
216
|
+
# @return [GenericSuccessResponse]
|
|
217
|
+
describe 'sync_azure_blob_files test' do
|
|
218
|
+
it 'should work' do
|
|
219
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# unit tests for sync_azure_blob_storage
|
|
224
|
+
# Azure Blob Storage Auth
|
|
225
|
+
# This endpoint can be used to connect Azure Blob Storage. For Azure Blob Storage, follow these steps: <ol> <li>Create a new Azure Storage account and grant the following permissions: <ul> <li>List containers.</li> <li>Read from specific containers and blobs to sync with Carbon. Ensure any future containers or blobs carry the same permissions.</li> </ul> </li> <li>Generate a shared access signature (SAS) token or an access key for the storage account.</li> </ol> Once created, provide us with the following details to generate the connection URL: <ol> <li>Storage Account KeyName.</li> <li>Storage Account Name.</li> </ol>
|
|
226
|
+
# @param azure_blob_auth_request
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @return [OrganizationUserDataSourceAPI]
|
|
229
|
+
describe 'sync_azure_blob_storage test' do
|
|
230
|
+
it 'should work' do
|
|
231
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
211
235
|
# unit tests for sync_confluence
|
|
212
236
|
# Confluence Sync
|
|
213
237
|
# This endpoint has been deprecated. Use /integrations/files/sync instead. After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'spec_helper'
|
|
10
|
+
require 'json'
|
|
11
|
+
require 'date'
|
|
12
|
+
|
|
13
|
+
# Unit tests for Carbon::AccountFilters
|
|
14
|
+
describe Carbon::AccountFilters do
|
|
15
|
+
let(:instance) { Carbon::AccountFilters.new }
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of AccountFilters' do
|
|
18
|
+
it 'should create an instance of AccountFilters' do
|
|
19
|
+
expect(instance).to be_instance_of(Carbon::AccountFilters)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
describe 'test attribute "owner_id"' do
|
|
23
|
+
it 'should work' do
|
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe 'test attribute "name"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|