shipeasy-sdk 3.8.0 → 4.1.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 (220) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/skill/SKILL.md +7 -4
  4. data/lib/shipeasy/admin.rb +23 -20
  5. data/lib/shipeasy/sdk/see.rb +7 -5
  6. data/lib/shipeasy/sdk/version.rb +1 -1
  7. data/lib/shipeasy_admin/api/flags_api.rb +127 -214
  8. data/lib/shipeasy_admin/api/killswitch_api.rb +25 -525
  9. data/lib/shipeasy_admin/api/ops_api.rb +44 -351
  10. data/lib/shipeasy_admin/api_client.rb +2 -2
  11. data/lib/shipeasy_admin/api_error.rb +2 -2
  12. data/lib/shipeasy_admin/api_model_base.rb +2 -2
  13. data/lib/shipeasy_admin/configuration.rb +29 -2
  14. data/lib/shipeasy_admin/models/{set_killswitch_value_request.rb → add_to_gate_whitelist_request.rb} +37 -42
  15. data/lib/shipeasy_admin/models/create_public_bug_request.rb +493 -0
  16. data/lib/shipeasy_admin/models/create_public_feature_request_request.rb +436 -0
  17. data/lib/shipeasy_admin/models/{file_error_ticket_response.rb → create_public_ticket_response.rb} +32 -29
  18. data/lib/shipeasy_admin/models/env.rb +2 -2
  19. data/lib/shipeasy_admin/models/error.rb +41 -7
  20. data/lib/shipeasy_admin/models/error_code.rb +14 -3
  21. data/lib/shipeasy_admin/models/{get_experiment_timeseries_response_experiment.rb → gate_whitelist.rb} +51 -42
  22. data/lib/shipeasy_admin/models/gate_whitelist_attr.rb +40 -0
  23. data/lib/shipeasy_admin/models/killswitch_value.rb +2 -2
  24. data/lib/shipeasy_admin/models/notification_target.rb +2 -2
  25. data/lib/shipeasy_admin/models/notification_target_slack_channel.rb +2 -2
  26. data/lib/shipeasy_admin/models/ops_item_priority.rb +42 -0
  27. data/lib/shipeasy_admin/models/ops_item_status.rb +46 -0
  28. data/lib/shipeasy_admin/models/{discard_config_draft_request.rb → remove_from_gate_whitelist_request.rb} +34 -44
  29. data/lib/shipeasy_admin/models/{delete_alert_rule_response.rb → set_gate_whitelist_request.rb} +37 -25
  30. data/lib/shipeasy_admin/models/{set_killswitch_switch_request.rb → toggle_killswitch_request.rb} +30 -72
  31. data/lib/shipeasy_admin/models/{set_killswitch_value_response.rb → toggle_killswitch_response.rb} +100 -6
  32. data/lib/shipeasy_admin/version.rb +2 -2
  33. data/lib/shipeasy_admin.rb +14 -195
  34. metadata +14 -195
  35. data/lib/shipeasy_admin/api/alerts_api.rb +0 -352
  36. data/lib/shipeasy_admin/api/api_keys_api.rb +0 -229
  37. data/lib/shipeasy_admin/api/attributes_api.rb +0 -82
  38. data/lib/shipeasy_admin/api/configs_api.rb +0 -757
  39. data/lib/shipeasy_admin/api/connectors_api.rb +0 -497
  40. data/lib/shipeasy_admin/api/drafts_api.rb +0 -82
  41. data/lib/shipeasy_admin/api/errors_api.rb +0 -389
  42. data/lib/shipeasy_admin/api/events_api.rb +0 -438
  43. data/lib/shipeasy_admin/api/experiments_api.rb +0 -727
  44. data/lib/shipeasy_admin/api/keys_api.rb +0 -317
  45. data/lib/shipeasy_admin/api/metrics_api.rb +0 -281
  46. data/lib/shipeasy_admin/api/profiles_api.rb +0 -222
  47. data/lib/shipeasy_admin/api/projects_api.rb +0 -216
  48. data/lib/shipeasy_admin/api/universes_api.rb +0 -306
  49. data/lib/shipeasy_admin/models/approve_event_request.rb +0 -198
  50. data/lib/shipeasy_admin/models/approve_event_response.rb +0 -166
  51. data/lib/shipeasy_admin/models/claude_trigger_config.rb +0 -204
  52. data/lib/shipeasy_admin/models/connector_event.rb +0 -40
  53. data/lib/shipeasy_admin/models/connector_provider.rb +0 -45
  54. data/lib/shipeasy_admin/models/connector_record.rb +0 -468
  55. data/lib/shipeasy_admin/models/copilot_trigger_config.rb +0 -276
  56. data/lib/shipeasy_admin/models/create_alert_rule_request.rb +0 -383
  57. data/lib/shipeasy_admin/models/create_alert_rule_response.rb +0 -165
  58. data/lib/shipeasy_admin/models/create_claude_trigger_request.rb +0 -309
  59. data/lib/shipeasy_admin/models/create_config_request.rb +0 -291
  60. data/lib/shipeasy_admin/models/create_config_response.rb +0 -201
  61. data/lib/shipeasy_admin/models/create_connector_request.rb +0 -64
  62. data/lib/shipeasy_admin/models/create_connector_response.rb +0 -165
  63. data/lib/shipeasy_admin/models/create_copilot_trigger_request.rb +0 -316
  64. data/lib/shipeasy_admin/models/create_cursor_trigger_request.rb +0 -352
  65. data/lib/shipeasy_admin/models/create_event_request.rb +0 -236
  66. data/lib/shipeasy_admin/models/create_event_response.rb +0 -193
  67. data/lib/shipeasy_admin/models/create_experiment_request.rb +0 -807
  68. data/lib/shipeasy_admin/models/create_experiment_response.rb +0 -212
  69. data/lib/shipeasy_admin/models/create_gate_request.rb +0 -492
  70. data/lib/shipeasy_admin/models/create_gate_response.rb +0 -212
  71. data/lib/shipeasy_admin/models/create_i18n_profile_request.rb +0 -188
  72. data/lib/shipeasy_admin/models/create_i18n_profile_response.rb +0 -193
  73. data/lib/shipeasy_admin/models/create_jules_trigger_request.rb +0 -352
  74. data/lib/shipeasy_admin/models/create_key_request.rb +0 -297
  75. data/lib/shipeasy_admin/models/create_key_response.rb +0 -286
  76. data/lib/shipeasy_admin/models/create_killswitch_request.rb +0 -274
  77. data/lib/shipeasy_admin/models/create_killswitch_response.rb +0 -201
  78. data/lib/shipeasy_admin/models/create_metric_request.rb +0 -403
  79. data/lib/shipeasy_admin/models/create_metric_response.rb +0 -193
  80. data/lib/shipeasy_admin/models/create_o_auth_connector_request.rb +0 -273
  81. data/lib/shipeasy_admin/models/create_ops_item_request.rb +0 -287
  82. data/lib/shipeasy_admin/models/create_ops_item_response.rb +0 -177
  83. data/lib/shipeasy_admin/models/create_universe_request.rb +0 -272
  84. data/lib/shipeasy_admin/models/create_universe_response.rb +0 -212
  85. data/lib/shipeasy_admin/models/cursor_trigger_config.rb +0 -231
  86. data/lib/shipeasy_admin/models/delete_config_response.rb +0 -188
  87. data/lib/shipeasy_admin/models/delete_connector_response.rb +0 -188
  88. data/lib/shipeasy_admin/models/delete_event_response.rb +0 -189
  89. data/lib/shipeasy_admin/models/delete_experiment_response.rb +0 -188
  90. data/lib/shipeasy_admin/models/delete_gate_response.rb +0 -188
  91. data/lib/shipeasy_admin/models/delete_killswitch_response.rb +0 -188
  92. data/lib/shipeasy_admin/models/delete_metric_response.rb +0 -189
  93. data/lib/shipeasy_admin/models/delete_universe_response.rb +0 -188
  94. data/lib/shipeasy_admin/models/disable_gate_response.rb +0 -190
  95. data/lib/shipeasy_admin/models/discard_config_draft_response.rb +0 -188
  96. data/lib/shipeasy_admin/models/enable_gate_response.rb +0 -190
  97. data/lib/shipeasy_admin/models/error_record.rb +0 -597
  98. data/lib/shipeasy_admin/models/error_series_request.rb +0 -251
  99. data/lib/shipeasy_admin/models/error_series_response.rb +0 -195
  100. data/lib/shipeasy_admin/models/error_series_response_rows_inner.rb +0 -192
  101. data/lib/shipeasy_admin/models/experiment_inline_metric.rb +0 -337
  102. data/lib/shipeasy_admin/models/fire_connector_request.rb +0 -149
  103. data/lib/shipeasy_admin/models/fire_connector_response.rb +0 -176
  104. data/lib/shipeasy_admin/models/get_config_response.rb +0 -351
  105. data/lib/shipeasy_admin/models/get_current_project_response.rb +0 -606
  106. data/lib/shipeasy_admin/models/get_current_project_response_module_translations.rb +0 -104
  107. data/lib/shipeasy_admin/models/get_event_response.rb +0 -344
  108. data/lib/shipeasy_admin/models/get_experiment_response.rb +0 -688
  109. data/lib/shipeasy_admin/models/get_experiment_results_response.rb +0 -243
  110. data/lib/shipeasy_admin/models/get_experiment_results_response_experiment.rb +0 -248
  111. data/lib/shipeasy_admin/models/get_experiment_results_response_results_inner.rb +0 -252
  112. data/lib/shipeasy_admin/models/get_experiment_timeseries_response.rb +0 -192
  113. data/lib/shipeasy_admin/models/get_experiment_timeseries_response_series_inner.rb +0 -278
  114. data/lib/shipeasy_admin/models/get_killswitch_response.rb +0 -270
  115. data/lib/shipeasy_admin/models/get_metric_response.rb +0 -378
  116. data/lib/shipeasy_admin/models/get_ops_item_response.rb +0 -349
  117. data/lib/shipeasy_admin/models/jules_trigger_config.rb +0 -240
  118. data/lib/shipeasy_admin/models/key_record.rb +0 -353
  119. data/lib/shipeasy_admin/models/link_pr_to_ops_item_request.rb +0 -186
  120. data/lib/shipeasy_admin/models/link_pr_to_ops_item_response.rb +0 -166
  121. data/lib/shipeasy_admin/models/list_alert_rules_response_inner.rb +0 -478
  122. data/lib/shipeasy_admin/models/list_attributes_response_inner.rb +0 -176
  123. data/lib/shipeasy_admin/models/list_config_activity_response_inner.rb +0 -280
  124. data/lib/shipeasy_admin/models/list_configs_response.rb +0 -178
  125. data/lib/shipeasy_admin/models/list_configs_response_data_inner.rb +0 -351
  126. data/lib/shipeasy_admin/models/list_configs_response_data_inner_drafts_value.rb +0 -237
  127. data/lib/shipeasy_admin/models/list_configs_response_data_inner_envs_value.rb +0 -237
  128. data/lib/shipeasy_admin/models/list_events_response_inner.rb +0 -344
  129. data/lib/shipeasy_admin/models/list_events_response_inner_properties_inner.rb +0 -259
  130. data/lib/shipeasy_admin/models/list_experiments_response.rb +0 -178
  131. data/lib/shipeasy_admin/models/list_experiments_response_data_inner.rb +0 -688
  132. data/lib/shipeasy_admin/models/list_experiments_response_data_inner_groups_inner.rb +0 -241
  133. data/lib/shipeasy_admin/models/list_gates_response.rb +0 -178
  134. data/lib/shipeasy_admin/models/list_gates_response_data_inner.rb +0 -395
  135. data/lib/shipeasy_admin/models/list_gates_response_data_inner_enabled.rb +0 -104
  136. data/lib/shipeasy_admin/models/list_gates_response_data_inner_rules_inner.rb +0 -238
  137. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner.rb +0 -105
  138. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of.rb +0 -358
  139. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of1.rb +0 -331
  140. data/lib/shipeasy_admin/models/list_gates_response_data_inner_stack_inner_one_of_ramp.rb +0 -319
  141. data/lib/shipeasy_admin/models/list_i18n_drafts_response_inner.rb +0 -272
  142. data/lib/shipeasy_admin/models/list_i18n_keys_response.rb +0 -195
  143. data/lib/shipeasy_admin/models/list_i18n_keys_response_keys_inner.rb +0 -274
  144. data/lib/shipeasy_admin/models/list_i18n_profiles_response_inner.rb +0 -224
  145. data/lib/shipeasy_admin/models/list_keys_response.rb +0 -180
  146. data/lib/shipeasy_admin/models/list_killswitches_response.rb +0 -178
  147. data/lib/shipeasy_admin/models/list_killswitches_response_data_inner.rb +0 -270
  148. data/lib/shipeasy_admin/models/list_killswitches_response_data_inner_envs_value.rb +0 -248
  149. data/lib/shipeasy_admin/models/list_metrics_response_inner.rb +0 -378
  150. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir.rb +0 -288
  151. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg.rb +0 -113
  152. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of.rb +0 -188
  153. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of1.rb +0 -188
  154. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of2.rb +0 -188
  155. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of3.rb +0 -188
  156. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of4.rb +0 -188
  157. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of5.rb +0 -188
  158. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of6.rb +0 -188
  159. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of7.rb +0 -217
  160. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of8.rb +0 -233
  161. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9.rb +0 -240
  162. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator.rb +0 -266
  163. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_agg_one_of9_numerator_filters_inner.rb +0 -264
  164. data/lib/shipeasy_admin/models/list_metrics_response_inner_query_ir_group_by.rb +0 -228
  165. data/lib/shipeasy_admin/models/list_ops_items_response_inner.rb +0 -349
  166. data/lib/shipeasy_admin/models/list_slack_channels_response.rb +0 -195
  167. data/lib/shipeasy_admin/models/list_slack_channels_response_channels_inner.rb +0 -203
  168. data/lib/shipeasy_admin/models/list_universes_response.rb +0 -178
  169. data/lib/shipeasy_admin/models/list_universes_response_data_inner.rb +0 -305
  170. data/lib/shipeasy_admin/models/notify_ops_request.rb +0 -261
  171. data/lib/shipeasy_admin/models/notify_ops_response.rb +0 -193
  172. data/lib/shipeasy_admin/models/publish_config_draft_request.rb +0 -187
  173. data/lib/shipeasy_admin/models/publish_config_draft_response.rb +0 -257
  174. data/lib/shipeasy_admin/models/publish_i18n_profile_response.rb +0 -391
  175. data/lib/shipeasy_admin/models/push_i18n_keys_request.rb +0 -195
  176. data/lib/shipeasy_admin/models/push_i18n_keys_request_keys_inner.rb +0 -192
  177. data/lib/shipeasy_admin/models/push_i18n_keys_response.rb +0 -251
  178. data/lib/shipeasy_admin/models/reanalyze_experiment_response.rb +0 -214
  179. data/lib/shipeasy_admin/models/revoke_key_response.rb +0 -216
  180. data/lib/shipeasy_admin/models/save_config_draft_request.rb +0 -199
  181. data/lib/shipeasy_admin/models/save_config_draft_response.rb +0 -283
  182. data/lib/shipeasy_admin/models/search_hit.rb +0 -284
  183. data/lib/shipeasy_admin/models/search_response.rb +0 -167
  184. data/lib/shipeasy_admin/models/set_experiment_metrics_request.rb +0 -168
  185. data/lib/shipeasy_admin/models/set_experiment_metrics_request_metrics_inner.rb +0 -216
  186. data/lib/shipeasy_admin/models/set_experiment_metrics_response.rb +0 -179
  187. data/lib/shipeasy_admin/models/set_experiment_metrics_response_metrics_inner.rb +0 -201
  188. data/lib/shipeasy_admin/models/set_experiment_status_request.rb +0 -190
  189. data/lib/shipeasy_admin/models/set_experiment_status_response.rb +0 -214
  190. data/lib/shipeasy_admin/models/set_i18n_label_request.rb +0 -213
  191. data/lib/shipeasy_admin/models/set_i18n_label_response.rb +0 -472
  192. data/lib/shipeasy_admin/models/set_killswitch_switch_response.rb +0 -285
  193. data/lib/shipeasy_admin/models/test_connector_response.rb +0 -189
  194. data/lib/shipeasy_admin/models/unset_killswitch_switch_request.rb +0 -234
  195. data/lib/shipeasy_admin/models/unset_killswitch_switch_response.rb +0 -286
  196. data/lib/shipeasy_admin/models/update_alert_rule_request.rb +0 -304
  197. data/lib/shipeasy_admin/models/update_alert_rule_response.rb +0 -165
  198. data/lib/shipeasy_admin/models/update_config_request.rb +0 -198
  199. data/lib/shipeasy_admin/models/update_config_response.rb +0 -165
  200. data/lib/shipeasy_admin/models/update_config_schema_request.rb +0 -168
  201. data/lib/shipeasy_admin/models/update_config_schema_response.rb +0 -165
  202. data/lib/shipeasy_admin/models/update_connector_request.rb +0 -211
  203. data/lib/shipeasy_admin/models/update_connector_response.rb +0 -166
  204. data/lib/shipeasy_admin/models/update_error_status_request.rb +0 -190
  205. data/lib/shipeasy_admin/models/update_event_request.rb +0 -198
  206. data/lib/shipeasy_admin/models/update_event_response.rb +0 -166
  207. data/lib/shipeasy_admin/models/update_experiment_request.rb +0 -747
  208. data/lib/shipeasy_admin/models/update_experiment_response.rb +0 -165
  209. data/lib/shipeasy_admin/models/update_gate_request.rb +0 -403
  210. data/lib/shipeasy_admin/models/update_gate_response.rb +0 -166
  211. data/lib/shipeasy_admin/models/update_i18n_key_request.rb +0 -176
  212. data/lib/shipeasy_admin/models/update_i18n_key_response.rb +0 -166
  213. data/lib/shipeasy_admin/models/update_killswitch_request.rb +0 -224
  214. data/lib/shipeasy_admin/models/update_killswitch_response.rb +0 -165
  215. data/lib/shipeasy_admin/models/update_ops_item_request.rb +0 -205
  216. data/lib/shipeasy_admin/models/update_ops_item_response.rb +0 -166
  217. data/lib/shipeasy_admin/models/update_universe_request.rb +0 -213
  218. data/lib/shipeasy_admin/models/update_universe_response.rb +0 -165
  219. data/lib/shipeasy_admin/models/upsert_project_request.rb +0 -222
  220. data/lib/shipeasy_admin/models/upsert_project_response.rb +0 -260
