Class: Conductor::Http::Api::IntegrationResourceApi

Inherits:
Object
  • Object
show all
Defined in:
lib/conductor/http/api/integration_resource_api.rb

Overview

IntegrationResourceApi - API for integration management operations (Orkes)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = nil) ⇒ IntegrationResourceApi

Returns a new instance of IntegrationResourceApi.



12
13
14
# File 'lib/conductor/http/api/integration_resource_api.rb', line 12

def initialize(api_client = nil)
  @api_client = api_client || ApiClient.new
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



10
11
12
# File 'lib/conductor/http/api/integration_resource_api.rb', line 10

def api_client
  @api_client
end

Instance Method Details

#associate_prompt_with_integration(integration_provider, integration_name, prompt_name) ⇒ Object

Associate a prompt with an integration



65
66
67
68
69
# File 'lib/conductor/http/api/integration_resource_api.rb', line 65

def associate_prompt_with_integration(integration_provider, integration_name, prompt_name)
  @api_client.call_api('/integrations/provider/{integration_provider}/integration/{integration_name}/prompt/{prompt_name}', 'POST',
                       path_params: { integration_provider: integration_provider, integration_name: integration_name, prompt_name: prompt_name },
                       return_http_data_only: true)
end

#delete_integration(name) ⇒ Object

Delete an integration provider



35
36
37
38
# File 'lib/conductor/http/api/integration_resource_api.rb', line 35

def delete_integration(name)
  @api_client.call_api('/integrations/provider/{name}', 'DELETE', path_params: { name: name },
                                                                  return_http_data_only: true)
end

#delete_integration_api(name, integration_name) ⇒ Object

Delete an integration API



59
60
61
62
# File 'lib/conductor/http/api/integration_resource_api.rb', line 59

def delete_integration_api(name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}', 'DELETE',
                       path_params: { name: name, integration_name: integration_name }, return_http_data_only: true)
end

#delete_tag_for_integration(body, name, integration_name) ⇒ Object

Delete tags for an integration API



103
104
105
106
# File 'lib/conductor/http/api/integration_resource_api.rb', line 103

def delete_tag_for_integration(body, name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}/tags', 'DELETE',
                       path_params: { name: name, integration_name: integration_name }, body: body, return_http_data_only: true)
end

#delete_tag_for_integration_provider(body, name) ⇒ Object

Delete tags for an integration provider



121
122
123
124
# File 'lib/conductor/http/api/integration_resource_api.rb', line 121

def delete_tag_for_integration_provider(body, name)
  @api_client.call_api('/integrations/provider/{name}/tags', 'DELETE',
                       path_params: { name: name }, body: body, return_http_data_only: true)
end

#get_integration(name) ⇒ Object

Get an integration provider



23
24
25
26
# File 'lib/conductor/http/api/integration_resource_api.rb', line 23

def get_integration(name)
  @api_client.call_api('/integrations/provider/{name}', 'GET', path_params: { name: name },
                                                               return_type: 'Integration', return_http_data_only: true)
end

#get_integration_api(name, integration_name) ⇒ Object

Get an integration API



47
48
49
50
# File 'lib/conductor/http/api/integration_resource_api.rb', line 47

def get_integration_api(name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}', 'GET',
                       path_params: { name: name, integration_name: integration_name }, return_type: 'IntegrationApi', return_http_data_only: true)
end

#get_integration_apis(name) ⇒ Object

Get all integration APIs for a provider



53
54
55
56
# File 'lib/conductor/http/api/integration_resource_api.rb', line 53

def get_integration_apis(name)
  @api_client.call_api('/integrations/provider/{name}/integration', 'GET',
                       path_params: { name: name }, return_type: 'Array<IntegrationApi>', return_http_data_only: true)
end

#get_integration_available_apis(name) ⇒ Object

Get available APIs for an integration



127
128
129
130
# File 'lib/conductor/http/api/integration_resource_api.rb', line 127

def get_integration_available_apis(name)
  @api_client.call_api('/integrations/provider/{name}/integration/all', 'GET',
                       path_params: { name: name }, return_type: 'Array<IntegrationApi>', return_http_data_only: true)
end

#get_integration_provider_defsObject

Get integration provider definitions



133
134
135
# File 'lib/conductor/http/api/integration_resource_api.rb', line 133

