carbon_ruby_sdk 0.2.42 → 0.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +145 -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/authentication_property.rb +1 -5
  10. data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +14 -4
  11. data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +1 -1
  12. data/lib/carbon_ruby_sdk/models/external_source_item.rb +11 -1
  13. data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +15 -5
  14. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +15 -5
  15. data/lib/carbon_ruby_sdk/models/github_connect_request.rb +14 -4
  16. data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +15 -5
  17. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +15 -5
  18. data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +15 -1
  19. data/lib/carbon_ruby_sdk/models/organization_user_data_source_filters.rb +12 -1
  20. data/lib/carbon_ruby_sdk/models/pagination.rb +15 -4
  21. data/lib/carbon_ruby_sdk/models/remove_data_source_tags_input.rb +242 -0
  22. data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +15 -5
  23. data/lib/carbon_ruby_sdk/models/s3_auth_request.rb +15 -5
  24. data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +1 -5
  25. data/lib/carbon_ruby_sdk/models/sync_options.rb +15 -5
  26. data/lib/carbon_ruby_sdk/models/user_response.rb +18 -4
  27. data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +18 -4
  28. data/lib/carbon_ruby_sdk/version.rb +1 -1
  29. data/lib/carbon_ruby_sdk.rb +2 -0
  30. data/spec/api/data_sources_api_spec.rb +22 -0
  31. data/spec/api/files_api_spec.rb +1 -1
  32. data/spec/api/users_api_spec.rb +10 -0
  33. data/spec/models/add_data_source_tags_input_spec.rb +34 -0
  34. data/spec/models/azure_blob_auth_request_spec.rb +6 -0
  35. data/spec/models/external_source_item_spec.rb +6 -0
  36. data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
  37. data/spec/models/gitbook_connect_request_spec.rb +6 -0
  38. data/spec/models/github_connect_request_spec.rb +6 -0
  39. data/spec/models/guru_connect_request_spec.rb +6 -0
  40. data/spec/models/o_auth_url_request_spec.rb +6 -0
  41. data/spec/models/organization_user_data_source_api_spec.rb +6 -0
  42. data/spec/models/organization_user_data_source_filters_spec.rb +6 -0
  43. data/spec/models/pagination_spec.rb +6 -0
  44. data/spec/models/remove_data_source_tags_input_spec.rb +40 -0
  45. data/spec/models/rss_feed_input_spec.rb +6 -0
  46. data/spec/models/s3_auth_request_spec.rb +6 -0
  47. data/spec/models/sync_options_spec.rb +6 -0
  48. data/spec/models/user_response_spec.rb +6 -0
  49. data/spec/models/white_labeling_response_spec.rb +6 -0
  50. 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: 8a352dae3f352ac098e4b9e3dce57183ec6d7d51b9fa0be54e06980259cf1a24
4
+ data.tar.gz: 7998deace11207b727529794155403b8b331bcee5a0a5d89e245cb671207600d
5
5
  SHA512:
