carbon_ruby_sdk 0.2.48 → 0.2.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +58 -22
  4. data/lib/carbon_ruby_sdk/api/data_sources_api.rb +106 -2
  5. data/lib/carbon_ruby_sdk/api/embeddings_api.rb +4 -4
  6. data/lib/carbon_ruby_sdk/api/files_api.rb +22 -22
  7. data/lib/carbon_ruby_sdk/api/github_api.rb +6 -6
  8. data/lib/carbon_ruby_sdk/api/integrations_api.rb +22 -22
  9. data/lib/carbon_ruby_sdk/api/users_api.rb +10 -6
  10. data/lib/carbon_ruby_sdk/api/utilities_api.rb +4 -4
  11. data/lib/carbon_ruby_sdk/api/webhooks_api.rb +2 -2
  12. data/lib/carbon_ruby_sdk/api/white_label_api.rb +2 -2
  13. data/lib/carbon_ruby_sdk/models/authentication_property.rb +6 -2
  14. data/lib/carbon_ruby_sdk/models/auto_sync_enabled_sources_property.rb +1 -1
  15. data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +0 -2
  16. data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +6 -2
  17. data/lib/carbon_ruby_sdk/models/azure_blob_storage_types.rb +35 -0
  18. data/lib/carbon_ruby_sdk/models/chunk_properties.rb +0 -10
  19. data/lib/carbon_ruby_sdk/models/chunk_properties_nullable.rb +0 -10
  20. data/lib/carbon_ruby_sdk/models/comments_input.rb +0 -2
  21. data/lib/carbon_ruby_sdk/models/configuration_keys.rb +35 -0
  22. data/lib/carbon_ruby_sdk/models/confluence_authentication.rb +6 -2
  23. data/lib/carbon_ruby_sdk/models/confluence_authentication_source.rb +35 -0
  24. data/lib/carbon_ruby_sdk/models/data_source_extended_input.rb +35 -0
  25. data/lib/carbon_ruby_sdk/models/directory_item.rb +0 -10
  26. data/lib/carbon_ruby_sdk/models/embedding_model.rb +1 -1
  27. data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb +0 -4
  28. data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2.rb +0 -4
  29. data/lib/carbon_ruby_sdk/models/freskdesk_authentication.rb +6 -2
  30. data/lib/carbon_ruby_sdk/models/freskdesk_authentication_source.rb +35 -0
  31. data/lib/carbon_ruby_sdk/models/gitbook_authetication.rb +6 -2
  32. data/lib/carbon_ruby_sdk/models/gitbook_authetication_source.rb +35 -0
  33. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +0 -2
  34. data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +0 -2
  35. data/lib/carbon_ruby_sdk/models/github_authentication.rb +6 -2
  36. data/lib/carbon_ruby_sdk/models/github_authentication_source.rb +35 -0
  37. data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +0 -2
  38. data/lib/carbon_ruby_sdk/models/gong_authentication.rb +6 -2
  39. data/lib/carbon_ruby_sdk/models/gong_authentication_source.rb +35 -0
  40. data/lib/carbon_ruby_sdk/models/google_drive_white_label_input.rb +6 -2
  41. data/lib/carbon_ruby_sdk/models/google_drive_white_label_input_data_source_type.rb +35 -0
  42. data/lib/carbon_ruby_sdk/models/guru_authentication.rb +6 -2
  43. data/lib/carbon_ruby_sdk/models/guru_authentication_source.rb +35 -0
  44. data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +0 -2
  45. data/lib/carbon_ruby_sdk/models/issues_filter.rb +0 -2
  46. data/lib/carbon_ruby_sdk/models/issues_input.rb +0 -2
  47. data/lib/carbon_ruby_sdk/models/item_types_property_inner.rb +1 -1
  48. data/lib/carbon_ruby_sdk/models/list_data_source_items_request.rb +0 -4
  49. data/lib/carbon_ruby_sdk/models/list_user_response.rb +0 -10
  50. data/lib/carbon_ruby_sdk/models/list_users_request.rb +0 -4
  51. data/lib/carbon_ruby_sdk/models/list_white_label_request.rb +0 -4
  52. data/lib/carbon_ruby_sdk/models/modify_user_configuration_input.rb +1 -1
  53. data/lib/carbon_ruby_sdk/models/multi_modal_embedding_generators.rb +35 -0
  54. data/lib/carbon_ruby_sdk/models/notion_authentication.rb +6 -2
  55. data/lib/carbon_ruby_sdk/models/notion_authentication_source.rb +35 -0
  56. data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +6 -2
  57. data/lib/carbon_ruby_sdk/models/one_drive_authentication_source.rb +35 -0
  58. data/lib/carbon_ruby_sdk/models/organization_response.rb +0 -20
  59. data/lib/carbon_ruby_sdk/models/organization_user_data_source_query_input.rb +0 -4
  60. data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_query_input.rb +0 -8
  61. data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +0 -2
  62. data/lib/carbon_ruby_sdk/models/pull_request_filters.rb +0 -2
  63. data/lib/carbon_ruby_sdk/models/pull_requests_input.rb +0 -2
  64. data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +0 -2
  65. data/lib/carbon_ruby_sdk/models/s3_authentication.rb +6 -2
  66. data/lib/carbon_ruby_sdk/models/s3_authentication_source.rb +35 -0
  67. data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +1 -2
  68. data/lib/carbon_ruby_sdk/models/s3_get_file_input.rb +15 -5
  69. data/lib/carbon_ruby_sdk/models/salesforce_authentication.rb +6 -2
  70. data/lib/carbon_ruby_sdk/models/salesforce_authentication_source.rb +35 -0
  71. data/lib/carbon_ruby_sdk/models/service_now_authentication.rb +6 -2
  72. data/lib/carbon_ruby_sdk/models/service_now_authentication_source.rb +35 -0
  73. data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +6 -2
  74. data/lib/carbon_ruby_sdk/models/sharepoint_authentication_source.rb +35 -0
  75. data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +0 -2
  76. data/lib/carbon_ruby_sdk/models/slack_sync_request.rb +0 -2
  77. data/lib/carbon_ruby_sdk/models/source.rb +35 -0
  78. data/lib/carbon_ruby_sdk/models/update_users_input.rb +27 -1
  79. data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +0 -2
  80. data/lib/carbon_ruby_sdk/models/user_configuration.rb +31 -5
  81. data/lib/carbon_ruby_sdk/models/user_configuration_nullable.rb +31 -5
  82. data/lib/carbon_ruby_sdk/models/user_file.rb +0 -20
  83. data/lib/carbon_ruby_sdk/models/user_response.rb +0 -15
  84. data/lib/carbon_ruby_sdk/models/user_web_pages_request.rb +0 -4
  85. data/lib/carbon_ruby_sdk/models/webhook_query_input.rb +0 -4
  86. data/lib/carbon_ruby_sdk/models/webscrape_request.rb +0 -2
  87. data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +0 -5
  88. data/lib/carbon_ruby_sdk/models/zendesk_authentication.rb +6 -2
  89. data/lib/carbon_ruby_sdk/models/zendesk_authentication_source.rb +35 -0
  90. data/lib/carbon_ruby_sdk/models/zotero_authentication.rb +6 -2
  91. data/lib/carbon_ruby_sdk/models/zotero_authentication_source.rb +35 -0
  92. data/lib/carbon_ruby_sdk/version.rb +1 -1
  93. data/lib/carbon_ruby_sdk.rb +20 -0
  94. data/spec/api/data_sources_api_spec.rb +11 -0
  95. data/spec/models/azure_blob_storage_types_spec.rb +22 -0
  96. data/spec/models/configuration_keys_spec.rb +22 -0
  97. data/spec/models/confluence_authentication_source_spec.rb +22 -0
  98. data/spec/models/data_source_extended_input_spec.rb +22 -0
  99. data/spec/models/freskdesk_authentication_source_spec.rb +22 -0
  100. data/spec/models/gitbook_authetication_source_spec.rb +22 -0
  101. data/spec/models/github_authentication_source_spec.rb +22 -0
  102. data/spec/models/gong_authentication_source_spec.rb +22 -0
  103. data/spec/models/google_drive_white_label_input_data_source_type_spec.rb +22 -0
  104. data/spec/models/guru_authentication_source_spec.rb +22 -0
  105. data/spec/models/multi_modal_embedding_generators_spec.rb +22 -0
  106. data/spec/models/notion_authentication_source_spec.rb +22 -0
  107. data/spec/models/one_drive_authentication_source_spec.rb +22 -0
  108. data/spec/models/s3_authentication_source_spec.rb +22 -0
  109. data/spec/models/s3_get_file_input_spec.rb +6 -0
  110. data/spec/models/salesforce_authentication_source_spec.rb +22 -0
  111. data/spec/models/service_now_authentication_source_spec.rb +22 -0
  112. data/spec/models/sharepoint_authentication_source_spec.rb +22 -0
  113. data/spec/models/source_spec.rb +22 -0
  114. data/spec/models/update_users_input_spec.rb +6 -0
  115. data/spec/models/user_configuration_nullable_spec.rb +6 -0
  116. data/spec/models/user_configuration_spec.rb +6 -0
  117. data/spec/models/zendesk_authentication_source_spec.rb +22 -0
  118. data/spec/models/zotero_authentication_source_spec.rb +22 -0
  119. metadata +62 -2
@@ -40,7 +40,7 @@ module Carbon
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
- :'source' => :'Object',
43
+ :'source' => :'SharepointAuthenticationSource',
44
44
  :'access_token' => :'String',
45
45
  :'refresh_token' => :'String',
46
46
  :'tenant_name' => :'String',
@@ -51,7 +51,6 @@ module Carbon
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
- :'source',
55
54
  :'refresh_token',
56
55
  :'tenant_name',
57
56
  :'site_name'
@@ -98,6 +97,10 @@ module Carbon
98
97
  # @return Array for valid properties with the reasons
99
98
  def list_invalid_properties
100
99
  invalid_properties = Array.new
100
+ if @source.nil?
101
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
102
+ end
103
+
101
104
  if @access_token.nil?
102
105
  invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
103
106
  end
@@ -108,6 +111,7 @@ module Carbon
108
111
  # Check to see if the all the properties in the model are valid
109
112
  # @return true if the model is valid
110
113
  def valid?
114
+ return false if @source.nil?
111
115
  return false if @access_token.nil?
112
116
  true
113
117
  end
@@ -0,0 +1,35 @@
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 SharepointAuthenticationSource
14
+ SHAREPOINT = "SHAREPOINT".freeze
15
+
16
+ def self.all_vars
17
+ @all_vars ||= [SHAREPOINT].freeze
18
+ end
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ return value if SharepointAuthenticationSource.all_vars.include?(value)
32
+ raise "Invalid ENUM value #{value} for class #SharepointAuthenticationSource"
33
+ end
34
+ end
35
+ end
@@ -221,8 +221,6 @@ module Carbon
221
221
 
