From 3fae0f39c09d682cc89e96980a750b63813091ad Mon Sep 17 00:00:00 2001 From: anmolsinghbhatia Date: Fri, 28 Apr 2023 18:28:43 +0530 Subject: [PATCH] chore: product update interface --- apps/app/services/workspace.service.ts | 3 +- apps/app/types/workspace.d.ts | 52 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/apps/app/services/workspace.service.ts b/apps/app/services/workspace.service.ts index f6c319e64..7fe1ec198 100644 --- a/apps/app/services/workspace.service.ts +++ b/apps/app/services/workspace.service.ts @@ -11,6 +11,7 @@ import { IWorkspaceMemberInvitation, ILastActiveWorkspaceDetails, IWorkspaceSearchResults, + IProductUpdateResponse, } from "types"; const trackEvent = @@ -206,7 +207,7 @@ class WorkspaceService extends APIService { throw error?.response?.data; }); } - async getProductUpdates(): Promise { + async getProductUpdates(): Promise { return this.get("/api/release-notes/") .then((response) => response?.data) .catch((error) => { diff --git a/apps/app/types/workspace.d.ts b/apps/app/types/workspace.d.ts index e31d8f481..91948af46 100644 --- a/apps/app/types/workspace.d.ts +++ b/apps/app/types/workspace.d.ts @@ -82,3 +82,55 @@ export interface IWorkspaceSearchResults { page: IWorkspaceDefaultSearchResult[]; }; } + +export interface IProductUpdateResponse { + url: string; + assets_url: string; + upload_url: string; + html_url: string; + id: number; + author: { + login: string; + id: string; + node_id: string; + avatar_url: string; + gravatar_id: ""; + url: string; + html_url: string; + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + subscriptions_url: string; + organizations_url: string; + repos_url: string; + events_url: string; + received_events_url: string; + type: string; + site_admin: false; + }; + node_id: string; + tag_name: string; + target_commitish: string; + name: string; + draft: boolean; + prerelease: true; + created_at: string; + published_at: string; + assets: []; + tarball_url: string; + zipball_url: string; + body: string; + reactions: { + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + hooray: number; + confused: number; + heart: number; + rocket: number; + eyes: number; + }; +}