shipeasy-sdk 3.8.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/docs/skill/SKILL.md +7 -4
  3. data/lib/shipeasy/admin.rb +23 -20
  4. data/lib/shipeasy/sdk/see.rb +7 -5
  5. data/lib/shipeasy/sdk/version.rb +1 -1
  6. data/lib/shipeasy_admin/api/flags_api.rb +127 -214
  7. data/lib/shipeasy_admin/api/killswitch_api.rb +25 -525
  8. data/lib/shipeasy_admin/api/ops_api.rb +44 -351
  9. data/lib/shipeasy_admin/api_client.rb +2 -2
  10. data/lib/shipeasy_admin/api_error.rb +2 -2
  11. data/lib/shipeasy_admin/api_model_base.rb +2 -2
  12. data/lib/shipeasy_admin/configuration.rb +29 -2
  13. data/lib/shipeasy_admin/models/{set_killswitch_value_request.rb → add_to_gate_whitelist_request.rb} +37 -42
  14. data/lib/shipeasy_admin/models/create_public_bug_request.rb +464 -0
  15. data/lib/shipeasy_admin/models/create_public_feature_request_request.rb +407 -0
  16. data/lib/shipeasy_admin/models/{file_error_ticket_response.rb → create_public_ticket_response.rb} +22 -29
  17. data/lib/shipeasy_admin/models/env.rb +2 -2
  18. data/lib/shipeasy_admin/models/error.rb +41 -7
  19. data/lib/shipeasy_admin/models/error_code.rb +14 -3
  20. data/lib/shipeasy_admin/models/{get_experiment_timeseries_response_experiment.rb → gate_whitelist.rb} +51 -42
  21. data/lib/shipeasy_admin/models/gate_whitelist_attr.rb +40 -0
  22. data/lib/shipeasy_admin/models/killswitch_value.rb +2 -2
  23. data/lib/shipeasy_admin/models/notification_target.rb +2 -2
  24. data/lib/shipeasy_admin/models/notification_target_slack_channel.rb +2 -2
  25. data/lib/shipeasy_admin/models/ops_item_priority.rb +42 -0
  26. data/lib/shipeasy_admin/models/ops_item_status.rb +46 -0
  27. data/lib/shipeasy_admin/models/{discard_config_draft_request.rb → remove_from_gate_whitelist_request.rb} +34 -44
  28. data/lib/shipeasy_admin/models/{delete_alert_rule_response.rb → set_gate_whitelist_request.rb} +37 -25
  29. data/lib/shipeasy_admin/models/{set_killswitch_switch_request.rb → toggle_killswitch_request.rb} +30 -72
  30. data/lib/shipeasy_admin/models/{set_killswitch_value_response.rb → toggle_killswitch_response.rb} +100 -6
  31. data/lib/shipeasy_admin/version.rb +2 -2
  32. data/lib/shipeasy_admin.rb +14 -195
  33. metadata +13 -194
  34. data/lib/shipeasy_admin/api/alerts_api.rb +0 -352
  35. data/lib/shipeasy_admin/api/api_keys_api.rb +0 -229
  36. data/lib/shipeasy_admin/api/attributes_api.rb +0 -82
  37. data/lib/shipeasy_admin/api/configs_api.rb +0 -757
  38. data/lib/shipeasy_admin/api/connectors_api.rb +0 -497
  39. data/lib/shipeasy_admin/api/drafts_api.rb +0 -82
  40. data/lib/shipeasy_admin/api/errors_api.rb +0 -389
  41. data/lib/shipeasy_admin/api/events_api.rb +0 -438
  42. data/lib/shipeasy_admin/api/experiments_api.rb +0 -727
  43. data/lib/shipeasy_admin/api/keys_api.rb +0 -317
  44. data/lib/shipeasy_admin/api/metrics_api.rb +0 -281
  45. data/lib/shipeasy_admin/api/profiles_api.rb +0 -222
  46. data/lib/shipeasy_admin/api/projects_api.rb +0 -216
  47. data/lib/shipeasy_admin/api/universes_api.rb +0 -306
  48. data/lib/shipeasy_admin/models/approve_event_request.rb +0 -198
  49. data/lib/shipeasy_admin/models/approve_event_response.rb +0 -166
  50. data/lib/shipeasy_admin/models/claude_trigger_config.rb +0 -204
  51. data/lib/shipeasy_admin/models/connector_event.rb +0 -40
  52. data/lib/shipeasy_admin/models/connector_provider.rb +0 -45
  53. data/lib/shipeasy_admin/models/connector_record.rb +0 -468
  54. data/lib/shipeasy_admin/models/copilot_trigger_config.rb +0 -276
  55. data/lib/shipeasy_admin/models/create_alert_rule_request.rb +0 -383
  56. data/lib/shipeasy_admin/models/create_alert_rule_response.rb +0 -165
  57. data/lib/shipeasy_admin/models/create_claude_trigger_request.rb +0 -309
  58. data/lib/shipeasy_admin/models/create_config_request.rb +0 -291
  59. data/lib/shipeasy_admin/models/create_config_response.rb +0 -201
  60. data/lib/shipeasy_admin/models/create_connector_request.rb +0 -64
  61. data/lib/shipeasy_admin/models/create_connector_response.rb +0 -165
  62. data/lib/shipeasy_admin/models/create_copilot_trigger_request.rb +0 -316
  63. data/lib/shipeasy_admin/models/create_cursor_trigger_request.rb +0 -352
  64. data/lib/shipeasy_admin/models/create_event_request.rb +0 -236
  65. data/lib/shipeasy_admin/models/create_event_response.rb +0 -193
  66. data/lib/shipeasy_admin/models/create_experiment_request.rb +0 -807
  67. data/lib/shipeasy_admin/models/create_experiment_response.rb +0 -212
  68. data/lib/shipeasy_admin/models/create_gate_request.rb +0 -492
  69. data/lib/shipeasy_admin/models/create_gate_response.rb +0 -212
  70. data/lib/shipeasy_admin/models/create_i18n_profile_request.rb +0 -188
  71. data/lib/shipeasy_admin/models/create_i18n_profile_response.rb +0 -193
  72. data/lib/shipeasy_admin/models/create_jules_trigger_request.rb +0 -352
  73. data/lib/shipeasy_admin/models/create_key_request.rb +0 -297
  74. data/lib/shipeasy_admin/models/create_key_response.rb +0 -286
  75. data/lib/shipeasy_admin/models/create_killswitch_request.rb +0 -274
  76. data/lib/shipeasy_admin/models/create_killswitch_response.rb +0 -201
  77. data/lib/shipeasy_admin/models/create_metric_request.rb +0 -403
  78. data/lib/shipeasy_admin/models/create_metric_response.rb +0 -193
  79. data/lib/shipeasy_admin/models/create_o_auth_connector_request.rb +0 -273
  80. data/lib/shipeasy_admin/models/create_ops_item_request.rb +0 -287
  81. data/lib/shipeasy_admin/models/create_ops_item_response.rb +0 -177
  82. data/lib/shipeasy_admin/models/create_universe_request.rb +0 -272
  83. data/lib/shipeasy_admin/models/create_universe_response.rb +0 -212
  84. data/lib/shipeasy_admin/models/cursor_trigger_config.rb +0 -231
  85. data/lib/shipeasy_admin/models/delete_config_response.rb +0 -188
  86. data/lib/shipeasy_admin/models/delete_connector_response.rb +0 -188
  87. data/lib/shipeasy_admin/models/delete_event_response.rb +0 -189
  88. data/lib/shipeasy_admin/models/delete_experiment_response.rb +0 -188
  89. data/lib/shipeasy_admin/models/delete_gate_response.rb +0 -188
  90. data/lib/shipeasy_admin/models/delete_killswitch_response.rb +0 -188
  91. data/lib/shipeasy_admin/models/delete_metric_response.rb +0 -189
  92. data/lib/shipeasy_admin/models/delete_universe_response.rb +0 -188
  93. data/lib/shipeasy_admin/models/disable_gate_response.rb +0 -190
  94. data/lib/shipeasy_admin/models/discard_config_draft_response.rb +0 -188
  95. data/lib/shipeasy_admin/models/enable_gate_response.rb +0 -190
  96. data/lib/shipeasy_admin/models/error_record.rb +0 -597
  97. data/lib/shipeasy_admin/models/error_series_request.rb +0 -251
  98. data/lib/shipeasy_admin/models/error_series_response.rb +0 -195
  99. data/lib/shipeasy_admin/models/error_series_response_rows_inner.rb +0 -192
  100. data/lib/shipeasy_admin/models/experiment_inline_metric.rb +0 -337
  101. data/lib/shipeasy_admin/models/fire_connector_request.rb +0 -149
  102. data/lib/shipeasy_admin/models/fire_connector_response.rb +0 -176
  103. data/lib/shipeasy_admin/models/get_config_response.rb +0 -351
  104. data/lib/shipeasy_admin/models/get_current_project_response.rb +0 -606
  105. data/lib/shipeasy_admin/models/get_current_project_response_module_translations.rb +0 -104
  106. data/lib/shipeasy_admin/models/get_event_response.rb +0 -344
  107. data/lib/shipeasy_admin/models/get_experiment_response.rb +0 -688
  108. data/lib/shipeasy_admin/models/get_experiment_results_response.rb +0 -243
  109. data/lib/shipeasy_admin/models/get_experiment_results_response_experiment.rb +0 -248
  110. data/lib/shipeasy_admin/models/get_experiment_results_response_results_inner.rb +0 -252
  111. data/lib/shipeasy_admin/models/get_experiment_timeseries_response.rb +0 -192
  112. data/lib/shipeasy_admin/models/get_experiment_timeseries_response_series_inner.rb +0 -278
  113. data/lib/shipeasy_admin/models/get_killswitch_response.rb +0 -270
  114. data/lib/shipeasy_admin/models/get_metric_response.rb +0 -378
  115. data/lib/shipeasy_admin/models/get_ops_item_response.rb +0 -349
  116. data/lib/shipeasy_admin/models/jules_trigger_config.rb +0 -240
  117. data/lib/shipeasy_admin/models/key_record.rb +0 -353
  118. data/lib/shipeasy_admin/models/link_pr_to_ops_item_request.rb +0 -186
  119. data/lib/shipeasy_admin/models/link_pr_to_ops_item_response.rb +0 -166
  120. data/lib/shipeasy_admin/models/list_alert_rules_response_inner.rb +0 -478
  121. data/lib/shipeasy_admin/models/list_attributes_response_inner.rb +0 -176
  122. data/lib/shipeasy_admin/models/list_config_activity_response_inner.rb +0 -280
  123. data/lib/shipeasy_admin/models/list_configs_response.rb +0 -178
  124. data/lib/shipeasy_admin/models/list_configs_response_data_inner.rb +0 -351
  125. data/lib/shipeasy_admin/models/list_configs_response_data_inner_drafts_value.rb +0 -237
  126. data/lib/shipeasy_admin/models/list_configs_response_data_inner_envs_value.rb +0 -237
  127. data/lib/shipeasy_admin/models/list_events_response_inner.rb +0 -344
  128. data/lib/shipeasy_admin/models/list_events_response_inner_properties_inner.rb +0 -259
  129. data/lib/shipeasy_admin/models/list_experiments_response.rb +0 -178
  130. data/lib/shipeasy_admin/models/list_experiments_response_data_inner.rb +0 -688
  131. data/lib/shipeasy_admin/models/list_experiments_response_data_inner_groups_inner.rb +0 -241
  132. data/lib/shipeasy_admin/models/list_gates_response.rb +0 -178
  133. data/lib/shipeasy_admin/models/list_gates_response_data_inner.rb +0 -395
  134. data/lib/shipeasy_admin/models/list_gates_response_data_inner_enabled.rb +0 -104
  135. data/lib/shipeasy_admin/models/list_gates_response_data_inner_rules_inner.rb +0 -238
  136. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner.rb +0 -105
  137. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of.rb +0 -358
  138. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of1.rb +0 -331
  139. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of_ramp.rb +0 -319
  140. data/lib/shipeasy_admin/models/list_i18n_drafts_response_inner.rb +0 -272
  141. data/lib/shipeasy_admin/models/list_i18n_keys_response.rb +0 -195
  142. data/lib/shipeasy_admin/models/list_i18n_keys_response_keys_inner.rb +0 -274
  143. data/lib/shipeasy_admin/models/list_i18n_profiles_response_inner.rb +0 -224
  144. data/lib/shipeasy_admin/models/list_keys_response.rb +0 -180
  145. data/lib/shipeasy_admin/models/list_killswitches_response.rb +0 -178
  146. data/lib/shipeasy_admin/models/list_killswitches_response_data_inner.rb +0 -270
  147. data/lib/shipeasy_admin/models/list_killswitches_response_data_inner_envs_value.rb +0 -248
  148. data/lib/shipeasy_admin/models/list_metrics_response_inner.rb +0 -378
  149. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir.rb +0 -288
  150. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg.rb +0 -113
  151. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of.rb +0 -188
  152. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of1.rb +0 -188
  153. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of2.rb +0 -188
  154. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of3.rb +0 -188
  155. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of4.rb +0 -188
  156. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of5.rb +0 -188
  157. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of6.rb +0 -188
  158. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of7.rb +0 -217
  159. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of8.rb +0 -233
  160. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9.rb +0 -240
  161. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator.rb +0 -266
  162. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator_filters_inner.rb +0 -264
  163. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_group_by.rb +0 -228
  164. data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +0 -349
  165. data/lib/shipeasy_admin/models/list_slack_channels_response.rb +0 -195
  166. data/lib/shipeasy_admin/models/list_slack_channels_response_channels_inner.rb +0 -203
  167. data/lib/shipeasy_admin/models/list_universes_response.rb +0 -178
  168. data/lib/shipeasy_admin/models/list_universes_response_data_inner.rb +0 -305
  169. data/lib/shipeasy_admin/models/notify_ops_request.rb +0 -261
  170. data/lib/shipeasy_admin/models/notify_ops_response.rb +0 -193
  171. data/lib/shipeasy_admin/models/publish_config_draft_request.rb +0 -187
  172. data/lib/shipeasy_admin/models/publish_config_draft_response.rb +0 -257
  173. data/lib/shipeasy_admin/models/publish_i18n_profile_response.rb +0 -391
  174. data/lib/shipeasy_admin/models/push_i18n_keys_request.rb +0 -195
  175. data/lib/shipeasy_admin/models/push_i18n_keys_request_keys_inner.rb +0 -192
  176. data/lib/shipeasy_admin/models/push_i18n_keys_response.rb +0 -251
  177. data/lib/shipeasy_admin/models/reanalyze_experiment_response.rb +0 -214
  178. data/lib/shipeasy_admin/models/revoke_key_response.rb +0 -216
  179. data/lib/shipeasy_admin/models/save_config_draft_request.rb +0 -199
  180. data/lib/shipeasy_admin/models/save_config_draft_response.rb +0 -283
  181. data/lib/shipeasy_admin/models/search_hit.rb +0 -284
  182. data/lib/shipeasy_admin/models/search_response.rb +0 -167
  183. data/lib/shipeasy_admin/models/set_experiment_metrics_request.rb +0 -168
  184. data/lib/shipeasy_admin/models/set_experiment_metrics_request_metrics_inner.rb +0 -216
  185. data/lib/shipeasy_admin/models/set_experiment_metrics_response.rb +0 -179
  186. data/lib/shipeasy_admin/models/set_experiment_metrics_response_metrics_inner.rb +0 -201
  187. data/lib/shipeasy_admin/models/set_experiment_status_request.rb +0 -190
  188. data/lib/shipeasy_admin/models/set_experiment_status_response.rb +0 -214
  189. data/lib/shipeasy_admin/models/set_i18n_label_request.rb +0 -213
  190. data/lib/shipeasy_admin/models/set_i18n_label_response.rb +0 -472
  191. data/lib/shipeasy_admin/models/set_killswitch_switch_response.rb +0 -285
  192. data/lib/shipeasy_admin/models/test_connector_response.rb +0 -189
  193. data/lib/shipeasy_admin/models/unset_killswitch_switch_request.rb +0 -234
  194. data/lib/shipeasy_admin/models/unset_killswitch_switch_response.rb +0 -286
  195. data/lib/shipeasy_admin/models/update_alert_rule_request.rb +0 -304
  196. data/lib/shipeasy_admin/models/update_alert_rule_response.rb +0 -165
  197. data/lib/shipeasy_admin/models/update_config_request.rb +0 -198
  198. data/lib/shipeasy_admin/models/update_config_response.rb +0 -165
  199. data/lib/shipeasy_admin/models/update_config_schema_request.rb +0 -168
  200. data/lib/shipeasy_admin/models/update_config_schema_response.rb +0 -165
  201. data/lib/shipeasy_admin/models/update_connector_request.rb +0 -211
  202. data/lib/shipeasy_admin/models/update_connector_response.rb +0 -166
  203. data/lib/shipeasy_admin/models/update_error_status_request.rb +0 -190
  204. data/lib/shipeasy_admin/models/update_event_request.rb +0 -198
  205. data/lib/shipeasy_admin/models/update_event_response.rb +0 -166
  206. data/lib/shipeasy_admin/models/update_experiment_request.rb +0 -747
  207. data/lib/shipeasy_admin/models/update_experiment_response.rb +0 -165
  208. data/lib/shipeasy_admin/models/update_gate_request.rb +0 -403
  209. data/lib/shipeasy_admin/models/update_gate_response.rb +0 -166
  210. data/lib/shipeasy_admin/models/update_i18n_key_request.rb +0 -176
  211. data/lib/shipeasy_admin/models/update_i18n_key_response.rb +0 -166
  212. data/lib/shipeasy_admin/models/update_killswitch_request.rb +0 -224
  213. data/lib/shipeasy_admin/models/update_killswitch_response.rb +0 -165
  214. data/lib/shipeasy_admin/models/update_ops_item_request.rb +0 -205
  215. data/lib/shipeasy_admin/models/update_ops_item_response.rb +0 -166
  216. data/lib/shipeasy_admin/models/update_universe_request.rb +0 -213
  217. data/lib/shipeasy_admin/models/update_universe_response.rb +0 -165
  218. data/lib/shipeasy_admin/models/upsert_project_request.rb +0 -222
  219. data/lib/shipeasy_admin/models/upsert_project_response.rb +0 -260
