Skip to content

Commit

Permalink
Added new REST API v11 fields (#177)
Browse files Browse the repository at this point in the history
* added new api fields

* added new api fields
  • Loading branch information
rcerljenko authored Nov 27, 2023
1 parent f7298c5 commit 2489aa3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Resolver/NotificationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public function resolve(array $data): array
->setAllowedValues('channel_for_external_user_ids', ['push', 'email'])
->setDefined('include_email_tokens')
->setAllowedTypes('include_email_tokens', 'array')
->setDefined('include_phone_numbers')
->setAllowedTypes('include_phone_numbers', 'array')
->setDefined('include_wp_uris')
->setAllowedTypes('include_wp_uris', 'array')
->setDefined('include_wp_wns_uris')
Expand All @@ -83,6 +85,11 @@ public function resolve(array $data): array
->setAllowedTypes('include_chrome_reg_ids', 'array')
->setDefined('include_chrome_web_reg_ids')
->setAllowedTypes('include_chrome_web_reg_ids', 'array')
->setDefined('include_aliases')
->setAllowedTypes('include_aliases', 'array')
->setDefined('target_channel')
->setAllowedTypes('target_channel', 'string')
->setAllowedValues('target_channel', ['push', 'email', 'sms'])
->setDefined('app_ids')
->setAllowedTypes('app_ids', 'array')
->setDefined('filters')
Expand Down
3 changes: 3 additions & 0 deletions tests/Resolver/NotificationResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ public function testResolveWithValidValues(): void
'include_external_user_ids' => ['value'],
'channel_for_external_user_ids' => 'push',
'include_email_tokens' => ['value'],
'include_phone_numbers' => ['value'],
'include_wp_uris' => ['value'],
'include_wp_wns_uris' => ['value'],
'include_amazon_reg_ids' => ['value'],
'include_chrome_reg_ids' => ['value'],
'include_chrome_web_reg_ids' => ['value'],
'include_aliases' => ['value'],
'target_channel' => 'push',
'app_ids' => ['value'],
'filters' => [],
'ios_badgeType' => 'SetTo',
Expand Down

0 comments on commit 2489aa3

Please sign in to comment.