seatschart 0.2.0 → 0.4.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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +199 -19
  3. data/lib/seatschart/api/audit_api.rb +2 -2
  4. data/lib/seatschart/api/auth_api.rb +81 -4
  5. data/lib/seatschart/api/billing_api.rb +4 -0
  6. data/lib/seatschart/api/charts_api.rb +810 -77
  7. data/lib/seatschart/api/embed_api.rb +5 -5
  8. data/lib/seatschart/api/embed_origins_api.rb +63 -2
  9. data/lib/seatschart/api/event_log_api.rb +2 -2
  10. data/lib/seatschart/api/events_api.rb +1491 -175
  11. data/lib/seatschart/api/health_api.rb +244 -0
  12. data/lib/seatschart/api/map_designer_api.rb +11 -9
  13. data/lib/seatschart/api/public_api.rb +356 -6
  14. data/lib/seatschart/api/sandboxes_api.rb +672 -0
  15. data/lib/seatschart/api/seasons_api.rb +344 -36
  16. data/lib/seatschart/api/seats_api.rb +10 -10
  17. data/lib/seatschart/api/usage_api.rb +18 -15
  18. data/lib/seatschart/api/webhooks_api.rb +2 -2
  19. data/lib/seatschart/api/workspace_api.rb +1815 -363
  20. data/lib/seatschart/models/api_error.rb +4 -4
  21. data/lib/seatschart/models/delete_api_sandboxes_by_sandbox_id200_response.rb +255 -0
  22. data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
  23. data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +62 -4
  24. data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
  25. data/lib/seatschart/models/get_api_sandboxes200_response.rb +239 -0
  26. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner.rb +431 -0
  27. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_rate_limits.rb +270 -0
  28. data/lib/seatschart/models/get_api_sandboxes200_response_items_inner_usage.rb +287 -0
  29. data/lib/seatschart/models/get_api_status200_response.rb +387 -0
  30. data/lib/seatschart/models/get_api_status200_response_components_inner.rb +330 -0
  31. data/lib/seatschart/models/get_api_status200_response_components_inner_days_inner.rb +301 -0
  32. data/lib/seatschart/models/get_api_status200_response_incidents_inner.rb +374 -0
  33. data/lib/seatschart/models/get_api_status200_response_maintenance_inner.rb +350 -0
  34. data/lib/seatschart/models/get_api_status503_response.rb +271 -0
  35. data/lib/seatschart/models/get_api_workspace_buyer_extra_data200_response.rb +241 -0
  36. data/lib/seatschart/models/get_api_workspace_defaults200_response.rb +254 -0
  37. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer.rb +246 -0
  38. data/lib/seatschart/models/get_api_workspace_defaults200_response_renderer_built_in.rb +270 -0
  39. data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +80 -5
  40. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
  41. data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
  42. data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
  43. data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
  44. data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +12 -2
  45. data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +15 -5
  46. data/lib/seatschart/models/patch_api_workspace_chart_validation_request_severities.rb +25 -4
  47. data/lib/seatschart/models/patch_api_workspace_defaults_request.rb +224 -0
  48. data/lib/seatschart/models/patch_api_workspace_defaults_request_renderer.rb +249 -0
  49. data/lib/seatschart/models/patch_api_workspace_settings_request.rb +6 -6
  50. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
  51. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
  52. data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
  53. data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
  54. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_copy_to_workspace_request.rb +39 -1
  55. data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request.rb +1 -0
  56. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish422_response_issues_inner.rb +64 -6
  57. data/lib/seatschart/models/post_api_charts_by_chart_id_map_publish_request.rb +1 -1
  58. data/lib/seatschart/models/post_api_embed_tokens_request.rb +18 -15
  59. data/lib/seatschart/models/post_api_embed_tokens_request_safe_mode_options.rb +226 -0
  60. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request.rb +251 -0
  61. data/lib/seatschart/models/post_api_events_actions_edit_for_sale_config_request_events_inner.rb +322 -0
  62. data/lib/seatschart/models/post_api_events_bulk_request_events_inner.rb +42 -1
  63. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request.rb +277 -0
  64. data/lib/seatschart/models/post_api_events_by_event_id_actions_edit_for_sale_config_request_for_sale_inner.rb +319 -0
  65. data/lib/seatschart/models/post_api_events_by_event_id_map_publish_request.rb +215 -0
  66. data/lib/seatschart/models/post_api_events_request.rb +42 -1
  67. data/lib/seatschart/models/{patch_api_events_by_event_id_request_categories_inner.rb → post_api_events_request_categories_inner.rb} +3 -3
  68. data/lib/seatschart/models/post_api_extract_seats200_response.rb +459 -0
  69. data/lib/seatschart/models/post_api_extract_seats200_response_seats_inner.rb +323 -0
  70. data/lib/seatschart/models/post_api_extract_seats200_response_suggested_inner.rb +320 -0
  71. data/lib/seatschart/models/post_api_extract_seats_request.rb +124 -4
  72. data/lib/seatschart/models/post_api_extract_seats_request_examples.rb +105 -0
  73. data/lib/seatschart/models/post_api_extract_seats_request_examples_any_of_inner.rb +293 -0
  74. data/lib/seatschart/models/post_api_extract_seats_request_negatives.rb +105 -0
  75. data/lib/seatschart/models/post_api_extract_seats_request_region.rb +105 -0
  76. data/lib/seatschart/models/{put_api_charts_by_chart_id_map_draft_request.rb → post_api_extract_seats_request_region_any_of.rb} +111 -96
  77. data/lib/seatschart/models/post_api_sandboxes201_response.rb +245 -0
  78. data/lib/seatschart/models/post_api_sandboxes201_response_admin_key.rb +286 -0
  79. data/lib/seatschart/models/post_api_sandboxes201_response_copied.rb +313 -0
  80. data/lib/seatschart/models/post_api_sandboxes201_response_copied_charts_inner.rb +281 -0
  81. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_inner.rb +281 -0
  82. data/lib/seatschart/models/post_api_sandboxes201_response_copied_events_with_own_map_inner.rb +265 -0
  83. data/lib/seatschart/models/post_api_sandboxes201_response_copied_key_conflicts_inner.rb +287 -0
  84. data/lib/seatschart/models/post_api_sandboxes201_response_copied_seasons_inner.rb +312 -0
  85. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production200_response.rb +313 -0
  86. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_copy_from_production_request.rb +255 -0
  87. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_join200_response.rb +271 -0
  88. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset200_response.rb +268 -0
  89. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_actions_reset_request.rb +225 -0
  90. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response.rb +253 -0
  91. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key201_response_api_key.rb +286 -0
  92. data/lib/seatschart/models/post_api_sandboxes_by_sandbox_id_admin_key_request.rb +252 -0
  93. data/lib/seatschart/models/post_api_sandboxes_request.rb +319 -0
  94. data/lib/seatschart/models/post_api_seasons_request.rb +14 -4
  95. data/lib/seatschart/models/post_api_seats_confirm_request.rb +5 -5
  96. data/lib/seatschart/models/post_api_seats_release_request.rb +5 -5
  97. data/lib/seatschart/models/post_api_seats_reserve_request.rb +5 -5
  98. data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
  99. data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
  100. data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
  101. data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
  102. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
  103. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
  104. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
  105. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
  106. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
  107. data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
  108. data/lib/seatschart/models/post_api_workspaces_request.rb +101 -5
  109. data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
  110. data/lib/seatschart/models/put_api_workspace_buyer_extra_data_request.rb +260 -0
  111. data/lib/seatschart/models/put_internal_status_notices_request.rb +242 -0
  112. data/lib/seatschart/models/put_internal_status_notices_request_notices_inner.rb +445 -0
  113. data/lib/seatschart/retry.rb +106 -7
  114. data/lib/seatschart/version.rb +1 -1
  115. data/lib/seatschart.rb +73 -3
  116. metadata +75 -5
  117. data/lib/seatschart/api/default_api.rb +0 -763