@@ -1,7 +1,7 @@
1
1
  =begin
2
- #Shipeasy Admin API
2
+ #Shipeasy Admin API (server-SDK surface)
3
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.
4
+ #The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Three capabilities, nothing else: - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
5
5
 
6
6
  The version of the OpenAPI document: 2.0.0
7
7
 
@@ -14,12 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Shipeasy::Admin::Generated
17
- # Body for `PUT /api/admin/killswitches/{id}/value`. Sets the flat `value` on one env without touching `switches` or other envs.
18
- class SetKillswitchValueRequest < ApiModelBase
19
- attr_accessor :env
17
+ # Body for `POST /api/admin/gates/{id}/whitelist`. Adds entries to the whitelist, creating it if the gate doesn't have one.
18
+ class AddToGateWhitelistRequest < ApiModelBase
19
+ # Identity attribute to match on. Only honoured when the gate has no whitelist yet (this call creates it); passing an attribute that disagrees with an existing whitelist is a 409 rather than a silent re-key of the entries already there.
20
+ attr_accessor :attr
20
21
 
21
- # Flat boolean to publish on `env`. Publishes a new version on that env only.
22
- attr_accessor :value
22
+ # Identities to admit. Already-listed entries are skipped, so the call is idempotent.
23
+ attr_accessor :entries
23
24
 
