carbon_ruby_sdk 0.2.42 → 0.2.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +135 -3
  4. data/lib/carbon_ruby_sdk/api/data_sources_api.rb +196 -0
  5. data/lib/carbon_ruby_sdk/api/files_api.rb +4 -4
  6. data/lib/carbon_ruby_sdk/api/integrations_api.rb +48 -16
  7. data/lib/carbon_ruby_sdk/api/users_api.rb +71 -0
  8. data/lib/carbon_ruby_sdk/models/add_data_source_tags_input.rb +234 -0
  9. data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +14 -4
  10. data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +1 -1
  11. data/lib/carbon_ruby_sdk/models/external_source_item.rb +11 -1
  12. data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +15 -5
  13. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +15 -5
  14. data/lib/carbon_ruby_sdk/models/github_connect_request.rb +14 -4
  15. data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +15 -5
  16. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +15 -5
  17. data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +15 -1
  18. data/lib/carbon_ruby_sdk/models/organization_user_data_source_filters.rb +12 -1
  19. data/lib/carbon_ruby_sdk/models/remove_data_source_tags_input.rb +242 -0
  20. data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +15 -5
  21. data/lib/carbon_ruby_sdk/models/s3_auth_request.rb +15 -5
  22. data/lib/carbon_ruby_sdk/models/sync_options.rb +15 -5
  23. data/lib/carbon_ruby_sdk/models/user_response.rb +18 -4
  24. data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +18 -4
  25. data/lib/carbon_ruby_sdk/version.rb +1 -1
  26. data/lib/carbon_ruby_sdk.rb +2 -0
  27. data/spec/api/data_sources_api_spec.rb +22 -0
  28. data/spec/api/files_api_spec.rb +1 -1
  29. data/spec/api/users_api_spec.rb +10 -0
  30. data/spec/models/add_data_source_tags_input_spec.rb +34 -0
  31. data/spec/models/azure_blob_auth_request_spec.rb +6 -0
  32. data/spec/models/external_source_item_spec.rb +6 -0
  33. data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
  34. data/spec/models/gitbook_connect_request_spec.rb +6 -0
  35. data/spec/models/github_connect_request_spec.rb +6 -0
  36. data/spec/models/guru_connect_request_spec.rb +6 -0
  37. data/spec/models/o_auth_url_request_spec.rb +6 -0
  38. data/spec/models/organization_user_data_source_api_spec.rb +6 -0
  39. data/spec/models/organization_user_data_source_filters_spec.rb +6 -0
  40. data/spec/models/remove_data_source_tags_input_spec.rb +40 -0
  41. data/spec/models/rss_feed_input_spec.rb +6 -0
  42. data/spec/models/s3_auth_request_spec.rb +6 -0
  43. data/spec/models/sync_options_spec.rb +6 -0
  44. data/spec/models/user_response_spec.rb +6 -0
  45. data/spec/models/white_labeling_response_spec.rb +6 -0
  46. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cb19d4bb87096e93a501f8532b550859c7706bc52d16416b36e2298a59deb25
4
- data.tar.gz: c7efd65f094791724b6f0dcd3ab154a95c0f3f47e4b1acee99de5bba6119a048
3
+ metadata.gz: '0041088eca440b5e23106b5a61b6631c6bbde015033004d3c84ed205a1f8c3dc'
4
+ data.tar.gz: d8f21fbc6d1ef0183689fb980f05da068930ae611a06d83464411eb708316099
5
5
  SHA512:
6
- metadata.gz: 01fc784420d00d6fbd842c89490f69e83170045b5a448e3a58faf2b46e48035e0cc18ad410e48c2e410fdb56cf824d8b9a6a2bd8993f23bcc42176646eaa69cd
7
- data.tar.gz: 888a7225635431d0232a823d6801a99433632794cf7a2e7c344503e772ddda3356497d58316a4dae0e62e4e4f72a1a039a8ba66b1db83f6376cd7cb4cdff7fc5
6
+ metadata.gz: 5ab2fe2c38087f093e086a2a9127acee8e9c7fcfb40cf763eee594d128579dbb02b0a33045ba9bf5bbf6c5c5b2ae382d2e01500c6a95df2cc85f7c0f7ad3e0da
7
+ data.tar.gz: 83c6428340b06c799b908b818172ad17b5bc3b78b3016374572ac64211f23d78a7357418ddbbc57f61a5842654ced1da1dddf409117bdc40982bc469a1ee4113
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.2.42)
4
+ carbon_ruby_sdk (0.2.43)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -49,7 +49,7 @@ GEM
49
49
  rspec-core (~> 3.13.0)
