@onetaskgraph/sdk 0.14.10 → 0.14.12
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 +46 -3
- package/dist/generated/commands.d.ts +1 -1
- package/dist/generated/models.d.ts +1429 -144
- package/dist/generated/schemas.d.ts +11 -24262
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2711 -91
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SCHEMA_BUNDLE_VERSION:
|
|
1
|
+
export declare const SCHEMA_BUNDLE_VERSION: 61;
|
|
2
2
|
export declare namespace GeneratedAsset {
|
|
3
3
|
/**
|
|
4
4
|
* One asset a record holds, as a read reports it.
|
|
@@ -209,6 +209,254 @@ export declare namespace GeneratedAssetsWritten {
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
export type AssetsWritten = GeneratedAssetsWritten.AssetsWritten;
|
|
212
|
+
export declare namespace GeneratedAttestation {
|
|
213
|
+
/**
|
|
214
|
+
* What an attester adds: text of any length and any number of lines, not blank.
|
|
215
|
+
*/
|
|
216
|
+
type AttestationNote = string;
|
|
217
|
+
/**
|
|
218
|
+
* One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments
|
|
219
|
+
* separated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].
|
|
220
|
+
*
|
|
221
|
+
* Validated wherever one is built, deserialized included, so a plugin handed one never has
|
|
222
|
+
* to ask whether it names a key this product owns.
|
|
223
|
+
*/
|
|
224
|
+
type MetadataKey = string;
|
|
225
|
+
/**
|
|
226
|
+
* One attestation: who cleared the item's authored content, when, which content and against
|
|
227
|
+
* which bar.
|
|
228
|
+
*/
|
|
229
|
+
interface Attestation {
|
|
230
|
+
/**
|
|
231
|
+
* The kind of attestation this is; the key it is held under.
|
|
232
|
+
*/
|
|
233
|
+
kind: string;
|
|
234
|
+
/**
|
|
235
|
+
* Who attested, as the caller labels them.
|
|
236
|
+
*/
|
|
237
|
+
by: string;
|
|
238
|
+
/**
|
|
239
|
+
* When it was recorded, in RFC 3339 to the second.
|
|
240
|
+
*/
|
|
241
|
+
at: string;
|
|
242
|
+
/**
|
|
243
|
+
* The digest of the item's authored content when it was recorded, computed by the store
|
|
244
|
+
* (see the module's documentation).
|
|
245
|
+
*/
|
|
246
|
+
content_digest: string;
|
|
247
|
+
/**
|
|
248
|
+
* The fingerprint of the bar the content was cleared against, as the caller gave it.
|
|
249
|
+
*/
|
|
250
|
+
bar: string;
|
|
251
|
+
/**
|
|
252
|
+
* What the attester added, when they added anything.
|
|
253
|
+
*/
|
|
254
|
+
note?: (AttestationNote | null);
|
|
255
|
+
/**
|
|
256
|
+
* The caller-owned metadata keys left out of `content_digest`, sorted; empty when none
|
|
257
|
+
* were.
|
|
258
|
+
*/
|
|
259
|
+
excludes?: MetadataKey[];
|
|
260
|
+
[k: string]: any;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
export type Attestation = GeneratedAttestation.Attestation;
|
|
264
|
+
export declare namespace GeneratedAttestationCheck {
|
|
265
|
+
/**
|
|
266
|
+
* Why a record of an attestation no longer holds.
|
|
267
|
+
*/
|
|
268
|
+
type VoidReason = ("content-moved" | "bar-moved");
|
|
269
|
+
/**
|
|
270
|
+
* What an attester adds: text of any length and any number of lines, not blank.
|
|
271
|
+
*/
|
|
272
|
+
type AttestationNote = string;
|
|
273
|
+
/**
|
|
274
|
+
* One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments
|
|
275
|
+
* separated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].
|
|
276
|
+
*
|
|
277
|
+
* Validated wherever one is built, deserialized included, so a plugin handed one never has
|
|
278
|
+
* to ask whether it names a key this product owns.
|
|
279
|
+
*/
|
|
280
|
+
type MetadataKey = string;
|
|
281
|
+
/**
|
|
282
|
+
* What `attestation check` answers: one kind on one item.
|
|
283
|
+
*
|
|
284
|
+
* Every member is always written, `reason` and `record` as `null` when they have nothing to
|
|
285
|
+
* say.
|
|
286
|
+
*/
|
|
287
|
+
interface AttestationCheck {
|
|
288
|
+
/**
|
|
289
|
+
* The kind asked about.
|
|
290
|
+
*/
|
|
291
|
+
kind: string;
|
|
292
|
+
/**
|
|
293
|
+
* What the check found.
|
|
294
|
+
*/
|
|
295
|
+
state: ("valid" | "void" | "absent");
|
|
296
|
+
/**
|
|
297
|
+
* Why the record is void: `null` unless `state` is `void`.
|
|
298
|
+
*/
|
|
299
|
+
reason?: (VoidReason | null);
|
|
300
|
+
/**
|
|
301
|
+
* The record of the kind the item holds, or `null` when it holds none.
|
|
302
|
+
*/
|
|
303
|
+
record?: (Attestation | null);
|
|
304
|
+
[k: string]: any;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* One attestation: who cleared the item's authored content, when, which content and against
|
|
308
|
+
* which bar.
|
|
309
|
+
*/
|
|
310
|
+
interface Attestation {
|
|
311
|
+
/**
|
|
312
|
+
* The kind of attestation this is; the key it is held under.
|
|
313
|
+
*/
|
|
314
|
+
kind: string;
|
|
315
|
+
/**
|
|
316
|
+
* Who attested, as the caller labels them.
|
|
317
|
+
*/
|
|
318
|
+
by: string;
|
|
319
|
+
/**
|
|
320
|
+
* When it was recorded, in RFC 3339 to the second.
|
|
321
|
+
*/
|
|
322
|
+
at: string;
|
|
323
|
+
/**
|
|
324
|
+
* The digest of the item's authored content when it was recorded, computed by the store
|
|
325
|
+
* (see the module's documentation).
|
|
326
|
+
*/
|
|
327
|
+
content_digest: string;
|
|
328
|
+
/**
|
|
329
|
+
* The fingerprint of the bar the content was cleared against, as the caller gave it.
|
|
330
|
+
*/
|
|
331
|
+
bar: string;
|
|
332
|
+
/**
|
|
333
|
+
* What the attester added, when they added anything.
|
|
334
|
+
*/
|
|
335
|
+
note?: (AttestationNote | null);
|
|
336
|
+
/**
|
|
337
|
+
* The caller-owned metadata keys left out of `content_digest`, sorted; empty when none
|
|
338
|
+
* were.
|
|
339
|
+
*/
|
|
340
|
+
excludes?: MetadataKey[];
|
|
341
|
+
[k: string]: any;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
export type AttestationCheck = GeneratedAttestationCheck.AttestationCheck;
|
|
345
|
+
export declare namespace GeneratedAttestationState {
|
|
346
|
+
/**
|
|
347
|
+
* What a check of one kind of attestation found.
|
|
348
|
+
*/
|
|
349
|
+
type AttestationState = ("valid" | "void" | "absent");
|
|
350
|
+
}
|
|
351
|
+
export type AttestationState = GeneratedAttestationState.AttestationState;
|
|
352
|
+
export declare namespace GeneratedAttested {
|
|
353
|
+
/**
|
|
354
|
+
* What an attester adds: text of any length and any number of lines, not blank.
|
|
355
|
+
*/
|
|
356
|
+
type AttestationNote = string;
|
|
357
|
+
/**
|
|
358
|
+
* One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments
|
|
359
|
+
* separated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].
|
|
360
|
+
*
|
|
361
|
+
* Validated wherever one is built, deserialized included, so a plugin handed one never has
|
|
362
|
+
* to ask whether it names a key this product owns.
|
|
363
|
+
*/
|
|
364
|
+
type MetadataKey = string;
|
|
365
|
+
/**
|
|
366
|
+
* What a locator names.
|
|
367
|
+
*/
|
|
368
|
+
type LocatorKind = ("source" | "item" | "field" | "metadata-key" | "comment" | "path" | "identity");
|
|
369
|
+
/**
|
|
370
|
+
* What `attest` answers: the record it wrote, on the item it wrote it to.
|
|
371
|
+
*/
|
|
372
|
+
interface Attested {
|
|
373
|
+
/**
|
|
374
|
+
* The item, by qualified id.
|
|
375
|
+
*/
|
|
376
|
+
id: string;
|
|
377
|
+
record: Attestation;
|
|
378
|
+
sanitization?: (Sanitization | null);
|
|
379
|
+
[k: string]: any;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* The record as the source holds it after the write.
|
|
383
|
+
*/
|
|
384
|
+
interface Attestation {
|
|
385
|
+
/**
|
|
386
|
+
* The kind of attestation this is; the key it is held under.
|
|
387
|
+
*/
|
|
388
|
+
kind: string;
|
|
389
|
+
/**
|
|
390
|
+
* Who attested, as the caller labels them.
|
|
391
|
+
*/
|
|
392
|
+
by: string;
|
|
393
|
+
/**
|
|
394
|
+
* When it was recorded, in RFC 3339 to the second.
|
|
395
|
+
*/
|
|
396
|
+
at: string;
|
|
397
|
+
/**
|
|
398
|
+
* The digest of the item's authored content when it was recorded, computed by the store
|
|
399
|
+
* (see the module's documentation).
|
|
400
|
+
*/
|
|
401
|
+
content_digest: string;
|
|
402
|
+
/**
|
|
403
|
+
* The fingerprint of the bar the content was cleared against, as the caller gave it.
|
|
404
|
+
*/
|
|
405
|
+
bar: string;
|
|
406
|
+
/**
|
|
407
|
+
* What the attester added, when they added anything.
|
|
408
|
+
*/
|
|
409
|
+
note?: (AttestationNote | null);
|
|
410
|
+
/**
|
|
411
|
+
* The caller-owned metadata keys left out of `content_digest`, sorted; empty when none
|
|
412
|
+
* were.
|
|
413
|
+
*/
|
|
414
|
+
excludes?: MetadataKey[];
|
|
415
|
+
[k: string]: any;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* What the screened writes of one command replaced, and what sanitise-on-refusal changed:
|
|
419
|
+
* the `sanitization` member a write's answer carries when it is not empty.
|
|
420
|
+
*/
|
|
421
|
+
interface Sanitization {
|
|
422
|
+
/**
|
|
423
|
+
* Spans the writes' own sanitisations rewrote.
|
|
424
|
+
*/
|
|
425
|
+
replaced: number;
|
|
426
|
+
/**
|
|
427
|
+
* Each field or comment of an item sanitisation changed beyond the write itself.
|
|
428
|
+
*/
|
|
429
|
+
side_effect: SideEffect[];
|
|
430
|
+
/**
|
|
431
|
+
* Whether nothing was written, the changes only reported.
|
|
432
|
+
*/
|
|
433
|
+
dry_run: boolean;
|
|
434
|
+
[k: string]: any;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* One field or comment of an item a sanitisation changed, named by screened locators.
|
|
438
|
+
*/
|
|
439
|
+
interface SideEffect {
|
|
440
|
+
/**
|
|
441
|
+
* The item, by its qualified id as screened.
|
|
442
|
+
*/
|
|
443
|
+
item: (string | {
|
|
444
|
+
redacted: true;
|
|
445
|
+
kind: LocatorKind;
|
|
446
|
+
ordinal: number;
|
|
447
|
+
});
|
|
448
|
+
/**
|
|
449
|
+
* The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.
|
|
450
|
+
*/
|
|
451
|
+
field: (string | {
|
|
452
|
+
redacted: true;
|
|
453
|
+
kind: LocatorKind;
|
|
454
|
+
ordinal: number;
|
|
455
|
+
});
|
|
456
|
+
[k: string]: any;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
export type Attested = GeneratedAttested.Attested;
|
|
212
460
|
export declare namespace GeneratedAuthorKind {
|
|
213
461
|
/**
|
|
214
462
|
* Who wrote a comment, as the source that holds it can tell: a person, a bot — an
|
|
@@ -219,6 +467,13 @@ export declare namespace GeneratedAuthorKind {
|
|
|
219
467
|
type AuthorKind = ("person" | "bot" | "unknown");
|
|
220
468
|
}
|
|
221
469
|
export type AuthorKind = GeneratedAuthorKind.AuthorKind;
|
|
470
|
+
export declare namespace GeneratedBatchOutcome {
|
|
471
|
+
/**
|
|
472
|
+
* What became of one item of a batched write.
|
|
473
|
+
*/
|
|
474
|
+
type BatchOutcome = ("written" | "held" | "version-moved" | "error");
|
|
475
|
+
}
|
|
476
|
+
export type BatchOutcome = GeneratedBatchOutcome.BatchOutcome;
|
|
222
477
|
export declare namespace GeneratedCacheCleared {
|
|
223
478
|
/**
|
|
224
479
|
* What `cache clear` emptied: one entry per cache it reached.
|
|
@@ -610,6 +865,39 @@ export declare namespace GeneratedCommentActivity {
|
|
|
610
865
|
}
|
|
611
866
|
}
|
|
612
867
|
export type CommentActivity = GeneratedCommentActivity.CommentActivity;
|
|
868
|
+
export declare namespace GeneratedCommentBatch {
|
|
869
|
+
/**
|
|
870
|
+
* What `task comment add-many` reads: many comments, each on one task of one source.
|
|
871
|
+
*/
|
|
872
|
+
interface CommentBatch {
|
|
873
|
+
/**
|
|
874
|
+
* `1`.
|
|
875
|
+
*/
|
|
876
|
+
schema_version: number;
|
|
877
|
+
/**
|
|
878
|
+
* The comments, each written on its own.
|
|
879
|
+
*/
|
|
880
|
+
comments: CommentBatchItem[];
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* One comment of a [`CommentBatch`].
|
|
884
|
+
*/
|
|
885
|
+
interface CommentBatchItem {
|
|
886
|
+
/**
|
|
887
|
+
* The task's qualified id, `<source>:<native-id>`, of the source the batch names.
|
|
888
|
+
*/
|
|
889
|
+
item: string;
|
|
890
|
+
/**
|
|
891
|
+
* The comment's Markdown.
|
|
892
|
+
*/
|
|
893
|
+
body: string;
|
|
894
|
+
/**
|
|
895
|
+
* The version the task must be at for the comment to be written, as a read reported it.
|
|
896
|
+
*/
|
|
897
|
+
if_version?: (string | null);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
export type CommentBatch = GeneratedCommentBatch.CommentBatch;
|
|
613
901
|
export declare namespace GeneratedCommentList {
|
|
614
902
|
/**
|
|
615
903
|
* Every comment on one task, oldest first: what `task comment list` answers with.
|
|
@@ -1029,92 +1317,200 @@ export declare namespace GeneratedCommentWritten {
|
|
|
1029
1317
|
}
|
|
1030
1318
|
}
|
|
1031
1319
|
export type CommentWritten = GeneratedCommentWritten.CommentWritten;
|
|
1032
|
-
export declare namespace
|
|
1320
|
+
export declare namespace GeneratedCommentsAdded {
|
|
1033
1321
|
/**
|
|
1034
|
-
* What
|
|
1322
|
+
* What a locator names.
|
|
1035
1323
|
*/
|
|
1036
|
-
|
|
1324
|
+
type LocatorKind = ("source" | "item" | "field" | "metadata-key" | "comment" | "path" | "identity");
|
|
1325
|
+
/**
|
|
1326
|
+
* What `task comment add-many` answers: one result per comment, in the order given.
|
|
1327
|
+
*/
|
|
1328
|
+
interface CommentsAdded {
|
|
1037
1329
|
/**
|
|
1038
|
-
*
|
|
1330
|
+
* `1`.
|
|
1039
1331
|
*/
|
|
1040
1332
|
schema_version: number;
|
|
1041
1333
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
* host's at the read's start, set back by the source's consistency window. A later read
|
|
1044
|
-
* from it may return a comment again, with the same `id` and `version`.
|
|
1045
|
-
*/
|
|
1046
|
-
watermark: string;
|
|
1047
|
-
/**
|
|
1048
|
-
* Every comment made or edited at or after the instant on a matching task, oldest first by
|
|
1049
|
-
* when it last changed.
|
|
1334
|
+
* One per comment.
|
|
1050
1335
|
*/
|
|
1051
|
-
|
|
1336
|
+
results: CommentAddResult[];
|
|
1337
|
+
sanitization?: (Sanitization | null);
|
|
1052
1338
|
[k: string]: any;
|
|
1053
1339
|
}
|
|
1054
1340
|
/**
|
|
1055
|
-
*
|
|
1341
|
+
* What became of one comment of a [`CommentBatch`].
|
|
1056
1342
|
*/
|
|
1057
|
-
interface
|
|
1343
|
+
interface CommentAddResult {
|
|
1058
1344
|
/**
|
|
1059
|
-
* The
|
|
1345
|
+
* The item as the batch named it.
|
|
1060
1346
|
*/
|
|
1061
1347
|
item: string;
|
|
1062
1348
|
/**
|
|
1063
|
-
*
|
|
1064
|
-
*/
|
|
1065
|
-
id: string;
|
|
1066
|
-
/**
|
|
1067
|
-
* Where a person can open it, or `null`.
|
|
1349
|
+
* What became of it.
|
|
1068
1350
|
*/
|
|
1069
|
-
|
|
1351
|
+
outcome: ("written" | "held" | "version-moved" | "error");
|
|
1070
1352
|
/**
|
|
1071
|
-
*
|
|
1353
|
+
* The comment written — `null` unless `outcome` is `written`.
|
|
1072
1354
|
*/
|
|
1073
|
-
|
|
1355
|
+
comment?: (AddedComment | null);
|
|
1074
1356
|
/**
|
|
1075
|
-
*
|
|
1357
|
+
* The version the task is at — present when `outcome` is `version-moved` and the source
|
|
1358
|
+
* can name it, which it cannot just after another write of this batch moved the task.
|
|
1076
1359
|
*/
|
|
1077
|
-
|
|
1360
|
+
current_version?: (string | null);
|
|
1078
1361
|
/**
|
|
1079
|
-
*
|
|
1362
|
+
* Why it was not written — present when `outcome` is `error`.
|
|
1080
1363
|
*/
|
|
1081
|
-
|
|
1364
|
+
reason?: (string | null);
|
|
1365
|
+
[k: string]: any;
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* One comment a batch wrote.
|
|
1369
|
+
*/
|
|
1370
|
+
interface AddedComment {
|
|
1082
1371
|
/**
|
|
1083
|
-
*
|
|
1372
|
+
* Its id in the source.
|
|
1084
1373
|
*/
|
|
1085
|
-
|
|
1374
|
+
id: string;
|
|
1086
1375
|
/**
|
|
1087
|
-
*
|
|
1088
|
-
* answering one comment unchanged answer the same version.
|
|
1376
|
+
* Where it is shown, when the source has an address for it.
|
|
1089
1377
|
*/
|
|
1090
|
-
|
|
1378
|
+
url?: (string | null);
|
|
1091
1379
|
/**
|
|
1092
|
-
*
|
|
1380
|
+
* Its version, as `task comments` reports one.
|
|
1093
1381
|
*/
|
|
1094
|
-
|
|
1382
|
+
version?: (string | null);
|
|
1095
1383
|
[k: string]: any;
|
|
1096
1384
|
}
|
|
1097
|
-
}
|
|
1098
|
-
export type CommentsSince = GeneratedCommentsSince.CommentsSince;
|
|
1099
|
-
export declare namespace GeneratedCompleteAction {
|
|
1100
|
-
/**
|
|
1101
|
-
* What moving one issue's item to `done` came to at one source.
|
|
1102
|
-
*/
|
|
1103
|
-
type CompleteAction = ("updated" | "would-update" | "unchanged" | "skipped" | "absent" | "failed");
|
|
1104
|
-
}
|
|
1105
|
-
export type CompleteAction = GeneratedCompleteAction.CompleteAction;
|
|
1106
|
-
export declare namespace GeneratedCompletion {
|
|
1107
1385
|
/**
|
|
1108
|
-
* What
|
|
1109
|
-
*
|
|
1386
|
+
* What the screened writes of one command replaced, and what sanitise-on-refusal changed:
|
|
1387
|
+
* the `sanitization` member a write's answer carries when it is not empty.
|
|
1110
1388
|
*/
|
|
1111
|
-
|
|
1112
|
-
completion: "absent";
|
|
1113
|
-
[k: string]: any;
|
|
1114
|
-
} | {
|
|
1115
|
-
task: HeldTask;
|
|
1389
|
+
interface Sanitization {
|
|
1116
1390
|
/**
|
|
1117
|
-
*
|
|
1391
|
+
* Spans the writes' own sanitisations rewrote.
|
|
1392
|
+
*/
|
|
1393
|
+
replaced: number;
|
|
1394
|
+
/**
|
|
1395
|
+
* Each field or comment of an item sanitisation changed beyond the write itself.
|
|
1396
|
+
*/
|
|
1397
|
+
side_effect: SideEffect[];
|
|
1398
|
+
/**
|
|
1399
|
+
* Whether nothing was written, the changes only reported.
|
|
1400
|
+
*/
|
|
1401
|
+
dry_run: boolean;
|
|
1402
|
+
[k: string]: any;
|
|
1403
|
+
}
|
|
1404
|
+
/**
|
|
1405
|
+
* One field or comment of an item a sanitisation changed, named by screened locators.
|
|
1406
|
+
*/
|
|
1407
|
+
interface SideEffect {
|
|
1408
|
+
/**
|
|
1409
|
+
* The item, by its qualified id as screened.
|
|
1410
|
+
*/
|
|
1411
|
+
item: (string | {
|
|
1412
|
+
redacted: true;
|
|
1413
|
+
kind: LocatorKind;
|
|
1414
|
+
ordinal: number;
|
|
1415
|
+
});
|
|
1416
|
+
/**
|
|
1417
|
+
* The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.
|
|
1418
|
+
*/
|
|
1419
|
+
field: (string | {
|
|
1420
|
+
redacted: true;
|
|
1421
|
+
kind: LocatorKind;
|
|
1422
|
+
ordinal: number;
|
|
1423
|
+
});
|
|
1424
|
+
[k: string]: any;
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
export type CommentsAdded = GeneratedCommentsAdded.CommentsAdded;
|
|
1428
|
+
export declare namespace GeneratedCommentsSince {
|
|
1429
|
+
/**
|
|
1430
|
+
* What `task comments <SOURCE> --since` answers with.
|
|
1431
|
+
*/
|
|
1432
|
+
interface CommentsSince {
|
|
1433
|
+
/**
|
|
1434
|
+
* The version of this document's shape: `1`.
|
|
1435
|
+
*/
|
|
1436
|
+
schema_version: number;
|
|
1437
|
+
/**
|
|
1438
|
+
* The instant a later read may start from: the earlier of the source's own time and this
|
|
1439
|
+
* host's at the read's start, set back by the source's consistency window. A later read
|
|
1440
|
+
* from it may return a comment again, with the same `id` and `version`.
|
|
1441
|
+
*/
|
|
1442
|
+
watermark: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* Every comment made or edited at or after the instant on a matching task, oldest first by
|
|
1445
|
+
* when it last changed.
|
|
1446
|
+
*/
|
|
1447
|
+
comments: CommentActivity[];
|
|
1448
|
+
[k: string]: any;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* One comment of a [`CommentsSince`] answer.
|
|
1452
|
+
*/
|
|
1453
|
+
interface CommentActivity {
|
|
1454
|
+
/**
|
|
1455
|
+
* The task it is on, qualified: `<source>:<native id>`.
|
|
1456
|
+
*/
|
|
1457
|
+
item: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* Its own id, exactly as its source issued it.
|
|
1460
|
+
*/
|
|
1461
|
+
id: string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Where a person can open it, or `null`.
|
|
1464
|
+
*/
|
|
1465
|
+
url?: (string | null);
|
|
1466
|
+
/**
|
|
1467
|
+
* Who wrote it, in the source's own spelling, or `null`.
|
|
1468
|
+
*/
|
|
1469
|
+
author?: (string | null);
|
|
1470
|
+
/**
|
|
1471
|
+
* Whether that is a person, a bot, or neither the source can tell.
|
|
1472
|
+
*/
|
|
1473
|
+
author_kind: ("person" | "bot" | "unknown");
|
|
1474
|
+
/**
|
|
1475
|
+
* When it was written.
|
|
1476
|
+
*/
|
|
1477
|
+
created_at: string;
|
|
1478
|
+
/**
|
|
1479
|
+
* When it last changed — its creation, for one never edited.
|
|
1480
|
+
*/
|
|
1481
|
+
updated_at: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* The comment's version: when it last changed, at the backend's own precision. Two reads
|
|
1484
|
+
* answering one comment unchanged answer the same version.
|
|
1485
|
+
*/
|
|
1486
|
+
version: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* What it says, byte for byte.
|
|
1489
|
+
*/
|
|
1490
|
+
body: string;
|
|
1491
|
+
[k: string]: any;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
export type CommentsSince = GeneratedCommentsSince.CommentsSince;
|
|
1495
|
+
export declare namespace GeneratedCompleteAction {
|
|
1496
|
+
/**
|
|
1497
|
+
* What moving one issue's item to `done` came to at one source.
|
|
1498
|
+
*/
|
|
1499
|
+
type CompleteAction = ("updated" | "would-update" | "unchanged" | "skipped" | "absent" | "failed");
|
|
1500
|
+
}
|
|
1501
|
+
export type CompleteAction = GeneratedCompleteAction.CompleteAction;
|
|
1502
|
+
export declare namespace GeneratedCompletion {
|
|
1503
|
+
/**
|
|
1504
|
+
* What moving one issue's item to `done` comes to at one source — the task it holds riding on
|
|
1505
|
+
* every outcome that has one, so none can be told without its task, or with one, that has not.
|
|
1506
|
+
*/
|
|
1507
|
+
type Completion = ({
|
|
1508
|
+
completion: "absent";
|
|
1509
|
+
[k: string]: any;
|
|
1510
|
+
} | {
|
|
1511
|
+
task: HeldTask;
|
|
1512
|
+
/**
|
|
1513
|
+
* Why, as `closed as <reason>`.
|
|
1118
1514
|
*/
|
|
1119
1515
|
reason: string;
|
|
1120
1516
|
completion: "skipped";
|
|
@@ -1668,6 +2064,18 @@ export declare namespace GeneratedCopyAction {
|
|
|
1668
2064
|
reason: string;
|
|
1669
2065
|
action: "skipped";
|
|
1670
2066
|
[k: string]: any;
|
|
2067
|
+
} | {
|
|
2068
|
+
/**
|
|
2069
|
+
* The size of the body the item would store, as the destination's plugin counts it —
|
|
2070
|
+
* what [`CopyOutcome::body_size`] reports beside it.
|
|
2071
|
+
*/
|
|
2072
|
+
size: number;
|
|
2073
|
+
/**
|
|
2074
|
+
* The most the destination holds in one body, as its plugin states it.
|
|
2075
|
+
*/
|
|
2076
|
+
limit: number;
|
|
2077
|
+
action: "oversize";
|
|
2078
|
+
[k: string]: any;
|
|
1671
2079
|
});
|
|
1672
2080
|
/**
|
|
1673
2081
|
* One item, qualified by the source it came from.
|
|
@@ -1827,6 +2235,13 @@ export declare namespace GeneratedCopyOutcome {
|
|
|
1827
2235
|
* name — or the record itself — had landed and their headings could be addressed.
|
|
1828
2236
|
*/
|
|
1829
2237
|
section_link_updates?: number;
|
|
2238
|
+
/**
|
|
2239
|
+
* The size of the body the destination would store for the item, in the unit its plugin
|
|
2240
|
+
* states its limit in — the metadata slot the destination keeps and every asset reference
|
|
2241
|
+
* rewritten to where it is served included. Present on a dry run's item whose destination
|
|
2242
|
+
* can say, and absent on every other outcome.
|
|
2243
|
+
*/
|
|
2244
|
+
body_size?: (number | null);
|
|
1830
2245
|
[k: string]: any;
|
|
1831
2246
|
} & ({
|
|
1832
2247
|
/**
|
|
@@ -1928,6 +2343,18 @@ export declare namespace GeneratedCopyOutcome {
|
|
|
1928
2343
|
reason: string;
|
|
1929
2344
|
action: "skipped";
|
|
1930
2345
|
[k: string]: any;
|
|
2346
|
+
} | {
|
|
2347
|
+
/**
|
|
2348
|
+
* The size of the body the item would store, as the destination's plugin counts it —
|
|
2349
|
+
* what [`CopyOutcome::body_size`] reports beside it.
|
|
2350
|
+
*/
|
|
2351
|
+
size: number;
|
|
2352
|
+
/**
|
|
2353
|
+
* The most the destination holds in one body, as its plugin states it.
|
|
2354
|
+
*/
|
|
2355
|
+
limit: number;
|
|
2356
|
+
action: "oversize";
|
|
2357
|
+
[k: string]: any;
|
|
1931
2358
|
}));
|
|
1932
2359
|
/**
|
|
1933
2360
|
* One mutation of an expected write.
|
|
@@ -2287,6 +2714,13 @@ export declare namespace GeneratedCopyReport {
|
|
|
2287
2714
|
* name — or the record itself — had landed and their headings could be addressed.
|
|
2288
2715
|
*/
|
|
2289
2716
|
section_link_updates?: number;
|
|
2717
|
+
/**
|
|
2718
|
+
* The size of the body the destination would store for the item, in the unit its plugin
|
|
2719
|
+
* states its limit in — the metadata slot the destination keeps and every asset reference
|
|
2720
|
+
* rewritten to where it is served included. Present on a dry run's item whose destination
|
|
2721
|
+
* can say, and absent on every other outcome.
|
|
2722
|
+
*/
|
|
2723
|
+
body_size?: (number | null);
|
|
2290
2724
|
[k: string]: any;
|
|
2291
2725
|
} & CopyOutcome1);
|
|
2292
2726
|
/**
|
|
@@ -2439,6 +2873,18 @@ export declare namespace GeneratedCopyReport {
|
|
|
2439
2873
|
reason: string;
|
|
2440
2874
|
action: "skipped";
|
|
2441
2875
|
[k: string]: any;
|
|
2876
|
+
} | {
|
|
2877
|
+
/**
|
|
2878
|
+
* The size of the body the item would store, as the destination's plugin counts it —
|
|
2879
|
+
* what [`CopyOutcome::body_size`] reports beside it.
|
|
2880
|
+
*/
|
|
2881
|
+
size: number;
|
|
2882
|
+
/**
|
|
2883
|
+
* The most the destination holds in one body, as its plugin states it.
|
|
2884
|
+
*/
|
|
2885
|
+
limit: number;
|
|
2886
|
+
action: "oversize";
|
|
2887
|
+
[k: string]: any;
|
|
2442
2888
|
});
|
|
2443
2889
|
/**
|
|
2444
2890
|
* One item, qualified by the source it came from.
|
|
@@ -4539,6 +4985,12 @@ export declare namespace GeneratedFailureDocument {
|
|
|
4539
4985
|
* and absent otherwise.
|
|
4540
4986
|
*/
|
|
4541
4987
|
predates_write?: boolean;
|
|
4988
|
+
/**
|
|
4989
|
+
* Every item a copy refused as `oversize` — its source id, its destination, the size of
|
|
4990
|
+
* the body that write would store and the most that destination holds — and absent for
|
|
4991
|
+
* every other failure.
|
|
4992
|
+
*/
|
|
4993
|
+
oversize?: Oversized[];
|
|
4542
4994
|
sanitization?: (Sanitization | null);
|
|
4543
4995
|
[k: string]: any;
|
|
4544
4996
|
}
|
|
@@ -4594,131 +5046,492 @@ export declare namespace GeneratedFailureDocument {
|
|
|
4594
5046
|
* The item's status after the write, exactly as `task show` spells it — `null` for a
|
|
4595
5047
|
* document, which has none, and where an expected write that failed cannot say.
|
|
4596
5048
|
*/
|
|
4597
|
-
status?: (Status | null);
|
|
5049
|
+
status?: (Status | null);
|
|
5050
|
+
/**
|
|
5051
|
+
* A task's priority after the write — `null` for a project or a document, which carry
|
|
5052
|
+
* none, and where an expected write that failed cannot say.
|
|
5053
|
+
*/
|
|
5054
|
+
priority?: (Priority | null);
|
|
5055
|
+
[k: string]: any;
|
|
5056
|
+
}
|
|
5057
|
+
/**
|
|
5058
|
+
* A source's status, kept in both normalised and original form.
|
|
5059
|
+
*
|
|
5060
|
+
* `category` is what every filter compares against; `name` is the source's own
|
|
5061
|
+
* wording, preserved so display never flattens "In Review" into "In Progress".
|
|
5062
|
+
*/
|
|
5063
|
+
interface Status {
|
|
5064
|
+
/**
|
|
5065
|
+
* The normalised value filters compare against.
|
|
5066
|
+
*/
|
|
5067
|
+
category: ("draft" | "backlog" | "todo" | "queued" | "in-progress" | "done" | "cancelled" | "unknown");
|
|
5068
|
+
/**
|
|
5069
|
+
* The source's own label for this status.
|
|
5070
|
+
*/
|
|
5071
|
+
name: string;
|
|
5072
|
+
[k: string]: any;
|
|
5073
|
+
}
|
|
5074
|
+
/**
|
|
5075
|
+
* That an expected write read its target before writing, and why.
|
|
5076
|
+
*/
|
|
5077
|
+
interface WriteFallback {
|
|
5078
|
+
/**
|
|
5079
|
+
* Always `true`: the write made one read.
|
|
5080
|
+
*/
|
|
5081
|
+
read: boolean;
|
|
5082
|
+
/**
|
|
5083
|
+
* Why it could not take what it needed from the cache.
|
|
5084
|
+
*/
|
|
5085
|
+
reason: string;
|
|
5086
|
+
[k: string]: any;
|
|
5087
|
+
}
|
|
5088
|
+
/**
|
|
5089
|
+
* What one command spent, summed over the sources in it that meter their own requests.
|
|
5090
|
+
*
|
|
5091
|
+
* **Source-owned.** Every figure is what a source said it sent and spent while the command
|
|
5092
|
+
* ran, read through [`TaskSource::metering`](onetaskgraph_plugin_api::TaskSource::metering)
|
|
5093
|
+
* before the command and again after it. The engine adds the differences up by name and
|
|
5094
|
+
* interprets none of them, which is why the budget and unit names are open vocabulary.
|
|
5095
|
+
*/
|
|
5096
|
+
interface Spent {
|
|
5097
|
+
/**
|
|
5098
|
+
* How many HTTP requests those sources sent for this command.
|
|
5099
|
+
*/
|
|
5100
|
+
requests: number;
|
|
5101
|
+
/**
|
|
5102
|
+
* What those requests spent, one entry per budget and unit, ordered by budget name.
|
|
5103
|
+
*/
|
|
5104
|
+
budgets: BudgetSpent[];
|
|
5105
|
+
[k: string]: any;
|
|
5106
|
+
}
|
|
5107
|
+
/**
|
|
5108
|
+
* What one command spent against one budget.
|
|
5109
|
+
*/
|
|
5110
|
+
interface BudgetSpent {
|
|
5111
|
+
/**
|
|
5112
|
+
* The budget, as the source names it — `graphql`, `rest`.
|
|
5113
|
+
*/
|
|
5114
|
+
budget: string;
|
|
5115
|
+
/**
|
|
5116
|
+
* What it is metered in — `points`, `requests`.
|
|
5117
|
+
*/
|
|
5118
|
+
unit: string;
|
|
5119
|
+
/**
|
|
5120
|
+
* How much was spent against it, in that unit.
|
|
5121
|
+
*/
|
|
5122
|
+
amount: number;
|
|
5123
|
+
/**
|
|
5124
|
+
* Whether any part of `amount` was modelled by a source rather than reported by its
|
|
5125
|
+
* backend or counted, which makes `amount` a lower bound on what the backend charged
|
|
5126
|
+
* rather than a measurement of it.
|
|
5127
|
+
*/
|
|
5128
|
+
lower_bound: boolean;
|
|
5129
|
+
[k: string]: any;
|
|
5130
|
+
}
|
|
5131
|
+
/**
|
|
5132
|
+
* One item a copy would write whose body is larger than its destination holds.
|
|
5133
|
+
*/
|
|
5134
|
+
interface Oversized {
|
|
5135
|
+
/**
|
|
5136
|
+
* The qualified id the item was read from.
|
|
5137
|
+
*/
|
|
5138
|
+
source: string;
|
|
5139
|
+
/**
|
|
5140
|
+
* The name a configuration document gives one configured source.
|
|
5141
|
+
*/
|
|
5142
|
+
destination: string;
|
|
5143
|
+
/**
|
|
5144
|
+
* The size of the body that write would store, as the destination's plugin counts it.
|
|
5145
|
+
*/
|
|
5146
|
+
body_size: number;
|
|
5147
|
+
/**
|
|
5148
|
+
* The most that destination holds in one body.
|
|
5149
|
+
*/
|
|
5150
|
+
limit: number;
|
|
5151
|
+
[k: string]: any;
|
|
5152
|
+
}
|
|
5153
|
+
/**
|
|
5154
|
+
* What the screened writes of one command replaced, and what sanitise-on-refusal changed:
|
|
5155
|
+
* the `sanitization` member a write's answer carries when it is not empty.
|
|
5156
|
+
*/
|
|
5157
|
+
interface Sanitization {
|
|
5158
|
+
/**
|
|
5159
|
+
* Spans the writes' own sanitisations rewrote.
|
|
5160
|
+
*/
|
|
5161
|
+
replaced: number;
|
|
5162
|
+
/**
|
|
5163
|
+
* Each field or comment of an item sanitisation changed beyond the write itself.
|
|
5164
|
+
*/
|
|
5165
|
+
side_effect: SideEffect[];
|
|
5166
|
+
/**
|
|
5167
|
+
* Whether nothing was written, the changes only reported.
|
|
5168
|
+
*/
|
|
5169
|
+
dry_run: boolean;
|
|
5170
|
+
[k: string]: any;
|
|
5171
|
+
}
|
|
5172
|
+
/**
|
|
5173
|
+
* One field or comment of an item a sanitisation changed, named by screened locators.
|
|
5174
|
+
*/
|
|
5175
|
+
interface SideEffect {
|
|
5176
|
+
/**
|
|
5177
|
+
* The item, by its qualified id as screened.
|
|
5178
|
+
*/
|
|
5179
|
+
item: (string | {
|
|
5180
|
+
redacted: true;
|
|
5181
|
+
kind: LocatorKind;
|
|
5182
|
+
ordinal: number;
|
|
5183
|
+
});
|
|
5184
|
+
/**
|
|
5185
|
+
* The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.
|
|
5186
|
+
*/
|
|
5187
|
+
field: (string | {
|
|
5188
|
+
redacted: true;
|
|
5189
|
+
kind: LocatorKind;
|
|
5190
|
+
ordinal: number;
|
|
5191
|
+
});
|
|
5192
|
+
[k: string]: any;
|
|
5193
|
+
}
|
|
5194
|
+
}
|
|
5195
|
+
export type FailureDocument = GeneratedFailureDocument.FailureDocument;
|
|
5196
|
+
export declare namespace GeneratedFindRequest {
|
|
5197
|
+
/**
|
|
5198
|
+
* One item, qualified by the source it came from.
|
|
5199
|
+
*
|
|
5200
|
+
* Rendered `<source>:<native>` and parsed by splitting on the **first** colon,
|
|
5201
|
+
* so a native id may contain colons freely.
|
|
5202
|
+
*/
|
|
5203
|
+
type GlobalId = string;
|
|
5204
|
+
/**
|
|
5205
|
+
* The normalised status vocabulary shared across every source.
|
|
5206
|
+
*/
|
|
5207
|
+
type StatusCategory = ("draft" | "backlog" | "todo" | "queued" | "in-progress" | "done" | "cancelled" | "unknown");
|
|
5208
|
+
/**
|
|
5209
|
+
* What `task find` reads: many narrowed searches of one source.
|
|
5210
|
+
*/
|
|
5211
|
+
interface FindRequest {
|
|
5212
|
+
/**
|
|
5213
|
+
* `1`.
|
|
5214
|
+
*/
|
|
5215
|
+
schema_version: number;
|
|
5216
|
+
/**
|
|
5217
|
+
* The searches, each answered under its own key.
|
|
5218
|
+
*/
|
|
5219
|
+
queries: FindQuery[];
|
|
5220
|
+
}
|
|
5221
|
+
/**
|
|
5222
|
+
* One search of a [`FindRequest`]: every task matching all it names.
|
|
5223
|
+
*
|
|
5224
|
+
* It must be narrowed by at least one of `text`, `metadata` and `origin`; one narrowed by none
|
|
5225
|
+
* would answer the whole source, and is refused naming its key.
|
|
5226
|
+
*/
|
|
5227
|
+
interface FindQuery {
|
|
5228
|
+
/**
|
|
5229
|
+
* The caller's own name for this search, which its answer carries back. Unique within the
|
|
5230
|
+
* request.
|
|
5231
|
+
*/
|
|
5232
|
+
key: string;
|
|
5233
|
+
/**
|
|
5234
|
+
* Free text the task's title, content or either holds, as `in` says.
|
|
5235
|
+
*/
|
|
5236
|
+
text?: (string | null);
|
|
5237
|
+
/**
|
|
5238
|
+
* Where `text` is looked for.
|
|
5239
|
+
*/
|
|
5240
|
+
in?: ("title" | "content" | "both");
|
|
5241
|
+
/**
|
|
5242
|
+
* Caller-defined metadata values the task holds, each at `<KEY>[/<SEGMENT>…]`, as
|
|
5243
|
+
* `task list --metadata` takes them.
|
|
5244
|
+
*/
|
|
5245
|
+
metadata?: {
|
|
5246
|
+
[k: string]: string;
|
|
5247
|
+
};
|
|
5248
|
+
/**
|
|
5249
|
+
* The qualified id the task was copied from.
|
|
5250
|
+
*/
|
|
5251
|
+
origin?: (GlobalId | null);
|
|
5252
|
+
/**
|
|
5253
|
+
* The status categories to keep; empty keeps every one.
|
|
5254
|
+
*/
|
|
5255
|
+
status?: StatusCategory[];
|
|
5256
|
+
}
|
|
5257
|
+
}
|
|
5258
|
+
export type FindRequest = GeneratedFindRequest.FindRequest;
|
|
5259
|
+
export declare namespace GeneratedFoundTasks {
|
|
5260
|
+
/**
|
|
5261
|
+
* A source's own opaque identifier for one item.
|
|
5262
|
+
*
|
|
5263
|
+
* Deliberately unvalidated: a native id is whatever the upstream system says it
|
|
5264
|
+
* is, colons included. The engine parses a qualified id by splitting on the
|
|
5265
|
+
* *first* colon precisely so this stays true.
|
|
5266
|
+
*/
|
|
5267
|
+
type NativeId = string;
|
|
5268
|
+
/**
|
|
5269
|
+
* Where an entity is, in the one form a consumer can act on without knowing the backend.
|
|
5270
|
+
*
|
|
5271
|
+
* Externally tagged with exactly two variants, so the JSON is `{"url": "https://…"}` or
|
|
5272
|
+
* `{"path": "/home/…"}` and a consumer tells them apart by which key is present. A reader
|
|
5273
|
+
* handed one of these knows what to *do* with it — open a link, or print a path and read
|
|
5274
|
+
* the file out — which is what a bare string could not have said.
|
|
5275
|
+
*
|
|
5276
|
+
* It carries no third case on purpose. `None` on the field is the third case, and it
|
|
5277
|
+
* means the source did not say where the entity is, which is not the same as saying it is
|
|
5278
|
+
* nowhere.
|
|
5279
|
+
*
|
|
5280
|
+
* This does **not** redefine, replace or derive from the `url` field of [`Task`],
|
|
5281
|
+
* [`Project`] or [`Document`]: a source that reports a web URL there goes on reporting
|
|
5282
|
+
* it, and every existing consumer sees exactly what it saw.
|
|
5283
|
+
*/
|
|
5284
|
+
type Location = ({
|
|
5285
|
+
url: string;
|
|
5286
|
+
} | {
|
|
5287
|
+
path: string;
|
|
5288
|
+
});
|
|
5289
|
+
/**
|
|
5290
|
+
* A repository identified by its normalized origin, without a URL scheme or `.git` suffix.
|
|
5291
|
+
*/
|
|
5292
|
+
type Repository = string;
|
|
5293
|
+
/**
|
|
5294
|
+
* One task named by another task's [`Task::delivers`] or [`Task::delivered_by`].
|
|
5295
|
+
*
|
|
5296
|
+
* A string with one of two spellings, decided the way a [`DependencyEndpoint`] decides it:
|
|
5297
|
+
* one holding a colon is `<source>:<native>` and names a task of any source, and one
|
|
5298
|
+
* without is a bare native id naming a task of the source that holds the list. So a
|
|
5299
|
+
* native id holding a colon cannot be named bare, exactly as it cannot in
|
|
5300
|
+
* `onetaskgraph.depends_on`.
|
|
5301
|
+
*/
|
|
5302
|
+
type TaskRef = string;
|
|
5303
|
+
/**
|
|
5304
|
+
* What `task find` answers: one answer per search, in the order asked.
|
|
5305
|
+
*/
|
|
5306
|
+
interface FoundTasks {
|
|
5307
|
+
/**
|
|
5308
|
+
* `1`.
|
|
5309
|
+
*/
|
|
5310
|
+
schema_version: number;
|
|
5311
|
+
/**
|
|
5312
|
+
* One per search.
|
|
5313
|
+
*/
|
|
5314
|
+
answers: FindAnswer[];
|
|
5315
|
+
[k: string]: any;
|
|
5316
|
+
}
|
|
5317
|
+
/**
|
|
5318
|
+
* What one search of a [`FindRequest`] found.
|
|
5319
|
+
*/
|
|
5320
|
+
interface FindAnswer {
|
|
5321
|
+
/**
|
|
5322
|
+
* The search's key.
|
|
5323
|
+
*/
|
|
5324
|
+
key: string;
|
|
5325
|
+
/**
|
|
5326
|
+
* Every task it matched, across every page, each as `task list` reports it.
|
|
5327
|
+
*/
|
|
5328
|
+
items: Qualified[];
|
|
5329
|
+
/**
|
|
5330
|
+
* Whether `items` is every match: `false` when a page of this search could not be read,
|
|
5331
|
+
* and `items` holds what the pages before it answered.
|
|
5332
|
+
*/
|
|
5333
|
+
complete: boolean;
|
|
5334
|
+
/**
|
|
5335
|
+
* Why the answer is incomplete, naming the page refused — `null` when it is complete.
|
|
5336
|
+
*/
|
|
5337
|
+
reason?: (string | null);
|
|
5338
|
+
[k: string]: any;
|
|
5339
|
+
}
|
|
5340
|
+
/**
|
|
5341
|
+
* One item, under the qualified id the engine addresses it by.
|
|
5342
|
+
*
|
|
5343
|
+
* A plugin only ever deals in its own [`NativeId`]; qualifying one is the engine's job,
|
|
5344
|
+
* so this type is the engine's and a plugin never constructs one.
|
|
5345
|
+
*/
|
|
5346
|
+
interface Qualified {
|
|
5347
|
+
/**
|
|
5348
|
+
* `<source>:<native>`, the form a user types back at the command line.
|
|
5349
|
+
*/
|
|
5350
|
+
id: string;
|
|
5351
|
+
item: Task;
|
|
5352
|
+
[k: string]: any;
|
|
5353
|
+
}
|
|
5354
|
+
/**
|
|
5355
|
+
* The item as its source reported it, unchanged.
|
|
5356
|
+
*/
|
|
5357
|
+
interface Task {
|
|
5358
|
+
/**
|
|
5359
|
+
* The source's own opaque identifier.
|
|
5360
|
+
*/
|
|
5361
|
+
id: string;
|
|
5362
|
+
/**
|
|
5363
|
+
* The short handle the backend shows people, beside [`id`](Self::id) and never
|
|
5364
|
+
* instead of it — a Linear issue's `ENG-123`, a GitHub issue's `1043`.
|
|
5365
|
+
*
|
|
5366
|
+
* **It is human-facing and it may change.** A Linear issue moved between teams gets a
|
|
5367
|
+
* new identifier and a GitHub issue transferred between repositories gets a new
|
|
5368
|
+
* number, so nothing stores this in place of [`id`](Self::id) and nothing matches on
|
|
5369
|
+
* it: `id` is what everything stores and matches on, and this is what a person says
|
|
5370
|
+
* out loud.
|
|
5371
|
+
*
|
|
5372
|
+
* Absent by default, so a source that predates this field — and every source with no
|
|
5373
|
+
* separate handle of its own — reads as `None`, which means *this backend has no
|
|
5374
|
+
* short handle for this task* rather than *the handle is the id*. A source never
|
|
5375
|
+
* copies [`id`](Self::id) here.
|
|
5376
|
+
*
|
|
5377
|
+
* **Read-only.** A source derives it on a read and never stores one it is handed: a
|
|
5378
|
+
* task arriving on an [`ItemWrite`](crate::ItemWrite) may still hold its source's key,
|
|
5379
|
+
* and a destination ignores it.
|
|
5380
|
+
*/
|
|
5381
|
+
key?: (string | null);
|
|
5382
|
+
/**
|
|
5383
|
+
* The one-line summary a user recognises the task by.
|
|
5384
|
+
*/
|
|
5385
|
+
title: string;
|
|
5386
|
+
/**
|
|
5387
|
+
* The long-form body, when the source has one.
|
|
5388
|
+
*/
|
|
5389
|
+
content?: (string | null);
|
|
5390
|
+
status: Status;
|
|
5391
|
+
/**
|
|
5392
|
+
* The task's priority; `none` means none is set, and a source that cannot hold one
|
|
5393
|
+
* reports `none`.
|
|
5394
|
+
*
|
|
5395
|
+
* Defaulted when a document omits it, so a task written before this field existed —
|
|
5396
|
+
* and every task of a plugin that predates it — reads as [`Priority::None`]. Always
|
|
5397
|
+
* written, so a reader never has to tell an absent member from a `none` one. Whether a
|
|
5398
|
+
* source can hold one at all is [`Capabilities::priority`](crate::Capabilities::priority),
|
|
5399
|
+
* and the engine never hands a source declaring it cannot a priority other than `none`.
|
|
5400
|
+
*/
|
|
5401
|
+
priority?: ("none" | "urgent" | "high" | "medium" | "low");
|
|
5402
|
+
/**
|
|
5403
|
+
* Inline rather than by id: a source returning a task already knows them.
|
|
5404
|
+
*/
|
|
5405
|
+
labels: Label[];
|
|
4598
5406
|
/**
|
|
4599
|
-
*
|
|
4600
|
-
* none, and where an expected write that failed cannot say.
|
|
5407
|
+
* `None` is a first-class case — an orphan task — not an edge case.
|
|
4601
5408
|
*/
|
|
4602
|
-
|
|
4603
|
-
[k: string]: any;
|
|
4604
|
-
}
|
|
4605
|
-
/**
|
|
4606
|
-
* A source's status, kept in both normalised and original form.
|
|
4607
|
-
*
|
|
4608
|
-
* `category` is what every filter compares against; `name` is the source's own
|
|
4609
|
-
* wording, preserved so display never flattens "In Review" into "In Progress".
|
|
4610
|
-
*/
|
|
4611
|
-
interface Status {
|
|
5409
|
+
project?: (NativeId | null);
|
|
4612
5410
|
/**
|
|
4613
|
-
*
|
|
5411
|
+
* Where a human can open this task.
|
|
4614
5412
|
*/
|
|
4615
|
-
|
|
5413
|
+
url?: (string | null);
|
|
4616
5414
|
/**
|
|
4617
|
-
*
|
|
5415
|
+
* Where this task is, when the source says (see [`Location`]).
|
|
5416
|
+
*
|
|
5417
|
+
* Absent by default, so a source that predates this field — and every source that
|
|
5418
|
+
* simply does not say — reads as `None`, which means *the source did not say where
|
|
5419
|
+
* this is* rather than *this is nowhere*. It neither replaces nor derives from
|
|
5420
|
+
* [`url`](Self::url), which goes on meaning exactly what it always did.
|
|
4618
5421
|
*/
|
|
4619
|
-
|
|
4620
|
-
[k: string]: any;
|
|
4621
|
-
}
|
|
4622
|
-
/**
|
|
4623
|
-
* That an expected write read its target before writing, and why.
|
|
4624
|
-
*/
|
|
4625
|
-
interface WriteFallback {
|
|
5422
|
+
location?: (Location | null);
|
|
4626
5423
|
/**
|
|
4627
|
-
*
|
|
5424
|
+
* When the source says the task was created.
|
|
4628
5425
|
*/
|
|
4629
|
-
|
|
5426
|
+
created_at?: (string | null);
|
|
4630
5427
|
/**
|
|
4631
|
-
*
|
|
5428
|
+
* When the source says the task last changed.
|
|
4632
5429
|
*/
|
|
4633
|
-
|
|
4634
|
-
[k: string]: any;
|
|
4635
|
-
}
|
|
4636
|
-
/**
|
|
4637
|
-
* What one command spent, summed over the sources in it that meter their own requests.
|
|
4638
|
-
*
|
|
4639
|
-
* **Source-owned.** Every figure is what a source said it sent and spent while the command
|
|
4640
|
-
* ran, read through [`TaskSource::metering`](onetaskgraph_plugin_api::TaskSource::metering)
|
|
4641
|
-
* before the command and again after it. The engine adds the differences up by name and
|
|
4642
|
-
* interprets none of them, which is why the budget and unit names are open vocabulary.
|
|
4643
|
-
*/
|
|
4644
|
-
interface Spent {
|
|
5430
|
+
updated_at?: (string | null);
|
|
4645
5431
|
/**
|
|
4646
|
-
*
|
|
5432
|
+
* Caller-defined attributes, preserving their JSON types.
|
|
5433
|
+
*
|
|
5434
|
+
* Keys are free-form, with two reserved prefixes: `onetaskgraph.` belongs to this
|
|
5435
|
+
* product — [`Repository::METADATA_KEY`] and [`DependencyEdge::RECORDED_KEY`] are
|
|
5436
|
+
* the two every source honours, and [`ItemKind::METADATA_KEY`] is one plugin's —
|
|
5437
|
+
* and `onepipeline.` belongs to that consumer. Every other key is the caller's, and
|
|
5438
|
+
* a source returns it exactly as it holds it.
|
|
4647
5439
|
*/
|
|
4648
|
-
|
|
5440
|
+
metadata?: {
|
|
5441
|
+
[k: string]: any;
|
|
5442
|
+
};
|
|
4649
5443
|
/**
|
|
4650
|
-
*
|
|
5444
|
+
* Normalized repository origins this task concerns, in source order and without
|
|
5445
|
+
* repeats.
|
|
4651
5446
|
*/
|
|
4652
|
-
|
|
4653
|
-
[k: string]: any;
|
|
4654
|
-
}
|
|
4655
|
-
/**
|
|
4656
|
-
* What one command spent against one budget.
|
|
4657
|
-
*/
|
|
4658
|
-
interface BudgetSpent {
|
|
5447
|
+
repositories?: Repository[];
|
|
4659
5448
|
/**
|
|
4660
|
-
* The
|
|
5449
|
+
* The tasks this one delivers: finishing this task finishes them.
|
|
5450
|
+
*
|
|
5451
|
+
* Each entry is a [`TaskRef`] — `<source>:<native>` names a task of any source, and a
|
|
5452
|
+
* bare native id names a task of the source holding this one — with no repeats and
|
|
5453
|
+
* never this task itself. Empty by default, and left out of the wire when empty, so a
|
|
5454
|
+
* reader written before the field existed reads exactly what it read before.
|
|
4661
5455
|
*/
|
|
4662
|
-
|
|
5456
|
+
delivers?: TaskRef[];
|
|
4663
5457
|
/**
|
|
4664
|
-
*
|
|
5458
|
+
* Every task that delivers this one, by qualified id: the reverse of [`Self::delivers`].
|
|
5459
|
+
*
|
|
5460
|
+
* **Owned by the store, not by a source record and not by a copy.** The engine keeps it
|
|
5461
|
+
* in step whenever it writes a task's `delivers`, through
|
|
5462
|
+
* [`TaskSource::set_delivered_by`](crate::TaskSource::set_delivered_by); a source holds
|
|
5463
|
+
* and reports it, and a copy keeps the destination's own rather than taking the
|
|
5464
|
+
* source's. Empty by default and left out of the wire when empty, as `delivers` is.
|
|
4665
5465
|
*/
|
|
4666
|
-
|
|
5466
|
+
delivered_by?: TaskRef[];
|
|
4667
5467
|
/**
|
|
4668
|
-
*
|
|
5468
|
+
* The task's change token: an opaque value its source gives so a reader can tell whether
|
|
5469
|
+
* the task changed without reading it whole.
|
|
5470
|
+
*
|
|
5471
|
+
* **Two equal versions of one task from one source mean nothing in it has changed** — its
|
|
5472
|
+
* title, body, status, priority, labels, project fields, metadata, edges and comments,
|
|
5473
|
+
* comments added, edited and deleted included. A source that cannot promise all of that
|
|
5474
|
+
* for a task leaves this absent, which means *always read it*. What each plugin keys its
|
|
5475
|
+
* token on, and which change kinds it covers, is stated per plugin in
|
|
5476
|
+
* `docs/plugin-protocol.md` §4.13d.
|
|
5477
|
+
*
|
|
5478
|
+
* Opaque to every caller: nothing compares one but for equality, and the one reader that
|
|
5479
|
+
* looks inside is the source that gave it, through
|
|
5480
|
+
* [`TaskSource::order_versions`](crate::TaskSource::order_versions). Absent by default and left out of the wire when absent, so a source written
|
|
5481
|
+
* before it existed is read as giving none.
|
|
5482
|
+
*
|
|
5483
|
+
* **Read-only.** A source derives it on a read and never stores one it is handed: a task
|
|
5484
|
+
* arriving on an [`ItemWrite`](crate::ItemWrite) may still hold its source's token, and a
|
|
5485
|
+
* destination ignores it.
|
|
4669
5486
|
*/
|
|
4670
|
-
|
|
5487
|
+
version?: (string | null);
|
|
4671
5488
|
/**
|
|
4672
|
-
*
|
|
4673
|
-
*
|
|
4674
|
-
*
|
|
5489
|
+
* Who may read this task, as it was declared (see [`Classification`]).
|
|
5490
|
+
*
|
|
5491
|
+
* Defaulted and left out of the wire while `public`, so a task written before this
|
|
5492
|
+
* field existed reads as public and a reader written before it reads what it always
|
|
5493
|
+
* read. It is the *declared* classification: the engine tightens it by the task's own
|
|
5494
|
+
* repositories — any private or unknown one makes the task private — before it decides
|
|
5495
|
+
* where the task may be written, and nothing written here can loosen that. The project
|
|
5496
|
+
* a task is filed under never tightens it: a task's visibility is its own.
|
|
4675
5497
|
*/
|
|
4676
|
-
|
|
5498
|
+
classification?: ("public" | "private");
|
|
4677
5499
|
[k: string]: any;
|
|
4678
5500
|
}
|
|
4679
5501
|
/**
|
|
4680
|
-
*
|
|
4681
|
-
* the `sanitization` member a write's answer carries when it is not empty.
|
|
5502
|
+
* The source's status, normalised and preserved.
|
|
4682
5503
|
*/
|
|
4683
|
-
interface
|
|
4684
|
-
/**
|
|
4685
|
-
* Spans the writes' own sanitisations rewrote.
|
|
4686
|
-
*/
|
|
4687
|
-
replaced: number;
|
|
5504
|
+
interface Status {
|
|
4688
5505
|
/**
|
|
4689
|
-
*
|
|
5506
|
+
* The normalised value filters compare against.
|
|
4690
5507
|
*/
|
|
4691
|
-
|
|
5508
|
+
category: ("draft" | "backlog" | "todo" | "queued" | "in-progress" | "done" | "cancelled" | "unknown");
|
|
4692
5509
|
/**
|
|
4693
|
-
*
|
|
5510
|
+
* The source's own label for this status.
|
|
4694
5511
|
*/
|
|
4695
|
-
|
|
5512
|
+
name: string;
|
|
4696
5513
|
[k: string]: any;
|
|
4697
5514
|
}
|
|
4698
5515
|
/**
|
|
4699
|
-
*
|
|
5516
|
+
* A tag a source attaches to work.
|
|
4700
5517
|
*/
|
|
4701
|
-
interface
|
|
5518
|
+
interface Label {
|
|
4702
5519
|
/**
|
|
4703
|
-
* The
|
|
5520
|
+
* The source's own opaque identifier.
|
|
4704
5521
|
*/
|
|
4705
|
-
|
|
4706
|
-
redacted: true;
|
|
4707
|
-
kind: LocatorKind;
|
|
4708
|
-
ordinal: number;
|
|
4709
|
-
});
|
|
5522
|
+
id: string;
|
|
4710
5523
|
/**
|
|
4711
|
-
*
|
|
5524
|
+
* What a user filtering across sources actually types.
|
|
4712
5525
|
*/
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
5526
|
+
name: string;
|
|
5527
|
+
/**
|
|
5528
|
+
* The source's own colour for the label, when it has one.
|
|
5529
|
+
*/
|
|
5530
|
+
color?: (string | null);
|
|
4718
5531
|
[k: string]: any;
|
|
4719
5532
|
}
|
|
4720
5533
|
}
|
|
4721
|
-
export type
|
|
5534
|
+
export type FoundTasks = GeneratedFoundTasks.FoundTasks;
|
|
4722
5535
|
export declare namespace GeneratedGlobalId {
|
|
4723
5536
|
/**
|
|
4724
5537
|
* One item, qualified by the source it came from.
|
|
@@ -5953,6 +6766,50 @@ export declare namespace GeneratedLocation {
|
|
|
5953
6766
|
});
|
|
5954
6767
|
}
|
|
5955
6768
|
export type Location = GeneratedLocation.Location;
|
|
6769
|
+
export declare namespace GeneratedMemberDeclaration {
|
|
6770
|
+
/**
|
|
6771
|
+
* One member of a plan graph, as a project template's front matter declares it.
|
|
6772
|
+
*/
|
|
6773
|
+
interface MemberDeclaration {
|
|
6774
|
+
/**
|
|
6775
|
+
* The member task's native id, and how other members' `depends_on` name it.
|
|
6776
|
+
*/
|
|
6777
|
+
id: string;
|
|
6778
|
+
/**
|
|
6779
|
+
* Its title.
|
|
6780
|
+
*/
|
|
6781
|
+
title: string;
|
|
6782
|
+
/**
|
|
6783
|
+
* The task template its body is rendered from.
|
|
6784
|
+
*/
|
|
6785
|
+
template: ({
|
|
6786
|
+
file: string;
|
|
6787
|
+
} | {
|
|
6788
|
+
loader: string;
|
|
6789
|
+
});
|
|
6790
|
+
/**
|
|
6791
|
+
* The answers its template is rendered with, by variable name.
|
|
6792
|
+
*/
|
|
6793
|
+
answers?: {
|
|
6794
|
+
[k: string]: any;
|
|
6795
|
+
};
|
|
6796
|
+
/**
|
|
6797
|
+
* The ids of the members it depends on: each one a `blocks` edge, written before it.
|
|
6798
|
+
*/
|
|
6799
|
+
depends_on?: string[];
|
|
6800
|
+
/**
|
|
6801
|
+
* Caller-owned metadata keys it is created with.
|
|
6802
|
+
*/
|
|
6803
|
+
metadata?: {
|
|
6804
|
+
[k: string]: any;
|
|
6805
|
+
};
|
|
6806
|
+
/**
|
|
6807
|
+
* The repositories it concerns, as normalized origins.
|
|
6808
|
+
*/
|
|
6809
|
+
repositories?: string[];
|
|
6810
|
+
}
|
|
6811
|
+
}
|
|
6812
|
+
export type MemberDeclaration = GeneratedMemberDeclaration.MemberDeclaration;
|
|
5956
6813
|
export declare namespace GeneratedMetadataSet {
|
|
5957
6814
|
/**
|
|
5958
6815
|
* Where an entity is, in the one form a consumer can act on without knowing the backend.
|
|
@@ -7100,18 +7957,103 @@ export declare namespace GeneratedPlacement {
|
|
|
7100
7957
|
*/
|
|
7101
7958
|
interface Placement {
|
|
7102
7959
|
/**
|
|
7103
|
-
* The source the item lands in: the routed one, or the source itself.
|
|
7960
|
+
* The source the item lands in: the routed one, or the source itself.
|
|
7961
|
+
*/
|
|
7962
|
+
destination: string;
|
|
7963
|
+
/**
|
|
7964
|
+
* The index of the route entry that matched, or `None` when none did and the item
|
|
7965
|
+
* stays in the source itself.
|
|
7966
|
+
*/
|
|
7967
|
+
route?: (number | null);
|
|
7968
|
+
[k: string]: any;
|
|
7969
|
+
}
|
|
7970
|
+
}
|
|
7971
|
+
export type Placement = GeneratedPlacement.Placement;
|
|
7972
|
+
export declare namespace GeneratedPlannedProject {
|
|
7973
|
+
/**
|
|
7974
|
+
* A source's own opaque identifier for one item.
|
|
7975
|
+
*
|
|
7976
|
+
* Deliberately unvalidated: a native id is whatever the upstream system says it
|
|
7977
|
+
* is, colons included. The engine parses a qualified id by splitting on the
|
|
7978
|
+
* *first* colon precisely so this stays true.
|
|
7979
|
+
*/
|
|
7980
|
+
type NativeId = string;
|
|
7981
|
+
/**
|
|
7982
|
+
* A repository identified by its normalized origin, without a URL scheme or `.git` suffix.
|
|
7983
|
+
*/
|
|
7984
|
+
type Repository = string;
|
|
7985
|
+
/**
|
|
7986
|
+
* What `project create --dry-run` answers: the project and every member it would create, in
|
|
7987
|
+
* the order it would create them, and nothing written.
|
|
7988
|
+
*/
|
|
7989
|
+
interface PlannedProject {
|
|
7990
|
+
/**
|
|
7991
|
+
* The source it would be created in.
|
|
7992
|
+
*/
|
|
7993
|
+
source: string;
|
|
7994
|
+
/**
|
|
7995
|
+
* The id it would be written under.
|
|
7996
|
+
*/
|
|
7997
|
+
id: string;
|
|
7998
|
+
/**
|
|
7999
|
+
* Its title.
|
|
8000
|
+
*/
|
|
8001
|
+
title: string;
|
|
8002
|
+
/**
|
|
8003
|
+
* Its description, as it would be written.
|
|
8004
|
+
*/
|
|
8005
|
+
content: string;
|
|
8006
|
+
/**
|
|
8007
|
+
* Each member, in the order it would be created: after every member it depends on.
|
|
8008
|
+
*/
|
|
8009
|
+
members: PlannedMember[];
|
|
8010
|
+
[k: string]: any;
|
|
8011
|
+
}
|
|
8012
|
+
/**
|
|
8013
|
+
* One member `project create --dry-run` would create.
|
|
8014
|
+
*/
|
|
8015
|
+
interface PlannedMember {
|
|
8016
|
+
/**
|
|
8017
|
+
* The id it would be offered to its source under.
|
|
8018
|
+
*/
|
|
8019
|
+
id: string;
|
|
8020
|
+
/**
|
|
8021
|
+
* Its title.
|
|
8022
|
+
*/
|
|
8023
|
+
title: string;
|
|
8024
|
+
/**
|
|
8025
|
+
* The template its body is rendered from, as its provenance would record it; `null` for a
|
|
8026
|
+
* body given as it is.
|
|
8027
|
+
*/
|
|
8028
|
+
template?: (string | null);
|
|
8029
|
+
/**
|
|
8030
|
+
* Its body, as it would be written.
|
|
8031
|
+
*/
|
|
8032
|
+
content: string;
|
|
8033
|
+
/**
|
|
8034
|
+
* The resolved answers its body was rendered with.
|
|
7104
8035
|
*/
|
|
7105
|
-
|
|
8036
|
+
answers: {
|
|
8037
|
+
[k: string]: any;
|
|
8038
|
+
};
|
|
7106
8039
|
/**
|
|
7107
|
-
* The
|
|
7108
|
-
* stays in the source itself.
|
|
8040
|
+
* The members it would depend on, each a `blocks` edge.
|
|
7109
8041
|
*/
|
|
7110
|
-
|
|
8042
|
+
depends_on: NativeId[];
|
|
8043
|
+
/**
|
|
8044
|
+
* The caller's metadata keys it would carry.
|
|
8045
|
+
*/
|
|
8046
|
+
metadata: {
|
|
8047
|
+
[k: string]: any;
|
|
8048
|
+
};
|
|
8049
|
+
/**
|
|
8050
|
+
* The repositories it concerns.
|
|
8051
|
+
*/
|
|
8052
|
+
repositories: Repository[];
|
|
7111
8053
|
[k: string]: any;
|
|
7112
8054
|
}
|
|
7113
8055
|
}
|
|
7114
|
-
export type
|
|
8056
|
+
export type PlannedProject = GeneratedPlannedProject.PlannedProject;
|
|
7115
8057
|
export declare namespace GeneratedPredicate {
|
|
7116
8058
|
/**
|
|
7117
8059
|
* One thing a query can ask of a source.
|
|
@@ -7257,6 +8199,107 @@ export declare namespace GeneratedProject {
|
|
|
7257
8199
|
}
|
|
7258
8200
|
}
|
|
7259
8201
|
export type Project = GeneratedProject.Project;
|
|
8202
|
+
export declare namespace GeneratedProjectAttestationCheck {
|
|
8203
|
+
/**
|
|
8204
|
+
* Why a record of an attestation no longer holds.
|
|
8205
|
+
*/
|
|
8206
|
+
type VoidReason = ("content-moved" | "bar-moved");
|
|
8207
|
+
/**
|
|
8208
|
+
* What an attester adds: text of any length and any number of lines, not blank.
|
|
8209
|
+
*/
|
|
8210
|
+
type AttestationNote = string;
|
|
8211
|
+
/**
|
|
8212
|
+
* One caller-owned metadata key: `<namespace>.<name>`, at least two non-empty segments
|
|
8213
|
+
* separated by dots, whose first segment is not [`MetadataKey::RESERVED_NAMESPACE`].
|
|
8214
|
+
*
|
|
8215
|
+
* Validated wherever one is built, deserialized included, so a plugin handed one never has
|
|
8216
|
+
* to ask whether it names a key this product owns.
|
|
8217
|
+
*/
|
|
8218
|
+
type MetadataKey = string;
|
|
8219
|
+
/**
|
|
8220
|
+
* What `project attestation check --tasks` answers: one entry per task filed under the
|
|
8221
|
+
* project, in the order the source lists them.
|
|
8222
|
+
*/
|
|
8223
|
+
interface ProjectAttestationCheck {
|
|
8224
|
+
/**
|
|
8225
|
+
* The project, by qualified id.
|
|
8226
|
+
*/
|
|
8227
|
+
project: string;
|
|
8228
|
+
/**
|
|
8229
|
+
* The kind asked about.
|
|
8230
|
+
*/
|
|
8231
|
+
kind: string;
|
|
8232
|
+
/**
|
|
8233
|
+
* One entry per task.
|
|
8234
|
+
*/
|
|
8235
|
+
tasks: TaskAttestationCheck[];
|
|
8236
|
+
[k: string]: any;
|
|
8237
|
+
}
|
|
8238
|
+
/**
|
|
8239
|
+
* One task's entry in a project's check: the task's qualified id beside what its check found.
|
|
8240
|
+
*/
|
|
8241
|
+
interface TaskAttestationCheck {
|
|
8242
|
+
/**
|
|
8243
|
+
* The task, by qualified id.
|
|
8244
|
+
*/
|
|
8245
|
+
id: string;
|
|
8246
|
+
/**
|
|
8247
|
+
* The kind asked about.
|
|
8248
|
+
*/
|
|
8249
|
+
kind: string;
|
|
8250
|
+
/**
|
|
8251
|
+
* What the check found.
|
|
8252
|
+
*/
|
|
8253
|
+
state: ("valid" | "void" | "absent");
|
|
8254
|
+
/**
|
|
8255
|
+
* Why the record is void: `null` unless `state` is `void`.
|
|
8256
|
+
*/
|
|
8257
|
+
reason?: (VoidReason | null);
|
|
8258
|
+
/**
|
|
8259
|
+
* The record of the kind the item holds, or `null` when it holds none.
|
|
8260
|
+
*/
|
|
8261
|
+
record?: (Attestation | null);
|
|
8262
|
+
[k: string]: any;
|
|
8263
|
+
}
|
|
8264
|
+
/**
|
|
8265
|
+
* One attestation: who cleared the item's authored content, when, which content and against
|
|
8266
|
+
* which bar.
|
|
8267
|
+
*/
|
|
8268
|
+
interface Attestation {
|
|
8269
|
+
/**
|
|
8270
|
+
* The kind of attestation this is; the key it is held under.
|
|
8271
|
+
*/
|
|
8272
|
+
kind: string;
|
|
8273
|
+
/**
|
|
8274
|
+
* Who attested, as the caller labels them.
|
|
8275
|
+
*/
|
|
8276
|
+
by: string;
|
|
8277
|
+
/**
|
|
8278
|
+
* When it was recorded, in RFC 3339 to the second.
|
|
8279
|
+
*/
|
|
8280
|
+
at: string;
|
|
8281
|
+
/**
|
|
8282
|
+
* The digest of the item's authored content when it was recorded, computed by the store
|
|
8283
|
+
* (see the module's documentation).
|
|
8284
|
+
*/
|
|
8285
|
+
content_digest: string;
|
|
8286
|
+
/**
|
|
8287
|
+
* The fingerprint of the bar the content was cleared against, as the caller gave it.
|
|
8288
|
+
*/
|
|
8289
|
+
bar: string;
|
|
8290
|
+
/**
|
|
8291
|
+
* What the attester added, when they added anything.
|
|
8292
|
+
*/
|
|
8293
|
+
note?: (AttestationNote | null);
|
|
8294
|
+
/**
|
|
8295
|
+
* The caller-owned metadata keys left out of `content_digest`, sorted; empty when none
|
|
8296
|
+
* were.
|
|
8297
|
+
*/
|
|
8298
|
+
excludes?: MetadataKey[];
|
|
8299
|
+
[k: string]: any;
|
|
8300
|
+
}
|
|
8301
|
+
}
|
|
8302
|
+
export type ProjectAttestationCheck = GeneratedProjectAttestationCheck.ProjectAttestationCheck;
|
|
7260
8303
|
export declare namespace GeneratedProjectGraph {
|
|
7261
8304
|
/**
|
|
7262
8305
|
* The task metadata key `project graph --group-by` groups by: any key a record may hold,
|
|
@@ -15919,6 +16962,10 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
15919
16962
|
* from nothing by the value alone.
|
|
15920
16963
|
*/
|
|
15921
16964
|
type Priority = ("none" | "urgent" | "high" | "medium" | "low");
|
|
16965
|
+
/**
|
|
16966
|
+
* What a write guarded by a condition on the item's own value came to.
|
|
16967
|
+
*/
|
|
16968
|
+
type GuardOutcome = ("written" | "held");
|
|
15922
16969
|
/**
|
|
15923
16970
|
* What a locator names.
|
|
15924
16971
|
*/
|
|
@@ -15961,6 +17008,11 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
15961
17008
|
* update wrote no status, and for a task with no projection.
|
|
15962
17009
|
*/
|
|
15963
17010
|
projection?: (GlobalId | null);
|
|
17011
|
+
/**
|
|
17012
|
+
* What `--when-priority` found the task's priority at, and whether the update was written
|
|
17013
|
+
* or held — absent for an update given no priority guard.
|
|
17014
|
+
*/
|
|
17015
|
+
guard?: (PriorityGuard | null);
|
|
15964
17016
|
sanitization?: (Sanitization | null);
|
|
15965
17017
|
[k: string]: any;
|
|
15966
17018
|
}
|
|
@@ -16280,6 +17332,46 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
16280
17332
|
reason: string;
|
|
16281
17333
|
[k: string]: any;
|
|
16282
17334
|
}
|
|
17335
|
+
/**
|
|
17336
|
+
* What a write guarded by the priority its task holds came to: whether it was `written` or
|
|
17337
|
+
* `held`, and the condition that decided it. Made only from the condition — read back off the
|
|
17338
|
+
* wire too, whatever `outcome` it was written with — so the outcome is always the one its
|
|
17339
|
+
* `met` says, and never stands without it.
|
|
17340
|
+
*/
|
|
17341
|
+
interface PriorityGuard {
|
|
17342
|
+
/**
|
|
17343
|
+
* `written` when the task held a priority the guard names, and `held` when it did not —
|
|
17344
|
+
* absent for a write made without the guard.
|
|
17345
|
+
*/
|
|
17346
|
+
outcome?: (GuardOutcome | null);
|
|
17347
|
+
/**
|
|
17348
|
+
* What the guard found the task's priority at before the write, and whether that is one it
|
|
17349
|
+
* names — the shape `task copy --when-destination-priority` reports — absent for a write
|
|
17350
|
+
* made without the guard.
|
|
17351
|
+
*/
|
|
17352
|
+
priority_condition?: (PriorityCondition | null);
|
|
17353
|
+
[k: string]: any;
|
|
17354
|
+
}
|
|
17355
|
+
/**
|
|
17356
|
+
* What a guarded copy found a counterpart's priority at, and whether that met the condition.
|
|
17357
|
+
*/
|
|
17358
|
+
interface PriorityCondition {
|
|
17359
|
+
/**
|
|
17360
|
+
* How much a task matters, in the one vocabulary every source is normalised into.
|
|
17361
|
+
*
|
|
17362
|
+
* Five values, most pressing first after [`None`](Self::None): Linear's own priority has
|
|
17363
|
+
* exactly these, and a source whose backend has none of its own maps its representation
|
|
17364
|
+
* onto them. `none` is a value rather than an absent field, because "no priority is set" is
|
|
17365
|
+
* something a person sets — writing `none` clears a priority — and a reader tells it apart
|
|
17366
|
+
* from nothing by the value alone.
|
|
17367
|
+
*/
|
|
17368
|
+
held: ("none" | "urgent" | "high" | "medium" | "low");
|
|
17369
|
+
/**
|
|
17370
|
+
* Whether that priority is one the condition names.
|
|
17371
|
+
*/
|
|
17372
|
+
met: boolean;
|
|
17373
|
+
[k: string]: any;
|
|
17374
|
+
}
|
|
16283
17375
|
/**
|
|
16284
17376
|
* What the screened writes of one command replaced, and what sanitise-on-refusal changed:
|
|
16285
17377
|
* the `sanitization` member a write's answer carries when it is not empty.
|
|
@@ -16323,6 +17415,98 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
16323
17415
|
}
|
|
16324
17416
|
}
|
|
16325
17417
|
export type TaskUpdated = GeneratedTaskUpdated.TaskUpdated;
|
|
17418
|
+
export declare namespace GeneratedTasksUpdated {
|
|
17419
|
+
/**
|
|
17420
|
+
* What a locator names.
|
|
17421
|
+
*/
|
|
17422
|
+
type LocatorKind = ("source" | "item" | "field" | "metadata-key" | "comment" | "path" | "identity");
|
|
17423
|
+
/**
|
|
17424
|
+
* What `task update-many` answers: one result per update, in the order given.
|
|
17425
|
+
*/
|
|
17426
|
+
interface TasksUpdated {
|
|
17427
|
+
/**
|
|
17428
|
+
* `1`.
|
|
17429
|
+
*/
|
|
17430
|
+
schema_version: number;
|
|
17431
|
+
/**
|
|
17432
|
+
* One per update.
|
|
17433
|
+
*/
|
|
17434
|
+
results: UpdateResult[];
|
|
17435
|
+
sanitization?: (Sanitization | null);
|
|
17436
|
+
[k: string]: any;
|
|
17437
|
+
}
|
|
17438
|
+
/**
|
|
17439
|
+
* What became of one update of an [`UpdateBatch`].
|
|
17440
|
+
*/
|
|
17441
|
+
interface UpdateResult {
|
|
17442
|
+
/**
|
|
17443
|
+
* The item as the batch named it.
|
|
17444
|
+
*/
|
|
17445
|
+
item: string;
|
|
17446
|
+
/**
|
|
17447
|
+
* What became of it.
|
|
17448
|
+
*/
|
|
17449
|
+
outcome: ("written" | "held" | "version-moved" | "error");
|
|
17450
|
+
/**
|
|
17451
|
+
* The task's version after the write — present when `outcome` is `written` and the
|
|
17452
|
+
* write's own answers determine it, as `task update`'s `result.version` is.
|
|
17453
|
+
*/
|
|
17454
|
+
version?: (string | null);
|
|
17455
|
+
/**
|
|
17456
|
+
* The version the task is at — present when `outcome` is `version-moved` and the source
|
|
17457
|
+
* can name it, which it cannot just after another write of this batch moved the task.
|
|
17458
|
+
*/
|
|
17459
|
+
current_version?: (string | null);
|
|
17460
|
+
/**
|
|
17461
|
+
* Why it is answered `error` — present when `outcome` is `error`: that it was not written,
|
|
17462
|
+
* or that it was and keeping the tasks it delivers in step then failed.
|
|
17463
|
+
*/
|
|
17464
|
+
reason?: (string | null);
|
|
17465
|
+
[k: string]: any;
|
|
17466
|
+
}
|
|
17467
|
+
/**
|
|
17468
|
+
* What the screened writes of one command replaced, and what sanitise-on-refusal changed:
|
|
17469
|
+
* the `sanitization` member a write's answer carries when it is not empty.
|
|
17470
|
+
*/
|
|
17471
|
+
interface Sanitization {
|
|
17472
|
+
/**
|
|
17473
|
+
* Spans the writes' own sanitisations rewrote.
|
|
17474
|
+
*/
|
|
17475
|
+
replaced: number;
|
|
17476
|
+
/**
|
|
17477
|
+
* Each field or comment of an item sanitisation changed beyond the write itself.
|
|
17478
|
+
*/
|
|
17479
|
+
side_effect: SideEffect[];
|
|
17480
|
+
/**
|
|
17481
|
+
* Whether nothing was written, the changes only reported.
|
|
17482
|
+
*/
|
|
17483
|
+
dry_run: boolean;
|
|
17484
|
+
[k: string]: any;
|
|
17485
|
+
}
|
|
17486
|
+
/**
|
|
17487
|
+
* One field or comment of an item a sanitisation changed, named by screened locators.
|
|
17488
|
+
*/
|
|
17489
|
+
interface SideEffect {
|
|
17490
|
+
/**
|
|
17491
|
+
* The item, by its qualified id as screened.
|
|
17492
|
+
*/
|
|
17493
|
+
item: (string | {
|
|
17494
|
+
redacted: true;
|
|
17495
|
+
kind: LocatorKind;
|
|
17496
|
+
ordinal: number;
|
|
17497
|
+
});
|
|
17498
|
+
/**
|
|
17499
|
+
* The field — `content`, `title`, `label`, `metadata:<key>` — or `comment:<id>`.
|
|
17500
|
+
*/
|
|
17501
|
+
field: (string | {
|
|
17502
|
+
redacted: true;
|
|
17503
|
+
kind: LocatorKind;
|
|
17504
|
+
ordinal: number;
|
|
17505
|
+
});
|
|
17506
|
+
[k: string]: any;
|
|
17507
|
+
}
|
|
17508
|
+
}
|
|
17509
|
+
export type TasksUpdated = GeneratedTasksUpdated.TasksUpdated;
|
|
16326
17510
|
export declare namespace GeneratedTemplateAnswers {
|
|
16327
17511
|
/**
|
|
16328
17512
|
* What `task answers`, `project answers` and `document answers` answer with: the resolved
|
|
@@ -16400,6 +17584,11 @@ export declare namespace GeneratedTemplateVariable {
|
|
|
16400
17584
|
* The value used when no answer is given.
|
|
16401
17585
|
*/
|
|
16402
17586
|
default?: unknown;
|
|
17587
|
+
/**
|
|
17588
|
+
* The JSON Schema (draft 2020-12) every answer must satisfy, for an `object` or `list`
|
|
17589
|
+
* variable that declares one; absent for every other.
|
|
17590
|
+
*/
|
|
17591
|
+
schema?: unknown;
|
|
16403
17592
|
/**
|
|
16404
17593
|
* The chain file whose declaration this is: the one nearest the rendered template.
|
|
16405
17594
|
*/
|
|
@@ -16465,6 +17654,11 @@ export declare namespace GeneratedTemplateVariables {
|
|
|
16465
17654
|
* The value used when no answer is given.
|
|
16466
17655
|
*/
|
|
16467
17656
|
default?: unknown;
|
|
17657
|
+
/**
|
|
17658
|
+
* The JSON Schema (draft 2020-12) every answer must satisfy, for an `object` or `list`
|
|
17659
|
+
* variable that declares one; absent for every other.
|
|
17660
|
+
*/
|
|
17661
|
+
schema?: unknown;
|
|
16468
17662
|
/**
|
|
16469
17663
|
* The chain file whose declaration this is: the one nearest the rendered template.
|
|
16470
17664
|
*/
|
|
@@ -16480,6 +17674,90 @@ export declare namespace GeneratedTextFields {
|
|
|
16480
17674
|
type TextFields = ("title" | "content" | "title-or-content");
|
|
16481
17675
|
}
|
|
16482
17676
|
export type TextFields = GeneratedTextFields.TextFields;
|
|
17677
|
+
export declare namespace GeneratedUpdateBatch {
|
|
17678
|
+
/**
|
|
17679
|
+
* The normalised status vocabulary shared across every source.
|
|
17680
|
+
*/
|
|
17681
|
+
type StatusCategory = ("draft" | "backlog" | "todo" | "queued" | "in-progress" | "done" | "cancelled" | "unknown");
|
|
17682
|
+
/**
|
|
17683
|
+
* How much a task matters, in the one vocabulary every source is normalised into.
|
|
17684
|
+
*
|
|
17685
|
+
* Five values, most pressing first after [`None`](Self::None): Linear's own priority has
|
|
17686
|
+
* exactly these, and a source whose backend has none of its own maps its representation
|
|
17687
|
+
* onto them. `none` is a value rather than an absent field, because "no priority is set" is
|
|
17688
|
+
* something a person sets — writing `none` clears a priority — and a reader tells it apart
|
|
17689
|
+
* from nothing by the value alone.
|
|
17690
|
+
*/
|
|
17691
|
+
type Priority = ("none" | "urgent" | "high" | "medium" | "low");
|
|
17692
|
+
/**
|
|
17693
|
+
* A repository identified by its normalized origin, without a URL scheme or `.git` suffix.
|
|
17694
|
+
*/
|
|
17695
|
+
type Repository = string;
|
|
17696
|
+
/**
|
|
17697
|
+
* What `task update-many` reads: many held updates of tasks of one source.
|
|
17698
|
+
*/
|
|
17699
|
+
interface UpdateBatch {
|
|
17700
|
+
/**
|
|
17701
|
+
* `1`.
|
|
17702
|
+
*/
|
|
17703
|
+
schema_version: number;
|
|
17704
|
+
/**
|
|
17705
|
+
* The updates, each one held write of every field it names.
|
|
17706
|
+
*/
|
|
17707
|
+
updates: UpdateBatchItem[];
|
|
17708
|
+
}
|
|
17709
|
+
/**
|
|
17710
|
+
* One update of an [`UpdateBatch`]: every field it names, written together in one held write,
|
|
17711
|
+
* and nothing else. Every member but `item` is optional.
|
|
17712
|
+
*/
|
|
17713
|
+
interface UpdateBatchItem {
|
|
17714
|
+
/**
|
|
17715
|
+
* The task's qualified id, `<source>:<native-id>`, of the source the batch names.
|
|
17716
|
+
*/
|
|
17717
|
+
item: string;
|
|
17718
|
+
/**
|
|
17719
|
+
* The version the task must be at for anything to be written.
|
|
17720
|
+
*/
|
|
17721
|
+
if_version?: (string | null);
|
|
17722
|
+
/**
|
|
17723
|
+
* Its title.
|
|
17724
|
+
*/
|
|
17725
|
+
title?: (string | null);
|
|
17726
|
+
/**
|
|
17727
|
+
* Its content, replaced whole.
|
|
17728
|
+
*/
|
|
17729
|
+
body?: (string | null);
|
|
17730
|
+
/**
|
|
17731
|
+
* Its status category.
|
|
17732
|
+
*/
|
|
17733
|
+
status?: (StatusCategory | null);
|
|
17734
|
+
/**
|
|
17735
|
+
* Its priority; `none` clears it.
|
|
17736
|
+
*/
|
|
17737
|
+
priority?: (Priority | null);
|
|
17738
|
+
/**
|
|
17739
|
+
* Write only while the task holds one of these priorities — `none` for a task with none.
|
|
17740
|
+
* At any other, nothing of the update is written and it answers `held`. Empty sets no
|
|
17741
|
+
* guard.
|
|
17742
|
+
*/
|
|
17743
|
+
when_priority?: Priority[];
|
|
17744
|
+
/**
|
|
17745
|
+
* Caller-owned metadata keys set, each to one JSON value; every other key is kept.
|
|
17746
|
+
*/
|
|
17747
|
+
metadata?: {
|
|
17748
|
+
[k: string]: any;
|
|
17749
|
+
};
|
|
17750
|
+
/**
|
|
17751
|
+
* Caller-owned metadata keys removed.
|
|
17752
|
+
*/
|
|
17753
|
+
remove_metadata?: string[];
|
|
17754
|
+
/**
|
|
17755
|
+
* Its repositories, replaced whole; an empty list clears them.
|
|
17756
|
+
*/
|
|
17757
|
+
repositories?: (Repository[] | null);
|
|
17758
|
+
}
|
|
17759
|
+
}
|
|
17760
|
+
export type UpdateBatch = GeneratedUpdateBatch.UpdateBatch;
|
|
16483
17761
|
export declare namespace GeneratedUpdatedField {
|
|
16484
17762
|
/**
|
|
16485
17763
|
* One field of a task a [`TaskUpdate`] names, as the answer to it reports what was written.
|
|
@@ -16497,6 +17775,13 @@ export declare namespace GeneratedVariableType {
|
|
|
16497
17775
|
type VariableType = ("string" | "text" | "integer" | "boolean" | "list" | "object");
|
|
16498
17776
|
}
|
|
16499
17777
|
export type VariableType = GeneratedVariableType.VariableType;
|
|
17778
|
+
export declare namespace GeneratedVoidReason {
|
|
17779
|
+
/**
|
|
17780
|
+
* Why a record of an attestation no longer holds.
|
|
17781
|
+
*/
|
|
17782
|
+
type VoidReason = ("content-moved" | "bar-moved");
|
|
17783
|
+
}
|
|
17784
|
+
export type VoidReason = GeneratedVoidReason.VoidReason;
|
|
16500
17785
|
export declare namespace GeneratedWritePolicyConfig {
|
|
16501
17786
|
/**
|
|
16502
17787
|
* One command line: the program, then its arguments, never empty.
|