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
data/docs/EventsApi.md ADDED
@@ -0,0 +1,505 @@
1
+ # AgentPushKit::EventsApi
2
+
3
+ All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_event**](EventsApi.md#get_event) | **GET** /organizations/{organizationId}/events/{eventId} | Get one event including metadata |
8
+ | [**list_events**](EventsApi.md#list_events) | **GET** /organizations/{organizationId}/events | List a paginated inbox |
9
+ | [**list_notification_types**](EventsApi.md#list_notification_types) | **GET** /organizations/{organizationId}/types | List distinct notification types |
10
+ | [**list_services**](EventsApi.md#list_services) | **GET** /organizations/{organizationId}/services | List services discovered from ingested events |
11
+ | [**search_events**](EventsApi.md#search_events) | **POST** /organizations/{organizationId}/events/search | Search events with a validated Boolean filter tree |
12
+ | [**send_event**](EventsApi.md#send_event) | **POST** /events | Send an event using an application ingestion key |
13
+ | [**send_event_as_user**](EventsApi.md#send_event_as_user) | **POST** /organizations/{organizationId}/events | Send an event as an authenticated user or agent |
14
+
15
+
16
+ ## get_event
17
+
18
+ > <EventDetail> get_event(organization_id, event_id)
19
+
20
+ Get one event including metadata
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'agent_push_kit'
27
+ # setup authorization
28
+ AgentPushKit.configure do |config|
29
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
30
+ config.access_token = 'YOUR_BEARER_TOKEN'
31
+ end
32
+
33
+ api_instance = AgentPushKit::EventsApi.new
34
+ organization_id = 'organization_id_example' # String |
35
+ event_id = 'event_id_example' # String |
36
+
37
+ begin
38
+ # Get one event including metadata
39
+ result = api_instance.get_event(organization_id, event_id)
40
+ p result
41
+ rescue AgentPushKit::ApiError => e
42
+ puts "Error when calling EventsApi->get_event: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the get_event_with_http_info variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > <Array(<EventDetail>, Integer, Hash)> get_event_with_http_info(organization_id, event_id)
51
+
52
+ ```ruby
53
+ begin
54
+ # Get one event including metadata
55
+ data, status_code, headers = api_instance.get_event_with_http_info(organization_id, event_id)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <EventDetail>
59
+ rescue AgentPushKit::ApiError => e
60
+ puts "Error when calling EventsApi->get_event_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **organization_id** | **String** | | |
69
+ | **event_id** | **String** | | |
70
+
71
+ ### Return type
72
+
73
+ [**EventDetail**](EventDetail.md)
74
+
75
+ ### Authorization
76
+
77
+ [UserOrAgent](../README.md#UserOrAgent)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: Not defined
82
+ - **Accept**: application/json
83
+
84
+
85
+ ## list_events
86
+
87
+ > <EventPage> list_events(organization_id, opts)
88
+
89
+ List a paginated inbox
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'agent_push_kit'
96
+ # setup authorization
97
+ AgentPushKit.configure do |config|
98
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
99
+ config.access_token = 'YOUR_BEARER_TOKEN'
100
+ end
101
+
102
+ api_instance = AgentPushKit::EventsApi.new
103
+ organization_id = 'organization_id_example' # String |
104
+ opts = {
105
+ service: 'service_example', # String |
106
+ type: 'type_example', # String |
107
+ search: 'search_example', # String |
108
+ cursor: 'cursor_example', # String |
109
+ limit: 56 # Integer |
110
+ }
111
+
112
+ begin
113
+ # List a paginated inbox
114
+ result = api_instance.list_events(organization_id, opts)
115
+ p result
116
+ rescue AgentPushKit::ApiError => e
117
+ puts "Error when calling EventsApi->list_events: #{e}"
118
+ end
119
+ ```
120
+
121
+ #### Using the list_events_with_http_info variant
122
+
123
+ This returns an Array which contains the response data, status code and headers.
124
+
125
+ > <Array(<EventPage>, Integer, Hash)> list_events_with_http_info(organization_id, opts)
126
+
127
+ ```ruby
128
+ begin
129
+ # List a paginated inbox
130
+ data, status_code, headers = api_instance.list_events_with_http_info(organization_id, opts)
131
+ p status_code # => 2xx
132
+ p headers # => { ... }
133
+ p data # => <EventPage>
134
+ rescue AgentPushKit::ApiError => e
135
+ puts "Error when calling EventsApi->list_events_with_http_info: #{e}"
136
+ end
137
+ ```
138
+
139
+ ### Parameters
140
+
141
+ | Name | Type | Description | Notes |
142
+ | ---- | ---- | ----------- | ----- |
143
+ | **organization_id** | **String** | | |
144
+ | **service** | **String** | | [optional] |
145
+ | **type** | **String** | | [optional] |
146
+ | **search** | **String** | | [optional] |
147
+ | **cursor** | **String** | | [optional] |
148
+ | **limit** | **Integer** | | [optional][default to 50] |
149
+
150
+ ### Return type
151
+
152
+ [**EventPage**](EventPage.md)
153
+
154
+ ### Authorization
155
+
156
+ [UserOrAgent](../README.md#UserOrAgent)
157
+
158
+ ### HTTP request headers
159
+
160
+ - **Content-Type**: Not defined
161
+ - **Accept**: application/json
162
+
163
+
164
+ ## list_notification_types
165
+
166
+ > Array&lt;String&gt; list_notification_types(organization_id, opts)
167
+
168
+ List distinct notification types
169
+
170
+ ### Examples
171
+
172
+ ```ruby
173
+ require 'time'
174
+ require 'agent_push_kit'
175
+ # setup authorization
176
+ AgentPushKit.configure do |config|
177
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
178
+ config.access_token = 'YOUR_BEARER_TOKEN'
179
+ end
180
+
181
+ api_instance = AgentPushKit::EventsApi.new
182
+ organization_id = 'organization_id_example' # String |
183
+ opts = {
184
+ service_id: 'service_id_example' # String | Optionally restrict types to one service ID.
185
+ }
186
+
187
+ begin
188
+ # List distinct notification types
189
+ result = api_instance.list_notification_types(organization_id, opts)
190
+ p result
191
+ rescue AgentPushKit::ApiError => e
192
+ puts "Error when calling EventsApi->list_notification_types: #{e}"
193
+ end
194
+ ```
195
+
196
+ #### Using the list_notification_types_with_http_info variant
197
+
198
+ This returns an Array which contains the response data, status code and headers.
199
+
200
+ > <Array(Array&lt;String&gt;, Integer, Hash)> list_notification_types_with_http_info(organization_id, opts)
201
+
202
+ ```ruby
203
+ begin
204
+ # List distinct notification types
205
+ data, status_code, headers = api_instance.list_notification_types_with_http_info(organization_id, opts)
206
+ p status_code # => 2xx
207
+ p headers # => { ... }
208
+ p data # => Array&lt;String&gt;
209
+ rescue AgentPushKit::ApiError => e
210
+ puts "Error when calling EventsApi->list_notification_types_with_http_info: #{e}"
211
+ end
212
+ ```
213
+
214
+ ### Parameters
215
+
216
+ | Name | Type | Description | Notes |
217
+ | ---- | ---- | ----------- | ----- |
218
+ | **organization_id** | **String** | | |
219
+ | **service_id** | **String** | Optionally restrict types to one service ID. | [optional] |
220
+
221
+ ### Return type
222
+
223
+ **Array&lt;String&gt;**
224
+
225
+ ### Authorization
226
+
227
+ [UserOrAgent](../README.md#UserOrAgent)
228
+
229
+ ### HTTP request headers
230
+
231
+ - **Content-Type**: Not defined
232
+ - **Accept**: application/json
233
+
234
+
235
+ ## list_services
236
+
237
+ > <Array<Service>> list_services(organization_id)
238
+
239
+ List services discovered from ingested events
240
+
241
+ ### Examples
242
+
243
+ ```ruby
244
+ require 'time'
245
+ require 'agent_push_kit'
246
+ # setup authorization
247
+ AgentPushKit.configure do |config|
248
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
249
+ config.access_token = 'YOUR_BEARER_TOKEN'
250
+ end
251
+
252
+ api_instance = AgentPushKit::EventsApi.new
253
+ organization_id = 'organization_id_example' # String |
254
+
255
+ begin
256
+ # List services discovered from ingested events
257
+ result = api_instance.list_services(organization_id)
258
+ p result
259
+ rescue AgentPushKit::ApiError => e
260
+ puts "Error when calling EventsApi->list_services: #{e}"
261
+ end
262
+ ```
263
+
264
+ #### Using the list_services_with_http_info variant
265
+
266
+ This returns an Array which contains the response data, status code and headers.
267
+
268
+ > <Array(<Array<Service>>, Integer, Hash)> list_services_with_http_info(organization_id)
269
+
270
+ ```ruby
271
+ begin
272
+ # List services discovered from ingested events
273
+ data, status_code, headers = api_instance.list_services_with_http_info(organization_id)
274
+ p status_code # => 2xx
275
+ p headers # => { ... }
276
+ p data # => <Array<Service>>
277
+ rescue AgentPushKit::ApiError => e
278
+ puts "Error when calling EventsApi->list_services_with_http_info: #{e}"
279
+ end
280
+ ```
281
+
282
+ ### Parameters
283
+
284
+ | Name | Type | Description | Notes |
285
+ | ---- | ---- | ----------- | ----- |
286
+ | **organization_id** | **String** | | |
287
+
288
+ ### Return type
289
+
290
+ [**Array&lt;Service&gt;**](Service.md)
291
+
292
+ ### Authorization
293
+
294
+ [UserOrAgent](../README.md#UserOrAgent)
295
+
296
+ ### HTTP request headers
297
+
298
+ - **Content-Type**: Not defined
299
+ - **Accept**: application/json
300
+
301
+
302
+ ## search_events
303
+
304
+ > <EventPage> search_events(organization_id, search_events_input)
305
+
306
+ Search events with a validated Boolean filter tree
307
+
308
+ ### Examples
309
+
310
+ ```ruby
311
+ require 'time'
312
+ require 'agent_push_kit'
313
+ # setup authorization
314
+ AgentPushKit.configure do |config|
315
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
316
+ config.access_token = 'YOUR_BEARER_TOKEN'
317
+ end
318
+
319
+ api_instance = AgentPushKit::EventsApi.new
320
+ organization_id = 'organization_id_example' # String |
321
+ search_events_input = AgentPushKit::SearchEventsInput.new({filter: AgentPushKit::FilterGroup.new({operator: 'AND', children: [AgentPushKit::FilterGroup.new({operator: 'AND', children: []})]})}) # SearchEventsInput |
322
+
323
+ begin
324
+ # Search events with a validated Boolean filter tree
325
+ result = api_instance.search_events(organization_id, search_events_input)
326
+ p result
327
+ rescue AgentPushKit::ApiError => e
328
+ puts "Error when calling EventsApi->search_events: #{e}"
329
+ end
330
+ ```
331
+
332
+ #### Using the search_events_with_http_info variant
333
+
334
+ This returns an Array which contains the response data, status code and headers.
335
+
336
+ > <Array(<EventPage>, Integer, Hash)> search_events_with_http_info(organization_id, search_events_input)
337
+
338
+ ```ruby
339
+ begin
340
+ # Search events with a validated Boolean filter tree
341
+ data, status_code, headers = api_instance.search_events_with_http_info(organization_id, search_events_input)
342
+ p status_code # => 2xx
343
+ p headers # => { ... }
344
+ p data # => <EventPage>
345
+ rescue AgentPushKit::ApiError => e
346
+ puts "Error when calling EventsApi->search_events_with_http_info: #{e}"
347
+ end
348
+ ```
349
+
350
+ ### Parameters
351
+
352
+ | Name | Type | Description | Notes |
353
+ | ---- | ---- | ----------- | ----- |
354
+ | **organization_id** | **String** | | |
355
+ | **search_events_input** | [**SearchEventsInput**](SearchEventsInput.md) | | |
356
+
357
+ ### Return type
358
+
359
+ [**EventPage**](EventPage.md)
360
+
361
+ ### Authorization
362
+
363
+ [UserOrAgent](../README.md#UserOrAgent)
364
+
365
+ ### HTTP request headers
366
+
367
+ - **Content-Type**: application/json
368
+ - **Accept**: application/json
369
+
370
+
371
+ ## send_event
372
+
373
+ > <IngestionResult> send_event(send_event_input)
374
+
375
+ Send an event using an application ingestion key
376
+
377
+ ### Examples
378
+
379
+ ```ruby
380
+ require 'time'
381
+ require 'agent_push_kit'
382
+ # setup authorization
383
+ AgentPushKit.configure do |config|
384
+ # Configure Bearer authorization (apk_): OrganizationApiKey
385
+ config.access_token = 'YOUR_BEARER_TOKEN'
386
+ end
387
+
388
+ api_instance = AgentPushKit::EventsApi.new
389
+ send_event_input = AgentPushKit::SendEventInput.new({service: 'service_example', type: 'type_example', title: 'title_example', body: 'body_example'}) # SendEventInput |
390
+
391
+ begin
392
+ # Send an event using an application ingestion key
393
+ result = api_instance.send_event(send_event_input)
394
+ p result
395
+ rescue AgentPushKit::ApiError => e
396
+ puts "Error when calling EventsApi->send_event: #{e}"
397
+ end
398
+ ```
399
+
400
+ #### Using the send_event_with_http_info variant
401
+
402
+ This returns an Array which contains the response data, status code and headers.
403
+
404
+ > <Array(<IngestionResult>, Integer, Hash)> send_event_with_http_info(send_event_input)
405
+
406
+ ```ruby
407
+ begin
408
+ # Send an event using an application ingestion key
409
+ data, status_code, headers = api_instance.send_event_with_http_info(send_event_input)
410
+ p status_code # => 2xx
411
+ p headers # => { ... }
412
+ p data # => <IngestionResult>
413
+ rescue AgentPushKit::ApiError => e
414
+ puts "Error when calling EventsApi->send_event_with_http_info: #{e}"
415
+ end
416
+ ```
417
+
418
+ ### Parameters
419
+
420
+ | Name | Type | Description | Notes |
421
+ | ---- | ---- | ----------- | ----- |
422
+ | **send_event_input** | [**SendEventInput**](SendEventInput.md) | | |
423
+
424
+ ### Return type
425
+
426
+ [**IngestionResult**](IngestionResult.md)
427
+
428
+ ### Authorization
429
+
430
+ [OrganizationApiKey](../README.md#OrganizationApiKey)
431
+
432
+ ### HTTP request headers
433
+
434
+ - **Content-Type**: application/json
435
+ - **Accept**: application/json
436
+
437
+
438
+ ## send_event_as_user
439
+
440
+ > <IngestionResult> send_event_as_user(organization_id, send_event_input)
441
+
442
+ Send an event as an authenticated user or agent
443
+
444
+ ### Examples
445
+
446
+ ```ruby
447
+ require 'time'
448
+ require 'agent_push_kit'
449
+ # setup authorization
450
+ AgentPushKit.configure do |config|
451
+ # Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
452
+ config.access_token = 'YOUR_BEARER_TOKEN'
453
+ end
454
+
455
+ api_instance = AgentPushKit::EventsApi.new
456
+ organization_id = 'organization_id_example' # String |
457
+ send_event_input = AgentPushKit::SendEventInput.new({service: 'service_example', type: 'type_example', title: 'title_example', body: 'body_example'}) # SendEventInput |
458
+
459
+ begin
460
+ # Send an event as an authenticated user or agent
461
+ result = api_instance.send_event_as_user(organization_id, send_event_input)
462
+ p result
463
+ rescue AgentPushKit::ApiError => e
464
+ puts "Error when calling EventsApi->send_event_as_user: #{e}"
465
+ end
466
+ ```
467
+
468
+ #### Using the send_event_as_user_with_http_info variant
469
+
470
+ This returns an Array which contains the response data, status code and headers.
471
+
472
+ > <Array(<IngestionResult>, Integer, Hash)> send_event_as_user_with_http_info(organization_id, send_event_input)
473
+
474
+ ```ruby
475
+ begin
476
+ # Send an event as an authenticated user or agent
477
+ data, status_code, headers = api_instance.send_event_as_user_with_http_info(organization_id, send_event_input)
478
+ p status_code # => 2xx
479
+ p headers # => { ... }
480
+ p data # => <IngestionResult>
481
+ rescue AgentPushKit::ApiError => e
482
+ puts "Error when calling EventsApi->send_event_as_user_with_http_info: #{e}"
483
+ end
484
+ ```
485
+
486
+ ### Parameters
487
+
488
+ | Name | Type | Description | Notes |
489
+ | ---- | ---- | ----------- | ----- |
490
+ | **organization_id** | **String** | | |
491
+ | **send_event_input** | [**SendEventInput**](SendEventInput.md) | | |
492
+
493
+ ### Return type
494
+
495
+ [**IngestionResult**](IngestionResult.md)
496
+
497
+ ### Authorization
498
+
499
+ [UserOrAgent](../README.md#UserOrAgent)
500
+
501
+ ### HTTP request headers
502
+
503
+ - **Content-Type**: application/json
504
+ - **Accept**: application/json
505
+
@@ -0,0 +1,20 @@
1
+ # AgentPushKit::FilterGroup
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **operator** | **String** | | |
8
+ | **children** | [**Array&lt;EventFilter&gt;**](EventFilter.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'agent_push_kit'
14
+
15
+ instance = AgentPushKit::FilterGroup.new(
16
+ operator: null,
17
+ children: null
18
+ )
19
+ ```
20
+
data/docs/FilterNot.md ADDED
@@ -0,0 +1,20 @@
1
+ # AgentPushKit::FilterNot
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **operator** | **String** | | |
8
+ | **child** | [**EventFilter**](EventFilter.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'agent_push_kit'
14
+
15
+ instance = AgentPushKit::FilterNot.new(
16
+ operator: null,
17
+ child: null
18
+ )
19
+ ```
20
+
data/docs/HealthApi.md ADDED
@@ -0,0 +1,67 @@
1
+ # AgentPushKit::HealthApi
2
+
3
+ All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_health**](HealthApi.md#get_health) | **GET** /health | Check Agent Push Kit API health |
8
+
9
+
10
+ ## get_health
11
+
12
+ > <HealthResponse> get_health
13
+
14
+ Check Agent Push Kit API health
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'agent_push_kit'
21
+
22
+ api_instance = AgentPushKit::HealthApi.new
23
+
24
+ begin
25
+ # Check Agent Push Kit API health
26
+ result = api_instance.get_health
27
+ p result
28
+ rescue AgentPushKit::ApiError => e
29
+ puts "Error when calling HealthApi->get_health: #{e}"
30
+ end
31
+ ```
32
+
33
+ #### Using the get_health_with_http_info variant
34
+
35
+ This returns an Array which contains the response data, status code and headers.
36
+
37
+ > <Array(<HealthResponse>, Integer, Hash)> get_health_with_http_info
38
+
39
+ ```ruby
40
+ begin
41
+ # Check Agent Push Kit API health
42
+ data, status_code, headers = api_instance.get_health_with_http_info
43
+ p status_code # => 2xx
44
+ p headers # => { ... }
45
+ p data # => <HealthResponse>
46
+ rescue AgentPushKit::ApiError => e
47
+ puts "Error when calling HealthApi->get_health_with_http_info: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ This endpoint does not need any parameter.
54
+
55
+ ### Return type
56
+
57
+ [**HealthResponse**](HealthResponse.md)
58
+
59
+ ### Authorization
60
+
61
+ No authorization required
62
+
63
+ ### HTTP request headers
64
+
65
+ - **Content-Type**: Not defined
66
+ - **Accept**: application/json
67
+
@@ -0,0 +1,20 @@
1
+ # AgentPushKit::HealthResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | | |
8
+ | **service** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'agent_push_kit'
14
+
15
+ instance = AgentPushKit::HealthResponse.new(
16
+ status: null,
17
+ service: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # AgentPushKit::IngestionResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event** | [**EventDetail**](EventDetail.md) | | |
8
+ | **duplicate** | **Boolean** | | |
9
+ | **delivery** | [**DeliverySummary**](DeliverySummary.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'agent_push_kit'
15
+
16
+ instance = AgentPushKit::IngestionResult.new(
17
+ event: null,
18
+ duplicate: null,
19
+ delivery: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # AgentPushKit::InheritedResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **inherited** | **Boolean** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'agent_push_kit'
13
+
14
+ instance = AgentPushKit::InheritedResponse.new(
15
+ inherited: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,24 @@
1
+ # AgentPushKit::Membership
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **role** | **String** | | |
9
+ | **created_at** | **Time** | | |
10
+ | **user** | [**MembershipUser**](MembershipUser.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'agent_push_kit'
16
+
17
+ instance = AgentPushKit::Membership.new(
18
+ id: null,
19
+ role: null,
20
+ created_at: null,
21
+ user: null
22
+ )
23
+ ```
24
+