diff --git a/src/agile/models/board.ts b/src/agile/models/board.ts index 0ebb1a923..96fc1d4a4 100644 --- a/src/agile/models/board.ts +++ b/src/agile/models/board.ts @@ -1,3 +1,5 @@ +import { AvatarUrls } from './avatarUrls'; + /** Details about a board. */ export interface Board { /** The users and groups who own the board. */ @@ -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. */ diff --git a/src/agile/models/createBoard.ts b/src/agile/models/createBoard.ts index 06ceba0fa..a506fd0d0 100644 --- a/src/agile/models/createBoard.ts +++ b/src/agile/models/createBoard.ts @@ -1,3 +1,5 @@ +import { AvatarUrls } from './avatarUrls'; + /** Details about a board. */ export interface CreateBoard { /** The users and groups who own the board. */ @@ -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. */ diff --git a/src/agile/models/projects.ts b/src/agile/models/projects.ts index b3fea9b4c..99b2bcd59 100644 --- a/src/agile/models/projects.ts +++ b/src/agile/models/projects.ts @@ -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; diff --git a/src/agile/models/scope.ts b/src/agile/models/scope.ts index a99ccf76d..0f0d631d0 100644 --- a/src/agile/models/scope.ts +++ b/src/agile/models/scope.ts @@ -1,3 +1,5 @@ +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). @@ -5,16 +7,7 @@ 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. */ diff --git a/src/agile/models/user.ts b/src/agile/models/user.ts index 4aa52b385..58b4caf41 100644 --- a/src/agile/models/user.ts +++ b/src/agile/models/user.ts @@ -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:* * @@ -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. */ diff --git a/src/clients/baseClient.ts b/src/clients/baseClient.ts index d3bea4ad1..5ade7e0b4 100644 --- a/src/clients/baseClient.ts +++ b/src/clients/baseClient.ts @@ -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;