@bscotch/blork-shared
Advanced tools
Comparing version 0.16.1 to 0.17.0
import { BaseError } from './errors.js'; | ||
import { Events } from './events.js'; | ||
import { CommentData, CommentPatch } from './types.comments.js'; | ||
import { TaskData, TaskPatch, TaskPost } from './types.tasks.js'; | ||
import { TaskChange, TaskData, TaskPatch, TaskPost } from './types.tasks.js'; | ||
import { TaskTemplate, TaskTemplatePatch, TaskTemplatePost } from './types.templates.js'; | ||
@@ -114,2 +114,3 @@ import { NewUser, UserAccessNewToken, UserAccessTokenPost, UserData, UserGroupData, UserPost } from './types.users.js'; | ||
deleteTemplate(templateId: string): Promise<void>; | ||
listTaskChanges(taskId: string): Promise<TaskChange[]>; | ||
/** | ||
@@ -116,0 +117,0 @@ * Log in to the server, which will set a cookie for future requests. |
@@ -337,2 +337,10 @@ import { z } from 'zod'; | ||
//#endregion TEMPLATES | ||
//#region CHANGES | ||
async listTaskChanges(taskId) { | ||
const changes = (await this.request('GET', `/api/tasks/${encodeURIComponent(taskId)}/changes`, { | ||
assertStatus: 200, | ||
})).body.result; | ||
return changes; | ||
} | ||
//#endregion CHANGES | ||
//#region USERS | ||
@@ -339,0 +347,0 @@ /** |
@@ -170,3 +170,2 @@ import { CommentData, TaskData, UserDataSafe } from './index.js'; | ||
export declare function isEmptyTask(task: TaskData | undefined): task is TaskData; | ||
export declare function diffTasks(a: TaskData, b: TaskData): void; | ||
//# sourceMappingURL=tasks.d.ts.map |
@@ -651,3 +651,2 @@ import { assert } from './errors.js'; | ||
} | ||
export function diffTasks(a, b) { } | ||
//# sourceMappingURL=tasks.js.map |
@@ -202,2 +202,9 @@ import { z } from 'zod'; | ||
}, unknown>; | ||
export interface TaskChange { | ||
taskId: string; | ||
by: string; | ||
at: Date; | ||
key: keyof TaskData; | ||
to: any; | ||
} | ||
export type TaskCreate = { | ||
@@ -204,0 +211,0 @@ title?: string; |
{ | ||
"name": "@bscotch/blork-shared", | ||
"version": "0.16.1", | ||
"version": "0.17.0", | ||
"description": "Client and shared utilities for Blork projects.", | ||
@@ -29,5 +29,5 @@ "keywords": [], | ||
"build": "tsc", | ||
"test": "node -r source-map-support/register --test dist", | ||
"watch": "tsc -w" | ||
"dev": "tsc -w", | ||
"test": "node -r source-map-support/register --test dist" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
460873
7434