222
222
  if attributes.key?(:'embedding_model')
223
223
  self.embedding_model = attributes[:'embedding_model']
224
- else
225
- self.embedding_model = 'OPENAI'
226
224
  end
227
225
 
228
226
  if attributes.key?(:'url_paths_to_include')
@@ -125,8 +125,6 @@ module Carbon
125
125
 
126
126
  if attributes.key?(:'embedding_model')
127
127
  self.embedding_model = attributes[:'embedding_model']
128
- else
129
- self.embedding_model = 'OPENAI'
130
128
  end
131
129
 
132
130
  if attributes.key?(:'generate_sparse_vectors')
@@ -0,0 +1,35 @@
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 Source
14
+ AZURE_BLOB_STORAGE = "AZURE_BLOB_STORAGE".freeze
15
+
16
+ def self.all_vars
17
+ @all_vars ||= [AZURE_BLOB_STORAGE].freeze
18
+ end
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ return value if Source.all_vars.include?(value)
32
+ raise "Invalid ENUM value #{value} for class #Source"
33
+ end
34
+ end
35
+ end
@@ -28,6 +28,9 @@ module Carbon
28
28
  # Custom character upload limit for the user across a single upload. If set, then the user won't be able to sync more than this many characters in one upload. If not set, or if set to -1, then the user will have no limit.
29
29
  attr_accessor :max_characters_per_upload
30
30
 
31
+ # The interval in hours at which the user's data sources should be synced. If not set or set to -1, the user will be synced at the organization level interval or default interval if that is also not set. Must be one of [3, 6, 12, 24]
32
+ attr_accessor :auto_sync_interval
33
+
31
34
  # List of organization supplied user IDs
32
35
  attr_accessor :customer_ids
33
36
 
@@ -40,6 +43,7 @@ module Carbon
40
43
  :'max_characters' => :'max_characters',
41
44
  :'max_characters_per_file' => :'max_characters_per_file',
42
45
  :'max_characters_per_upload' => :'max_characters_per_upload',
46
+ :'auto_sync_interval' => :'auto_sync_interval',
43
47
  :'customer_ids' => :'customer_ids'
44
48
  }
45
49
  end
@@ -58,6 +62,7 @@ module Carbon
58
62
  :'max_characters' => :'Integer',
59
63
  :'max_characters_per_file' => :'Integer',
60
64
  :'max_characters_per_upload' => :'Integer',
65
+ :'auto_sync_interval' => :'Integer',
61
66
  :'customer_ids' => :'Array<String>'
62
67
  }
63
68
  end
@@ -71,6 +76,7 @@ module Carbon
71
76
  :'max_characters',
72
77
  :'max_characters_per_file',
73
78
  :'max_characters_per_upload',
79
+ :'auto_sync_interval',
74
80
  ])
75
81
  end
76
82
 
@@ -113,6 +119,10 @@ module Carbon
113
119
  self.max_characters_per_upload = attributes[:'max_characters_per_upload']
114
120
  end
115
121
 
122
+ if attributes.key?(:'auto_sync_interval')
123
+ self.auto_sync_interval = attributes[:'auto_sync_interval']
124
+ end
125
+
116
126
  if attributes.key?(:'customer_ids')
117
127
  if (value = attributes[:'customer_ids']).is_a?(Array)
118
128
  self.customer_ids = value
@@ -144,6 +154,10 @@ module Carbon
144
154
  invalid_properties.push('invalid value for "max_characters_per_upload", must be greater than or equal to -1.')
145
155
  end
146
156
 
157
+ if !@auto_sync_interval.nil? && @auto_sync_interval < -1
158
+ invalid_properties.push('invalid value for "auto_sync_interval", must be greater than or equal to -1.')
159
+ end
160
+
147
161
  if @customer_ids.nil?
148
162
  invalid_properties.push('invalid value for "customer_ids", customer_ids cannot be nil.')
149
163
  end
@@ -163,6 +177,7 @@ module Carbon
163
177
  return false if !@max_characters.nil? && @max_characters < -1
164
178
  return false if !@max_characters_per_file.nil? && @max_characters_per_file < -1
165
179
  return false if !@max_characters_per_upload.nil? && @max_characters_per_upload < -1
180
+ return false if !@auto_sync_interval.nil? && @auto_sync_interval < -1
166
181
  return false if @customer_ids.nil?
167
182
  return false if @customer_ids.length > 100
168
183
  true
@@ -218,6 +233,16 @@ module Carbon
218
233
  @max_characters_per_upload = max_characters_per_upload
219
234
  end
220
235
 
236
+ # Custom attribute writer method with validation
237
+ # @param [Object] auto_sync_interval Value to be assigned
238
+ def auto_sync_interval=(auto_sync_interval)
239
+ if !auto_sync_interval.nil? && auto_sync_interval < -1
240
+ fail ArgumentError, 'invalid value for "auto_sync_interval", must be greater than or equal to -1.'
241
+ end
242
+
243
+ @auto_sync_interval = auto_sync_interval
244
+ end
245
+
221
246
  # Custom attribute writer method with validation
222
247
  # @param [Object] customer_ids Value to be assigned
223
248
  def customer_ids=(customer_ids)
@@ -243,6 +268,7 @@ module Carbon
243
268
  max_characters == o.max_characters &&
244
269
  max_characters_per_file == o.max_characters_per_file &&
245
270
  max_characters_per_upload == o.max_characters_per_upload &&
271
+ auto_sync_interval == o.auto_sync_interval &&
246
272
  customer_ids == o.customer_ids
247
273
  end
248
274
 
@@ -255,7 +281,7 @@ module Carbon
255
281
  # Calculates hash code according to all attributes.
256
282
  # @return [Integer] Hash code
257
283
  def hash
258
- [auto_sync_enabled_sources, max_files, max_files_per_upload, max_characters, max_characters_per_file, max_characters_per_upload, customer_ids].hash
284
+ [auto_sync_enabled_sources, max_files, max_files_per_upload, max_characters, max_characters_per_file, max_characters_per_upload, auto_sync_interval, customer_ids].hash
259
285
  end
260
286
 
261
287
  # Builds the object from hash
@@ -168,8 +168,6 @@ module Carbon
168
168
 
169
169
  if attributes.key?(:'embedding_model')
170
170
  self.embedding_model = attributes[:'embedding_model']
171
- else
172
- self.embedding_model = 'OPENAI'
173
171
  end
174
172
 
175
173
  if attributes.key?(:'generate_sparse_vectors')
@@ -28,6 +28,9 @@ module Carbon
28
28
  # Custom character upload limit for the user across a single upload. If set, then the user won't be able to sync more than this many characters in one upload. If not set, or if set to -1, then the user will have no limit.
29
29
  attr_accessor :max_characters_per_upload
30
30
 