50
50
  rspec-expectations (~> 3.13.0)
51
51
  rspec-mocks (~> 3.13.0)
52
- rspec-core (3.13.1)
52
+ rspec-core (3.13.2)
53
53
  rspec-support (~> 3.13.0)
54
54
  rspec-expectations (3.13.3)
55
55
  diff-lcs (>= 1.2.0, < 2.0)
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect external data to LLMs, no matter the source.
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v0.2.42-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.42)
9
+ [![npm](https://img.shields.io/badge/gem-v0.2.43-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.43)
10
10
 
11
11
  </div>
12
12
 
@@ -28,7 +28,9 @@ Connect external data to LLMs, no matter the source.
28
28
  * [`carbon.crm.get_leads`](#carboncrmget_leads)
29
29
  * [`carbon.crm.get_opportunities`](#carboncrmget_opportunities)
30
30
  * [`carbon.crm.get_opportunity`](#carboncrmget_opportunity)
31
+ * [`carbon.data_sources.add_tags`](#carbondata_sourcesadd_tags)
31
32
  * [`carbon.data_sources.query_user_data_sources`](#carbondata_sourcesquery_user_data_sources)
33
+ * [`carbon.data_sources.remove_tags`](#carbondata_sourcesremove_tags)
32
34
  * [`carbon.data_sources.revoke_access_token`](#carbondata_sourcesrevoke_access_token)
33
35
  * [`carbon.embeddings.get_documents`](#carbonembeddingsget_documents)
34
36
  * [`carbon.embeddings.get_embeddings_and_chunks`](#carbonembeddingsget_embeddings_and_chunks)
@@ -92,6 +94,7 @@ Connect external data to LLMs, no matter the source.
92
94
  * [`carbon.users.list`](#carbonuserslist)
93
95
  * [`carbon.users.toggle_user_features`](#carbonuserstoggle_user_features)
94
96
  * [`carbon.users.update_users`](#carbonusersupdate_users)
97
+ * [`carbon.users.who_am_i`](#carbonuserswho_am_i)
95
98
  * [`carbon.utilities.fetch_urls`](#carbonutilitiesfetch_urls)
96
99
  * [`carbon.utilities.fetch_webpage`](#carbonutilitiesfetch_webpage)
97
100
  * [`carbon.utilities.fetch_youtube_transcripts`](#carbonutilitiesfetch_youtube_transcripts)
@@ -115,7 +118,7 @@ Connect external data to LLMs, no matter the source.
115
118
  Add to Gemfile:
116
119
 
117
120
  ```ruby
118
- gem 'carbon_ruby_sdk', '~> 0.2.42'
121
+ gem 'carbon_ruby_sdk', '~> 0.2.43'
119
122
  ```
120
123
 
121
124
  ## Getting Started<a id="getting-started"></a>
@@ -532,6 +535,37 @@ p result
532
535
  ---
533
536
 
534
537
 
538
+ ### `carbon.data_sources.add_tags`<a id="carbondata_sourcesadd_tags"></a>
539
+
540
+ Add Data Source Tags
541
+
542
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
543
+
544
+ ```ruby
545
+ result = carbon.data_sources.add_tags(
546
+ tags: {},
547
+ data_source_id: 1,
548
+ )
549
+ p result
550
+ ```
551
+
552
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
553
+
554
+ ##### tags: `Object`<a id="tags-object"></a>
555
+ ##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
556
+ #### 🔄 Return<a id="🔄-return"></a>
557
+
558
+ [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
559
+
560
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
561
+
562
+ `/data_sources/tags/add` `POST`
563
+
564
+ [🔙 **Back to Table of Contents**](#table-of-contents)
565
+
566
+ ---
567
+
568
+
535
569
  ### `carbon.data_sources.query_user_data_sources`<a id="carbondata_sourcesquery_user_data_sources"></a>
536
570
 
537
571
  User Data Sources
@@ -572,6 +606,39 @@ p result
572
606
  ---
573
607
 
574
608
 
609
+ ### `carbon.data_sources.remove_tags`<a id="carbondata_sourcesremove_tags"></a>
610
+
611
+ Remove Data Source Tags
612
+
613
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
614
+
615
+ ```ruby
616
+ result = carbon.data_sources.remove_tags(
617
+ data_source_id: 1,
618
+ tags_to_remove: [],
619
+ remove_all_tags: false,
620
+ )
621
+ p result
622
+ ```
623
+
624
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
625
+
626
+ ##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
627
+ ##### tags_to_remove: Array<`String`><a id="tags_to_remove-array"></a>
628
+ ##### remove_all_tags: `Boolean`<a id="remove_all_tags-boolean"></a>
629
+ #### 🔄 Return<a id="🔄-return"></a>
630
+
631
+ [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
632
+
633
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
634
+
635
+ `/data_sources/tags/remove` `POST`
636
+
637
+ [🔙 **Back to Table of Contents**](#table-of-contents)
638
+
639
+ ---
640
+
641
+
575
642
  ### `carbon.data_sources.revoke_access_token`<a id="carbondata_sourcesrevoke_access_token"></a>
576
643
 
577
644
  Revoke Access Token
@@ -1569,7 +1636,8 @@ Enable cold storage for the file. If set to true, the file will be moved to cold
1569
1636
  storage after a certain period of inactivity. Default is false.
1570
1637
 
1571
1638
  ##### hot_storage_time_to_live: `Integer`<a id="hot_storage_time_to_live-integer"></a>
1572
- Time in seconds after which the file will be moved to cold storage.
1639
+ Time in days after which the file will be moved to cold storage. Must be one of
1640
+ [1, 3, 7, 14, 30].
1573
1641
 
1574
1642
  ##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
1575
1643
  If this flag is enabled, the file will be chunked and stored with Carbon, but no
@@ -2146,6 +2214,7 @@ result = carbon.integrations.connect_freshdesk(
2146
2214
  "store_file_only" => false,
2147
2215
  "skip_file_processing" => false,
2148
2216
  },
2217
+ data_source_tags: {},
2149
2218
  )
2150
2219
  p result
2151
2220
  ```
@@ -2168,6 +2237,10 @@ Enabling this flag will fetch all available content from the source to be listed
2168
2237
  via list items endpoint
2169
2238
 
2170
2239
  ##### file_sync_config: [`FileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb)<a id="file_sync_config-filesyncconfignullablelibcarbon_ruby_sdkmodelsfile_sync_config_nullablerb"></a>
2240
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2241
+ Tags to be associated with the data source. If the data source already has tags
2242
+ set, then an upsert will be performed.
2243
+
2171
2244
  #### 🔄 Return<a id="🔄-return"></a>
2172
2245
 
2173
2246
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -2215,6 +2288,7 @@ result = carbon.integrations.connect_gitbook(
2215
2288
  "store_file_only" => false,
2216
2289
  "skip_file_processing" => false,
2217
2290
  },
2291
+ data_source_tags: {},
2218
2292
  )
2219
2293
  p result
2220
2294
  ```
@@ -2237,6 +2311,10 @@ Enabling this flag will fetch all available content from the source to be listed
2237
2311
  via list items endpoint
2238
2312
 
2239
2313
  ##### file_sync_config: [`FileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb)<a id="file_sync_config-filesyncconfignullablelibcarbon_ruby_sdkmodelsfile_sync_config_nullablerb"></a>
2314
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2315
+ Tags to be associated with the data source. If the data source already has tags
2316
+ set, then an upsert will be performed.
2317
+
2240
2318
  #### 🔄 Return<a id="🔄-return"></a>
2241
2319
 
2242
2320
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -2282,6 +2360,7 @@ result = carbon.integrations.connect_guru(
2282
2360
  "store_file_only" => false,
2283
2361
  "skip_file_processing" => false,
2284
2362
  },
2363
+ data_source_tags: {},
2285
2364
  )
2286
2365
  p result
2287
2366
  ```
@@ -2304,6 +2383,10 @@ Enabling this flag will fetch all available content from the source to be listed
2304
2383
  via list items endpoint
2305
2384
 
2306
2385
  ##### file_sync_config: [`FileSyncConfigNullable`](./lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb)<a id="file_sync_config-filesyncconfignullablelibcarbon_ruby_sdkmodelsfile_sync_config_nullablerb"></a>
2386
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2387
+ Tags to be associated with the data source. If the data source already has tags
2388
+ set, then an upsert will be performed.
2389
+
2307
2390
  #### 🔄 Return<a id="🔄-return"></a>
2308
2391
 
2309
2392
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -2338,6 +2421,7 @@ result = carbon.integrations.create_aws_iam_user(
2338
2421
  access_key_secret: "string_example",
2339
2422
  sync_source_items: true,
2340
2423
  endpoint_url: "string_example",
2424
+ data_source_tags: {},
2341
2425
  )
2342
2426
  p result
2343
2427
  ```
@@ -2355,6 +2439,10 @@ You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space
2355
2439
  through this endpoint. The URL should be of format
2356
2440
  <region>.digitaloceanspaces.com. It's not required for S3 buckets.
2357
2441
 
2442
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2443
+ Tags to be associated with the data source. If the data source already has tags
2444
+ set, then an upsert will be performed.
2445
+
2358
2446
  #### 🔄 Return<a id="🔄-return"></a>
2359
2447
 
2360
2448
  [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
@@ -2423,6 +2511,7 @@ result = carbon.integrations.get_oauth_url(
2423
2511
  "client_secret" => "client_secret_example",
2424
2512
  "redirect_uri" => "redirect_uri_example",
2425
2513
  },
2514
+ data_source_tags: {},
2426
2515
  )
2427
2516
  p result
2428
2517
  ```
@@ -2496,6 +2585,10 @@ you wish to connect. This email will be used to identify your carbon data
2496
2585
  source.
2497
2586
 
2498
2587
  ##### servicenow_credentials: [`ServiceNowCredentialsNullable`](./lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb)<a id="servicenow_credentials-servicenowcredentialsnullablelibcarbon_ruby_sdkmodelsservice_now_credentials_nullablerb"></a>
2588
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2589
+ Tags to be associated with the data source. If the data source already has tags
2590
+ set, then an upsert will be performed.
2591
+
2499
2592
  #### 🔄 Return<a id="🔄-return"></a>
2500
2593
 
2501
2594
  [OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
@@ -2864,6 +2957,7 @@ result = carbon.integrations.sync_azure_blob_storage(
2864
2957
  account_name: "string_example",
2865
2958
  account_key: "string_example",
2866
2959
  sync_source_items: true,
2960
+ data_source_tags: {},
2867
2961
  )
2868
2962
  p result
2869
2963
  ```
@@ -2873,6 +2967,10 @@ p result
2873
2967
  ##### account_name: `String`<a id="account_name-string"></a>
2874
2968
  ##### account_key: `String`<a id="account_key-string"></a>
2875
2969
  ##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
2970
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2971
+ Tags to be associated with the data source. If the data source already has tags
2972
+ set, then an upsert will be performed.
2973
+
2876
2974
  #### 🔄 Return<a id="🔄-return"></a>
2877
2975
 
2878
2976
  [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
@@ -3093,6 +3191,7 @@ result = carbon.integrations.sync_git_hub(
3093
3191
  username: "string_example",
3094
3192
  access_token: "string_example",
3095
3193
  sync_source_items: false,
3194
+ data_source_tags: {},
3096
3195
  )
3097
3196
  p result
3098
3197
  ```
@@ -3105,6 +3204,10 @@ p result
3105
3204
  Enabling this flag will fetch all available content from the source to be listed
3106
3205
  via list items endpoint
3107
3206
 
3207
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
3208
+ Tags to be associated with the data source. If the data source already has tags
3209
+ set, then an upsert will be performed.
3210
+
3108
3211
  #### 🔄 Return<a id="🔄-return"></a>
3109
3212
 
3110
3213
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -3465,6 +3568,7 @@ result = carbon.integrations.sync_rss_feed(
3465
3568
  generate_sparse_vectors: false,
3466
3569
  prepend_filename_to_chunks: false,
3467
3570
  request_id: "string_example",
3571
+ data_source_tags: {},
3468
3572
  )
3469
3573
  p result
3470
3574
  ```
@@ -3480,6 +3584,10 @@ p result
3480
3584
  ##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
3481
3585
  ##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
3482
3586
  ##### request_id: `String`<a id="request_id-string"></a>
3587
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
3588
+ Tags to be associated with the data source. If the data source already has tags
3589
+ set, then an upsert will be performed.
3590
+
3483
3591
  #### 🔄 Return<a id="🔄-return"></a>
3484
3592
 
3485
3593
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -3903,6 +4011,30 @@ not set, or if set to -1, then the user will have no limit.
3903
4011
  ---
3904
4012
 
3905
4013
 
4014
+ ### `carbon.users.who_am_i`<a id="carbonuserswho_am_i"></a>
4015
+
4016
+ Me Endpoint
4017
+
4018
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
4019
+
4020
+ ```ruby
4021
+ result = carbon.users.who_am_i
4022
+ p result
4023
+ ```
4024
+
4025
+ #### 🔄 Return<a id="🔄-return"></a>
4026
+
4027
+ [UserResponse](./lib/carbon_ruby_sdk/models/user_response.rb)
4028
+
4029
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
4030
+
4031
+ `/whoami` `GET`
4032
+
4033
+ [🔙 **Back to Table of Contents**](#table-of-contents)
4034
+
4035
+ ---
4036
+
4037
+
3906
4038
  ### `carbon.utilities.fetch_urls`<a id="carbonutilitiesfetch_urls"></a>
3907
4039
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
3908
4040
 
@@ -16,6 +16,102 @@ module Carbon
16
16
  @api_client = api_client
17
17
  end
18
18
 
19
+ # Add Data Source Tags
20
+ #
21
+ # @param tags [Object]
22
+ # @param data_source_id [Integer]
23
+ # @param body [AddDataSourceTagsInput]
24
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
25
+ def add_tags(tags:, data_source_id:, extra: {})
26
+ _body = {}
27
+ _body[:tags] = tags if tags != SENTINEL
28
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
29
+ add_data_source_tags_input = _body
30
+ api_response = add_tags_with_http_info_impl(add_data_source_tags_input, extra)
31
+ api_response.data
32
+ end
33
+
34
+ # Add Data Source Tags
35
+ #
36
+ # @param tags [Object]
37
+ # @param data_source_id [Integer]
38
+ # @param body [AddDataSourceTagsInput]
39
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
40
+ def add_tags_with_http_info(tags:, data_source_id:, extra: {})
41
+ _body = {}
42
+ _body[:tags] = tags if tags != SENTINEL
43
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
44
+ add_data_source_tags_input = _body
45
+ add_tags_with_http_info_impl(add_data_source_tags_input, extra)
46
+ end
47
+
48
+ # Add Data Source Tags
49
+ # @param add_data_source_tags_input [AddDataSourceTagsInput]
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [OrganizationUserDataSourceAPI]
52
+ private def add_tags_impl(add_data_source_tags_input, opts = {})
53
+ data, _status_code, _headers = add_tags_with_http_info(add_data_source_tags_input, opts)
54
+ data
55
+ end
56
+
57
+ # Add Data Source Tags
58
+ # @param add_data_source_tags_input [AddDataSourceTagsInput]
59
+ # @param [Hash] opts the optional parameters
60
+ # @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
61
+ private def add_tags_with_http_info_impl(add_data_source_tags_input, opts = {})
62
+ if @api_client.config.debugging
63
+ @api_client.config.logger.debug 'Calling API: DataSourcesApi.add_tags ...'
64
+ end
65
+ # verify the required parameter 'add_data_source_tags_input' is set
66
+ if @api_client.config.client_side_validation && add_data_source_tags_input.nil?
67
+ fail ArgumentError, "Missing the required parameter 'add_data_source_tags_input' when calling DataSourcesApi.add_tags"
68
+ end
69
+ # resource path
70
+ local_var_path = '/data_sources/tags/add'
71
+
72
+ # query parameters
73
+ query_params = opts[:query_params] || {}
74
+
75
+ # header parameters
76
+ header_params = opts[:header_params] || {}
77
+ # HTTP header 'Accept' (if needed)
78
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
79
+ # HTTP header 'Content-Type'
80
+ content_type = @api_client.select_header_content_type(['application/json'])
81
+ if !content_type.nil?
82
+ header_params['Content-Type'] = content_type
83
+ end
84
+
85
+ # form parameters
86
+ form_params = opts[:form_params] || {}
87
+
88
+ # http body (model)
89
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(add_data_source_tags_input)
90
+
91
+ # return_type
92
+ return_type = opts[:debug_return_type] || 'OrganizationUserDataSourceAPI'
93
+
94
+ # auth_names
95
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
96
+
97
+ new_options = opts.merge(
98
+ :operation => :"DataSourcesApi.add_tags",
99
+ :header_params => header_params,
100
+ :query_params => query_params,
101
+ :form_params => form_params,
102
+ :body => post_body,
103
+ :auth_names => auth_names,
104
+ :return_type => return_type
105
+ )
106
+
107
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug "API called: DataSourcesApi#add_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
110
+ end
111
+ APIResponse::new(data, status_code, headers, response)
112
+ end
113
+
114
+
19
115
  # User Data Sources
20
116
  #
21
117
  # @param pagination [Pagination]
@@ -120,6 +216,106 @@ module Carbon
120
216
  end
121
217
 
122
218
 
219
+ # Remove Data Source Tags
220
+ #
221
+ # @param data_source_id [Integer]
222
+ # @param tags_to_remove [Array<String>]
223
+ # @param remove_all_tags [Boolean]
224
+ # @param body [RemoveDataSourceTagsInput]
225
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
226
+ def remove_tags(data_source_id:, tags_to_remove: SENTINEL, remove_all_tags: false, extra: {})
227
+ _body = {}
228
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
229
+ _body[:tags_to_remove] = tags_to_remove if tags_to_remove != SENTINEL
230
+ _body[:remove_all_tags] = remove_all_tags if remove_all_tags != SENTINEL
231
+ remove_data_source_tags_input = _body
232
+ api_response = remove_tags_with_http_info_impl(remove_data_source_tags_input, extra)
233
+ api_response.data
234
+ end
235
+
236
+ # Remove Data Source Tags
237
+ #
238
+ # @param data_source_id [Integer]
239
+ # @param tags_to_remove [Array<String>]
240
+ # @param remove_all_tags [Boolean]
241
+ # @param body [RemoveDataSourceTagsInput]
242
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
243
+ def remove_tags_with_http_info(data_source_id:, tags_to_remove: SENTINEL, remove_all_tags: false, extra: {})
244
+ _body = {}
245
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
246
+ _body[:tags_to_remove] = tags_to_remove if tags_to_remove != SENTINEL
247
+ _body[:remove_all_tags] = remove_all_tags if remove_all_tags != SENTINEL
248
+ remove_data_source_tags_input = _body
249
+ remove_tags_with_http_info_impl(remove_data_source_tags_input, extra)
250
+ end
251
+
252
+ # Remove Data Source Tags
253
+ # @param remove_data_source_tags_input [RemoveDataSourceTagsInput]
254
+ # @param [Hash] opts the optional parameters
255
+ # @return [OrganizationUserDataSourceAPI]
256
+ private def remove_tags_impl(remove_data_source_tags_input, opts = {})
257
+ data, _status_code, _headers = remove_tags_with_http_info(remove_data_source_tags_input, opts)
258
+ data
259
+ end
260
+
261
+ # Remove Data Source Tags
262
+ # @param remove_data_source_tags_input [RemoveDataSourceTagsInput]
263
+ # @param [Hash] opts the optional parameters
264
+ # @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
265
+ private def remove_tags_with_http_info_impl(remove_data_source_tags_input, opts = {})
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug 'Calling API: DataSourcesApi.remove_tags ...'
268
+ end
269
+ # verify the required parameter 'remove_data_source_tags_input' is set
270
+ if @api_client.config.client_side_validation && remove_data_source_tags_input.nil?
271
+ fail ArgumentError, "Missing the required parameter 'remove_data_source_tags_input' when calling DataSourcesApi.remove_tags"
272
+ end
273
+ # resource path
274
+ local_var_path = '/data_sources/tags/remove'
275
+
276
+ # query parameters
277
+ query_params = opts[:query_params] || {}
278
+
279
+ # header parameters
280
+ header_params = opts[:header_params] || {}
281
+ # HTTP header 'Accept' (if needed)
282
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
283
+ # HTTP header 'Content-Type'
284
+ content_type = @api_client.select_header_content_type(['application/json'])
285
+ if !content_type.nil?
286
+ header_params['Content-Type'] = content_type
287
+ end
288
+
289
+ # form parameters
290
+ form_params = opts[:form_params] || {}
291
+
292
+ # http body (model)
293
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_data_source_tags_input)
294
+
295
+ # return_type
296
+ return_type = opts[:debug_return_type] || 'OrganizationUserDataSourceAPI'
297
+
298
+ # auth_names
299
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
300
+
301
+ new_options = opts.merge(
302
+ :operation => :"DataSourcesApi.remove_tags",
303
+ :header_params => header_params,
304
+ :query_params => query_params,
305
+ :form_params => form_params,
306
+ :body => post_body,
307
+ :auth_names => auth_names,
308
+ :return_type => return_type
309
+ )
310
+
311
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
312
+ if @api_client.config.debugging
313
+ @api_client.config.logger.debug "API called: DataSourcesApi#remove_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
314
+ end
315
+ APIResponse::new(data, status_code, headers, response)
316
+ end
317
+
318
+
123
319
  # Revoke Access Token
124
320
  #
125
321
  # @param data_source_id [Integer]
@@ -1378,7 +1378,7 @@ module Carbon
1378
1378
  # @param media_type [FileContentTypesNullable] The media type of the file. If not provided, it will be inferred from the file extension.
1379
1379
  # @param split_rows [Boolean] Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
1380
1380
  # @param enable_cold_storage [Boolean] Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false.
1381
- # @param hot_storage_time_to_live [Integer] Time in seconds after which the file will be moved to cold storage.
1381
+ # @param hot_storage_time_to_live [Integer] Time in days after which the file will be moved to cold storage. Must be one of [1, 3, 7, 14, 30].
1382
1382
  # @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
1383
1383
  # @param store_file_only [Boolean] If this flag is enabled, the file will be stored with Carbon, but no processing will be done.
1384
1384
  # @param body [BodyCreateUploadFileUploadfilePost]
@@ -1455,7 +1455,7 @@ module Carbon
1455
1455
  # @param media_type [FileContentTypesNullable] The media type of the file. If not provided, it will be inferred from the file extension.
1456
1456
  # @param split_rows [Boolean] Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
1457
1457
  # @param enable_cold_storage [Boolean] Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false.
1458
- # @param hot_storage_time_to_live [Integer] Time in seconds after which the file will be moved to cold storage.
1458
+ # @param hot_storage_time_to_live [Integer] Time in days after which the file will be moved to cold storage. Must be one of [1, 3, 7, 14, 30].
1459
1459
  # @param generate_chunks_only [Boolean] If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
1460
1460
  # @param store_file_only [Boolean] If this flag is enabled, the file will be stored with Carbon, but no processing will be done.
1461
1461
  # @param body [BodyCreateUploadFileUploadfilePost]
@@ -1507,7 +1507,7 @@ module Carbon
1507
1507
  # @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
1508
1508
  # @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files. (default to false)
1509
1509
  # @option opts [Boolean] :enable_cold_storage Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false. (default to false)
1510
- # @option opts [Integer] :hot_storage_time_to_live Time in seconds after which the file will be moved to cold storage.
1510
+ # @option opts [Integer] :hot_storage_time_to_live Time in days after which the file will be moved to cold storage. Must be one of [1, 3, 7, 14, 30].
1511
1511
  # @option opts [Boolean] :generate_chunks_only If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag. (default to false)
1512
1512
  # @option opts [Boolean] :store_file_only If this flag is enabled, the file will be stored with Carbon, but no processing will be done. (default to false)
1513
1513
  # @return [UserFile]
@@ -1537,7 +1537,7 @@ module Carbon
1537
1537
  # @option opts [FileContentTypesNullable] :media_type The media type of the file. If not provided, it will be inferred from the file extension.
1538
1538
  # @option opts [Boolean] :split_rows Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files. (default to false)
1539
1539
  # @option opts [Boolean] :enable_cold_storage Enable cold storage for the file. If set to true, the file will be moved to cold storage after a certain period of inactivity. Default is false. (default to false)
1540
- # @option opts [Integer] :hot_storage_time_to_live Time in seconds after which the file will be moved to cold storage.
1540
+ # @option opts [Integer] :hot_storage_time_to_live Time in days after which the file will be moved to cold storage. Must be one of [1, 3, 7, 14, 30].
1541
1541
  # @option opts [Boolean] :generate_chunks_only If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag. (default to false)
1542
1542
  # @option opts [Boolean] :store_file_only If this flag is enabled, the file will be stored with Carbon, but no processing will be done. (default to false)
1543
1543
  # @return [APIResponse] data is UserFile, status code, headers and response