Skip to content

Commit

Permalink
MAK-54 IJ: Mark task as done (#100)
Browse files Browse the repository at this point in the history
Mark tasks as done from IntelliJ tool windows
  • Loading branch information
bcosynot authored Jun 26, 2023
1 parent 35ce455 commit 5cbe658
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 94 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/co/makerflow/client/apis/TasksApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package co.makerflow.client.apis

import co.makerflow.client.models.CalendarEvent
import co.makerflow.client.models.MarkDone200Response
import co.makerflow.client.models.MarkDoneRequest
import co.makerflow.client.models.TypedTodo

Expand Down Expand Up @@ -73,10 +72,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
*
* @param source To specify source of request (optional)
* @param markDoneRequest Task to be marked as completed (optional)
* @return MarkDone200Response
* @return TypedTodo
*/
@Suppress("UNCHECKED_CAST")
open suspend fun markDone(source: kotlin.String?, markDoneRequest: MarkDoneRequest?): HttpResponse<MarkDone200Response> {
open suspend fun markDone(source: kotlin.String?, markDoneRequest: MarkDoneRequest?): HttpResponse<TypedTodo> {

val localVariableAuthNames = listOf<String>("api_token")

Expand Down
14 changes: 12 additions & 2 deletions src/main/kotlin/co/makerflow/client/models/CustomTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonProperty
* @param title Title for task
* @param createdAt Timestamp for when the custom task was created
* @param done Whether the custom task has been completed
* @param userId The id of the user that created the custom task
* @param updatedAt Timestamp for when the custom task was last updated
*/


Expand All @@ -39,12 +41,20 @@ data class CustomTask (
val title: kotlin.String? = null,

/* Timestamp for when the custom task was created */
@field:JsonProperty("createdAt")
@field:JsonProperty("created_at")
val createdAt: kotlin.String? = null,

/* Whether the custom task has been completed */
@field:JsonProperty("done")
val done: kotlin.Boolean? = null
val done: kotlin.Boolean? = null,

/* The id of the user that created the custom task */
@field:JsonProperty("user_id")
val userId: kotlin.Int? = null,

/* Timestamp for when the custom task was last updated */
@field:JsonProperty("updated_at")
val updatedAt: kotlin.String? = null

)

4 changes: 2 additions & 2 deletions src/main/kotlin/co/makerflow/client/models/MarkDoneRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

package co.makerflow.client.models

import co.makerflow.client.models.MarkDoneRequestTodo
import co.makerflow.client.models.TypedTodo

import com.fasterxml.jackson.annotation.JsonProperty

Expand All @@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
data class MarkDoneRequest (

@field:JsonProperty("todo")
val todo: MarkDoneRequestTodo? = null,
val todo: TypedTodo? = null,

@field:JsonProperty("done")
val done: kotlin.Boolean? = null
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/co/makerflow/client/models/TypedTodo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo
JsonSubTypes.Type(value = OnboardingTask::class, name = "onboarding")
)

open class TypedTodo() {
open class TypedTodo {

/* The type of source that the todo is from */
@get:JsonProperty("sourceType")
Expand All @@ -59,7 +59,7 @@ open class TypedTodo() {
val createdAt: kotlin.String? = null
/* Whether the todo has been completed */
@get:JsonProperty("done")
val done: kotlin.Boolean? = null
var done: kotlin.Boolean? = null

/**
* The type of source that the todo is from
Expand Down

This file was deleted.

Loading

0 comments on commit 5cbe658

Please sign in to comment.