@onetaskgraph/sdk 0.14.9 → 0.14.11

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/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CacheCleared, Classification, CommentList, CommentWritten, CopyReport, DeletedComment, DocumentDetail, EffectiveConfig, FailureDocument, FieldsReport, HumanTaskProjected, IssuesCompleted, LocateReport, MetadataSet, NativeId, Priority, ProjectGraph, ProjectStatusSet, QueryResponseOfQualifiedDocument, QueryResponseOfQualifiedEdge, QueryResponseOfQualifiedLabel, QueryResponseOfQualifiedProject, QueryResponseOfQualifiedTask, QueryResponseOfSearchHit, Regenerated, RenderedTemplate, SanitizeDryRun, SourceListings, SourceRoute, StatusCategory, StatusesReconciled, StatusNamesReport, StatusOptionsReport, SweepReport, TaskAssetNames, TaskContentSet, TaskDetail, TaskDetails, TaskPrioritySet, TaskStatusSet, TaskUpdated, TemplateAnswers, TemplateVariables } from "./generated/models.ts";
1
+ import type { CacheCleared, Classification, CommentList, CommentsSince, CommentWritten, CopyReport, DeletedComment, DocumentDetail, EffectiveConfig, FailureDocument, FieldsReport, HumanTaskProjected, IssuesCompleted, LocateReport, MetadataSet, Attested, AttestationCheck, ProjectAttestationCheck, PlannedProject, NativeId, Priority, ProjectGraph, ProjectStatusSet, QueryResponseOfQualifiedDocument, QueryResponseOfQualifiedEdge, QueryResponseOfQualifiedLabel, QueryResponseOfQualifiedProject, QueryResponseOfQualifiedTask, QueryResponseOfSearchHit, Regenerated, RenderedTemplate, SanitizeDryRun, SourceListings, SourceRoute, StatusCategory, StatusesReconciled, StatusNamesReport, StatusOptionsReport, SweepReport, TaskAssetNames, TaskContentSet, TaskDetail, TaskDetails, TaskPrioritySet, TaskStatusSet, TaskUpdated, TemplateAnswers, TemplateVariables } from "./generated/models.ts";
2
2
  import { runtimeSchemas } from "./generated/schemas.ts";
3
3
  export type QueryOptions = {
4
4
  sources?: string[];
@@ -29,9 +29,20 @@ export type WriteOptions = {
29
29
  reject?: string[];
30
30
  sanitizeDryRun?: boolean;
31
31
  };
32
+ export type AttestOptions = WriteOptions & {
33
+ exclude?: string[];
34
+ note?: string;
35
+ ifVersion?: string;
36
+ };
37
+ export type AttestationCheckOptions = {
38
+ bar?: string;
39
+ };
32
40
  export type ExpectOptions = {
33
41
  expect?: string;
34
42
  };
43
+ export type HeldOptions = {
44
+ ifVersion?: string;
45
+ };
35
46
  /** Status ownership on copy updates. Creates always carry the source status. */
36
47
  export declare const statusPolicies: readonly ["source", "preserve-destination"];
37
48
  export type StatusPolicy = (typeof statusPolicies)[number];
@@ -59,7 +70,7 @@ export type CopyConditionOptions = {
59
70
  otherwise?: Otherwise;
60
71
  whenDestinationPriority?: Priority[];
61
72
  };
62
- export type TaskCopyOptions = StatusCopyOptions & CopyOptions & CopyQueryOptions & CopyConditionOptions & ExpectOptions & {
73
+ export type TaskCopyOptions = StatusCopyOptions & CopyOptions & CopyQueryOptions & CopyConditionOptions & ExpectOptions & HeldOptions & {
63
74
  create?: boolean;
64
75
  targetTask?: string;
65
76
  };
@@ -106,8 +117,9 @@ export type DocumentCreateOptions = CreateOptions & AssetOptions & {
106
117
  };
107
118
  export type ProjectCreateOptions = CreateOptions & {
108
119
  status?: StatusCategory;
120
+ dryRun?: boolean;
109
121
  };
110
- export type TaskUpdateOptions = WriteOptions & ExpectOptions & {
122
+ export type TaskUpdateOptions = WriteOptions & ExpectOptions & HeldOptions & {
111
123
  title?: string;
112
124
  bodyFile?: string;
113
125
  status?: StatusCategory;
@@ -117,6 +129,7 @@ export type TaskUpdateOptions = WriteOptions & ExpectOptions & {
117
129
  removeMetadata?: string[];
118
130
  delivers?: string[];
119
131
  dependsOn?: string[];
132
+ repositories?: string[];
120
133
  };
121
134
  export type RenderOptions = TemplateSourceOptions & WriteOptions & {
122
135
  unset?: string[];
@@ -147,6 +160,13 @@ export declare const commandAlternateRoots: Readonly<Record<string, readonly (ke
147
160
  export declare const clientCommands: readonly string[];
148
161
  export declare const taskUpdateOptionFlags: Readonly<Record<keyof TaskUpdateOptions, string>>;
149
162
  export declare function taskUpdateFlags(options: unknown): string[];
163
+ export type TaskCommentsOptions = {
164
+ metadata?: string[];
165
+ statuses?: StatusCategory[];
166
+ items?: string[];
167
+ };
168
+ export declare const taskCommentsOptionFlags: Readonly<Record<keyof TaskCommentsOptions, string>>;
169
+ export declare function taskCommentsFlags(since: string, options: unknown): string[];
150
170
  export declare function taskCopyFlags(options: TaskCopyOptions): string[];
151
171
  export declare function projectCopyFlags(options: CopyOptions & StatusCopyOptions & {
152
172
  noTasks?: boolean;
@@ -197,6 +217,7 @@ export declare class OnetaskgraphClient {
197
217
  sanitizeDryRun?: false;
198
218
  }): Promise<CommentWritten>;
199
219
  taskCommentAdd(id: string, options: CommentAddOptions): Promise<CommentWritten | SanitizeDryRun>;
220
+ taskComments(source: string, since: string, options?: TaskCommentsOptions): Promise<CommentsSince>;
200
221
  taskCommentList(id: string, options?: {
201
222
  pin?: string;
202
223
  }): Promise<CommentList>;
@@ -294,6 +315,23 @@ export declare class OnetaskgraphClient {
294
315
  sanitizeDryRun?: false;
295
316
  }): Promise<MetadataSet>;
296
317
  documentMetadataSet(id: string, key: string, value: string, options?: WriteOptions): Promise<MetadataSet | SanitizeDryRun>;
318
+ taskAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions & {
319
+ sanitizeDryRun?: false;
320
+ }): Promise<Attested>;
321
+ taskAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions): Promise<Attested | SanitizeDryRun>;
322
+ projectAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions & {
323
+ sanitizeDryRun?: false;
324
+ }): Promise<Attested>;
325
+ projectAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions): Promise<Attested | SanitizeDryRun>;
326
+ documentAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions & {
327
+ sanitizeDryRun?: false;
328
+ }): Promise<Attested>;
329
+ documentAttest(id: string, kind: string, by: string, bar: string, options?: AttestOptions): Promise<Attested | SanitizeDryRun>;
330
+ taskAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions): Promise<AttestationCheck>;
331
+ documentAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions): Promise<AttestationCheck>;
332
+ projectAttestationCheck(id: string, kind: string, options?: AttestationCheckOptions & {
333
+ tasks?: boolean;
334
+ }): Promise<AttestationCheck | ProjectAttestationCheck>;
297
335
  labelList(options?: QueryOptions): Promise<QueryResponseOfQualifiedLabel>;
