svix 1.60.1 → 1.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -1
  3. data/Gemfile.lock +35 -21
  4. data/README.md +0 -7
  5. data/lib/svix/api/application.rb +90 -0
  6. data/lib/svix/api/authentication.rb +61 -0
  7. data/lib/svix/api/background_task.rb +37 -0
  8. data/lib/svix/api/endpoint.rb +185 -0
  9. data/lib/svix/api/environment.rb +37 -0
  10. data/lib/svix/api/event_type.rb +92 -0
  11. data/lib/svix/api/health.rb +20 -0
  12. data/lib/svix/api/ingest_endpoint.rb +100 -0
  13. data/lib/svix/api/integration.rb +84 -0
  14. data/lib/svix/api/message.rb +107 -0
  15. data/lib/svix/api/message_attempt.rb +116 -0
  16. data/lib/svix/api/operational_webhook_endpoint.rb +100 -0
  17. data/lib/svix/api/statistics.rb +34 -0
  18. data/lib/svix/api_error.rb +7 -17
  19. data/lib/svix/errors.rb +9 -9
  20. data/lib/svix/http_error_out.rb +18 -0
  21. data/lib/svix/http_validation_error.rb +18 -0
  22. data/lib/svix/internal.rb +0 -9
  23. data/lib/svix/models/aggregate_event_types_out.rb +32 -292
  24. data/lib/svix/models/app_portal_access_in.rb +31 -278
  25. data/lib/svix/models/app_portal_access_out.rb +27 -243
  26. data/lib/svix/models/app_usage_stats_in.rb +30 -234
  27. data/lib/svix/models/app_usage_stats_out.rb +31 -320
  28. data/lib/svix/models/application_in.rb +31 -298
  29. data/lib/svix/models/application_out.rb +37 -371
  30. data/lib/svix/models/application_patch.rb +31 -272
  31. data/lib/svix/models/application_token_expire_in.rb +28 -219
  32. data/lib/svix/models/background_task_out.rb +31 -307
  33. data/lib/svix/models/background_task_status.rb +14 -25
  34. data/lib/svix/models/background_task_type.rb +23 -26
  35. data/lib/svix/models/connector_in.rb +58 -385
  36. data/lib/svix/models/connector_kind.rb +28 -26
  37. data/lib/svix/models/dashboard_access_out.rb +27 -243
  38. data/lib/svix/models/endpoint_headers_in.rb +25 -202
  39. data/lib/svix/models/endpoint_headers_out.rb +30 -230
  40. data/lib/svix/models/endpoint_headers_patch_in.rb +28 -202
  41. data/lib/svix/models/endpoint_in.rb +65 -449
  42. data/lib/svix/models/endpoint_message_out.rb +48 -467
  43. data/lib/svix/models/endpoint_out.rb +67 -528
  44. data/lib/svix/models/endpoint_patch.rb +61 -383
  45. data/lib/svix/models/endpoint_secret_out.rb +25 -222
  46. data/lib/svix/models/endpoint_secret_rotate_in.rb +28 -212
  47. data/lib/svix/models/endpoint_stats.rb +31 -245
  48. data/lib/svix/models/endpoint_transformation_in.rb +30 -226
  49. data/lib/svix/models/endpoint_transformation_out.rb +30 -228
  50. data/lib/svix/models/endpoint_update.rb +58 -422
  51. data/lib/svix/models/environment_in.rb +31 -212
  52. data/lib/svix/models/environment_out.rb +35 -255
  53. data/lib/svix/models/event_example_in.rb +27 -261
  54. data/lib/svix/models/event_type_from_open_api.rb +35 -341
  55. data/lib/svix/models/event_type_import_open_api_in.rb +37 -228
  56. data/lib/svix/models/event_type_import_open_api_out.rb +28 -200
  57. data/lib/svix/models/event_type_import_open_api_out_data.rb +31 -211
  58. data/lib/svix/models/event_type_in.rb +37 -347
  59. data/lib/svix/models/event_type_out.rb +58 -389
  60. data/lib/svix/models/event_type_patch.rb +35 -289
  61. data/lib/svix/models/event_type_update.rb +35 -301
  62. data/lib/svix/models/expung_all_contents_out.rb +29 -292
  63. data/lib/svix/models/expunge_all_contents_out.rb +55 -0
  64. data/lib/svix/models/ingest_endpoint_headers_in.rb +49 -0
  65. data/lib/svix/models/ingest_endpoint_headers_out.rb +52 -0
  66. data/lib/svix/models/ingest_endpoint_in.rb +64 -0
  67. data/lib/svix/models/ingest_endpoint_out.rb +70 -0
  68. data/lib/svix/models/ingest_endpoint_secret_in.rb +49 -0
  69. data/lib/svix/models/ingest_endpoint_secret_out.rb +49 -0
  70. data/lib/svix/models/ingest_endpoint_update.rb +61 -0
  71. data/lib/svix/models/integration_in.rb +27 -239
  72. data/lib/svix/models/integration_key_out.rb +25 -200
  73. data/lib/svix/models/integration_out.rb +33 -324
  74. data/lib/svix/models/integration_update.rb +27 -239
  75. data/lib/svix/models/list_response_application_out.rb +34 -237
  76. data/lib/svix/models/list_response_background_task_out.rb +34 -237
  77. data/lib/svix/models/list_response_endpoint_message_out.rb +34 -237
  78. data/lib/svix/models/list_response_endpoint_out.rb +34 -237
  79. data/lib/svix/models/list_response_event_type_out.rb +34 -237
  80. data/lib/svix/models/list_response_ingest_endpoint_out.rb +58 -0
  81. data/lib/svix/models/list_response_integration_out.rb +34 -237
  82. data/lib/svix/models/list_response_message_attempt_out.rb +34 -237
  83. data/lib/svix/models/list_response_message_endpoint_out.rb +34 -237
  84. data/lib/svix/models/list_response_message_out.rb +34 -237
  85. data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +34 -237
  86. data/lib/svix/models/message_attempt_out.rb +64 -521
  87. data/lib/svix/models/message_attempt_trigger_type.rb +20 -28
  88. data/lib/svix/models/message_endpoint_out.rb +70 -557
  89. data/lib/svix/models/message_in.rb +58 -450
  90. data/lib/svix/models/message_out.rb +37 -414
  91. data/lib/svix/models/message_status.rb +24 -30
  92. data/lib/svix/models/operational_webhook_endpoint_headers_in.rb +28 -202
  93. data/lib/svix/models/operational_webhook_endpoint_headers_out.rb +30 -229
  94. data/lib/svix/models/operational_webhook_endpoint_in.rb +42 -380
  95. data/lib/svix/models/operational_webhook_endpoint_out.rb +64 -458
  96. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +28 -212
  97. data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +28 -222
  98. data/lib/svix/models/operational_webhook_endpoint_update.rb +40 -353
  99. data/lib/svix/models/ordering.rb +15 -25
  100. data/lib/svix/models/recover_in.rb +28 -210
  101. data/lib/svix/models/recover_out.rb +29 -292
  102. data/lib/svix/models/replay_in.rb +28 -210
  103. data/lib/svix/models/replay_out.rb +29 -292
  104. data/lib/svix/models/status_code_class.rb +28 -32
  105. data/lib/svix/models/template_out.rb +70 -514
  106. data/lib/svix/svix.rb +50 -50
  107. data/lib/svix/svix_http_client.rb +110 -0
  108. data/lib/svix/util.rb +44 -25
  109. data/lib/svix/validation_error.rb +28 -0
  110. data/lib/svix/version.rb +1 -1
  111. data/lib/svix/webhook.rb +69 -65
  112. data/lib/svix.rb +60 -37
  113. data/svix.gemspec +1 -10
  114. data/templates/api_extra/application_create.rb +16 -0
  115. data/templates/api_extra/message.rb +26 -0
  116. data/templates/api_resource.rb.jinja +71 -0
  117. data/templates/component_type.rb.jinja +7 -0
  118. data/templates/summary.rb.jinja +41 -0
  119. data/templates/types/integer_enum.rb.jinja +37 -0
  120. data/templates/types/string_enum.rb.jinja +37 -0
  121. data/templates/types/struct.rb.jinja +87 -0
  122. metadata +40 -194
  123. data/lib/svix/api/application_api.rb +0 -772
  124. data/lib/svix/api/authentication_api.rb +0 -791
  125. data/lib/svix/api/background_tasks_api.rb +0 -191
  126. data/lib/svix/api/broadcast_api.rb +0 -93
  127. data/lib/svix/api/endpoint_api.rb +0 -2752
  128. data/lib/svix/api/environment_api.rb +0 -153
  129. data/lib/svix/api/environment_settings_api.rb +0 -79
  130. data/lib/svix/api/event_type_api.rb +0 -852
  131. data/lib/svix/api/events_api.rb +0 -102
  132. data/lib/svix/api/health_api.rb +0 -79
  133. data/lib/svix/api/inbound_api.rb +0 -209
  134. data/lib/svix/api/integration_api.rb +0 -707
  135. data/lib/svix/api/message_api.rb +0 -1192
  136. data/lib/svix/api/message_attempt_api.rb +0 -1245
  137. data/lib/svix/api/statistics_api.rb +0 -333
  138. data/lib/svix/api/stream_api.rb +0 -659
  139. data/lib/svix/api/stream_event_types_api.rb +0 -486
  140. data/lib/svix/api/transformation_template_api.rb +0 -967
  141. data/lib/svix/api/webhook_endpoint_api.rb +0 -748
  142. data/lib/svix/api_client.rb +0 -423
  143. data/lib/svix/application_api.rb +0 -35
  144. data/lib/svix/authentication_api.rb +0 -21
  145. data/lib/svix/background_tasks_api.rb +0 -17
  146. data/lib/svix/configuration.rb +0 -312
  147. data/lib/svix/endpoint_api.rb +0 -80
  148. data/lib/svix/event_type_api.rb +0 -37
  149. data/lib/svix/integration_api.rb +0 -38
  150. data/lib/svix/message_api.rb +0 -54
  151. data/lib/svix/message_attempt_api.rb +0 -51
  152. data/lib/svix/models/active_application_out.rb +0 -373
  153. data/lib/svix/models/active_endpoint_out.rb +0 -355
  154. data/lib/svix/models/aggregated_event_types.rb +0 -305
  155. data/lib/svix/models/application_message_failure.rb +0 -277
  156. data/lib/svix/models/application_message_id_pair.rb +0 -317
  157. data/lib/svix/models/application_stats.rb +0 -323
  158. data/lib/svix/models/application_stats_out.rb +0 -324
  159. data/lib/svix/models/attempt_statistics_data.rb +0 -229
  160. data/lib/svix/models/attempt_statistics_response.rb +0 -291
  161. data/lib/svix/models/auth_token_out.rb +0 -325
  162. data/lib/svix/models/azure_blob_storage_config.rb +0 -253
  163. data/lib/svix/models/background_task_finished_event.rb +0 -272
  164. data/lib/svix/models/background_task_finished_event2.rb +0 -331
  165. data/lib/svix/models/big_query_config.rb +0 -271
  166. data/lib/svix/models/border_radius_config.rb +0 -254
  167. data/lib/svix/models/border_radius_enum.rb +0 -43
  168. data/lib/svix/models/client_secret_jwt_params_in.rb +0 -297
  169. data/lib/svix/models/completion_choice.rb +0 -253
  170. data/lib/svix/models/completion_message.rb +0 -237
  171. data/lib/svix/models/count_out.rb +0 -258
  172. data/lib/svix/models/create_stream_in.rb +0 -232
  173. data/lib/svix/models/create_token_in.rb +0 -248
  174. data/lib/svix/models/custom_color_palette.rb +0 -295
  175. data/lib/svix/models/custom_strings_override.rb +0 -235
  176. data/lib/svix/models/custom_theme_override.rb +0 -223
  177. data/lib/svix/models/data.rb +0 -108
  178. data/lib/svix/models/data_any_of.rb +0 -240
  179. data/lib/svix/models/data_any_of1.rb +0 -223
  180. data/lib/svix/models/data_any_of2.rb +0 -241
  181. data/lib/svix/models/data_any_of3.rb +0 -223
  182. data/lib/svix/models/data_any_of4.rb +0 -240
  183. data/lib/svix/models/duration.rb +0 -275
  184. data/lib/svix/models/endpoint_created_event.rb +0 -272
  185. data/lib/svix/models/endpoint_created_event_data.rb +0 -410
  186. data/lib/svix/models/endpoint_deleted_event.rb +0 -272
  187. data/lib/svix/models/endpoint_deleted_event_data.rb +0 -410
  188. data/lib/svix/models/endpoint_disabled_event.rb +0 -272
  189. data/lib/svix/models/endpoint_disabled_event_data.rb +0 -451
  190. data/lib/svix/models/endpoint_disabled_trigger.rb +0 -40
  191. data/lib/svix/models/endpoint_enabled_event.rb +0 -272
  192. data/lib/svix/models/endpoint_enabled_event_data.rb +0 -410
  193. data/lib/svix/models/endpoint_mtls_config_in.rb +0 -233
  194. data/lib/svix/models/endpoint_mtls_config_out.rb +0 -215
  195. data/lib/svix/models/endpoint_oauth_config_in.rb +0 -350
  196. data/lib/svix/models/endpoint_oauth_config_out.rb +0 -315
  197. data/lib/svix/models/endpoint_transformation_simulate_in.rb +0 -330
  198. data/lib/svix/models/endpoint_transformation_simulate_out.rb +0 -296
  199. data/lib/svix/models/endpoint_updated_event.rb +0 -272
  200. data/lib/svix/models/endpoint_updated_event_data.rb +0 -410
  201. data/lib/svix/models/environment_settings_out.rb +0 -455
  202. data/lib/svix/models/event_in.rb +0 -258
  203. data/lib/svix/models/event_out.rb +0 -274
  204. data/lib/svix/models/event_stream_out.rb +0 -255
  205. data/lib/svix/models/event_type_example_out.rb +0 -221
  206. data/lib/svix/models/event_type_schema_in.rb +0 -221
  207. data/lib/svix/models/export_event_type_out.rb +0 -315
  208. data/lib/svix/models/font_size_config.rb +0 -230
  209. data/lib/svix/models/generate_in.rb +0 -221
  210. data/lib/svix/models/generate_out.rb +0 -287
  211. data/lib/svix/models/google_cloud_storage_config.rb +0 -239
  212. data/lib/svix/models/http_error_out.rb +0 -237
  213. data/lib/svix/models/http_validation_error.rb +0 -223
  214. data/lib/svix/models/hubspot_oauth_config_in.rb +0 -221
  215. data/lib/svix/models/inbound_path_params.rb +0 -277
  216. data/lib/svix/models/incoming_webhook_payload_out.rb +0 -235
  217. data/lib/svix/models/kafka_security_protocol_type.rb +0 -41
  218. data/lib/svix/models/list_response_active_application_out.rb +0 -261
  219. data/lib/svix/models/list_response_application_stats.rb +0 -261
  220. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +0 -261
  221. data/lib/svix/models/list_response_sink_out.rb +0 -261
  222. data/lib/svix/models/list_response_stream_event_type_out.rb +0 -261
  223. data/lib/svix/models/list_response_stream_out.rb +0 -261
  224. data/lib/svix/models/list_response_stream_sink_out.rb +0 -261
  225. data/lib/svix/models/list_response_template_out.rb +0 -261
  226. data/lib/svix/models/message_attempt_endpoint_out.rb +0 -545
  227. data/lib/svix/models/message_attempt_exhausted_event.rb +0 -272
  228. data/lib/svix/models/message_attempt_exhausted_event_data.rb +0 -482
  229. data/lib/svix/models/message_attempt_failed_data.rb +0 -293
  230. data/lib/svix/models/message_attempt_failing_event.rb +0 -272
  231. data/lib/svix/models/message_attempt_failing_event_data.rb +0 -482
  232. data/lib/svix/models/message_attempt_headers_out.rb +0 -263
  233. data/lib/svix/models/message_attempt_recovered_event.rb +0 -272
  234. data/lib/svix/models/message_attempt_recovered_event_data.rb +0 -482
  235. data/lib/svix/models/message_broadcast_in.rb +0 -423
  236. data/lib/svix/models/message_broadcast_out.rb +0 -315
  237. data/lib/svix/models/message_events_out.rb +0 -255
  238. data/lib/svix/models/message_precheck_in.rb +0 -288
  239. data/lib/svix/models/message_precheck_out.rb +0 -221
  240. data/lib/svix/models/message_raw_payload_out.rb +0 -221
  241. data/lib/svix/models/message_subscriber_auth_token_out.rb +0 -237
  242. data/lib/svix/models/o_auth_payload_in.rb +0 -237
  243. data/lib/svix/models/o_auth_payload_out.rb +0 -235
  244. data/lib/svix/models/oauth2_auth_method_in_out.rb +0 -41
  245. data/lib/svix/models/oauth2_grant_type_in_out.rb +0 -40
  246. data/lib/svix/models/oauth_jws_signing_algorithm.rb +0 -39
  247. data/lib/svix/models/one_time_token_in.rb +0 -221
  248. data/lib/svix/models/one_time_token_out.rb +0 -221
  249. data/lib/svix/models/polling_endpoint_message_out.rb +0 -454
  250. data/lib/svix/models/polling_endpoint_out.rb +0 -255
  251. data/lib/svix/models/redshift_config.rb +0 -317
  252. data/lib/svix/models/retry_schedule_in_out.rb +0 -216
  253. data/lib/svix/models/rotate_poller_token_in.rb +0 -280
  254. data/lib/svix/models/rotated_url_out.rb +0 -221
  255. data/lib/svix/models/s3_config.rb +0 -269
  256. data/lib/svix/models/sink_http_config.rb +0 -242
  257. data/lib/svix/models/sink_in.rb +0 -108
  258. data/lib/svix/models/sink_in_one_of.rb +0 -287
  259. data/lib/svix/models/sink_in_one_of1.rb +0 -319
  260. data/lib/svix/models/sink_in_one_of2.rb +0 -325
  261. data/lib/svix/models/sink_in_one_of3.rb +0 -271
  262. data/lib/svix/models/sink_in_one_of4.rb +0 -255
  263. data/lib/svix/models/sink_otel_v1_config.rb +0 -221
  264. data/lib/svix/models/sink_out.rb +0 -108
  265. data/lib/svix/models/sink_payload_format.rb +0 -39
  266. data/lib/svix/models/sink_secret_out.rb +0 -233
  267. data/lib/svix/models/sink_status.rb +0 -41
  268. data/lib/svix/models/sink_status_in.rb +0 -40
  269. data/lib/svix/models/sink_transform_in.rb +0 -248
  270. data/lib/svix/models/sink_transformation_out.rb +0 -226
  271. data/lib/svix/models/snowflake_config.rb +0 -287
  272. data/lib/svix/models/statistics_period.rb +0 -40
  273. data/lib/svix/models/stream_event_type_in.rb +0 -262
  274. data/lib/svix/models/stream_event_type_out.rb +0 -294
  275. data/lib/svix/models/stream_event_type_patch.rb +0 -254
  276. data/lib/svix/models/stream_in.rb +0 -287
  277. data/lib/svix/models/stream_out.rb +0 -350
  278. data/lib/svix/models/stream_patch.rb +0 -261
  279. data/lib/svix/models/stream_portal_access_in.rb +0 -293
  280. data/lib/svix/models/stream_sink_in.rb +0 -111
  281. data/lib/svix/models/stream_sink_in_one_of.rb +0 -271
  282. data/lib/svix/models/stream_sink_in_one_of1.rb +0 -271
  283. data/lib/svix/models/stream_sink_in_one_of2.rb +0 -271
  284. data/lib/svix/models/stream_sink_in_one_of3.rb +0 -271
  285. data/lib/svix/models/stream_sink_in_one_of4.rb +0 -271
  286. data/lib/svix/models/stream_sink_in_one_of5.rb +0 -271
  287. data/lib/svix/models/stream_sink_in_one_of6.rb +0 -271
  288. data/lib/svix/models/stream_sink_in_one_of7.rb +0 -271
  289. data/lib/svix/models/stream_sink_out.rb +0 -111
  290. data/lib/svix/models/stream_sink_patch.rb +0 -111
  291. data/lib/svix/models/template_patch.rb +0 -382
  292. data/lib/svix/models/template_update.rb +0 -402
  293. data/lib/svix/models/transformation_http_method.rb +0 -41
  294. data/lib/svix/models/transformation_simulate_in.rb +0 -330
  295. data/lib/svix/models/transformation_simulate_out.rb +0 -296
  296. data/lib/svix/models/validation_error.rb +0 -259
  297. data/lib/svix/statistics_api.rb +0 -17