@@ -1,389 +0,0 @@
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 (&#x60;err_…&#x60;).
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&#39;s stack, extras, and consequence. Returns &#x60;404&#x60; if no such error exists in the project. **Use case:** Drill into one issue — fetch its full stack and &#x60;seenUrls&#x60; to investigate, or to render the detail panel behind a row in the errors list.
101
- # @param id [String] Stable opaque error id (&#x60;err_…&#x60;).
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 (&#x60;err_…&#x60;).
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&#39;s occurrence series
163
- # Returns a bucketed occurrence timeseries for one tracked error (by its fingerprint), read from the &#x60;shipeasy_errors&#x60; Analytics Engine dataset (near-real-time; ingest lag is seconds). The window bounds are epoch **seconds**; &#x60;to&#x60; must be strictly greater than &#x60;from&#x60;. 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&#39;s rate spikes.
164
- # @param id [String] Stable opaque error id (&#x60;err_…&#x60;).
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. &#x60;all&#x60; (the default) returns every status. (default to 'all')
232
- # @option opts [String] :q Case-insensitive substring match against &#x60;message&#x60;, &#x60;errorType&#x60;, and &#x60;subject&#x60;.
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 &#x60;lastSeenAt desc&#x60;. Filter with &#x60;status&#x60;, free-text-search with &#x60;q&#x60;, and cap the page with &#x60;limit&#x60;. Tracked errors are never filed by hand — an ingestion path (worker log drain / the &#x60;see()&#x60; SDK reporter) folds each occurrence into a row keyed by &#x60;fingerprint&#x60;, bumping &#x60;count&#x60; and &#x60;lastSeenAt&#x60;. This surface only reads them and (via PATCH) flips their &#x60;status&#x60;. **Use case:** Snapshot the project&#39;s open issues for a triage dashboard, or drive a CI gate that fails the build when any &#x60;open&#x60; error of &#x60;kind: uncaught&#x60; exists in &#x60;prod&#x60;.
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. &#x60;all&#x60; (the default) returns every status. (default to 'all')
245
- # @option opts [String] :q Case-insensitive substring match against &#x60;message&#x60;, &#x60;errorType&#x60;, and &#x60;subject&#x60;.
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 (&#x60;err_…&#x60;).
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&#39;s status
325
- # Flips the triage state of one error — the only mutation this surface allows. Valid transitions are between &#x60;open&#x60;, &#x60;resolved&#x60;, and &#x60;ignored&#x60;; the body must carry exactly &#x60;{ \&quot;status\&quot;: … }&#x60;. A &#x60;resolved&#x60; error reopens automatically (ingestion-side) if it recurs; &#x60;ignored&#x60; is sticky until flipped back here. Returns the updated row. **Use cases** - **Triage** — &#x60;{ \&quot;status\&quot;: \&quot;ignored\&quot; }&#x60; to suppress a known-benign issue from the open list. - **Close out** — &#x60;{ \&quot;status\&quot;: \&quot;resolved\&quot; }&#x60; once the fix lands; it reopens on its own if the error recurs.
326
- # @param id [String] Stable opaque error id (&#x60;err_…&#x60;).
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