Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks/intercom: Add webhook fixtures for admin events.
sathwikshetty3303ae8b1afd82
diff --git a/zerver/webhooks/intercom/fixtures/admin_activity_log_event_created.json b/zerver/webhooks/intercom/fixtures/admin_activity_log_event_created.jsonnew file mode 100644index 00000000000..dc338b80d6e--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/admin_activity_log_event_created.json@@ -0,0 +1,32 @@+{+ "type": "notification_event",+ "app_id": "abc123def",+ "data": {+ "type": "notification_event_data",+ "item": {+ "type": "admin_activity_log_event",+ "id": "f98f9a55-e125-4d4d-ad60-7cfc5f553cfc",+ "performed_by": {+ "type": "admin",+ "id": "1234567",+ "email": "[email protected]",+ "ip": "192.0.2.1"+ },+ "metadata": {+ "enabled": false+ },+ "created_at": 1768016203,+ "activity_type": "ai_inbox_translation_setting_change",+ "activity_description": "John Doe disabled the AI inbox translation settings."+ }+ },+ "links": {},+ "id": "notif_6a8c959f-3b5b-46f8-b8a6-9a7a5e6f2bec",+ "topic": "admin.activity_log_event.created",+ "delivery_status": "pending",+ "delivery_attempts": 1,+ "delivered_at": 0,+ "first_sent_at": 1768016203,+ "created_at": 1768016203,+ "self": null+}diff --git a/zerver/webhooks/intercom/fixtures/admin_added_to_workspace.json b/zerver/webhooks/intercom/fixtures/admin_added_to_workspace.jsonnew file mode 100644index 00000000000..facfcc30bad--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/admin_added_to_workspace.json@@ -0,0 +1,34 @@+{+ "type": "notification_event",+ "app_id": "abc123def",+ "data": {+ "type": "notification_event_data",+ "item": {+ "type": "admin",+ "id": 1234568,+ "name": "John Doe",+ "email": "[email protected]",+ "job_title": null,+ "away_mode_enabled": false,+ "away_mode_reassign": false,+ "away_status_reason": "",+ "has_inbox_seat": true,+ "team_ids": [+ 9680998+ ],+ "avatar": {+ "type": "avatar",+ "image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"+ }+ }+ },+ "links": {},+ "id": "notif_5a0b13ce-6163-47b4-bd2d-4f65d09b0762",+ "topic": "admin.added_to_workspace",+ "delivery_status": "pending",+ "delivery_attempts": 1,+ "delivered_at": 0,+ "first_sent_at": 1768016560,+ "created_at": 1768016560,+ "self": null+}diff --git a/zerver/webhooks/intercom/fixtures/admin_away_mode_updated.json b/zerver/webhooks/intercom/fixtures/admin_away_mode_updated.jsonnew file mode 100644index 00000000000..b2852269341--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/admin_away_mode_updated.json@@ -0,0 +1,34 @@+{+ "type": "notification_event",+ "app_id": "abc123def",+ "data": {+ "type": "notification_event_data",+ "item": {+ "type": "admin",+ "id": 1234567,+ "name": "John Doe",+ "email": "[email protected]",+ "job_title": null,+ "away_mode_enabled": true,+ "away_mode_reassign": false,+ "away_status_reason": "",+ "has_inbox_seat": true,+ "team_ids": [+ 9680998+ ],+ "avatar": {+ "type": "avatar",+ "image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"+ }+ }+ },+ "links": {},+ "id": "notif_ca8a37c8-c6b7-4a5c-89bf-1491a6e53131",+ "topic": "admin.away_mode_updated",+ "delivery_status": "pending",+ "delivery_attempts": 1,+ "delivered_at": 0,+ "first_sent_at": 1768016828,+ "created_at": 1768016828,+ "self": null+}diff --git a/zerver/webhooks/intercom/fixtures/admin_logged_in.json b/zerver/webhooks/intercom/fixtures/admin_logged_in.jsonnew file mode 100644index 00000000000..d3520899bf5--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/admin_logged_in.json@@ -0,0 +1,34 @@+{+ "type": "notification_event",+ "app_id": "abc123def",+ "data": {+ "type": "notification_event_data",+ "item": {+ "type": "admin",+ "id": 1234567,+ "name": "John Doe",+ "email": "[email protected]",+ "job_title": null,+ "away_mode_enabled": true,+ "away_mode_reassign": false,+ "away_status_reason": "",+ "has_inbox_seat": true,+ "team_ids": [+ 9680998+ ],+ "avatar": {+ "type": "avatar",+ "image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"+ }+ }+ },+ "links": {},+ "id": "notif_1fdf450f-851a-4608-8fa6-31c818df2e94",+ "topic": "admin.logged_in",+ "delivery_status": "pending",+ "delivery_attempts": 1,+ "delivered_at": 0,+ "first_sent_at": 1768016966,+ "created_at": 1768016966,+ "self": null+}diff --git a/zerver/webhooks/intercom/fixtures/admin_logged_out.json b/zerver/webhooks/intercom/fixtures/admin_logged_out.jsonnew file mode 100644index 00000000000..5100a72cb60--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/admin_logged_out.json@@ -0,0 +1,34 @@+{+ "type": "notification_event",+ "app_id": "abc123def",+ "data": {+ "type": "notification_event_data",+ "item": {+ "type": "admin",+ "id": 1234567,+ "name": "John Doe",+ "email": "[email protected]",+ "job_title": null,+ "away_mode_enabled": true,+ "away_mode_reassign": false,+ "away_status_reason": "",+ "has_inbox_seat": true,+ "team_ids": [+ 9680998+ ],+ "avatar": {+ "type": "avatar",+ "image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"+ }+ }+ },+ "links": {},+ "id": "notif_df1a2d64-5fe0-473f-bc99-cb2345f75e4d",+ "topic": "admin.logged_out",+ "delivery_status": "pending",+ "delivery_attempts": 1,+ "delivered_at": 0,+ "first_sent_at": 1768016917,+ "created_at": 1768016917,+ "self": null+}diff --git a/zerver/webhooks/intercom/fixtures/admin_removed_from_workspace.json b/zerver/webhooks/intercom/fixtures/admin_removed_from_workspace.jsonnew file mode 100644index 00000000000..90c88099d2a--- /dev/null+++ b/zerver/webhooks/intercom/fixtures/admin_removed_from_workspace.json@@ -0,0 +1,32 @@+{+ "type": "notification_event",+ "app_id": "abc123def",+ "data": {+ "type": "notification_event_data",+ "item": {+ "type": "admin",+ "id": 1234568,+ "name": "John Doe",+ "email": "[email protected]",+ "job_title": null,+ "away_mode_enabled": false,+ "away_mode_reassign": false,+ "away_status_reason": "",+ "has_inbox_seat": true,+ "team_ids": [],+ "avatar": {+ "type": "avatar",+ "image_url": "https://static.intercomassets.com/assets/default-avatars/admins/128-da5b0f4e5162b0f45cba5a162df89b82eaddb92c5f5ae86e18629c8656aa3365.png"+ }+ }+ },+ "links": {},+ "id": "notif_593f00e1-3fdd-4faf-baaf-00a75749c8b5",+ "topic": "admin.removed_from_workspace",+ "delivery_status": "pending",+ "delivery_attempts": 1,+ "delivered_at": 0,+ "first_sent_at": 1768017183,+ "created_at": 1768017182,+ "self": null+}