From 136faac34935bb46c019b20272808b6feea21e5b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 3 Dec 2021 14:51:08 -0700 Subject: [PATCH] Optimize imports --- src/api/admin/AdminHookshotWebhookService.ts | 1 - src/api/dimension/DimensionHookshotWebhookService.ts | 10 ++-------- src/bridges/HookshotWebhookBridge.ts | 5 +---- src/db/BridgeStore.ts | 4 ++-- src/integrations/Bridge.ts | 2 +- .../hookshot-webhook.bridge.component.ts | 3 --- .../admin/admin-hookshot-webhook-api.service.ts | 1 - 7 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/api/admin/AdminHookshotWebhookService.ts b/src/api/admin/AdminHookshotWebhookService.ts index 354f609..bfbd58f 100644 --- a/src/api/admin/AdminHookshotWebhookService.ts +++ b/src/api/admin/AdminHookshotWebhookService.ts @@ -3,7 +3,6 @@ import { Cache, CACHE_HOOKSHOT_WEBHOOK_BRIDGE, CACHE_INTEGRATIONS } from "../../ import { LogService } from "matrix-bot-sdk"; import { ApiError } from "../ApiError"; import { ROLE_ADMIN, ROLE_USER } from "../security/MatrixSecurity"; -import HookshotGithubBridgeRecord from "../../db/models/HookshotGithubBridgeRecord"; import HookshotWebhookBridgeRecord from "../../db/models/HookshotWebhookBridgeRecord"; interface CreateWithUpstream { diff --git a/src/api/dimension/DimensionHookshotWebhookService.ts b/src/api/dimension/DimensionHookshotWebhookService.ts index 0402378..c1206b3 100644 --- a/src/api/dimension/DimensionHookshotWebhookService.ts +++ b/src/api/dimension/DimensionHookshotWebhookService.ts @@ -1,14 +1,8 @@ -import { Context, DELETE, GET, Path, PathParam, POST, Security, ServiceContext } from "typescript-rest"; +import { Context, DELETE, Path, PathParam, POST, Security, ServiceContext } from "typescript-rest"; import { ApiError } from "../ApiError"; import { LogService } from "matrix-bot-sdk"; import { ROLE_USER } from "../security/MatrixSecurity"; -import { - HookshotGithubOrg, - HookshotGithubRepo, - HookshotGithubRoomConfig, - HookshotWebhookRoomConfig -} from "../../bridges/models/hookshot"; -import { HookshotGithubBridge } from "../../bridges/HookshotGithubBridge"; +import { HookshotWebhookRoomConfig } from "../../bridges/models/hookshot"; import { HookshotWebhookBridge } from "../../bridges/HookshotWebhookBridge"; interface BridgeRoomRequest { diff --git a/src/bridges/HookshotWebhookBridge.ts b/src/bridges/HookshotWebhookBridge.ts index 312854a..b0009b3 100644 --- a/src/bridges/HookshotWebhookBridge.ts +++ b/src/bridges/HookshotWebhookBridge.ts @@ -1,7 +1,4 @@ -import { - HookshotTypes, - HookshotWebhookRoomConfig -} from "./models/hookshot"; +import { HookshotTypes, HookshotWebhookRoomConfig } from "./models/hookshot"; import { HookshotBridge } from "./HookshotBridge"; import HookshotWebhookBridgeRecord from "../db/models/HookshotWebhookBridgeRecord"; diff --git a/src/db/BridgeStore.ts b/src/db/BridgeStore.ts index 88435de..806e242 100644 --- a/src/db/BridgeStore.ts +++ b/src/db/BridgeStore.ts @@ -1,7 +1,8 @@ import { Bridge, HookshotGithubBridgeConfiguration, - HookshotJiraBridgeConfiguration, HookshotWebhookBridgeConfiguration, + HookshotJiraBridgeConfiguration, + HookshotWebhookBridgeConfiguration, SlackBridgeConfiguration, TelegramBridgeConfiguration, WebhookBridgeConfiguration @@ -15,7 +16,6 @@ import { SlackBridge } from "../bridges/SlackBridge"; import { HookshotGithubBridge } from "../bridges/HookshotGithubBridge"; import { HookshotJiraBridge } from "../bridges/HookshotJiraBridge"; import { HookshotWebhookBridge } from "../bridges/HookshotWebhookBridge"; -import HookshotWebhookBridgeRecord from "./models/HookshotWebhookBridgeRecord"; export class BridgeStore { diff --git a/src/integrations/Bridge.ts b/src/integrations/Bridge.ts index 74d053f..624bc87 100644 --- a/src/integrations/Bridge.ts +++ b/src/integrations/Bridge.ts @@ -5,7 +5,7 @@ import { PortalInfo, PuppetInfo } from "../bridges/TelegramBridge"; import { WebhookConfiguration } from "../bridges/models/webhooks"; import { BridgedChannel } from "../bridges/SlackBridge"; import { - HookshotConnection, HookshotGithubRoomConfig, + HookshotGithubRoomConfig, HookshotJiraInstance, HookshotJiraRoomConfig, HookshotWebhookRoomConfig diff --git a/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.ts b/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.ts index bba9d6f..0578fb0 100644 --- a/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.ts +++ b/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.ts @@ -1,10 +1,7 @@ import { Component } from "@angular/core"; import { BridgeComponent } from "../bridge.component"; -import { FE_Webhook } from "../../../shared/models/webhooks"; -import { WebhooksApiService } from "../../../shared/services/integrations/webhooks-api.service"; import { ScalarClientApiService } from "../../../shared/services/scalar/scalar-client-api.service"; import { TranslateService } from "@ngx-translate/core"; -import { FE_HookshotJiraConnection } from "../../../shared/models/hookshot_jira"; import { FE_HookshotWebhookConnection } from "../../../shared/models/hookshot_webhook"; import { HookshotWebhookApiService } from "../../../shared/services/integrations/hookshot-webhook-api.service"; diff --git a/web/app/shared/services/admin/admin-hookshot-webhook-api.service.ts b/web/app/shared/services/admin/admin-hookshot-webhook-api.service.ts index b28ecff..df475ac 100644 --- a/web/app/shared/services/admin/admin-hookshot-webhook-api.service.ts +++ b/web/app/shared/services/admin/admin-hookshot-webhook-api.service.ts @@ -2,7 +2,6 @@ import { Injectable } from "@angular/core"; import { AuthedApi } from "../authed-api"; import { FE_Upstream } from "../../models/admin-responses"; import { HttpClient } from "@angular/common/http"; -import { FE_HookshotGithubBridge } from "../../models/hookshot_github"; import { FE_HookshotWebhookBridge } from "../../models/hookshot_webhook"; @Injectable()