24
25
  class EnumAttributeValidator
25
26
  attr_reader :datatype
@@ -46,8 +47,8 @@ module Shipeasy::Admin::Generated
46
47
  # Attribute mapping from ruby-style variable name to JSON key.
47
48
  def self.attribute_map
48
49
  {
49
- :'env' => :'env',
50
- :'value' => :'value'
50
+ :'attr' => :'attr',
51
+ :'entries' => :'entries'
51
52
  }
52
53
  end
53
54
 
@@ -64,8 +65,8 @@ module Shipeasy::Admin::Generated
64
65
  # Attribute type mapping.
65
66
  def self.openapi_types
66
67
  {
67
- :'env' => :'Env',
68
- :'value' => :'Boolean'
68
+ :'attr' => :'GateWhitelistAttr',
69
+ :'entries' => :'Array<String>'
69
70
  }
70
71
  end
71
72
 
@@ -79,28 +80,28 @@ module Shipeasy::Admin::Generated
79
80
  # @param [Hash] attributes Model attributes in the form of hash
80
81
  def initialize(attributes = {})
81
82
  if (!attributes.is_a?(Hash))
82
- fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::SetKillswitchValueRequest` initialize method"
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::AddToGateWhitelistRequest` initialize method"
83
84
  end
84
85
 
