composio 0.1.9 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12bca9fcaf3ed64d8a9fc4ae997d474f9512a6342f635813652d56fed502cd70
4
- data.tar.gz: a1ed487a3dc4cdc2d8612a0c38145f73321610469b07fce41ccbcfa3e2e9ec02
3
+ metadata.gz: 0a00bcfd3d03b9ebc7df6933f8e419666d9a84998cb44b9c76ec67568f1f2414
4
+ data.tar.gz: f1d7cf2033f7dd2c8c528d923cbf3f77ade9e18c20a3921483f42179d9c7ec92
5
5
  SHA512:
6
- metadata.gz: 66f00bd57d5c0684e623f86ab625f985639a49780d69c9139fc066a0f056424ee334ce50573bb971315a898fc83f14e6eeefe09ba7bb36d38ec2c67d9fc43b7b
7
- data.tar.gz: e123dc3761333a513fd6a955e6d8b72ac6c2ac45dc738afdbd51d154d5c1f20f1778bafedd62164a71f0c67f174ca0540243895c7248ecb09c05b5abb3e370e1
6
+ metadata.gz: 03f2887d4f20c685705a6e92b1258e93ed895785e4a4e14ceeceda7b1567db19950a50629b30eceefb2cfa418de45e530a88c843156f246334398ad79e801969
7
+ data.tar.gz: 3be4d2de1c3bd2e83b9e4d4ee30665eabc9f198fbda9d37a3b8026884d91e7e457490eb440be1fd1cf689a162bd476493219b63fa7510070c03301e8dec5eb9a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- composio (0.1.9)
4
+ composio (0.1.11)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -44,12 +44,12 @@ GEM
44
44
  regexp_parser (2.9.2)
45
45
  reline (0.5.10)
46
46
  io-console (~> 0.5)
47
- rexml (3.3.8)
47
+ rexml (3.3.9)
48
48
  rspec (3.13.0)
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
  Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v0.1.9-blue)](https://rubygems.org/gems/composio/versions/0.1.9)
9
+ [![npm](https://img.shields.io/badge/gem-v0.1.11-blue)](https://rubygems.org/gems/composio/versions/0.1.11)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://composio.dev)
11
11
 
12
12
  </div>
@@ -78,7 +78,7 @@ Composio SDK: Equip your agent with high-quality tools and build your real-world
78
78
  Add to Gemfile:
79
79
 
80
80
  ```ruby
81
- gem 'composio', '~> 0.1.9'
81
+ gem 'composio', '~> 0.1.11'
82
82
  ```
83
83
 
84
84
  ## Getting Started<a id="getting-started"></a>
@@ -217,8 +217,6 @@ result = composio.actions.execute(
217
217
  "value" => "value_example",
218
218
  }
219
219
  ],
220
- "base_url" => "base_url_example",
221
- "body" => {},
222
220
  },
223
221
  text: "string_example",
224
222
  )
@@ -233,7 +231,7 @@ p result
233
231
  ##### entityId: `String`<a id="entityid-string"></a>
234
232
  ##### endpoint: `String`<a id="endpoint-string"></a>
235
233
  ##### input: `Object`<a id="input-object"></a>
236
- ##### authConfig: [`GetConnectionInfoResponseDTO`](./lib/composio/models/get_connection_info_response_dto.rb)<a id="authconfig-getconnectioninforesponsedtolibcomposiomodelsget_connection_info_response_dtorb"></a>
234
+ ##### authConfig: [`CustomAuthDTO`](./lib/composio/models/custom_auth_dto.rb)<a id="authconfig-customauthdtolibcomposiomodelscustom_auth_dtorb"></a>
237
235
  ##### text: `String`<a id="text-string"></a>
238
236
  #### 🔄 Return<a id="🔄-return"></a>
239
237
 
@@ -442,7 +440,7 @@ p result
442
440
 
443
441
  ### `composio.apps.delete_open_api_spec_tool`<a id="composioappsdelete_open_api_spec_tool"></a>
444
442
 
