Skip to content

Commit

Permalink
Self code-review
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed May 17, 2024
1 parent 7495305 commit 9e87267
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 48 deletions.
13 changes: 3 additions & 10 deletions src/agile/models/board.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { AvatarUrls } from './avatarUrls';

/** Details about a board. */
export interface Board {
/** The users and groups who own the board. */
Expand All @@ -14,16 +16,7 @@ export interface Board {
accountId?: string;
/** Whether the user is active. */
active?: boolean;
avatarUrls?: {
/** The URL of the user's 16x16 pixel avatar. */
'16x16'?: string;
/** The URL of the user's 24x24 pixel avatar. */
'24x24'?: string;
/** The URL of the user's 32x32 pixel avatar. */
'32x32'?: string;
/** The URL of the user's 48x48 pixel avatar. */
'48x48'?: string;
};
avatarUrls?: AvatarUrls;
/** The display name of the user. Depending on the user’s privacy setting, this may return an alternative value. */
displayName?: string;
/** The URL of the user. */
Expand Down
13 changes: 3 additions & 10 deletions src/agile/models/createBoard.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { AvatarUrls } from './avatarUrls';

/** Details about a board. */
export interface CreateBoard {
/** The users and groups who own the board. */
Expand All @@ -14,16 +16,7 @@ export interface CreateBoard {
accountId?: string;
/** Whether the user is active. */
active?: boolean;
avatarUrls?: {
/** The URL of the user's 16x16 pixel avatar. */
'16x16'?: string;
/** The URL of the user's 24x24 pixel avatar. */
'24x24'?: string;
/** The URL of the user's 32x32 pixel avatar. */
'32x32'?: string;
/** The URL of the user's 48x48 pixel avatar. */
'48x48'?: string;
};
avatarUrls?: AvatarUrls;
/** The display name of the user. Depending on the user’s privacy setting, this may return an alternative value. */
displayName?: string;
/** The URL of the user. */
Expand Down
9 changes: 3 additions & 6 deletions src/agile/models/projects.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { AvatarUrls } from './avatarUrls';

export interface Projects {
self: string;
id: string;
key: string;
name: string;
avatarUrls: {
'48x48': string;
'24x24': string;
'16x16': string;
'32x32': string;
};
avatarUrls: AvatarUrls;
projectCategory: {
self: string;
id: string;
Expand Down
13 changes: 3 additions & 10 deletions src/agile/models/scope.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
import { AvatarUrls } from './avatarUrls';

/**
* The projects the item is associated with. Indicated for items associated with [next-gen
* projects](https://confluence.atlassian.com/x/loMyO).
*/
export interface Scope {
/** Details about a project. */
project?: {
avatarUrls?: {
/** The URL of the item's 16x16 pixel avatar. */
'16x16'?: string;
/** The URL of the item's 24x24 pixel avatar. */
'24x24'?: string;
/** The URL of the item's 32x32 pixel avatar. */
'32x32'?: string;
/** The URL of the item's 48x48 pixel avatar. */
'48x48'?: string;
};
avatarUrls?: AvatarUrls;
/** The ID of the project. */
id?: string;
/** The key of the project. */
Expand Down
13 changes: 3 additions & 10 deletions src/agile/models/user.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { AvatarUrls } from './avatarUrls';

/**
* User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions:*
*
Expand All @@ -22,16 +24,7 @@ export interface User {
accountType: string;
/** Whether the user is active. */
active: boolean;
avatarUrls: {
/** The URL of the item's 16x16 pixel avatar. */
'16x16'?: string;
/** The URL of the item's 24x24 pixel avatar. */
'24x24'?: string;
/** The URL of the item's 32x32 pixel avatar. */
'32x32'?: string;
/** The URL of the item's 48x48 pixel avatar. */
'48x48'?: string;
};
avatarUrls: AvatarUrls;
/** The display name of the user. Depending on the user’s privacy settings, this may return an alternative value. */
displayName: string;
/** The email address of the user. Depending on the user’s privacy settings, this may be returned as null. */
Expand Down
2 changes: 0 additions & 2 deletions src/clients/baseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { HttpException, isObject } from './httpException';
const STRICT_GDPR_FLAG = 'x-atlassian-force-account-id';
const ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token';
const ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check';
const RETRY_AFTER = 'Retry-After';
const RATE_LIMIT_RESET = 'X-RateLimit-Reset';

export class BaseClient implements Client {
private instance: AxiosInstance;
Expand Down

0 comments on commit 9e87267

Please sign in to comment.