@@ -1,791 +0,0 @@
1
- =begin
2
- #Svix API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 1.1.1
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Svix
16
- class AuthenticationApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Get Consumer App Portal Access
23
- # Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
24
- # @param app_id [String] The Application's ID or UID.
25
- # @param app_portal_access_in [AppPortalAccessIn]
26
- # @param [Hash] opts the optional parameters
27
- # @option opts [String] :idempotency_key The request's idempotency key
28
- # @return [AppPortalAccessOut]
29
- def v1_authentication_app_portal_access(app_id, app_portal_access_in, opts = {})
30
- data, _status_code, _headers = v1_authentication_app_portal_access_with_http_info(app_id, app_portal_access_in, opts)
31
- data
32
- end
33
-
34
- # Get Consumer App Portal Access
35
- # Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
36
- # @param app_id [String] The Application's ID or UID.
37
- # @param app_portal_access_in [AppPortalAccessIn]
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :idempotency_key The request's idempotency key
40
- # @return [Array<(AppPortalAccessOut, Integer, Hash)>] AppPortalAccessOut data, response status code and response headers
41
- def v1_authentication_app_portal_access_with_http_info(app_id, app_portal_access_in, opts = {})
42
- if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_app_portal_access ...'
44
- end
45
- # verify the required parameter 'app_id' is set
46
- if @api_client.config.client_side_validation && app_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_app_portal_access"
48
- end
49
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
50
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_app_portal_access, the character length must be smaller than or equal to 256.'
51
- end
52
-
53
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
54
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_app_portal_access, the character length must be great than or equal to 1.'
55
- end
56
-
57
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
58
- if @api_client.config.client_side_validation && app_id !~ pattern
59
- fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_app_portal_access, must conform to the pattern #{pattern}."
60
- end
61
-
62
- # verify the required parameter 'app_portal_access_in' is set
63
- if @api_client.config.client_side_validation && app_portal_access_in.nil?
64
- fail ArgumentError, "Missing the required parameter 'app_portal_access_in' when calling AuthenticationApi.v1_authentication_app_portal_access"
65
- end
66
- # resource path
67
- local_var_path = '/api/v1/auth/app-portal-access/{app_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
68
-
69
- # query parameters
70
- query_params = opts[:query_params] || {}
71
-
72
- # header parameters
73
- header_params = opts[:header_params] || {}
74
- # HTTP header 'Accept' (if needed)
75
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
76
- # HTTP header 'Content-Type'
77
- content_type = @api_client.select_header_content_type(['application/json'])
78
- if !content_type.nil?
79
- header_params['Content-Type'] = content_type
80
- end
81
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
82
-
83
- # form parameters
84
- form_params = opts[:form_params] || {}
85
-
86
- # http body (model)
87
- post_body = opts[:debug_body] || @api_client.object_to_http_body(app_portal_access_in)
88
-
89
- # return_type
90
- return_type = opts[:debug_return_type] || 'AppPortalAccessOut'
91
-
92
- # auth_names
93
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
94
-
95
- new_options = opts.merge(
96
- :operation => :"AuthenticationApi.v1_authentication_app_portal_access",
97
- :header_params => header_params,
98
- :query_params => query_params,
99
- :form_params => form_params,
100
- :body => post_body,
101
- :auth_names => auth_names,
102
- :return_type => return_type
103
- )
104
-
105
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
106
- if @api_client.config.debugging
107
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_app_portal_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
- end
109
- return data, status_code, headers
110
- end
111
-
112
- # Create Cmg Token
113
- # Create a new access token that only allows creating messages inside this application.
114
- # @param app_id [String] The Application&#39;s ID or UID.
115
- # @param create_token_in [CreateTokenIn]
116
- # @param [Hash] opts the optional parameters
117
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
118
- # @return [AuthTokenOut]
119
- def v1_authentication_create_message_token(app_id, create_token_in, opts = {})
120
- data, _status_code, _headers = v1_authentication_create_message_token_with_http_info(app_id, create_token_in, opts)
121
- data
122
- end
123
-
124
- # Create Cmg Token
125
- # Create a new access token that only allows creating messages inside this application.
126
- # @param app_id [String] The Application&#39;s ID or UID.
127
- # @param create_token_in [CreateTokenIn]
128
- # @param [Hash] opts the optional parameters
129
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
130
- # @return [Array<(AuthTokenOut, Integer, Hash)>] AuthTokenOut data, response status code and response headers
131
- def v1_authentication_create_message_token_with_http_info(app_id, create_token_in, opts = {})
132
- if @api_client.config.debugging
133
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_create_message_token ...'
134
- end
135
- # verify the required parameter 'app_id' is set
136
- if @api_client.config.client_side_validation && app_id.nil?
137
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_create_message_token"
138
- end
139
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
140
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_create_message_token, the character length must be smaller than or equal to 256.'
141
- end
142
-
143
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
144
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_create_message_token, the character length must be great than or equal to 1.'
145
- end
146
-
147
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
148
- if @api_client.config.client_side_validation && app_id !~ pattern
149
- fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_create_message_token, must conform to the pattern #{pattern}."
150
- end
151
-
152
- # verify the required parameter 'create_token_in' is set
153
- if @api_client.config.client_side_validation && create_token_in.nil?
154
- fail ArgumentError, "Missing the required parameter 'create_token_in' when calling AuthenticationApi.v1_authentication_create_message_token"
155
- end
156
- # resource path
157
- local_var_path = '/api/v1/auth/app/{app_id}/create-message-token'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
158
-
159
- # query parameters
160
- query_params = opts[:query_params] || {}
161
-
162
- # header parameters
163
- header_params = opts[:header_params] || {}
164
- # HTTP header 'Accept' (if needed)
165
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
166
- # HTTP header 'Content-Type'
167
- content_type = @api_client.select_header_content_type(['application/json'])
168
- if !content_type.nil?
169
- header_params['Content-Type'] = content_type
170
- end
171
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
172
-
173
- # form parameters
174
- form_params = opts[:form_params] || {}
175
-
176
- # http body (model)
177
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_token_in)
178
-
179
- # return_type
180
- return_type = opts[:debug_return_type] || 'AuthTokenOut'
181
-
182
- # auth_names
183
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
184
-
185
- new_options = opts.merge(
186
- :operation => :"AuthenticationApi.v1_authentication_create_message_token",
187
- :header_params => header_params,
188
- :query_params => query_params,
189
- :form_params => form_params,
190
- :body => post_body,
191
- :auth_names => auth_names,
192
- :return_type => return_type
193
- )
194
-
195
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
196
- if @api_client.config.debugging
197
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_create_message_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
- end
199
- return data, status_code, headers
200
- end
201
-
202
- # Dashboard Access
203
- # DEPRECATED: Please use `app-portal-access` instead. Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
204
- # @param app_id [String] The Application&#39;s ID or UID.
205
- # @param [Hash] opts the optional parameters
206
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
207
- # @return [DashboardAccessOut]
208
- def v1_authentication_dashboard_access(app_id, opts = {})
209
- data, _status_code, _headers = v1_authentication_dashboard_access_with_http_info(app_id, opts)
210
- data
211
- end
212
-
213
- # Dashboard Access
214
- # DEPRECATED: Please use &#x60;app-portal-access&#x60; instead. Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.
215
- # @param app_id [String] The Application&#39;s ID or UID.
216
- # @param [Hash] opts the optional parameters
217
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
218
- # @return [Array<(DashboardAccessOut, Integer, Hash)>] DashboardAccessOut data, response status code and response headers
219
- def v1_authentication_dashboard_access_with_http_info(app_id, opts = {})
220
- if @api_client.config.debugging
221
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_dashboard_access ...'
222
- end
223
- # verify the required parameter 'app_id' is set
224
- if @api_client.config.client_side_validation && app_id.nil?
225
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_dashboard_access"
226
- end
227
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
228
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_dashboard_access, the character length must be smaller than or equal to 256.'
229
- end
230
-
231
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
232
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_dashboard_access, the character length must be great than or equal to 1.'
233
- end
234
-
235
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
236
- if @api_client.config.client_side_validation && app_id !~ pattern
237
- fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_dashboard_access, must conform to the pattern #{pattern}."
238
- end
239
-
240
- # resource path
241
- local_var_path = '/api/v1/auth/dashboard-access/{app_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
242
-
243
- # query parameters
244
- query_params = opts[:query_params] || {}
245
-
246
- # header parameters
247
- header_params = opts[:header_params] || {}
248
- # HTTP header 'Accept' (if needed)
249
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
250
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
251
-
252
- # form parameters
253
- form_params = opts[:form_params] || {}
254
-
255
- # http body (model)
256
- post_body = opts[:debug_body]
257
-
258
- # return_type
259
- return_type = opts[:debug_return_type] || 'DashboardAccessOut'
260
-
261
- # auth_names
262
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
263
-
264
- new_options = opts.merge(
265
- :operation => :"AuthenticationApi.v1_authentication_dashboard_access",
266
- :header_params => header_params,
267
- :query_params => query_params,
268
- :form_params => form_params,
269
- :body => post_body,
270
- :auth_names => auth_names,
271
- :return_type => return_type
272
- )
273
-
274
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
275
- if @api_client.config.debugging
276
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_dashboard_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
277
- end
278
- return data, status_code, headers
279
- end
280
-
281
- # Exchange One Time Token
282
- # This is a one time token.
283
- # @param one_time_token_in [OneTimeTokenIn]
284
- # @param [Hash] opts the optional parameters
285
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
286
- # @return [OneTimeTokenOut]
287
- def v1_authentication_exchange_one_time_token(one_time_token_in, opts = {})
288
- data, _status_code, _headers = v1_authentication_exchange_one_time_token_with_http_info(one_time_token_in, opts)
289
- data
290
- end
291
-
292
- # Exchange One Time Token
293
- # This is a one time token.
294
- # @param one_time_token_in [OneTimeTokenIn]
295
- # @param [Hash] opts the optional parameters
296
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
297
- # @return [Array<(OneTimeTokenOut, Integer, Hash)>] OneTimeTokenOut data, response status code and response headers
298
- def v1_authentication_exchange_one_time_token_with_http_info(one_time_token_in, opts = {})
299
- if @api_client.config.debugging
300
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_exchange_one_time_token ...'
301
- end
302
- # verify the required parameter 'one_time_token_in' is set
303
- if @api_client.config.client_side_validation && one_time_token_in.nil?
304
- fail ArgumentError, "Missing the required parameter 'one_time_token_in' when calling AuthenticationApi.v1_authentication_exchange_one_time_token"
305
- end
306
- # resource path
307
- local_var_path = '/api/v1/auth/one-time-token'
308
-
309
- # query parameters
310
- query_params = opts[:query_params] || {}
311
-
312
- # header parameters
313
- header_params = opts[:header_params] || {}
314
- # HTTP header 'Accept' (if needed)
315
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
316
- # HTTP header 'Content-Type'
317
- content_type = @api_client.select_header_content_type(['application/json'])
318
- if !content_type.nil?
319
- header_params['Content-Type'] = content_type
320
- end
321
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
322
-
323
- # form parameters
324
- form_params = opts[:form_params] || {}
325
-
326
- # http body (model)
327
- post_body = opts[:debug_body] || @api_client.object_to_http_body(one_time_token_in)
328
-
329
- # return_type
330
- return_type = opts[:debug_return_type] || 'OneTimeTokenOut'
331
-
332
- # auth_names
333
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
334
-
335
- new_options = opts.merge(
336
- :operation => :"AuthenticationApi.v1_authentication_exchange_one_time_token",
337
- :header_params => header_params,
338
- :query_params => query_params,
339
- :form_params => form_params,
340
- :body => post_body,
341
- :auth_names => auth_names,
342
- :return_type => return_type
343
- )
344
-
345
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
346
- if @api_client.config.debugging
347
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_exchange_one_time_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
348
- end
349
- return data, status_code, headers
350
- end
351
-
352
- # Expire All
353
- # Expire all of the tokens associated with a specific application.
354
- # @param app_id [String] The Application&#39;s ID or UID.
355
- # @param application_token_expire_in [ApplicationTokenExpireIn]
356
- # @param [Hash] opts the optional parameters
357
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
358
- # @return [nil]
359
- def v1_authentication_expire_all(app_id, application_token_expire_in, opts = {})
360
- v1_authentication_expire_all_with_http_info(app_id, application_token_expire_in, opts)
361
- nil
362
- end
363
-
364
- # Expire All
365
- # Expire all of the tokens associated with a specific application.
366
- # @param app_id [String] The Application&#39;s ID or UID.
367
- # @param application_token_expire_in [ApplicationTokenExpireIn]
368
- # @param [Hash] opts the optional parameters
369
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
370
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
371
- def v1_authentication_expire_all_with_http_info(app_id, application_token_expire_in, opts = {})
372
- if @api_client.config.debugging
373
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_expire_all ...'
374
- end
375
- # verify the required parameter 'app_id' is set
376
- if @api_client.config.client_side_validation && app_id.nil?
377
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_expire_all"
378
- end
379
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
380
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_expire_all, the character length must be smaller than or equal to 256.'
381
- end
382
-
383
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
384
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_expire_all, the character length must be great than or equal to 1.'
385
- end
386
-
387
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
388
- if @api_client.config.client_side_validation && app_id !~ pattern
389
- fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_expire_all, must conform to the pattern #{pattern}."
390
- end
391
-
392
- # verify the required parameter 'application_token_expire_in' is set
393
- if @api_client.config.client_side_validation && application_token_expire_in.nil?
394
- fail ArgumentError, "Missing the required parameter 'application_token_expire_in' when calling AuthenticationApi.v1_authentication_expire_all"
395
- end
396
- # resource path
397
- local_var_path = '/api/v1/auth/app/{app_id}/expire-all'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
398
-
399
- # query parameters
400
- query_params = opts[:query_params] || {}
401
-
402
- # header parameters
403
- header_params = opts[:header_params] || {}
404
- # HTTP header 'Accept' (if needed)
405
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
406
- # HTTP header 'Content-Type'
407
- content_type = @api_client.select_header_content_type(['application/json'])
408
- if !content_type.nil?
409
- header_params['Content-Type'] = content_type
410
- end
411
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
412
-
413
- # form parameters
414
- form_params = opts[:form_params] || {}
415
-
416
- # http body (model)
417
- post_body = opts[:debug_body] || @api_client.object_to_http_body(application_token_expire_in)
418
-
419
- # return_type
420
- return_type = opts[:debug_return_type]
421
-
422
- # auth_names
423
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
424
-
425
- new_options = opts.merge(
426
- :operation => :"AuthenticationApi.v1_authentication_expire_all",
427
- :header_params => header_params,
428
- :query_params => query_params,
429
- :form_params => form_params,
430
- :body => post_body,
431
- :auth_names => auth_names,
432
- :return_type => return_type
433
- )
434
-
435
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
436
- if @api_client.config.debugging
437
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_expire_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
- end
439
- return data, status_code, headers
440
- end
441
-
442
- # Get Poller Token
443
- # Get the current auth token for the poller.
444
- # @param app_id [String] The Application&#39;s ID or UID.
445
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
446
- # @param [Hash] opts the optional parameters
447
- # @return [AuthTokenOut]
448
- def v1_authentication_get_poller_token(app_id, endpoint_id, opts = {})
449
- data, _status_code, _headers = v1_authentication_get_poller_token_with_http_info(app_id, endpoint_id, opts)
450
- data
451
- end
452
-
453
- # Get Poller Token
454
- # Get the current auth token for the poller.
455
- # @param app_id [String] The Application&#39;s ID or UID.
456
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
457
- # @param [Hash] opts the optional parameters
458
- # @return [Array<(AuthTokenOut, Integer, Hash)>] AuthTokenOut data, response status code and response headers
459
- def v1_authentication_get_poller_token_with_http_info(app_id, endpoint_id, opts = {})
460
- if @api_client.config.debugging
461
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_get_poller_token ...'
462
- end
463
- # verify the required parameter 'app_id' is set
464
- if @api_client.config.client_side_validation && app_id.nil?
465
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_get_poller_token"
466
- end
467
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
468
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_get_poller_token, the character length must be smaller than or equal to 256.'
469
- end
470
-
471
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
472
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_get_poller_token, the character length must be great than or equal to 1.'
473
- end
474
-
475
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
476
- if @api_client.config.client_side_validation && app_id !~ pattern
477
- fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_get_poller_token, must conform to the pattern #{pattern}."
478
- end
479
-
480
- # verify the required parameter 'endpoint_id' is set
481
- if @api_client.config.client_side_validation && endpoint_id.nil?
482
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling AuthenticationApi.v1_authentication_get_poller_token"
483
- end
484
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
485
- fail ArgumentError, 'invalid value for "endpoint_id" when calling AuthenticationApi.v1_authentication_get_poller_token, the character length must be smaller than or equal to 256.'
486
- end
487
-
488
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
489
- fail ArgumentError, 'invalid value for "endpoint_id" when calling AuthenticationApi.v1_authentication_get_poller_token, the character length must be great than or equal to 1.'
490
- end
491
-
492
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
493
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
494
- fail ArgumentError, "invalid value for 'endpoint_id' when calling AuthenticationApi.v1_authentication_get_poller_token, must conform to the pattern #{pattern}."
495
- end
496
-
497
- # resource path
498
- local_var_path = '/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
499
-
500
- # query parameters
501
- query_params = opts[:query_params] || {}
502
-
503
- # header parameters
504
- header_params = opts[:header_params] || {}
505
- # HTTP header 'Accept' (if needed)
506
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
507
-
508
- # form parameters
509
- form_params = opts[:form_params] || {}
510
-
511
- # http body (model)
512
- post_body = opts[:debug_body]
513
-
514
- # return_type
515
- return_type = opts[:debug_return_type] || 'AuthTokenOut'
516
-
517
- # auth_names
518
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
519
-
520
- new_options = opts.merge(
521
- :operation => :"AuthenticationApi.v1_authentication_get_poller_token",
522
- :header_params => header_params,
523
- :query_params => query_params,
524
- :form_params => form_params,
525
- :body => post_body,
526
- :auth_names => auth_names,
527
- :return_type => return_type
528
- )
529
-
530
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
531
- if @api_client.config.debugging
532
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_get_poller_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
533
- end
534
- return data, status_code, headers
535
- end
536
-
537
- # Logout
538
- # Logout an app token. Trying to log out other tokens will fail.
539
- # @param [Hash] opts the optional parameters
540
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
541
- # @return [nil]
542
- def v1_authentication_logout(opts = {})
543
- v1_authentication_logout_with_http_info(opts)
544
- nil
545
- end
546
-
547
- # Logout
548
- # Logout an app token. Trying to log out other tokens will fail.
549
- # @param [Hash] opts the optional parameters
550
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
551
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
552
- def v1_authentication_logout_with_http_info(opts = {})
553
- if @api_client.config.debugging
554
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_logout ...'
555
- end
556
- # resource path
557
- local_var_path = '/api/v1/auth/logout'
558
-
559
- # query parameters
560
- query_params = opts[:query_params] || {}
561
-
562
- # header parameters
563
- header_params = opts[:header_params] || {}
564
- # HTTP header 'Accept' (if needed)
565
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
566
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
567
-
568
- # form parameters
569
- form_params = opts[:form_params] || {}
570
-
571
- # http body (model)
572
- post_body = opts[:debug_body]
573
-
574
- # return_type
575
- return_type = opts[:debug_return_type]
576
-
577
- # auth_names
578
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
579
-
580
- new_options = opts.merge(
581
- :operation => :"AuthenticationApi.v1_authentication_logout",
582
- :header_params => header_params,
583
- :query_params => query_params,
584
- :form_params => form_params,
585
- :body => post_body,
586
- :auth_names => auth_names,
587
- :return_type => return_type
588
- )
589
-
590
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
591
- if @api_client.config.debugging
592
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
593
- end
594
- return data, status_code, headers
595
- end
596
-
597
- # Rotate Poller Token
598
- # Create a new auth token that can for the poller API.
599
- # @param app_id [String] The Application&#39;s ID or UID.
600
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
601
- # @param rotate_poller_token_in [RotatePollerTokenIn]
602
- # @param [Hash] opts the optional parameters
603
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
604
- # @return [AuthTokenOut]
605
- def v1_authentication_rotate_poller_token(app_id, endpoint_id, rotate_poller_token_in, opts = {})
606
- data, _status_code, _headers = v1_authentication_rotate_poller_token_with_http_info(app_id, endpoint_id, rotate_poller_token_in, opts)
607
- data
608
- end
609
-
610
- # Rotate Poller Token
611
- # Create a new auth token that can for the poller API.
612
- # @param app_id [String] The Application&#39;s ID or UID.
613
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
614
- # @param rotate_poller_token_in [RotatePollerTokenIn]
615
- # @param [Hash] opts the optional parameters
616
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
617
- # @return [Array<(AuthTokenOut, Integer, Hash)>] AuthTokenOut data, response status code and response headers
618
- def v1_authentication_rotate_poller_token_with_http_info(app_id, endpoint_id, rotate_poller_token_in, opts = {})
619
- if @api_client.config.debugging
620
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_rotate_poller_token ...'
621
- end
622
- # verify the required parameter 'app_id' is set
623
- if @api_client.config.client_side_validation && app_id.nil?
624
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AuthenticationApi.v1_authentication_rotate_poller_token"
625
- end
626
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
627
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_rotate_poller_token, the character length must be smaller than or equal to 256.'
628
- end
629
-
630
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
631
- fail ArgumentError, 'invalid value for "app_id" when calling AuthenticationApi.v1_authentication_rotate_poller_token, the character length must be great than or equal to 1.'
632
- end
633
-
634
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
635
- if @api_client.config.client_side_validation && app_id !~ pattern
636
- fail ArgumentError, "invalid value for 'app_id' when calling AuthenticationApi.v1_authentication_rotate_poller_token, must conform to the pattern #{pattern}."
637
- end
638
-
639
- # verify the required parameter 'endpoint_id' is set
640
- if @api_client.config.client_side_validation && endpoint_id.nil?
641
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling AuthenticationApi.v1_authentication_rotate_poller_token"
642
- end
643
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
644
- fail ArgumentError, 'invalid value for "endpoint_id" when calling AuthenticationApi.v1_authentication_rotate_poller_token, the character length must be smaller than or equal to 256.'
645
- end
646
-
647
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
648
- fail ArgumentError, 'invalid value for "endpoint_id" when calling AuthenticationApi.v1_authentication_rotate_poller_token, the character length must be great than or equal to 1.'
649
- end
650
-
651
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
652
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
653
- fail ArgumentError, "invalid value for 'endpoint_id' when calling AuthenticationApi.v1_authentication_rotate_poller_token, must conform to the pattern #{pattern}."
654
- end
655
-
656
- # verify the required parameter 'rotate_poller_token_in' is set
657
- if @api_client.config.client_side_validation && rotate_poller_token_in.nil?
658
- fail ArgumentError, "Missing the required parameter 'rotate_poller_token_in' when calling AuthenticationApi.v1_authentication_rotate_poller_token"
659
- end
660
- # resource path
661
- local_var_path = '/api/v1/auth/app/{app_id}/poller/{endpoint_id}/token/rotate'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
662
-
663
- # query parameters
664
- query_params = opts[:query_params] || {}
665
-
666
- # header parameters
667
- header_params = opts[:header_params] || {}
668
- # HTTP header 'Accept' (if needed)
669
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
670
- # HTTP header 'Content-Type'
671
- content_type = @api_client.select_header_content_type(['application/json'])
672
- if !content_type.nil?
673
- header_params['Content-Type'] = content_type
674
- end
675
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
676
-
677
- # form parameters
678
- form_params = opts[:form_params] || {}
679
-
680
- # http body (model)
681
- post_body = opts[:debug_body] || @api_client.object_to_http_body(rotate_poller_token_in)
682
-
683
- # return_type
684
- return_type = opts[:debug_return_type] || 'AuthTokenOut'
685
-
686
- # auth_names
687
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
688
-
689
- new_options = opts.merge(
690
- :operation => :"AuthenticationApi.v1_authentication_rotate_poller_token",
691
- :header_params => header_params,
692
- :query_params => query_params,
693
- :form_params => form_params,
694
- :body => post_body,
695
- :auth_names => auth_names,
696
- :return_type => return_type
697
- )
698
-
699
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
700
- if @api_client.config.debugging
701
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_rotate_poller_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
702
- end
703
- return data, status_code, headers
704
- end
705
-
706
- # Get Stream Portal Access
707
- # Use this function to get magic links (and authentication codes) for connecting your users to the Stream Consumer Portal.
708
- # @param stream_id [String] The Stream&#39;s ID or UID.
709
- # @param stream_portal_access_in [StreamPortalAccessIn]
710
- # @param [Hash] opts the optional parameters
711
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
712
- # @return [AppPortalAccessOut]
713
- def v1_authentication_stream_portal_access(stream_id, stream_portal_access_in, opts = {})
714
- data, _status_code, _headers = v1_authentication_stream_portal_access_with_http_info(stream_id, stream_portal_access_in, opts)
715
- data
716
- end
717
-
718
- # Get Stream Portal Access
719
- # Use this function to get magic links (and authentication codes) for connecting your users to the Stream Consumer Portal.
720
- # @param stream_id [String] The Stream&#39;s ID or UID.
721
- # @param stream_portal_access_in [StreamPortalAccessIn]
722
- # @param [Hash] opts the optional parameters
723
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
724
- # @return [Array<(AppPortalAccessOut, Integer, Hash)>] AppPortalAccessOut data, response status code and response headers
725
- def v1_authentication_stream_portal_access_with_http_info(stream_id, stream_portal_access_in, opts = {})
726
- if @api_client.config.debugging
727
- @api_client.config.logger.debug 'Calling API: AuthenticationApi.v1_authentication_stream_portal_access ...'
728
- end
729
- # verify the required parameter 'stream_id' is set
730
- if @api_client.config.client_side_validation && stream_id.nil?
731
- fail ArgumentError, "Missing the required parameter 'stream_id' when calling AuthenticationApi.v1_authentication_stream_portal_access"
732
- end
733
- if @api_client.config.client_side_validation && stream_id.to_s.length > 60
734
- fail ArgumentError, 'invalid value for "stream_id" when calling AuthenticationApi.v1_authentication_stream_portal_access, the character length must be smaller than or equal to 60.'
735
- end
736
-
737
- if @api_client.config.client_side_validation && stream_id.to_s.length < 1
738
- fail ArgumentError, 'invalid value for "stream_id" when calling AuthenticationApi.v1_authentication_stream_portal_access, the character length must be great than or equal to 1.'
739
- end
740
-
741
- # verify the required parameter 'stream_portal_access_in' is set
742
- if @api_client.config.client_side_validation && stream_portal_access_in.nil?
743
- fail ArgumentError, "Missing the required parameter 'stream_portal_access_in' when calling AuthenticationApi.v1_authentication_stream_portal_access"
744
- end
745
- # resource path
746
- local_var_path = '/api/v1/auth/stream-portal-access/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
747
-
748
- # query parameters
749
- query_params = opts[:query_params] || {}
750
-
751
- # header parameters
752
- header_params = opts[:header_params] || {}
753
- # HTTP header 'Accept' (if needed)
754
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
755
- # HTTP header 'Content-Type'
756
- content_type = @api_client.select_header_content_type(['application/json'])
757
- if !content_type.nil?
758
- header_params['Content-Type'] = content_type
759
- end
760
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
761
-
762
- # form parameters
763
- form_params = opts[:form_params] || {}
764
-
765
- # http body (model)
766
- post_body = opts[:debug_body] || @api_client.object_to_http_body(stream_portal_access_in)
767
-
768
- # return_type
769
- return_type = opts[:debug_return_type] || 'AppPortalAccessOut'
770
-
771
- # auth_names
772
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
773
-
774
- new_options = opts.merge(
775
- :operation => :"AuthenticationApi.v1_authentication_stream_portal_access",
776
- :header_params => header_params,
777
- :query_params => query_params,
778
- :form_params => form_params,
779
- :body => post_body,
780
- :auth_names => auth_names,
781
- :return_type => return_type
782
- )
783
-
784
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
785
- if @api_client.config.debugging
786
- @api_client.config.logger.debug "API called: AuthenticationApi#v1_authentication_stream_portal_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
787
- end
788
- return data, status_code, headers
789
- end
790
- end
791
- end