6
- metadata.gz: 01fc784420d00d6fbd842c89490f69e83170045b5a448e3a58faf2b46e48035e0cc18ad410e48c2e410fdb56cf824d8b9a6a2bd8993f23bcc42176646eaa69cd
7
- data.tar.gz: 888a7225635431d0232a823d6801a99433632794cf7a2e7c344503e772ddda3356497d58316a4dae0e62e4e4f72a1a039a8ba66b1db83f6376cd7cb4cdff7fc5
6
+ metadata.gz: 0d057a1a86a2b49205f263602d92db072afddede8b39c5dc12d5ae3b9cc1d708e293ef3a55dc819902b8fae0f2c43bed8e809a7da587720837f91810deee3dc6
7
+ data.tar.gz: 38ce8209f51c29d860dbeabf52c1e446999c5199f6ea5e23902294e12a853bfd2708b6e1f665b2f6f3bbfd51202f03292d4cc584514b0fdaf74f62f194b9f17c
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.44)
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.44-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.44)
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.44'
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
@@ -543,6 +577,7 @@ result = carbon.data_sources.query_user_data_sources(
543
577
  pagination: {
544
578
  "limit" => 10,
545
579
  "offset" => 0,
580
+ "starting_id" => 0,
546
581
  },
547
582
  order_by: "created_at",
548
583
  order_dir: "desc",
@@ -572,6 +607,39 @@ p result
572
607
  ---
573
608
 
574
609
 
610
+ ### `carbon.data_sources.remove_tags`<a id="carbondata_sourcesremove_tags"></a>
611
+
612
+ Remove Data Source Tags
613
+
614
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
615
+
616
+ ```ruby
617
+ result = carbon.data_sources.remove_tags(
618
+ data_source_id: 1,
619
+ tags_to_remove: [],
620
+ remove_all_tags: false,
621
+ )
622
+ p result
623
+ ```
624
+
625
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
626
+
627
+ ##### data_source_id: `Integer`<a id="data_source_id-integer"></a>
628
+ ##### tags_to_remove: Array<`String`><a id="tags_to_remove-array"></a>
629
+ ##### remove_all_tags: `Boolean`<a id="remove_all_tags-boolean"></a>
630
+ #### 🔄 Return<a id="🔄-return"></a>
631
+
632
+ [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
633
+
634
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
635
+
636
+ `/data_sources/tags/remove` `POST`
637
+
638
+ [🔙 **Back to Table of Contents**](#table-of-contents)
639
+
640
+ ---
641
+
642
+
575
643
  ### `carbon.data_sources.revoke_access_token`<a id="carbondata_sourcesrevoke_access_token"></a>
576
644
 
577
645
  Revoke Access Token
@@ -839,6 +907,7 @@ result = carbon.embeddings.get_embeddings_and_chunks(
839
907
  pagination: {
840
908
  "limit" => 10,
841
909
  "offset" => 0,
910
+ "starting_id" => 0,
842
911
  },
843
912
  order_by: "created_at",
844
913
  order_dir: "desc",
@@ -882,6 +951,7 @@ result = carbon.embeddings.list(
882
951
  pagination: {
883
952
  "limit" => 10,
884
953
  "offset" => 0,
954
+ "starting_id" => 0,
885
955
  },
886
956
  order_by: "created_at",
887
957
  order_dir: "desc",
@@ -1330,6 +1400,7 @@ result = carbon.files.query_user_files(
1330
1400
  pagination: {
1331
1401
  "limit" => 10,
1332
1402
  "offset" => 0,
1403
+ "starting_id" => 0,
1333
1404
  },
1334
1405
  order_by: "created_at",
1335
1406
  order_dir: "desc",
@@ -1378,6 +1449,7 @@ result = carbon.files.query_user_files_deprecated(
1378
1449
  pagination: {
1379
1450
  "limit" => 10,
1380
1451
  "offset" => 0,
1452
+ "starting_id" => 0,
1381
1453
  },
1382
1454
  order_by: "created_at",
1383
1455
  order_dir: "desc",
@@ -1569,7 +1641,8 @@ Enable cold storage for the file. If set to true, the file will be moved to cold
1569
1641
  storage after a certain period of inactivity. Default is false.
1570
1642
 
1571
1643
  ##### 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.
1644
+ Time in days after which the file will be moved to cold storage. Must be one of
1645
+ [1, 3, 7, 14, 30].
1573
1646
 
1574
1647
  ##### generate_chunks_only: `Boolean`<a id="generate_chunks_only-boolean"></a>
1575
1648
  If this flag is enabled, the file will be chunked and stored with Carbon, but no
@@ -2146,6 +2219,7 @@ result = carbon.integrations.connect_freshdesk(
2146
2219
  "store_file_only" => false,
2147
2220
  "skip_file_processing" => false,
2148
2221
  },
2222
+ data_source_tags: {},
2149
2223
  )
2150
2224
  p result
2151
2225
  ```
@@ -2168,6 +2242,10 @@ Enabling this flag will fetch all available content from the source to be listed
2168
2242
  via list items endpoint
2169
2243
 
2170
2244
  ##### 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>
2245
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2246
+ Tags to be associated with the data source. If the data source already has tags
2247
+ set, then an upsert will be performed.
2248
+
2171
2249
  #### 🔄 Return<a id="🔄-return"></a>
2172
2250
 
2173
2251
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -2215,6 +2293,7 @@ result = carbon.integrations.connect_gitbook(
2215
2293
  "store_file_only" => false,
2216
2294
  "skip_file_processing" => false,
2217
2295
  },
2296
+ data_source_tags: {},
2218
2297
  )
2219
2298
  p result
2220
2299
  ```
@@ -2237,6 +2316,10 @@ Enabling this flag will fetch all available content from the source to be listed
2237
2316
  via list items endpoint
2238
2317
 
2239
2318
  ##### 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>
2319
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2320
+ Tags to be associated with the data source. If the data source already has tags
2321
+ set, then an upsert will be performed.
2322
+
2240
2323
  #### 🔄 Return<a id="🔄-return"></a>
2241
2324
 
2242
2325
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -2282,6 +2365,7 @@ result = carbon.integrations.connect_guru(
2282
2365
  "store_file_only" => false,
2283
2366
  "skip_file_processing" => false,
2284
2367
  },
2368
+ data_source_tags: {},
2285
2369
  )
2286
2370
  p result
2287
2371
  ```
@@ -2304,6 +2388,10 @@ Enabling this flag will fetch all available content from the source to be listed
2304
2388
  via list items endpoint
2305
2389
 
2306
2390
  ##### 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>
2391
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2392
+ Tags to be associated with the data source. If the data source already has tags
2393
+ set, then an upsert will be performed.
2394
+
2307
2395
  #### 🔄 Return<a id="🔄-return"></a>
2308
2396
 
2309
2397
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -2338,6 +2426,7 @@ result = carbon.integrations.create_aws_iam_user(
2338
2426
  access_key_secret: "string_example",
2339
2427
  sync_source_items: true,
2340
2428
  endpoint_url: "string_example",
2429
+ data_source_tags: {},
2341
2430
  )
2342
2431
  p result
2343
2432
  ```
@@ -2355,6 +2444,10 @@ You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space
2355
2444
  through this endpoint. The URL should be of format
2356
2445
  <region>.digitaloceanspaces.com. It's not required for S3 buckets.
2357
2446
 
2447
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2448
+ Tags to be associated with the data source. If the data source already has tags
2449
+ set, then an upsert will be performed.
2450
+
2358
2451
  #### 🔄 Return<a id="🔄-return"></a>
2359
2452
 
2360
2453
  [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
@@ -2423,6 +2516,7 @@ result = carbon.integrations.get_oauth_url(
2423
2516
  "client_secret" => "client_secret_example",
2424
2517
  "redirect_uri" => "redirect_uri_example",
2425
2518
  },
2519
+ data_source_tags: {},
2426
2520
  )
2427
2521
  p result
2428
2522
  ```
@@ -2496,6 +2590,10 @@ you wish to connect. This email will be used to identify your carbon data
2496
2590
  source.
2497
2591
 
2498
2592
  ##### servicenow_credentials: [`ServiceNowCredentialsNullable`](./lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb)<a id="servicenow_credentials-servicenowcredentialsnullablelibcarbon_ruby_sdkmodelsservice_now_credentials_nullablerb"></a>
2593
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2594
+ Tags to be associated with the data source. If the data source already has tags
2595
+ set, then an upsert will be performed.
2596
+
2499
2597
  #### 🔄 Return<a id="🔄-return"></a>
2500
2598
 
2501
2599
  [OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
@@ -2601,6 +2699,7 @@ result = carbon.integrations.list_data_source_items(
2601
2699
  pagination: {
2602
2700
  "limit" => 10,
2603
2701
  "offset" => 0,
2702
+ "starting_id" => 0,
2604
2703
  },
2605
2704
  order_by: "name",
2606
2705
  order_dir: "asc",
@@ -2864,6 +2963,7 @@ result = carbon.integrations.sync_azure_blob_storage(
2864
2963
  account_name: "string_example",
2865
2964
  account_key: "string_example",
2866
2965
  sync_source_items: true,
2966
+ data_source_tags: {},
2867
2967
  )
2868
2968
  p result
2869
2969
  ```
@@ -2873,6 +2973,10 @@ p result
2873
2973
  ##### account_name: `String`<a id="account_name-string"></a>
2874
2974
  ##### account_key: `String`<a id="account_key-string"></a>
2875
2975
  ##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
2976
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
2977
+ Tags to be associated with the data source. If the data source already has tags
2978
+ set, then an upsert will be performed.
2979
+
2876
2980
  #### 🔄 Return<a id="🔄-return"></a>
2877
2981
 
2878
2982
  [OrganizationUserDataSourceAPI](./lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb)
@@ -3093,6 +3197,7 @@ result = carbon.integrations.sync_git_hub(
3093
3197
  username: "string_example",
3094
3198
  access_token: "string_example",
3095
3199
  sync_source_items: false,
3200
+ data_source_tags: {},
3096
3201
  )
3097
3202
  p result
3098
3203
  ```
@@ -3105,6 +3210,10 @@ p result
3105
3210
  Enabling this flag will fetch all available content from the source to be listed
3106
3211
  via list items endpoint
3107
3212
 
3213
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
3214
+ Tags to be associated with the data source. If the data source already has tags
3215
+ set, then an upsert will be performed.
3216
+
3108
3217
  #### 🔄 Return<a id="🔄-return"></a>
3109
3218
 
3110
3219
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -3465,6 +3574,7 @@ result = carbon.integrations.sync_rss_feed(
3465
3574
  generate_sparse_vectors: false,
3466
3575
  prepend_filename_to_chunks: false,
3467
3576
  request_id: "string_example",
3577
+ data_source_tags: {},
3468
3578
  )
3469
3579
  p result
3470
3580
  ```
@@ -3480,6 +3590,10 @@ p result
3480
3590
  ##### generate_sparse_vectors: `Boolean`<a id="generate_sparse_vectors-boolean"></a>
3481
3591
  ##### prepend_filename_to_chunks: `Boolean`<a id="prepend_filename_to_chunks-boolean"></a>
3482
3592
  ##### request_id: `String`<a id="request_id-string"></a>
3593
+ ##### data_source_tags: `Object`<a id="data_source_tags-object"></a>
3594
+ Tags to be associated with the data source. If the data source already has tags
3595
+ set, then an upsert will be performed.
3596
+
3483
3597
  #### 🔄 Return<a id="🔄-return"></a>
3484
3598
 
3485
3599
  [GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
@@ -3774,6 +3888,7 @@ result = carbon.users.list(
3774
3888
  pagination: {
3775
3889
  "limit" => 10,
3776
3890
  "offset" => 0,
3891
+ "starting_id" => 0,
3777
3892
  },
3778
3893
  filters: {
3779
3894
  },
@@ -3903,6 +4018,30 @@ not set, or if set to -1, then the user will have no limit.
3903
4018
  ---
3904
4019
 
3905
4020
 
4021
+ ### `carbon.users.who_am_i`<a id="carbonuserswho_am_i"></a>
4022
+
4023
+ Me Endpoint
4024
+
4025
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
4026
+
4027
+ ```ruby
4028
+ result = carbon.users.who_am_i
4029
+ p result
4030
+ ```
4031
+
4032
+ #### 🔄 Return<a id="🔄-return"></a>
4033
+
4034
+ [UserResponse](./lib/carbon_ruby_sdk/models/user_response.rb)
4035
+
4036
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
4037
+
4038
+ `/whoami` `GET`
4039
+
4040
+ [🔙 **Back to Table of Contents**](#table-of-contents)
4041
+
4042
+ ---
4043
+
4044
+
3906
4045
  ### `carbon.utilities.fetch_urls`<a id="carbonutilitiesfetch_urls"></a>
3907
4046
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
3908
4047
 
@@ -4243,6 +4382,7 @@ result = carbon.utilities.user_webpages(
4243
4382
  pagination: {
4244
4383
  "limit" => 10,
4245
4384
  "offset" => 0,
4385
+ "starting_id" => 0,
4246
4386
  },
4247
4387
  order_by: "created_at",
4248
4388
  order_dir: "asc",
@@ -4334,6 +4474,7 @@ result = carbon.webhooks.urls(
4334
4474
  pagination: {
4335
4475
  "limit" => 10,
4336
4476
  "offset" => 0,
4477
+ "starting_id" => 0,
4337
4478
  },
4338
4479
  order_by: "created_at",
4339
4480
  order_dir: "desc",
@@ -4434,6 +4575,7 @@ result = carbon.white_label.list(
4434
4575
  pagination: {
4435
4576
  "limit" => 10,
4436
4577
  "offset" => 0,
4578
+ "starting_id" => 0,
4437
4579
  },
4438
4580
  order_by: "created_at",
4439
4581
  order_dir: "desc",
@@ -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