@knkcs/contenthub-ui 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -57,6 +57,17 @@ export declare interface BlockReasonsSettingsProps {
57
57
  /** The longest Blueprint accessor a check names (internal/workspaceconfig.MaxBlueprintAccessor). */
58
58
  export declare const BLUEPRINT_ACCESSOR_MAX = 200;
59
59
 
60
+ /** One Blueprint's override of the workspace's editing settings. */
61
+ export declare interface BlueprintEditingOverride {
62
+ blueprintAccessor: string;
63
+ /** null follows the workspace's. */
64
+ editingMode: EditingMode | null;
65
+ /** null follows the workspace's. */
66
+ editingBlock: boolean | null;
67
+ /** What applies to the Blueprint's Content: this override over the workspace's. */
68
+ effective: EditingSettings;
69
+ }
70
+
60
71
  /** A content Blueprint, as the `BlueprintSource` port names it. */
61
72
  export declare interface BlueprintInfo {
62
73
  id: string;
@@ -202,6 +213,10 @@ export declare interface ChangeSet {
202
213
  * planned. Empty in a list.
203
214
  */
204
215
  plannedReleases: PlannedRelease[];
216
+ /** A Direct Edit, or one editors build; absent reads as "change_set". */
217
+ kind?: ChangeSetKind;
218
+ /** A Direct Edit's editor, an odon user id; absent or "" for any other kind. */
219
+ editorId?: string;
205
220
  }
206
221
 
207
222
  /** One Branch of a Chain, with the head a save on it names. */
@@ -243,6 +258,12 @@ export declare class ChangeSetClosedError extends Error {
243
258
  constructor(state: ChangeSetState);
244
259
  }
245
260
 
261
+ /**
262
+ * What kind of Change Set one is (ADR 0022): a Direct Edit, opened from one
263
+ * Content for one editor, or one editors build Chain by Chain.
264
+ */
265
+ export declare type ChangeSetKind = "change_set" | "direct_edit";
266
+
246
267
  /** One page of `listChangeSets`. */
247
268
  export declare interface ChangeSetList {
248
269
  changeSets: ChangeSet[];
@@ -281,6 +302,11 @@ export declare interface ChangeSetPageProps {
281
302
  onPublished?: (outcome: PublishOutcome) => void;
282
303
  /** Told after a Discard from the rail; the page stays, showing it discarded. */
283
304
  onDiscarded?: (changeSetId: string) => void;
305
+ /**
306
+ * mediahub, for a Direct Edit's media fields: a Direct Edit's page is its
307
+ * Content's fields (ADR 0022). Without it a media field offers nothing to pick.
308
+ */
309
+ mediaSource?: MediaSource_2;
284
310
  }
285
311
 
286
312
  /**
@@ -567,6 +593,10 @@ export declare interface ContenthubClient {
567
593
  assigneeId?: string;
568
594
  /** Only those with a Chain on this Content. */
569
595
  contentId?: string;
596
+ /** Only those of this kind: the index asks for "change_set", hiding Direct Edits. */
597
+ kind?: ChangeSetKind;
598
+ /** Only the Direct Edits of this odon user. */
599
+ editorId?: string;
570
600
  /** At most 200; 50 when absent. */
571
601
  pageSize?: number;
572
602
  pageToken?: string;
@@ -649,6 +679,29 @@ export declare interface ContenthubClient {
649
679
  id: string;
650
680
  reviewedHeads: Record<string, string>;
651
681
  }): Promise<PublishOutcome>;
682
+ /**
683
+ * Change validity (ADR 0022): corrects only a published Release's
684
+ * Validity Period, in one request and without a Direct Edit. It opens a
685
+ * Change Set, plans the date-only Release re-pinning the Release's
686
+ * Revision and superseding it, and publishes it with the proposals for
687
+ * the neighbouring Releases; the outcome is that Publish's. Refused as a
688
+ * whole, it leaves no Change Set behind: rejects with
689
+ * `EditingModeRefusedError` where the Content's Blueprint is "Change Sets
690
+ * only", `CoversReleaseError` (`changeSetRequired`) when the period would
691
+ * cover another Release entirely, `PublishRefusedError` with every
692
+ * blocker (an outstanding Required Check among them),
693
+ * `AccessDeniedError` for a caller who may not publish,
694
+ * `ContentBlockedError` and `InvalidInputError` for what else the service
695
+ * refuses.
696
+ */
697
+ changeValidity(input: {
698
+ releaseId: string;
699
+ validityPeriod: ValidityPeriod;
700
+ /** The Change Set's name; the service names it after the Content when absent. */
701
+ changeSetName?: string;
702
+ /** Makes a retry safe (CONTEXT.md, Idempotency Key). */
703
+ idempotencyKey?: string;
704
+ }): Promise<PublishOutcome>;
652
705
  /**
653
706
  * Merges what Main (and each dependency) gained since into every Chain
654
707
  * of the Change Set. A Branch whose merge has Conflicts, or fails its
@@ -741,6 +794,39 @@ export declare interface ContenthubClient {
741
794
  requiredCheckId: string;
742
795
  recorder: RecorderGrant;
743
796
  }): Promise<void>;
797
+ /**
798
+ * How the workspace's Content may be changed (ADR 0022): its own Editing
799
+ * Mode and Editing Block, and every per-Blueprint override with the
800
+ * values it makes effective. A workspace that never set them reads as
801
+ * "Change Sets only" without an Editing Block.
802
+ */
803
+ getEditingSettings(): Promise<WorkspaceEditingSettings>;
804
+ /**
805
+ * The editing settings in effect for the Content of the Blueprint with
806
+ * `blueprintAccessor`: its override over the workspace's, field by
807
+ * field. A host's Blueprint page reads it.
808
+ */
809
+ getEffectiveEditingSettings(blueprintAccessor: string): Promise<EffectiveEditingSettings>;
810
+ /**
811
+ * Replaces the workspace's own editing settings; admin only. It takes
812
+ * effect at once. Rejects with `AccessDeniedError` for a non-admin and
813
+ * `InvalidInputError` for what the service refuses.
814
+ */
815
+ setEditingSettings(settings: EditingSettings): Promise<EditingSettings>;
816
+ /**
817
+ * Replaces one Blueprint's override; admin only. A null field follows the
818
+ * workspace's, and at least one must be set. Rejects as
819
+ * `setEditingSettings` does.
820
+ */
821
+ setBlueprintEditingOverride(input: {
822
+ blueprintAccessor: string;
823
+ editingMode: EditingMode | null;
824
+ editingBlock: boolean | null;
825
+ }): Promise<BlueprintEditingOverride>;
826
+ /** Removes one Blueprint's override, so it follows the workspace's; admin only. */
827
+ deleteBlueprintEditingOverride(input: {
828
+ blueprintAccessor: string;
829
+ }): Promise<void>;
744
830
  /** Every Collection of the workspace, by name, then id: a tree by `parentId`. */
745
831
  listCollections(): Promise<Collection[]>;
746
832
  /**
@@ -995,6 +1081,43 @@ export declare interface ContenthubClient {
995
1081
  * `ChangeSetClosedError`, and `InvalidInputError` for anything else the
996
1082
  * service refuses (a missing or needless effective date).
997
1083
  */
1084
+ /**
1085
+ * Opens a Direct Edit of a published Content for the caller (ADR 0022),
1086
+ * or answers the one the caller has open on it, with `reopened`. Answers
1087
+ * the Direct Edit and the Content as read on its Branch. Rejects with
1088
+ * `EditingModeRefusedError` where the Editing Mode is "Change Sets only",
1089
+ * `DirectEditRefusedError` where the Content is Dated, `ContentBlockedError`, `ContentArchivedError`,
1090
+ * and `InvalidInputError` for anything else the service refuses.
1091
+ */
1092
+ openDirectEdit(input: {
1093
+ contentId: string;
1094
+ /** Makes a retry safe (CONTEXT.md, Idempotency Key). */
1095
+ idempotencyKey?: string;
1096
+ }): Promise<{
1097
+ changeSet: ChangeSet;
1098
+ content: Content;
1099
+ reopened: boolean;
1100
+ }>;
1101
+ /**
1102
+ * Publishes a Direct Edit at `expectedHeadId`, the head of its Branch the
1103
+ * editor saw: one Release, In Force from its Publish. Rejects as
1104
+ * `publish` does, and with `DirectEditRefusedError` for a Change Set that
1105
+ * is not a Direct Edit.
1106
+ */
1107
+ publishDirectEdit(input: {
1108
+ id: string;
1109
+ expectedHeadId: string;
1110
+ idempotencyKey?: string;
1111
+ }): Promise<PublishOutcome>;
1112
+ /**
1113
+ * Discards a Direct Edit: its work is dropped, Main and the Releases stay.
1114
+ * Rejects as `discardChangeSet` does, and with `DirectEditRefusedError`
1115
+ * for a Change Set that is not a Direct Edit.
1116
+ */
1117
+ discardDirectEdit(input: {
1118
+ id: string;
1119
+ idempotencyKey?: string;
1120
+ }): Promise<ChangeSet>;
998
1121
  startEditing(input: {
999
1122
  contentId: string;
1000
1123
  changeSetId?: string;
@@ -1119,9 +1242,11 @@ export declare const contenthubKeys: {
1119
1242
  changeSetList: (filter: {
1120
1243
  state?: string;
1121
1244
  assigneeId?: string;
1245
+ kind?: string;
1122
1246
  }) => readonly ["contenthub", "change-sets", "list", {
1123
1247
  state?: string;
1124
1248
  assigneeId?: string;
1249
+ kind?: string;
1125
1250
  }];
1126
1251
  openChangeSets: () => readonly ["contenthub", "change-sets", "list", "open-picker"];
1127
1252
  changeSet: (id: string) => readonly ["contenthub", "change-sets", "detail", string];
@@ -1131,6 +1256,8 @@ export declare const contenthubKeys: {
1131
1256
  changeSetStatuses: () => readonly ["contenthub", "change-set-statuses"];
1132
1257
  requiredChecks: () => readonly ["contenthub", "required-checks"];
1133
1258
  requiredCheckRecorders: (id: string) => readonly ["contenthub", "required-checks", "recorders", string];
1259
+ editingSettings: () => readonly ["contenthub", "editing-settings"];
1260
+ effectiveEditingSettings: (blueprintAccessor: string) => readonly ["contenthub", "editing-settings", "effective", string];
1134
1261
  collections: () => readonly ["contenthub", "collections"];
1135
1262
  collectionGrants: (id: string) => readonly ["contenthub", "collections", "grants", string];
1136
1263
  contents: () => readonly ["contenthub", "contents"];
@@ -1188,11 +1315,12 @@ export declare interface ContenthubPathsProviderProps {
1188
1315
 
1189
1316
  /**
1190
1317
  * contenthub's workspace configuration in one settings page (spec #56, story
1191
- * 107): Required Checks, Block Reasons and the Collection tree with its
1192
- * restriction and grants, each a tab chosen by `?tab=` so a host links
1318
+ * 107): Required Checks, Block Reasons, the editing settings (ADR 0022) and
1319
+ * the Collection tree with its restriction and grants, each a tab chosen by `?tab=` so a host links
1193
1320
  * straight to one.
1194
1321
  *
1195
- * Every tab is a flush DataTable whose rows are changed through Modals, so
1322
+ * Every tab is a flush DataTable whose rows are changed through Modals (the
1323
+ * editing tab heads its table with the workspace's own settings, padded), so
1196
1324
  * the body is unpadded (`bodyPadding="none"`, anker's rule for table tabs)
1197
1325
  * and there is no header Save: nothing here is a draft. Only the active tab
1198
1326
  * is mounted (nav-link tabs), so no two tabs' Modals or queries live at once.
@@ -1214,7 +1342,7 @@ export declare interface ContenthubSettingsProps {
1214
1342
  }
1215
1343
 
1216
1344
  /** The settings page's tabs, as `?tab=` names them. */
1217
- export declare type ContenthubSettingsTab = "required-checks" | "block-reasons" | "collections";
1345
+ export declare type ContenthubSettingsTab = "required-checks" | "block-reasons" | "editing" | "collections";
1218
1346
 
1219
1347
  /**
1220
1348
  * The package's translations as the one `{ namespace, resources }` export a
@@ -1235,6 +1363,7 @@ export declare const contenthubTranslations: {
1235
1363
  tabs: {
1236
1364
  requiredChecks: string;
1237
1365
  blockReasons: string;
1366
+ editing: string;
1238
1367
  collections: string;
1239
1368
  };
1240
1369
  };
@@ -1273,6 +1402,63 @@ export declare const contenthubTranslations: {
1273
1402
  failed: string;
1274
1403
  };
1275
1404
  };
1405
+ editing: {
1406
+ mode: {
1407
+ direct_edits: string;
1408
+ change_sets: string;
1409
+ both: string;
1410
+ };
1411
+ block: {
1412
+ on: string;
1413
+ off: string;
1414
+ };
1415
+ workspace: {
1416
+ title: string;
1417
+ description: string;
1418
+ edit: string;
1419
+ };
1420
+ columns: {
1421
+ blueprint: string;
1422
+ mode: string;
1423
+ block: string;
1424
+ actions: string;
1425
+ };
1426
+ fromWorkspace: string;
1427
+ createOverride: string;
1428
+ editOverride: string;
1429
+ removeOverride: string;
1430
+ count_one: string;
1431
+ count_other: string;
1432
+ empty: string;
1433
+ emptyHint: string;
1434
+ loadError: string;
1435
+ form: {
1436
+ workspaceTitle: string;
1437
+ createOverrideTitle: string;
1438
+ editOverrideTitle: string;
1439
+ accessor: string;
1440
+ accessorHelp: string;
1441
+ accessorRequired: string;
1442
+ accessorTooLong: string;
1443
+ accessorTaken: string;
1444
+ mode: string;
1445
+ modeHelp: string;
1446
+ modeRequired: string;
1447
+ block: string;
1448
+ blockHelp: string;
1449
+ follow: string;
1450
+ overridesNothing: string;
1451
+ save: string;
1452
+ denied: string;
1453
+ failed: string;
1454
+ };
1455
+ removeDialog: {
1456
+ title: string;
1457
+ message: string;
1458
+ confirm: string;
1459
+ failed: string;
1460
+ };
1461
+ };
1276
1462
  requiredChecks: {
1277
1463
  create: string;
1278
1464
  columns: {
@@ -1472,6 +1658,8 @@ export declare const contenthubTranslations: {
1472
1658
  assignee: string;
1473
1659
  anyone: string;
1474
1660
  me: string;
1661
+ kind: string;
1662
+ anyKind: string;
1475
1663
  };
1476
1664
  count_one: string;
1477
1665
  count_other: string;
@@ -1495,6 +1683,10 @@ export declare const contenthubTranslations: {
1495
1683
  createSubmit: string;
1496
1684
  };
1497
1685
  more: string;
1686
+ kind: {
1687
+ change_set: string;
1688
+ direct_edit: string;
1689
+ };
1498
1690
  };
1499
1691
  branch: {
1500
1692
  loading: string;
@@ -1992,6 +2184,7 @@ export declare const contenthubTranslations: {
1992
2184
  unblock: string;
1993
2185
  archive: string;
1994
2186
  unarchive: string;
2187
+ edit: string;
1995
2188
  };
1996
2189
  data: {
1997
2190
  readOnMain: string;
@@ -2012,6 +2205,7 @@ export declare const contenthubTranslations: {
2012
2205
  inForce: string;
2013
2206
  changeSet: string;
2014
2207
  proposed: string;
2208
+ actions: string;
2015
2209
  };
2016
2210
  kind: {
2017
2211
  revision: string;
@@ -2031,6 +2225,7 @@ export declare const contenthubTranslations: {
2031
2225
  proposed: string;
2032
2226
  planned: string;
2033
2227
  loadError: string;
2228
+ changeValidity: string;
2034
2229
  };
2035
2230
  revisions: {
2036
2231
  columns: {
@@ -2115,6 +2310,7 @@ export declare const contenthubTranslations: {
2115
2310
  empty: string;
2116
2311
  emptyHint: string;
2117
2312
  loadError: string;
2313
+ directEditBy: string;
2118
2314
  };
2119
2315
  filing: {
2120
2316
  title: string;
@@ -2183,6 +2379,57 @@ export declare const contenthubTranslations: {
2183
2379
  message: string;
2184
2380
  confirm: string;
2185
2381
  };
2382
+ directEdit: {
2383
+ unpublished: string;
2384
+ continue: string;
2385
+ };
2386
+ changeValidity: {
2387
+ title: string;
2388
+ hint: string;
2389
+ release: string;
2390
+ firstDay: string;
2391
+ firstDayHelp: string;
2392
+ firstDayRequired: string;
2393
+ lastDay: string;
2394
+ lastDayHelp: string;
2395
+ lastDayBefore: string;
2396
+ submit: string;
2397
+ done: string;
2398
+ published_one: string;
2399
+ published_other: string;
2400
+ editingMode: string;
2401
+ covers: string;
2402
+ publishRefused: string;
2403
+ denied: string;
2404
+ };
2405
+ };
2406
+ directEdit: {
2407
+ badge: string;
2408
+ loading: string;
2409
+ notFound: string;
2410
+ loadError: string;
2411
+ publish: string;
2412
+ discard: string;
2413
+ closed: {
2414
+ open: string;
2415
+ published: string;
2416
+ discarded: string;
2417
+ };
2418
+ discardConfirm: {
2419
+ title: string;
2420
+ message: string;
2421
+ failed: string;
2422
+ };
2423
+ refused_one: string;
2424
+ refused_other: string;
2425
+ refusedBecause: {
2426
+ dated_content: string;
2427
+ one_branch: string;
2428
+ not_a_direct_edit: string;
2429
+ unknown: string;
2430
+ };
2431
+ saveFirst: string;
2432
+ changeSetsOnly: string;
2186
2433
  };
2187
2434
  };
2188
2435
  };
@@ -2198,6 +2445,7 @@ export declare const contenthubTranslations: {
2198
2445
  tabs: {
2199
2446
  requiredChecks: string;
2200
2447
  blockReasons: string;
2448
+ editing: string;
2201
2449
  collections: string;
2202
2450
  };
2203
2451
  };
@@ -2236,6 +2484,63 @@ export declare const contenthubTranslations: {
2236
2484
  failed: string;
2237
2485
  };
2238
2486
  };
2487
+ editing: {
2488
+ mode: {
2489
+ direct_edits: string;
2490
+ change_sets: string;
2491
+ both: string;
2492
+ };
2493
+ block: {
2494
+ on: string;
2495
+ off: string;
2496
+ };
2497
+ workspace: {
2498
+ title: string;
2499
+ description: string;
2500
+ edit: string;
2501
+ };
2502
+ columns: {
2503
+ blueprint: string;
2504
+ mode: string;
2505
+ block: string;
2506
+ actions: string;
2507
+ };
2508
+ fromWorkspace: string;
2509
+ createOverride: string;
2510
+ editOverride: string;
2511
+ removeOverride: string;
2512
+ count_one: string;
2513
+ count_other: string;
2514
+ empty: string;
2515
+ emptyHint: string;
2516
+ loadError: string;
2517
+ form: {
2518
+ workspaceTitle: string;
2519
+ createOverrideTitle: string;
2520
+ editOverrideTitle: string;
2521
+ accessor: string;
2522
+ accessorHelp: string;
2523
+ accessorRequired: string;
2524
+ accessorTooLong: string;
2525
+ accessorTaken: string;
2526
+ mode: string;
2527
+ modeHelp: string;
2528
+ modeRequired: string;
2529
+ block: string;
2530
+ blockHelp: string;
2531
+ follow: string;
2532
+ overridesNothing: string;
2533
+ save: string;
2534
+ denied: string;
2535
+ failed: string;
2536
+ };
2537
+ removeDialog: {
2538
+ title: string;
2539
+ message: string;
2540
+ confirm: string;
2541
+ failed: string;
2542
+ };
2543
+ };
2239
2544
  requiredChecks: {
2240
2545
  create: string;
2241
2546
  columns: {
@@ -2435,6 +2740,8 @@ export declare const contenthubTranslations: {
2435
2740
  assignee: string;
2436
2741
  anyone: string;
2437
2742
  me: string;
2743
+ kind: string;
2744
+ anyKind: string;
2438
2745
  };
2439
2746
  count_one: string;
2440
2747
  count_other: string;
@@ -2458,6 +2765,10 @@ export declare const contenthubTranslations: {
2458
2765
  createSubmit: string;
2459
2766
  };
2460
2767
  more: string;
2768
+ kind: {
2769
+ change_set: string;
2770
+ direct_edit: string;
2771
+ };
2461
2772
  };
2462
2773
  branch: {
2463
2774
  loading: string;
@@ -2955,6 +3266,7 @@ export declare const contenthubTranslations: {
2955
3266
  unblock: string;
2956
3267
  archive: string;
2957
3268
  unarchive: string;
3269
+ edit: string;
2958
3270
  };
2959
3271
  data: {
2960
3272
  readOnMain: string;
@@ -2975,6 +3287,7 @@ export declare const contenthubTranslations: {
2975
3287
  inForce: string;
2976
3288
  changeSet: string;
2977
3289
  proposed: string;
3290
+ actions: string;
2978
3291
  };
2979
3292
  kind: {
2980
3293
  revision: string;
@@ -2994,6 +3307,7 @@ export declare const contenthubTranslations: {
2994
3307
  proposed: string;
2995
3308
  planned: string;
2996
3309
  loadError: string;
3310
+ changeValidity: string;
2997
3311
  };
2998
3312
  revisions: {
2999
3313
  columns: {
@@ -3078,6 +3392,7 @@ export declare const contenthubTranslations: {
3078
3392
  empty: string;
3079
3393
  emptyHint: string;
3080
3394
  loadError: string;
3395
+ directEditBy: string;
3081
3396
  };
3082
3397
  filing: {
3083
3398
  title: string;
@@ -3146,6 +3461,57 @@ export declare const contenthubTranslations: {
3146
3461
  message: string;
3147
3462
  confirm: string;
3148
3463
  };
3464
+ directEdit: {
3465
+ unpublished: string;
3466
+ continue: string;
3467
+ };
3468
+ changeValidity: {
3469
+ title: string;
3470
+ hint: string;
3471
+ release: string;
3472
+ firstDay: string;
3473
+ firstDayHelp: string;
3474
+ firstDayRequired: string;
3475
+ lastDay: string;
3476
+ lastDayHelp: string;
3477
+ lastDayBefore: string;
3478
+ submit: string;
3479
+ done: string;
3480
+ published_one: string;
3481
+ published_other: string;
3482
+ editingMode: string;
3483
+ covers: string;
3484
+ publishRefused: string;
3485
+ denied: string;
3486
+ };
3487
+ };
3488
+ directEdit: {
3489
+ badge: string;
3490
+ loading: string;
3491
+ notFound: string;
3492
+ loadError: string;
3493
+ publish: string;
3494
+ discard: string;
3495
+ closed: {
3496
+ open: string;
3497
+ published: string;
3498
+ discarded: string;
3499
+ };
3500
+ discardConfirm: {
3501
+ title: string;
3502
+ message: string;
3503
+ failed: string;
3504
+ };
3505
+ refused_one: string;
3506
+ refused_other: string;
3507
+ refusedBecause: {
3508
+ dated_content: string;
3509
+ one_branch: string;
3510
+ not_a_direct_edit: string;
3511
+ unknown: string;
3512
+ };
3513
+ saveFirst: string;
3514
+ changeSetsOnly: string;
3149
3515
  };
3150
3516
  };
3151
3517
  };
@@ -3228,7 +3594,11 @@ export declare interface ContentPageProps {
3228
3594
  onOpenBranch: (target: OpenBranchTarget) => void;
3229
3595
  /** Host navigation to another Content's page, from the References tab. */
3230
3596
  onOpenContent?: (target: OpenContentTarget) => void;
3231
- /** Host navigation to a Change Set's page, from the Change Sets tab. */
3597
+ /**
3598
+ * Host navigation to a Change Set's page, from the Change Sets tab, and
3599
+ * to a Direct Edit's, which `ChangeSetPage` shows: Edit is offered only
3600
+ * with it.
3601
+ */
3232
3602
  onOpenChangeSet?: (changeSetId: string) => void;
3233
3603
  }
3234
3604
 
@@ -3276,11 +3646,14 @@ export declare type CopyFrom = {
3276
3646
  /**
3277
3647
  * A plan's Validity Period would cover these Releases of its Content
3278
3648
  * entirely: nothing was planned. Supersede them, or change the dates.
3649
+ * `changeSetRequired` is set when the request could not Supersede them, as
3650
+ * Change validity can't: that decision is made in a Change Set.
3279
3651
  */
3280
3652
  export declare class CoversReleaseError extends Error {
3281
3653
  readonly contentId: string;
3282
3654
  readonly coveredReleaseIds: string[];
3283
- constructor(contentId: string, coveredReleaseIds: string[]);
3655
+ readonly changeSetRequired: boolean;
3656
+ constructor(contentId: string, coveredReleaseIds: string[], changeSetRequired?: boolean);
3284
3657
  }
3285
3658
 
3286
3659
  /** The production `ContenthubClient`, over Connect. */
@@ -3299,6 +3672,53 @@ export declare interface CreateConnectContenthubClientOptions {
3299
3672
  transport?: Transport;
3300
3673
  }
3301
3674
 
3675
+ /**
3676
+ * A Direct Edit's screen (ADR 0022, #264): the Content's fields, Save,
3677
+ * Publish and Discard, and nothing of the Change Set it is: no Chain,
3678
+ * Branch or Release tab, no rail. Saves go on its one Branch, as any save
3679
+ * does; Publish cuts its one Release. `ChangeSetPage` shows it for a Change
3680
+ * Set that is a Direct Edit, so a host needs no route of its own for it.
3681
+ */
3682
+ export declare function DirectEditPage({ client, changeSetId, mediaSource, onPublished, onDiscarded, }: DirectEditPageProps): JSX.Element;
3683
+
3684
+ export declare namespace DirectEditPage {
3685
+ var displayName: string;
3686
+ }
3687
+
3688
+ export declare interface DirectEditPageProps {
3689
+ client: ContenthubClient;
3690
+ /** The Direct Edit: a Change Set of kind "direct_edit". */
3691
+ changeSetId: string;
3692
+ /** mediahub, for media fields and images in rich text (ADR 0020). */
3693
+ mediaSource?: MediaSource_2;
3694
+ /** Told after Publish; the screen stays, showing it published. */
3695
+ onPublished?: (outcome: PublishOutcome) => void;
3696
+ /** Told after Discard; the screen stays, showing it discarded. */
3697
+ onDiscarded?: (changeSetId: string) => void;
3698
+ }
3699
+
3700
+ /** Why contenthub refused a Direct Edit (`DirectEditRefusedError.reason`). */
3701
+ export declare type DirectEditRefusal =
3702
+ /** The Content is Dated, which a Direct Edit can't take yet. */
3703
+ "dated_content"
3704
+ /** A Direct Edit takes no second Chain, Branch, dependency or Source. */
3705
+ | "one_branch"
3706
+ /** The Change Set named is not a Direct Edit. */
3707
+ | "not_a_direct_edit"
3708
+ /** A reason this build doesn't know. */
3709
+ | "unknown";
3710
+
3711
+ /**
3712
+ * A Direct Edit was refused, or a write a Direct Edit can't take. Read from
3713
+ * the refusal's typed DirectEditRefused detail, not its text.
3714
+ */
3715
+ export declare class DirectEditRefusedError extends Error {
3716
+ readonly reason: DirectEditRefusal;
3717
+ /** The Content it is about; "" where the refusal names none. */
3718
+ readonly contentId: string;
3719
+ constructor(reason: DirectEditRefusal, message: string, contentId?: string);
3720
+ }
3721
+
3302
3722
  /** One edge of one Revision. */
3303
3723
  export declare interface Edge {
3304
3724
  sourceContentId: string;
@@ -3317,6 +3737,40 @@ export declare interface Edge {
3317
3737
  /** What kind of edge of the Content Graph (ADR 0009). */
3318
3738
  export declare type EdgeKind = "reference" | "toc" | "include" | "exclude" | "replace" | "annotate" | "link" | "footnote" | "anchor" | "media" | "blueprint" | "unspecified";
3319
3739
 
3740
+ /**
3741
+ * Which ways of changing a Blueprint's Content the workspace offers (ADR
3742
+ * 0022, CONTEXT.md Editing Mode): Direct Edits only, Change Sets only, or
3743
+ * both. Only "change_sets" is a rule: contenthub refuses a Direct Edit on
3744
+ * such Content.
3745
+ */
3746
+ export declare type EditingMode = "direct_edits" | "change_sets" | "both";
3747
+
3748
+ /**
3749
+ * The effective Editing Mode of the Content's Blueprint is "Change Sets
3750
+ * only" (ADR 0022): the change is made in a Change Set. Nothing was written.
3751
+ */
3752
+ export declare class EditingModeRefusedError extends Error {
3753
+ readonly contentId: string;
3754
+ readonly blueprintAccessor: string;
3755
+ /** The effective Editing Mode that refused it. */
3756
+ readonly editingMode: EditingMode;
3757
+ constructor(contentId: string, blueprintAccessor: string, editingMode?: EditingMode);
3758
+ }
3759
+
3760
+ /** The workspace's editing settings, or the ones in effect for a Blueprint. */
3761
+ export declare interface EditingSettings {
3762
+ editingMode: EditingMode;
3763
+ /** Whether opening a Direct Edit sets an Editing Block on its Content. */
3764
+ editingBlock: boolean;
3765
+ }
3766
+
3767
+ /** The editing settings in effect for one Blueprint, and which its override decides. */
3768
+ export declare interface EffectiveEditingSettings {
3769
+ effective: EditingSettings;
3770
+ editingModeOverridden: boolean;
3771
+ editingBlockOverridden: boolean;
3772
+ }
3773
+
3320
3774
  /** One field that differs between two Revisions. */
3321
3775
  export declare interface FieldChange {
3322
3776
  /** "/" and the field's accessor. */
@@ -3370,6 +3824,7 @@ export declare const i18nResources: {
3370
3824
  tabs: {
3371
3825
  requiredChecks: string;
3372
3826
  blockReasons: string;
3827
+ editing: string;
3373
3828
  collections: string;
3374
3829
  };
3375
3830
  };
@@ -3408,6 +3863,63 @@ export declare const i18nResources: {
3408
3863
  failed: string;
3409
3864
  };
3410
3865
  };
3866
+ editing: {
3867
+ mode: {
3868
+ direct_edits: string;
3869
+ change_sets: string;
3870
+ both: string;
3871
+ };
3872
+ block: {
3873
+ on: string;
3874
+ off: string;
3875
+ };
3876
+ workspace: {
3877
+ title: string;
3878
+ description: string;
3879
+ edit: string;
3880
+ };
3881
+ columns: {
3882
+ blueprint: string;
3883
+ mode: string;
3884
+ block: string;
3885
+ actions: string;
3886
+ };
3887
+ fromWorkspace: string;
3888
+ createOverride: string;
3889
+ editOverride: string;
3890
+ removeOverride: string;
3891
+ count_one: string;
3892
+ count_other: string;
3893
+ empty: string;
3894
+ emptyHint: string;
3895
+ loadError: string;
3896
+ form: {
3897
+ workspaceTitle: string;
3898
+ createOverrideTitle: string;
3899
+ editOverrideTitle: string;
3900
+ accessor: string;
3901
+ accessorHelp: string;
3902
+ accessorRequired: string;
3903
+ accessorTooLong: string;
3904
+ accessorTaken: string;
3905
+ mode: string;
3906
+ modeHelp: string;
3907
+ modeRequired: string;
3908
+ block: string;
3909
+ blockHelp: string;
3910
+ follow: string;
3911
+ overridesNothing: string;
3912
+ save: string;
3913
+ denied: string;
3914
+ failed: string;
3915
+ };
3916
+ removeDialog: {
3917
+ title: string;
3918
+ message: string;
3919
+ confirm: string;
3920
+ failed: string;
3921
+ };
3922
+ };
3411
3923
  requiredChecks: {
3412
3924
  create: string;
3413
3925
  columns: {
@@ -3607,6 +4119,8 @@ export declare const i18nResources: {
3607
4119
  assignee: string;
3608
4120
  anyone: string;
3609
4121
  me: string;
4122
+ kind: string;
4123
+ anyKind: string;
3610
4124
  };
3611
4125
  count_one: string;
3612
4126
  count_other: string;
@@ -3630,6 +4144,10 @@ export declare const i18nResources: {
3630
4144
  createSubmit: string;
3631
4145
  };
3632
4146
  more: string;
4147
+ kind: {
4148
+ change_set: string;
4149
+ direct_edit: string;
4150
+ };
3633
4151
  };
3634
4152
  branch: {
3635
4153
  loading: string;
@@ -4127,6 +4645,7 @@ export declare const i18nResources: {
4127
4645
  unblock: string;
4128
4646
  archive: string;
4129
4647
  unarchive: string;
4648
+ edit: string;
4130
4649
  };
4131
4650
  data: {
4132
4651
  readOnMain: string;
@@ -4147,6 +4666,7 @@ export declare const i18nResources: {
4147
4666
  inForce: string;
4148
4667
  changeSet: string;
4149
4668
  proposed: string;
4669
+ actions: string;
4150
4670
  };
4151
4671
  kind: {
4152
4672
  revision: string;
@@ -4166,6 +4686,7 @@ export declare const i18nResources: {
4166
4686
  proposed: string;
4167
4687
  planned: string;
4168
4688
  loadError: string;
4689
+ changeValidity: string;
4169
4690
  };
4170
4691
  revisions: {
4171
4692
  columns: {
@@ -4250,6 +4771,7 @@ export declare const i18nResources: {
4250
4771
  empty: string;
4251
4772
  emptyHint: string;
4252
4773
  loadError: string;
4774
+ directEditBy: string;
4253
4775
  };
4254
4776
  filing: {
4255
4777
  title: string;
@@ -4318,6 +4840,57 @@ export declare const i18nResources: {
4318
4840
  message: string;
4319
4841
  confirm: string;
4320
4842
  };
4843
+ directEdit: {
4844
+ unpublished: string;
4845
+ continue: string;
4846
+ };
4847
+ changeValidity: {
4848
+ title: string;
4849
+ hint: string;
4850
+ release: string;
4851
+ firstDay: string;
4852
+ firstDayHelp: string;
4853
+ firstDayRequired: string;
4854
+ lastDay: string;
4855
+ lastDayHelp: string;
4856
+ lastDayBefore: string;
4857
+ submit: string;
4858
+ done: string;
4859
+ published_one: string;
4860
+ published_other: string;
4861
+ editingMode: string;
4862
+ covers: string;
4863
+ publishRefused: string;
4864
+ denied: string;
4865
+ };
4866
+ };
4867
+ directEdit: {
4868
+ badge: string;
4869
+ loading: string;
4870
+ notFound: string;
4871
+ loadError: string;
4872
+ publish: string;
4873
+ discard: string;
4874
+ closed: {
4875
+ open: string;
4876
+ published: string;
4877
+ discarded: string;
4878
+ };
4879
+ discardConfirm: {
4880
+ title: string;
4881
+ message: string;
4882
+ failed: string;
4883
+ };
4884
+ refused_one: string;
4885
+ refused_other: string;
4886
+ refusedBecause: {
4887
+ dated_content: string;
4888
+ one_branch: string;
4889
+ not_a_direct_edit: string;
4890
+ unknown: string;
4891
+ };
4892
+ saveFirst: string;
4893
+ changeSetsOnly: string;
4321
4894
  };
4322
4895
  };
4323
4896
  };
@@ -4333,6 +4906,7 @@ export declare const i18nResources: {
4333
4906
  tabs: {
4334
4907
  requiredChecks: string;
4335
4908
  blockReasons: string;
4909
+ editing: string;
4336
4910
  collections: string;
4337
4911
  };
4338
4912
  };
@@ -4371,6 +4945,63 @@ export declare const i18nResources: {
4371
4945
  failed: string;
4372
4946
  };
4373
4947
  };
4948
+ editing: {
4949
+ mode: {
4950
+ direct_edits: string;
4951
+ change_sets: string;
4952
+ both: string;
4953
+ };
4954
+ block: {
4955
+ on: string;
4956
+ off: string;
4957
+ };
4958
+ workspace: {
4959
+ title: string;
4960
+ description: string;
4961
+ edit: string;
4962
+ };
4963
+ columns: {
4964
+ blueprint: string;
4965
+ mode: string;
4966
+ block: string;
4967
+ actions: string;
4968
+ };
4969
+ fromWorkspace: string;
4970
+ createOverride: string;
4971
+ editOverride: string;
4972
+ removeOverride: string;
4973
+ count_one: string;
4974
+ count_other: string;
4975
+ empty: string;
4976
+ emptyHint: string;
4977
+ loadError: string;
4978
+ form: {
4979
+ workspaceTitle: string;
4980
+ createOverrideTitle: string;
4981
+ editOverrideTitle: string;
4982
+ accessor: string;
4983
+ accessorHelp: string;
4984
+ accessorRequired: string;
4985
+ accessorTooLong: string;
4986
+ accessorTaken: string;
4987
+ mode: string;
4988
+ modeHelp: string;
4989
+ modeRequired: string;
4990
+ block: string;
4991
+ blockHelp: string;
4992
+ follow: string;
4993
+ overridesNothing: string;
4994
+ save: string;
4995
+ denied: string;
4996
+ failed: string;
4997
+ };
4998
+ removeDialog: {
4999
+ title: string;
5000
+ message: string;
5001
+ confirm: string;
5002
+ failed: string;
5003
+ };
5004
+ };
4374
5005
  requiredChecks: {
4375
5006
  create: string;
4376
5007
  columns: {
@@ -4570,6 +5201,8 @@ export declare const i18nResources: {
4570
5201
  assignee: string;
4571
5202
  anyone: string;
4572
5203
  me: string;
5204
+ kind: string;
5205
+ anyKind: string;
4573
5206
  };
4574
5207
  count_one: string;
4575
5208
  count_other: string;
@@ -4593,6 +5226,10 @@ export declare const i18nResources: {
4593
5226
  createSubmit: string;
4594
5227
  };
4595
5228
  more: string;
5229
+ kind: {
5230
+ change_set: string;
5231
+ direct_edit: string;
5232
+ };
4596
5233
  };
4597
5234
  branch: {
4598
5235
  loading: string;
@@ -5090,6 +5727,7 @@ export declare const i18nResources: {
5090
5727
  unblock: string;
5091
5728
  archive: string;
5092
5729
  unarchive: string;
5730
+ edit: string;
5093
5731
  };
5094
5732
  data: {
5095
5733
  readOnMain: string;
@@ -5110,6 +5748,7 @@ export declare const i18nResources: {
5110
5748
  inForce: string;
5111
5749
  changeSet: string;
5112
5750
  proposed: string;
5751
+ actions: string;
5113
5752
  };
5114
5753
  kind: {
5115
5754
  revision: string;
@@ -5129,6 +5768,7 @@ export declare const i18nResources: {
5129
5768
  proposed: string;
5130
5769
  planned: string;
5131
5770
  loadError: string;
5771
+ changeValidity: string;
5132
5772
  };
5133
5773
  revisions: {
5134
5774
  columns: {
@@ -5213,6 +5853,7 @@ export declare const i18nResources: {
5213
5853
  empty: string;
5214
5854
  emptyHint: string;
5215
5855
  loadError: string;
5856
+ directEditBy: string;
5216
5857
  };
5217
5858
  filing: {
5218
5859
  title: string;
@@ -5281,6 +5922,57 @@ export declare const i18nResources: {
5281
5922
  message: string;
5282
5923
  confirm: string;
5283
5924
  };
5925
+ directEdit: {
5926
+ unpublished: string;
5927
+ continue: string;
5928
+ };
5929
+ changeValidity: {
5930
+ title: string;
5931
+ hint: string;
5932
+ release: string;
5933
+ firstDay: string;
5934
+ firstDayHelp: string;
5935
+ firstDayRequired: string;
5936
+ lastDay: string;
5937
+ lastDayHelp: string;
5938
+ lastDayBefore: string;
5939
+ submit: string;
5940
+ done: string;
5941
+ published_one: string;
5942
+ published_other: string;
5943
+ editingMode: string;
5944
+ covers: string;
5945
+ publishRefused: string;
5946
+ denied: string;
5947
+ };
5948
+ };
5949
+ directEdit: {
5950
+ badge: string;
5951
+ loading: string;
5952
+ notFound: string;
5953
+ loadError: string;
5954
+ publish: string;
5955
+ discard: string;
5956
+ closed: {
5957
+ open: string;
5958
+ published: string;
5959
+ discarded: string;
5960
+ };
5961
+ discardConfirm: {
5962
+ title: string;
5963
+ message: string;
5964
+ failed: string;
5965
+ };
5966
+ refused_one: string;
5967
+ refused_other: string;
5968
+ refusedBecause: {
5969
+ dated_content: string;
5970
+ one_branch: string;
5971
+ not_a_direct_edit: string;
5972
+ unknown: string;
5973
+ };
5974
+ saveFirst: string;
5975
+ changeSetsOnly: string;
5284
5976
  };
5285
5977
  };
5286
5978
  };
@@ -5617,6 +6309,11 @@ export declare interface RequiredCheckRecorders {
5617
6309
  export declare interface ResolvedBlueprintRelease {
5618
6310
  /** The Blueprint's name, as the released Revision holds it; "" if it holds none. */
5619
6311
  displayName: string;
6312
+ /**
6313
+ * The Blueprint's accessor, which its editing settings are keyed by;
6314
+ * "" or absent when the Resolved Release names none.
6315
+ */
6316
+ accessor?: string;
5620
6317
  /** Whether its Content is Dated: its Releases carry a Validity Period. */
5621
6318
  dated: boolean;
5622
6319
  /** fieldkit's Resolved Spec fields, in Blueprint order. */
@@ -5803,4 +6500,10 @@ export declare class WithheldWorkError extends Error {
5803
6500
  constructor(message: string);
5804
6501
  }
5805
6502
 
6503
+ /** The workspace's editing settings and every per-Blueprint override, by accessor. */
6504
+ export declare interface WorkspaceEditingSettings {
6505
+ workspace: EditingSettings;
6506
+ overrides: BlueprintEditingOverride[];
6507
+ }
6508
+
5806
6509
  export { }