def get_integration_provider_defs
  @api_client.call_api('/integrations/def', 'GET', return_type: 'Object', return_http_data_only: true)
end

#get_integrationsObject

Get all integration providers



29
30
31
32
# File 'lib/conductor/http/api/integration_resource_api.rb', line 29

def get_integrations
  @api_client.call_api('/integrations/provider', 'GET', return_type: 'Array<Integration>',
                                                        return_http_data_only: true)
end

#get_prompts_with_integration(integration_provider, integration_name) ⇒ Object

Get prompts associated with an integration



72
73
74
75
76
# File 'lib/conductor/http/api/integration_resource_api.rb', line 72

def get_prompts_with_integration(integration_provider, integration_name)
  @api_client.call_api('/integrations/provider/{integration_provider}/integration/{integration_name}/prompt', 'GET',
                       path_params: { integration_provider: integration_provider, integration_name: integration_name },
                       return_type: 'Array<PromptTemplate>', return_http_data_only: true)
end

#get_providers_and_integrationsObject

Get all providers and integrations



138
139
140
141
# File 'lib/conductor/http/api/integration_resource_api.rb', line 138

def get_providers_and_integrations
  @api_client.call_api('/integrations/all', 'GET', return_type: 'Array<Integration>',
                                                   return_http_data_only: true)
end

#get_tags_for_integration(name, integration_name) ⇒ Object

Get tags for an integration API



97
98
99
100
# File 'lib/conductor/http/api/integration_resource_api.rb', line 97

def get_tags_for_integration(name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}/tags', 'GET',
                       path_params: { name: name, integration_name: integration_name }, return_type: 'Array<TagObject>', return_http_data_only: true)
end

#get_tags_for_integration_provider(name) ⇒ Object

Get tags for an integration provider



115
116
117
118
# File 'lib/conductor/http/api/integration_resource_api.rb', line 115

def get_tags_for_integration_provider(name)
  @api_client.call_api('/integrations/provider/{name}/tags', 'GET',
                       path_params: { name: name }, return_type: 'Array<TagObject>', return_http_data_only: true)
end

#get_token_usage_for_integration(name, integration_name) ⇒ Object

Get token usage for an integration API



79
80
81
82
# File 'lib/conductor/http/api/integration_resource_api.rb', line 79

def get_token_usage_for_integration(name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}/metrics', 'GET',
                       path_params: { name: name, integration_name: integration_name }, return_type: 'Integer', return_http_data_only: true)
end

#get_token_usage_for_integration_provider(name) ⇒ Object

Get token usage for an integration provider



85
86
87
88
# File 'lib/conductor/http/api/integration_resource_api.rb', line 85

def get_token_usage_for_integration_provider(name)
  @api_client.call_api('/integrations/provider/{name}/metrics', 'GET',
                       path_params: { name: name }, return_type: 'Object', return_http_data_only: true)
end

#put_tag_for_integration(body, name, integration_name) ⇒ Object

Set tags for an integration API



91
92
93
94
# File 'lib/conductor/http/api/integration_resource_api.rb', line 91

def put_tag_for_integration(body, name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}/tags', 'PUT',
                       path_params: { name: name, integration_name: integration_name }, body: body, return_http_data_only: true)
end

#put_tag_for_integration_provider(body, name) ⇒ Object

Set tags for an integration provider



109
110
111
112
# File 'lib/conductor/http/api/integration_resource_api.rb', line 109

def put_tag_for_integration_provider(body, name)
  @api_client.call_api('/integrations/provider/{name}/tags', 'PUT',
                       path_params: { name: name }, body: body, return_http_data_only: true)
end

#save_integration(body, name) ⇒ Object

Save (create/update) an integration provider



17
18
19
20
# File 'lib/conductor/http/api/integration_resource_api.rb', line 17

def save_integration(body, name)
  @api_client.call_api('/integrations/provider/{name}', 'POST', path_params: { name: name }, body: body,
                                                                return_http_data_only: true)
end

#save_integration_api(body, name, integration_name) ⇒ Object

Save (create/update) an integration API



41
42
43
44
# File 'lib/conductor/http/api/integration_resource_api.rb', line 41

def save_integration_api(body, name, integration_name)
  @api_client.call_api('/integrations/provider/{name}/integration/{integration_name}', 'POST',
                       path_params: { name: name, integration_name: integration_name }, body: body, return_http_data_only: true)
end