From c03361389fefb9932b085f8d468c48ba68b4394f Mon Sep 17 00:00:00 2001 From: Makoto Motohashi Date: Fri, 19 Mar 2021 18:05:42 +0900 Subject: [PATCH] Add deprecated annotation (resolves #29) --- dist/backlog.d.ts | 10 ++++++++++ src/backlog.ts | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/dist/backlog.d.ts b/dist/backlog.d.ts index 6a06144..10e6548 100644 --- a/dist/backlog.d.ts +++ b/dist/backlog.d.ts @@ -57,11 +57,17 @@ declare module 'backlog-js' { getRecentlyViewedIssues(params: Option.User.GetRecentlyViewedParams): Promise; getRecentlyViewedProjects(params: Option.User.GetRecentlyViewedParams): Promise; getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise; + /** @deprecated */ getGroups(params: Option.Group.GetGroupsParams): Promise; + /** @deprecated */ postGroups(params: Option.Group.PostGroupsParams): Promise; + /** @deprecated */ getGroup(groupId: number): Promise; + /** @deprecated */ patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise; + /** @deprecated */ deleteGroup(groupId: number): Promise; + /** @deprecated */ getStatuses(): Promise; getProjectStatuses(projectIdOrKey: string): Promise; getResolutions(): Promise; @@ -173,9 +179,13 @@ declare module 'backlog-js' { patchWatchingListItem(watchId: number, note: string): Promise; deletehWatchingListItem(watchId: number); resetWatchingListItemAsRead(watchId: number): Promise; + /** @deprecated */ getProjectGroupList(projectIdOrKey: string|number); + /** @deprecated */ postProjectGroup(projectIdOrKey: string|number, params: any); + /** @deprecated */ deleteProjectGroup(projectIdOrKey: string|number); + /** @deprecated */ getGroupIcon(groupId: string): Promise; getLicence(): Promise; getTeams(params?: Option.Team.GetTeamsParams): Promise; diff --git a/src/backlog.ts b/src/backlog.ts index da2671d..ca57a06 100644 --- a/src/backlog.ts +++ b/src/backlog.ts @@ -170,6 +170,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/get-list-of-groups/ + * @deprecated */ public getGroups(params: Option.Group.GetGroupsParams): Promise { console.warn("Deprecated: Use getTeams instead."); @@ -178,6 +179,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/add-group/ + * @deprecated */ public postGroups(params: Option.Group.PostGroupsParams): Promise { console.warn("Deprecated: Use postTeam instead."); @@ -186,6 +188,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/get-group/ + * @deprecated */ public getGroup(groupId: number): Promise { console.warn("Deprecated: Use getTeam instead."); @@ -194,6 +197,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/update-group/ + * @deprecated */ public patchGroup( groupId: number, params: Option.Group.PatchGroupParams @@ -204,6 +208,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/delete-group/ + * @deprecated */ public deleteGroup(groupId: number): Promise { console.warn("Deprecated: Use deleteTeam instead."); @@ -212,6 +217,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/get-status-list/ + * @deprecated */ public getStatuses(): Promise { console.warn("Deprecated: Use getProjectStatuses instead."); @@ -1122,6 +1128,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/get-project-group-list + * @deprecated */ public getProjectGroupList(projectIdOrKey: string|number) { console.warn("Deprecated: Use getProjectTeams instead."); @@ -1130,6 +1137,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/add-project-group + * @deprecated */ public postProjectGroup(projectIdOrKey: string|number, params: any) { console.warn("Deprecated: Use postProjectTeam instead."); @@ -1138,6 +1146,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/delete-project-group + * @deprecated */ public deleteProjectGroup(projectIdOrKey: string|number) { console.warn("Deprecated: Use deleteProjectTeam instead."); @@ -1146,6 +1155,7 @@ export default class Backlog extends Request { /** * https://developer.nulab.com/docs/backlog/api/2/get-group-icon + * @deprecated */ public getGroupIcon(groupId: string): Promise { console.warn("Deprecated: Use getTeamIcon instead.");