31
+ # The interval in hours at which the user's data sources should be synced. If not set or set to -1, the user will be synced at the organization level interval or default interval if that is also not set. Must be one of [3, 6, 12, 24]
32
+ attr_accessor :auto_sync_interval
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
@@ -36,7 +39,8 @@ module Carbon
36
39
  :'max_files_per_upload' => :'max_files_per_upload',
37
40
  :'max_characters' => :'max_characters',
38
41
  :'max_characters_per_file' => :'max_characters_per_file',
39
- :'max_characters_per_upload' => :'max_characters_per_upload'
42
+ :'max_characters_per_upload' => :'max_characters_per_upload',
43
+ :'auto_sync_interval' => :'auto_sync_interval'
40
44
  }
41
45
  end
42
46
 
@@ -53,7 +57,8 @@ module Carbon
53
57
  :'max_files_per_upload' => :'Integer',
54
58
  :'max_characters' => :'Integer',
55
59
  :'max_characters_per_file' => :'Integer',
56
- :'max_characters_per_upload' => :'Integer'
60
+ :'max_characters_per_upload' => :'Integer',
61
+ :'auto_sync_interval' => :'Integer'
57
62
  }
58
63
  end
59
64
 
@@ -65,7 +70,8 @@ module Carbon
65
70
  :'max_files_per_upload',
66
71
  :'max_characters',
67
72
  :'max_characters_per_file',
68
- :'max_characters_per_upload'
73
+ :'max_characters_per_upload',
74
+ :'auto_sync_interval'
69
75
  ])
70
76
  end
71
77
 
@@ -107,6 +113,10 @@ module Carbon
107
113
  if attributes.key?(:'max_characters_per_upload')
108
114
  self.max_characters_per_upload = attributes[:'max_characters_per_upload']
109
115
  end
116
+
117
+ if attributes.key?(:'auto_sync_interval')
118
+ self.auto_sync_interval = attributes[:'auto_sync_interval']
119
+ end
110
120
  end
111
121
 
112
122
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -133,6 +143,10 @@ module Carbon
133
143
  invalid_properties.push('invalid value for "max_characters_per_upload", must be greater than or equal to -1.')
134
144
  end
135
145
 
146
+ if !@auto_sync_interval.nil? && @auto_sync_interval < -1
147
+ invalid_properties.push('invalid value for "auto_sync_interval", must be greater than or equal to -1.')
148
+ end
149
+
136
150
  invalid_properties
137
151
  end
138
152
 
@@ -144,6 +158,7 @@ module Carbon
144
158
  return false if !@max_characters.nil? && @max_characters < -1
145
159
  return false if !@max_characters_per_file.nil? && @max_characters_per_file < -1
146
160
  return false if !@max_characters_per_upload.nil? && @max_characters_per_upload < -1
161
+ return false if !@auto_sync_interval.nil? && @auto_sync_interval < -1
147
162
  true
148
163
  end
149
164
 
@@ -197,6 +212,16 @@ module Carbon
197
212
  @max_characters_per_upload = max_characters_per_upload
198
213
  end
199
214
 
215
+ # Custom attribute writer method with validation
216
+ # @param [Object] auto_sync_interval Value to be assigned
217
+ def auto_sync_interval=(auto_sync_interval)
218
+ if !auto_sync_interval.nil? && auto_sync_interval < -1
219
+ fail ArgumentError, 'invalid value for "auto_sync_interval", must be greater than or equal to -1.'
220
+ end
221
+
222
+ @auto_sync_interval = auto_sync_interval
223
+ end
224
+
200
225
  # Checks equality by comparing each attribute.
201
226
  # @param [Object] Object to be compared
202
227
  def ==(o)
@@ -207,7 +232,8 @@ module Carbon
207
232
  max_files_per_upload == o.max_files_per_upload &&
208
233
  max_characters == o.max_characters &&
209
234
  max_characters_per_file == o.max_characters_per_file &&
210
- max_characters_per_upload == o.max_characters_per_upload
235
+ max_characters_per_upload == o.max_characters_per_upload &&
236
+ auto_sync_interval == o.auto_sync_interval
211
237
  end
212
238
 
213
239
  # @see the `==` method
@@ -219,7 +245,7 @@ module Carbon
219
245
  # Calculates hash code according to all attributes.
220
246
  # @return [Integer] Hash code
221
247
  def hash
222
- [auto_sync_enabled_sources, max_files, max_files_per_upload, max_characters, max_characters_per_file, max_characters_per_upload].hash
248
+ [auto_sync_enabled_sources, max_files, max_files_per_upload, max_characters, max_characters_per_file, max_characters_per_upload, auto_sync_interval].hash
223
249
  end
224
250
 
225
251
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Carbon
29
29
  # Custom character upload limit for the user across a single upload. If set, then the user won't be able to sync more than this many characters in one upload. If not set, or if set to -1, then the user will have no limit.
30
30
  attr_accessor :max_characters_per_upload
31
31
 
32
+ # The interval in hours at which the user's data sources should be synced. If not set or set to -1, the user will be synced at the organization level interval or default interval if that is also not set. Must be one of [3, 6, 12, 24]
33
+ attr_accessor :auto_sync_interval
34
+
32
35
  # Attribute mapping from ruby-style variable name to JSON key.
33
36
  def self.attribute_map
34
37
  {
@@ -37,7 +40,8 @@ module Carbon
37
40
  :'max_files_per_upload' => :'max_files_per_upload',
38
41
  :'max_characters' => :'max_characters',
39
42
  :'max_characters_per_file' => :'max_characters_per_file',
40
- :'max_characters_per_upload' => :'max_characters_per_upload'
43
+ :'max_characters_per_upload' => :'max_characters_per_upload',
44
+ :'auto_sync_interval' => :'auto_sync_interval'
41
45
  }
42
46
  end
43
47
 
@@ -54,7 +58,8 @@ module Carbon
54
58
  :'max_files_per_upload' => :'Integer',
55
59
  :'max_characters' => :'Integer',
56
60
  :'max_characters_per_file' => :'Integer',
57
- :'max_characters_per_upload' => :'Integer'
61
+ :'max_characters_per_upload' => :'Integer',
62
+ :'auto_sync_interval' => :'Integer'
58
63
  }
59
64
  end
60
65
 
@@ -66,7 +71,8 @@ module Carbon
66
71
  :'max_files_per_upload',
67
72
  :'max_characters',
68
73
  :'max_characters_per_file',
69
- :'max_characters_per_upload'
74
+ :'max_characters_per_upload',
75
+ :'auto_sync_interval'
70
76
  ])
71
77
  end
72
78
 
@@ -108,6 +114,10 @@ module Carbon
108
114
  if attributes.key?(:'max_characters_per_upload')
109
115
  self.max_characters_per_upload = attributes[:'max_characters_per_upload']
110
116
  end
117
+
118
+ if attributes.key?(:'auto_sync_interval')
119
+ self.auto_sync_interval = attributes[:'auto_sync_interval']
120
+ end
111
121
  end
112
122
 
113
123
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -134,6 +144,10 @@ module Carbon
134
144
  invalid_properties.push('invalid value for "max_characters_per_upload", must be greater than or equal to -1.')
135
145
  end
136
146
 
147
+ if !@auto_sync_interval.nil? && @auto_sync_interval < -1
148
+ invalid_properties.push('invalid value for "auto_sync_interval", must be greater than or equal to -1.')
149
+ end
150
+
137
151
  invalid_properties
138
152
  end
139
153
 
@@ -145,6 +159,7 @@ module Carbon
145
159
  return false if !@max_characters.nil? && @max_characters < -1
146
160
  return false if !@max_characters_per_file.nil? && @max_characters_per_file < -1
147
161
  return false if !@max_characters_per_upload.nil? && @max_characters_per_upload < -1
162
+ return false if !@auto_sync_interval.nil? && @auto_sync_interval < -1
148
163
  true
149
164
  end
150
165
 
@@ -198,6 +213,16 @@ module Carbon
198
213
  @max_characters_per_upload = max_characters_per_upload
199
214
  end
200
215
 
216
+ # Custom attribute writer method with validation
217
+ # @param [Object] auto_sync_interval Value to be assigned
218
+ def auto_sync_interval=(auto_sync_interval)
219
+ if !auto_sync_interval.nil? && auto_sync_interval < -1
220
+ fail ArgumentError, 'invalid value for "auto_sync_interval", must be greater than or equal to -1.'
221
+ end
222
+
223
+ @auto_sync_interval = auto_sync_interval
224
+ end
225
+
201
226
  # Checks equality by comparing each attribute.
202
227
  # @param [Object] Object to be compared
203
228
  def ==(o)
@@ -208,7 +233,8 @@ module Carbon
208
233
  max_files_per_upload == o.max_files_per_upload &&
209
234
  max_characters == o.max_characters &&
210
235
  max_characters_per_file == o.max_characters_per_file &&
