agent_push_kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +145 -0
  4. data/LICENSE +21 -0
  5. data/README.md +195 -0
  6. data/Rakefile +10 -0
  7. data/agent_push_kit.gemspec +39 -0
  8. data/docs/AcceptedResponse.md +18 -0
  9. data/docs/AccountApi.md +137 -0
  10. data/docs/AddMemberInput.md +18 -0
  11. data/docs/AgentToken.md +30 -0
  12. data/docs/AgentTokenCreated.md +32 -0
  13. data/docs/AgentTokensApi.md +279 -0
  14. data/docs/ApiKeySummary.md +22 -0
  15. data/docs/AuthResponse.md +24 -0
  16. data/docs/AuthenticationApi.md +385 -0
  17. data/docs/CreateAgentTokenInput.md +18 -0
  18. data/docs/CreateOrganizationInput.md +18 -0
  19. data/docs/CurrentAccount.md +20 -0
  20. data/docs/CustomerAccountsApi.md +348 -0
  21. data/docs/DeletedResponse.md +18 -0
  22. data/docs/DeliverySummary.md +24 -0
  23. data/docs/Device.md +28 -0
  24. data/docs/DevicesApi.md +344 -0
  25. data/docs/DisabledResponse.md +18 -0
  26. data/docs/ErrorResponse.md +22 -0
  27. data/docs/EventDetail.md +36 -0
  28. data/docs/EventFilter.md +53 -0
  29. data/docs/EventPage.md +20 -0
  30. data/docs/EventSummary.md +32 -0
  31. data/docs/EventsApi.md +505 -0
  32. data/docs/FilterGroup.md +20 -0
  33. data/docs/FilterNot.md +20 -0
  34. data/docs/HealthApi.md +67 -0
  35. data/docs/HealthResponse.md +20 -0
  36. data/docs/IngestionResult.md +22 -0
  37. data/docs/InheritedResponse.md +18 -0
  38. data/docs/Membership.md +24 -0
  39. data/docs/MembershipUser.md +22 -0
  40. data/docs/Organization.md +32 -0
  41. data/docs/OrganizationApiKeyCreated.md +24 -0
  42. data/docs/OrganizationCount.md +20 -0
  43. data/docs/OrganizationCreated.md +20 -0
  44. data/docs/OrganizationRecord.md +24 -0
  45. data/docs/PasswordLoginInput.md +20 -0
  46. data/docs/PasswordResetCompleteInput.md +20 -0
  47. data/docs/PasswordResetRequestInput.md +18 -0
  48. data/docs/PreferenceRecord.md +24 -0
  49. data/docs/PreferencesApi.md +287 -0
  50. data/docs/ProviderLoginInput.md +20 -0
  51. data/docs/RegisterDeviceInput.md +24 -0
  52. data/docs/RegisterInput.md +22 -0
  53. data/docs/RegisterWebPushSubscriptionInput.md +20 -0
  54. data/docs/RegisterWebPushSubscriptionInputKeys.md +20 -0
  55. data/docs/RevokedResponse.md +18 -0
  56. data/docs/SearchEventsInput.md +22 -0
  57. data/docs/SendEventInput.md +32 -0
  58. data/docs/Service.md +26 -0
  59. data/docs/ServiceAllOfCount.md +18 -0
  60. data/docs/ServicePreference.md +26 -0
  61. data/docs/ServiceSummary.md +22 -0
  62. data/docs/SetEnabledInput.md +18 -0
  63. data/docs/TextFilterCondition.md +22 -0
  64. data/docs/TimeFilterCondition.md +22 -0
  65. data/docs/TypeOverride.md +22 -0
  66. data/docs/User.md +28 -0
  67. data/docs/WebPushConfiguration.md +20 -0
  68. data/docs/WebPushSubscription.md +22 -0
  69. data/git_push.sh +57 -0
  70. data/lib/agent_push_kit/api/account_api.rb +132 -0
  71. data/lib/agent_push_kit/api/agent_tokens_api.rb +274 -0
  72. data/lib/agent_push_kit/api/authentication_api.rb +418 -0
  73. data/lib/agent_push_kit/api/customer_accounts_api.rb +339 -0
  74. data/lib/agent_push_kit/api/devices_api.rb +339 -0
  75. data/lib/agent_push_kit/api/events_api.rb +520 -0
  76. data/lib/agent_push_kit/api/health_api.rb +77 -0
  77. data/lib/agent_push_kit/api/preferences_api.rb +308 -0
  78. data/lib/agent_push_kit/api_client.rb +397 -0
  79. data/lib/agent_push_kit/api_error.rb +58 -0
  80. data/lib/agent_push_kit/api_model_base.rb +88 -0
  81. data/lib/agent_push_kit/configuration.rb +325 -0
  82. data/lib/agent_push_kit/models/accepted_response.rb +164 -0
  83. data/lib/agent_push_kit/models/add_member_input.rb +173 -0
  84. data/lib/agent_push_kit/models/agent_token.rb +292 -0
  85. data/lib/agent_push_kit/models/agent_token_created.rb +364 -0
  86. data/lib/agent_push_kit/models/api_key_summary.rb +165 -0
  87. data/lib/agent_push_kit/models/auth_response.rb +228 -0
  88. data/lib/agent_push_kit/models/create_agent_token_input.rb +182 -0
  89. data/lib/agent_push_kit/models/create_organization_input.rb +182 -0
  90. data/lib/agent_push_kit/models/current_account.rb +192 -0
  91. data/lib/agent_push_kit/models/deleted_response.rb +164 -0
  92. data/lib/agent_push_kit/models/delivery_summary.rb +242 -0
  93. data/lib/agent_push_kit/models/device.rb +304 -0
  94. data/lib/agent_push_kit/models/disabled_response.rb +164 -0
  95. data/lib/agent_push_kit/models/error_response.rb +199 -0
  96. data/lib/agent_push_kit/models/event_detail.rb +393 -0
  97. data/lib/agent_push_kit/models/event_filter.rb +106 -0
  98. data/lib/agent_push_kit/models/event_page.rb +178 -0
  99. data/lib/agent_push_kit/models/event_summary.rb +318 -0
  100. data/lib/agent_push_kit/models/filter_group.rb +234 -0
  101. data/lib/agent_push_kit/models/filter_not.rb +214 -0
  102. data/lib/agent_push_kit/models/health_response.rb +216 -0
  103. data/lib/agent_push_kit/models/ingestion_result.rb +216 -0
  104. data/lib/agent_push_kit/models/inherited_response.rb +164 -0
  105. data/lib/agent_push_kit/models/membership.rb +266 -0
  106. data/lib/agent_push_kit/models/membership_user.rb +202 -0
  107. data/lib/agent_push_kit/models/organization.rb +337 -0
  108. data/lib/agent_push_kit/models/organization_api_key_created.rb +253 -0
  109. data/lib/agent_push_kit/models/organization_count.rb +156 -0
  110. data/lib/agent_push_kit/models/organization_created.rb +201 -0
  111. data/lib/agent_push_kit/models/organization_record.rb +242 -0
  112. data/lib/agent_push_kit/models/password_login_input.rb +217 -0
  113. data/lib/agent_push_kit/models/password_reset_complete_input.rb +217 -0
  114. data/lib/agent_push_kit/models/password_reset_request_input.rb +173 -0
  115. data/lib/agent_push_kit/models/preference_record.rb +242 -0
  116. data/lib/agent_push_kit/models/provider_login_input.rb +201 -0
  117. data/lib/agent_push_kit/models/register_device_input.rb +304 -0
  118. data/lib/agent_push_kit/models/register_input.rb +245 -0
  119. data/lib/agent_push_kit/models/register_web_push_subscription_input.rb +199 -0
  120. data/lib/agent_push_kit/models/register_web_push_subscription_input_keys.rb +226 -0
  121. data/lib/agent_push_kit/models/revoked_response.rb +164 -0
  122. data/lib/agent_push_kit/models/search_events_input.rb +212 -0
  123. data/lib/agent_push_kit/models/send_event_input.rb +427 -0
  124. data/lib/agent_push_kit/models/service.rb +275 -0
  125. data/lib/agent_push_kit/models/service_all_of_count.rb +164 -0
  126. data/lib/agent_push_kit/models/service_preference.rb +270 -0
  127. data/lib/agent_push_kit/models/service_summary.rb +216 -0
  128. data/lib/agent_push_kit/models/set_enabled_input.rb +164 -0
  129. data/lib/agent_push_kit/models/text_filter_condition.rb +260 -0
  130. data/lib/agent_push_kit/models/time_filter_condition.rb +242 -0
  131. data/lib/agent_push_kit/models/type_override.rb +216 -0
  132. data/lib/agent_push_kit/models/user.rb +280 -0
  133. data/lib/agent_push_kit/models/web_push_configuration.rb +176 -0
  134. data/lib/agent_push_kit/models/web_push_subscription.rb +216 -0
  135. data/lib/agent_push_kit/version.rb +15 -0
  136. data/lib/agent_push_kit.rb +101 -0
  137. data/spec/api/account_api_spec.rb +55 -0
  138. data/spec/api/agent_tokens_api_spec.rb +80 -0
  139. data/spec/api/authentication_api_spec.rb +101 -0
  140. data/spec/api/customer_accounts_api_spec.rb +91 -0
  141. data/spec/api/devices_api_spec.rb +89 -0
  142. data/spec/api/events_api_spec.rb +121 -0
  143. data/spec/api/health_api_spec.rb +45 -0
  144. data/spec/api/preferences_api_spec.rb +83 -0
  145. data/spec/models/accepted_response_spec.rb +36 -0
  146. data/spec/models/add_member_input_spec.rb +36 -0
  147. data/spec/models/agent_token_created_spec.rb +78 -0
  148. data/spec/models/agent_token_spec.rb +72 -0
  149. data/spec/models/api_key_summary_spec.rb +48 -0
  150. data/spec/models/auth_response_spec.rb +54 -0
  151. data/spec/models/create_agent_token_input_spec.rb +36 -0
  152. data/spec/models/create_organization_input_spec.rb +36 -0
  153. data/spec/models/current_account_spec.rb +42 -0
  154. data/spec/models/deleted_response_spec.rb +36 -0
  155. data/spec/models/delivery_summary_spec.rb +54 -0
  156. data/spec/models/device_spec.rb +70 -0
  157. data/spec/models/disabled_response_spec.rb +36 -0
  158. data/spec/models/error_response_spec.rb +48 -0
  159. data/spec/models/event_detail_spec.rb +90 -0
  160. data/spec/models/event_filter_spec.rb +32 -0
  161. data/spec/models/event_page_spec.rb +42 -0
  162. data/spec/models/event_summary_spec.rb +78 -0
  163. data/spec/models/filter_group_spec.rb +46 -0
  164. data/spec/models/filter_not_spec.rb +46 -0
  165. data/spec/models/health_response_spec.rb +50 -0
  166. data/spec/models/ingestion_result_spec.rb +48 -0
  167. data/spec/models/inherited_response_spec.rb +36 -0
  168. data/spec/models/membership_spec.rb +58 -0
  169. data/spec/models/membership_user_spec.rb +48 -0
  170. data/spec/models/organization_api_key_created_spec.rb +54 -0
  171. data/spec/models/organization_count_spec.rb +42 -0
  172. data/spec/models/organization_created_spec.rb +42 -0
  173. data/spec/models/organization_record_spec.rb +54 -0
  174. data/spec/models/organization_spec.rb +82 -0
  175. data/spec/models/password_login_input_spec.rb +42 -0
  176. data/spec/models/password_reset_complete_input_spec.rb +42 -0
  177. data/spec/models/password_reset_request_input_spec.rb +36 -0
  178. data/spec/models/preference_record_spec.rb +54 -0
  179. data/spec/models/provider_login_input_spec.rb +42 -0
  180. data/spec/models/register_device_input_spec.rb +58 -0
  181. data/spec/models/register_input_spec.rb +48 -0
  182. data/spec/models/register_web_push_subscription_input_keys_spec.rb +42 -0
  183. data/spec/models/register_web_push_subscription_input_spec.rb +42 -0
  184. data/spec/models/revoked_response_spec.rb +36 -0
  185. data/spec/models/search_events_input_spec.rb +48 -0
  186. data/spec/models/send_event_input_spec.rb +78 -0
  187. data/spec/models/service_all_of_count_spec.rb +36 -0
  188. data/spec/models/service_preference_spec.rb +60 -0
  189. data/spec/models/service_spec.rb +60 -0
  190. data/spec/models/service_summary_spec.rb +48 -0
  191. data/spec/models/set_enabled_input_spec.rb +36 -0
  192. data/spec/models/text_filter_condition_spec.rb +56 -0
  193. data/spec/models/time_filter_condition_spec.rb +56 -0
  194. data/spec/models/type_override_spec.rb +48 -0
  195. data/spec/models/user_spec.rb +66 -0
  196. data/spec/models/web_push_configuration_spec.rb +42 -0
  197. data/spec/models/web_push_subscription_spec.rb +48 -0
  198. data/spec/spec_helper.rb +111 -0
  199. metadata +344 -0