445
- Delete open api spec tool
443
+ Delete an openapi spec tool
446
444
 
447
445
  #### 🛠️ Usage<a id="🛠️-usage"></a>
448
446
 
@@ -496,7 +494,7 @@ p result
496
494
 
497
495
  ### `composio.apps.get_open_api_spec_status`<a id="composioappsget_open_api_spec_status"></a>
498
496
 
499
- Get open api spec status
497
+ Get the status of an openapi spec tool
500
498
 
501
499
  #### 🛠️ Usage<a id="🛠️-usage"></a>
502
500
 
@@ -552,7 +550,7 @@ p result
552
550
 
553
551
  ### `composio.apps.list_open_api_specs`<a id="composioappslist_open_api_specs"></a>
554
552
 
555
- Get opena api specs
553
+ List all openapi spec tools
556
554
 
557
555
  #### 🛠️ Usage<a id="🛠️-usage"></a>
558
556
 
@@ -637,7 +635,7 @@ The framework used by the client
637
635
 
638
636
  ### `composio.connections.delete`<a id="composioconnectionsdelete"></a>
639
637
 
640
- Delete connection
638
+ Delete a connection
641
639
 
642
640
  #### 🛠️ Usage<a id="🛠️-usage"></a>
643
641
 
@@ -666,7 +664,7 @@ p result
666
664
 
667
665
  ### `composio.connections.disable`<a id="composioconnectionsdisable"></a>
668
666
 
669
- Disable connection
667
+ Disable a connection
670
668
 
671
669
  #### 🛠️ Usage<a id="🛠️-usage"></a>
672
670
 
@@ -695,7 +693,7 @@ p result
695
693
 
696
694
  ### `composio.connections.enable`<a id="composioconnectionsenable"></a>
697
695
 
698
- Enable connection
696
+ Enable a connection
699
697
 
700
698
  #### 🛠️ Usage<a id="🛠️-usage"></a>
701
699
 
@@ -976,15 +974,15 @@ Event Webhook URL
976
974
 
977
975
  ### `composio.integrations.create_integration`<a id="composiointegrationscreate_integration"></a>
978
976
 
979
- Create connector
977
+ Create a new connector
980
978
 
981
979
  #### 🛠️ Usage<a id="🛠️-usage"></a>
982
980
 
