@devpad/api 2.3.7 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +11 -1
- package/dist/index.js +2 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -737,9 +737,17 @@ type ReadyResponse = {
|
|
|
737
737
|
items: Task[];
|
|
738
738
|
next_cursor: string | null;
|
|
739
739
|
};
|
|
740
|
+
/** `rollups` is keyed by task id — see `packages/core/src/services/graph/rollup.ts`'s `RollupCounts`; a childless task is simply absent. */
|
|
741
|
+
type RollupCounts = {
|
|
742
|
+
direct_done: number;
|
|
743
|
+
direct_total: number;
|
|
744
|
+
subtree_done: number;
|
|
745
|
+
subtree_total: number;
|
|
746
|
+
};
|
|
740
747
|
type TreeResponse = {
|
|
741
748
|
task: Task;
|
|
742
749
|
descendants: Task[];
|
|
750
|
+
rollups: Partial<Record<string, RollupCounts>>;
|
|
743
751
|
};
|
|
744
752
|
type NearResponse = {
|
|
745
753
|
links: TaskLink[];
|
|
@@ -1127,6 +1135,8 @@ declare class ApiClient {
|
|
|
1127
1135
|
tree: (id: string, depth?: number) => Promise<ApiResult<TreeResponse>>;
|
|
1128
1136
|
/** depth-2 link neighborhood around a task, including backlinks. */
|
|
1129
1137
|
near: (id: string) => Promise<ApiResult<NearResponse>>;
|
|
1138
|
+
/** Immediate-parent-first ancestor chain — feeds the outline's zoom breadcrumbs. */
|
|
1139
|
+
ancestors: (id: string) => Promise<ApiResult<Task[]>>;
|
|
1130
1140
|
/** Atomic claim: sets claimed_by/claimed_at + IN_PROGRESS, guarded on claimed_by IS NULL and base_rev. */
|
|
1131
1141
|
claim: (id: string, data: ClaimRequest) => Promise<ApiResult<Task>>;
|
|
1132
1142
|
/**
|
|
@@ -1881,4 +1891,4 @@ declare const tools: Record<string, ToolDefinition>;
|
|
|
1881
1891
|
declare const toolNames: string[];
|
|
1882
1892
|
declare function getTool(name: string): ToolDefinition | undefined;
|
|
1883
1893
|
|
|
1884
|
-
export { AccessKey, Account, AddFilterInput, ApiClient, ApiError, type ApiResult, type ApiResultError, type AuthMode, AuthenticationError, Category, CategoryCreate, CreateProfileInput, NetworkError, PlatformSettings, Post, PostContent, PostCreate, PostListParams, PostUpdate, PostsResponse, Profile, ProfileFilter, Project, type PublicHook, type PulseErrorIssue, type PulseErrorsResult, type PulseEventRow, type PulseEventsPage, type PulseLatencyByMinute, type PulseLatencyResult, type PulseLogsResult, type PulseSummary, type PulseSummaryByDay, type RequestHistoryEntry, type RequestOptions, SaveConfigRequest, Task, TaskWithDetails, Timeline, type ToolDefinition, UpdateProfileInput, UpsertProject, UpsertTag, UpsertTodo, ValidationError, VersionInfo, ApiClient as default, getTool, getUserFriendlyErrorMessage, parseZodErrors, pulseSummaryHasData, toolNames, tools, wrap };
|
|
1894
|
+
export { AccessKey, Account, AddFilterInput, ApiClient, ApiError, type ApiResult, type ApiResultError, type ApplyResponse, type AuthMode, AuthenticationError, type BubbleStep, Category, CategoryCreate, CreateProfileInput, type DoneResponse, NetworkError, PlatformSettings, Post, PostContent, PostCreate, PostListParams, PostUpdate, PostsResponse, Profile, ProfileFilter, Project, type PublicHook, type PulseErrorIssue, type PulseErrorsResult, type PulseEventRow, type PulseEventsPage, type PulseLatencyByMinute, type PulseLatencyResult, type PulseLogsResult, type PulseSummary, type PulseSummaryByDay, type RequestHistoryEntry, type RequestOptions, type RollupCounts, SaveConfigRequest, Task, TaskWithDetails, Timeline, type ToolDefinition, UpdateProfileInput, UpsertProject, UpsertTag, UpsertTodo, ValidationError, VersionInfo, ApiClient as default, getTool, getUserFriendlyErrorMessage, parseZodErrors, pulseSummaryHasData, toolNames, tools, wrap };
|
package/dist/index.js
CHANGED
|
@@ -897,6 +897,8 @@ var ApiClient2 = class {
|
|
|
897
897
|
),
|
|
898
898
|
/** depth-2 link neighborhood around a task, including backlinks. */
|
|
899
899
|
near: (id) => wrap(() => this.clients.tasks.get(`/tasks/${id}/near`)),
|
|
900
|
+
/** Immediate-parent-first ancestor chain — feeds the outline's zoom breadcrumbs. */
|
|
901
|
+
ancestors: (id) => wrap(() => this.clients.tasks.get(`/tasks/${id}/ancestors`)),
|
|
900
902
|
/** Atomic claim: sets claimed_by/claimed_at + IN_PROGRESS, guarded on claimed_by IS NULL and base_rev. */
|
|
901
903
|
claim: (id, data) => wrap(() => this.clients.tasks.post(`/tasks/${id}/claim`, { body: data })),
|
|
902
904
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "TypeScript client library for the devpad API - project and task management made simple",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"zod": "^3.22.4"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@devpad/schema": "^2.
|
|
71
|
+
"@devpad/schema": "^2.4.1",
|
|
72
72
|
"@types/node": "^20.11.24",
|
|
73
73
|
"bun-types": "latest",
|
|
74
74
|
"tsup": "^8.0.0",
|