Skip to content

Commit

Permalink
Merge pull request #4456 from rendyt1/feat/todoist_section
Browse files Browse the repository at this point in the history
feat(todoist): add section_id to create task action
  • Loading branch information
abuaboud committed Apr 13, 2024
2 parents 01dad08 + 03e4227 commit d4b65b9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/pieces/community/todoist/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "@activepieces/piece-todoist",
"version": "0.3.6"
"version": "0.3.7"
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@ export const todoistCreateTaskAction = createAction({
"Specific date in YYYY-MM-DD format relative to user's timezone",
required: false,
}),
section_id: Property.ShortText({
displayName: 'Section',
description:
"A section for the task. It should be a Section ID under the same project",
required: false,
}),
},

async run({ auth, propsValue }) {
const token = auth.access_token;
const { project_id, content, description, labels, priority, due_date } =
const { project_id, content, description, labels, priority, due_date, section_id} =
propsValue as TodoistCreateTaskRequest;

assertNotNullOrUndefined(token, 'token');
Expand All @@ -58,6 +64,7 @@ export const todoistCreateTaskAction = createAction({
labels,
priority,
due_date,
section_id
});
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const todoistRestClient = {
labels,
priority,
due_date,
section_id
}: TasksCreateParams): Promise<TodoistTask> {
const request: HttpRequest<TodoistCreateTaskRequest> = {
method: HttpMethod.POST,
Expand All @@ -54,6 +55,7 @@ export const todoistRestClient = {
labels,
priority,
due_date,
section_id
},
};

Expand Down
1 change: 1 addition & 0 deletions packages/pieces/community/todoist/src/lib/common/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type TodoistCreateTaskRequest = {
labels?: Array<string> | undefined;
priority?: number | undefined;
due_date?: string | undefined;
section_id?: string | undefined;
};

type TodoistTaskDue = {
Expand Down

0 comments on commit d4b65b9

Please sign in to comment.