983
981
  ```ruby
984
982
  result = composio.integrations.create_integration(
985
983
  name: "string_example",
986
- app_id: "string_example",
987
984
  auth_scheme: "string_example",
985
+ app_id: "string_example",
988
986
  auth_config: {
989
987
  },
990
988
  use_composio_auth: true,
@@ -998,12 +996,12 @@ p result
998
996
  ##### name: `String`<a id="name-string"></a>
999
997
  Name of the connector
1000
998
 
1001
- ##### appId: `String`<a id="appid-string"></a>
1002
- Application ID
1003
-
1004
999
  ##### authScheme: `String`<a id="authscheme-string"></a>
1005
1000
  Authentication scheme
1006
1001
 
1002
+ ##### appId: `String`<a id="appid-string"></a>
1003
+ Application ID
1004
+
1007
1005
  ##### authConfig: [`AuthConfigDTO`](./lib/composio/models/auth_config_dto.rb)<a id="authconfig-authconfigdtolibcomposiomodelsauth_config_dtorb"></a>
1008
1006
  ##### useComposioAuth: [`CreateConnectorPayloadDTOUseComposioAuth`](./lib/composio/models/create_connector_payload_dto_use_composio_auth.rb)<a id="usecomposioauth-createconnectorpayloaddtousecomposioauthlibcomposiomodelscreate_connector_payload_dto_use_composio_authrb"></a>
1009
1007
  ##### forceNewIntegration: `Boolean`<a id="forcenewintegration-boolean"></a>
@@ -1024,7 +1022,7 @@ Flag to force new integration
1024
1022
 
1025
1023
  ### `composio.integrations.delete_connector`<a id="composiointegrationsdelete_connector"></a>
1026
1024
 
1027
- Delete connector
1025
+ Delete a connector
1028
1026
 
1029
1027
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1030
1028
 
@@ -1106,7 +1104,7 @@ p result
1106
1104
 
1107
1105
  ### `composio.integrations.update_integration`<a id="composiointegrationsupdate_integration"></a>
1108
1106
 
1109
- Modify connector
1107
+ Modify a connector
1110
1108
 
1111
1109
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1112
1110
 
@@ -26,7 +26,7 @@ module Composio
26
26
  # @param entity_id [String]
27
27
  # @param endpoint [String]
28
28
  # @param input [Object]
29
- # @param auth_config [GetConnectionInfoResponseDTO]
29
+ # @param auth_config [CustomAuthDTO]
30
30
  # @param text [String]
31
31
  # @param body [ActionExecutionReqDTO]
32
32
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -54,7 +54,7 @@ module Composio
54
54
  # @param entity_id [String]
55
55
  # @param endpoint [String]
56
56
  # @param input [Object]
57
- # @param auth_config [GetConnectionInfoResponseDTO]
57
+ # @param auth_config [CustomAuthDTO]
58
58
  # @param text [String]
59
59
  # @param body [ActionExecutionReqDTO]
60
60
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -18,6 +18,8 @@ module Composio
18
18
 
19
19
  # Delete connection
20
20
  #
21
+ # Delete a connection
22
+ #
21
23
  # @param connected_account_id [String]
22
24
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
23
25
  def delete(connected_account_id:, extra: {})
@@ -27,6 +29,8 @@ module Composio
27
29
 
28
30
  # Delete connection
29
31
  #
32
+ # Delete a connection
33
+ #
30
34
  # @param connected_account_id [String]
31
35
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
32
36
  def delete_with_http_info(connected_account_id:, extra: {})
@@ -34,6 +38,7 @@ module Composio
34
38
  end
35
39
 
36
40
  # Delete connection
41
+ # Delete a connection
37
42
  # @param connected_account_id [String]
38
43
  # @param [Hash] opts the optional parameters
39
44
  # @return [DeleteRowAPIDTO]
@@ -43,6 +48,7 @@ module Composio
43
48
  end
44
49
 
45
50
  # Delete connection
51
+ # Delete a connection
46
52
  # @param connected_account_id [String]
47
53
  # @param [Hash] opts the optional parameters
48
54
  # @return [APIResponse] data is DeleteRowAPIDTO, status code, headers and response
@@ -102,6 +108,8 @@ module Composio
102
108
 
103
109
  # Disable connection
104
110
  #
111
+ # Disable a connection
112
+ #
105
113
  # @param connected_account_id [String]
106
114
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
107
115
  def disable(connected_account_id:, extra: {})
@@ -111,6 +119,8 @@ module Composio
111
119
 
112
120
  # Disable connection
113
121
  #
122
+ # Disable a connection
123
+ #
114
124
  # @param connected_account_id [String]
115
125
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
116
126
  def disable_with_http_info(connected_account_id:, extra: {})
@@ -118,6 +128,7 @@ module Composio
118
128
  end
119
129
 
120
130
  # Disable connection
131
+ # Disable a connection
121
132
  # @param connected_account_id [String]
122
133
  # @param [Hash] opts the optional parameters
123
134
  # @return [ToggleConnectedAccountResponseDTO]
@@ -127,6 +138,7 @@ module Composio
127
138
  end
128
139
 
129
140
  # Disable connection
141
+ # Disable a connection
130
142
  # @param connected_account_id [String]
131
143
  # @param [Hash] opts the optional parameters
132
144
  # @return [APIResponse] data is ToggleConnectedAccountResponseDTO, status code, headers and response
@@ -186,6 +198,8 @@ module Composio
186
198
 
187
199
  # Enable connection
188
200
  #
201
+ # Enable a connection
202
+ #
189
203
  # @param connected_account_id [String]
190
204
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
191
205
  def enable(connected_account_id:, extra: {})
@@ -195,6 +209,8 @@ module Composio
195
209
 
196
210
  # Enable connection
197
211
  #
212
+ # Enable a connection
213
+ #
198
214
  # @param connected_account_id [String]
199
215
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
200
216
  def enable_with_http_info(connected_account_id:, extra: {})
@@ -202,6 +218,7 @@ module Composio
202
218
  end
203
219
 
204
220
  # Enable connection
221
+ # Enable a connection
205
222
  # @param connected_account_id [String]
206
223
  # @param [Hash] opts the optional parameters
207
224
  # @return [ToggleConnectedAccountResponseDTO]
@@ -211,6 +228,7 @@ module Composio
211
228
  end
212
229
 
213
230
  # Enable connection
231
+ # Enable a connection
214
232
  # @param connected_account_id [String]
215
233
  # @param [Hash] opts the optional parameters
216
234
  # @return [APIResponse] data is ToggleConnectedAccountResponseDTO, status code, headers and response
@@ -352,6 +370,8 @@ module Composio
352
370
  end
353
371
 
354
372
 
373
+ # Get connection info
374
+ #
355
375
  # Get connection info
356
376
  #
357
377
  # @param connected_account_id [String]
@@ -361,6 +381,8 @@ module Composio
361
381
  api_response.data
362
382
  end
363
383
 
384
+ # Get connection info
385
+ #
364
386
  # Get connection info
365
387
  #
366
388
  # @param connected_account_id [String]
@@ -369,6 +391,7 @@ module Composio
369
391
  get_info_with_http_info_impl(connected_account_id, extra)
370
392
  end
371
393
 
394
+ # Get connection info
372
395
  # Get connection info
373
396
  # @param connected_account_id [String]
374
397
  # @param [Hash] opts the optional parameters
@@ -378,6 +401,7 @@ module Composio
378
401
  data
379
402
  end
380
403
 
404
+ # Get connection info
381
405
  # Get connection info
382
406
  # @param connected_account_id [String]
383
407
  # @param [Hash] opts the optional parameters
@@ -18,15 +18,17 @@ module Composio
18
18
 
19
19
  # Create connector
20
20
  #
21
+ # Create a new connector
22
+ #
21
23
  # @param name [String] Name of the connector
22
- # @param app_id [String] Application ID
23
24
  # @param auth_scheme [String] Authentication scheme
25
+ # @param app_id [String] Application ID
24
26
  # @param auth_config [AuthConfigDTO]
25
27
  # @param use_composio_auth [CreateConnectorPayloadDTOUseComposioAuth]
26
28
  # @param force_new_integration [Boolean] Flag to force new integration
27
29
  # @param body [CreateConnectorPayloadDTO]
28
30
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
29
- def create_integration(name:, app_id:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, force_new_integration: SENTINEL, extra: {})
31
+ def create_integration(name:, auth_scheme:, app_id:, auth_config: SENTINEL, use_composio_auth: SENTINEL, force_new_integration: SENTINEL, extra: {})
30
32
  _body = {}
31
33
  _body[:name] = name if name != SENTINEL
32
34
  _body[:authScheme] = auth_scheme if auth_scheme != SENTINEL
@@ -41,15 +43,17 @@ module Composio
41
43
 
42
44
  # Create connector
43
45
  #
46
+ # Create a new connector
47
+ #
44
48
  # @param name [String] Name of the connector
45
- # @param app_id [String] Application ID
46
49
  # @param auth_scheme [String] Authentication scheme
50
+ # @param app_id [String] Application ID
47
51
  # @param auth_config [AuthConfigDTO]
48
52
  # @param use_composio_auth [CreateConnectorPayloadDTOUseComposioAuth]
49
53
  # @param force_new_integration [Boolean] Flag to force new integration
50
54
  # @param body [CreateConnectorPayloadDTO]
51
55
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
52
- def create_integration_with_http_info(name:, app_id:, auth_scheme: SENTINEL, auth_config: SENTINEL, use_composio_auth: SENTINEL, force_new_integration: SENTINEL, extra: {})
56
+ def create_integration_with_http_info(name:, auth_scheme:, app_id:, auth_config: SENTINEL, use_composio_auth: SENTINEL, force_new_integration: SENTINEL, extra: {})
53
57
  _body = {}
54
58
  _body[:name] = name if name != SENTINEL
55
59
  _body[:authScheme] = auth_scheme if auth_scheme != SENTINEL
@@ -62,6 +66,7 @@ module Composio
62
66
  end
63
67
 
64
68
  # Create connector
69
+ # Create a new connector
65
70
  # @param [Hash] opts the optional parameters
66
71
  # @option opts [CreateConnectorPayloadDTO] :create_connector_payload_dto CreateConnectorPayloadDTO
67
72
  # @return [GetConnectorInfoResDTO]
@@ -71,6 +76,7 @@ module Composio
71
76
  end
72
77
 
73
78
  # Create connector
79
+ # Create a new connector
74
80
  # @param [Hash] opts the optional parameters
75
81
  # @option opts [CreateConnectorPayloadDTO] :create_connector_payload_dto CreateConnectorPayloadDTO
76
82
  # @return [APIResponse] data is GetConnectorInfoResDTO, status code, headers and response
@@ -126,6 +132,8 @@ module Composio
126
132
 
127
133
  # Delete connector
128
134
  #
135
+ # Delete a connector
136
+ #
129
137
  # @param integration_id [String]
130
138
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
131
139
  def delete_connector(integration_id:, extra: {})
@@ -135,6 +143,8 @@ module Composio
135
143
 
136
144
  # Delete connector
137
145
  #
146
+ # Delete a connector
147
+ #
138
148
  # @param integration_id [String]
139
149
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
140
150
  def delete_connector_with_http_info(integration_id:, extra: {})
@@ -142,6 +152,7 @@ module Composio
142
152
  end
143
153
 
144
154
  # Delete connector
155
+ # Delete a connector
145
156
  # @param integration_id [String]
146
157
  # @param [Hash] opts the optional parameters
147
158
  # @return [DeleteRowAPIDTO]
@@ -151,6 +162,7 @@ module Composio
151
162
  end
152
163
 
153
164
  # Delete connector
165
+ # Delete a connector
154
166
  # @param integration_id [String]
155
167
  # @param [Hash] opts the optional parameters
156
168
  # @return [APIResponse] data is DeleteRowAPIDTO, status code, headers and response
@@ -208,6 +220,8 @@ module Composio
208
220
  end
209
221
 
210
222
 
223
+ # Get connector info
224
+ #
211
225
  # Get connector info
212
226
  #
213
227
  # @param integration_id [String]
@@ -217,6 +231,8 @@ module Composio
217
231
  api_response.data
218
232
  end
219
233
 
234
+ # Get connector info
235
+ #
220
236
  # Get connector info
221
237
  #
222
238
  # @param integration_id [String]
@@ -225,6 +241,7 @@ module Composio
225
241
  get_connector_info_with_http_info_impl(integration_id, extra)
226
242
  end
227
243
 
244
+ # Get connector info
228
245
  # Get connector info
229
246
  # @param integration_id [String]
230
247
  # @param [Hash] opts the optional parameters
@@ -234,6 +251,7 @@ module Composio
234
251
  data
235
252
  end
236
253
 
254
+ # Get connector info
237
255
  # Get connector info
238
256
  # @param integration_id [String]
239
257
  # @param [Hash] opts the optional parameters
@@ -292,6 +310,8 @@ module Composio
292
310
  end
293
311
 
294
312
 
313
+ # List all connectors
314
+ #
295
315
  # List all connectors
296
316
  #
297
317
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -300,6 +320,8 @@ module Composio
300
320
  api_response.data
301
321
  end
302
322
 
323
+ # List all connectors
324
+ #
303
325
  # List all connectors
304
326
  #
305
327
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
@@ -307,6 +329,7 @@ module Composio
307
329
  list_global_connectors_with_http_info_impl(extra)
308
330
  end
309
331
 
332
+ # List all connectors
310
333
  # List all connectors
311
334
  # @param [Hash] opts the optional parameters
312
335
  # @return [GetConnectorListResDTO]
@@ -315,6 +338,7 @@ module Composio
315
338
  data
316
339
  end
317
340
 
341
+ # List all connectors
318
342
  # List all connectors
319
343
  # @param [Hash] opts the optional parameters
320
344
  # @return [APIResponse] data is GetConnectorListResDTO, status code, headers and response
@@ -365,6 +389,8 @@ module Composio
365
389
 
366
390
  # Modify connector
367
391
  #
392
+ # Modify a connector
393
+ #
368
394
  # @param integration_id [String]
369
395
  # @param auth_config [Object] Authentication configuration for the connector
370
396
  # @param enabled [Boolean] Flag to indicate if the connector is enabled
@@ -381,6 +407,8 @@ module Composio
381
407
 
382
408
  # Modify connector
383
409
  #
410
+ # Modify a connector
411
+ #
384
412
  # @param integration_id [String]
385
413
  # @param auth_config [Object] Authentication configuration for the connector
386
414
  # @param enabled [Boolean] Flag to indicate if the connector is enabled
@@ -395,6 +423,7 @@ module Composio
395
423
  end
396
424
 
397
425
  # Modify connector
426
+ # Modify a connector
398
427
  # @param integration_id [String]
399
428
  # @param [Hash] opts the optional parameters
400
429
  # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
@@ -405,6 +434,7 @@ module Composio
405
434
  end
406
435
 
407
436
  # Modify connector
437
+ # Modify a connector
408
438
  # @param integration_id [String]
409
439
  # @param [Hash] opts the optional parameters
410
440
  # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
@@ -51,7 +51,7 @@ module Composio
51
51
  :'entity_id' => :'String',
52
52
  :'endpoint' => :'String',
53
53
  :'input' => :'Object',
54
- :'auth_config' => :'GetConnectionInfoResponseDTO',
54
+ :'auth_config' => :'CustomAuthDTO',
55
55
  :'text' => :'String'
56
56
  }
57
57
  end
@@ -110,6 +110,10 @@ module Composio
110
110
  invalid_properties.push('invalid value for "name", name cannot be nil.')
111
111
  end
112
112
 
113
+ if @auth_scheme.nil?
114
+ invalid_properties.push('invalid value for "auth_scheme", auth_scheme cannot be nil.')
115
+ end
116
+
113
117
  if @app_id.nil?
114
118
  invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
115
119
  end
@@ -121,6 +125,7 @@ module Composio
121
125
  # @return true if the model is valid
122
126
  def valid?
123
127
  return false if @name.nil?
128
+ return false if @auth_scheme.nil?
124
129
  return false if @app_id.nil?
125
130
  true
126
131
  end
@@ -0,0 +1,240 @@
1
+ =begin
2
+ #Composio OpenAPI
3
+
4
+ #Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Composio
13
+ class CustomAuthDTO
14
+ attr_accessor :parameters
15
+
16
+ attr_accessor :base_url
17
+
18
+ attr_accessor :body
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'parameters' => :'parameters',
24
+ :'base_url' => :'base_url',
25
+ :'body' => :'body'
26
+ }
27
+ end
28
+
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'parameters' => :'Array<Parameter>',
38
+ :'base_url' => :'String',
39
+ :'body' => :'Object'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::CustomAuthDTO` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::CustomAuthDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'parameters')
65
+ if (value = attributes[:'parameters']).is_a?(Array)
66
+ self.parameters = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'base_url')
71
+ self.base_url = attributes[:'base_url']
72
+ end
73
+
74
+ if attributes.key?(:'body')
75
+ self.body = attributes[:'body']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if @parameters.nil?
84
+ invalid_properties.push('invalid value for "parameters", parameters cannot be nil.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @parameters.nil?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ parameters == o.parameters &&
103
+ base_url == o.base_url &&
104
+ body == o.body
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [parameters, base_url, body].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = Composio.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -15,9 +15,10 @@ module Composio
15
15
  STARTER = "STARTER".freeze
16
16
  GROWTH = "GROWTH".freeze
17
17
  ENTERPRISE = "ENTERPRISE".freeze
18
+ STARTUP = "STARTUP".freeze
18
19
 
19
20
  def self.all_vars
20
- @all_vars ||= [HOBBY, STARTER, GROWTH, ENTERPRISE].freeze
21
+ @all_vars ||= [HOBBY, STARTER, GROWTH, ENTERPRISE, STARTUP].freeze
21
22
  end
22
23
 
23
24
  # Builds the enum from string
@@ -7,5 +7,5 @@ The version of the OpenAPI document: 1.0.0
7
7
  =end
8
8
 
9
9
  module Composio
10
- VERSION = '0.1.9'
10
+ VERSION = '0.1.11'
11
11
  end
data/lib/composio.rb CHANGED
@@ -59,6 +59,7 @@ require 'composio/models/connector_list_item_dto_updated_at'
59
59
  require 'composio/models/create_checkout_session_req_dto'
60
60
  require 'composio/models/create_connector_payload_dto'
61
61
  require 'composio/models/create_connector_payload_dto_use_composio_auth'
62
+ require 'composio/models/custom_auth_dto'
62
63
  require 'composio/models/data'
63
64
  require 'composio/models/delete_api_key_req_dto'
64
65
  require 'composio/models/delete_api_key_response_dto'
@@ -28,6 +28,7 @@ describe 'AppsApi' do
28
28
 
29
29
  # unit tests for delete_open_api_spec_tool
30
30
  # Delete open api spec tool
31
+ # Delete an openapi spec tool
31
32
  # @param id
32
33
  # @param [Hash] opts the optional parameters
33
34
  # @return [Object]
@@ -51,6 +52,7 @@ describe 'AppsApi' do
51
52
 
52
53
  # unit tests for get_open_api_spec_status
53
54
  # Get open api spec status
55
+ # Get the status of an openapi spec tool
54
56
  # @param id
55
57
  # @param [Hash] opts the optional parameters
56
58
  # @return [Object]
@@ -75,6 +77,7 @@ describe 'AppsApi' do
75
77
 
76
78
  # unit tests for list_open_api_specs
77
79
  # Get opena api specs
80
+ # List all openapi spec tools
78
81
  # @param [Hash] opts the optional parameters
79
82
  # @return [Array<AppListResDTO>]
80
83
  describe 'list_open_api_specs test' do
@@ -28,6 +28,7 @@ describe 'ConnectionsApi' do
28
28
 
29
29
  # unit tests for delete
30
30
  # Delete connection
31
+ # Delete a connection
31
32
  # @param connected_account_id
32
33
  # @param [Hash] opts the optional parameters
33
34
  # @return [DeleteRowAPIDTO]
@@ -39,6 +40,7 @@ describe 'ConnectionsApi' do
39
40
 
40
41
  # unit tests for disable
41
42
  # Disable connection
43
+ # Disable a connection
42
44
  # @param connected_account_id
43
45
  # @param [Hash] opts the optional parameters
44
46
  # @return [ToggleConnectedAccountResponseDTO]
@@ -50,6 +52,7 @@ describe 'ConnectionsApi' do
50
52
 
51
53
  # unit tests for enable
52
54
  # Enable connection
55
+ # Enable a connection
53
56
  # @param connected_account_id
54
57
  # @param [Hash] opts the optional parameters
55
58
  # @return [ToggleConnectedAccountResponseDTO]
@@ -72,6 +75,7 @@ describe 'ConnectionsApi' do
72
75
 
73
76
  # unit tests for get_info
74
77
  # Get connection info
78
+ # Get connection info
75
79
  # @param connected_account_id
76
80
  # @param [Hash] opts the optional parameters
77
81
  # @return [GetConnectionInfoResponseDTO]
@@ -28,6 +28,7 @@ describe 'IntegrationsApi' do
28
28
 
29
29
  # unit tests for create_integration
30
30
  # Create connector
31
+ # Create a new connector
31
32
  # @param [Hash] opts the optional parameters
32
33
  # @option opts [CreateConnectorPayloadDTO] :create_connector_payload_dto CreateConnectorPayloadDTO
33
34
  # @return [GetConnectorInfoResDTO]
@@ -39,6 +40,7 @@ describe 'IntegrationsApi' do
39
40
 
40
41
  # unit tests for delete_connector
41
42
  # Delete connector
43
+ # Delete a connector
42
44
  # @param integration_id
43
45
  # @param [Hash] opts the optional parameters
44
46
  # @return [DeleteRowAPIDTO]
@@ -50,6 +52,7 @@ describe 'IntegrationsApi' do
50
52
 
51
53
  # unit tests for get_connector_info
52
54
  # Get connector info
55
+ # Get connector info
53
56
  # @param integration_id
54
57
  # @param [Hash] opts the optional parameters
55
58
  # @return [GetConnectorInfoResDTO]
@@ -61,6 +64,7 @@ describe 'IntegrationsApi' do
61
64
 
62
65
  # unit tests for list_global_connectors
63
66
  # List all connectors
67
+ # List all connectors
64
68
  # @param [Hash] opts the optional parameters
65
69
  # @return [GetConnectorListResDTO]
66
70
  describe 'list_global_connectors test' do
@@ -71,6 +75,7 @@ describe 'IntegrationsApi' do
71
75
 
72
76
  # unit tests for update_integration
73
77
  # Modify connector
78
+ # Modify a connector
74
79
  # @param integration_id
75
80
  # @param [Hash] opts the optional parameters
76
81
  # @option opts [PatchConnectorReqDTO] :patch_connector_req_dto PatchConnectorReqDTO
@@ -0,0 +1,40 @@
1
+ =begin
2
+ #Composio OpenAPI
3
+
4
+ #Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Composio::CustomAuthDTO
14
+ describe Composio::CustomAuthDTO do
15
+ let(:instance) { Composio::CustomAuthDTO.new }
16
+
17
+ describe 'test an instance of CustomAuthDTO' do
18
+ it 'should create an instance of CustomAuthDTO' do
19
+ expect(instance).to be_instance_of(Composio::CustomAuthDTO)
20
+ end
21
+ end
22
+ describe 'test attribute "parameters"' do
23
+ it 'should work' do
24
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
25
+ end
26
+ end
27
+
28
+ describe 'test attribute "base_url"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "body"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-10 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -144,6 +144,7 @@ files:
144
144
  - lib/composio/models/create_checkout_session_req_dto.rb
145
145
  - lib/composio/models/create_connector_payload_dto.rb
146
146
  - lib/composio/models/create_connector_payload_dto_use_composio_auth.rb
147
+ - lib/composio/models/custom_auth_dto.rb
147
148
  - lib/composio/models/data.rb
148
149
  - lib/composio/models/delete_api_key_req_dto.rb
149
150
  - lib/composio/models/delete_api_key_response_dto.rb
@@ -305,6 +306,7 @@ files:
305
306
  - spec/models/create_checkout_session_req_dto_spec.rb
306
307
  - spec/models/create_connector_payload_dto_spec.rb
307
308
  - spec/models/create_connector_payload_dto_use_composio_auth_spec.rb
309
+ - spec/models/custom_auth_dto_spec.rb
308
310
  - spec/models/data_spec.rb
309
311
  - spec/models/delete_api_key_req_dto_spec.rb
310
312
  - spec/models/delete_api_key_response_dto_spec.rb
@@ -461,6 +463,7 @@ test_files:
461
463
  - spec/models/track_client_req_dto_spec.rb
462
464
  - spec/models/action_metadata_type_spec.rb
463
465
  - spec/models/toggle_trigger_state_response_dto_spec.rb
466
+ - spec/models/custom_auth_dto_spec.rb
464
467
  - spec/models/connected_account_response_dto_spec.rb
465
468
  - spec/models/verify_magic_link_res_dto_spec.rb
466
469
  - spec/models/ingest_data_response_dto_spec.rb