298
336
  search(text: string, options?: QueryOptions & {
299
337
  fields?: "title" | "content" | "both";
@@ -314,10 +352,15 @@ export declare class OnetaskgraphClient {
314
352
  taskAnswers(id: string): Promise<TemplateAnswers>;
315
353
  taskAssets(id: string, outputDir: string): Promise<TaskAssetNames>;
316
354
  taskProjectHuman(input: string): Promise<HumanTaskProjected>;
355
+ projectCreate(source: string, id: NativeId, title: string, options: ProjectCreateOptions & {
356
+ dryRun: true;
357
+ sanitizeDryRun?: false;
358
+ }): Promise<PlannedProject>;
317
359
  projectCreate(source: string, id: NativeId, title: string, options?: ProjectCreateOptions & {
360
+ dryRun?: false;
318
361
  sanitizeDryRun?: false;
319
362
  }): Promise<QueryResponseOfQualifiedProject>;
320
- projectCreate(source: string, id: NativeId, title: string, options?: ProjectCreateOptions): Promise<QueryResponseOfQualifiedProject | SanitizeDryRun>;
363
+ projectCreate(source: string, id: NativeId, title: string, options?: ProjectCreateOptions): Promise<QueryResponseOfQualifiedProject | PlannedProject | SanitizeDryRun>;
321
364
  projectRender(id: string, options?: RenderOptions & {
322
365
  sanitizeDryRun?: false;
323
366
  }): Promise<Regenerated>;
@@ -1 +1 @@
1
- export declare const binaryCommands: readonly ["schema", "config show", "sources list", "sources status-options", "sources fields", "sources route", "sources sanitize", "task list", "task show", "task show-many", "task deps", "task copy", "task locate", "task comment add", "task comment list", "task comment edit", "task comment delete", "task status set", "task status reconcile", "task status complete", "task priority set", "task content set", "task metadata set", "task update", "task create", "task render", "task answers", "task assets", "task project-human", "project list", "project show", "project deps", "project graph", "project copy", "project metadata set", "project status set", "project create", "project render", "project answers", "document list", "document show", "document copy", "document metadata set", "document create", "document render", "document answers", "label list", "search", "cache clear", "template variables", "template render"];
1
+ export declare const binaryCommands: readonly ["schema", "config show", "sources list", "sources status-options", "sources fields", "sources route", "sources sanitize", "task list", "task show", "task show-many", "task deps", "task copy", "task locate", "task comment add", "task comment list", "task comment edit", "task comment delete", "task comments", "task status set", "task status reconcile", "task status complete", "task priority set", "task content set", "task metadata set", "task attest", "task attestation check", "task update", "task create", "task render", "task answers", "task assets", "task project-human", "project list", "project show", "project deps", "project graph", "project copy", "project metadata set", "project attest", "project attestation check", "project status set", "project create", "project render", "project answers", "document list", "document show", "document copy", "document metadata set", "document attest", "document attestation check", "document create", "document render", "document answers", "label list", "search", "cache clear", "template variables", "template render"];