File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -754,7 +754,24 @@ export class StreamChat {
754
754
'data_template': 'data handlebars template',
755
755
'apn_template': 'apn notification handlebars template under v2'
756
756
},
757
- 'webhook_url': 'https://acme.com/my/awesome/webhook/'
757
+ 'webhook_url': 'https://acme.com/my/awesome/webhook/',
758
+ 'event_hooks': [
759
+ {
760
+ 'hook_type': 'webhook',
761
+ 'enabled': true,
762
+ 'event_types': ['message.new'],
763
+ 'webhook_url': 'https://acme.com/my/awesome/webhook/'
764
+ },
765
+ {
766
+ 'hook_type': 'sqs',
767
+ 'enabled': true,
768
+ 'event_types': ['message.new'],
769
+ 'sqs_url': 'https://sqs.us-east-1.amazonaws.com/1234567890/my-queue',
770
+ 'sqs_auth_type': 'key',
771
+ 'sqs_key': 'my-access-key',
772
+ 'sqs_secret': 'my-secret-key'
773
+ }
774
+ ]
758
775
}
759
776
*/
760
777
async updateAppSettings ( options : AppSettings ) {
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ export type AppSettingsAPIResponse = APIResponse & {
162
162
sqs_key ?: string ;
163
163
sqs_secret ?: string ;
164
164
sqs_url ?: string ;
165
+ event_hooks ?: Array < EventHook > ;
165
166
suspended ?: boolean ;
166
167
suspended_explanation ?: string ;
167
168
user_search_disallowed_roles ?: string [ ] | null ;
@@ -2242,6 +2243,7 @@ export type AppSettings = {
2242
2243
sqs_key ?: string ;
2243
2244
sqs_secret ?: string ;
2244
2245
sqs_url ?: string ;
2246
+ event_hooks ?: Array < EventHook > ;
2245
2247
video_provider ?: string ;
2246
2248
webhook_events ?: Array < string > | null ;
2247
2249
webhook_url ?: string ;
@@ -3977,3 +3979,27 @@ export type ThreadFilters = QueryFilters<
3977
3979
| PrimitiveFilter < ThreadResponse [ 'last_message_at' ] > ;
3978
3980
}
3979
3981
> ;
3982
+
3983
+ export type HookType = 'webhook' | 'sqs' | 'sns' ;
3984
+
3985
+ export type EventHook = {
3986
+ id ?: string ;
3987
+ hook_type ?: HookType ;
3988
+ enabled ?: boolean ;
3989
+ event_types ?: Array < string > ;
3990
+ webhook_url ?: string ;
3991
+ sqs_queue_url ?: string ;
3992
+ sqs_region ?: string ;
3993
+ sqs_auth_type ?: string ;
3994
+ sqs_key ?: string ;
3995
+ sqs_secret ?: string ;
3996
+ sqs_role_arn ?: string ;
3997
+ sns_topic_arn ?: string ;
3998
+ sns_region ?: string ;
3999
+ sns_auth_type ?: string ;
4000
+ sns_key ?: string ;
4001
+ sns_secret ?: string ;
4002
+ sns_role_arn ?: string ;
4003
+ created_at ?: string ;
4004
+ updated_at ?: string ;
4005
+ } ;
You can’t perform that action at this time.
0 commit comments