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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgentPushKit::MembershipUser
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **email** | **String** | | |
|
|
9
|
+
| **display_name** | **String** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'agent_push_kit'
|
|
15
|
+
|
|
16
|
+
instance = AgentPushKit::MembershipUser.new(
|
|
17
|
+
id: null,
|
|
18
|
+
email: null,
|
|
19
|
+
display_name: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AgentPushKit::Organization
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
| **role** | **String** | | |
|
|
10
|
+
| **created_at** | **Time** | | |
|
|
11
|
+
| **updated_at** | **Time** | | |
|
|
12
|
+
| **joined_at** | **Time** | | |
|
|
13
|
+
| **api_key** | [**ApiKeySummary**](ApiKeySummary.md) | | [optional] |
|
|
14
|
+
| **_count** | [**OrganizationCount**](OrganizationCount.md) | | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'agent_push_kit'
|
|
20
|
+
|
|
21
|
+
instance = AgentPushKit::Organization.new(
|
|
22
|
+
id: null,
|
|
23
|
+
name: null,
|
|
24
|
+
role: null,
|
|
25
|
+
created_at: null,
|
|
26
|
+
updated_at: null,
|
|
27
|
+
joined_at: null,
|
|
28
|
+
api_key: null,
|
|
29
|
+
_count: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgentPushKit::OrganizationApiKeyCreated
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **key_prefix** | **String** | | |
|
|
8
|
+
| **last_four** | **String** | | |
|
|
9
|
+
| **updated_at** | **Time** | | |
|
|
10
|
+
| **api_key** | **String** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'agent_push_kit'
|
|
16
|
+
|
|
17
|
+
instance = AgentPushKit::OrganizationApiKeyCreated.new(
|
|
18
|
+
key_prefix: null,
|
|
19
|
+
last_four: null,
|
|
20
|
+
updated_at: null,
|
|
21
|
+
api_key: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::OrganizationCount
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **memberships** | **Integer** | | [optional] |
|
|
8
|
+
| **services** | **Integer** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::OrganizationCount.new(
|
|
16
|
+
memberships: null,
|
|
17
|
+
services: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::OrganizationCreated
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **organization** | [**OrganizationRecord**](OrganizationRecord.md) | | |
|
|
8
|
+
| **api_key** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::OrganizationCreated.new(
|
|
16
|
+
organization: null,
|
|
17
|
+
api_key: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgentPushKit::OrganizationRecord
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
| **created_at** | **Time** | | |
|
|
10
|
+
| **updated_at** | **Time** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'agent_push_kit'
|
|
16
|
+
|
|
17
|
+
instance = AgentPushKit::OrganizationRecord.new(
|
|
18
|
+
id: null,
|
|
19
|
+
name: null,
|
|
20
|
+
created_at: null,
|
|
21
|
+
updated_at: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::PasswordLoginInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | |
|
|
8
|
+
| **password** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::PasswordLoginInput.new(
|
|
16
|
+
email: null,
|
|
17
|
+
password: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::PasswordResetCompleteInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **token** | **String** | | |
|
|
8
|
+
| **password** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::PasswordResetCompleteInput.new(
|
|
16
|
+
token: null,
|
|
17
|
+
password: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# AgentPushKit::PasswordResetRequestInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'agent_push_kit'
|
|
13
|
+
|
|
14
|
+
instance = AgentPushKit::PasswordResetRequestInput.new(
|
|
15
|
+
email: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgentPushKit::PreferenceRecord
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **service_id** | **String** | | |
|
|
8
|
+
| **type_key** | **String** | | |
|
|
9
|
+
| **enabled** | **Boolean** | | |
|
|
10
|
+
| **updated_at** | **Time** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'agent_push_kit'
|
|
16
|
+
|
|
17
|
+
instance = AgentPushKit::PreferenceRecord.new(
|
|
18
|
+
service_id: null,
|
|
19
|
+
type_key: null,
|
|
20
|
+
enabled: null,
|
|
21
|
+
updated_at: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# AgentPushKit::PreferencesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**list_preferences**](PreferencesApi.md#list_preferences) | **GET** /organizations/{organizationId}/preferences | List service defaults and exact-type overrides |
|
|
8
|
+
| [**remove_type_preference**](PreferencesApi.md#remove_type_preference) | **DELETE** /services/{serviceId}/types/{type}/preference | Remove an exact-type override so it inherits the service default |
|
|
9
|
+
| [**set_service_preference**](PreferencesApi.md#set_service_preference) | **PUT** /services/{serviceId}/preference | Enable or disable pushes for a service by default |
|
|
10
|
+
| [**set_type_preference**](PreferencesApi.md#set_type_preference) | **PUT** /services/{serviceId}/types/{type}/preference | Override push delivery for one exact notification type |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## list_preferences
|
|
14
|
+
|
|
15
|
+
> <Array<ServicePreference>> list_preferences(organization_id)
|
|
16
|
+
|
|
17
|
+
List service defaults and exact-type overrides
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'agent_push_kit'
|
|
24
|
+
# setup authorization
|
|
25
|
+
AgentPushKit.configure do |config|
|
|
26
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
api_instance = AgentPushKit::PreferencesApi.new
|
|
31
|
+
organization_id = 'organization_id_example' # String |
|
|
32
|
+
|
|
33
|
+
begin
|
|
34
|
+
# List service defaults and exact-type overrides
|
|
35
|
+
result = api_instance.list_preferences(organization_id)
|
|
36
|
+
p result
|
|
37
|
+
rescue AgentPushKit::ApiError => e
|
|
38
|
+
puts "Error when calling PreferencesApi->list_preferences: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the list_preferences_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(<Array<ServicePreference>>, Integer, Hash)> list_preferences_with_http_info(organization_id)
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# List service defaults and exact-type overrides
|
|
51
|
+
data, status_code, headers = api_instance.list_preferences_with_http_info(organization_id)
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => <Array<ServicePreference>>
|
|
55
|
+
rescue AgentPushKit::ApiError => e
|
|
56
|
+
puts "Error when calling PreferencesApi->list_preferences_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Notes |
|
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
|
64
|
+
| **organization_id** | **String** | | |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**Array<ServicePreference>**](ServicePreference.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: Not defined
|
|
77
|
+
- **Accept**: application/json
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## remove_type_preference
|
|
81
|
+
|
|
82
|
+
> <InheritedResponse> remove_type_preference(service_id, type)
|
|
83
|
+
|
|
84
|
+
Remove an exact-type override so it inherits the service default
|
|
85
|
+
|
|
86
|
+
### Examples
|
|
87
|
+
|
|
88
|
+
```ruby
|
|
89
|
+
require 'time'
|
|
90
|
+
require 'agent_push_kit'
|
|
91
|
+
# setup authorization
|
|
92
|
+
AgentPushKit.configure do |config|
|
|
93
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
94
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
api_instance = AgentPushKit::PreferencesApi.new
|
|
98
|
+
service_id = 'service_id_example' # String |
|
|
99
|
+
type = 'type_example' # String |
|
|
100
|
+
|
|
101
|
+
begin
|
|
102
|
+
# Remove an exact-type override so it inherits the service default
|
|
103
|
+
result = api_instance.remove_type_preference(service_id, type)
|
|
104
|
+
p result
|
|
105
|
+
rescue AgentPushKit::ApiError => e
|
|
106
|
+
puts "Error when calling PreferencesApi->remove_type_preference: #{e}"
|
|
107
|
+
end
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Using the remove_type_preference_with_http_info variant
|
|
111
|
+
|
|
112
|
+
This returns an Array which contains the response data, status code and headers.
|
|
113
|
+
|
|
114
|
+
> <Array(<InheritedResponse>, Integer, Hash)> remove_type_preference_with_http_info(service_id, type)
|
|
115
|
+
|
|
116
|
+
```ruby
|
|
117
|
+
begin
|
|
118
|
+
# Remove an exact-type override so it inherits the service default
|
|
119
|
+
data, status_code, headers = api_instance.remove_type_preference_with_http_info(service_id, type)
|
|
120
|
+
p status_code # => 2xx
|
|
121
|
+
p headers # => { ... }
|
|
122
|
+
p data # => <InheritedResponse>
|
|
123
|
+
rescue AgentPushKit::ApiError => e
|
|
124
|
+
puts "Error when calling PreferencesApi->remove_type_preference_with_http_info: #{e}"
|
|
125
|
+
end
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Parameters
|
|
129
|
+
|
|
130
|
+
| Name | Type | Description | Notes |
|
|
131
|
+
| ---- | ---- | ----------- | ----- |
|
|
132
|
+
| **service_id** | **String** | | |
|
|
133
|
+
| **type** | **String** | | |
|
|
134
|
+
|
|
135
|
+
### Return type
|
|
136
|
+
|
|
137
|
+
[**InheritedResponse**](InheritedResponse.md)
|
|
138
|
+
|
|
139
|
+
### Authorization
|
|
140
|
+
|
|
141
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
142
|
+
|
|
143
|
+
### HTTP request headers
|
|
144
|
+
|
|
145
|
+
- **Content-Type**: Not defined
|
|
146
|
+
- **Accept**: application/json
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## set_service_preference
|
|
150
|
+
|
|
151
|
+
> <PreferenceRecord> set_service_preference(service_id, set_enabled_input)
|
|
152
|
+
|
|
153
|
+
Enable or disable pushes for a service by default
|
|
154
|
+
|
|
155
|
+
### Examples
|
|
156
|
+
|
|
157
|
+
```ruby
|
|
158
|
+
require 'time'
|
|
159
|
+
require 'agent_push_kit'
|
|
160
|
+
# setup authorization
|
|
161
|
+
AgentPushKit.configure do |config|
|
|
162
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
163
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
api_instance = AgentPushKit::PreferencesApi.new
|
|
167
|
+
service_id = 'service_id_example' # String |
|
|
168
|
+
set_enabled_input = AgentPushKit::SetEnabledInput.new({enabled: false}) # SetEnabledInput |
|
|
169
|
+
|
|
170
|
+
begin
|
|
171
|
+
# Enable or disable pushes for a service by default
|
|
172
|
+
result = api_instance.set_service_preference(service_id, set_enabled_input)
|
|
173
|
+
p result
|
|
174
|
+
rescue AgentPushKit::ApiError => e
|
|
175
|
+
puts "Error when calling PreferencesApi->set_service_preference: #{e}"
|
|
176
|
+
end
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Using the set_service_preference_with_http_info variant
|
|
180
|
+
|
|
181
|
+
This returns an Array which contains the response data, status code and headers.
|
|
182
|
+
|
|
183
|
+
> <Array(<PreferenceRecord>, Integer, Hash)> set_service_preference_with_http_info(service_id, set_enabled_input)
|
|
184
|
+
|
|
185
|
+
```ruby
|
|
186
|
+
begin
|
|
187
|
+
# Enable or disable pushes for a service by default
|
|
188
|
+
data, status_code, headers = api_instance.set_service_preference_with_http_info(service_id, set_enabled_input)
|
|
189
|
+
p status_code # => 2xx
|
|
190
|
+
p headers # => { ... }
|
|
191
|
+
p data # => <PreferenceRecord>
|
|
192
|
+
rescue AgentPushKit::ApiError => e
|
|
193
|
+
puts "Error when calling PreferencesApi->set_service_preference_with_http_info: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Parameters
|
|
198
|
+
|
|
199
|
+
| Name | Type | Description | Notes |
|
|
200
|
+
| ---- | ---- | ----------- | ----- |
|
|
201
|
+
| **service_id** | **String** | | |
|
|
202
|
+
| **set_enabled_input** | [**SetEnabledInput**](SetEnabledInput.md) | | |
|
|
203
|
+
|
|
204
|
+
### Return type
|
|
205
|
+
|
|
206
|
+
[**PreferenceRecord**](PreferenceRecord.md)
|
|
207
|
+
|
|
208
|
+
### Authorization
|
|
209
|
+
|
|
210
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
211
|
+
|
|
212
|
+
### HTTP request headers
|
|
213
|
+
|
|
214
|
+
- **Content-Type**: application/json
|
|
215
|
+
- **Accept**: application/json
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
## set_type_preference
|
|
219
|
+
|
|
220
|
+
> <PreferenceRecord> set_type_preference(service_id, type, set_enabled_input)
|
|
221
|
+
|
|
222
|
+
Override push delivery for one exact notification type
|
|
223
|
+
|
|
224
|
+
### Examples
|
|
225
|
+
|
|
226
|
+
```ruby
|
|
227
|
+
require 'time'
|
|
228
|
+
require 'agent_push_kit'
|
|
229
|
+
# setup authorization
|
|
230
|
+
AgentPushKit.configure do |config|
|
|
231
|
+
# Configure Bearer authorization (Agent Push Kit JWT or apt_ token): UserOrAgent
|
|
232
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
api_instance = AgentPushKit::PreferencesApi.new
|
|
236
|
+
service_id = 'service_id_example' # String |
|
|
237
|
+
type = 'type_example' # String |
|
|
238
|
+
set_enabled_input = AgentPushKit::SetEnabledInput.new({enabled: false}) # SetEnabledInput |
|
|
239
|
+
|
|
240
|
+
begin
|
|
241
|
+
# Override push delivery for one exact notification type
|
|
242
|
+
result = api_instance.set_type_preference(service_id, type, set_enabled_input)
|
|
243
|
+
p result
|
|
244
|
+
rescue AgentPushKit::ApiError => e
|
|
245
|
+
puts "Error when calling PreferencesApi->set_type_preference: #{e}"
|
|
246
|
+
end
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
#### Using the set_type_preference_with_http_info variant
|
|
250
|
+
|
|
251
|
+
This returns an Array which contains the response data, status code and headers.
|
|
252
|
+
|
|
253
|
+
> <Array(<PreferenceRecord>, Integer, Hash)> set_type_preference_with_http_info(service_id, type, set_enabled_input)
|
|
254
|
+
|
|
255
|
+
```ruby
|
|
256
|
+
begin
|
|
257
|
+
# Override push delivery for one exact notification type
|
|
258
|
+
data, status_code, headers = api_instance.set_type_preference_with_http_info(service_id, type, set_enabled_input)
|
|
259
|
+
p status_code # => 2xx
|
|
260
|
+
p headers # => { ... }
|
|
261
|
+
p data # => <PreferenceRecord>
|
|
262
|
+
rescue AgentPushKit::ApiError => e
|
|
263
|
+
puts "Error when calling PreferencesApi->set_type_preference_with_http_info: #{e}"
|
|
264
|
+
end
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Parameters
|
|
268
|
+
|
|
269
|
+
| Name | Type | Description | Notes |
|
|
270
|
+
| ---- | ---- | ----------- | ----- |
|
|
271
|
+
| **service_id** | **String** | | |
|
|
272
|
+
| **type** | **String** | | |
|
|
273
|
+
| **set_enabled_input** | [**SetEnabledInput**](SetEnabledInput.md) | | |
|
|
274
|
+
|
|
275
|
+
### Return type
|
|
276
|
+
|
|
277
|
+
[**PreferenceRecord**](PreferenceRecord.md)
|
|
278
|
+
|
|
279
|
+
### Authorization
|
|
280
|
+
|
|
281
|
+
[UserOrAgent](../README.md#UserOrAgent)
|
|
282
|
+
|
|
283
|
+
### HTTP request headers
|
|
284
|
+
|
|
285
|
+
- **Content-Type**: application/json
|
|
286
|
+
- **Accept**: application/json
|
|
287
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::ProviderLoginInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id_token** | **String** | | |
|
|
8
|
+
| **display_name** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::ProviderLoginInput.new(
|
|
16
|
+
id_token: null,
|
|
17
|
+
display_name: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AgentPushKit::RegisterDeviceInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **device_token** | **String** | | |
|
|
8
|
+
| **installation_id** | **String** | | |
|
|
9
|
+
| **environment** | **String** | | |
|
|
10
|
+
| **app_version** | **String** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'agent_push_kit'
|
|
16
|
+
|
|
17
|
+
instance = AgentPushKit::RegisterDeviceInput.new(
|
|
18
|
+
device_token: null,
|
|
19
|
+
installation_id: null,
|
|
20
|
+
environment: null,
|
|
21
|
+
app_version: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgentPushKit::RegisterInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | |
|
|
8
|
+
| **password** | **String** | | |
|
|
9
|
+
| **display_name** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'agent_push_kit'
|
|
15
|
+
|
|
16
|
+
instance = AgentPushKit::RegisterInput.new(
|
|
17
|
+
email: null,
|
|
18
|
+
password: null,
|
|
19
|
+
display_name: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::RegisterWebPushSubscriptionInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **endpoint** | **String** | | |
|
|
8
|
+
| **keys** | [**RegisterWebPushSubscriptionInputKeys**](RegisterWebPushSubscriptionInputKeys.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::RegisterWebPushSubscriptionInput.new(
|
|
16
|
+
endpoint: null,
|
|
17
|
+
keys: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AgentPushKit::RegisterWebPushSubscriptionInputKeys
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **p256dh** | **String** | | |
|
|
8
|
+
| **auth** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'agent_push_kit'
|
|
14
|
+
|
|
15
|
+
instance = AgentPushKit::RegisterWebPushSubscriptionInputKeys.new(
|
|
16
|
+
p256dh: null,
|
|
17
|
+
auth: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# AgentPushKit::RevokedResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **revoked** | **Boolean** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'agent_push_kit'
|
|
13
|
+
|
|
14
|
+
instance = AgentPushKit::RevokedResponse.new(
|
|
15
|
+
revoked: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# AgentPushKit::SearchEventsInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **filter** | [**EventFilter**](EventFilter.md) | | |
|
|
8
|
+
| **cursor** | **String** | | [optional] |
|
|
9
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'agent_push_kit'
|
|
15
|
+
|
|
16
|
+
instance = AgentPushKit::SearchEventsInput.new(
|
|
17
|
+
filter: null,
|
|
18
|
+
cursor: null,
|
|
19
|
+
limit: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|