shipeasy-sdk 2.3.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/lib/shipeasy/admin.rb +14 -8
- data/lib/shipeasy/sdk/version.rb +1 -1
- data/lib/shipeasy_admin/api/{alert_rules_api.rb → alerts_api.rb} +77 -17
- data/lib/shipeasy_admin/api/api_keys_api.rb +229 -0
- data/lib/shipeasy_admin/api/attributes_api.rb +1 -1
- data/lib/shipeasy_admin/api/configs_api.rb +78 -1
- 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 +1 -1
- data/lib/shipeasy_admin/api/experiments_api.rb +1 -1
- data/lib/shipeasy_admin/api/{gates_api.rb → flags_api.rb} +27 -27
- data/lib/shipeasy_admin/api/{i18n_api.rb → keys_api.rb} +54 -244
- data/lib/shipeasy_admin/api/{killswitches_api.rb → killswitch_api.rb} +110 -33
- data/lib/shipeasy_admin/api/metrics_api.rb +1 -1
- data/lib/shipeasy_admin/api/ops_api.rb +3 -63
- data/lib/shipeasy_admin/api/profiles_api.rb +226 -0
- data/lib/shipeasy_admin/api/projects_api.rb +64 -1
- data/lib/shipeasy_admin/api/universes_api.rb +1 -1
- data/lib/shipeasy_admin/api_client.rb +1 -1
- data/lib/shipeasy_admin/api_error.rb +1 -1
- data/lib/shipeasy_admin/api_model_base.rb +1 -1
- data/lib/shipeasy_admin/configuration.rb +1 -1
- data/lib/shipeasy_admin/models/approve_event_request.rb +2 -2
- data/lib/shipeasy_admin/models/approve_event_response.rb +1 -1
- 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 +6 -31
- data/lib/shipeasy_admin/models/create_alert_rule_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_claude_trigger_request.rb +309 -0
- data/lib/shipeasy_admin/models/create_config_request.rb +14 -3
- data/lib/shipeasy_admin/models/create_config_response.rb +1 -1
- 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 +2 -19
- data/lib/shipeasy_admin/models/create_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_experiment_request.rb +39 -101
- data/lib/shipeasy_admin/models/create_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_gate_request.rb +6 -43
- data/lib/shipeasy_admin/models/create_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_i18n_profile_request.rb +1 -1
- data/lib/shipeasy_admin/models/create_i18n_profile_response.rb +1 -1
- 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 +14 -3
- data/lib/shipeasy_admin/models/create_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_metric_request.rb +6 -18
- data/lib/shipeasy_admin/models/create_metric_response.rb +1 -1
- data/lib/shipeasy_admin/models/create_o_auth_connector_request.rb +273 -0
- data/lib/shipeasy_admin/models/create_ops_item_request.rb +2 -2
- data/lib/shipeasy_admin/models/create_ops_item_response.rb +2 -2
- data/lib/shipeasy_admin/models/create_universe_request.rb +6 -23
- data/lib/shipeasy_admin/models/create_universe_response.rb +1 -1
- data/lib/shipeasy_admin/models/cursor_trigger_config.rb +231 -0
- data/lib/shipeasy_admin/models/delete_alert_rule_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_config_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_connector_response.rb +188 -0
- data/lib/shipeasy_admin/models/delete_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_metric_response.rb +1 -1
- data/lib/shipeasy_admin/models/delete_universe_response.rb +1 -1
- data/lib/shipeasy_admin/models/disable_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/discard_config_draft_request.rb +7 -10
- data/lib/shipeasy_admin/models/discard_config_draft_response.rb +1 -1
- data/lib/shipeasy_admin/models/enable_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/env.rb +41 -0
- data/lib/shipeasy_admin/models/{error_response.rb → error.rb} +29 -7
- 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/{create_experiment_request_goal_metric.rb → experiment_inline_metric.rb} +9 -8
- 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 +1 -1
- data/lib/shipeasy_admin/models/get_current_project_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_current_project_response_module_translations.rb +1 -1
- data/lib/shipeasy_admin/models/get_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_results_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_results_response_experiment.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_results_response_results_inner.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_experiment.rb +1 -1
- data/lib/shipeasy_admin/models/get_experiment_timeseries_response_series_inner.rb +1 -1
- data/lib/shipeasy_admin/models/get_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_metric_response.rb +1 -1
- data/lib/shipeasy_admin/models/get_ops_item_response.rb +1 -1
- 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 +1 -1
- data/lib/shipeasy_admin/models/link_pr_to_ops_item_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_alert_rules_response_inner.rb +2 -2
- data/lib/shipeasy_admin/models/list_attributes_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_config_activity_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_drafts_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_configs_response_data_inner_envs_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_events_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_events_response_inner_properties_inner.rb +1 -31
- data/lib/shipeasy_admin/models/list_experiments_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_experiments_response_data_inner_groups_inner.rb +1 -18
- data/lib/shipeasy_admin/models/list_gates_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_enabled.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_rules_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of.rb +1 -18
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of1.rb +1 -1
- data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of_ramp.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_drafts_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_keys_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_keys_response_keys_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_i18n_profiles_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_keys_response.rb +180 -0
- data/lib/shipeasy_admin/models/list_killswitches_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_killswitches_response_data_inner_envs_value.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir.rb +3 -10
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of1.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of2.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of3.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of4.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of5.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of6.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of7.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of8.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator_filters_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_group_by.rb +1 -1
- data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_slack_channels_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_slack_channels_response_channels_inner.rb +1 -1
- data/lib/shipeasy_admin/models/list_universes_response.rb +1 -1
- data/lib/shipeasy_admin/models/list_universes_response_data_inner.rb +1 -1
- data/lib/shipeasy_admin/models/{list_alert_rules_response_inner_notify.rb → notification_target.rb} +6 -24
- data/lib/shipeasy_admin/models/{list_alert_rules_response_inner_notify_slack_channel.rb → notification_target_slack_channel.rb} +4 -7
- data/lib/shipeasy_admin/models/notify_ops_request.rb +1 -1
- data/lib/shipeasy_admin/models/notify_ops_response.rb +1 -1
- data/lib/shipeasy_admin/models/publish_config_draft_request.rb +7 -10
- data/lib/shipeasy_admin/models/publish_config_draft_response.rb +7 -10
- data/lib/shipeasy_admin/models/publish_i18n_profile_request.rb +1 -1
- data/lib/shipeasy_admin/models/publish_i18n_profile_response.rb +1 -1
- data/lib/shipeasy_admin/models/push_i18n_keys_request.rb +1 -1
- data/lib/shipeasy_admin/models/push_i18n_keys_request_keys_inner.rb +1 -1
- data/lib/shipeasy_admin/models/push_i18n_keys_response.rb +1 -1
- data/lib/shipeasy_admin/models/reanalyze_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/revoke_key_response.rb +216 -0
- data/lib/shipeasy_admin/models/save_config_draft_request.rb +7 -10
- data/lib/shipeasy_admin/models/save_config_draft_response.rb +7 -10
- 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 +1 -1
- data/lib/shipeasy_admin/models/set_experiment_metrics_request_metrics_inner.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_metrics_response.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_metrics_response_metrics_inner.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_status_request.rb +1 -1
- data/lib/shipeasy_admin/models/set_experiment_status_response.rb +1 -1
- 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 +7 -10
- data/lib/shipeasy_admin/models/set_killswitch_switch_response.rb +7 -10
- 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 +7 -10
- data/lib/shipeasy_admin/models/unset_killswitch_switch_response.rb +7 -10
- data/lib/shipeasy_admin/models/update_alert_rule_request.rb +2 -4
- data/lib/shipeasy_admin/models/update_alert_rule_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_config_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_config_response.rb +1 -1
- 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 +2 -2
- data/lib/shipeasy_admin/models/update_event_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_experiment_request.rb +5 -4
- data/lib/shipeasy_admin/models/update_experiment_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_gate_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_gate_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_i18n_key_request.rb +1 -1
- data/lib/shipeasy_admin/models/update_i18n_key_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_killswitch_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_killswitch_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_ops_item_request.rb +1 -1
- data/lib/shipeasy_admin/models/update_ops_item_response.rb +1 -1
- data/lib/shipeasy_admin/models/update_universe_request.rb +2 -2
- data/lib/shipeasy_admin/models/update_universe_response.rb +1 -1
- data/lib/shipeasy_admin/models/upsert_project_request.rb +1 -1
- data/lib/shipeasy_admin/models/upsert_project_response.rb +1 -1
- data/lib/shipeasy_admin/version.rb +1 -1
- data/lib/shipeasy_admin.rb +56 -9
- metadata +56 -9
|
@@ -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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
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
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
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
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
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
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.23.0
|
|
@@ -13,7 +13,7 @@ Generator version: 7.23.0
|
|
|
13
13
|
require 'cgi'
|
|
14
14
|
|
|
15
15
|
module Shipeasy::Admin::Generated
|
|
16
|
-
class
|
|
16
|
+
class FlagsApi
|
|
17
17
|
attr_accessor :api_client
|
|
18
18
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
@@ -38,11 +38,11 @@ module Shipeasy::Admin::Generated
|
|
|
38
38
|
# @return [Array<(CreateGateResponse, Integer, Hash)>] CreateGateResponse data, response status code and response headers
|
|
39
39
|
def create_gate_with_http_info(create_gate_request, opts = {})
|
|
40
40
|
if @api_client.config.debugging
|
|
41
|
-
@api_client.config.logger.debug 'Calling API:
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: FlagsApi.create_gate ...'
|
|
42
42
|
end
|
|
43
43
|
# verify the required parameter 'create_gate_request' is set
|
|
44
44
|
if @api_client.config.client_side_validation && create_gate_request.nil?
|
|
45
|
-
fail ArgumentError, "Missing the required parameter 'create_gate_request' when calling
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'create_gate_request' when calling FlagsApi.create_gate"
|
|
46
46
|
end
|
|
47
47
|
# resource path
|
|
48
48
|
local_var_path = '/api/admin/gates'
|
|
@@ -74,7 +74,7 @@ module Shipeasy::Admin::Generated
|
|
|
74
74
|
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
75
75
|
|
|
76
76
|
new_options = opts.merge(
|
|
77
|
-
:operation => :"
|
|
77
|
+
:operation => :"FlagsApi.create_gate",
|
|
78
78
|
:header_params => header_params,
|
|
79
79
|
:query_params => query_params,
|
|
80
80
|
:form_params => form_params,
|
|
@@ -85,7 +85,7 @@ module Shipeasy::Admin::Generated
|
|
|
85
85
|
|
|
86
86
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
87
87
|
if @api_client.config.debugging
|
|
88
|
-
@api_client.config.logger.debug "API called:
|
|
88
|
+
@api_client.config.logger.debug "API called: FlagsApi#create_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
89
|
end
|
|
90
90
|
return data, status_code, headers
|
|
91
91
|
end
|
|
@@ -109,7 +109,7 @@ module Shipeasy::Admin::Generated
|
|
|
109
109
|
# @return [Array<(DeleteGateResponse, Integer, Hash)>] DeleteGateResponse data, response status code and response headers
|
|
110
110
|
def delete_gate_with_http_info(id, opts = {})
|
|
111
111
|
if @api_client.config.debugging
|
|
112
|
-
@api_client.config.logger.debug 'Calling API:
|
|
112
|
+
@api_client.config.logger.debug 'Calling API: FlagsApi.delete_gate ...'
|
|
113
113
|
end
|
|
114
114
|
# resource path
|
|
115
115
|
local_var_path = '/api/admin/gates/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -136,7 +136,7 @@ module Shipeasy::Admin::Generated
|
|
|
136
136
|
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
137
137
|
|
|
138
138
|
new_options = opts.merge(
|
|
139
|
-
:operation => :"
|
|
139
|
+
:operation => :"FlagsApi.delete_gate",
|
|
140
140
|
:header_params => header_params,
|
|
141
141
|
:query_params => query_params,
|
|
142
142
|
:form_params => form_params,
|
|
@@ -147,7 +147,7 @@ module Shipeasy::Admin::Generated
|
|
|
147
147
|
|
|
148
148
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
149
149
|
if @api_client.config.debugging
|
|
150
|
-
@api_client.config.logger.debug "API called:
|
|
150
|
+
@api_client.config.logger.debug "API called: FlagsApi#delete_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
151
151
|
end
|
|
152
152
|
return data, status_code, headers
|
|
153
153
|
end
|
|
@@ -171,11 +171,11 @@ module Shipeasy::Admin::Generated
|
|
|
171
171
|
# @return [Array<(DisableGateResponse, Integer, Hash)>] DisableGateResponse data, response status code and response headers
|
|
172
172
|
def disable_gate_with_http_info(id, opts = {})
|
|
173
173
|
if @api_client.config.debugging
|
|
174
|
-
@api_client.config.logger.debug 'Calling API:
|
|
174
|
+
@api_client.config.logger.debug 'Calling API: FlagsApi.disable_gate ...'
|
|
175
175
|
end
|
|
176
176
|
# verify the required parameter 'id' is set
|
|
177
177
|
if @api_client.config.client_side_validation && id.nil?
|
|
178
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
178
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling FlagsApi.disable_gate"
|
|
179
179
|
end
|
|
180
180
|
# resource path
|
|
181
181
|
local_var_path = '/api/admin/gates/{id}/disable'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -202,7 +202,7 @@ module Shipeasy::Admin::Generated
|
|
|
202
202
|
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
203
203
|
|
|
204
204
|
new_options = opts.merge(
|
|
205
|
-
:operation => :"
|
|
205
|
+
:operation => :"FlagsApi.disable_gate",
|
|
206
206
|
:header_params => header_params,
|
|
207
207
|
:query_params => query_params,
|
|
208
208
|
:form_params => form_params,
|
|
@@ -213,7 +213,7 @@ module Shipeasy::Admin::Generated
|
|
|
213
213
|
|
|
214
214
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
215
215
|
if @api_client.config.debugging
|
|
216
|
-
@api_client.config.logger.debug "API called:
|
|
216
|
+
@api_client.config.logger.debug "API called: FlagsApi#disable_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
217
217
|
end
|
|
218
218
|
return data, status_code, headers
|
|
219
219
|
end
|
|
@@ -237,11 +237,11 @@ module Shipeasy::Admin::Generated
|
|
|
237
237
|
# @return [Array<(EnableGateResponse, Integer, Hash)>] EnableGateResponse data, response status code and response headers
|
|
238
238
|
def enable_gate_with_http_info(id, opts = {})
|
|
239
239
|
if @api_client.config.debugging
|
|
240
|
-
@api_client.config.logger.debug 'Calling API:
|
|
240
|
+
@api_client.config.logger.debug 'Calling API: FlagsApi.enable_gate ...'
|
|
241
241
|
end
|
|
242
242
|
# verify the required parameter 'id' is set
|
|
243
243
|
if @api_client.config.client_side_validation && id.nil?
|
|
244
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
244
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling FlagsApi.enable_gate"
|
|
245
245
|
end
|
|
246
246
|
# resource path
|
|
247
247
|
local_var_path = '/api/admin/gates/{id}/enable'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -268,7 +268,7 @@ module Shipeasy::Admin::Generated
|
|
|
268
268
|
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
269
269
|
|
|
270
270
|
new_options = opts.merge(
|
|
271
|
-
:operation => :"
|
|
271
|
+
:operation => :"FlagsApi.enable_gate",
|
|
272
272
|
:header_params => header_params,
|
|
273
273
|
:query_params => query_params,
|
|
274
274
|
:form_params => form_params,
|
|
@@ -279,7 +279,7 @@ module Shipeasy::Admin::Generated
|
|
|
279
279
|
|
|
280
280
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
281
281
|
if @api_client.config.debugging
|
|
282
|
-
@api_client.config.logger.debug "API called:
|
|
282
|
+
@api_client.config.logger.debug "API called: FlagsApi#enable_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
283
283
|
end
|
|
284
284
|
return data, status_code, headers
|
|
285
285
|
end
|
|
@@ -305,14 +305,14 @@ module Shipeasy::Admin::Generated
|
|
|
305
305
|
# @return [Array<(ListGatesResponse, Integer, Hash)>] ListGatesResponse data, response status code and response headers
|
|
306
306
|
def list_gates_with_http_info(opts = {})
|
|
307
307
|
if @api_client.config.debugging
|
|
308
|
-
@api_client.config.logger.debug 'Calling API:
|
|
308
|
+
@api_client.config.logger.debug 'Calling API: FlagsApi.list_gates ...'
|
|
309
309
|
end
|
|
310
310
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
311
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling
|
|
311
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FlagsApi.list_gates, must be smaller than or equal to 500.'
|
|
312
312
|
end
|
|
313
313
|
|
|
314
314
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
315
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling
|
|
315
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FlagsApi.list_gates, must be greater than or equal to 1.'
|
|
316
316
|
end
|
|
317
317
|
|
|
318
318
|
# resource path
|
|
@@ -342,7 +342,7 @@ module Shipeasy::Admin::Generated
|
|
|
342
342
|
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
343
343
|
|
|
344
344
|
new_options = opts.merge(
|
|
345
|
-
:operation => :"
|
|
345
|
+
:operation => :"FlagsApi.list_gates",
|
|
346
346
|
:header_params => header_params,
|
|
347
347
|
:query_params => query_params,
|
|
348
348
|
:form_params => form_params,
|
|
@@ -353,7 +353,7 @@ module Shipeasy::Admin::Generated
|
|
|
353
353
|
|
|
354
354
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
355
355
|
if @api_client.config.debugging
|
|
356
|
-
@api_client.config.logger.debug "API called:
|
|
356
|
+
@api_client.config.logger.debug "API called: FlagsApi#list_gates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
357
357
|
end
|
|
358
358
|
return data, status_code, headers
|
|
359
359
|
end
|
|
@@ -379,15 +379,15 @@ module Shipeasy::Admin::Generated
|
|
|
379
379
|
# @return [Array<(UpdateGateResponse, Integer, Hash)>] UpdateGateResponse data, response status code and response headers
|
|
380
380
|
def update_gate_with_http_info(id, update_gate_request, opts = {})
|
|
381
381
|
if @api_client.config.debugging
|
|
382
|
-
@api_client.config.logger.debug 'Calling API:
|
|
382
|
+
@api_client.config.logger.debug 'Calling API: FlagsApi.update_gate ...'
|
|
383
383
|
end
|
|
384
384
|
# verify the required parameter 'id' is set
|
|
385
385
|
if @api_client.config.client_side_validation && id.nil?
|
|
386
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling
|
|
386
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling FlagsApi.update_gate"
|
|
387
387
|
end
|
|
388
388
|
# verify the required parameter 'update_gate_request' is set
|
|
389
389
|
if @api_client.config.client_side_validation && update_gate_request.nil?
|
|
390
|
-
fail ArgumentError, "Missing the required parameter 'update_gate_request' when calling
|
|
390
|
+
fail ArgumentError, "Missing the required parameter 'update_gate_request' when calling FlagsApi.update_gate"
|
|
391
391
|
end
|
|
392
392
|
# resource path
|
|
393
393
|
local_var_path = '/api/admin/gates/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -419,7 +419,7 @@ module Shipeasy::Admin::Generated
|
|
|
419
419
|
auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
|
|
420
420
|
|
|
421
421
|
new_options = opts.merge(
|
|
422
|
-
:operation => :"
|
|
422
|
+
:operation => :"FlagsApi.update_gate",
|
|
423
423
|
:header_params => header_params,
|
|
424
424
|
:query_params => query_params,
|
|
425
425
|
:form_params => form_params,
|
|
@@ -430,7 +430,7 @@ module Shipeasy::Admin::Generated
|
|
|
430
430
|
|
|
431
431
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
432
432
|
if @api_client.config.debugging
|
|
433
|
-
@api_client.config.logger.debug "API called:
|
|
433
|
+
@api_client.config.logger.debug "API called: FlagsApi#update_gate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
434
434
|
end
|
|
435
435
|
return data, status_code, headers
|
|
436
436
|
end
|