@devpad/api 2.4.1 → 2.4.2
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 +22 -4
- package/dist/index.js +11 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { G as PostListParams, T as PostsResponse, x as Post, D as PostCreate, Q
|
|
|
2
2
|
import { ai as Profile, u as CreateProfileInput, aw as UpdateProfileInput, aj as ProfileFilter, c as AddFilterInput, aq as Timeline, A as Account, ae as PlatformSettings } from './types.d-CpUFC2tW.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { c as ApiKey, O as Project, aB as UpsertProject, G as GetConfigResult, a0 as SaveConfigRequest, am as TodoUpdate, H as HistoryAction, M as Milestone, o as Goal, p as Hook, v as HookTrigger, r as HookActionPublic, at as UpsertHook, t as HookDelivery, ai as TaskWithDetails, aE as UpsertTodo, aC as UpsertTag, ab as Task, ae as TaskLink, C as ClaimRequest, m as DoneRequest, a as AdvanceStageRequest, aD as UpsertTaskLink, f as ApplyRequest, e as ApplyOp, aa as TagWithTypedColor, l as Document, S as PushDocRequest, al as ThreadMarker, i as CreateThreadRequest, b as AnnotationThread, T as PushInterfaceReportRequest, y as InterfaceDiffClass, a4 as Signoff, W as RequestCheckpointRequest, k as DecideCheckpointRequest, X as ReviewItem, D as DashboardResponse, K as PipelineRun, L as PipelineStageEvent, B as PipelineGrant, J as PipelinePackage, P as PipelineAnalysisTemplate, F as PipelineOidcTrust } from './types.d-BIJAwHaZ.js';
|
|
5
|
-
export { Q as ProjectConfig } from './types.d-BIJAwHaZ.js';
|
|
5
|
+
export { Q as ProjectConfig, Y as ReviewItemKind } from './types.d-BIJAwHaZ.js';
|
|
6
6
|
import { Result } from '@f0rbit/corpus';
|
|
7
7
|
export { Result, err, ok } from '@f0rbit/corpus';
|
|
8
8
|
import { H as HookDeliveryStatus, C as CompletedVia, i as StageEventKind } from './schema.d-CaVQ-Ate.js';
|
|
@@ -744,14 +744,23 @@ type RollupCounts = {
|
|
|
744
744
|
subtree_done: number;
|
|
745
745
|
subtree_total: number;
|
|
746
746
|
};
|
|
747
|
+
/** Keyed by task id — see `packages/core/src/services/graph/edge-summary.ts`'s `EdgeSummary`; single source of truth for the outline's row-level ⛓/ready/⚡/stale chips. */
|
|
748
|
+
type EdgeSummary = {
|
|
749
|
+
blocked_count: number;
|
|
750
|
+
ready: boolean;
|
|
751
|
+
hook: boolean;
|
|
752
|
+
stale: boolean;
|
|
753
|
+
};
|
|
747
754
|
type TreeResponse = {
|
|
748
755
|
task: Task;
|
|
749
756
|
descendants: Task[];
|
|
750
757
|
rollups: Partial<Record<string, RollupCounts>>;
|
|
758
|
+
edge_summary: Partial<Record<string, EdgeSummary>>;
|
|
751
759
|
};
|
|
752
760
|
type NearResponse = {
|
|
753
761
|
links: TaskLink[];
|
|
754
762
|
tasks: Task[];
|
|
763
|
+
rollups: Partial<Record<string, RollupCounts>>;
|
|
755
764
|
};
|
|
756
765
|
type ApplyOpResult = {
|
|
757
766
|
op: ApplyOp["op"];
|
|
@@ -1133,8 +1142,8 @@ declare class ApiClient {
|
|
|
1133
1142
|
}) => Promise<ApiResult<ReadyResponse>>;
|
|
1134
1143
|
/** Bounded descendant subtree of a task. */
|
|
1135
1144
|
tree: (id: string, depth?: number) => Promise<ApiResult<TreeResponse>>;
|
|
1136
|
-
/**
|
|
1137
|
-
near: (id: string) => Promise<ApiResult<NearResponse>>;
|
|
1145
|
+
/** Link neighborhood around a task (default depth 2, capped server-side at 3 — the graph lens' 1/2/3 toggle), including backlinks. */
|
|
1146
|
+
near: (id: string, depth?: number) => Promise<ApiResult<NearResponse>>;
|
|
1138
1147
|
/** Immediate-parent-first ancestor chain — feeds the outline's zoom breadcrumbs. */
|
|
1139
1148
|
ancestors: (id: string) => Promise<ApiResult<Task[]>>;
|
|
1140
1149
|
/** Atomic claim: sets claimed_by/claimed_at + IN_PROGRESS, guarded on claimed_by IS NULL and base_rev. */
|
|
@@ -1147,6 +1156,15 @@ declare class ApiClient {
|
|
|
1147
1156
|
* until phase A3.
|
|
1148
1157
|
*/
|
|
1149
1158
|
done: (id: string, data: DoneRequest) => Promise<ApiResult<DoneResponse>>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Policy-only reopen (v2.4 B2) — the server (`SqlCompletionEngine.reopen`)
|
|
1161
|
+
* is the sole enforcement point: a task whose `completed_via` isn't
|
|
1162
|
+
* `'policy'` 409s. No request body — the actor comes from the caller's
|
|
1163
|
+
* own auth channel.
|
|
1164
|
+
*/
|
|
1165
|
+
reopen: (id: string) => Promise<ApiResult<{
|
|
1166
|
+
reopened: Task;
|
|
1167
|
+
}>>;
|
|
1150
1168
|
/**
|
|
1151
1169
|
* SDLC stage transition (v2.4, task A4.5) — gently enforced: a gated
|
|
1152
1170
|
* hop missing its checkpoint 409s naming what's missing; `override:
|
|
@@ -1891,4 +1909,4 @@ declare const tools: Record<string, ToolDefinition>;
|
|
|
1891
1909
|
declare const toolNames: string[];
|
|
1892
1910
|
declare function getTool(name: string): ToolDefinition | undefined;
|
|
1893
1911
|
|
|
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 };
|
|
1912
|
+
export { AccessKey, Account, AddFilterInput, ApiClient, ApiError, type ApiResult, type ApiResultError, type ApplyResponse, type AuthMode, AuthenticationError, type BubbleStep, Category, CategoryCreate, CreateProfileInput, DecideCheckpointRequest, type DoneResponse, type EdgeSummary, Milestone, 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, ReviewItem, type RollupCounts, SaveConfigRequest, Signoff, 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
|
@@ -895,8 +895,10 @@ var ApiClient2 = class {
|
|
|
895
895
|
tree: (id, depth) => wrap(
|
|
896
896
|
() => this.clients.tasks.get(`/tasks/${id}/tree`, depth ? { query: { depth: String(depth) } } : {})
|
|
897
897
|
),
|
|
898
|
-
/**
|
|
899
|
-
near: (id) => wrap(
|
|
898
|
+
/** Link neighborhood around a task (default depth 2, capped server-side at 3 — the graph lens' 1/2/3 toggle), including backlinks. */
|
|
899
|
+
near: (id, depth) => wrap(
|
|
900
|
+
() => this.clients.tasks.get(`/tasks/${id}/near`, depth ? { query: { depth: String(depth) } } : {})
|
|
901
|
+
),
|
|
900
902
|
/** Immediate-parent-first ancestor chain — feeds the outline's zoom breadcrumbs. */
|
|
901
903
|
ancestors: (id) => wrap(() => this.clients.tasks.get(`/tasks/${id}/ancestors`)),
|
|
902
904
|
/** Atomic claim: sets claimed_by/claimed_at + IN_PROGRESS, guarded on claimed_by IS NULL and base_rev. */
|
|
@@ -909,6 +911,13 @@ var ApiClient2 = class {
|
|
|
909
911
|
* until phase A3.
|
|
910
912
|
*/
|
|
911
913
|
done: (id, data) => wrap(() => this.clients.tasks.post(`/tasks/${id}/done`, { body: data })),
|
|
914
|
+
/**
|
|
915
|
+
* Policy-only reopen (v2.4 B2) — the server (`SqlCompletionEngine.reopen`)
|
|
916
|
+
* is the sole enforcement point: a task whose `completed_via` isn't
|
|
917
|
+
* `'policy'` 409s. No request body — the actor comes from the caller's
|
|
918
|
+
* own auth channel.
|
|
919
|
+
*/
|
|
920
|
+
reopen: (id) => wrap(() => this.clients.tasks.post(`/tasks/${id}/reopen`)),
|
|
912
921
|
/**
|
|
913
922
|
* SDLC stage transition (v2.4, task A4.5) — gently enforced: a gated
|
|
914
923
|
* hop missing its checkpoint 409s naming what's missing; `override:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devpad/api",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
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.4.
|
|
71
|
+
"@devpad/schema": "^2.4.2",
|
|
72
72
|
"@types/node": "^20.11.24",
|
|
73
73
|
"bun-types": "latest",
|
|
74
74
|
"tsup": "^8.0.0",
|