85
86
  # check to see if the attribute exists and convert string to symbol for hash key
86
87
  acceptable_attribute_map = self.class.acceptable_attribute_map
87
88
  attributes = attributes.each_with_object({}) { |(k, v), h|
88
89
  if (!acceptable_attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::SetKillswitchValueRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::AddToGateWhitelistRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
91
  end
91
92
  h[k.to_sym] = v
92
93
  }
93
94
 
94
- if attributes.key?(:'env')
95
- self.env = attributes[:'env']
96
- else
97
- self.env = nil
95
+ if attributes.key?(:'attr')
96
+ self.attr = attributes[:'attr']
98
97
  end
99
98
 
100
- if attributes.key?(:'value')
101
- self.value = attributes[:'value']
99
+ if attributes.key?(:'entries')
100
+ if (value = attributes[:'entries']).is_a?(Array)
101
+ self.entries = value
102
+ end
102
103
  else
103
- self.value = nil
104
+ self.entries = nil
104
105
  end
105
106
  end
106
107
 
@@ -109,12 +110,12 @@ module Shipeasy::Admin::Generated
109
110
  def list_invalid_properties
110
111
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
112
  invalid_properties = Array.new
112
- if @env.nil?
113
- invalid_properties.push('invalid value for "env", env cannot be nil.')
113
+ if @entries.nil?
114
+ invalid_properties.push('invalid value for "entries", entries cannot be nil.')
114
115
  end
115
116
 
116
- if @value.nil?
117
- invalid_properties.push('invalid value for "value", value cannot be nil.')
117
+ if @entries.length < 1
118
+ invalid_properties.push('invalid value for "entries", number of items must be greater than or equal to 1.')
118
119
  end
119
120
 
120
121
  invalid_properties
@@ -124,29 +125,23 @@ module Shipeasy::Admin::Generated
124
125
  # @return true if the model is valid
125
126
  def valid?
126
127
  warn '[DEPRECATED] the `valid?` method is obsolete'
127
- return false if @env.nil?
128
- return false if @value.nil?
128
+ return false if @entries.nil?
129
+ return false if @entries.length < 1
129
130
  true
130
131
  end
131
132
 
132
133
  # Custom attribute writer method with validation
133
- # @param [Object] env Value to be assigned
134
- def env=(env)
135
- if env.nil?
136
- fail ArgumentError, 'env cannot be nil'
134
+ # @param [Object] entries Value to be assigned
135
+ def entries=(entries)
136
+ if entries.nil?
137
+ fail ArgumentError, 'entries cannot be nil'
137
138
  end
138
139
 
139
- @env = env
140
- end
141
-
142
- # Custom attribute writer method with validation
143
- # @param [Object] value Value to be assigned
144
- def value=(value)
145
- if value.nil?
146
- fail ArgumentError, 'value cannot be nil'
140
+ if entries.length < 1
141
+ fail ArgumentError, 'invalid value for "entries", number of items must be greater than or equal to 1.'
147
142
  end
148
143
 
149
- @value = value
144
+ @entries = entries
150
145
  end
151
146
 
152
147
  # Checks equality by comparing each attribute.
@@ -154,8 +149,8 @@ module Shipeasy::Admin::Generated
154
149
  def ==(o)
155
150
  return true if self.equal?(o)
156
151
  self.class == o.class &&
157
- env == o.env &&
158
- value == o.value
152
+ attr == o.attr &&
153
+ entries == o.entries
159
154
  end
160
155
 
161
156
  # @see the `==` method
@@ -167,7 +162,7 @@ module Shipeasy::Admin::Generated
167
162
  # Calculates hash code according to all attributes.
168
163
  # @return [Integer] Hash code
169
164
  def hash
170
- [env, value].hash
165
+ [attr, entries].hash
171
166
  end
172
167
 
173
168
  # Builds the object from hash
@@ -0,0 +1,493 @@
1
+ =begin
2
+ #Shipeasy Admin API (server-SDK surface)
3
+
4
+ #The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Three capabilities, nothing else: - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
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 'date'
14
+ require 'time'
15
+
16
+ module Shipeasy::Admin::Generated
17
+ # Body for `POST /ops/bug`. The same bug fields as `CreateBugRequest`, minus the `type` discriminator — the path already says what is being filed, plus the public intake's own `dedupKey`.
18
+ class CreatePublicBugRequest < ApiModelBase
19
+ # One-line bug title (no leading/trailing whitespace).
20
+ attr_accessor :title
21
+
22
+ # How to reproduce the bug.
23
+ attr_accessor :steps_to_reproduce
24
+
25
+ # What actually happened.
26
+ attr_accessor :actual_result
27
+
28
+ # What was expected instead.
29
+ attr_accessor :expected_result
30
+
31
+ # Initial triage priority, or `null`.
32
+ attr_accessor :priority
33
+
34
+ # Initial lifecycle status; defaults to `open` when omitted.
35
+ attr_accessor :status
36
+
37
+ # The `users.id` of the person to assign as owner at creation, or `null`.
38
+ attr_accessor :assignee_id
39
+
40
+ # Emails of teammates to subscribe to this item's Slack pings at creation.
41
+ attr_accessor :subscribers
42
+
43
+ # Tag names to attach at creation (get-or-created by name, deduped case-insensitively).
44
+ attr_accessor :tags
45
+
46
+ # Email of the reporter, or `null`.
47
+ attr_accessor :reporter_email
48
+
49
+ # URL of the page the bug relates to, or `null`.
50
+ attr_accessor :page_url
51
+
52
+ # Reporter's user-agent string, or `null`.
53
+ attr_accessor :user_agent
54
+
55
+ # Reporter's viewport (e.g. `1280x720`), or `null`.
56
+ attr_accessor :viewport
57
+
58
+ # Arbitrary capture context, or `null`.
59
+ attr_accessor :context
60
+
61
+ # Caller-chosen dedupe identity for this report, stored on the ticket. A repeat submission carrying the same key does NOT file a second ticket: the open ticket already holding that key is refreshed from this payload (title and the report fields overwritten, a \"re-triggered\" comment appended) and returned with `deduped: true` and `updated: true`. Triage state a human owns — status, priority, assignee, tags — is left untouched, and a `resolved`/`wont_fix` ticket no longer holds the key, so a failure that comes back after being closed files a fresh ticket. Omit it to fall back to the derived (title + `context.step`) dedupe, whose repeats return the existing ticket unchanged.
62
+ attr_accessor :dedup_key
63
+
64
+ # Where this bug's completion notification lands.
65
+ attr_accessor :notify
66
+
67
+ class EnumAttributeValidator
68
+ attr_reader :datatype
69
+ attr_reader :allowable_values
70
+
71
+ def initialize(datatype, allowable_values)
72
+ @allowable_values = allowable_values.map do |value|
73
+ case datatype.to_s
74
+ when /Integer/i
75
+ value.to_i
76
+ when /Float/i
77
+ value.to_f
78
+ else
79
+ value
80
+ end
81
+ end
82
+ end
83
+
84
+ def valid?(value)
85
+ !value || allowable_values.include?(value)
86
+ end
87
+ end
88
+
89
+ # Attribute mapping from ruby-style variable name to JSON key.
90
+ def self.attribute_map
91
+ {
92
+ :'title' => :'title',
93
+ :'steps_to_reproduce' => :'stepsToReproduce',
94
+ :'actual_result' => :'actualResult',
95
+ :'expected_result' => :'expectedResult',
96
+ :'priority' => :'priority',
97
+ :'status' => :'status',
98
+ :'assignee_id' => :'assigneeId',
99
+ :'subscribers' => :'subscribers',
100
+ :'tags' => :'tags',
101
+ :'reporter_email' => :'reporterEmail',
102
+ :'page_url' => :'pageUrl',
103
+ :'user_agent' => :'userAgent',
104
+ :'viewport' => :'viewport',
105
+ :'context' => :'context',
106
+ :'dedup_key' => :'dedupKey',
107
+ :'notify' => :'notify'
108
+ }
109
+ end
110
+
111
+ # Returns attribute mapping this model knows about
112
+ def self.acceptable_attribute_map
113
+ attribute_map
114
+ end
115
+
116
+ # Returns all the JSON keys this model knows about
117
+ def self.acceptable_attributes
118
+ acceptable_attribute_map.values
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.openapi_types
123
+ {
124
+ :'title' => :'String',
125
+ :'steps_to_reproduce' => :'String',
126
+ :'actual_result' => :'String',
127
+ :'expected_result' => :'String',
128
+ :'priority' => :'OpsItemPriority',
129
+ :'status' => :'OpsItemStatus',
130
+ :'assignee_id' => :'String',
131
+ :'subscribers' => :'Array<String>',
132
+ :'tags' => :'Array<String>',
133
+ :'reporter_email' => :'String',
134
+ :'page_url' => :'String',
135
+ :'user_agent' => :'String',
136
+ :'viewport' => :'String',
137
+ :'context' => :'Hash<String, Object>',
138
+ :'dedup_key' => :'String',
139
+ :'notify' => :'NotificationTarget'
140
+ }
141
+ end
142
+
143
+ # List of attributes with nullable: true
144
+ def self.openapi_nullable
145
+ Set.new([
146
+ :'priority',
147
+ :'assignee_id',
148
+ :'reporter_email',
149
+ :'page_url',
150
+ :'user_agent',
151
+ :'viewport',
152
+ :'context',
153
+ :'notify'
154
+ ])
155
+ end
156
+
157
+ # Initializes the object
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ def initialize(attributes = {})
160
+ if (!attributes.is_a?(Hash))
161
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::CreatePublicBugRequest` initialize method"
162
+ end
163
+
164
+ # check to see if the attribute exists and convert string to symbol for hash key
165
+ acceptable_attribute_map = self.class.acceptable_attribute_map
166
+ attributes = attributes.each_with_object({}) { |(k, v), h|
167
+ if (!acceptable_attribute_map.key?(k.to_sym))
168
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::CreatePublicBugRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
169
+ end
170
+ h[k.to_sym] = v
171
+ }
172
+
173
+ if attributes.key?(:'title')
174
+ self.title = attributes[:'title']
175
+ else
176
+ self.title = nil
177
+ end
178
+
179
+ if attributes.key?(:'steps_to_reproduce')
180
+ self.steps_to_reproduce = attributes[:'steps_to_reproduce']
181
+ else
182
+ self.steps_to_reproduce = ''
183
+ end
184
+
185
+ if attributes.key?(:'actual_result')
186
+ self.actual_result = attributes[:'actual_result']
187
+ else
188
+ self.actual_result = ''
189
+ end
190
+
191
+ if attributes.key?(:'expected_result')
192
+ self.expected_result = attributes[:'expected_result']
193
+ else
194
+ self.expected_result = ''
195
+ end
196
+
197
+ if attributes.key?(:'priority')
198
+ self.priority = attributes[:'priority']
199
+ end
200
+
201
+ if attributes.key?(:'status')
202
+ self.status = attributes[:'status']
203
+ end
204
+
205
+ if attributes.key?(:'assignee_id')
206
+ self.assignee_id = attributes[:'assignee_id']
207
+ end
208
+
209
+ if attributes.key?(:'subscribers')
210
+ if (value = attributes[:'subscribers']).is_a?(Array)
211
+ self.subscribers = value
212
+ end
213
+ end
214
+
215
+ if attributes.key?(:'tags')
216
+ if (value = attributes[:'tags']).is_a?(Array)
217
+ self.tags = value
218
+ end
219
+ end
220
+
221
+ if attributes.key?(:'reporter_email')
222
+ self.reporter_email = attributes[:'reporter_email']
223
+ end
224
+
225
+ if attributes.key?(:'page_url')
226
+ self.page_url = attributes[:'page_url']
227
+ end
228
+
229
+ if attributes.key?(:'user_agent')
230
+ self.user_agent = attributes[:'user_agent']
231
+ end
232
+
233
+ if attributes.key?(:'viewport')
234
+ self.viewport = attributes[:'viewport']
235
+ end
236
+
237
+ if attributes.key?(:'context')
238
+ if (value = attributes[:'context']).is_a?(Hash)
239
+ self.context = value
240
+ end
241
+ end
242
+
243
+ if attributes.key?(:'dedup_key')
244
+ self.dedup_key = attributes[:'dedup_key']
245
+ end
246
+
247
+ if attributes.key?(:'notify')
248
+ self.notify = attributes[:'notify']
249
+ end
250
+ end
251
+
252
+ # Show invalid properties with the reasons. Usually used together with valid?
253
+ # @return Array for valid properties with the reasons
254
+ def list_invalid_properties
255
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
256
+ invalid_properties = Array.new
257
+ if @title.nil?
258
+ invalid_properties.push('invalid value for "title", title cannot be nil.')
259
+ end
260
+
261
+ if @title.to_s.length > 200
262
+ invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 200.')
263
+ end
264
+
265
+ if @title.to_s.length < 1
266
+ invalid_properties.push('invalid value for "title", the character length must be greater than or equal to 1.')
267
+ end
268
+
269
+ pattern = Regexp.new(/^\S(.*\S)?$/)
270
+ if @title !~ pattern
271
+ invalid_properties.push("invalid value for \"title\", must conform to the pattern #{pattern}.")
272
+ end
273
+
274
+ if !@steps_to_reproduce.nil? && @steps_to_reproduce.to_s.length > 8000
275
+ invalid_properties.push('invalid value for "steps_to_reproduce", the character length must be smaller than or equal to 8000.')
276
+ end
277
+
278
+ if !@actual_result.nil? && @actual_result.to_s.length > 8000
279
+ invalid_properties.push('invalid value for "actual_result", the character length must be smaller than or equal to 8000.')
280
+ end
281
+
282
+ if !@expected_result.nil? && @expected_result.to_s.length > 8000
283
+ invalid_properties.push('invalid value for "expected_result", the character length must be smaller than or equal to 8000.')
284
+ end
285
+
286
+ if !@user_agent.nil? && @user_agent.to_s.length > 500
287
+ invalid_properties.push('invalid value for "user_agent", the character length must be smaller than or equal to 500.')
288
+ end
289
+
290
+ if !@viewport.nil? && @viewport.to_s.length > 40
291
+ invalid_properties.push('invalid value for "viewport", the character length must be smaller than or equal to 40.')
292
+ end
293
+
294
+ if !@dedup_key.nil? && @dedup_key.to_s.length > 200
295
+ invalid_properties.push('invalid value for "dedup_key", the character length must be smaller than or equal to 200.')
296
+ end
297
+
298
+ invalid_properties
299
+ end
300
+
301
+ # Check to see if the all the properties in the model are valid
302
+ # @return true if the model is valid
303
+ def valid?
304
+ warn '[DEPRECATED] the `valid?` method is obsolete'
305
+ return false if @title.nil?
306
+ return false if @title.to_s.length > 200
307
+ return false if @title.to_s.length < 1
308
+ return false if @title !~ Regexp.new(/^\S(.*\S)?$/)
309
+ return false if !@steps_to_reproduce.nil? && @steps_to_reproduce.to_s.length > 8000
310
+ return false if !@actual_result.nil? && @actual_result.to_s.length > 8000
311
+ return false if !@expected_result.nil? && @expected_result.to_s.length > 8000
312
+ return false if !@user_agent.nil? && @user_agent.to_s.length > 500
313
+ return false if !@viewport.nil? && @viewport.to_s.length > 40
314
+ return false if !@dedup_key.nil? && @dedup_key.to_s.length > 200
315
+ true
316
+ end
317
+
318
+ # Custom attribute writer method with validation
319
+ # @param [Object] title Value to be assigned
320
+ def title=(title)
321
+ if title.nil?
322
+ fail ArgumentError, 'title cannot be nil'
323
+ end
324
+
325
+ if title.to_s.length > 200
326
+ fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 200.'
327
+ end
328
+
329
+ if title.to_s.length < 1
330
+ fail ArgumentError, 'invalid value for "title", the character length must be greater than or equal to 1.'
331
+ end
332
+
333
+ pattern = Regexp.new(/^\S(.*\S)?$/)
334
+ if title !~ pattern
335
+ fail ArgumentError, "invalid value for \"title\", must conform to the pattern #{pattern}."
336
+ end
337
+
338
+ @title = title
339
+ end
340
+
341
+ # Custom attribute writer method with validation
342
+ # @param [Object] steps_to_reproduce Value to be assigned
343
+ def steps_to_reproduce=(steps_to_reproduce)
344
+ if steps_to_reproduce.nil?
345
+ fail ArgumentError, 'steps_to_reproduce cannot be nil'
346
+ end
347
+
348
+ if steps_to_reproduce.to_s.length > 8000
349
+ fail ArgumentError, 'invalid value for "steps_to_reproduce", the character length must be smaller than or equal to 8000.'
350
+ end
351
+
352
+ @steps_to_reproduce = steps_to_reproduce
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] actual_result Value to be assigned
357
+ def actual_result=(actual_result)
358
+ if actual_result.nil?
359
+ fail ArgumentError, 'actual_result cannot be nil'
360
+ end
361
+
362
+ if actual_result.to_s.length > 8000
363
+ fail ArgumentError, 'invalid value for "actual_result", the character length must be smaller than or equal to 8000.'
364
+ end
365
+
366
+ @actual_result = actual_result
367
+ end
368
+
369
+ # Custom attribute writer method with validation
370
+ # @param [Object] expected_result Value to be assigned
371
+ def expected_result=(expected_result)
372
+ if expected_result.nil?
373
+ fail ArgumentError, 'expected_result cannot be nil'
374
+ end
375
+
376
+ if expected_result.to_s.length > 8000
377
+ fail ArgumentError, 'invalid value for "expected_result", the character length must be smaller than or equal to 8000.'
378
+ end
379
+
380
+ @expected_result = expected_result
381
+ end
382
+
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] user_agent Value to be assigned
385
+ def user_agent=(user_agent)
386
+ if !user_agent.nil? && user_agent.to_s.length > 500
387
+ fail ArgumentError, 'invalid value for "user_agent", the character length must be smaller than or equal to 500.'
388
+ end
389
+
390
+ @user_agent = user_agent
391
+ end
392
+
393
+ # Custom attribute writer method with validation
394
+ # @param [Object] viewport Value to be assigned
395
+ def viewport=(viewport)
396
+ if !viewport.nil? && viewport.to_s.length > 40
397
+ fail ArgumentError, 'invalid value for "viewport", the character length must be smaller than or equal to 40.'
398
+ end
399
+
400
+ @viewport = viewport
401
+ end
402
+
403
+ # Custom attribute writer method with validation
404
+ # @param [Object] dedup_key Value to be assigned
405
+ def dedup_key=(dedup_key)
406
+ if dedup_key.nil?
407
+ fail ArgumentError, 'dedup_key cannot be nil'
408
+ end
409
+
410
+ if dedup_key.to_s.length > 200
411
+ fail ArgumentError, 'invalid value for "dedup_key", the character length must be smaller than or equal to 200.'
412
+ end
413
+
414
+ @dedup_key = dedup_key
415
+ end
416
+
417
+ # Checks equality by comparing each attribute.
418
+ # @param [Object] Object to be compared
419
+ def ==(o)
420
+ return true if self.equal?(o)
421
+ self.class == o.class &&
422
+ title == o.title &&
423
+ steps_to_reproduce == o.steps_to_reproduce &&
424
+ actual_result == o.actual_result &&
425
+ expected_result == o.expected_result &&
426
+ priority == o.priority &&
427
+ status == o.status &&
428
+ assignee_id == o.assignee_id &&
429
+ subscribers == o.subscribers &&
430
+ tags == o.tags &&
431
+ reporter_email == o.reporter_email &&
432
+ page_url == o.page_url &&
433
+ user_agent == o.user_agent &&
434
+ viewport == o.viewport &&
435
+ context == o.context &&
436
+ dedup_key == o.dedup_key &&
437
+ notify == o.notify
438
+ end
439
+
440
+ # @see the `==` method
441
+ # @param [Object] Object to be compared
442
+ def eql?(o)
443
+ self == o
444
+ end
445
+
446
+ # Calculates hash code according to all attributes.
447
+ # @return [Integer] Hash code
448
+ def hash
449
+ [title, steps_to_reproduce, actual_result, expected_result, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, viewport, context, dedup_key, notify].hash
450
+ end
451
+
452
+ # Builds the object from hash
453
+ # @param [Hash] attributes Model attributes in the form of hash
454
+ # @return [Object] Returns the model itself
455
+ def self.build_from_hash(attributes)
456
+ return nil unless attributes.is_a?(Hash)
457
+ attributes = attributes.transform_keys(&:to_sym)
458
+ transformed_hash = {}
459
+ openapi_types.each_pair do |key, type|
460
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
461
+ transformed_hash["#{key}"] = nil
462
+ elsif type =~ /\AArray<(.*)>/i
463
+ # check to ensure the input is an array given that the attribute
464
+ # is documented as an array but the input is not
465
+ if attributes[attribute_map[key]].is_a?(Array)
466
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
467
+ end
468
+ elsif !attributes[attribute_map[key]].nil?
469
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
470
+ end
471
+ end
472
+ new(transformed_hash)
473
+ end
474
+
475
+ # Returns the object in the form of hash
476
+ # @return [Hash] Returns the object in the form of hash
477
+ def to_hash
478
+ hash = {}
479
+ self.class.attribute_map.each_pair do |attr, param|
480
+ value = self.send(attr)
481
+ if value.nil?
482
+ is_nullable = self.class.openapi_nullable.include?(attr)
483
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
484
+ end
485
+
486
+ hash[param] = _to_hash(value)
487
+ end
488
+ hash
489
+ end
490
+
491
+ end
492
+
493
+ end