@@ -0,0 +1,279 @@
1
+ # AgentPushKit::AgentTokensApi
2
+
3
+ All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**call_mcp**](AgentTokensApi.md#call_mcp) | **POST** /mcp | Connect through stateless MCP Streamable HTTP |
8
+ | [**create_agent_token**](AgentTokensApi.md#create_agent_token) | **POST** /agent-tokens | Create a named non-expiring agent token |
9
+ | [**list_agent_tokens**](AgentTokensApi.md#list_agent_tokens) | **GET** /agent-tokens | List agent access tokens without their secrets |
10
+ | [**revoke_agent_token**](AgentTokensApi.md#revoke_agent_token) | **DELETE** /agent-tokens/{tokenId} | Revoke one of the current user's agent tokens |
11
+
12
+
13
+ ## call_mcp
14
+
15
+ > call_mcp(request_body)
16
+
17
+ Connect through stateless MCP Streamable HTTP
18
+
19
+ This endpoint accepts only an `apt_` agent access token.
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'agent_push_kit'
26
+ # setup authorization
27
+ AgentPushKit.configure do |config|
28
+ # Configure Bearer authorization (apt_): AgentToken
29
+ config.access_token = 'YOUR_BEARER_TOKEN'
30
+ end
31
+
32
+ api_instance = AgentPushKit::AgentTokensApi.new
33
+ request_body = { key: 3.56} # Hash<String, Object> |
34
+
35
+ begin
36
+ # Connect through stateless MCP Streamable HTTP
37
+ api_instance.call_mcp(request_body)
38
+ rescue AgentPushKit::ApiError => e
39
+ puts "Error when calling AgentTokensApi->call_mcp: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the call_mcp_with_http_info variant
44
+
45
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
46
+
47
+ > <Array(nil, Integer, Hash)> call_mcp_with_http_info(request_body)
48
+
49
+ ```ruby
50
+ begin
51
+ # Connect through stateless MCP Streamable HTTP
52
+ data, status_code, headers = api_instance.call_mcp_with_http_info(request_body)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => nil
56
+ rescue AgentPushKit::ApiError => e
57
+ puts "Error when calling AgentTokensApi->call_mcp_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **request_body** | [**Hash&lt;String, Object&gt;**](Object.md) | | |
66
+
67
+ ### Return type
68
+
69
+ nil (empty response body)
70
+
71
+ ### Authorization
72
+
73
+ [AgentToken](../README.md#AgentToken)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: application/json
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## create_agent_token
82
+
83
+ > <AgentTokenCreated> create_agent_token(create_agent_token_input)
84
+
85
+ Create a named non-expiring agent token
86
+
87
+ The raw `apt_` token is shown once. Store it before dismissing the response.
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'agent_push_kit'
94
+ # setup authorization
95
+ AgentPushKit.configure do |config|
96
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
97
+ config.access_token = 'YOUR_BEARER_TOKEN'
98
+ end
99
+
100
+ api_instance = AgentPushKit::AgentTokensApi.new
101
+ create_agent_token_input = AgentPushKit::CreateAgentTokenInput.new({name: 'name_example'}) # CreateAgentTokenInput |
102
+
103
+ begin
104
+ # Create a named non-expiring agent token
105
+ result = api_instance.create_agent_token(create_agent_token_input)
106
+ p result
107
+ rescue AgentPushKit::ApiError => e
108
+ puts "Error when calling AgentTokensApi->create_agent_token: #{e}"
109
+ end
110
+ ```
111
+
112
+ #### Using the create_agent_token_with_http_info variant
113
+
114
+ This returns an Array which contains the response data, status code and headers.
115
+
116
+ > <Array(<AgentTokenCreated>, Integer, Hash)> create_agent_token_with_http_info(create_agent_token_input)
117
+
118
+ ```ruby
119
+ begin
120
+ # Create a named non-expiring agent token
121
+ data, status_code, headers = api_instance.create_agent_token_with_http_info(create_agent_token_input)
122
+ p status_code # => 2xx
123
+ p headers # => { ... }
124
+ p data # => <AgentTokenCreated>
125
+ rescue AgentPushKit::ApiError => e
126
+ puts "Error when calling AgentTokensApi->create_agent_token_with_http_info: #{e}"
127
+ end
128
+ ```
129
+
130
+ ### Parameters
131
+
132
+ | Name | Type | Description | Notes |
133
+ | ---- | ---- | ----------- | ----- |
134
+ | **create_agent_token_input** | [**CreateAgentTokenInput**](CreateAgentTokenInput.md) | | |
135
+
136
+ ### Return type
137
+
138
+ [**AgentTokenCreated**](AgentTokenCreated.md)
139
+
140
+ ### Authorization
141
+
142
+ [UserOrAgent](../README.md#UserOrAgent)
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: application/json
147
+ - **Accept**: application/json
148
+
149
+
150
+ ## list_agent_tokens
151
+
152
+ > <Array<AgentToken>> list_agent_tokens
153
+
154
+ List agent access tokens without their secrets
155
+
156
+ ### Examples
157
+
158
+ ```ruby
159
+ require 'time'
160
+ require 'agent_push_kit'
161
+ # setup authorization
162
+ AgentPushKit.configure do |config|
163
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
164
+ config.access_token = 'YOUR_BEARER_TOKEN'
165
+ end
166
+
167
+ api_instance = AgentPushKit::AgentTokensApi.new
168
+
169
+ begin
170
+ # List agent access tokens without their secrets
171
+ result = api_instance.list_agent_tokens
172
+ p result
173
+ rescue AgentPushKit::ApiError => e
174
+ puts "Error when calling AgentTokensApi->list_agent_tokens: #{e}"
175
+ end
176
+ ```
177
+
178
+ #### Using the list_agent_tokens_with_http_info variant
179
+
180
+ This returns an Array which contains the response data, status code and headers.
181
+
182
+ > <Array(<Array<AgentToken>>, Integer, Hash)> list_agent_tokens_with_http_info
183
+
184
+ ```ruby
185
+ begin
186
+ # List agent access tokens without their secrets
187
+ data, status_code, headers = api_instance.list_agent_tokens_with_http_info
188
+ p status_code # => 2xx
189
+ p headers # => { ... }
190
+ p data # => <Array<AgentToken>>
191
+ rescue AgentPushKit::ApiError => e
192
+ puts "Error when calling AgentTokensApi->list_agent_tokens_with_http_info: #{e}"
193
+ end
194
+ ```
195
+
196
+ ### Parameters
197
+
198
+ This endpoint does not need any parameter.
199
+
200
+ ### Return type
201
+
202
+ [**Array&lt;AgentToken&gt;**](AgentToken.md)
203
+
204
+ ### Authorization
205
+
206
+ [UserOrAgent](../README.md#UserOrAgent)
207
+
208
+ ### HTTP request headers
209
+
210
+ - **Content-Type**: Not defined
211
+ - **Accept**: application/json
212
+
213
+
214
+ ## revoke_agent_token
215
+
216
+ > <RevokedResponse> revoke_agent_token(token_id)
217
+
218
+ Revoke one of the current user's agent tokens
219
+
220
+ ### Examples
221
+
222
+ ```ruby
223
+ require 'time'
224
+ require 'agent_push_kit'
225
+ # setup authorization
226
+ AgentPushKit.configure do |config|
227
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
228
+ config.access_token = 'YOUR_BEARER_TOKEN'
229
+ end
230
+
231
+ api_instance = AgentPushKit::AgentTokensApi.new
232
+ token_id = 'token_id_example' # String |
233
+
234
+ begin
235
+ # Revoke one of the current user's agent tokens
236
+ result = api_instance.revoke_agent_token(token_id)
237
+ p result
238
+ rescue AgentPushKit::ApiError => e
239
+ puts "Error when calling AgentTokensApi->revoke_agent_token: #{e}"
240
+ end
241
+ ```
242
+
243
+ #### Using the revoke_agent_token_with_http_info variant
244
+
245
+ This returns an Array which contains the response data, status code and headers.
246
+
247
+ > <Array(<RevokedResponse>, Integer, Hash)> revoke_agent_token_with_http_info(token_id)
248
+
249
+ ```ruby
250
+ begin
251
+ # Revoke one of the current user's agent tokens
252
+ data, status_code, headers = api_instance.revoke_agent_token_with_http_info(token_id)
253
+ p status_code # => 2xx
254
+ p headers # => { ... }
255
+ p data # => <RevokedResponse>
256
+ rescue AgentPushKit::ApiError => e
257
+ puts "Error when calling AgentTokensApi->revoke_agent_token_with_http_info: #{e}"
258
+ end
259
+ ```
260
+
261
+ ### Parameters
262
+
263
+ | Name | Type | Description | Notes |
264
+ | ---- | ---- | ----------- | ----- |
265
+ | **token_id** | **String** | | |
266
+
267
+ ### Return type
268
+
269
+ [**RevokedResponse**](RevokedResponse.md)
270
+
271
+ ### Authorization
272
+
273
+ [UserOrAgent](../README.md#UserOrAgent)
274
+
275
+ ### HTTP request headers
276
+
277
+ - **Content-Type**: Not defined
278
+ - **Accept**: application/json
279
+
@@ -0,0 +1,22 @@
1
+ # AgentPushKit::ApiKeySummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **key_prefix** | **String** | | [optional] |
8
+ | **last_four** | **String** | | [optional] |
9
+ | **updated_at** | **Time** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'agent_push_kit'
15
+
16
+ instance = AgentPushKit::ApiKeySummary.new(
17
+ key_prefix: null,
18
+ last_four: null,
19
+ updated_at: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # AgentPushKit::AuthResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **access_token** | **String** | | |
8
+ | **user** | [**User**](User.md) | | |
9
+ | **organizations** | [**Array&lt;Organization&gt;**](Organization.md) | | |
10
+ | **bootstrap_api_key** | **String** | Present only when a new customer account was created. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'agent_push_kit'
16
+
17
+ instance = AgentPushKit::AuthResponse.new(
18
+ access_token: null,
19
+ user: null,
20
+ organizations: null,
21
+ bootstrap_api_key: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,385 @@
1
+ # AgentPushKit::AuthenticationApi
2
+
3
+ All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**complete_password_reset**](AuthenticationApi.md#complete_password_reset) | **POST** /auth/password-reset/complete | Choose a new password and log in |
8
+ | [**login_with_apple**](AuthenticationApi.md#login_with_apple) | **POST** /auth/apple | Log in or attach an account using a Sign in with Apple identity token |
9
+ | [**login_with_google**](AuthenticationApi.md#login_with_google) | **POST** /auth/google | Log in or attach an account using a verified Google ID token |
10
+ | [**login_with_password**](AuthenticationApi.md#login_with_password) | **POST** /auth/login | Log in with email and password |
11
+ | [**register**](AuthenticationApi.md#register) | **POST** /auth/register | Create a user and first customer account |
12
+ | [**request_password_reset**](AuthenticationApi.md#request_password_reset) | **POST** /auth/password-reset/request | Email a single-use password reset token |
13
+
14
+
15
+ ## complete_password_reset
16
+
17
+ > <AuthResponse> complete_password_reset(password_reset_complete_input)
18
+
19
+ Choose a new password and log in
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'agent_push_kit'
26
+
27
+ api_instance = AgentPushKit::AuthenticationApi.new
28
+ password_reset_complete_input = AgentPushKit::PasswordResetCompleteInput.new({token: 'token_example', password: 'password_example'}) # PasswordResetCompleteInput |
29
+
30
+ begin
31
+ # Choose a new password and log in
32
+ result = api_instance.complete_password_reset(password_reset_complete_input)
33
+ p result
34
+ rescue AgentPushKit::ApiError => e
35
+ puts "Error when calling AuthenticationApi->complete_password_reset: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the complete_password_reset_with_http_info variant
40
+
41
+ This returns an Array which contains the response data, status code and headers.
42
+
43
+ > <Array(<AuthResponse>, Integer, Hash)> complete_password_reset_with_http_info(password_reset_complete_input)
44
+
45
+ ```ruby
46
+ begin
47
+ # Choose a new password and log in
48
+ data, status_code, headers = api_instance.complete_password_reset_with_http_info(password_reset_complete_input)
49
+ p status_code # => 2xx
50
+ p headers # => { ... }
51
+ p data # => <AuthResponse>
52
+ rescue AgentPushKit::ApiError => e
53
+ puts "Error when calling AuthenticationApi->complete_password_reset_with_http_info: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **password_reset_complete_input** | [**PasswordResetCompleteInput**](PasswordResetCompleteInput.md) | | |
62
+
63
+ ### Return type
64
+
65
+ [**AuthResponse**](AuthResponse.md)
66
+
67
+ ### Authorization
68
+
69
+ No authorization required
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: application/json
74
+ - **Accept**: application/json
75
+
76
+
77
+ ## login_with_apple
78
+
79
+ > <AuthResponse> login_with_apple(provider_login_input)
80
+
81
+ Log in or attach an account using a Sign in with Apple identity token
82
+
83
+ ### Examples
84
+
85
+ ```ruby
86
+ require 'time'
87
+ require 'agent_push_kit'
88
+
89
+ api_instance = AgentPushKit::AuthenticationApi.new
90
+ provider_login_input = AgentPushKit::ProviderLoginInput.new({id_token: 'id_token_example'}) # ProviderLoginInput |
91
+
92
+ begin
93
+ # Log in or attach an account using a Sign in with Apple identity token
94
+ result = api_instance.login_with_apple(provider_login_input)
95
+ p result
96
+ rescue AgentPushKit::ApiError => e
97
+ puts "Error when calling AuthenticationApi->login_with_apple: #{e}"
98
+ end
99
+ ```
100
+
101
+ #### Using the login_with_apple_with_http_info variant
102
+
103
+ This returns an Array which contains the response data, status code and headers.
104
+
105
+ > <Array(<AuthResponse>, Integer, Hash)> login_with_apple_with_http_info(provider_login_input)
106
+
107
+ ```ruby
108
+ begin
109
+ # Log in or attach an account using a Sign in with Apple identity token
110
+ data, status_code, headers = api_instance.login_with_apple_with_http_info(provider_login_input)
111
+ p status_code # => 2xx
112
+ p headers # => { ... }
113
+ p data # => <AuthResponse>
114
+ rescue AgentPushKit::ApiError => e
115
+ puts "Error when calling AuthenticationApi->login_with_apple_with_http_info: #{e}"
116
+ end
117
+ ```
118
+
119
+ ### Parameters
120
+
121
+ | Name | Type | Description | Notes |
122
+ | ---- | ---- | ----------- | ----- |
123
+ | **provider_login_input** | [**ProviderLoginInput**](ProviderLoginInput.md) | | |
124
+
125
+ ### Return type
126
+
127
+ [**AuthResponse**](AuthResponse.md)
128
+
129
+ ### Authorization
130
+
131
+ No authorization required
132
+
133
+ ### HTTP request headers
134
+
135
+ - **Content-Type**: application/json
136
+ - **Accept**: application/json
137
+
138
+
139
+ ## login_with_google
140
+
141
+ > <AuthResponse> login_with_google(provider_login_input)
142
+
143
+ Log in or attach an account using a verified Google ID token
144
+
145
+ ### Examples
146
+
147
+ ```ruby
148
+ require 'time'
149
+ require 'agent_push_kit'
150
+
151
+ api_instance = AgentPushKit::AuthenticationApi.new
152
+ provider_login_input = AgentPushKit::ProviderLoginInput.new({id_token: 'id_token_example'}) # ProviderLoginInput |
153
+
154
+ begin
155
+ # Log in or attach an account using a verified Google ID token
156
+ result = api_instance.login_with_google(provider_login_input)
157
+ p result
158
+ rescue AgentPushKit::ApiError => e
159
+ puts "Error when calling AuthenticationApi->login_with_google: #{e}"
160
+ end
161
+ ```
162
+
163
+ #### Using the login_with_google_with_http_info variant
164
+
165
+ This returns an Array which contains the response data, status code and headers.
166
+
167
+ > <Array(<AuthResponse>, Integer, Hash)> login_with_google_with_http_info(provider_login_input)
168
+
169
+ ```ruby
170
+ begin
171
+ # Log in or attach an account using a verified Google ID token
172
+ data, status_code, headers = api_instance.login_with_google_with_http_info(provider_login_input)
173
+ p status_code # => 2xx
174
+ p headers # => { ... }
175
+ p data # => <AuthResponse>
176
+ rescue AgentPushKit::ApiError => e
177
+ puts "Error when calling AuthenticationApi->login_with_google_with_http_info: #{e}"
178
+ end
179
+ ```
180
+
181
+ ### Parameters
182
+
183
+ | Name | Type | Description | Notes |
184
+ | ---- | ---- | ----------- | ----- |
185
+ | **provider_login_input** | [**ProviderLoginInput**](ProviderLoginInput.md) | | |
186
+
187
+ ### Return type
188
+
189
+ [**AuthResponse**](AuthResponse.md)
190
+
191
+ ### Authorization
192
+
193
+ No authorization required
194
+
195
+ ### HTTP request headers
196
+
197
+ - **Content-Type**: application/json
198
+ - **Accept**: application/json
199
+
200
+
201
+ ## login_with_password
202
+
203
+ > <AuthResponse> login_with_password(password_login_input)
204
+
205
+ Log in with email and password
206
+
207
+ ### Examples
208
+
209
+ ```ruby
210
+ require 'time'
211
+ require 'agent_push_kit'
212
+
213
+ api_instance = AgentPushKit::AuthenticationApi.new
214
+ password_login_input = AgentPushKit::PasswordLoginInput.new({email: 'email_example', password: 'password_example'}) # PasswordLoginInput |
215
+
216
+ begin
217
+ # Log in with email and password
218
+ result = api_instance.login_with_password(password_login_input)
219
+ p result
220
+ rescue AgentPushKit::ApiError => e
221
+ puts "Error when calling AuthenticationApi->login_with_password: #{e}"
222
+ end
223
+ ```
224
+
225
+ #### Using the login_with_password_with_http_info variant
226
+
227
+ This returns an Array which contains the response data, status code and headers.
228
+
229
+ > <Array(<AuthResponse>, Integer, Hash)> login_with_password_with_http_info(password_login_input)
230
+
231
+ ```ruby
232
+ begin
233
+ # Log in with email and password
234
+ data, status_code, headers = api_instance.login_with_password_with_http_info(password_login_input)
235
+ p status_code # => 2xx
236
+ p headers # => { ... }
237
+ p data # => <AuthResponse>
238
+ rescue AgentPushKit::ApiError => e
239
+ puts "Error when calling AuthenticationApi->login_with_password_with_http_info: #{e}"
240
+ end
241
+ ```
242
+
243
+ ### Parameters
244
+
245
+ | Name | Type | Description | Notes |
246
+ | ---- | ---- | ----------- | ----- |
247
+ | **password_login_input** | [**PasswordLoginInput**](PasswordLoginInput.md) | | |
248
+
249
+ ### Return type
250
+
251
+ [**AuthResponse**](AuthResponse.md)
252
+
253
+ ### Authorization
254
+
255
+ No authorization required
256
+
257
+ ### HTTP request headers
258
+
259
+ - **Content-Type**: application/json
260
+ - **Accept**: application/json
261
+
262
+
263
+ ## register
264
+
265
+ > <AuthResponse> register(register_input)
266
+
267
+ Create a user and first customer account
268
+
269
+ ### Examples
270
+
271
+ ```ruby
272
+ require 'time'
273
+ require 'agent_push_kit'
274
+
275
+ api_instance = AgentPushKit::AuthenticationApi.new
276
+ register_input = AgentPushKit::RegisterInput.new({email: 'email_example', password: 'password_example'}) # RegisterInput |
277
+
278
+ begin
279
+ # Create a user and first customer account
280
+ result = api_instance.register(register_input)
281
+ p result
282
+ rescue AgentPushKit::ApiError => e
283
+ puts "Error when calling AuthenticationApi->register: #{e}"
284
+ end
285
+ ```
286
+
287
+ #### Using the register_with_http_info variant
288
+
289
+ This returns an Array which contains the response data, status code and headers.
290
+
291
+ > <Array(<AuthResponse>, Integer, Hash)> register_with_http_info(register_input)
292
+
293
+ ```ruby
294
+ begin
295
+ # Create a user and first customer account
296
+ data, status_code, headers = api_instance.register_with_http_info(register_input)
297
+ p status_code # => 2xx
298
+ p headers # => { ... }
299
+ p data # => <AuthResponse>
300
+ rescue AgentPushKit::ApiError => e
301
+ puts "Error when calling AuthenticationApi->register_with_http_info: #{e}"
302
+ end
303
+ ```
304
+
305
+ ### Parameters
306
+
307
+ | Name | Type | Description | Notes |
308
+ | ---- | ---- | ----------- | ----- |
309
+ | **register_input** | [**RegisterInput**](RegisterInput.md) | | |
310
+
311
+ ### Return type
312
+
313
+ [**AuthResponse**](AuthResponse.md)
314
+
315
+ ### Authorization
316
+
317
+ No authorization required
318
+
319
+ ### HTTP request headers
320
+
321
+ - **Content-Type**: application/json
322
+ - **Accept**: application/json
323
+
324
+
325
+ ## request_password_reset
326
+
327
+ > <AcceptedResponse> request_password_reset(password_reset_request_input)
328
+
329
+ Email a single-use password reset token
330
+
331
+ ### Examples
332
+
333
+ ```ruby
334
+ require 'time'
335
+ require 'agent_push_kit'
336
+
337
+ api_instance = AgentPushKit::AuthenticationApi.new
338
+ password_reset_request_input = AgentPushKit::PasswordResetRequestInput.new({email: 'email_example'}) # PasswordResetRequestInput |
339
+
340
+ begin
341
+ # Email a single-use password reset token
342
+ result = api_instance.request_password_reset(password_reset_request_input)
343
+ p result
344
+ rescue AgentPushKit::ApiError => e
345
+ puts "Error when calling AuthenticationApi->request_password_reset: #{e}"
346
+ end
347
+ ```
348
+
349
+ #### Using the request_password_reset_with_http_info variant
350
+
351
+ This returns an Array which contains the response data, status code and headers.
352
+
353
+ > <Array(<AcceptedResponse>, Integer, Hash)> request_password_reset_with_http_info(password_reset_request_input)
354
+
355
+ ```ruby
356
+ begin
357
+ # Email a single-use password reset token
358
+ data, status_code, headers = api_instance.request_password_reset_with_http_info(password_reset_request_input)
359
+ p status_code # => 2xx
360
+ p headers # => { ... }
361
+ p data # => <AcceptedResponse>
362
+ rescue AgentPushKit::ApiError => e
363
+ puts "Error when calling AuthenticationApi->request_password_reset_with_http_info: #{e}"
364
+ end
365
+ ```
366
+
367
+ ### Parameters
368
+
369
+ | Name | Type | Description | Notes |
370
+ | ---- | ---- | ----------- | ----- |
371
+ | **password_reset_request_input** | [**PasswordResetRequestInput**](PasswordResetRequestInput.md) | | |
372
+
373
+ ### Return type
374
+
375
+ [**AcceptedResponse**](AcceptedResponse.md)
376
+
377
+ ### Authorization
378
+
379
+ No authorization required
380
+
381
+ ### HTTP request headers
382
+
383
+ - **Content-Type**: application/json
384
+ - **Accept**: application/json
385
+