@@ -73,5 +73,249 @@ module SeatsChart
73
73
  end
74
74
  return data, status_code, headers
75
75
  end
76
+
77
+ # Public platform status and 90-day uptime
78
+ # Current state, latest latency and 90 days of daily uptime per component, automatic incidents and operator notices (incidents and maintenance). A sampler in the reservation worker probes every component every 30 s (STATUS_SAMPLE_INTERVAL_SEC) and keeps compact per-minute and per-day rollups in Redis (`status:*` keys, 90 days, bounded). Minutes without a sample — for example while the sampler itself is down — are reported as no data (`uptime: null`, `coverage` below 1), never as up. No authentication; IP rate limited; `Cache-Control: public, max-age=30, stale-while-revalidate=60`; gzip or br by `Accept-Encoding` with a weak `ETag` (304 on `If-None-Match`). No hostnames, error texts or other internals are exposed. 503 `redis_unavailable` when Redis cannot be read.
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [GetApiStatus200Response]
81
+ def get_api_status(opts = {})
82
+ data, _status_code, _headers = get_api_status_with_http_info(opts)
83
+ data
84
+ end
85
+
86
+ # Public platform status and 90-day uptime
87
+ # Current state, latest latency and 90 days of daily uptime per component, automatic incidents and operator notices (incidents and maintenance). A sampler in the reservation worker probes every component every 30 s (STATUS_SAMPLE_INTERVAL_SEC) and keeps compact per-minute and per-day rollups in Redis (`status:*` keys, 90 days, bounded). Minutes without a sample — for example while the sampler itself is down — are reported as no data (`uptime: null`, `coverage` below 1), never as up. No authentication; IP rate limited; `Cache-Control: public, max-age=30, stale-while-revalidate=60`; gzip or br by `Accept-Encoding` with a weak `ETag` (304 on `If-None-Match`). No hostnames, error texts or other internals are exposed. 503 `redis_unavailable` when Redis cannot be read.
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [Array<(GetApiStatus200Response, Integer, Hash)>] GetApiStatus200Response data, response status code and response headers
90
+ def get_api_status_with_http_info(opts = {})
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug 'Calling API: HealthApi.get_api_status ...'
93
+ end
94
+ # resource path
95
+ local_var_path = '/api/status'
96
+
97
+ # query parameters
98
+ query_params = opts[:query_params] || {}
99
+
100
+ # header parameters
101
+ header_params = opts[:header_params] || {}
102
+ # HTTP header 'Accept' (if needed)
103
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
104
+
105
+ # form parameters
106
+ form_params = opts[:form_params] || {}
107
+
108
+ # http body (model)
109
+ post_body = opts[:debug_body]
110
+
111
+ # return_type
112
+ return_type = opts[:debug_return_type] || 'GetApiStatus200Response'
113
+
114
+ # auth_names
115
+ auth_names = opts[:debug_auth_names] || []
116
+
117
+ new_options = opts.merge(
118
+ :operation => :"HealthApi.get_api_status",
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => return_type
125
+ )
126
+
127
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug "API called: HealthApi#get_api_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
+ end
131
+ return data, status_code, headers
132
+ end
133
+
134
+ # Liveness probe
135
+ # Answers 200 `{ status: \"ok\" }` while the process serves requests, with no Redis or PostgreSQL check (use `GET /api/health` for readiness). Still served while the API drains on shutdown.
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [nil]
138
+ def get_health_live(opts = {})
139
+ get_health_live_with_http_info(opts)
140
+ nil
141
+ end
142
+
143
+ # Liveness probe
144
+ # Answers 200 &#x60;{ status: \&quot;ok\&quot; }&#x60; while the process serves requests, with no Redis or PostgreSQL check (use &#x60;GET /api/health&#x60; for readiness). Still served while the API drains on shutdown.
145
+ # @param [Hash] opts the optional parameters
146
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
147
+ def get_health_live_with_http_info(opts = {})
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug 'Calling API: HealthApi.get_health_live ...'
150
+ end
151
+ # resource path
152
+ local_var_path = '/health/live'
153
+
154
+ # query parameters
155
+ query_params = opts[:query_params] || {}
156
+
157
+ # header parameters
158
+ header_params = opts[:header_params] || {}
159
+
160
+ # form parameters
161
+ form_params = opts[:form_params] || {}
162
+
163
+ # http body (model)
164
+ post_body = opts[:debug_body]
165
+
166
+ # return_type
167
+ return_type = opts[:debug_return_type]
168
+
169
+ # auth_names
170
+ auth_names = opts[:debug_auth_names] || []
171
+
172
+ new_options = opts.merge(
173
+ :operation => :"HealthApi.get_health_live",
174
+ :header_params => header_params,
175
+ :query_params => query_params,
176
+ :form_params => form_params,
177
+ :body => post_body,
178
+ :auth_names => auth_names,
179
+ :return_type => return_type
180
+ )
181
+
182
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "API called: HealthApi#get_health_live\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
+ end
186
+ return data, status_code, headers
187
+ end
188
+
189
+ # Prometheus metrics
190
+ # Prometheus text exposition (`text/plain; version=0.0.4`) of the API process metrics. Requires `Authorization: Bearer <OBSERVABILITY_TOKEN>` (at least 32 characters); any other request, or an API without the token configured, gets 404 `not_found`.
191
+ # @param [Hash] opts the optional parameters
192
+ # @return [nil]
193
+ def get_internal_metrics(opts = {})
194
+ get_internal_metrics_with_http_info(opts)
195
+ nil
196
+ end
197
+
198
+ # Prometheus metrics
199
+ # Prometheus text exposition (&#x60;text/plain; version&#x3D;0.0.4&#x60;) of the API process metrics. Requires &#x60;Authorization: Bearer &lt;OBSERVABILITY_TOKEN&gt;&#x60; (at least 32 characters); any other request, or an API without the token configured, gets 404 &#x60;not_found&#x60;.
200
+ # @param [Hash] opts the optional parameters
201
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
202
+ def get_internal_metrics_with_http_info(opts = {})
203
+ if @api_client.config.debugging
204
+ @api_client.config.logger.debug 'Calling API: HealthApi.get_internal_metrics ...'
205
+ end
206
+ # resource path
207
+ local_var_path = '/internal/metrics'
208
+
209
+ # query parameters
210
+ query_params = opts[:query_params] || {}
211
+
212
+ # header parameters
213
+ header_params = opts[:header_params] || {}
214
+
215
+ # form parameters
216
+ form_params = opts[:form_params] || {}
217
+
218
+ # http body (model)
219
+ post_body = opts[:debug_body]
220
+
221
+ # return_type
222
+ return_type = opts[:debug_return_type]
223
+
224
+ # auth_names
225
+ auth_names = opts[:debug_auth_names] || []
226
+
227
+ new_options = opts.merge(
228
+ :operation => :"HealthApi.get_internal_metrics",
229
+ :header_params => header_params,
230
+ :query_params => query_params,
231
+ :form_params => form_params,
232
+ :body => post_body,
233
+ :auth_names => auth_names,
234
+ :return_type => return_type
235
+ )
236
+
237
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: HealthApi#get_internal_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
+ end
241
+ return data, status_code, headers
242
+ end
243
+
244
+ # Replace status page notices (operators)
245
+ # Replaces the manual incident and maintenance notices shown on the public status page (at most 20, English text). An incident with `endsAt` in the past is resolved; a maintenance window is scheduled, in progress or completed from its times. Requires `Authorization: Bearer <OBSERVABILITY_TOKEN>`; any other request gets 404 `not_found`. Send `{ \"notices\": [] }` to clear.
246
+ # @param put_internal_status_notices_request [PutInternalStatusNoticesRequest]
247
+ # @param [Hash] opts the optional parameters
248
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
249
+ # @return [nil]
250
+ def put_internal_status_notices(put_internal_status_notices_request, opts = {})
251
+ put_internal_status_notices_with_http_info(put_internal_status_notices_request, opts)
252
+ nil
253
+ end
254
+
255
+ # Replace status page notices (operators)
256
+ # Replaces the manual incident and maintenance notices shown on the public status page (at most 20, English text). An incident with &#x60;endsAt&#x60; in the past is resolved; a maintenance window is scheduled, in progress or completed from its times. Requires &#x60;Authorization: Bearer &lt;OBSERVABILITY_TOKEN&gt;&#x60;; any other request gets 404 &#x60;not_found&#x60;. Send &#x60;{ \&quot;notices\&quot;: [] }&#x60; to clear.
257
+ # @param put_internal_status_notices_request [PutInternalStatusNoticesRequest]
258
+ # @param [Hash] opts the optional parameters
259
+ # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
260
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
261
+ def put_internal_status_notices_with_http_info(put_internal_status_notices_request, opts = {})
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug 'Calling API: HealthApi.put_internal_status_notices ...'
264
+ end
265
+ # verify the required parameter 'put_internal_status_notices_request' is set
266
+ if @api_client.config.client_side_validation && put_internal_status_notices_request.nil?
267
+ fail ArgumentError, "Missing the required parameter 'put_internal_status_notices_request' when calling HealthApi.put_internal_status_notices"
268
+ end
269
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
270
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling HealthApi.put_internal_status_notices, the character length must be smaller than or equal to 255.'
271
+ end
272
+
273
+ if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
274
+ fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling HealthApi.put_internal_status_notices, the character length must be great than or equal to 1.'
275
+ end
276
+
277
+ # resource path
278
+ local_var_path = '/internal/status/notices'
279
+
280
+ # query parameters
281
+ query_params = opts[:query_params] || {}
282
+
283
+ # header parameters
284
+ header_params = opts[:header_params] || {}
285
+ # HTTP header 'Content-Type'
286
+ content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
287
+ if !content_type.nil?
288
+ header_params['Content-Type'] = content_type
289
+ end
290
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
291
+
292
+ # form parameters
293
+ form_params = opts[:form_params] || {}
294
+
295
+ # http body (model)
296
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(put_internal_status_notices_request)
297
+
298
+ # return_type
299
+ return_type = opts[:debug_return_type]
300
+
301
+ # auth_names
302
+ auth_names = opts[:debug_auth_names] || []
303
+
304
+ new_options = opts.merge(
305
+ :operation => :"HealthApi.put_internal_status_notices",
306
+ :header_params => header_params,
307
+ :query_params => query_params,
308
+ :form_params => form_params,
309
+ :body => post_body,
310
+ :auth_names => auth_names,
311
+ :return_type => return_type
312
+ )
313
+
314
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug "API called: HealthApi#put_internal_status_notices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
317
+ end
318
+ return data, status_code, headers
319
+ end
76
320
  end
