Skip to content

Commit 2d02444

Browse files
authored
feat: remove commentCount field for API v9.218 and bump to API v9.220 (#276)
1 parent 626b7b3 commit 2d02444

File tree

14 files changed

+97
-53
lines changed

14 files changed

+97
-53
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@doist/todoist-api-typescript",
3-
"version": "4.0.0-alpha.5",
3+
"version": "4.0.0-alpha.6",
44
"description": "A typescript wrapper for the Todoist REST API.",
55
"author": "Doist developers",
66
"repository": "[email protected]:doist/todoist-api-typescript.git",

src/consts/endpoints.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const TODOIST_URI = 'https://todoist.com'
33

44
// The API version is not configurable, to ensure
55
// compatibility between the API and the client.
6-
export const API_VERSION = 'v9.217'
6+
export const API_VERSION = 'v9.220'
77

88
export const API_BASE_URI = `/api/${API_VERSION}/`
99
const API_AUTHORIZATION_BASE_URI = '/oauth/'

src/testUtils/testDefaults.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export const DEFAULT_TASK: Task = {
9595
isCompleted: false,
9696
labels: DEFAULT_LABELS,
9797
priority: DEFAULT_TASK_PRIORITY,
98-
commentCount: 0,
9998
createdAt: DEFAULT_DATE,
10099
url: 'https://todoist.com/showTask?id=1234',
101100
due: DEFAULT_DUE_DATE,
@@ -127,7 +126,6 @@ export const DEFAULT_PROJECT: Project = {
127126
color: DEFAULT_ENTITY_COLOR,
128127
order: DEFAULT_ORDER,
129128
parentId: DEFAULT_PROJECT_ID,
130-
commentCount: 0,
131129
isFavorite: false,
132130
isShared: false,
133131
isInboxProject: false,

src/types/entities.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export const TaskSchema = z.object({
4949
isCompleted: z.boolean(),
5050
labels: z.array(z.string()),
5151
priority: z.number().int(),
52-
commentCount: z.number().int(),
5352
creatorId: z.string(),
5453
createdAt: z.string(),
5554
due: DueDateSchema.nullable(),
@@ -69,7 +68,6 @@ export const ProjectSchema = z.object({
6968
order: z.number().int().nullable(),
7069
color: z.string(),
7170
name: z.string(),
72-
commentCount: z.number().int(),
7371
isShared: z.boolean(),
7472
isFavorite: z.boolean(),
7573
isInboxProject: z.boolean(),

src/utils/taskConverters.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export function getTaskFromQuickAddResponse(responseData: QuickAddTaskResponse):
1717
isCompleted: responseData.checked,
1818
labels: responseData.labels,
1919
priority: responseData.priority,
20-
commentCount: 0, // Will always be 0 for a quick add
2120
createdAt: responseData.addedAt,
2221
url: getTaskUrlFromQuickAddResponse(responseData),
2322
creatorId: responseData.addedByUid ?? '',

website/docs/api/.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@
4949
| [GetTaskCommentsArgs](type-aliases/GetTaskCommentsArgs.md) | - |
5050
| [GetTasksArgs](type-aliases/GetTasksArgs.md) | - |
5151
| [GetTasksResponse](type-aliases/GetTasksResponse.md) | - |
52+
| [MoveTaskArgs](type-aliases/MoveTaskArgs.md) | - |
5253
| [Permission](type-aliases/Permission.md) | Permission scopes that can be requested during OAuth2 authorization. |
5354
| [ProjectViewStyle](type-aliases/ProjectViewStyle.md) | - |
5455
| [QuickAddTaskArgs](type-aliases/QuickAddTaskArgs.md) | - |
5556
| [QuickAddTaskResponse](type-aliases/QuickAddTaskResponse.md) | - |
5657
| [RemoveSharedLabelArgs](type-aliases/RemoveSharedLabelArgs.md) | - |
5758
| [RenameSharedLabelArgs](type-aliases/RenameSharedLabelArgs.md) | - |
5859
| [RevokeAuthTokenRequestArgs](type-aliases/RevokeAuthTokenRequestArgs.md) | Parameters required to revoke an access token. |
60+
| [SyncTask](type-aliases/SyncTask.md) | - |
5961
| [TaskWithSanitizedContent](type-aliases/TaskWithSanitizedContent.md) | - |
6062
| [UpdateCommentArgs](type-aliases/UpdateCommentArgs.md) | - |
6163
| [UpdateLabelArgs](type-aliases/UpdateLabelArgs.md) | - |

website/docs/api/classes/TodoistApi.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,33 @@ A promise that resolves to an array of tasks.
559559

560560
***
561561

562+
### moveTasks()
563+
564+
```ts
565+
moveTasks(
566+
ids: string[],
567+
args: MoveTaskArgs,
568+
requestId?: string): Promise<Task[]>
569+
```
570+
571+
Moves existing tasks by their ID to either a different parent/section/project.
572+
573+
#### Parameters
574+
575+
| Parameter | Type | Description |
576+
| ------ | ------ | ------ |
577+
| `ids` | `string`[] | The unique identifier of the tasks to be moved. |
578+
| `args` | [`MoveTaskArgs`](../type-aliases/MoveTaskArgs.md) | The paramets that should contain only one of projectId, sectionId, or parentId |
579+
| `requestId`? | `string` | Optional unique identifier for idempotency. |
580+
581+
#### Returns
582+
583+
`Promise`\<[`Task`](../interfaces/Task.md)[]\>
584+
585+
- A promise that resolves to an array of the updated tasks.
586+
587+
***
588+
562589
### quickAddTask()
563590

564591
```ts

website/docs/api/interfaces/Project.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ https://developer.todoist.com/sync/v9/#projects
1515
| Property | Type |
1616
| ------ | ------ |
1717
| <a id="color"></a> `color` | `string` |
18-
| <a id="commentcount"></a> `commentCount` | `number` |
1918
| <a id="id"></a> `id` | `string` |
2019
| <a id="isfavorite"></a> `isFavorite` | `boolean` |
2120
| <a id="isinboxproject"></a> `isInboxProject` | `boolean` |

website/docs/api/interfaces/Task.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ https://developer.todoist.com/sync/v9/#items
1616
| ------ | ------ |
1717
| <a id="assigneeid"></a> `assigneeId` | `null` \| `string` |
1818
| <a id="assignerid"></a> `assignerId` | `null` \| `string` |
19-
| <a id="commentcount"></a> `commentCount` | `number` |
2019
| <a id="content"></a> `content` | `string` |
2120
| <a id="createdat"></a> `createdAt` | `string` |
2221
| <a id="creatorid"></a> `creatorId` | `string` |

0 commit comments

Comments
 (0)