From 00211b42893eaef585a54d378d7f6f70159f6410 Mon Sep 17 00:00:00 2001 From: muntaxir4 Date: Sat, 16 Nov 2024 17:12:43 +0530 Subject: [PATCH] refactor(api-client): migrate environment types to @keyshade/schema --- .../api-client/src/controllers/environment.ts | 2 +- .../src/types/environment.types.d.ts | 55 ------------------- 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 packages/api-client/src/types/environment.types.d.ts diff --git a/packages/api-client/src/controllers/environment.ts b/packages/api-client/src/controllers/environment.ts index 67f21b0e..8a002f86 100644 --- a/packages/api-client/src/controllers/environment.ts +++ b/packages/api-client/src/controllers/environment.ts @@ -12,7 +12,7 @@ import { GetEnvironmentResponse, UpdateEnvironmentRequest, UpdateEnvironmentResponse -} from '@api-client/types/environment.types' +} from '@keyshade/schema' import { ClientResponse } from '@keyshade/schema' export default class EnvironmentController { diff --git a/packages/api-client/src/types/environment.types.d.ts b/packages/api-client/src/types/environment.types.d.ts deleted file mode 100644 index fab55d8f..00000000 --- a/packages/api-client/src/types/environment.types.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { PageRequest, PageResponse } from '@keyshade/schema' - -export interface Environment { - id: string - name: string - slug: string - description: string | null - createdAt: string - updatedAt: string - lastUpdatedById: string - projectId: string -} - -export interface CreateEnvironmentRequest { - name: string - description?: string - projectId: string -} - -export interface CreateEnvironmentResponse extends Environment {} - -export interface UpdateEnvironmentRequest - extends Partial> { - slug: string -} - -export interface UpdateEnvironmentResponse extends Environment {} - -export interface GetEnvironmentRequest { - slug: string -} - -export interface GetEnvironmentResponse extends Environment {} - -export interface GetAllEnvironmentsOfProjectRequest extends PageRequest { - projectSlug: string -} - -export interface GetAllEnvironmentsOfProjectResponse - extends PageResponse< - Environment & { - lastUpdatedBy: { - id: string - name: string - email: string - profilePictureUrl: string | null - } - } - > {} - -export interface DeleteEnvironmentRequest { - slug: string -} - -export interface DeleteEnvironmentResponse {}