211
- max_characters_per_upload == o.max_characters_per_upload
236
+ max_characters_per_upload == o.max_characters_per_upload &&
237
+ auto_sync_interval == o.auto_sync_interval
212
238
  end
213
239
 
214
240
  # @see the `==` method
@@ -220,7 +246,7 @@ module Carbon
220
246
  # Calculates hash code according to all attributes.
221
247
  # @return [Integer] Hash code
222
248
  def hash
223
- [auto_sync_enabled_sources, max_files, max_files_per_upload, max_characters, max_characters_per_file, max_characters_per_upload].hash
249
+ [auto_sync_enabled_sources, max_files, max_files_per_upload, max_characters, max_characters_per_file, max_characters_per_upload, auto_sync_interval].hash
224
250
  end
225
251
 
226
252
  # Builds the object from hash
@@ -418,26 +418,10 @@ module Carbon
418
418
  invalid_properties.push('invalid value for "sync_status", sync_status cannot be nil.')
419
419
  end
420
420
 
421
- if @ocr_properties.nil?
422
- invalid_properties.push('invalid value for "ocr_properties", ocr_properties cannot be nil.')
423
- end
424
-
425
421
  if @skip_embedding_generation.nil?
426
422
  invalid_properties.push('invalid value for "skip_embedding_generation", skip_embedding_generation cannot be nil.')
427
423
  end
428
424
 
429
- if @sync_properties.nil?
430
- invalid_properties.push('invalid value for "sync_properties", sync_properties cannot be nil.')
431
- end
432
-
433
- if @messages_metadata.nil?
434
- invalid_properties.push('invalid value for "messages_metadata", messages_metadata cannot be nil.')
435
- end
436
-
437
- if @file_contents_deleted.nil?
438
- invalid_properties.push('invalid value for "file_contents_deleted", file_contents_deleted cannot be nil.')
439
- end
440
-
441
425
  if @supports_cold_storage.nil?
442
426
  invalid_properties.push('invalid value for "supports_cold_storage", supports_cold_storage cannot be nil.')
443
427
  end
@@ -466,11 +450,7 @@ module Carbon
466
450
  return false if @organization_supplied_user_id.nil?
467
451
  return false if @external_file_id.nil?
468
452
  return false if @sync_status.nil?
469
- return false if @ocr_properties.nil?
470
453
  return false if @skip_embedding_generation.nil?
471
- return false if @sync_properties.nil?
472
- return false if @messages_metadata.nil?
473
- return false if @file_contents_deleted.nil?
474
454
  return false if @supports_cold_storage.nil?
475
455
  return false if @embedding_storage_status.nil?
476
456
  return false if @created_at.nil?
@@ -280,18 +280,6 @@ module Carbon
280
280
  invalid_properties.push('invalid value for "unique_file_tags", unique_file_tags cannot be nil.')
281
281
  end
282
282
 
283
- if @custom_limits.nil?
284
- invalid_properties.push('invalid value for "custom_limits", custom_limits cannot be nil.')
285
- end
286
-
287
- if @auto_sync_enabled_sources.nil?
288
- invalid_properties.push('invalid value for "auto_sync_enabled_sources", auto_sync_enabled_sources cannot be nil.')
289
- end
290
-
291
- if @connector_settings.nil?
292
- invalid_properties.push('invalid value for "connector_settings", connector_settings cannot be nil.')
293
- end
294
-
295
283
  invalid_properties
296
284
  end
297
285
 
@@ -313,9 +301,6 @@ module Carbon
313
301
  return false if @aggregate_num_files_by_source.nil?
314
302
  return false if @aggregate_num_files_by_file_format.nil?
315
303
  return false if @unique_file_tags.nil?
316
- return false if @custom_limits.nil?
317
- return false if @auto_sync_enabled_sources.nil?
318
- return false if @connector_settings.nil?
319
304
  true
320
305
  end
321
306
 
@@ -75,14 +75,10 @@ module Carbon
75
75
 
76
76
  if attributes.key?(:'order_by')
77
77
  self.order_by = attributes[:'order_by']
78
- else
79
- self.order_by = 'updated_at'
80
78
  end
81
79
 
82
80
  if attributes.key?(:'order_dir')
83
81
  self.order_dir = attributes[:'order_dir']
84
- else
85
- self.order_dir = 'desc'
86
82
  end
87
83
  end
88
84
 
@@ -71,14 +71,10 @@ module Carbon
71
71
 
72
72
  if attributes.key?(:'order_by')
73
73
  self.order_by = attributes[:'order_by']
74
- else
75
- self.order_by = 'updated_at'
76
74
  end