77
321
  end
@@ -19,8 +19,8 @@ module SeatsChart
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Extract seat candidates with OpenCV
23
- # Multipart file and optional calibration JSON (sample patches, rotations and grouping); returns source-image pixel coordinates for review. Does not persist seats. Requires CV_SERVICE_URL.
22
+ # Extract seat candidates from a floor-plan image
23
+ # Multipart image (PNG/JPEG/WebP, at most 8 MiB and 16 megapixels). Returns seat centres in source-image pixels for review in the map designer, plus the `mode` that produced them; nothing is persisted. Requires CV_SERVICE_URL. Review (`auto` and `examples`): every seat carries a `confidence` (0-1) and the uncertain ones `doubtful: true`; `review` counts them and the designer shows them for a keep/remove decision instead of keeping them silently. `legibility` is `ok`, `low_resolution` or `no_individual_seats`; when it is not `ok` every seat is doubtful and the count is not reliable. `suggested` lists places where a seat was probably missed (not part of `seats`); the designer offers them in the review. Clicks never remove a seat on weak evidence: a seat they argue against stays, flagged `doubtful`. When the clicked seats (or, without clicks, an illegible plan) are tiny, the scanner reads the plan again upscaled. Vector plans: send the PDF or SVG as `vector` (and `vector_page`) next to its rendered image; the response says whether its geometry was `used`. Modes: `auto` (default) finds the repeated seat glyphs on its own and infers size, rotation and threshold; `examples` uses 1-24 clicked seats (`examples`): a click on a missed seat adds that look, then only detections consistent with the clicked seats (their look, size and spacing, or the same drawn vector shape) stay, plus seats of another look that the scanner is confident about; every clicked seat is kept; `edges` is the legacy contour mode tuned by the `seat_diameter`/`closing_kernel` query parameters. Refinements for `auto` and `examples`: `negatives` (points the user marked as not a seat after a scan) remove that detection and its look-alikes, or the whole style when most of it looks alike; `region` limits the scan to a rectangle. `calibration` (sample patches) and `profile` (the mapa1-mapa6 regression benchmark) are kept for backward compatibility and cannot be combined with `mode`, `examples`, `negatives` or `region`. Errors: 422 for invalid parameters or work budgets, 413/415 for oversized or unsupported images (or a `vector` file that is neither PDF nor SVG), 503 when the scanner is busy or not configured, 504 on its 80-second deadline.
24
24
  # @param post_api_extract_seats_request [PostApiExtractSeatsRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [Float] :seat_diameter
