daytona_api_client 1.0.0
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_api_client.gemspec +39 -0
- data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
- data/lib/daytona_api_client/api/audit_api.rb +240 -0
- data/lib/daytona_api_client/api/config_api.rb +77 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +472 -0
- data/lib/daytona_api_client/api/health_api.rb +75 -0
- data/lib/daytona_api_client/api/object_storage_api.rb +80 -0
- data/lib/daytona_api_client/api/organizations_api.rb +1695 -0
- data/lib/daytona_api_client/api/preview_api.rb +209 -0
- data/lib/daytona_api_client/api/runners_api.rb +321 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +1573 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +641 -0
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +553 -0
- data/lib/daytona_api_client/api/volumes_api.rb +342 -0
- data/lib/daytona_api_client/api/webhooks_api.rb +413 -0
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +393 -0
- data/lib/daytona_api_client/api_error.rb +58 -0
- data/lib/daytona_api_client/configuration.rb +306 -0
- data/lib/daytona_api_client/models/account_provider.rb +261 -0
- data/lib/daytona_api_client/models/announcement.rb +246 -0
- data/lib/daytona_api_client/models/api_key_list.rb +384 -0
- data/lib/daytona_api_client/models/api_key_response.rb +344 -0
- data/lib/daytona_api_client/models/audit_log.rb +422 -0
- data/lib/daytona_api_client/models/build_info.rb +285 -0
- data/lib/daytona_api_client/models/command.rb +273 -0
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/computer_use_status_response.rb +260 -0
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +288 -0
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +248 -0
- data/lib/daytona_api_client/models/create_docker_registry.rb +388 -0
- data/lib/daytona_api_client/models/create_linked_account.rb +263 -0
- data/lib/daytona_api_client/models/create_organization.rb +236 -0
- data/lib/daytona_api_client/models/create_organization_invitation.rb +326 -0
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/create_runner.rb +545 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +429 -0
- data/lib/daytona_api_client/models/create_session_request.rb +236 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +318 -0
- data/lib/daytona_api_client/models/create_user.rb +331 -0
- data/lib/daytona_api_client/models/create_volume.rb +235 -0
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +531 -0
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- data/lib/daytona_api_client/models/docker_registry.rb +449 -0
- data/lib/daytona_api_client/models/download_files.rb +238 -0
- data/lib/daytona_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/file_status.rb +313 -0
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +253 -0
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +235 -0
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +253 -0
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +236 -0
- data/lib/daytona_api_client/models/keyboard_press_request.rb +248 -0
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +290 -0
- data/lib/daytona_api_client/models/organization.rb +695 -0
- data/lib/daytona_api_client/models/organization_invitation.rb +534 -0
- data/lib/daytona_api_client/models/organization_role.rb +412 -0
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- data/lib/daytona_api_client/models/organization_usage_overview.rb +469 -0
- data/lib/daytona_api_client/models/organization_user.rb +451 -0
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +315 -0
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots_dto.rb +315 -0
- data/lib/daytona_api_client/models/port_preview_url.rb +273 -0
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +263 -0
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/project_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/pty_list_response.rb +238 -0
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +236 -0
- data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_api_client/models/runner.rb +780 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +290 -0
- data/lib/daytona_api_client/models/runner_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox.rb +755 -0
- data/lib/daytona_api_client/models/sandbox_class.rb +41 -0
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox_info.rb +273 -0
- data/lib/daytona_api_client/models/sandbox_labels.rb +238 -0
- data/lib/daytona_api_client/models/sandbox_state.rb +54 -0
- data/lib/daytona_api_client/models/sandbox_volume.rb +263 -0
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/session_execute_request.rb +256 -0
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +236 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +569 -0
- data/lib/daytona_api_client/models/snapshot_state.rb +49 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +283 -0
- data/lib/daytona_api_client/models/storage_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/update_docker_registry.rb +310 -0
- data/lib/daytona_api_client/models/update_organization_invitation.rb +299 -0
- data/lib/daytona_api_client/models/update_organization_member_access.rb +289 -0
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +260 -0
- data/lib/daytona_api_client/models/user.rb +346 -0
- data/lib/daytona_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/user_public_key.rb +263 -0
- data/lib/daytona_api_client/models/volume_dto.rb +417 -0
- data/lib/daytona_api_client/models/volume_state.rb +45 -0
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +236 -0
- data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +218 -0
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +343 -0
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/workspace.rb +834 -0
- data/lib/daytona_api_client/version.rb +15 -0
- data/lib/daytona_api_client.rb +194 -0
- data/project.json +37 -0
- metadata +246 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaApiClient
|
|
16
|
+
class WebhooksApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get Svix Consumer App Portal access URL for an organization
|
|
23
|
+
# @param organization_id [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
26
|
+
# @return [WebhookAppPortalAccess]
|
|
27
|
+
def webhook_controller_get_app_portal_access(organization_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = webhook_controller_get_app_portal_access_with_http_info(organization_id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get Svix Consumer App Portal access URL for an organization
|
|
33
|
+
# @param organization_id [String]
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
36
|
+
# @return [Array<(WebhookAppPortalAccess, Integer, Hash)>] WebhookAppPortalAccess data, response status code and response headers
|
|
37
|
+
def webhook_controller_get_app_portal_access_with_http_info(organization_id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_get_app_portal_access ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'organization_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling WebhooksApi.webhook_controller_get_app_portal_access"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/webhooks/organizations/{organizationId}/app-portal-access'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
56
|
+
|
|
57
|
+
# form parameters
|
|
58
|
+
form_params = opts[:form_params] || {}
|
|
59
|
+
|
|
60
|
+
# http body (model)
|
|
61
|
+
post_body = opts[:debug_body]
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'WebhookAppPortalAccess'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"WebhooksApi.webhook_controller_get_app_portal_access",
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_get_app_portal_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Get webhook initialization status for an organization
|
|
87
|
+
# @param organization_id [String]
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
90
|
+
# @return [WebhookInitializationStatus]
|
|
91
|
+
def webhook_controller_get_initialization_status(organization_id, opts = {})
|
|
92
|
+
data, _status_code, _headers = webhook_controller_get_initialization_status_with_http_info(organization_id, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Get webhook initialization status for an organization
|
|
97
|
+
# @param organization_id [String]
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
100
|
+
# @return [Array<(WebhookInitializationStatus, Integer, Hash)>] WebhookInitializationStatus data, response status code and response headers
|
|
101
|
+
def webhook_controller_get_initialization_status_with_http_info(organization_id, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_get_initialization_status ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'organization_id' is set
|
|
106
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling WebhooksApi.webhook_controller_get_initialization_status"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/webhooks/organizations/{organizationId}/initialization-status'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
# HTTP header 'Accept' (if needed)
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
120
|
+
|
|
121
|
+
# form parameters
|
|
122
|
+
form_params = opts[:form_params] || {}
|
|
123
|
+
|
|
124
|
+
# http body (model)
|
|
125
|
+
post_body = opts[:debug_body]
|
|
126
|
+
|
|
127
|
+
# return_type
|
|
128
|
+
return_type = opts[:debug_return_type] || 'WebhookInitializationStatus'
|
|
129
|
+
|
|
130
|
+
# auth_names
|
|
131
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
132
|
+
|
|
133
|
+
new_options = opts.merge(
|
|
134
|
+
:operation => :"WebhooksApi.webhook_controller_get_initialization_status",
|
|
135
|
+
:header_params => header_params,
|
|
136
|
+
:query_params => query_params,
|
|
137
|
+
:form_params => form_params,
|
|
138
|
+
:body => post_body,
|
|
139
|
+
:auth_names => auth_names,
|
|
140
|
+
:return_type => return_type
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_get_initialization_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
146
|
+
end
|
|
147
|
+
return data, status_code, headers
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Get delivery attempts for a webhook message
|
|
151
|
+
# @param organization_id [String]
|
|
152
|
+
# @param message_id [String]
|
|
153
|
+
# @param [Hash] opts the optional parameters
|
|
154
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
155
|
+
# @return [Array<Object>]
|
|
156
|
+
def webhook_controller_get_message_attempts(organization_id, message_id, opts = {})
|
|
157
|
+
data, _status_code, _headers = webhook_controller_get_message_attempts_with_http_info(organization_id, message_id, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get delivery attempts for a webhook message
|
|
162
|
+
# @param organization_id [String]
|
|
163
|
+
# @param message_id [String]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
166
|
+
# @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
|
|
167
|
+
def webhook_controller_get_message_attempts_with_http_info(organization_id, message_id, opts = {})
|
|
168
|
+
if @api_client.config.debugging
|
|
169
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_get_message_attempts ...'
|
|
170
|
+
end
|
|
171
|
+
# verify the required parameter 'organization_id' is set
|
|
172
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
173
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling WebhooksApi.webhook_controller_get_message_attempts"
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'message_id' is set
|
|
176
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling WebhooksApi.webhook_controller_get_message_attempts"
|
|
178
|
+
end
|
|
179
|
+
# resource path
|
|
180
|
+
local_var_path = '/webhooks/organizations/{organizationId}/messages/{messageId}/attempts'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'messageId' + '}', CGI.escape(message_id.to_s))
|
|
181
|
+
|
|
182
|
+
# query parameters
|
|
183
|
+
query_params = opts[:query_params] || {}
|
|
184
|
+
|
|
185
|
+
# header parameters
|
|
186
|
+
header_params = opts[:header_params] || {}
|
|
187
|
+
# HTTP header 'Accept' (if needed)
|
|
188
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
189
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
190
|
+
|
|
191
|
+
# form parameters
|
|
192
|
+
form_params = opts[:form_params] || {}
|
|
193
|
+
|
|
194
|
+
# http body (model)
|
|
195
|
+
post_body = opts[:debug_body]
|
|
196
|
+
|
|
197
|
+
# return_type
|
|
198
|
+
return_type = opts[:debug_return_type] || 'Array<Object>'
|
|
199
|
+
|
|
200
|
+
# auth_names
|
|
201
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
202
|
+
|
|
203
|
+
new_options = opts.merge(
|
|
204
|
+
:operation => :"WebhooksApi.webhook_controller_get_message_attempts",
|
|
205
|
+
:header_params => header_params,
|
|
206
|
+
:query_params => query_params,
|
|
207
|
+
:form_params => form_params,
|
|
208
|
+
:body => post_body,
|
|
209
|
+
:auth_names => auth_names,
|
|
210
|
+
:return_type => return_type
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
214
|
+
if @api_client.config.debugging
|
|
215
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_get_message_attempts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
216
|
+
end
|
|
217
|
+
return data, status_code, headers
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Get webhook service status
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
223
|
+
# @return [WebhookControllerGetStatus200Response]
|
|
224
|
+
def webhook_controller_get_status(opts = {})
|
|
225
|
+
data, _status_code, _headers = webhook_controller_get_status_with_http_info(opts)
|
|
226
|
+
data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Get webhook service status
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
232
|
+
# @return [Array<(WebhookControllerGetStatus200Response, Integer, Hash)>] WebhookControllerGetStatus200Response data, response status code and response headers
|
|
233
|
+
def webhook_controller_get_status_with_http_info(opts = {})
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_get_status ...'
|
|
236
|
+
end
|
|
237
|
+
# resource path
|
|
238
|
+
local_var_path = '/webhooks/status'
|
|
239
|
+
|
|
240
|
+
# query parameters
|
|
241
|
+
query_params = opts[:query_params] || {}
|
|
242
|
+
|
|
243
|
+
# header parameters
|
|
244
|
+
header_params = opts[:header_params] || {}
|
|
245
|
+
# HTTP header 'Accept' (if needed)
|
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
247
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
248
|
+
|
|
249
|
+
# form parameters
|
|
250
|
+
form_params = opts[:form_params] || {}
|
|
251
|
+
|
|
252
|
+
# http body (model)
|
|
253
|
+
post_body = opts[:debug_body]
|
|
254
|
+
|
|
255
|
+
# return_type
|
|
256
|
+
return_type = opts[:debug_return_type] || 'WebhookControllerGetStatus200Response'
|
|
257
|
+
|
|
258
|
+
# auth_names
|
|
259
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
260
|
+
|
|
261
|
+
new_options = opts.merge(
|
|
262
|
+
:operation => :"WebhooksApi.webhook_controller_get_status",
|
|
263
|
+
:header_params => header_params,
|
|
264
|
+
:query_params => query_params,
|
|
265
|
+
:form_params => form_params,
|
|
266
|
+
:body => post_body,
|
|
267
|
+
:auth_names => auth_names,
|
|
268
|
+
:return_type => return_type
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_get_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
274
|
+
end
|
|
275
|
+
return data, status_code, headers
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Initialize webhooks for an organization
|
|
279
|
+
# @param organization_id [String]
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
282
|
+
# @return [nil]
|
|
283
|
+
def webhook_controller_initialize_webhooks(organization_id, opts = {})
|
|
284
|
+
webhook_controller_initialize_webhooks_with_http_info(organization_id, opts)
|
|
285
|
+
nil
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Initialize webhooks for an organization
|
|
289
|
+
# @param organization_id [String]
|
|
290
|
+
# @param [Hash] opts the optional parameters
|
|
291
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
292
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
293
|
+
def webhook_controller_initialize_webhooks_with_http_info(organization_id, opts = {})
|
|
294
|
+
if @api_client.config.debugging
|
|
295
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_initialize_webhooks ...'
|
|
296
|
+
end
|
|
297
|
+
# verify the required parameter 'organization_id' is set
|
|
298
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
299
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling WebhooksApi.webhook_controller_initialize_webhooks"
|
|
300
|
+
end
|
|
301
|
+
# resource path
|
|
302
|
+
local_var_path = '/webhooks/organizations/{organizationId}/initialize'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
|
|
303
|
+
|
|
304
|
+
# query parameters
|
|
305
|
+
query_params = opts[:query_params] || {}
|
|
306
|
+
|
|
307
|
+
# header parameters
|
|
308
|
+
header_params = opts[:header_params] || {}
|
|
309
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
310
|
+
|
|
311
|
+
# form parameters
|
|
312
|
+
form_params = opts[:form_params] || {}
|
|
313
|
+
|
|
314
|
+
# http body (model)
|
|
315
|
+
post_body = opts[:debug_body]
|
|
316
|
+
|
|
317
|
+
# return_type
|
|
318
|
+
return_type = opts[:debug_return_type]
|
|
319
|
+
|
|
320
|
+
# auth_names
|
|
321
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
322
|
+
|
|
323
|
+
new_options = opts.merge(
|
|
324
|
+
:operation => :"WebhooksApi.webhook_controller_initialize_webhooks",
|
|
325
|
+
:header_params => header_params,
|
|
326
|
+
:query_params => query_params,
|
|
327
|
+
:form_params => form_params,
|
|
328
|
+
:body => post_body,
|
|
329
|
+
:auth_names => auth_names,
|
|
330
|
+
:return_type => return_type
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
334
|
+
if @api_client.config.debugging
|
|
335
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_initialize_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
336
|
+
end
|
|
337
|
+
return data, status_code, headers
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Send a webhook message to an organization
|
|
341
|
+
# @param organization_id [String]
|
|
342
|
+
# @param send_webhook_dto [SendWebhookDto]
|
|
343
|
+
# @param [Hash] opts the optional parameters
|
|
344
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
345
|
+
# @return [nil]
|
|
346
|
+
def webhook_controller_send_webhook(organization_id, send_webhook_dto, opts = {})
|
|
347
|
+
webhook_controller_send_webhook_with_http_info(organization_id, send_webhook_dto, opts)
|
|
348
|
+
nil
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Send a webhook message to an organization
|
|
352
|
+
# @param organization_id [String]
|
|
353
|
+
# @param send_webhook_dto [SendWebhookDto]
|
|
354
|
+
# @param [Hash] opts the optional parameters
|
|
355
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
356
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
357
|
+
def webhook_controller_send_webhook_with_http_info(organization_id, send_webhook_dto, opts = {})
|
|
358
|
+
if @api_client.config.debugging
|
|
359
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.webhook_controller_send_webhook ...'
|
|
360
|
+
end
|
|
361
|
+
# verify the required parameter 'organization_id' is set
|
|
362
|
+
if @api_client.config.client_side_validation && organization_id.nil?
|
|
363
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling WebhooksApi.webhook_controller_send_webhook"
|
|
364
|
+
end
|
|
365
|
+
# verify the required parameter 'send_webhook_dto' is set
|
|
366
|
+
if @api_client.config.client_side_validation && send_webhook_dto.nil?
|
|
367
|
+
fail ArgumentError, "Missing the required parameter 'send_webhook_dto' when calling WebhooksApi.webhook_controller_send_webhook"
|
|
368
|
+
end
|
|
369
|
+
# resource path
|
|
370
|
+
local_var_path = '/webhooks/organizations/{organizationId}/send'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
|
|
371
|
+
|
|
372
|
+
# query parameters
|
|
373
|
+
query_params = opts[:query_params] || {}
|
|
374
|
+
|
|
375
|
+
# header parameters
|
|
376
|
+
header_params = opts[:header_params] || {}
|
|
377
|
+
# HTTP header 'Content-Type'
|
|
378
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
379
|
+
if !content_type.nil?
|
|
380
|
+
header_params['Content-Type'] = content_type
|
|
381
|
+
end
|
|
382
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
383
|
+
|
|
384
|
+
# form parameters
|
|
385
|
+
form_params = opts[:form_params] || {}
|
|
386
|
+
|
|
387
|
+
# http body (model)
|
|
388
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_webhook_dto)
|
|
389
|
+
|
|
390
|
+
# return_type
|
|
391
|
+
return_type = opts[:debug_return_type]
|
|
392
|
+
|
|
393
|
+
# auth_names
|
|
394
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
395
|
+
|
|
396
|
+
new_options = opts.merge(
|
|
397
|
+
:operation => :"WebhooksApi.webhook_controller_send_webhook",
|
|
398
|
+
:header_params => header_params,
|
|
399
|
+
:query_params => query_params,
|
|
400
|
+
:form_params => form_params,
|
|
401
|
+
:body => post_body,
|
|
402
|
+
:auth_names => auth_names,
|
|
403
|
+
:return_type => return_type
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug "API called: WebhooksApi#webhook_controller_send_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
409
|
+
end
|
|
410
|
+
return data, status_code, headers
|
|
411
|
+
end
|
|
412
|
+
end
|
|
413
|
+
end
|