Class: Shipeasy::Admin::Generated::OpsApi
- Inherits:
-
Object
- Object
- Shipeasy::Admin::Generated::OpsApi
- Defined in:
- lib/shipeasy_admin/api/ops_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_ops_item(create_ops_item_request, opts = {}) ⇒ CreateOpsItemResponse
File a queue item Files one queue item — a bug report or a feature request — and fires the project's connectors (GitHub issue / Slack).
-
#create_ops_item_with_http_info(create_ops_item_request, opts = {}) ⇒ Array<(CreateOpsItemResponse, Integer, Hash)>
File a queue item Files one queue item — a bug report or a feature request — and fires the project's connectors (GitHub issue / Slack).
-
#get_ops_item(handle, opts = {}) ⇒ GetOpsItemResponse
Get one queue item Fetch a single queue item by its per-project
numberor full id. -
#get_ops_item_with_http_info(handle, opts = {}) ⇒ Array<(GetOpsItemResponse, Integer, Hash)>
Get one queue item Fetch a single queue item by its per-project `number` or full id.
-
#initialize(api_client = ApiClient.default) ⇒ OpsApi
constructor
A new instance of OpsApi.
-
#link_pr_to_ops_item(handle, link_pr_to_ops_item_request, opts = {}) ⇒ LinkPrToOpsItemResponse
Link a fixing PR Record the pull request that fixes a queue item (and clears the link with
prNumber: null). -
#link_pr_to_ops_item_with_http_info(handle, link_pr_to_ops_item_request, opts = {}) ⇒ Array<(LinkPrToOpsItemResponse, Integer, Hash)>
Link a fixing PR Record the pull request that fixes a queue item (and clears the link with `prNumber: null`).
-
#list_ops_items(opts = {}) ⇒ Array<ListOpsItemsResponseInner>
List the operational queue Returns the unified ops queue (bugs, feature requests, errors, alerts), newest first.
-
#list_ops_items_with_http_info(opts = {}) ⇒ Array<(Array<ListOpsItemsResponseInner>, Integer, Hash)>
List the operational queue Returns the unified ops queue (bugs, feature requests, errors, alerts), newest first.
-
#notify_ops(notify_ops_request, opts = {}) ⇒ NotifyOpsResponse
Raise an attention notification Raise a 'needs your attention' bell notification.
-
#notify_ops_with_http_info(notify_ops_request, opts = {}) ⇒ Array<(NotifyOpsResponse, Integer, Hash)>
Raise an attention notification Raise a 'needs your attention' bell notification.
-
#update_ops_item(handle, update_ops_item_request, opts = {}) ⇒ UpdateOpsItemResponse
Update a queue item Update a queue item's
statusand/orpriority. -
#update_ops_item_with_http_info(handle, update_ops_item_request, opts = {}) ⇒ Array<(UpdateOpsItemResponse, Integer, Hash)>
Update a queue item Update a queue item's `status` and/or `priority`.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_ops_item(create_ops_item_request, opts = {}) ⇒ CreateOpsItemResponse
File a queue item
Files one queue item — a bug report or a feature request — and fires the project's connectors (GitHub issue / Slack). type selects which; only the two user-fileable types are accepted (error/alert tickets are auto-filed by the platform). Returns the new id and per-project number. Use cases - File a bug — { \"type\": \"bug\", \"title\": \"Checkout 500s on Safari\", \"stepsToReproduce\": \"…\" }. - File a feature request — { \"type\": \"feature_request\", \"title\": \"Dark mode\", \"priority\": \"nice_to_have\" }.
28 29 30 31 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 28 def create_ops_item(create_ops_item_request, opts = {}) data, _status_code, _headers = create_ops_item_with_http_info(create_ops_item_request, opts) data end |
#create_ops_item_with_http_info(create_ops_item_request, opts = {}) ⇒ Array<(CreateOpsItemResponse, Integer, Hash)>
File a queue item Files one queue item — a bug report or a feature request — and fires the project's connectors (GitHub issue / Slack). `type` selects which; only the two user-fileable types are accepted (`error`/`alert` tickets are auto-filed by the platform). Returns the new id and per-project number. Use cases - File a bug — `{ "type": "bug", "title": "Checkout 500s on Safari", "stepsToReproduce": "…" }`. - File a feature request — `{ "type": "feature_request", "title": "Dark mode", "priority": "nice_to_have" }`.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 39 def create_ops_item_with_http_info(create_ops_item_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.create_ops_item ...' end # verify the required parameter 'create_ops_item_request' is set if @api_client.config.client_side_validation && create_ops_item_request.nil? fail ArgumentError, "Missing the required parameter 'create_ops_item_request' when calling OpsApi.create_ops_item" end # resource path local_var_path = '/api/admin/ops' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ops_item_request) # return_type return_type = opts[:debug_return_type] || 'CreateOpsItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerSdkKey'] = opts.merge( :operation => :"OpsApi.create_ops_item", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#create_ops_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ops_item(handle, opts = {}) ⇒ GetOpsItemResponse
Get one queue item
Fetch a single queue item by its per-project number or full id. Use case: Inspect one item's full detail before updating its status or linking a PR.
99 100 101 102 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 99 def get_ops_item(handle, opts = {}) data, _status_code, _headers = get_ops_item_with_http_info(handle, opts) data end |
#get_ops_item_with_http_info(handle, opts = {}) ⇒ Array<(GetOpsItemResponse, Integer, Hash)>
Get one queue item Fetch a single queue item by its per-project `number` or full id. Use case: Inspect one item's full detail before updating its status or linking a PR.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 110 def get_ops_item_with_http_info(handle, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.get_ops_item ...' end # resource path local_var_path = '/api/admin/ops/{handle}'.sub('{handle}', CGI.escape(handle.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetOpsItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerSdkKey'] = opts.merge( :operation => :"OpsApi.get_ops_item", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#get_ops_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#link_pr_to_ops_item(handle, link_pr_to_ops_item_request, opts = {}) ⇒ LinkPrToOpsItemResponse
Link a fixing PR
Record the pull request that fixes a queue item (and clears the link with prNumber: null). Use case: Tie the fixing PR to the item so closing the PR can flip it to ready_for_qa.
162 163 164 165 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 162 def link_pr_to_ops_item(handle, link_pr_to_ops_item_request, opts = {}) data, _status_code, _headers = link_pr_to_ops_item_with_http_info(handle, link_pr_to_ops_item_request, opts) data end |
#link_pr_to_ops_item_with_http_info(handle, link_pr_to_ops_item_request, opts = {}) ⇒ Array<(LinkPrToOpsItemResponse, Integer, Hash)>
Link a fixing PR Record the pull request that fixes a queue item (and clears the link with `prNumber: null`). Use case: Tie the fixing PR to the item so closing the PR can flip it to ready_for_qa.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 174 def link_pr_to_ops_item_with_http_info(handle, link_pr_to_ops_item_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.link_pr_to_ops_item ...' end # verify the required parameter 'handle' is set if @api_client.config.client_side_validation && handle.nil? fail ArgumentError, "Missing the required parameter 'handle' when calling OpsApi.link_pr_to_ops_item" end # verify the required parameter 'link_pr_to_ops_item_request' is set if @api_client.config.client_side_validation && link_pr_to_ops_item_request.nil? fail ArgumentError, "Missing the required parameter 'link_pr_to_ops_item_request' when calling OpsApi.link_pr_to_ops_item" end # resource path local_var_path = '/api/admin/ops/{handle}/link-pr'.sub('{handle}', CGI.escape(handle.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(link_pr_to_ops_item_request) # return_type return_type = opts[:debug_return_type] || 'LinkPrToOpsItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerSdkKey'] = opts.merge( :operation => :"OpsApi.link_pr_to_ops_item", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#link_pr_to_ops_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ops_items(opts = {}) ⇒ Array<ListOpsItemsResponseInner>
List the operational queue
Returns the unified ops queue (bugs, feature requests, errors, alerts), newest first. Filter by type and/or status, and cap with limit. Use case: Pull the open queue to triage — e.g. every bug still open — before working items down one by one.
240 241 242 243 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 240 def list_ops_items(opts = {}) data, _status_code, _headers = list_ops_items_with_http_info(opts) data end |
#list_ops_items_with_http_info(opts = {}) ⇒ Array<(Array<ListOpsItemsResponseInner>, Integer, Hash)>
List the operational queue Returns the unified ops queue (bugs, feature requests, errors, alerts), newest first. Filter by `type` and/or `status`, and cap with `limit`. Use case: Pull the open queue to triage — e.g. every `bug` still `open` — before working items down one by one.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 253 def list_ops_items_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.list_ops_items ...' end allowable_values = ["bug", "feature_request", "error", "alert", "all"] if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type']) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end allowable_values = ["open", "triaged", "in_progress", "ready_for_qa", "resolved", "wont_fix", "all"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OpsApi.list_ops_items, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OpsApi.list_ops_items, must be greater than or equal to 1.' end # resource path local_var_path = '/api/admin/ops' # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ListOpsItemsResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerSdkKey'] = opts.merge( :operation => :"OpsApi.list_ops_items", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#list_ops_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#notify_ops(notify_ops_request, opts = {}) ⇒ NotifyOpsResponse
Raise an attention notification
Raise a 'needs your attention' bell notification. Create-only and idempotent on dedupeKey. Use case: Escalate something that needs a human, deduped so repeats don't spam the bell.
323 324 325 326 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 323 def notify_ops(notify_ops_request, opts = {}) data, _status_code, _headers = notify_ops_with_http_info(notify_ops_request, opts) data end |
#notify_ops_with_http_info(notify_ops_request, opts = {}) ⇒ Array<(NotifyOpsResponse, Integer, Hash)>
Raise an attention notification Raise a 'needs your attention' bell notification. Create-only and idempotent on `dedupeKey`. Use case: Escalate something that needs a human, deduped so repeats don't spam the bell.
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 334 def notify_ops_with_http_info(notify_ops_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.notify_ops ...' end # verify the required parameter 'notify_ops_request' is set if @api_client.config.client_side_validation && notify_ops_request.nil? fail ArgumentError, "Missing the required parameter 'notify_ops_request' when calling OpsApi.notify_ops" end # resource path local_var_path = '/api/admin/notifications' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(notify_ops_request) # return_type return_type = opts[:debug_return_type] || 'NotifyOpsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerSdkKey'] = opts.merge( :operation => :"OpsApi.notify_ops", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#notify_ops\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ops_item(handle, update_ops_item_request, opts = {}) ⇒ UpdateOpsItemResponse
Update a queue item
Update a queue item's status and/or priority. Other fields are immutable. Use case: Move an item through its lifecycle (triage → in_progress → resolved) as you work it.
395 396 397 398 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 395 def update_ops_item(handle, update_ops_item_request, opts = {}) data, _status_code, _headers = update_ops_item_with_http_info(handle, update_ops_item_request, opts) data end |
#update_ops_item_with_http_info(handle, update_ops_item_request, opts = {}) ⇒ Array<(UpdateOpsItemResponse, Integer, Hash)>
Update a queue item Update a queue item's `status` and/or `priority`. Other fields are immutable. Use case: Move an item through its lifecycle (triage → in_progress → resolved) as you work it.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/shipeasy_admin/api/ops_api.rb', line 407 def update_ops_item_with_http_info(handle, update_ops_item_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OpsApi.update_ops_item ...' end # verify the required parameter 'handle' is set if @api_client.config.client_side_validation && handle.nil? fail ArgumentError, "Missing the required parameter 'handle' when calling OpsApi.update_ops_item" end # verify the required parameter 'update_ops_item_request' is set if @api_client.config.client_side_validation && update_ops_item_request.nil? fail ArgumentError, "Missing the required parameter 'update_ops_item_request' when calling OpsApi.update_ops_item" end # resource path local_var_path = '/api/admin/ops/{handle}'.sub('{handle}', CGI.escape(handle.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_ops_item_request) # return_type return_type = opts[:debug_return_type] || 'UpdateOpsItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerSdkKey'] = opts.merge( :operation => :"OpsApi.update_ops_item", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OpsApi#update_ops_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |