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,497 +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 ConnectorsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create a connector
23
- # Creates a connector. The request body is discriminated on `provider`. - **OAuth/app providers** (`google_sheets`, `github`, `slack`) — supply `{ provider, name, events }`. The connector is created `enabled: false` with empty `config` and no credentials; the provider's OAuth flow then attaches credentials and enables it. - **Trigger providers** (`claude_trigger`, `cursor_trigger`, `copilot_trigger`, `jules_trigger`) — supply `config` plus the provider's credential field(s) and the connector is fireable immediately. Trigger creates are **idempotent** by their natural key (`config.routineId` / `config.repoUrl` / `config.owner`+`config.repo` / `config.source`): re-creating updates the existing row rather than duplicating it. **Use cases** - **File bugs as GitHub Issues** — `{ \"provider\": \"github\", \"name\": \"Bugs → acme/app\", \"events\": [\"bug.created\"] }`, then finish the GitHub App install. - **Nightly ops sweep** — register a `claude_trigger` with its `routineId` and (optionally) a fire `token`; subscribe `events` later to auto-fire on new bugs. - **Cold cloud-agent run** — register a `cursor_trigger`/`jules_trigger` with the repo coordinates plus both keys, or a `copilot_trigger` with the repo + user PAT.
24
- # @param create_connector_request [CreateConnectorRequest]
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 [CreateConnectorResponse]
28
- def create_connector(create_connector_request, opts = {})
29
- data, _status_code, _headers = create_connector_with_http_info(create_connector_request, opts)
30
- data
31
- end
32
-
33
- # Create a connector
34
- # Creates a connector. The request body is discriminated on `provider`. - **OAuth/app providers** (`google_sheets`, `github`, `slack`) — supply `{ provider, name, events }`. The connector is created `enabled: false` with empty `config` and no credentials; the provider's OAuth flow then attaches credentials and enables it. - **Trigger providers** (`claude_trigger`, `cursor_trigger`, `copilot_trigger`, `jules_trigger`) — supply `config` plus the provider's credential field(s) and the connector is fireable immediately. Trigger creates are **idempotent** by their natural key (`config.routineId` / `config.repoUrl` / `config.owner`+`config.repo` / `config.source`): re-creating updates the existing row rather than duplicating it. **Use cases** - **File bugs as GitHub Issues** — `{ \"provider\": \"github\", \"name\": \"Bugs → acme/app\", \"events\": [\"bug.created\"] }`, then finish the GitHub App install. - **Nightly ops sweep** — register a `claude_trigger` with its `routineId` and (optionally) a fire `token`; subscribe `events` later to auto-fire on new bugs. - **Cold cloud-agent run** — register a `cursor_trigger`/`jules_trigger` with the repo coordinates plus both keys, or a `copilot_trigger` with the repo + user PAT.
35
- # @param create_connector_request [CreateConnectorRequest]
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<(CreateConnectorResponse, Integer, Hash)>] CreateConnectorResponse data, response status code and response headers
39
- def create_connector_with_http_info(create_connector_request, opts = {})
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.create_connector ...'
42
- end
43
- # verify the required parameter 'create_connector_request' is set
44
- if @api_client.config.client_side_validation && create_connector_request.nil?
45
- fail ArgumentError, "Missing the required parameter 'create_connector_request' when calling ConnectorsApi.create_connector"
46
- end
47
- # resource path
48
- local_var_path = '/api/admin/connectors'
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
- # HTTP header 'Content-Type'
58
- content_type = @api_client.select_header_content_type(['application/json'])
59
- if !content_type.nil?
60
- header_params['Content-Type'] = content_type
61
- end
62
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
63
-
64
- # form parameters
65
- form_params = opts[:form_params] || {}
66
-
67
- # http body (model)
68
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_connector_request)
69
-
70
- # return_type
71
- return_type = opts[:debug_return_type] || 'CreateConnectorResponse'
72
-
73
- # auth_names
74
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
75
-
76
- new_options = opts.merge(
77
- :operation => :"ConnectorsApi.create_connector",
78
- :header_params => header_params,
79
- :query_params => query_params,
80
- :form_params => form_params,
81
- :body => post_body,
82
- :auth_names => auth_names,
83
- :return_type => return_type
84
- )
85
-
86
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
87
- if @api_client.config.debugging
88
- @api_client.config.logger.debug "API called: ConnectorsApi#create_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
- end
90
- return data, status_code, headers
91
- end
92
-
93
- # Delete a connector
94
- # Permanently removes the connector and its stored credentials. **Use case:** Disconnect an integration for good — e.g. tear down a `github` connector after migrating bug routing elsewhere.
95
- # @param id [String] Stable opaque connector id.
96
- # @param [Hash] opts the optional parameters
97
- # @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).
98
- # @return [DeleteConnectorResponse]
99
- def delete_connector(id, opts = {})
100
- data, _status_code, _headers = delete_connector_with_http_info(id, opts)
101
- data
102
- end
103
-
104
- # Delete a connector
105
- # Permanently removes the connector and its stored credentials. **Use case:** Disconnect an integration for good — e.g. tear down a &#x60;github&#x60; connector after migrating bug routing elsewhere.
106
- # @param id [String] Stable opaque connector id.
107
- # @param [Hash] opts the optional parameters
108
- # @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).
109
- # @return [Array<(DeleteConnectorResponse, Integer, Hash)>] DeleteConnectorResponse data, response status code and response headers
110
- def delete_connector_with_http_info(id, opts = {})
111
- if @api_client.config.debugging
112
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.delete_connector ...'
113
- end
114
- # verify the required parameter 'id' is set
115
- if @api_client.config.client_side_validation && id.nil?
116
- fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorsApi.delete_connector"
117
- end
118
- # resource path
119
- local_var_path = '/api/admin/connectors/{id}'.sub('{id}', CGI.escape(id.to_s))
120
-
121
- # query parameters
122
- query_params = opts[:query_params] || {}
123
-
124
- # header parameters
125
- header_params = opts[:header_params] || {}
126
- # HTTP header 'Accept' (if needed)
127
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
128
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
129
-
130
- # form parameters
131
- form_params = opts[:form_params] || {}
132
-
133
- # http body (model)
134
- post_body = opts[:debug_body]
135
-
136
- # return_type
137
- return_type = opts[:debug_return_type] || 'DeleteConnectorResponse'
138
-
139
- # auth_names
140
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
141
-
142
- new_options = opts.merge(
143
- :operation => :"ConnectorsApi.delete_connector",
144
- :header_params => header_params,
145
- :query_params => query_params,
146
- :form_params => form_params,
147
- :body => post_body,
148
- :auth_names => auth_names,
149
- :return_type => return_type
150
- )
151
-
152
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
153
- if @api_client.config.debugging
154
- @api_client.config.logger.debug "API called: ConnectorsApi#delete_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
- end
156
- return data, status_code, headers
157
- end
158
-
159
- # Fire a trigger connector
160
- # Manually kicks a trigger connector's run — Claude (kicks its preconfigured routine) or Cursor / Copilot / Jules (launches a cold cloud-agent run). Firing is event-less: it kicks the run with an optional caller-supplied prompt override rather than dispatching a single lifecycle payload. Only trigger providers can be fired, and only once authenticated (a tokenless trigger cannot fire). The attempt's outcome is recorded on the connector's `lastAttemptAt` / `lastError` / `lastSuccessAt`. **Use case:** Kick a one-off ops sweep on demand from the dashboard's \"Fire now\" button, optionally overriding the routine's default prompt.
161
- # @param id [String] Stable opaque connector id.
162
- # @param [Hash] opts the optional parameters
163
- # @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).
164
- # @option opts [FireConnectorRequest] :fire_connector_request
165
- # @return [FireConnectorResponse]
166
- def fire_connector(id, opts = {})
167
- data, _status_code, _headers = fire_connector_with_http_info(id, opts)
168
- data
169
- end
170
-
171
- # Fire a trigger connector
172
- # Manually kicks a trigger connector&#39;s run — Claude (kicks its preconfigured routine) or Cursor / Copilot / Jules (launches a cold cloud-agent run). Firing is event-less: it kicks the run with an optional caller-supplied prompt override rather than dispatching a single lifecycle payload. Only trigger providers can be fired, and only once authenticated (a tokenless trigger cannot fire). The attempt&#39;s outcome is recorded on the connector&#39;s &#x60;lastAttemptAt&#x60; / &#x60;lastError&#x60; / &#x60;lastSuccessAt&#x60;. **Use case:** Kick a one-off ops sweep on demand from the dashboard&#39;s \&quot;Fire now\&quot; button, optionally overriding the routine&#39;s default prompt.
173
- # @param id [String] Stable opaque connector id.
174
- # @param [Hash] opts the optional parameters
175
- # @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).
176
- # @option opts [FireConnectorRequest] :fire_connector_request
177
- # @return [Array<(FireConnectorResponse, Integer, Hash)>] FireConnectorResponse data, response status code and response headers
178
- def fire_connector_with_http_info(id, opts = {})
179
- if @api_client.config.debugging
180
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.fire_connector ...'
181
- end
182
- # verify the required parameter 'id' is set
183
- if @api_client.config.client_side_validation && id.nil?
184
- fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorsApi.fire_connector"
185
- end
186
- # resource path
187
- local_var_path = '/api/admin/connectors/{id}/fire'.sub('{id}', CGI.escape(id.to_s))
188
-
189
- # query parameters
190
- query_params = opts[:query_params] || {}
191
-
192
- # header parameters
193
- header_params = opts[:header_params] || {}
194
- # HTTP header 'Accept' (if needed)
195
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
196
- # HTTP header 'Content-Type'
197
- content_type = @api_client.select_header_content_type(['application/json'])
198
- if !content_type.nil?
199
- header_params['Content-Type'] = content_type
200
- end
201
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
202
-
203
- # form parameters
204
- form_params = opts[:form_params] || {}
205
-
206
- # http body (model)
207
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'fire_connector_request'])
208
-
209
- # return_type
210
- return_type = opts[:debug_return_type] || 'FireConnectorResponse'
211
-
212
- # auth_names
213
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
214
-
215
- new_options = opts.merge(
216
- :operation => :"ConnectorsApi.fire_connector",
217
- :header_params => header_params,
218
- :query_params => query_params,
219
- :form_params => form_params,
220
- :body => post_body,
221
- :auth_names => auth_names,
222
- :return_type => return_type
223
- )
224
-
225
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
226
- if @api_client.config.debugging
227
- @api_client.config.logger.debug "API called: ConnectorsApi#fire_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
228
- end
229
- return data, status_code, headers
230
- end
231
-
232
- # Get a connector
233
- # Returns a single connector by id. The encrypted credentials are never serialised. **Use case:** Inspect one connector's health — its `enabled` state, subscribed `events`, and last-attempt outcome (`lastError`/`lastSuccessAt`).
234
- # @param id [String] Stable opaque connector id.
235
- # @param [Hash] opts the optional parameters
236
- # @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).
237
- # @return [ConnectorRecord]
238
- def get_connector(id, opts = {})
239
- data, _status_code, _headers = get_connector_with_http_info(id, opts)
240
- data
241
- end
242
-
243
- # Get a connector
244
- # Returns a single connector by id. The encrypted credentials are never serialised. **Use case:** Inspect one connector&#39;s health — its &#x60;enabled&#x60; state, subscribed &#x60;events&#x60;, and last-attempt outcome (&#x60;lastError&#x60;/&#x60;lastSuccessAt&#x60;).
245
- # @param id [String] Stable opaque connector id.
246
- # @param [Hash] opts the optional parameters
247
- # @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).
248
- # @return [Array<(ConnectorRecord, Integer, Hash)>] ConnectorRecord data, response status code and response headers
249
- def get_connector_with_http_info(id, opts = {})
250
- if @api_client.config.debugging
251
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.get_connector ...'
252
- end
253
- # resource path
254
- local_var_path = '/api/admin/connectors/{id}'.sub('{id}', CGI.escape(id.to_s))
255
-
256
- # query parameters
257
- query_params = opts[:query_params] || {}
258
-
259
- # header parameters
260
- header_params = opts[:header_params] || {}
261
- # HTTP header 'Accept' (if needed)
262
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
263
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
264
-
265
- # form parameters
266
- form_params = opts[:form_params] || {}
267
-
268
- # http body (model)
269
- post_body = opts[:debug_body]
270
-
271
- # return_type
272
- return_type = opts[:debug_return_type] || 'ConnectorRecord'
273
-
274
- # auth_names
275
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
276
-
277
- new_options = opts.merge(
278
- :operation => :"ConnectorsApi.get_connector",
279
- :header_params => header_params,
280
- :query_params => query_params,
281
- :form_params => form_params,
282
- :body => post_body,
283
- :auth_names => auth_names,
284
- :return_type => return_type
285
- )
286
-
287
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
288
- if @api_client.config.debugging
289
- @api_client.config.logger.debug "API called: ConnectorsApi#get_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
- end
291
- return data, status_code, headers
292
- end
293
-
294
- # List connectors
295
- # Returns every connector in the project as a bare array (no pagination envelope). The encrypted credentials backing each connector are never serialised — only the connector's non-secret `config`, `accountLabel`, and last-attempt health (`lastError`, `lastAttemptAt`, `lastSuccessAt`) are returned. **Use case:** Render the integrations/triggers settings page, or drive a CI check that asserts every `github` connector is `enabled` and last dispatched without error.
296
- # @param [Hash] opts the optional parameters
297
- # @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).
298
- # @return [Array<ConnectorRecord>]
299
- def list_connectors(opts = {})
300
- data, _status_code, _headers = list_connectors_with_http_info(opts)
301
- data
302
- end
303
-
304
- # List connectors
305
- # Returns every connector in the project as a bare array (no pagination envelope). The encrypted credentials backing each connector are never serialised — only the connector&#39;s non-secret &#x60;config&#x60;, &#x60;accountLabel&#x60;, and last-attempt health (&#x60;lastError&#x60;, &#x60;lastAttemptAt&#x60;, &#x60;lastSuccessAt&#x60;) are returned. **Use case:** Render the integrations/triggers settings page, or drive a CI check that asserts every &#x60;github&#x60; connector is &#x60;enabled&#x60; and last dispatched without error.
306
- # @param [Hash] opts the optional parameters
307
- # @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).
308
- # @return [Array<(Array<ConnectorRecord>, Integer, Hash)>] Array<ConnectorRecord> data, response status code and response headers
309
- def list_connectors_with_http_info(opts = {})
310
- if @api_client.config.debugging
311
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.list_connectors ...'
312
- end
313
- # resource path
314
- local_var_path = '/api/admin/connectors'
315
-
316
- # query parameters
317
- query_params = opts[:query_params] || {}
318
-
319
- # header parameters
320
- header_params = opts[:header_params] || {}
321
- # HTTP header 'Accept' (if needed)
322
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
323
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
324
-
325
- # form parameters
326
- form_params = opts[:form_params] || {}
327
-
328
- # http body (model)
329
- post_body = opts[:debug_body]
330
-
331
- # return_type
332
- return_type = opts[:debug_return_type] || 'Array<ConnectorRecord>'
333
-
334
- # auth_names
335
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
336
-
337
- new_options = opts.merge(
338
- :operation => :"ConnectorsApi.list_connectors",
339
- :header_params => header_params,
340
- :query_params => query_params,
341
- :form_params => form_params,
342
- :body => post_body,
343
- :auth_names => auth_names,
344
- :return_type => return_type
345
- )
346
-
347
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
348
- if @api_client.config.debugging
349
- @api_client.config.logger.debug "API called: ConnectorsApi#list_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
350
- end
351
- return data, status_code, headers
352
- end
353
-
354
- # Test a connector
355
- # Dispatches a single synthetic `bug.created` payload to the connector's destination so you can verify the integration end-to-end. Unlike `fire`, this runs the real dispatch path (posts a Slack message / appends a Sheets row / files a GitHub Issue) with throwaway test content. The attempt's outcome is recorded on the connector's `lastAttemptAt` / `lastError` / `lastSuccessAt`. When the provider produces a linkable artifact (e.g. a GitHub Issue), its URL is returned as `issueUrl`; otherwise `issueUrl` is `null`. **Use case:** Click \"Send test\" after wiring up a connector to confirm credentials and config are correct before relying on it for real events.
356
- # @param id [String] Stable opaque connector id.
357
- # @param [Hash] opts the optional parameters
358
- # @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).
359
- # @return [TestConnectorResponse]
360
- def test_connector(id, opts = {})
361
- data, _status_code, _headers = test_connector_with_http_info(id, opts)
362
- data
363
- end
364
-
365
- # Test a connector
366
- # Dispatches a single synthetic &#x60;bug.created&#x60; payload to the connector&#39;s destination so you can verify the integration end-to-end. Unlike &#x60;fire&#x60;, this runs the real dispatch path (posts a Slack message / appends a Sheets row / files a GitHub Issue) with throwaway test content. The attempt&#39;s outcome is recorded on the connector&#39;s &#x60;lastAttemptAt&#x60; / &#x60;lastError&#x60; / &#x60;lastSuccessAt&#x60;. When the provider produces a linkable artifact (e.g. a GitHub Issue), its URL is returned as &#x60;issueUrl&#x60;; otherwise &#x60;issueUrl&#x60; is &#x60;null&#x60;. **Use case:** Click \&quot;Send test\&quot; after wiring up a connector to confirm credentials and config are correct before relying on it for real events.
367
- # @param id [String] Stable opaque connector id.
368
- # @param [Hash] opts the optional parameters
369
- # @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).
370
- # @return [Array<(TestConnectorResponse, Integer, Hash)>] TestConnectorResponse data, response status code and response headers
371
- def test_connector_with_http_info(id, opts = {})
372
- if @api_client.config.debugging
373
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.test_connector ...'
374
- end
375
- # verify the required parameter 'id' is set
376
- if @api_client.config.client_side_validation && id.nil?
377
- fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorsApi.test_connector"
378
- end
379
- # resource path
380
- local_var_path = '/api/admin/connectors/{id}/test'.sub('{id}', CGI.escape(id.to_s))
381
-
382
- # query parameters
383
- query_params = opts[:query_params] || {}
384
-
385
- # header parameters
386
- header_params = opts[:header_params] || {}
387
- # HTTP header 'Accept' (if needed)
388
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
389
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
390
-
391
- # form parameters
392
- form_params = opts[:form_params] || {}
393
-
394
- # http body (model)
395
- post_body = opts[:debug_body]
396
-
397
- # return_type
398
- return_type = opts[:debug_return_type] || 'TestConnectorResponse'
399
-
400
- # auth_names
401
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
402
-
403
- new_options = opts.merge(
404
- :operation => :"ConnectorsApi.test_connector",
405
- :header_params => header_params,
406
- :query_params => query_params,
407
- :form_params => form_params,
408
- :body => post_body,
409
- :auth_names => auth_names,
410
- :return_type => return_type
411
- )
412
-
413
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
414
- if @api_client.config.debugging
415
- @api_client.config.logger.debug "API called: ConnectorsApi#test_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
416
- end
417
- return data, status_code, headers
418
- end
419
-
420
- # Update a connector
421
- # Partial update — only supplied fields change. `events` and `config` **replace** wholesale; there is no merge or append. Secrets cannot be set through this endpoint (credential rotation goes through the provider-specific re-register flow). The response carries only `{ id }` — re-fetch via `GET /api/admin/connectors/{id}` for the new row. **Use cases** - **Pause a connector** — `{ \"enabled\": false }`. Stops all dispatch / auto-fire without deleting it. - **Change subscribed events** — send the full new `events` array. An empty array unsubscribes the connector from every event. - **Rename** — `{ \"name\": \"Bugs → acme/app issues\" }`. - **Retarget** — send a new `config` (e.g. a different Sheets `sheetTitle`); it replaces the stored config wholesale.
422
- # @param id [String] Stable opaque connector id.
423
- # @param update_connector_request [UpdateConnectorRequest]
424
- # @param [Hash] opts the optional parameters
425
- # @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).
426
- # @return [UpdateConnectorResponse]
427
- def update_connector(id, update_connector_request, opts = {})
428
- data, _status_code, _headers = update_connector_with_http_info(id, update_connector_request, opts)
429
- data
430
- end
431
-
432
- # Update a connector
433
- # Partial update — only supplied fields change. &#x60;events&#x60; and &#x60;config&#x60; **replace** wholesale; there is no merge or append. Secrets cannot be set through this endpoint (credential rotation goes through the provider-specific re-register flow). The response carries only &#x60;{ id }&#x60; — re-fetch via &#x60;GET /api/admin/connectors/{id}&#x60; for the new row. **Use cases** - **Pause a connector** — &#x60;{ \&quot;enabled\&quot;: false }&#x60;. Stops all dispatch / auto-fire without deleting it. - **Change subscribed events** — send the full new &#x60;events&#x60; array. An empty array unsubscribes the connector from every event. - **Rename** — &#x60;{ \&quot;name\&quot;: \&quot;Bugs → acme/app issues\&quot; }&#x60;. - **Retarget** — send a new &#x60;config&#x60; (e.g. a different Sheets &#x60;sheetTitle&#x60;); it replaces the stored config wholesale.
434
- # @param id [String] Stable opaque connector id.
435
- # @param update_connector_request [UpdateConnectorRequest]
436
- # @param [Hash] opts the optional parameters
437
- # @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).
438
- # @return [Array<(UpdateConnectorResponse, Integer, Hash)>] UpdateConnectorResponse data, response status code and response headers
439
- def update_connector_with_http_info(id, update_connector_request, opts = {})
440
- if @api_client.config.debugging
441
- @api_client.config.logger.debug 'Calling API: ConnectorsApi.update_connector ...'
442
- end
443
- # verify the required parameter 'id' is set
444
- if @api_client.config.client_side_validation && id.nil?
445
- fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorsApi.update_connector"
446
- end
447
- # verify the required parameter 'update_connector_request' is set
448
- if @api_client.config.client_side_validation && update_connector_request.nil?
449
- fail ArgumentError, "Missing the required parameter 'update_connector_request' when calling ConnectorsApi.update_connector"
450
- end
451
- # resource path
452
- local_var_path = '/api/admin/connectors/{id}'.sub('{id}', CGI.escape(id.to_s))
453
-
454
- # query parameters
455
- query_params = opts[:query_params] || {}
456
-
457
- # header parameters
458
- header_params = opts[:header_params] || {}
459
- # HTTP header 'Accept' (if needed)
460
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
461
- # HTTP header 'Content-Type'
462
- content_type = @api_client.select_header_content_type(['application/json'])
463
- if !content_type.nil?
464
- header_params['Content-Type'] = content_type
465
- end
466
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
467
-
468
- # form parameters
469
- form_params = opts[:form_params] || {}
470
-
471
- # http body (model)
472
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_connector_request)
473
-
474
- # return_type
475
- return_type = opts[:debug_return_type] || 'UpdateConnectorResponse'
476
-
477
- # auth_names
478
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
479
-
480
- new_options = opts.merge(
481
- :operation => :"ConnectorsApi.update_connector",
482
- :header_params => header_params,
483
- :query_params => query_params,
484
- :form_params => form_params,
485
- :body => post_body,
486
- :auth_names => auth_names,
487
- :return_type => return_type
488
- )
489
-
490
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
491
- if @api_client.config.debugging
492
- @api_client.config.logger.debug "API called: ConnectorsApi#update_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
493
- end
494
- return data, status_code, headers
495
- end
496
- end
497
- end
@@ -1,82 +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 DraftsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # List translation drafts
23
- # List staged translation drafts awaiting review/publish. **Use case:** Review machine-translation drafts before publishing them to a locale.
24
- # @param [Hash] opts the optional parameters
25
- # @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).
26
- # @return [Array<ListI18nDraftsResponseInner>]
27
- def list_i18n_drafts(opts = {})
28
- data, _status_code, _headers = list_i18n_drafts_with_http_info(opts)
29
- data
30
- end
31
-
32
- # List translation drafts
33
- # List staged translation drafts awaiting review/publish. **Use case:** Review machine-translation drafts before publishing them to a locale.
34
- # @param [Hash] opts the optional parameters
35
- # @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).
36
- # @return [Array<(Array<ListI18nDraftsResponseInner>, Integer, Hash)>] Array<ListI18nDraftsResponseInner> data, response status code and response headers
37
- def list_i18n_drafts_with_http_info(opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: DraftsApi.list_i18n_drafts ...'
40
- end
41
- # resource path
42
- local_var_path = '/api/admin/i18n/drafts'
43
-
44
- # query parameters
45
- query_params = opts[:query_params] || {}
46
-
47
- # header parameters
48
- header_params = opts[:header_params] || {}
49
- # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
51
- header_params[:'X-Project-Id'] = opts[:'x_project_id'] if !opts[:'x_project_id'].nil?
52
-
53
- # form parameters
54
- form_params = opts[:form_params] || {}
55
-
56
- # http body (model)
57
- post_body = opts[:debug_body]
58
-
59
- # return_type
60
- return_type = opts[:debug_return_type] || 'Array<ListI18nDraftsResponseInner>'
61
-
62
- # auth_names
63
- auth_names = opts[:debug_auth_names] || ['bearerSdkKey']
64
-
65
- new_options = opts.merge(
66
- :operation => :"DraftsApi.list_i18n_drafts",
67
- :header_params => header_params,
68
- :query_params => query_params,
69
- :form_params => form_params,
70
- :body => post_body,
71
- :auth_names => auth_names,
72
- :return_type => return_type
73
- )
74
-
75
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
76
- if @api_client.config.debugging
77
- @api_client.config.logger.debug "API called: DraftsApi#list_i18n_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
- end
79
- return data, status_code, headers
80
- end
81
- end
82
- end