Skip to content

Commit

Permalink
Add currentMember endpoint (#66)
Browse files Browse the repository at this point in the history
* add currentMember endpoint

* Alphabetical imports

Co-authored-by: Nicolas Charpentier <[email protected]>
  • Loading branch information
j-martin and charpeni committed Jan 22, 2020
1 parent c6f62de commit 373112f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import FetchRequestParser from './FetchRequestParser';
import {
Comment,
CreateTaskParams,
CurrentMember,
Epic,
EpicChange,
File,
Expand Down Expand Up @@ -131,6 +132,11 @@ class Client<RequestType, ResponseType> {
}

/** */
getCurrentMember(): Promise<CurrentMember> {
return this.getResource('member');
}

/** Not Available through the API */
getCurrentUser(): Promise<Member> {
return this.getResource('user');
}
Expand Down
12 changes: 12 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ export type Member = {
};
};

export interface CurrentMember {
id: string;
mention_name: string;
name: string;
workspace2: Workspace2;
}

export interface Workspace2 {
estimate_scale: number[];
url_slug: string;
}

/* Projects */

export type Project = {
Expand Down

0 comments on commit 373112f

Please sign in to comment.