Open agaldanaw2 opened 2 years ago
I'd like to add support for task steps from this way:
Add endpoints for ITaskEndpoint (because they are task properties) or Do you wanna I create ITaskStepEndpoint (only change the location)?:
Add contracts to management of task steps:
[Post("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems")] [Headers("Authorization: Bearer")] Task<CheckListItem> AddStepAsync(string baseTaskListId, string baseTaskId, CheckListItemData checkListItem, CancellationToken ct)
[Get("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems")] [Headers("Authorization: Bearer")] Task<TaskReponseData<CheckListItem>> GetStepsAsync(string baseTaskListId, string baseTaskId, CancellationToken ct)
[Delete("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems/{checklistItemId}")] [Headers("Authorization: Bearer")] Task DeleteStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CancellationToken ct)
[Patch("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems/{checklistItemId}")] [Headers("Authorization: Bearer")] Task<CheckListItem> UpdateStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CheckListItemData checkListItem, CancellationToken ct)
Add methods for step management:
CheckListItem AddStepAsync(string baseTaskListId, string baseTaskId, CheckListItemData checkListItem, CancellationToken ct)
IInmutableList<CheckListItem> GetStepsAsync(string baseTaskListId, string baseTaskId, CancellationToken ct)
Task DeleteStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CancellationToken ct)
UpdateStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CheckListItemData checkListItem, CancellationToken ct)
Looks good!. Feel free to add to existing task endpoint/service. I think it's ok.
Task Steps Support
I'd like to add support for task steps from this way:
Add endpoints for ITaskEndpoint (because they are task properties) or Do you wanna I create ITaskStepEndpoint (only change the location)?:
ITaskEndpoint (ITaskStepEndpoint):
Add contracts to management of task steps:
[Post("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems")] [Headers("Authorization: Bearer")] Task<CheckListItem> AddStepAsync(string baseTaskListId, string baseTaskId, CheckListItemData checkListItem, CancellationToken ct)
[Get("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems")] [Headers("Authorization: Bearer")] Task<TaskReponseData<CheckListItem>> GetStepsAsync(string baseTaskListId, string baseTaskId, CancellationToken ct)
[Delete("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems/{checklistItemId}")] [Headers("Authorization: Bearer")] Task DeleteStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CancellationToken ct)
[Patch("/me/tasks/lists/{baseTaskListId}/tasks/{baseTaskId}/checklistItems/{checklistItemId}")] [Headers("Authorization: Bearer")] Task<CheckListItem> UpdateStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CheckListItemData checkListItem, CancellationToken ct)
Add methods for step management:
ITaskService (ITaskStepService)
CheckListItem AddStepAsync(string baseTaskListId, string baseTaskId, CheckListItemData checkListItem, CancellationToken ct)
IInmutableList<CheckListItem> GetStepsAsync(string baseTaskListId, string baseTaskId, CancellationToken ct)
Task DeleteStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CancellationToken ct)
UpdateStepAsync (string baseTaskListId, string baseTaskId, string checklistItemId, CheckListItemData checkListItem, CancellationToken ct)
Entities:
CheckListItemData (use as DTO for communication between APP and API):
CheckListItem: