From b650962089a195aa2c9df9b606b64817d79e77c8 Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Wed, 27 Sep 2023 22:09:45 -0400 Subject: [PATCH] fix: rm duplicated events + sort events --- src/util/webhooks.ts | 48 ++++++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 28 deletions(-) diff --git a/src/util/webhooks.ts b/src/util/webhooks.ts index c2c09aeb..c13f137e 100644 --- a/src/util/webhooks.ts +++ b/src/util/webhooks.ts @@ -1,24 +1,24 @@ export const POSSIBLE_EVENTS = { Channels: [ { - id: 'channel.client.connected', - name: 'Client Connected', + id: 'channel.created', + name: 'Created', }, { - id: 'channel.client.disconnected', - name: 'Client Disconnected', + id: 'channel.client.connected', + name: 'Client Connected', }, { - id: 'channel.created', - name: 'Created', + id: 'channel.updated', + name: 'Updated', }, { id: 'channel.deleted', name: 'Deleted', }, { - id: 'channel.updated', - name: 'Updated', + id: 'channel.client.disconnected', + name: 'Client Disconnected', }, ], Ignite: [ @@ -34,22 +34,22 @@ export const POSSIBLE_EVENTS = { id: 'ignite.deployment.deleted', name: 'Deployment Deleted', }, - { - id: 'ignite.deployment.build.started', - name: 'Build Started', - }, - { - id: 'ignite.deployment.build.completed', - name: 'Build Completed', - }, { id: 'ignite.deployment.build.created', name: 'Build Created', }, + { + id: 'ignite.deployment.build.started', + name: 'Build Started', + }, { id: 'ignite.deployment.build.updated', name: 'Build Updated', }, + { + id: 'ignite.deployment.build.completed', + name: 'Build Completed', + }, { id: 'ignite.deployment.build.failed', name: 'Build Failed', @@ -116,6 +116,10 @@ export const POSSIBLE_EVENTS = { }, ], Project: [ + { + id: 'project.updated', + name: 'Updated', + }, { id: 'project.member.created', name: 'Member Created', @@ -128,18 +132,6 @@ export const POSSIBLE_EVENTS = { id: 'project.member.deleted', name: 'Member Deleted', }, - { - id: 'project.members.add', - name: 'Member Added', - }, - { - id: 'project.members.remove', - name: 'Member Removed', - }, - { - id: 'project.updated', - name: 'Updated', - }, { id: 'project.tokens.create', name: 'Token Created',