@onetaskgraph/sdk 0.14.11 → 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 +14 -2
- package/dist/generated/commands.d.ts +1 -1
- package/dist/generated/models.d.ts +824 -34
- package/dist/generated/schemas.d.ts +11 -25013
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1939 -307
- 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.
|
|
@@ -467,6 +467,13 @@ export declare namespace GeneratedAuthorKind {
|
|
|
467
467
|
type AuthorKind = ("person" | "bot" | "unknown");
|
|
468
468
|
}
|
|
469
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;
|
|
470
477
|
export declare namespace GeneratedCacheCleared {
|
|
471
478
|
/**
|
|
472
479
|
* What `cache clear` emptied: one entry per cache it reached.
|
|
@@ -858,6 +865,39 @@ export declare namespace GeneratedCommentActivity {
|
|
|
858
865
|
}
|
|
859
866
|
}
|
|
860
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;
|
|
861
901
|
export declare namespace GeneratedCommentList {
|
|
862
902
|
/**
|
|
863
903
|
* Every comment on one task, oldest first: what `task comment list` answers with.
|
|
@@ -1277,6 +1317,114 @@ export declare namespace GeneratedCommentWritten {
|
|
|
1277
1317
|
}
|
|
1278
1318
|
}
|
|
1279
1319
|
export type CommentWritten = GeneratedCommentWritten.CommentWritten;
|
|
1320
|
+
export declare namespace GeneratedCommentsAdded {
|
|
1321
|
+
/**
|
|
1322
|
+
* What a locator names.
|
|
1323
|
+
*/
|
|
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 {
|
|
1329
|
+
/**
|
|
1330
|
+
* `1`.
|
|
1331
|
+
*/
|
|
1332
|
+
schema_version: number;
|
|
1333
|
+
/**
|
|
1334
|
+
* One per comment.
|
|
1335
|
+
*/
|
|
1336
|
+
results: CommentAddResult[];
|
|
1337
|
+
sanitization?: (Sanitization | null);
|
|
1338
|
+
[k: string]: any;
|
|
1339
|
+
}
|
|
1340
|
+
/**
|
|
1341
|
+
* What became of one comment of a [`CommentBatch`].
|
|
1342
|
+
*/
|
|
1343
|
+
interface CommentAddResult {
|
|
1344
|
+
/**
|
|
1345
|
+
* The item as the batch named it.
|
|
1346
|
+
*/
|
|
1347
|
+
item: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* What became of it.
|
|
1350
|
+
*/
|
|
1351
|
+
outcome: ("written" | "held" | "version-moved" | "error");
|
|
1352
|
+
/**
|
|
1353
|
+
* The comment written — `null` unless `outcome` is `written`.
|
|
1354
|
+
*/
|
|
1355
|
+
comment?: (AddedComment | null);
|
|
1356
|
+
/**
|
|
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.
|
|
1359
|
+
*/
|
|
1360
|
+
current_version?: (string | null);
|
|
1361
|
+
/**
|
|
1362
|
+
* Why it was not written — present when `outcome` is `error`.
|
|
1363
|
+
*/
|
|
1364
|
+
reason?: (string | null);
|
|
1365
|
+
[k: string]: any;
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* One comment a batch wrote.
|
|
1369
|
+
*/
|
|
1370
|
+
interface AddedComment {
|
|
1371
|
+
/**
|
|
1372
|
+
* Its id in the source.
|
|
1373
|
+
*/
|
|
1374
|
+
id: string;
|
|
1375
|
+
/**
|
|
1376
|
+
* Where it is shown, when the source has an address for it.
|
|
1377
|
+
*/
|
|
1378
|
+
url?: (string | null);
|
|
1379
|
+
/**
|
|
1380
|
+
* Its version, as `task comments` reports one.
|
|
1381
|
+
*/
|
|
1382
|
+
version?: (string | null);
|
|
1383
|
+
[k: string]: any;
|
|
1384
|
+
}
|
|
1385
|
+
/**
|
|
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.
|
|
1388
|
+
*/
|
|
1389
|
+
interface Sanitization {
|
|
1390
|
+
/**
|
|
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;
|
|
1280
1428
|
export declare namespace GeneratedCommentsSince {
|
|
1281
1429
|
/**
|
|
1282
1430
|
* What `task comments <SOURCE> --since` answers with.
|
|
@@ -1916,6 +2064,18 @@ export declare namespace GeneratedCopyAction {
|
|
|
1916
2064
|
reason: string;
|
|
1917
2065
|
action: "skipped";
|
|
1918
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;
|
|
1919
2079
|
});
|
|
1920
2080
|
/**
|
|
1921
2081
|
* One item, qualified by the source it came from.
|
|
@@ -2075,6 +2235,13 @@ export declare namespace GeneratedCopyOutcome {
|
|
|
2075
2235
|
* name — or the record itself — had landed and their headings could be addressed.
|
|
2076
2236
|
*/
|
|
2077
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);
|
|
2078
2245
|
[k: string]: any;
|
|
2079
2246
|
} & ({
|
|
2080
2247
|
/**
|
|
@@ -2176,6 +2343,18 @@ export declare namespace GeneratedCopyOutcome {
|
|
|
2176
2343
|
reason: string;
|
|
2177
2344
|
action: "skipped";
|
|
2178
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;
|
|
2179
2358
|
}));
|
|
2180
2359
|
/**
|
|
2181
2360
|
* One mutation of an expected write.
|
|
@@ -2535,6 +2714,13 @@ export declare namespace GeneratedCopyReport {
|
|
|
2535
2714
|
* name — or the record itself — had landed and their headings could be addressed.
|
|
2536
2715
|
*/
|
|
2537
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);
|
|
2538
2724
|
[k: string]: any;
|
|
2539
2725
|
} & CopyOutcome1);
|
|
2540
2726
|
/**
|
|
@@ -2687,6 +2873,18 @@ export declare namespace GeneratedCopyReport {
|
|
|
2687
2873
|
reason: string;
|
|
2688
2874
|
action: "skipped";
|
|
2689
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;
|
|
2690
2888
|
});
|
|
2691
2889
|
/**
|
|
2692
2890
|
* One item, qualified by the source it came from.
|
|
@@ -4787,6 +4985,12 @@ export declare namespace GeneratedFailureDocument {
|
|
|
4787
4985
|
* and absent otherwise.
|
|
4788
4986
|
*/
|
|
4789
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[];
|
|
4790
4994
|
sanitization?: (Sanitization | null);
|
|
4791
4995
|
[k: string]: any;
|
|
4792
4996
|
}
|
|
@@ -4911,62 +5115,423 @@ export declare namespace GeneratedFailureDocument {
|
|
|
4911
5115
|
/**
|
|
4912
5116
|
* What it is metered in — `points`, `requests`.
|
|
4913
5117
|
*/
|
|
4914
|
-
unit: string;
|
|
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[];
|
|
5406
|
+
/**
|
|
5407
|
+
* `None` is a first-class case — an orphan task — not an edge case.
|
|
5408
|
+
*/
|
|
5409
|
+
project?: (NativeId | null);
|
|
5410
|
+
/**
|
|
5411
|
+
* Where a human can open this task.
|
|
5412
|
+
*/
|
|
5413
|
+
url?: (string | null);
|
|
5414
|
+
/**
|
|
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.
|
|
5421
|
+
*/
|
|
5422
|
+
location?: (Location | null);
|
|
5423
|
+
/**
|
|
5424
|
+
* When the source says the task was created.
|
|
5425
|
+
*/
|
|
5426
|
+
created_at?: (string | null);
|
|
5427
|
+
/**
|
|
5428
|
+
* When the source says the task last changed.
|
|
5429
|
+
*/
|
|
5430
|
+
updated_at?: (string | null);
|
|
5431
|
+
/**
|
|
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.
|
|
5439
|
+
*/
|
|
5440
|
+
metadata?: {
|
|
5441
|
+
[k: string]: any;
|
|
5442
|
+
};
|
|
5443
|
+
/**
|
|
5444
|
+
* Normalized repository origins this task concerns, in source order and without
|
|
5445
|
+
* repeats.
|
|
5446
|
+
*/
|
|
5447
|
+
repositories?: Repository[];
|
|
5448
|
+
/**
|
|
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.
|
|
5455
|
+
*/
|
|
5456
|
+
delivers?: TaskRef[];
|
|
5457
|
+
/**
|
|
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.
|
|
5465
|
+
*/
|
|
5466
|
+
delivered_by?: TaskRef[];
|
|
4915
5467
|
/**
|
|
4916
|
-
*
|
|
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.
|
|
4917
5486
|
*/
|
|
4918
|
-
|
|
5487
|
+
version?: (string | null);
|
|
4919
5488
|
/**
|
|
4920
|
-
*
|
|
4921
|
-
*
|
|
4922
|
-
*
|
|
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.
|
|
4923
5497
|
*/
|
|
4924
|
-
|
|
5498
|
+
classification?: ("public" | "private");
|
|
4925
5499
|
[k: string]: any;
|
|
4926
5500
|
}
|
|
4927
5501
|
/**
|
|
4928
|
-
*
|
|
4929
|
-
* the `sanitization` member a write's answer carries when it is not empty.
|
|
5502
|
+
* The source's status, normalised and preserved.
|
|
4930
5503
|
*/
|
|
4931
|
-
interface
|
|
4932
|
-
/**
|
|
4933
|
-
* Spans the writes' own sanitisations rewrote.
|
|
4934
|
-
*/
|
|
4935
|
-
replaced: number;
|
|
5504
|
+
interface Status {
|
|
4936
5505
|
/**
|
|
4937
|
-
*
|
|
5506
|
+
* The normalised value filters compare against.
|
|
4938
5507
|
*/
|
|
4939
|
-
|
|
5508
|
+
category: ("draft" | "backlog" | "todo" | "queued" | "in-progress" | "done" | "cancelled" | "unknown");
|
|
4940
5509
|
/**
|
|
4941
|
-
*
|
|
5510
|
+
* The source's own label for this status.
|
|
4942
5511
|
*/
|
|
4943
|
-
|
|
5512
|
+
name: string;
|
|
4944
5513
|
[k: string]: any;
|
|
4945
5514
|
}
|
|
4946
5515
|
/**
|
|
4947
|
-
*
|
|
5516
|
+
* A tag a source attaches to work.
|
|
4948
5517
|
*/
|
|
4949
|
-
interface
|
|
5518
|
+
interface Label {
|
|
4950
5519
|
/**
|
|
4951
|
-
* The
|
|
5520
|
+
* The source's own opaque identifier.
|
|
4952
5521
|
*/
|
|
4953
|
-
|
|
4954
|
-
redacted: true;
|
|
4955
|
-
kind: LocatorKind;
|
|
4956
|
-
ordinal: number;
|
|
4957
|
-
});
|
|
5522
|
+
id: string;
|
|
4958
5523
|
/**
|
|
4959
|
-
*
|
|
5524
|
+
* What a user filtering across sources actually types.
|
|
4960
5525
|
*/
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
5526
|
+
name: string;
|
|
5527
|
+
/**
|
|
5528
|
+
* The source's own colour for the label, when it has one.
|
|
5529
|
+
*/
|
|
5530
|
+
color?: (string | null);
|
|
4966
5531
|
[k: string]: any;
|
|
4967
5532
|
}
|
|
4968
5533
|
}
|
|
4969
|
-
export type
|
|
5534
|
+
export type FoundTasks = GeneratedFoundTasks.FoundTasks;
|
|
4970
5535
|
export declare namespace GeneratedGlobalId {
|
|
4971
5536
|
/**
|
|
4972
5537
|
* One item, qualified by the source it came from.
|
|
@@ -16397,6 +16962,10 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
16397
16962
|
* from nothing by the value alone.
|
|
16398
16963
|
*/
|
|
16399
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");
|
|
16400
16969
|
/**
|
|
16401
16970
|
* What a locator names.
|
|
16402
16971
|
*/
|
|
@@ -16439,6 +17008,11 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
16439
17008
|
* update wrote no status, and for a task with no projection.
|
|
16440
17009
|
*/
|
|
16441
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);
|
|
16442
17016
|
sanitization?: (Sanitization | null);
|
|
16443
17017
|
[k: string]: any;
|
|
16444
17018
|
}
|
|
@@ -16758,6 +17332,46 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
16758
17332
|
reason: string;
|
|
16759
17333
|
[k: string]: any;
|
|
16760
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
|
+
}
|
|
16761
17375
|
/**
|
|
16762
17376
|
* What the screened writes of one command replaced, and what sanitise-on-refusal changed:
|
|
16763
17377
|
* the `sanitization` member a write's answer carries when it is not empty.
|
|
@@ -16801,6 +17415,98 @@ export declare namespace GeneratedTaskUpdated {
|
|
|
16801
17415
|
}
|
|
16802
17416
|
}
|
|
16803
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;
|
|
16804
17510
|
export declare namespace GeneratedTemplateAnswers {
|
|
16805
17511
|
/**
|
|
16806
17512
|
* What `task answers`, `project answers` and `document answers` answer with: the resolved
|
|
@@ -16968,6 +17674,90 @@ export declare namespace GeneratedTextFields {
|
|
|
16968
17674
|
type TextFields = ("title" | "content" | "title-or-content");
|
|
16969
17675
|
}
|
|
16970
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;
|
|
16971
17761
|
export declare namespace GeneratedUpdatedField {
|
|
16972
17762
|
/**
|
|
16973
17763
|
* One field of a task a [`TaskUpdate`] names, as the answer to it reports what was written.
|