@@ -28,14 +28,14 @@ module SeatsChart
28
28
  # @option opts [Float] :canny_low
29
29
  # @option opts [Float] :canny_high
30
30
  # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
31
- # @return [nil]
31
+ # @return [PostApiExtractSeats200Response]
32
32
  def post_api_extract_seats(post_api_extract_seats_request, opts = {})
33
- post_api_extract_seats_with_http_info(post_api_extract_seats_request, opts)
34
- nil
33
+ data, _status_code, _headers = post_api_extract_seats_with_http_info(post_api_extract_seats_request, opts)
34
+ data
35
35
  end
36
36
 
37
- # Extract seat candidates with OpenCV
38
- # Multipart file and optional calibration JSON (sample patches, rotations and grouping); returns source-image pixel coordinates for review. Does not persist seats. Requires CV_SERVICE_URL.
37
+ # Extract seat candidates from a floor-plan image
38
+ # Multipart image (PNG/JPEG/WebP, at most 8 MiB and 16 megapixels). Returns seat centres in source-image pixels for review in the map designer, plus the &#x60;mode&#x60; that produced them; nothing is persisted. Requires CV_SERVICE_URL. Review (&#x60;auto&#x60; and &#x60;examples&#x60;): every seat carries a &#x60;confidence&#x60; (0-1) and the uncertain ones &#x60;doubtful: true&#x60;; &#x60;review&#x60; counts them and the designer shows them for a keep/remove decision instead of keeping them silently. &#x60;legibility&#x60; is &#x60;ok&#x60;, &#x60;low_resolution&#x60; or &#x60;no_individual_seats&#x60;; when it is not &#x60;ok&#x60; every seat is doubtful and the count is not reliable. &#x60;suggested&#x60; lists places where a seat was probably missed (not part of &#x60;seats&#x60;); the designer offers them in the review. Clicks never remove a seat on weak evidence: a seat they argue against stays, flagged &#x60;doubtful&#x60;. When the clicked seats (or, without clicks, an illegible plan) are tiny, the scanner reads the plan again upscaled. Vector plans: send the PDF or SVG as &#x60;vector&#x60; (and &#x60;vector_page&#x60;) next to its rendered image; the response says whether its geometry was &#x60;used&#x60;. Modes: &#x60;auto&#x60; (default) finds the repeated seat glyphs on its own and infers size, rotation and threshold; &#x60;examples&#x60; uses 1-24 clicked seats (&#x60;examples&#x60;): a click on a missed seat adds that look, then only detections consistent with the clicked seats (their look, size and spacing, or the same drawn vector shape) stay, plus seats of another look that the scanner is confident about; every clicked seat is kept; &#x60;edges&#x60; is the legacy contour mode tuned by the &#x60;seat_diameter&#x60;/&#x60;closing_kernel&#x60; query parameters. Refinements for &#x60;auto&#x60; and &#x60;examples&#x60;: &#x60;negatives&#x60; (points the user marked as not a seat after a scan) remove that detection and its look-alikes, or the whole style when most of it looks alike; &#x60;region&#x60; limits the scan to a rectangle. &#x60;calibration&#x60; (sample patches) and &#x60;profile&#x60; (the mapa1-mapa6 regression benchmark) are kept for backward compatibility and cannot be combined with &#x60;mode&#x60;, &#x60;examples&#x60;, &#x60;negatives&#x60; or &#x60;region&#x60;. Errors: 422 for invalid parameters or work budgets, 413/415 for oversized or unsupported images (or a &#x60;vector&#x60; file that is neither PDF nor SVG), 503 when the scanner is busy or not configured, 504 on its 80-second deadline.
39
39
  # @param post_api_extract_seats_request [PostApiExtractSeatsRequest]
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @option opts [Float] :seat_diameter
@@ -43,7 +43,7 @@ module SeatsChart
43
43
  # @option opts [Float] :canny_low
44
44
  # @option opts [Float] :canny_high
45
45
  # @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
46
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
46
+ # @return [Array<(PostApiExtractSeats200Response, Integer, Hash)>] PostApiExtractSeats200Response data, response status code and response headers
47
47
  def post_api_extract_seats_with_http_info(post_api_extract_seats_request, opts = {})
48
48
  if @api_client.config.debugging
49
49
  @api_client.config.logger.debug 'Calling API: MapDesignerApi.post_api_extract_seats ...'
@@ -96,6 +96,8 @@ module SeatsChart
96
96
 
97
97
  # header parameters
98
98
  header_params = opts[:header_params] || {}
99
+ # HTTP header 'Accept' (if needed)
100
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
99
101
  # HTTP header 'Content-Type'
100
102
  content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
101
103
  if !content_type.nil?
@@ -110,7 +112,7 @@ module SeatsChart
110
112
  post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_extract_seats_request)
111
113
 
112
114
  # return_type
113
- return_type = opts[:debug_return_type]
115
+ return_type = opts[:debug_return_type] || 'PostApiExtractSeats200Response'
114
116
 
115
117
  # auth_names
116
118
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']