diff --git a/src/version2/models/attachment.ts b/src/version2/models/attachment.ts index bf9edc2486..ce08248aca 100644 --- a/src/version2/models/attachment.ts +++ b/src/version2/models/attachment.ts @@ -10,7 +10,7 @@ export interface Attachment { /** The file name of the attachment. */ filename?: string; /** The ID of the attachment. */ - id?: string; + id: string; /** The MIME type of the attachment. */ mimeType?: string; /** The URL of the attachment details response. */ diff --git a/src/version2/models/comment.ts b/src/version2/models/comment.ts index 7183606daa..3a7bda2565 100644 --- a/src/version2/models/comment.ts +++ b/src/version2/models/comment.ts @@ -10,7 +10,7 @@ export interface Comment { /** The date and time at which the comment was created. */ created?: string; /** The ID of the comment. */ - id?: string; + id: string; /** * Whether the comment was added from an email sent by a person who is not part of the issue. See [Allow external * emails to be added as comments on diff --git a/src/version2/models/pageProject.ts b/src/version2/models/pageProject.ts index 15e1f2e18b..e9327c76b2 100644 --- a/src/version2/models/pageProject.ts +++ b/src/version2/models/pageProject.ts @@ -15,5 +15,5 @@ export interface PageProject { /** The number of items returned. */ total?: number; /** The list of items. */ - values?: Project[]; + values: Project[]; } diff --git a/src/version3/models/comment.ts b/src/version3/models/comment.ts index 20c65268f2..b7e4ef1002 100644 --- a/src/version3/models/comment.ts +++ b/src/version3/models/comment.ts @@ -8,7 +8,7 @@ export interface Comment { /** The URL of the comment. */ self?: string; /** The ID of the comment. */ - id?: string; + id: string; author?: UserDetails; /** * The comment text in [Atlassian Document diff --git a/tests/integration/agile/sprint.test.ts b/tests/integration/agile/sprint.test.ts index 617f7ecb33..f8e7185a5a 100644 --- a/tests/integration/agile/sprint.test.ts +++ b/tests/integration/agile/sprint.test.ts @@ -30,7 +30,7 @@ test.serial('should create new sprint', async t => { t.truthy(!!sprint); t.is(sprint.name, 'New sprint'); - t.is(sprint.state, AgileModels.Sprint.State.Future); + t.is(sprint.state, 'future'); }); test.serial('should create and move task to sprint', async t => { @@ -70,12 +70,12 @@ test.serial('should return issues for sprint', async t => { test.serial('should partially update sprint', async t => { const newSprint = await client.sprint.partiallyUpdateSprint({ sprintId: sprint.id, - state: AgileModels.Sprint.State.Active, + state: 'active', startDate: new Date(), endDate: new Date(Date.now() + 1000), }); - t.is(newSprint.state, AgileModels.Sprint.State.Active); + t.is(newSprint.state, 'active'); }); test.serial('should remove sprint', async t => { diff --git a/tests/integration/version2/issueComments.test.ts b/tests/integration/version2/issueComments.test.ts index 1d6cda2e90..8ee8e1ba4d 100644 --- a/tests/integration/version2/issueComments.test.ts +++ b/tests/integration/version2/issueComments.test.ts @@ -43,7 +43,7 @@ test.serial('should update comment', async t => { const updatedComment = await client.issueComments.updateComment({ issueIdOrKey: issue.key, - id: comment.id!, // TODO + id: comment.id, body: 'updated comment', }); diff --git a/tests/integration/version3/issueComments.test.ts b/tests/integration/version3/issueComments.test.ts index 2e7bc1f053..046d2cee27 100644 --- a/tests/integration/version3/issueComments.test.ts +++ b/tests/integration/version3/issueComments.test.ts @@ -50,7 +50,7 @@ test.serial('should update comment', async t => { const updatedComment = await client.issueComments.updateComment({ issueIdOrKey: issue.key, - id: comment.id!, // TODO + id: comment.id, body: { type: 'doc', version: 1,