77
75
 
78
76
  if attributes.key?(:'order_dir')
79
77
  self.order_dir = attributes[:'order_dir']
80
- else
81
- self.order_dir = 'asc'
82
78
  end
83
79
 
84
80
  if attributes.key?(:'filters')
@@ -222,8 +222,6 @@ module Carbon
222
222
 
223
223
  if attributes.key?(:'embedding_model')
224
224
  self.embedding_model = attributes[:'embedding_model']
225
- else
226
- self.embedding_model = 'OPENAI'
227
225
  end
228
226
 
229
227
  if attributes.key?(:'url_paths_to_include')
@@ -98,10 +98,6 @@ module Carbon
98
98
  invalid_properties.push('invalid value for "custom_limits", custom_limits cannot be nil.')
99
99
  end
100
100
 
101
- if @connector_settings.nil?
102
- invalid_properties.push('invalid value for "connector_settings", connector_settings cannot be nil.')
103
- end
104
-
105
101
  invalid_properties
106
102
  end
107
103
 
@@ -111,7 +107,6 @@ module Carbon
111
107
  return false if @remove_branding.nil?
112
108
  return false if @integrations.nil?
113
109
  return false if @custom_limits.nil?
114
- return false if @connector_settings.nil?
115
110
  true
116
111
  end
117
112
 
@@ -34,7 +34,7 @@ module Carbon
34
34
  # Attribute type mapping.
35
35
  def self.openapi_types
36
36
  {
37
- :'source' => :'Object',
37
+ :'source' => :'ZendeskAuthenticationSource',
38
38
  :'access_token' => :'String',
39
39
  :'subdomain' => :'String'
40
40
  }
@@ -43,7 +43,6 @@ module Carbon
43
43
  # List of attributes with nullable: true
44
44
  def self.openapi_nullable
45
45
  Set.new([
46
- :'source',
47
46
  ])
48
47
  end
49
48
 
@@ -79,6 +78,10 @@ module Carbon
79
78
  # @return Array for valid properties with the reasons
80
79
  def list_invalid_properties
81
80
  invalid_properties = Array.new
81
+ if @source.nil?
82
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
83
+ end
84
+
82
85
  if @access_token.nil?
83
86
  invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
84
87
  end
@@ -93,6 +96,7 @@ module Carbon
93
96
  # Check to see if the all the properties in the model are valid
94
97
  # @return true if the model is valid
95
98
  def valid?
99
+ return false if @source.nil?
96
100
  return false if @access_token.nil?
97
101
  return false if @subdomain.nil?
98
102
  true
@@ -0,0 +1,35 @@
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 ZendeskAuthenticationSource
14
+ ZENDESK = "ZENDESK".freeze
15
+
16
+ def self.all_vars
17
+ @all_vars ||= [ZENDESK].freeze
18
+ end
19
+
20
+ # Builds the enum from string
21
+ # @param [String] The enum value in the form of the string
22
+ # @return [String] The enum value
23
+ def self.build_from_hash(value)
24
+ new.build_from_hash(value)
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def build_from_hash(value)
31
+ return value if ZendeskAuthenticationSource.all_vars.include?(value)
32
+ raise "Invalid ENUM value #{value} for class #ZendeskAuthenticationSource"
33
+ end
34
+ end
35
+ end
@@ -40,7 +40,7 @@ module Carbon
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
- :'source' => :'Object',
43
+ :'source' => :'ZoteroAuthenticationSource',
44
44
  :'access_token' => :'String',
45
45
  :'access_token_secret' => :'String',
46
46
  :'username' => :'String',
@@ -51,7 +51,6 @@ module Carbon
51
51
  # List of attributes with nullable: true
52
52
  def self.openapi_nullable
53
53
  Set.new([
54
- :'source',
55
54
  ])
56
55
  end
57
56
 
@@ -95,6 +94,10 @@ module Carbon
95
94
  # @return Array for valid properties with the reasons
96
95
  def list_invalid_properties
97
96
  invalid_properties = Array.new
97
+ if @source.nil?
98
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
99
+ end
100
+
98
101
  if @access_token.nil?
99
102
  invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
100
103
  end
@@ -117,6 +120,7 @@ module Carbon
117
120
  # Check to see if the all the properties in the model are valid
118
121
  # @return true if the model is valid
119
122
  def valid?
123
+ return false if @source.nil?
120
124
  return false if @access_token.nil?
121
125
  return false if @access_token_secret.nil?
122
126
  return false if @username.nil?