Skip to content

Commit 221f2d5

Browse files
authored
fix: Use camelCased properties instead of snake_case (#147)
1 parent fa8e791 commit 221f2d5

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
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": "2.0.3",
3+
"version": "2.0.4",
44
"description": "A typescript wrapper for the Todoist REST API.",
55
"author": "Doist developers",
66
"repository": "[email protected]:doist/todoist-api-typescript.git",

src/testUtils/testDefaults.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export const DEFAULT_QUICK_ADD_RESPONSE: QuickAddTaskResponse = {
6161
labels: DEFAULT_LABELS,
6262
responsibleUid: DEFAULT_ASSIGNEE,
6363
checked: 0,
64-
added_at: DEFAULT_DATE,
65-
added_by_uid: DEFAULT_CREATOR,
64+
addedAt: DEFAULT_DATE,
65+
addedByUid: DEFAULT_CREATOR,
6666
due: {
6767
date: DEFAULT_DATE,
6868
timezone: null,
@@ -117,7 +117,7 @@ export const DEFAULT_PROJECT: Project = {
117117
isInboxProject: false,
118118
isTeamInbox: false,
119119
viewStyle: DEFAULT_PROJECT_VIEW_STYLE,
120-
url: `https://todoist.com/showProject?id=123`,
120+
url: 'https://todoist.com/showProject?id=123',
121121
}
122122

123123
export const INVALID_PROJECT = {

src/types/entities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ export type QuickAddTaskResponse = {
164164
labels: string[]
165165
responsibleUid: string | null
166166
checked: number // completed
167-
added_at: string // created
168-
added_by_uid: string | null
167+
addedAt: string // created
168+
addedByUid: string | null
169169
due: {
170170
date: string
171171
timezone: string | null

src/utils/taskConverters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export function getTaskFromQuickAddResponse(responseData: QuickAddTaskResponse):
2828
labels: responseData.labels,
2929
priority: responseData.priority,
3030
commentCount: 0, // Will always be 0 for a quick add
31-
createdAt: responseData.added_at,
31+
createdAt: responseData.addedAt,
3232
url: getTaskUrlFromQuickAddResponse(responseData),
33-
creatorId: responseData.added_by_uid ? responseData.added_by_uid : '',
33+
creatorId: responseData.addedByUid ?? '',
3434
...(due !== undefined && { due }),
3535
...(responseData.parentId !== null && { parentId: responseData.parentId }),
3636
...(responseData.responsibleUid !== null && {

0 commit comments

Comments
 (0)