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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +145 -0
- data/LICENSE +21 -0
- data/README.md +195 -0
- data/Rakefile +10 -0
- data/agent_push_kit.gemspec +39 -0
- data/docs/AcceptedResponse.md +18 -0
- data/docs/AccountApi.md +137 -0
- data/docs/AddMemberInput.md +18 -0
- data/docs/AgentToken.md +30 -0
- data/docs/AgentTokenCreated.md +32 -0
- data/docs/AgentTokensApi.md +279 -0
- data/docs/ApiKeySummary.md +22 -0
- data/docs/AuthResponse.md +24 -0
- data/docs/AuthenticationApi.md +385 -0
- data/docs/CreateAgentTokenInput.md +18 -0
- data/docs/CreateOrganizationInput.md +18 -0
- data/docs/CurrentAccount.md +20 -0
- data/docs/CustomerAccountsApi.md +348 -0
- data/docs/DeletedResponse.md +18 -0
- data/docs/DeliverySummary.md +24 -0
- data/docs/Device.md +28 -0
- data/docs/DevicesApi.md +344 -0
- data/docs/DisabledResponse.md +18 -0
- data/docs/ErrorResponse.md +22 -0
- data/docs/EventDetail.md +36 -0
- data/docs/EventFilter.md +53 -0
- data/docs/EventPage.md +20 -0
- data/docs/EventSummary.md +32 -0
- data/docs/EventsApi.md +505 -0
- data/docs/FilterGroup.md +20 -0
- data/docs/FilterNot.md +20 -0
- data/docs/HealthApi.md +67 -0
- data/docs/HealthResponse.md +20 -0
- data/docs/IngestionResult.md +22 -0
- data/docs/InheritedResponse.md +18 -0
- data/docs/Membership.md +24 -0
- data/docs/MembershipUser.md +22 -0
- data/docs/Organization.md +32 -0
- data/docs/OrganizationApiKeyCreated.md +24 -0
- data/docs/OrganizationCount.md +20 -0
- data/docs/OrganizationCreated.md +20 -0
- data/docs/OrganizationRecord.md +24 -0
- data/docs/PasswordLoginInput.md +20 -0
- data/docs/PasswordResetCompleteInput.md +20 -0
- data/docs/PasswordResetRequestInput.md +18 -0
- data/docs/PreferenceRecord.md +24 -0
- data/docs/PreferencesApi.md +287 -0
- data/docs/ProviderLoginInput.md +20 -0
- data/docs/RegisterDeviceInput.md +24 -0
- data/docs/RegisterInput.md +22 -0
- data/docs/RegisterWebPushSubscriptionInput.md +20 -0
- data/docs/RegisterWebPushSubscriptionInputKeys.md +20 -0
- data/docs/RevokedResponse.md +18 -0
- data/docs/SearchEventsInput.md +22 -0
- data/docs/SendEventInput.md +32 -0
- data/docs/Service.md +26 -0
- data/docs/ServiceAllOfCount.md +18 -0
- data/docs/ServicePreference.md +26 -0
- data/docs/ServiceSummary.md +22 -0
- data/docs/SetEnabledInput.md +18 -0
- data/docs/TextFilterCondition.md +22 -0
- data/docs/TimeFilterCondition.md +22 -0
- data/docs/TypeOverride.md +22 -0
- data/docs/User.md +28 -0
- data/docs/WebPushConfiguration.md +20 -0
- data/docs/WebPushSubscription.md +22 -0
- data/git_push.sh +57 -0
- data/lib/agent_push_kit/api/account_api.rb +132 -0
- data/lib/agent_push_kit/api/agent_tokens_api.rb +274 -0
- data/lib/agent_push_kit/api/authentication_api.rb +418 -0
- data/lib/agent_push_kit/api/customer_accounts_api.rb +339 -0
- data/lib/agent_push_kit/api/devices_api.rb +339 -0
- data/lib/agent_push_kit/api/events_api.rb +520 -0
- data/lib/agent_push_kit/api/health_api.rb +77 -0
- data/lib/agent_push_kit/api/preferences_api.rb +308 -0
- data/lib/agent_push_kit/api_client.rb +397 -0
- data/lib/agent_push_kit/api_error.rb +58 -0
- data/lib/agent_push_kit/api_model_base.rb +88 -0
- data/lib/agent_push_kit/configuration.rb +325 -0
- data/lib/agent_push_kit/models/accepted_response.rb +164 -0
- data/lib/agent_push_kit/models/add_member_input.rb +173 -0
- data/lib/agent_push_kit/models/agent_token.rb +292 -0
- data/lib/agent_push_kit/models/agent_token_created.rb +364 -0
- data/lib/agent_push_kit/models/api_key_summary.rb +165 -0
- data/lib/agent_push_kit/models/auth_response.rb +228 -0
- data/lib/agent_push_kit/models/create_agent_token_input.rb +182 -0
- data/lib/agent_push_kit/models/create_organization_input.rb +182 -0
- data/lib/agent_push_kit/models/current_account.rb +192 -0
- data/lib/agent_push_kit/models/deleted_response.rb +164 -0
- data/lib/agent_push_kit/models/delivery_summary.rb +242 -0
- data/lib/agent_push_kit/models/device.rb +304 -0
- data/lib/agent_push_kit/models/disabled_response.rb +164 -0
- data/lib/agent_push_kit/models/error_response.rb +199 -0
- data/lib/agent_push_kit/models/event_detail.rb +393 -0
- data/lib/agent_push_kit/models/event_filter.rb +106 -0
- data/lib/agent_push_kit/models/event_page.rb +178 -0
- data/lib/agent_push_kit/models/event_summary.rb +318 -0
- data/lib/agent_push_kit/models/filter_group.rb +234 -0
- data/lib/agent_push_kit/models/filter_not.rb +214 -0
- data/lib/agent_push_kit/models/health_response.rb +216 -0
- data/lib/agent_push_kit/models/ingestion_result.rb +216 -0
- data/lib/agent_push_kit/models/inherited_response.rb +164 -0
- data/lib/agent_push_kit/models/membership.rb +266 -0
- data/lib/agent_push_kit/models/membership_user.rb +202 -0
- data/lib/agent_push_kit/models/organization.rb +337 -0
- data/lib/agent_push_kit/models/organization_api_key_created.rb +253 -0
- data/lib/agent_push_kit/models/organization_count.rb +156 -0
- data/lib/agent_push_kit/models/organization_created.rb +201 -0
- data/lib/agent_push_kit/models/organization_record.rb +242 -0
- data/lib/agent_push_kit/models/password_login_input.rb +217 -0
- data/lib/agent_push_kit/models/password_reset_complete_input.rb +217 -0
- data/lib/agent_push_kit/models/password_reset_request_input.rb +173 -0
- data/lib/agent_push_kit/models/preference_record.rb +242 -0
- data/lib/agent_push_kit/models/provider_login_input.rb +201 -0
- data/lib/agent_push_kit/models/register_device_input.rb +304 -0
- data/lib/agent_push_kit/models/register_input.rb +245 -0
- data/lib/agent_push_kit/models/register_web_push_subscription_input.rb +199 -0
- data/lib/agent_push_kit/models/register_web_push_subscription_input_keys.rb +226 -0
- data/lib/agent_push_kit/models/revoked_response.rb +164 -0
- data/lib/agent_push_kit/models/search_events_input.rb +212 -0
- data/lib/agent_push_kit/models/send_event_input.rb +427 -0
- data/lib/agent_push_kit/models/service.rb +275 -0
- data/lib/agent_push_kit/models/service_all_of_count.rb +164 -0
- data/lib/agent_push_kit/models/service_preference.rb +270 -0
- data/lib/agent_push_kit/models/service_summary.rb +216 -0
- data/lib/agent_push_kit/models/set_enabled_input.rb +164 -0
- data/lib/agent_push_kit/models/text_filter_condition.rb +260 -0
- data/lib/agent_push_kit/models/time_filter_condition.rb +242 -0
- data/lib/agent_push_kit/models/type_override.rb +216 -0
- data/lib/agent_push_kit/models/user.rb +280 -0
- data/lib/agent_push_kit/models/web_push_configuration.rb +176 -0
- data/lib/agent_push_kit/models/web_push_subscription.rb +216 -0
- data/lib/agent_push_kit/version.rb +15 -0
- data/lib/agent_push_kit.rb +101 -0
- data/spec/api/account_api_spec.rb +55 -0
- data/spec/api/agent_tokens_api_spec.rb +80 -0
- data/spec/api/authentication_api_spec.rb +101 -0
- data/spec/api/customer_accounts_api_spec.rb +91 -0
- data/spec/api/devices_api_spec.rb +89 -0
- data/spec/api/events_api_spec.rb +121 -0
- data/spec/api/health_api_spec.rb +45 -0
- data/spec/api/preferences_api_spec.rb +83 -0
- data/spec/models/accepted_response_spec.rb +36 -0
- data/spec/models/add_member_input_spec.rb +36 -0
- data/spec/models/agent_token_created_spec.rb +78 -0
- data/spec/models/agent_token_spec.rb +72 -0
- data/spec/models/api_key_summary_spec.rb +48 -0
- data/spec/models/auth_response_spec.rb +54 -0
- data/spec/models/create_agent_token_input_spec.rb +36 -0
- data/spec/models/create_organization_input_spec.rb +36 -0
- data/spec/models/current_account_spec.rb +42 -0
- data/spec/models/deleted_response_spec.rb +36 -0
- data/spec/models/delivery_summary_spec.rb +54 -0
- data/spec/models/device_spec.rb +70 -0
- data/spec/models/disabled_response_spec.rb +36 -0
- data/spec/models/error_response_spec.rb +48 -0
- data/spec/models/event_detail_spec.rb +90 -0
- data/spec/models/event_filter_spec.rb +32 -0
- data/spec/models/event_page_spec.rb +42 -0
- data/spec/models/event_summary_spec.rb +78 -0
- data/spec/models/filter_group_spec.rb +46 -0
- data/spec/models/filter_not_spec.rb +46 -0
- data/spec/models/health_response_spec.rb +50 -0
- data/spec/models/ingestion_result_spec.rb +48 -0
- data/spec/models/inherited_response_spec.rb +36 -0
- data/spec/models/membership_spec.rb +58 -0
- data/spec/models/membership_user_spec.rb +48 -0
- data/spec/models/organization_api_key_created_spec.rb +54 -0
- data/spec/models/organization_count_spec.rb +42 -0
- data/spec/models/organization_created_spec.rb +42 -0
- data/spec/models/organization_record_spec.rb +54 -0
- data/spec/models/organization_spec.rb +82 -0
- data/spec/models/password_login_input_spec.rb +42 -0
- data/spec/models/password_reset_complete_input_spec.rb +42 -0
- data/spec/models/password_reset_request_input_spec.rb +36 -0
- data/spec/models/preference_record_spec.rb +54 -0
- data/spec/models/provider_login_input_spec.rb +42 -0
- data/spec/models/register_device_input_spec.rb +58 -0
- data/spec/models/register_input_spec.rb +48 -0
- data/spec/models/register_web_push_subscription_input_keys_spec.rb +42 -0
- data/spec/models/register_web_push_subscription_input_spec.rb +42 -0
- data/spec/models/revoked_response_spec.rb +36 -0
- data/spec/models/search_events_input_spec.rb +48 -0
- data/spec/models/send_event_input_spec.rb +78 -0
- data/spec/models/service_all_of_count_spec.rb +36 -0
- data/spec/models/service_preference_spec.rb +60 -0
- data/spec/models/service_spec.rb +60 -0
- data/spec/models/service_summary_spec.rb +48 -0
- data/spec/models/set_enabled_input_spec.rb +36 -0
- data/spec/models/text_filter_condition_spec.rb +56 -0
- data/spec/models/time_filter_condition_spec.rb +56 -0
- data/spec/models/type_override_spec.rb +48 -0
- data/spec/models/user_spec.rb +66 -0
- data/spec/models/web_push_configuration_spec.rb +42 -0
- data/spec/models/web_push_subscription_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +344 -0
data/docs/DevicesApi.md
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
# AgentPushKit::DevicesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_web_push_configuration**](DevicesApi.md#get_web_push_configuration) | **GET** /web-push/configuration | Get browser push availability and its public VAPID key |
|
|
8
|
+
| [**register_device**](DevicesApi.md#register_device) | **POST** /devices | Register or refresh an APNs device |
|
|
9
|
+
| [**register_web_push_subscription**](DevicesApi.md#register_web_push_subscription) | **POST** /web-push/subscriptions | Register or refresh a browser push subscription |
|
|
10
|
+
| [**remove_device**](DevicesApi.md#remove_device) | **DELETE** /devices/{installationId} | Disable push delivery to one installation |
|
|
11
|
+
| [**remove_web_push_subscription**](DevicesApi.md#remove_web_push_subscription) | **DELETE** /web-push/subscriptions/{subscriptionId} | Disable a browser push subscription |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## get_web_push_configuration
|
|
15
|
+
|
|
16
|
+
> <WebPushConfiguration> get_web_push_configuration
|
|
17
|
+
|
|
18
|
+
Get browser push availability and its public VAPID key
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'agent_push_kit'
|
|
25
|
+
# setup authorization
|
|
26
|
+
AgentPushKit.configure do |config|
|
|
27
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
28
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = AgentPushKit::DevicesApi.new
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
# Get browser push availability and its public VAPID key
|
|
35
|
+
result = api_instance.get_web_push_configuration
|
|
36
|
+
p result
|
|
37
|
+
rescue AgentPushKit::ApiError => e
|
|
38
|
+
puts "Error when calling DevicesApi->get_web_push_configuration: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the get_web_push_configuration_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(<WebPushConfiguration>, Integer, Hash)> get_web_push_configuration_with_http_info
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# Get browser push availability and its public VAPID key
|
|
51
|
+
data, status_code, headers = api_instance.get_web_push_configuration_with_http_info
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => <WebPushConfiguration>
|
|
55
|
+
rescue AgentPushKit::ApiError => e
|
|
56
|
+
puts "Error when calling DevicesApi->get_web_push_configuration_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
This endpoint does not need any parameter.
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
[**WebPushConfiguration**](WebPushConfiguration.md)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: Not defined
|
|
75
|
+
- **Accept**: application/json
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## register_device
|
|
79
|
+
|
|
80
|
+
> <Device> register_device(register_device_input)
|
|
81
|
+
|
|
82
|
+
Register or refresh an APNs device
|
|
83
|
+
|
|
84
|
+
### Examples
|
|
85
|
+
|
|
86
|
+
```ruby
|
|
87
|
+
require 'time'
|
|
88
|
+
require 'agent_push_kit'
|
|
89
|
+
# setup authorization
|
|
90
|
+
AgentPushKit.configure do |config|
|
|
91
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
92
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
api_instance = AgentPushKit::DevicesApi.new
|
|
96
|
+
register_device_input = AgentPushKit::RegisterDeviceInput.new({device_token: 'device_token_example', installation_id: 'installation_id_example', environment: 'SANDBOX'}) # RegisterDeviceInput |
|
|
97
|
+
|
|
98
|
+
begin
|
|
99
|
+
# Register or refresh an APNs device
|
|
100
|
+
result = api_instance.register_device(register_device_input)
|
|
101
|
+
p result
|
|
102
|
+
rescue AgentPushKit::ApiError => e
|
|
103
|
+
puts "Error when calling DevicesApi->register_device: #{e}"
|
|
104
|
+
end
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
#### Using the register_device_with_http_info variant
|
|
108
|
+
|
|
109
|
+
This returns an Array which contains the response data, status code and headers.
|
|
110
|
+
|
|
111
|
+
> <Array(<Device>, Integer, Hash)> register_device_with_http_info(register_device_input)
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
begin
|
|
115
|
+
# Register or refresh an APNs device
|
|
116
|
+
data, status_code, headers = api_instance.register_device_with_http_info(register_device_input)
|
|
117
|
+
p status_code # => 2xx
|
|
118
|
+
p headers # => { ... }
|
|
119
|
+
p data # => <Device>
|
|
120
|
+
rescue AgentPushKit::ApiError => e
|
|
121
|
+
puts "Error when calling DevicesApi->register_device_with_http_info: #{e}"
|
|
122
|
+
end
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Parameters
|
|
126
|
+
|
|
127
|
+
| Name | Type | Description | Notes |
|
|
128
|
+
| ---- | ---- | ----------- | ----- |
|
|
129
|
+
| **register_device_input** | [**RegisterDeviceInput**](RegisterDeviceInput.md) | | |
|
|
130
|
+
|
|
131
|
+
### Return type
|
|
132
|
+
|
|
133
|
+
[**Device**](Device.md)
|
|
134
|
+
|
|
135
|
+
### Authorization
|
|
136
|
+
|
|
137
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
138
|
+
|
|
139
|
+
### HTTP request headers
|
|
140
|
+
|
|
141
|
+
- **Content-Type**: application/json
|
|
142
|
+
- **Accept**: application/json
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## register_web_push_subscription
|
|
146
|
+
|
|
147
|
+
> <WebPushSubscription> register_web_push_subscription(register_web_push_subscription_input)
|
|
148
|
+
|
|
149
|
+
Register or refresh a browser push subscription
|
|
150
|
+
|
|
151
|
+
### Examples
|
|
152
|
+
|
|
153
|
+
```ruby
|
|
154
|
+
require 'time'
|
|
155
|
+
require 'agent_push_kit'
|
|
156
|
+
# setup authorization
|
|
157
|
+
AgentPushKit.configure do |config|
|
|
158
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
159
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
api_instance = AgentPushKit::DevicesApi.new
|
|
163
|
+
register_web_push_subscription_input = AgentPushKit::RegisterWebPushSubscriptionInput.new({endpoint: 'endpoint_example', keys: AgentPushKit::RegisterWebPushSubscriptionInputKeys.new({p256dh: 'p256dh_example', auth: 'auth_example'})}) # RegisterWebPushSubscriptionInput |
|
|
164
|
+
|
|
165
|
+
begin
|
|
166
|
+
# Register or refresh a browser push subscription
|
|
167
|
+
result = api_instance.register_web_push_subscription(register_web_push_subscription_input)
|
|
168
|
+
p result
|
|
169
|
+
rescue AgentPushKit::ApiError => e
|
|
170
|
+
puts "Error when calling DevicesApi->register_web_push_subscription: #{e}"
|
|
171
|
+
end
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
#### Using the register_web_push_subscription_with_http_info variant
|
|
175
|
+
|
|
176
|
+
This returns an Array which contains the response data, status code and headers.
|
|
177
|
+
|
|
178
|
+
> <Array(<WebPushSubscription>, Integer, Hash)> register_web_push_subscription_with_http_info(register_web_push_subscription_input)
|
|
179
|
+
|
|
180
|
+
```ruby
|
|
181
|
+
begin
|
|
182
|
+
# Register or refresh a browser push subscription
|
|
183
|
+
data, status_code, headers = api_instance.register_web_push_subscription_with_http_info(register_web_push_subscription_input)
|
|
184
|
+
p status_code # => 2xx
|
|
185
|
+
p headers # => { ... }
|
|
186
|
+
p data # => <WebPushSubscription>
|
|
187
|
+
rescue AgentPushKit::ApiError => e
|
|
188
|
+
puts "Error when calling DevicesApi->register_web_push_subscription_with_http_info: #{e}"
|
|
189
|
+
end
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Parameters
|
|
193
|
+
|
|
194
|
+
| Name | Type | Description | Notes |
|
|
195
|
+
| ---- | ---- | ----------- | ----- |
|
|
196
|
+
| **register_web_push_subscription_input** | [**RegisterWebPushSubscriptionInput**](RegisterWebPushSubscriptionInput.md) | | |
|
|
197
|
+
|
|
198
|
+
### Return type
|
|
199
|
+
|
|
200
|
+
[**WebPushSubscription**](WebPushSubscription.md)
|
|
201
|
+
|
|
202
|
+
### Authorization
|
|
203
|
+
|
|
204
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
205
|
+
|
|
206
|
+
### HTTP request headers
|
|
207
|
+
|
|
208
|
+
- **Content-Type**: application/json
|
|
209
|
+
- **Accept**: application/json
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## remove_device
|
|
213
|
+
|
|
214
|
+
> <DisabledResponse> remove_device(installation_id)
|
|
215
|
+
|
|
216
|
+
Disable push delivery to one installation
|
|
217
|
+
|
|
218
|
+
### Examples
|
|
219
|
+
|
|
220
|
+
```ruby
|
|
221
|
+
require 'time'
|
|
222
|
+
require 'agent_push_kit'
|
|
223
|
+
# setup authorization
|
|
224
|
+
AgentPushKit.configure do |config|
|
|
225
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
226
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
api_instance = AgentPushKit::DevicesApi.new
|
|
230
|
+
installation_id = 'installation_id_example' # String |
|
|
231
|
+
|
|
232
|
+
begin
|
|
233
|
+
# Disable push delivery to one installation
|
|
234
|
+
result = api_instance.remove_device(installation_id)
|
|
235
|
+
p result
|
|
236
|
+
rescue AgentPushKit::ApiError => e
|
|
237
|
+
puts "Error when calling DevicesApi->remove_device: #{e}"
|
|
238
|
+
end
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
#### Using the remove_device_with_http_info variant
|
|
242
|
+
|
|
243
|
+
This returns an Array which contains the response data, status code and headers.
|
|
244
|
+
|
|
245
|
+
> <Array(<DisabledResponse>, Integer, Hash)> remove_device_with_http_info(installation_id)
|
|
246
|
+
|
|
247
|
+
```ruby
|
|
248
|
+
begin
|
|
249
|
+
# Disable push delivery to one installation
|
|
250
|
+
data, status_code, headers = api_instance.remove_device_with_http_info(installation_id)
|
|
251
|
+
p status_code # => 2xx
|
|
252
|
+
p headers # => { ... }
|
|
253
|
+
p data # => <DisabledResponse>
|
|
254
|
+
rescue AgentPushKit::ApiError => e
|
|
255
|
+
puts "Error when calling DevicesApi->remove_device_with_http_info: #{e}"
|
|
256
|
+
end
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Parameters
|
|
260
|
+
|
|
261
|
+
| Name | Type | Description | Notes |
|
|
262
|
+
| ---- | ---- | ----------- | ----- |
|
|
263
|
+
| **installation_id** | **String** | | |
|
|
264
|
+
|
|
265
|
+
### Return type
|
|
266
|
+
|
|
267
|
+
[**DisabledResponse**](DisabledResponse.md)
|
|
268
|
+
|
|
269
|
+
### Authorization
|
|
270
|
+
|
|
271
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
272
|
+
|
|
273
|
+
### HTTP request headers
|
|
274
|
+
|
|
275
|
+
- **Content-Type**: Not defined
|
|
276
|
+
- **Accept**: application/json
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
## remove_web_push_subscription
|
|
280
|
+
|
|
281
|
+
> <DisabledResponse> remove_web_push_subscription(subscription_id)
|
|
282
|
+
|
|
283
|
+
Disable a browser push subscription
|
|
284
|
+
|
|
285
|
+
### Examples
|
|
286
|
+
|
|
287
|
+
```ruby
|
|
288
|
+
require 'time'
|
|
289
|
+
require 'agent_push_kit'
|
|
290
|
+
# setup authorization
|
|
291
|
+
AgentPushKit.configure do |config|
|
|
292
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
293
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
api_instance = AgentPushKit::DevicesApi.new
|
|
297
|
+
subscription_id = 'subscription_id_example' # String |
|
|
298
|
+
|
|
299
|
+
begin
|
|
300
|
+
# Disable a browser push subscription
|
|
301
|
+
result = api_instance.remove_web_push_subscription(subscription_id)
|
|
302
|
+
p result
|
|
303
|
+
rescue AgentPushKit::ApiError => e
|
|
304
|
+
puts "Error when calling DevicesApi->remove_web_push_subscription: #{e}"
|
|
305
|
+
end
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### Using the remove_web_push_subscription_with_http_info variant
|
|
309
|
+
|
|
310
|
+
This returns an Array which contains the response data, status code and headers.
|
|
311
|
+
|
|
312
|
+
> <Array(<DisabledResponse>, Integer, Hash)> remove_web_push_subscription_with_http_info(subscription_id)
|
|
313
|
+
|
|
314
|
+
```ruby
|
|
315
|
+
begin
|
|
316
|
+
# Disable a browser push subscription
|
|
317
|
+
data, status_code, headers = api_instance.remove_web_push_subscription_with_http_info(subscription_id)
|
|
318
|
+
p status_code # => 2xx
|
|
319
|
+
p headers # => { ... }
|
|
320
|
+
p data # => <DisabledResponse>
|
|
321
|
+
rescue AgentPushKit::ApiError => e
|
|
322
|
+
puts "Error when calling DevicesApi->remove_web_push_subscription_with_http_info: #{e}"
|
|
323
|
+
end
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Parameters
|
|
327
|
+
|
|
328
|
+
| Name | Type | Description | Notes |
|
|
329
|
+
| ---- | ---- | ----------- | ----- |
|
|
330
|
+
| **subscription_id** | **String** | | |
|
|
331
|
+
|
|
332
|
+
### Return type
|
|
333
|
+
|
|
334
|
+
[**DisabledResponse**](DisabledResponse.md)
|
|
335
|
+
|
|
336
|
+
### Authorization
|
|
337
|
+
|
|
338
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
339
|
+
|
|
340
|
+
### HTTP request headers
|
|
341
|
+
|
|
342
|
+
- **Content-Type**: Not defined
|
|
343
|
+
- **Accept**: application/json
|
|
344
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# AgentPushKit::DisabledResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **disabled** | **Boolean** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'agent_push_kit'
|
|
13
|
+
|
|
14
|
+
instance = AgentPushKit::DisabledResponse.new(
|
|
15
|
+
disabled: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgentPushKit::ErrorResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **status_code** | **Integer** | | |
|
|
8
|
+
| **message** | **String** | | |
|
|
9
|
+
| **error** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'agent_push_kit'
|
|
15
|
+
|
|
16
|
+
instance = AgentPushKit::ErrorResponse.new(
|
|
17
|
+
status_code: null,
|
|
18
|
+
message: null,
|
|
19
|
+
error: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/EventDetail.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# AgentPushKit::EventDetail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **type** | **String** | | |
|
|
9
|
+
| **title** | **String** | | |
|
|
10
|
+
| **body** | **String** | | |
|
|
11
|
+
| **external_id** | **String** | | |
|
|
12
|
+
| **action_url** | **String** | | |
|
|
13
|
+
| **created_at** | **Time** | | |
|
|
14
|
+
| **service** | [**ServiceSummary**](ServiceSummary.md) | | |
|
|
15
|
+
| **service_id** | **String** | | |
|
|
16
|
+
| **metadata** | **Hash<String, Object>** | | |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'agent_push_kit'
|
|
22
|
+
|
|
23
|
+
instance = AgentPushKit::EventDetail.new(
|
|
24
|
+
id: null,
|
|
25
|
+
type: null,
|
|
26
|
+
title: null,
|
|
27
|
+
body: null,
|
|
28
|
+
external_id: null,
|
|
29
|
+
action_url: null,
|
|
30
|
+
created_at: null,
|
|
31
|
+
service: null,
|
|
32
|
+
service_id: null,
|
|
33
|
+
metadata: null
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
data/docs/EventFilter.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# AgentPushKit::EventFilter
|
|
2
|
+
|
|
3
|
+
## Class instance methods
|
|
4
|
+
|
|
5
|
+
### `openapi_one_of`
|
|
6
|
+
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'agent_push_kit'
|
|
13
|
+
|
|
14
|
+
AgentPushKit::EventFilter.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'FilterGroup',
|
|
18
|
+
# :'FilterNot',
|
|
19
|
+
# :'TextFilterCondition',
|
|
20
|
+
# :'TimeFilterCondition'
|
|
21
|
+
# ]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### build
|
|
25
|
+
|
|
26
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
27
|
+
|
|
28
|
+
#### Example
|
|
29
|
+
|
|
30
|
+
```ruby
|
|
31
|
+
require 'agent_push_kit'
|
|
32
|
+
|
|
33
|
+
AgentPushKit::EventFilter.build(data)
|
|
34
|
+
# => #<FilterGroup:0x00007fdd4aab02a0>
|
|
35
|
+
|
|
36
|
+
AgentPushKit::EventFilter.build(data_that_doesnt_match)
|
|
37
|
+
# => nil
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Parameters
|
|
41
|
+
|
|
42
|
+
| Name | Type | Description |
|
|
43
|
+
| ---- | ---- | ----------- |
|
|
44
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
45
|
+
|
|
46
|
+
#### Return type
|
|
47
|
+
|
|
48
|
+
- `FilterGroup`
|
|
49
|
+
- `FilterNot`
|
|
50
|
+
- `TextFilterCondition`
|
|
51
|
+
- `TimeFilterCondition`
|
|
52
|
+
- `nil` (if no type matches)
|
|
53
|
+
|
data/docs/EventPage.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::EventPage
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **events** | [**Array<EventSummary>**](EventSummary.md) | | |
|
|
8
|
+
| **next_cursor** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::EventPage.new(
|
|
16
|
+
events: null,
|
|
17
|
+
next_cursor: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AgentPushKit::EventSummary
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **type** | **String** | | |
|
|
9
|
+
| **title** | **String** | | |
|
|
10
|
+
| **body** | **String** | | |
|
|
11
|
+
| **external_id** | **String** | | |
|
|
12
|
+
| **action_url** | **String** | | |
|
|
13
|
+
| **created_at** | **Time** | | |
|
|
14
|
+
| **service** | [**ServiceSummary**](ServiceSummary.md) | | |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'agent_push_kit'
|
|
20
|
+
|
|
21
|
+
instance = AgentPushKit::EventSummary.new(
|
|
22
|
+
id: null,
|
|
23
|
+
type: null,
|
|
24
|
+
title: null,
|
|
25
|
+
body: null,
|
|
26
|
+
external_id: null,
|
|
27
|
+
action_url: null,
|
|
28
|
+
created_at: null,
|
|
29
|
+
service: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|