shipeasy-sdk 2.1.0 → 2.3.1
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 +4 -4
- data/README.md +1 -0
- data/docs/skill/SKILL.md +6 -2
- data/lib/generators/shipeasy/install/USAGE +24 -0
- data/lib/generators/shipeasy/install/install_generator.rb +86 -0
- data/lib/generators/shipeasy/install/templates/initializer.rb.tt +41 -0
- data/lib/shipeasy/admin.rb +91 -0
- data/lib/shipeasy/sdk/version.rb +1 -1
- data/lib/shipeasy_admin/api/alerts_api.rb +352 -0
- data/lib/shipeasy_admin/api/api_keys_api.rb +229 -0
- data/lib/shipeasy_admin/api/attributes_api.rb +82 -0
- data/lib/shipeasy_admin/api/configs_api.rb +757 -0
- data/lib/shipeasy_admin/api/connectors_api.rb +497 -0
- data/lib/shipeasy_admin/api/drafts_api.rb +82 -0
- data/lib/shipeasy_admin/api/errors_api.rb +389 -0
- data/lib/shipeasy_admin/api/events_api.rb +438 -0
- data/lib/shipeasy_admin/api/experiments_api.rb +727 -0
- data/lib/shipeasy_admin/api/flags_api.rb +438 -0
- data/lib/shipeasy_admin/api/keys_api.rb +317 -0
- data/lib/shipeasy_admin/api/killswitch_api.rb +603 -0
- data/lib/shipeasy_admin/api/metrics_api.rb +281 -0
- data/lib/shipeasy_admin/api/ops_api.rb +465 -0
- data/lib/shipeasy_admin/api/profiles_api.rb +226 -0
- data/lib/shipeasy_admin/api/projects_api.rb +216 -0
- data/lib/shipeasy_admin/api/universes_api.rb +306 -0
- data/lib/shipeasy_admin/api_client.rb +441 -0
- data/lib/shipeasy_admin/api_error.rb +58 -0
- data/lib/shipeasy_admin/api_model_base.rb +88 -0
- data/lib/shipeasy_admin/configuration.rb +397 -0
- data/lib/shipeasy_admin/models/approve_event_request.rb +198 -0
- data/lib/shipeasy_admin/models/approve_event_response.rb +166 -0
- data/lib/shipeasy_admin/models/claude_trigger_config.rb +204 -0
- data/lib/shipeasy_admin/models/connector_event.rb +40 -0
- data/lib/shipeasy_admin/models/connector_provider.rb +45 -0
- data/lib/shipeasy_admin/models/connector_record.rb +468 -0
- data/lib/shipeasy_admin/models/copilot_trigger_config.rb +276 -0
- data/lib/shipeasy_admin/models/create_alert_rule_request.rb +383 -0
- data/lib/shipeasy_admin/models/create_alert_rule_response.rb +165 -0
- data/lib/shipeasy_admin/models/create_claude_trigger_request.rb +309 -0
- data/lib/shipeasy_admin/models/create_config_request.rb +291 -0
- data/lib/shipeasy_admin/models/create_config_response.rb +201 -0
- data/lib/shipeasy_admin/models/create_connector_request.rb +64 -0
- data/lib/shipeasy_admin/models/create_connector_response.rb +165 -0
- data/lib/shipeasy_admin/models/create_copilot_trigger_request.rb +316 -0
- data/lib/shipeasy_admin/models/create_cursor_trigger_request.rb +352 -0
- data/lib/shipeasy_admin/models/create_event_request.rb +236 -0
- data/lib/shipeasy_admin/models/create_event_response.rb +193 -0
- data/lib/shipeasy_admin/models/create_experiment_request.rb +807 -0
- data/lib/shipeasy_admin/models/create_experiment_response.rb +212 -0
- data/lib/shipeasy_admin/models/create_gate_request.rb +492 -0
- data/lib/shipeasy_admin/models/create_gate_response.rb +212 -0
- data/lib/shipeasy_admin/models/create_i18n_profile_request.rb +188 -0
- data/lib/shipeasy_admin/models/create_i18n_profile_response.rb +193 -0
- data/lib/shipeasy_admin/models/create_jules_trigger_request.rb +352 -0
- data/lib/shipeasy_admin/models/create_key_request.rb +297 -0
- data/lib/shipeasy_admin/models/create_key_response.rb +286 -0
- data/lib/shipeasy_admin/models/create_killswitch_request.rb +274 -0
- data/lib/shipeasy_admin/models/create_killswitch_response.rb +201 -0
- data/lib/shipeasy_admin/models/create_metric_request.rb +403 -0
- data/lib/shipeasy_admin/models/create_metric_response.rb +193 -0
- data/lib/shipeasy_admin/models/create_o_auth_connector_request.rb +273 -0
- data/lib/shipeasy_admin/models/create_ops_item_request.rb +287 -0
- data/lib/shipeasy_admin/models/create_ops_item_response.rb +177 -0
- data/lib/shipeasy_admin/models/create_universe_request.rb +272 -0
- data/lib/shipeasy_admin/models/create_universe_response.rb +212 -0
- data/lib/shipeasy_admin/models/cursor_trigger_config.rb +231 -0
- data/lib/shipeasy_admin/models/delete_alert_rule_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_config_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_connector_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_event_response.rb +189 -0
- data/lib/shipeasy_admin/models/delete_experiment_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_gate_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_killswitch_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_metric_response.rb +189 -0
- data/lib/shipeasy_admin/models/delete_universe_response.rb +188 -0
- data/lib/shipeasy_admin/models/disable_gate_response.rb +190 -0
- data/lib/shipeasy_admin/models/discard_config_draft_request.rb +187 -0
- data/lib/shipeasy_admin/models/discard_config_draft_response.rb +188 -0
- data/lib/shipeasy_admin/models/enable_gate_response.rb +190 -0
- data/lib/shipeasy_admin/models/env.rb +41 -0
- data/lib/shipeasy_admin/models/error.rb +207 -0
- data/lib/shipeasy_admin/models/error_code.rb +52 -0
- data/lib/shipeasy_admin/models/error_record.rb +597 -0
- data/lib/shipeasy_admin/models/error_series_request.rb +251 -0
- data/lib/shipeasy_admin/models/error_series_response.rb +195 -0
- data/lib/shipeasy_admin/models/error_series_response_rows_inner.rb +192 -0
- data/lib/shipeasy_admin/models/experiment_inline_metric.rb +337 -0
- data/lib/shipeasy_admin/models/file_error_ticket_response.rb +193 -0
- data/lib/shipeasy_admin/models/fire_connector_request.rb +149 -0
- data/lib/shipeasy_admin/models/fire_connector_response.rb +176 -0
- data/lib/shipeasy_admin/models/get_config_response.rb +351 -0
- data/lib/shipeasy_admin/models/get_current_project_response.rb +606 -0
- data/lib/shipeasy_admin/models/get_current_project_response_module_translations.rb +104 -0
- data/lib/shipeasy_admin/models/get_event_response.rb +344 -0
- data/lib/shipeasy_admin/models/get_experiment_response.rb +688 -0
- data/lib/shipeasy_admin/models/get_experiment_results_response.rb +243 -0
- data/lib/shipeasy_admin/models/get_experiment_results_response_experiment.rb +248 -0
- data/lib/shipeasy_admin/models/get_experiment_results_response_results_inner.rb +252 -0
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response.rb +192 -0
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_experiment.rb +261 -0
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_series_inner.rb +278 -0
- data/lib/shipeasy_admin/models/get_killswitch_response.rb +270 -0
- data/lib/shipeasy_admin/models/get_metric_response.rb +378 -0
- data/lib/shipeasy_admin/models/get_ops_item_response.rb +349 -0
- data/lib/shipeasy_admin/models/jules_trigger_config.rb +240 -0
- data/lib/shipeasy_admin/models/key_record.rb +353 -0
- data/lib/shipeasy_admin/models/killswitch_value.rb +178 -0
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_request.rb +186 -0
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_response.rb +166 -0
- data/lib/shipeasy_admin/models/list_alert_rules_response_inner.rb +478 -0
- data/lib/shipeasy_admin/models/list_attributes_response_inner.rb +176 -0
- data/lib/shipeasy_admin/models/list_config_activity_response_inner.rb +280 -0
- data/lib/shipeasy_admin/models/list_configs_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_configs_response_data_inner.rb +351 -0
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_drafts_value.rb +237 -0
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_envs_value.rb +237 -0
- data/lib/shipeasy_admin/models/list_events_response_inner.rb +344 -0
- data/lib/shipeasy_admin/models/list_events_response_inner_properties_inner.rb +259 -0
- data/lib/shipeasy_admin/models/list_experiments_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner.rb +688 -0
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner_groups_inner.rb +241 -0
- data/lib/shipeasy_admin/models/list_gates_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner.rb +395 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_enabled.rb +104 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_rules_inner.rb +238 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner.rb +105 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of.rb +358 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of1.rb +331 -0
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of_ramp.rb +319 -0
- data/lib/shipeasy_admin/models/list_i18n_drafts_response_inner.rb +272 -0
- data/lib/shipeasy_admin/models/list_i18n_keys_response.rb +195 -0
- data/lib/shipeasy_admin/models/list_i18n_keys_response_keys_inner.rb +284 -0
- data/lib/shipeasy_admin/models/list_i18n_profiles_response_inner.rb +224 -0
- data/lib/shipeasy_admin/models/list_keys_response.rb +180 -0
- data/lib/shipeasy_admin/models/list_killswitches_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner.rb +270 -0
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner_envs_value.rb +248 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner.rb +378 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir.rb +288 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg.rb +113 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of1.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of2.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of3.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of4.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of5.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of6.rb +188 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of7.rb +217 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of8.rb +233 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9.rb +240 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator.rb +266 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator_filters_inner.rb +264 -0
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_group_by.rb +228 -0
- data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +349 -0
- data/lib/shipeasy_admin/models/list_slack_channels_response.rb +195 -0
- data/lib/shipeasy_admin/models/list_slack_channels_response_channels_inner.rb +203 -0
- data/lib/shipeasy_admin/models/list_universes_response.rb +178 -0
- data/lib/shipeasy_admin/models/list_universes_response_data_inner.rb +305 -0
- data/lib/shipeasy_admin/models/notification_target.rb +159 -0
- data/lib/shipeasy_admin/models/notification_target_slack_channel.rb +208 -0
- data/lib/shipeasy_admin/models/notify_ops_request.rb +261 -0
- data/lib/shipeasy_admin/models/notify_ops_response.rb +193 -0
- data/lib/shipeasy_admin/models/publish_config_draft_request.rb +187 -0
- data/lib/shipeasy_admin/models/publish_config_draft_response.rb +257 -0
- data/lib/shipeasy_admin/models/publish_i18n_profile_request.rb +149 -0
- data/lib/shipeasy_admin/models/publish_i18n_profile_response.rb +404 -0
- data/lib/shipeasy_admin/models/push_i18n_keys_request.rb +205 -0
- data/lib/shipeasy_admin/models/push_i18n_keys_request_keys_inner.rb +192 -0
- data/lib/shipeasy_admin/models/push_i18n_keys_response.rb +261 -0
- data/lib/shipeasy_admin/models/reanalyze_experiment_response.rb +214 -0
- data/lib/shipeasy_admin/models/revoke_key_response.rb +216 -0
- data/lib/shipeasy_admin/models/save_config_draft_request.rb +199 -0
- data/lib/shipeasy_admin/models/save_config_draft_response.rb +283 -0
- data/lib/shipeasy_admin/models/search_hit.rb +284 -0
- data/lib/shipeasy_admin/models/search_response.rb +167 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_request.rb +168 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_request_metrics_inner.rb +216 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_response.rb +179 -0
- data/lib/shipeasy_admin/models/set_experiment_metrics_response_metrics_inner.rb +201 -0
- data/lib/shipeasy_admin/models/set_experiment_status_request.rb +190 -0
- data/lib/shipeasy_admin/models/set_experiment_status_response.rb +214 -0
- data/lib/shipeasy_admin/models/set_i18n_label_request.rb +213 -0
- data/lib/shipeasy_admin/models/set_i18n_label_response.rb +472 -0
- data/lib/shipeasy_admin/models/set_killswitch_switch_request.rb +261 -0
- data/lib/shipeasy_admin/models/set_killswitch_switch_response.rb +285 -0
- data/lib/shipeasy_admin/models/set_killswitch_value_request.rb +214 -0
- data/lib/shipeasy_admin/models/set_killswitch_value_response.rb +283 -0
- data/lib/shipeasy_admin/models/test_connector_response.rb +189 -0
- data/lib/shipeasy_admin/models/unset_killswitch_switch_request.rb +234 -0
- data/lib/shipeasy_admin/models/unset_killswitch_switch_response.rb +286 -0
- data/lib/shipeasy_admin/models/update_alert_rule_request.rb +304 -0
- data/lib/shipeasy_admin/models/update_alert_rule_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_config_request.rb +198 -0
- data/lib/shipeasy_admin/models/update_config_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_config_schema_request.rb +168 -0
- data/lib/shipeasy_admin/models/update_config_schema_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_connector_request.rb +211 -0
- data/lib/shipeasy_admin/models/update_connector_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_error_status_request.rb +190 -0
- data/lib/shipeasy_admin/models/update_event_request.rb +198 -0
- data/lib/shipeasy_admin/models/update_event_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_experiment_request.rb +747 -0
- data/lib/shipeasy_admin/models/update_experiment_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_gate_request.rb +403 -0
- data/lib/shipeasy_admin/models/update_gate_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_i18n_key_request.rb +176 -0
- data/lib/shipeasy_admin/models/update_i18n_key_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_killswitch_request.rb +224 -0
- data/lib/shipeasy_admin/models/update_killswitch_response.rb +165 -0
- data/lib/shipeasy_admin/models/update_ops_item_request.rb +205 -0
- data/lib/shipeasy_admin/models/update_ops_item_response.rb +166 -0
- data/lib/shipeasy_admin/models/update_universe_request.rb +213 -0
- data/lib/shipeasy_admin/models/update_universe_response.rb +165 -0
- data/lib/shipeasy_admin/models/upsert_project_request.rb +222 -0
- data/lib/shipeasy_admin/models/upsert_project_response.rb +260 -0
- data/lib/shipeasy_admin/version.rb +15 -0
- data/lib/shipeasy_admin.rb +243 -0
- metadata +277 -2
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Shipeasy Admin API
|
|
3
|
+
|
|
4
|
+
#REST API for managing feature gates, experiments, configs, universes, and killswitches in a Shipeasy project. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Mint admin keys via `POST /api/admin/keys` with `type: \"admin\"`. Keys expire after 90 days; rotate with the `revoke` action.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.23.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Shipeasy::Admin::Generated
|
|
16
|
+
class ErrorsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# File a feedback ticket for an error
|
|
23
|
+
# Files a feedback ticket (`type: \"error\"`) for a tracked production error — the \"File an issue\" action on the errors dashboard. The ticket carries the error's fingerprint as its `sourceRef` so it dedupes against, and joins back to, the tracked error. Takes no body. Idempotent: if an open `error` ticket already tracks this fingerprint (hand- or auto-filed), that existing ticket is returned instead of creating a duplicate. Returns `404` if the error does not exist. **Use case:** Promote a noisy tracked error into an actionable ticket in the ops queue (the same item the worker auto-files once an error crosses its occurrence threshold), so it can be triaged, assigned, and burned down via `/shipeasy:ops:work`.
|
|
24
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
27
|
+
# @return [FileErrorTicketResponse]
|
|
28
|
+
def file_error_ticket(id, opts = {})
|
|
29
|
+
data, _status_code, _headers = file_error_ticket_with_http_info(id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# File a feedback ticket for an error
|
|
34
|
+
# Files a feedback ticket (`type: \"error\"`) for a tracked production error — the \"File an issue\" action on the errors dashboard. The ticket carries the error's fingerprint as its `sourceRef` so it dedupes against, and joins back to, the tracked error. Takes no body. Idempotent: if an open `error` ticket already tracks this fingerprint (hand- or auto-filed), that existing ticket is returned instead of creating a duplicate. Returns `404` if the error does not exist. **Use case:** Promote a noisy tracked error into an actionable ticket in the ops queue (the same item the worker auto-files once an error crosses its occurrence threshold), so it can be triaged, assigned, and burned down via `/shipeasy:ops:work`.
|
|
35
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
38
|
+
# @return [Array<(FileErrorTicketResponse, Integer, Hash)>] FileErrorTicketResponse data, response status code and response headers
|
|
39
|
+
def file_error_ticket_with_http_info(id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: ErrorsApi.file_error_ticket ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ErrorsApi.file_error_ticket"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/api/admin/errors/{id}/file'.sub('{id}', CGI.escape(id.to_s))
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body]
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'FileErrorTicketResponse'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"ErrorsApi.file_error_ticket",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: ErrorsApi#file_error_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Get a tracked error
|
|
89
|
+
# Returns a single tracked error by its id, including the latest occurrence's stack, extras, and consequence. Returns `404` if no such error exists in the project. **Use case:** Drill into one issue — fetch its full stack and `seenUrls` to investigate, or to render the detail panel behind a row in the errors list.
|
|
90
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
93
|
+
# @return [ErrorRecord]
|
|
94
|
+
def get_error(id, opts = {})
|
|
95
|
+
data, _status_code, _headers = get_error_with_http_info(id, opts)
|
|
96
|
+
data
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Get a tracked error
|
|
100
|
+
# Returns a single tracked error by its id, including the latest occurrence's stack, extras, and consequence. Returns `404` if no such error exists in the project. **Use case:** Drill into one issue — fetch its full stack and `seenUrls` to investigate, or to render the detail panel behind a row in the errors list.
|
|
101
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
104
|
+
# @return [Array<(ErrorRecord, Integer, Hash)>] ErrorRecord data, response status code and response headers
|
|
105
|
+
def get_error_with_http_info(id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: ErrorsApi.get_error ...'
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/api/admin/errors/{id}'.sub('{id}', CGI.escape(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-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_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] || 'ErrorRecord'
|
|
129
|
+
|
|
130
|
+
# auth_names
|
|
131
|
+
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
132
|
+
|
|
133
|
+
new_options = opts.merge(
|
|
134
|
+
:operation => :"ErrorsApi.get_error",
|
|
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: ErrorsApi#get_error\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
146
|
+
end
|
|
147
|
+
return data, status_code, headers
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Get an error's occurrence series
|
|
151
|
+
# Returns a bucketed occurrence timeseries for one tracked error (by its fingerprint), read from the `shipeasy_errors` Analytics Engine dataset (near-real-time; ingest lag is seconds). The window bounds are epoch **seconds**; `to` must be strictly greater than `from`. The response echoes the SQL that produced the rows. **Use case:** Render the trend sparkline / occurrence chart on the error detail panel, or pull the raw bucketed counts to alert when an issue's rate spikes.
|
|
152
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
153
|
+
# @param error_series_request [ErrorSeriesRequest]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
156
|
+
# @return [ErrorSeriesResponse]
|
|
157
|
+
def get_error_series(id, error_series_request, opts = {})
|
|
158
|
+
data, _status_code, _headers = get_error_series_with_http_info(id, error_series_request, opts)
|
|
159
|
+
data
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Get an error's occurrence series
|
|
163
|
+
# Returns a bucketed occurrence timeseries for one tracked error (by its fingerprint), read from the `shipeasy_errors` Analytics Engine dataset (near-real-time; ingest lag is seconds). The window bounds are epoch **seconds**; `to` must be strictly greater than `from`. The response echoes the SQL that produced the rows. **Use case:** Render the trend sparkline / occurrence chart on the error detail panel, or pull the raw bucketed counts to alert when an issue's rate spikes.
|
|
164
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
165
|
+
# @param error_series_request [ErrorSeriesRequest]
|
|
166
|
+
# @param [Hash] opts the optional parameters
|
|
167
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
168
|
+
# @return [Array<(ErrorSeriesResponse, Integer, Hash)>] ErrorSeriesResponse data, response status code and response headers
|
|
169
|
+
def get_error_series_with_http_info(id, error_series_request, opts = {})
|
|
170
|
+
if @api_client.config.debugging
|
|
171
|
+
@api_client.config.logger.debug 'Calling API: ErrorsApi.get_error_series ...'
|
|
172
|
+
end
|
|
173
|
+
# verify the required parameter 'id' is set
|
|
174
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
175
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ErrorsApi.get_error_series"
|
|
176
|
+
end
|
|
177
|
+
# verify the required parameter 'error_series_request' is set
|
|
178
|
+
if @api_client.config.client_side_validation && error_series_request.nil?
|
|
179
|
+
fail ArgumentError, "Missing the required parameter 'error_series_request' when calling ErrorsApi.get_error_series"
|
|
180
|
+
end
|
|
181
|
+
# resource path
|
|
182
|
+
local_var_path = '/api/admin/errors/{id}/series'.sub('{id}', CGI.escape(id.to_s))
|
|
183
|
+
|
|
184
|
+
# query parameters
|
|
185
|
+
query_params = opts[:query_params] || {}
|
|
186
|
+
|
|
187
|
+
# header parameters
|
|
188
|
+
header_params = opts[:header_params] || {}
|
|
189
|
+
# HTTP header 'Accept' (if needed)
|
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
# HTTP header 'Content-Type'
|
|
192
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
193
|
+
if !content_type.nil?
|
|
194
|
+
header_params['Content-Type'] = content_type
|
|
195
|
+
end
|
|
196
|
+
header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
|
|
197
|
+
|
|
198
|
+
# form parameters
|
|
199
|
+
form_params = opts[:form_params] || {}
|
|
200
|
+
|
|
201
|
+
# http body (model)
|
|
202
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(error_series_request)
|
|
203
|
+
|
|
204
|
+
# return_type
|
|
205
|
+
return_type = opts[:debug_return_type] || 'ErrorSeriesResponse'
|
|
206
|
+
|
|
207
|
+
# auth_names
|
|
208
|
+
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
209
|
+
|
|
210
|
+
new_options = opts.merge(
|
|
211
|
+
:operation => :"ErrorsApi.get_error_series",
|
|
212
|
+
:header_params => header_params,
|
|
213
|
+
:query_params => query_params,
|
|
214
|
+
:form_params => form_params,
|
|
215
|
+
:body => post_body,
|
|
216
|
+
:auth_names => auth_names,
|
|
217
|
+
:return_type => return_type
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
221
|
+
if @api_client.config.debugging
|
|
222
|
+
@api_client.config.logger.debug "API called: ErrorsApi#get_error_series\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
223
|
+
end
|
|
224
|
+
return data, status_code, headers
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# List tracked errors
|
|
228
|
+
# Returns a single page of tracked production errors as a **bare JSON array** (no pagination envelope), ordered by `lastSeenAt desc`. Filter with `status`, free-text-search with `q`, and cap the page with `limit`. Tracked errors are never filed by hand — an ingestion path (worker log drain / the `see()` SDK reporter) folds each occurrence into a row keyed by `fingerprint`, bumping `count` and `lastSeenAt`. This surface only reads them and (via PATCH) flips their `status`. **Use case:** Snapshot the project's open issues for a triage dashboard, or drive a CI gate that fails the build when any `open` error of `kind: uncaught` exists in `prod`.
|
|
229
|
+
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
231
|
+
# @option opts [String] :status Filter by triage state. `all` (the default) returns every status. (default to 'all')
|
|
232
|
+
# @option opts [String] :q Case-insensitive substring match against `message`, `errorType`, and `subject`.
|
|
233
|
+
# @option opts [Integer] :limit Maximum number of rows to return (1–500). Defaults to 200. (default to 200)
|
|
234
|
+
# @return [Array<ErrorRecord>]
|
|
235
|
+
def list_errors(opts = {})
|
|
236
|
+
data, _status_code, _headers = list_errors_with_http_info(opts)
|
|
237
|
+
data
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# List tracked errors
|
|
241
|
+
# Returns a single page of tracked production errors as a **bare JSON array** (no pagination envelope), ordered by `lastSeenAt desc`. Filter with `status`, free-text-search with `q`, and cap the page with `limit`. Tracked errors are never filed by hand — an ingestion path (worker log drain / the `see()` SDK reporter) folds each occurrence into a row keyed by `fingerprint`, bumping `count` and `lastSeenAt`. This surface only reads them and (via PATCH) flips their `status`. **Use case:** Snapshot the project's open issues for a triage dashboard, or drive a CI gate that fails the build when any `open` error of `kind: uncaught` exists in `prod`.
|
|
242
|
+
# @param [Hash] opts the optional parameters
|
|
243
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
244
|
+
# @option opts [String] :status Filter by triage state. `all` (the default) returns every status. (default to 'all')
|
|
245
|
+
# @option opts [String] :q Case-insensitive substring match against `message`, `errorType`, and `subject`.
|
|
246
|
+
# @option opts [Integer] :limit Maximum number of rows to return (1–500). Defaults to 200. (default to 200)
|
|
247
|
+
# @return [Array<(Array<ErrorRecord>, Integer, Hash)>] Array<ErrorRecord> data, response status code and response headers
|
|
248
|
+
def list_errors_with_http_info(opts = {})
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug 'Calling API: ErrorsApi.list_errors ...'
|
|
251
|
+
end
|
|
252
|
+
allowable_values = ["open", "resolved", "ignored", "all"]
|
|
253
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
254
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
255
|
+
end
|
|
256
|
+
if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length > 200
|
|
257
|
+
fail ArgumentError, 'invalid value for "opts[:"q"]" when calling ErrorsApi.list_errors, the character length must be smaller than or equal to 200.'
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
261
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ErrorsApi.list_errors, must be smaller than or equal to 500.'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
265
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ErrorsApi.list_errors, must be greater than or equal to 1.'
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# resource path
|
|
269
|
+
local_var_path = '/api/admin/errors'
|
|
270
|
+
|
|
271
|
+
# query parameters
|
|
272
|
+
query_params = opts[:query_params] || {}
|
|
273
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
274
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
275
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
276
|
+
|
|
277
|
+
# header parameters
|
|
278
|
+
header_params = opts[:header_params] || {}
|
|
279
|
+
# HTTP header 'Accept' (if needed)
|
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
281
|
+
header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
|
|
282
|
+
|
|
283
|
+
# form parameters
|
|
284
|
+
form_params = opts[:form_params] || {}
|
|
285
|
+
|
|
286
|
+
# http body (model)
|
|
287
|
+
post_body = opts[:debug_body]
|
|
288
|
+
|
|
289
|
+
# return_type
|
|
290
|
+
return_type = opts[:debug_return_type] || 'Array<ErrorRecord>'
|
|
291
|
+
|
|
292
|
+
# auth_names
|
|
293
|
+
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
294
|
+
|
|
295
|
+
new_options = opts.merge(
|
|
296
|
+
:operation => :"ErrorsApi.list_errors",
|
|
297
|
+
:header_params => header_params,
|
|
298
|
+
:query_params => query_params,
|
|
299
|
+
:form_params => form_params,
|
|
300
|
+
:body => post_body,
|
|
301
|
+
:auth_names => auth_names,
|
|
302
|
+
:return_type => return_type
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug "API called: ErrorsApi#list_errors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
308
|
+
end
|
|
309
|
+
return data, status_code, headers
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Update a tracked error's status
|
|
313
|
+
# Flips the triage state of one error — the only mutation this surface allows. Valid transitions are between `open`, `resolved`, and `ignored`; the body must carry exactly `{ \"status\": … }`. A `resolved` error reopens automatically (ingestion-side) if it recurs; `ignored` is sticky until flipped back here. Returns the updated row. **Use cases** - **Triage** — `{ \"status\": \"ignored\" }` to suppress a known-benign issue from the open list. - **Close out** — `{ \"status\": \"resolved\" }` once the fix lands; it reopens on its own if the error recurs.
|
|
314
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
315
|
+
# @param update_error_status_request [UpdateErrorStatusRequest]
|
|
316
|
+
# @param [Hash] opts the optional parameters
|
|
317
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
318
|
+
# @return [ErrorRecord]
|
|
319
|
+
def update_error_status(id, update_error_status_request, opts = {})
|
|
320
|
+
data, _status_code, _headers = update_error_status_with_http_info(id, update_error_status_request, opts)
|
|
321
|
+
data
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Update a tracked error's status
|
|
325
|
+
# Flips the triage state of one error — the only mutation this surface allows. Valid transitions are between `open`, `resolved`, and `ignored`; the body must carry exactly `{ \"status\": … }`. A `resolved` error reopens automatically (ingestion-side) if it recurs; `ignored` is sticky until flipped back here. Returns the updated row. **Use cases** - **Triage** — `{ \"status\": \"ignored\" }` to suppress a known-benign issue from the open list. - **Close out** — `{ \"status\": \"resolved\" }` once the fix lands; it reopens on its own if the error recurs.
|
|
326
|
+
# @param id [String] Stable opaque error id (`err_…`).
|
|
327
|
+
# @param update_error_status_request [UpdateErrorStatusRequest]
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @option opts [String] :x_project_id Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).
|
|
330
|
+
# @return [Array<(ErrorRecord, Integer, Hash)>] ErrorRecord data, response status code and response headers
|
|
331
|
+
def update_error_status_with_http_info(id, update_error_status_request, opts = {})
|
|
332
|
+
if @api_client.config.debugging
|
|
333
|
+
@api_client.config.logger.debug 'Calling API: ErrorsApi.update_error_status ...'
|
|
334
|
+
end
|
|
335
|
+
# verify the required parameter 'id' is set
|
|
336
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
337
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ErrorsApi.update_error_status"
|
|
338
|
+
end
|
|
339
|
+
# verify the required parameter 'update_error_status_request' is set
|
|
340
|
+
if @api_client.config.client_side_validation && update_error_status_request.nil?
|
|
341
|
+
fail ArgumentError, "Missing the required parameter 'update_error_status_request' when calling ErrorsApi.update_error_status"
|
|
342
|
+
end
|
|
343
|
+
# resource path
|
|
344
|
+
local_var_path = '/api/admin/errors/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
345
|
+
|
|
346
|
+
# query parameters
|
|
347
|
+
query_params = opts[:query_params] || {}
|
|
348
|
+
|
|
349
|
+
# header parameters
|
|
350
|
+
header_params = opts[:header_params] || {}
|
|
351
|
+
# HTTP header 'Accept' (if needed)
|
|
352
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
353
|
+
# HTTP header 'Content-Type'
|
|
354
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
355
|
+
if !content_type.nil?
|
|
356
|
+
header_params['Content-Type'] = content_type
|
|
357
|
+
end
|
|
358
|
+
header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
|
|
359
|
+
|
|
360
|
+
# form parameters
|
|
361
|
+
form_params = opts[:form_params] || {}
|
|
362
|
+
|
|
363
|
+
# http body (model)
|
|
364
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_error_status_request)
|
|
365
|
+
|
|
366
|
+
# return_type
|
|
367
|
+
return_type = opts[:debug_return_type] || 'ErrorRecord'
|
|
368
|
+
|
|
369
|
+
# auth_names
|
|
370
|
+
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
371
|
+
|
|
372
|
+
new_options = opts.merge(
|
|
373
|
+
:operation => :"ErrorsApi.update_error_status",
|
|
374
|
+
:header_params => header_params,
|
|
375
|
+
:query_params => query_params,
|
|
376
|
+
:form_params => form_params,
|
|
377
|
+
:body => post_body,
|
|
378
|
+
:auth_names => auth_names,
|
|
379
|
+
:return_type => return_type
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
383
|
+
if @api_client.config.debugging
|
|
384
|
+
@api_client.config.logger.debug "API called: ErrorsApi#update_error_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
385
|
+
end
|
|
386
|
+
return data, status_code, headers
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
end
|