@fusebase/fusebase-gate-sdk 2.5.4 → 2.6.1

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.
@@ -161,6 +161,94 @@ export interface CreatePortalPageResponseContract {
161
161
  */
162
162
  staged: boolean;
163
163
  }
164
+ export interface AddPortalFilesDashboardMenuItemRequestContract {
165
+ /**
166
+ * Visible name of the navigation item, also used as the dashboard block title
167
+ * when the dashboard page is created. Plain text. Default: `Files`.
168
+ * @minLength 1
169
+ * @maxLength 100
170
+ */
171
+ title?: string;
172
+ /** Which bar the root item goes to. Default: `sidebar`. */
173
+ positionType?: PortalContentPositionType;
174
+ }
175
+ export interface AddPortalFilesDashboardMenuItemResponseContract {
176
+ /** Id of the created navigation item. */
177
+ menuItemId: string;
178
+ /** Id of the system Files dashboard page (fixed path `/files-dashboard`). */
179
+ pageId: string;
180
+ /** Id of the dashboard block. Absent when the page already existed. */
181
+ blockId?: string;
182
+ /** Portal route the item points at: always `/files-dashboard`. */
183
+ url: string;
184
+ /** True when this call also created the dashboard page and its block. */
185
+ pageCreated: boolean;
186
+ /** Draft branch the change was staged on. */
187
+ branchId: string;
188
+ /** Sequence numbers of the staged events. */
189
+ seqs: number[];
190
+ /** Always true: the change is staged in the draft, not live. */
191
+ staged: boolean;
192
+ }
193
+ export interface AddPortalChatsDashboardMenuItemRequestContract {
194
+ /**
195
+ * Visible name of the Chat dashboard navigation item. Plain text.
196
+ * Default: `Chat Dashboard`.
197
+ * @minLength 1
198
+ * @maxLength 100
199
+ */
200
+ title?: string;
201
+ /**
202
+ * Menu bar to place the dashboard's root item in: "sidebar" (default),
203
+ * "top" (topbar), or "footer".
204
+ */
205
+ positionType?: PortalContentPositionType;
206
+ }
207
+ export interface AddPortalChatsDashboardMenuItemResponseContract {
208
+ /** Id of the created root menu item. */
209
+ menuItemId: string;
210
+ /** Id of the portal's system Chat dashboard page the item points at. */
211
+ pageId: string;
212
+ /** URL path of the dashboard — always `/chats-dashboard`. */
213
+ url: string;
214
+ /** Menu bar the root item was placed in. */
215
+ positionType: PortalContentPositionType;
216
+ /** Draft branch the change was staged on. */
217
+ branchId: string;
218
+ /** Sequence number of the staged addMenuItem event. */
219
+ seqs: number[];
220
+ /** Always true: the item is staged in the draft, not live. */
221
+ staged: boolean;
222
+ }
223
+ export interface AddPortalTasksDashboardMenuItemRequestContract {
224
+ /**
225
+ * Visible name of the navigation item, also used as the dashboard block title
226
+ * when the dashboard page is created. Plain text. Default: `Task Dashboard`.
227
+ * @minLength 1
228
+ * @maxLength 100
229
+ */
230
+ title?: string;
231
+ /** Which bar the root item goes to. Default: `sidebar`. */
232
+ positionType?: PortalContentPositionType;
233
+ }
234
+ export interface AddPortalTasksDashboardMenuItemResponseContract {
235
+ /** Id of the created navigation item. */
236
+ menuItemId: string;
237
+ /** Id of the system Tasks dashboard page (fixed path `/tasks-dashboard`). */
238
+ pageId: string;
239
+ /** Id of the dashboard block. Absent when the page already existed. */
240
+ blockId?: string;
241
+ /** Portal route the item points at: always `/tasks-dashboard`. */
242
+ url: string;
243
+ /** True when this call also created the dashboard page and its block. */
244
+ pageCreated: boolean;
245
+ /** Draft branch the change was staged on. */
246
+ branchId: string;
247
+ /** Sequence numbers of the staged events. */
248
+ seqs: number[];
249
+ /** Always true: the change is staged in the draft, not live. */
250
+ staged: boolean;
251
+ }
164
252
  export interface CreatePortalPageWithNoteRequestContract {
165
253
  /**
166
254
  * Title for the new page (also used as the backing Fusebase note title).
@@ -203,6 +291,59 @@ export interface CreatePortalPageWithNoteResponseContract {
203
291
  */
204
292
  staged: boolean;
205
293
  }
294
+ export interface AddPortalInternalSpacePageRequestContract {
295
+ /**
296
+ * Global id of the existing Internal Space page (Fusebase note) to add.
297
+ * Exactly one of `noteId` or `noteUrl` is required.
298
+ */
299
+ noteId?: string;
300
+ /**
301
+ * Internal Space page URL as copied from the browser, e.g.
302
+ * `https://acme.nimbusweb.me/space/<workspaceId>/page/<noteId>`. Exactly one
303
+ * of `noteId` or `noteUrl` is required.
304
+ */
305
+ noteUrl?: string;
306
+ /**
307
+ * Title for the portal page and its menu item. Defaults to the note's own
308
+ * title. The content block's own header always shows the note's title —
309
+ * publishing backfills it from the note's share.
310
+ * @maxLength 100
311
+ */
312
+ title?: string;
313
+ /**
314
+ * Optional id of an existing menu item (e.g. a folder) to nest the page under
315
+ * in the sidebar. When omitted the page is created at the portal root.
316
+ */
317
+ parentId?: string;
318
+ /** Optional icon key for the menu item (default: "page"). */
319
+ icon?: string;
320
+ /**
321
+ * Menu bar to place the page in: "sidebar" (default), "top" (topbar), or
322
+ * "footer". Ignored when `parentId` is set (the page inherits the parent's bar).
323
+ */
324
+ positionType?: PortalContentPositionType;
325
+ }
326
+ export interface AddPortalInternalSpacePageResponseContract {
327
+ /** Global id of the Internal Space note the page renders. */
328
+ noteId: string;
329
+ /** Id of the created note menu item (the sidebar entry). */
330
+ menuItemId: string;
331
+ /** Id of the created portal page node. */
332
+ pageId: string;
333
+ /** Id of the created content block. */
334
+ blockId: string;
335
+ /** URL path assigned to the page (e.g. "/onboarding"). */
336
+ url: string;
337
+ /** Draft branch the change was staged on. */
338
+ branchId: string;
339
+ /** Sequence numbers assigned to the staged change events (addPage, addMenuItem, addBlock). */
340
+ seqs: number[];
341
+ /**
342
+ * Always true: the page is staged in the portal's customizer draft, not yet
343
+ * live. The portal owner reviews and publishes it from the customizer.
344
+ */
345
+ staged: boolean;
346
+ }
206
347
  export interface AddPortalNoteBlockRequestContract {
207
348
  /** Id of the existing portal page node to add the note block to. */
208
349
  pageId: string;
@@ -391,6 +532,22 @@ export type PortalDatabaseBlockAppearanceContract = {
391
532
  /** Default: true. */
392
533
  showTitle?: boolean;
393
534
  };
535
+ /**
536
+ * Same Appearance section, with `background` optional. getPortalBlock reports no
537
+ * background for a block that keeps a portal theme role (the Customizer's own
538
+ * outcome right after picking "Custom"), so re-sending what it reported must be
539
+ * accepted and must keep the stored background.
540
+ */
541
+ export type PortalDatabaseBlockAppearancePatchContract = {
542
+ backdrop: "none" | "blank";
543
+ } | {
544
+ backdrop: "custom";
545
+ background?: PortalBackgroundContract;
546
+ /** Default: `m`. */
547
+ padding?: "none" | "s" | "m" | "l";
548
+ /** Default: true. */
549
+ showTitle?: boolean;
550
+ };
394
551
  /** Customizer Layout section of the Task list block. */
395
552
  export interface PortalTaskListBlockLayoutContract {
396
553
  /** Customizer Width. Default: 6. */
@@ -478,6 +635,22 @@ export type PortalFlexibleTextAppearanceContract = {
478
635
  /** Default: false. */
479
636
  showTitle?: boolean;
480
637
  };
638
+ /**
639
+ * Appearance as `getPortalBlock` reports it and the update operations accept
640
+ * it. `background` is absent when the block keeps the portal theme's surface
641
+ * colour — what the Customizer stores after picking "Custom" without a colour —
642
+ * and sending it back without one keeps whatever background the block has.
643
+ */
644
+ export type PortalFlexibleTextAppearancePatchContract = {
645
+ backdrop: "none" | "blank";
646
+ } | {
647
+ backdrop: "custom";
648
+ background?: PortalTextBackgroundContract;
649
+ /** Default: `s`. */
650
+ padding?: "none" | "s" | "m" | "l";
651
+ /** Default: false. */
652
+ showTitle?: boolean;
653
+ };
481
654
  /** Customizer Layout section shared by the three Text & Media operations. */
482
655
  export interface PortalTextAndMediaLayoutContract {
483
656
  /** Customizer Width. Default: 6. */
@@ -523,6 +696,21 @@ export interface AddPortalImageBlockRequestContract {
523
696
  /** Default: width 6 columns and automatic height. */
524
697
  layout?: PortalTextAndMediaLayoutContract;
525
698
  }
699
+ /**
700
+ * Partial update of a Heading or Simple text block. Every field is optional and
701
+ * an omitted one keeps its current value; at least one must be sent.
702
+ * `content` is a field-level patch — `appearance` is not, and must be a
703
+ * complete variant when sent.
704
+ */
705
+ export interface UpdatePortalTextBlockRequestContract {
706
+ content?: PortalTextContentContract;
707
+ appearance?: PortalFlexibleTextAppearancePatchContract;
708
+ layout?: PortalTextAndMediaLayoutContract;
709
+ }
710
+ /** The Image block's picture is the Customizer's built-in one, so only Layout is editable. */
711
+ export interface UpdatePortalImageBlockRequestContract {
712
+ layout?: PortalTextAndMediaLayoutContract;
713
+ }
526
714
  export interface PortalTextAndMediaBlockResponseContract {
527
715
  /** Id of the created block. */
528
716
  blockId: string;
@@ -573,6 +761,21 @@ export type PortalCardAppearanceContract = {
573
761
  /** Default: false. */
574
762
  showTitle?: boolean;
575
763
  };
764
+ /**
765
+ * Same Appearance section, with `background` optional. getPortalBlock reports no
766
+ * background for a Card that keeps a portal theme role, so re-sending what it
767
+ * reported must be accepted and must keep the stored background.
768
+ */
769
+ export type PortalCardAppearancePatchContract = {
770
+ backdrop: "none" | "blank";
771
+ } | {
772
+ backdrop: "custom";
773
+ background?: PortalCardBackgroundContract;
774
+ /** Default: `s`. */
775
+ padding?: "none" | "s" | "m" | "l";
776
+ /** Default: false. */
777
+ showTitle?: boolean;
778
+ };
576
779
  /** Customizer Layout section of a Card. */
577
780
  export interface PortalCardLayoutContract {
578
781
  /** Customizer Width. Default: 3. */
@@ -745,6 +948,15 @@ export interface PortalCarouselContentContract {
745
948
  */
746
949
  items?: PortalCarouselItemContract[];
747
950
  }
951
+ /** Carousel content accepted by update: items is always the full desired list. */
952
+ export interface PortalCarouselUpdateContentContract {
953
+ /**
954
+ * Full desired slide list in visual order.
955
+ * @minItems 1
956
+ * @maxItems 6
957
+ */
958
+ items: PortalCarouselItemContract[];
959
+ }
748
960
  export interface AddPortalCarouselBlockRequestContract {
749
961
  content?: PortalCarouselContentContract;
750
962
  /** Default: width 6 columns and automatic height. */
@@ -776,6 +988,17 @@ export type PortalCountdownAppearanceContract = {
776
988
  /** Default: true. */
777
989
  showTitle?: boolean;
778
990
  };
991
+ /** Countdown Appearance accepted by update; a stored portal-theme background may be omitted. */
992
+ export type PortalCountdownAppearancePatchContract = {
993
+ backdrop: "none" | "blank";
994
+ } | {
995
+ backdrop: "custom";
996
+ background?: PortalCardBackgroundContract;
997
+ /** Default: `s`. */
998
+ padding?: "none" | "s" | "m" | "l";
999
+ /** Default: true. */
1000
+ showTitle?: boolean;
1001
+ };
779
1002
  /** Customizer Layout section of a Countdown. */
780
1003
  export interface PortalCountdownLayoutContract {
781
1004
  /** Customizer Width. Default: 6. */
@@ -798,6 +1021,15 @@ export interface PortalCountdownContentContract {
798
1021
  */
799
1022
  targetAt?: string;
800
1023
  }
1024
+ /** Countdown content accepted by update; the target is required when content is sent. */
1025
+ export interface PortalCountdownUpdateContentContract {
1026
+ /**
1027
+ * Absolute RFC 3339 date-time with `Z` or an explicit UTC offset.
1028
+ * It must not be in the past or more than 99 days from the update.
1029
+ * @format date-time
1030
+ */
1031
+ targetAt: string;
1032
+ }
801
1033
  export interface AddPortalCountdownBlockRequestContract {
802
1034
  /**
803
1035
  * Block title shown above the countdown. Plain text; only `{{ClientName}}`
@@ -834,6 +1066,15 @@ export interface PortalBpmnDiagramContentContract {
834
1066
  */
835
1067
  diagramHeight?: number;
836
1068
  }
1069
+ /** BPMN content accepted by update; the canvas height is required when content is sent. */
1070
+ export interface PortalBpmnDiagramUpdateContentContract {
1071
+ /**
1072
+ * BPMN canvas height inside the block, separate from layout.height.
1073
+ * @minimum 150
1074
+ * @maximum 5000
1075
+ */
1076
+ diagramHeight: number;
1077
+ }
837
1078
  /**
838
1079
  * Customizer Appearance section of a BPMN Diagram. Omitting `appearance` keeps
839
1080
  * the factory `blank` wrapper with the block title shown.
@@ -848,6 +1089,17 @@ export type PortalBpmnDiagramAppearanceContract = {
848
1089
  /** Default: true. */
849
1090
  showTitle?: boolean;
850
1091
  };
1092
+ /** BPMN Appearance accepted by update; a stored portal-theme background may be omitted. */
1093
+ export type PortalBpmnDiagramAppearancePatchContract = {
1094
+ backdrop: "none" | "blank";
1095
+ } | {
1096
+ backdrop: "custom";
1097
+ background?: PortalCardBackgroundContract;
1098
+ /** Default: `s`. */
1099
+ padding?: "none" | "s" | "m" | "l";
1100
+ /** Default: true. */
1101
+ showTitle?: boolean;
1102
+ };
851
1103
  /** Customizer Layout section of a BPMN Diagram. */
852
1104
  export interface PortalBpmnDiagramLayoutContract {
853
1105
  /** Customizer Width. Default: 6. */
@@ -898,6 +1150,17 @@ export type PortalDynamicTableAppearanceContract = {
898
1150
  /** Default: true. */
899
1151
  showTitle?: boolean;
900
1152
  };
1153
+ /** Dynamic Table Appearance accepted by update; a stored theme background may be omitted. */
1154
+ export type PortalDynamicTableAppearancePatchContract = {
1155
+ backdrop: "none" | "blank";
1156
+ } | {
1157
+ backdrop: "custom";
1158
+ background?: PortalCardBackgroundContract;
1159
+ /** Default: `s`. */
1160
+ padding?: "none" | "s" | "m" | "l";
1161
+ /** Default: true. */
1162
+ showTitle?: boolean;
1163
+ };
901
1164
  /** Customizer Layout section of a Dynamic Table. */
902
1165
  export interface PortalDynamicTableLayoutContract {
903
1166
  /** Customizer Width. Default: 6. */
@@ -987,17 +1250,418 @@ export interface AddPortalRecentFilesBlockResponseContract {
987
1250
  export interface PortalLinkableBlockContract {
988
1251
  /** Exact id to send as `source.blockId`. Never invent one. */
989
1252
  blockId: string;
990
- /** Canonical portal block type, e.g. `flexible`. */
991
- type: string;
992
- /** Flexible template behind the block (e.g. `info-card`); null for other types. */
993
- templateType: string | null;
994
- /** Block title as shown in the customizer. */
995
- title: string;
996
- /**
997
- * The block exists only in this portal's customizer draft. Such a block can
998
- * be linked only from a page in the SAME portal.
999
- */
1000
- draftOnly: boolean;
1253
+ /** Canonical portal block type, e.g. `flexible`. */
1254
+ type: string;
1255
+ /** Flexible template behind the block (e.g. `info-card`); null for other types. */
1256
+ templateType: string | null;
1257
+ /** Block title as shown in the customizer. */
1258
+ title: string;
1259
+ /**
1260
+ * The block exists only in this portal's customizer draft. Such a block can
1261
+ * be linked only from a page in the SAME portal.
1262
+ */
1263
+ draftOnly: boolean;
1264
+ }
1265
+ /** One block of a portal page, as returned by listPortalPageBlocks. */
1266
+ export interface PortalPageBlockContract {
1267
+ /** Exact block id. Pass this to a move, delete or update operation. */
1268
+ blockId: string;
1269
+ /** Canonical portal block type (e.g. `flexible`). */
1270
+ type: string;
1271
+ /** Flexible template behind the block (e.g. `info-card`); null for other types. */
1272
+ templateType: string | null;
1273
+ /** Block title as shown in the customizer. */
1274
+ title: string;
1275
+ /**
1276
+ * Typed updatePortal*Block operation that edits this block, or null when its
1277
+ * kind has no typed update operation yet.
1278
+ */
1279
+ editOperation: string | null;
1280
+ /**
1281
+ * Page area holding the block (e.g. `page_header`, `page_body`). A move anchor
1282
+ * must be in the same area.
1283
+ */
1284
+ place: string;
1285
+ /** The block exists only in this portal's customizer draft. */
1286
+ draftOnly: boolean;
1287
+ }
1288
+ export interface ListPortalPageBlocksResponseContract {
1289
+ /** Every block of the page in display order: page area first, then position. */
1290
+ blocks: PortalPageBlockContract[];
1291
+ }
1292
+ /**
1293
+ * A block's public settings, discriminated by `kind`. One member per block
1294
+ * family, added as that family's typed update operation lands.
1295
+ */
1296
+ export interface PortalNoteBlockSettingsContract {
1297
+ kind: "note";
1298
+ /** Fusebase note behind the block. Identity — it cannot be changed. */
1299
+ noteId: string;
1300
+ /** Workspace holding the note. Identity — it cannot be changed. */
1301
+ workspaceId: string;
1302
+ }
1303
+ /**
1304
+ * Current Text & Media settings. `content` is what a partial content patch is
1305
+ * merged over, and `appearance` is the complete variant to re-send when only
1306
+ * one of its fields should change.
1307
+ */
1308
+ export interface PortalTextBlockSettingsContract {
1309
+ kind: "heading" | "text";
1310
+ content: PortalTextContentContract;
1311
+ appearance: PortalFlexibleTextAppearancePatchContract;
1312
+ }
1313
+ /** The Image block has no settings of its own — only the shared `layout`. */
1314
+ export interface PortalImageBlockSettingsContract {
1315
+ kind: "image";
1316
+ }
1317
+ /**
1318
+ * Current Embed settings. The source is `embedType` plus exactly one of `url`
1319
+ * (named variants) or `content` (`custom`), which is the complete variant to
1320
+ * re-send when changing it.
1321
+ */
1322
+ export interface PortalEmbedBlockSettingsContract {
1323
+ kind: "embed";
1324
+ /** Customizer Embed variant. A legacy block may report `unknown`, which no update accepts. */
1325
+ embedType: string;
1326
+ /** The embedded URL, exactly as stored. Absent for `custom`. */
1327
+ url?: string;
1328
+ /** The caller's own embed code. Absent for named variants. */
1329
+ content?: string;
1330
+ /** Whether the "open in new tab" link is shown on the block. */
1331
+ showEmbedLink: boolean;
1332
+ }
1333
+ /**
1334
+ * Current Database settings. `databaseId` is absent on purpose: the Customizer
1335
+ * never stores it — it only proves at pick time that the dashboard belongs to
1336
+ * that database — so a `target` change takes its ids from
1337
+ * listPortalDatabaseBlockSources, not from this read.
1338
+ */
1339
+ export interface PortalDatabaseBlockSettingsContract {
1340
+ kind: "database";
1341
+ /** Dashboard (Customizer label: Table) the block renders. */
1342
+ dashboardId: string;
1343
+ /** View of that dashboard. */
1344
+ viewId: string;
1345
+ /** Rows shown per page. */
1346
+ itemsPerPage: number;
1347
+ /** The complete variant to re-send when only one of its fields should change. */
1348
+ appearance: PortalDatabaseBlockAppearancePatchContract;
1349
+ }
1350
+ /**
1351
+ * Current Card settings. Every member is shaped so the read can be sent straight
1352
+ * back to updatePortalCardBlock: a hidden item reports only `visible: false`, and
1353
+ * `appearance` is absent for the Card's own `bare` wrapper, which no `backdrop`
1354
+ * value can ask for.
1355
+ */
1356
+ export interface PortalCardBlockSettingsContract {
1357
+ kind: "card";
1358
+ /** Absent for a legacy template view outside the four supported ones. */
1359
+ view?: PortalCardViewContract;
1360
+ content: {
1361
+ image: {
1362
+ visible: boolean;
1363
+ };
1364
+ heading: PortalCardHeadingContract;
1365
+ description: PortalCardDescriptionContract;
1366
+ button: PortalCardButtonContract;
1367
+ /**
1368
+ * `null` is a Card with no link at all. Absent means the stored link is one
1369
+ * the contract cannot express, so re-sending it would change the block.
1370
+ */
1371
+ destination?: PortalCardDestinationContract | null;
1372
+ };
1373
+ /** The complete variant to re-send when only one of its fields should change. */
1374
+ appearance?: PortalCardAppearancePatchContract;
1375
+ }
1376
+ /** Current Carousel settings, shaped for a full-list update round trip. */
1377
+ export interface PortalCarouselBlockSettingsContract {
1378
+ kind: "carousel";
1379
+ content: PortalCarouselUpdateContentContract;
1380
+ }
1381
+ /** Current Countdown settings, with the internal epoch exposed as RFC 3339. */
1382
+ export interface PortalCountdownBlockSettingsContract {
1383
+ kind: "countdown";
1384
+ content: PortalCountdownUpdateContentContract;
1385
+ /** Absent only for a legacy wrapper the public Appearance contract cannot express. */
1386
+ appearance?: PortalCountdownAppearancePatchContract;
1387
+ }
1388
+ /** Current BPMN Diagram settings; BPMN XML and process data remain internal. */
1389
+ export interface PortalBpmnDiagramBlockSettingsContract {
1390
+ kind: "bpmnDiagram";
1391
+ content: PortalBpmnDiagramUpdateContentContract;
1392
+ /** Absent only for a legacy wrapper the public Appearance contract cannot express. */
1393
+ appearance?: PortalBpmnDiagramAppearancePatchContract;
1394
+ }
1395
+ /** Current Dynamic Table settings; provider, OAuth, source, columns and rows stay internal. */
1396
+ export interface PortalDynamicTableBlockSettingsContract {
1397
+ kind: "dynamicTable";
1398
+ /** Absent only for a legacy wrapper the public Appearance contract cannot express. */
1399
+ appearance?: PortalDynamicTableAppearancePatchContract;
1400
+ }
1401
+ /** Current Recent files source; sort, limit and raw query data stay internal. */
1402
+ export interface PortalRecentFilesBlockSettingsContract {
1403
+ kind: "recentFiles";
1404
+ source: PortalRecentFilesSourceContract;
1405
+ }
1406
+ /** Current exact source of a Linked block. */
1407
+ export interface PortalLinkedBlockSettingsContract {
1408
+ kind: "linked";
1409
+ source: PortalLinkedBlockSourceContract;
1410
+ }
1411
+ export interface PortalFormBlockSettingsContract {
1412
+ kind: "form";
1413
+ content: PortalFormUpdateContentContract;
1414
+ appearance?: PortalFormAppearancePatchContract;
1415
+ }
1416
+ export interface PortalCardGroupBlockSettingsContract {
1417
+ kind: "cardGroup";
1418
+ content: PortalCardGroupUpdateContentContract;
1419
+ appearance?: PortalCardGroupAppearancePatchContract;
1420
+ }
1421
+ export interface PortalInfoBlockSettingsContract {
1422
+ kind: "info";
1423
+ image: PortalInfoImageContract;
1424
+ destination: PortalInfoDestinationContract;
1425
+ openInNewTab: boolean;
1426
+ }
1427
+ export interface PortalCustomWidgetBlockSettingsContract {
1428
+ kind: "customWidget";
1429
+ content: PortalCustomWidgetContentContract;
1430
+ appearance?: PortalCustomWidgetAppearancePatchContract;
1431
+ }
1432
+ export interface PortalHtmlCssBlockSettingsContract {
1433
+ kind: "htmlCss";
1434
+ content: PortalHtmlCssBlockContentContract;
1435
+ }
1436
+ export interface PortalTimelineBlockSettingsContract {
1437
+ kind: "timeline";
1438
+ view: PortalTimelineViewContract;
1439
+ content: PortalTimelineContentContract;
1440
+ appearance?: PortalTimelineAppearancePatchContract;
1441
+ }
1442
+ export interface PortalFileUploaderBlockSettingsContract {
1443
+ kind: "fileUploader";
1444
+ description: string;
1445
+ showAuthor: boolean;
1446
+ showUploadDate: boolean;
1447
+ }
1448
+ export interface PortalChatBlockSettingsContract {
1449
+ kind: "chat";
1450
+ target: PortalChatBlockTarget;
1451
+ /** Present only for channel targets. */
1452
+ membersOnly?: boolean;
1453
+ }
1454
+ export interface PortalAppBlockSettingsContract {
1455
+ kind: "app";
1456
+ productId: string;
1457
+ appId: string;
1458
+ productType: "private" | "managed";
1459
+ productOrgId: string;
1460
+ }
1461
+ export interface PortalAiAgentBlockSettingsContract {
1462
+ kind: "aiAgent";
1463
+ agentId: string;
1464
+ }
1465
+ /** Current code returned for an existing HTML/CSS block; all fields are explicit. */
1466
+ export interface PortalHtmlCssBlockContentContract {
1467
+ html: string;
1468
+ style: string;
1469
+ script: string;
1470
+ }
1471
+ /** A block's public settings, discriminated by `kind`. */
1472
+ export type PortalBlockSettingsContract = PortalNoteBlockSettingsContract | PortalTextBlockSettingsContract | PortalImageBlockSettingsContract | PortalEmbedBlockSettingsContract | PortalDatabaseBlockSettingsContract | PortalCardBlockSettingsContract | PortalCarouselBlockSettingsContract | PortalCountdownBlockSettingsContract | PortalBpmnDiagramBlockSettingsContract | PortalDynamicTableBlockSettingsContract | PortalRecentFilesBlockSettingsContract | PortalLinkedBlockSettingsContract | PortalFormBlockSettingsContract | PortalCardGroupBlockSettingsContract | PortalInfoBlockSettingsContract | PortalCustomWidgetBlockSettingsContract | PortalHtmlCssBlockSettingsContract | PortalTimelineBlockSettingsContract | PortalFileUploaderBlockSettingsContract | PortalChatBlockSettingsContract | PortalAppBlockSettingsContract | PortalAiAgentBlockSettingsContract;
1473
+ /** Presentation of a block on its page. */
1474
+ export interface PortalBlockLayoutContract {
1475
+ /** Block width in page columns. */
1476
+ colspan: number;
1477
+ /** Block height in page rows. */
1478
+ rowspan: number;
1479
+ /** Fixed pixel height, or null for the automatic height. */
1480
+ height: number | null;
1481
+ }
1482
+ /** One block's semantic kind and current public settings, as returned by getPortalBlock. */
1483
+ export interface GetPortalBlockResponseContract {
1484
+ /** Exact block id. */
1485
+ blockId: string;
1486
+ /**
1487
+ * Semantic kind of the block (e.g. `note`, `card`, `form`) — the vocabulary
1488
+ * the typed update operations use. Null for a block the block API does not
1489
+ * model, such as a portal's system content block.
1490
+ */
1491
+ kind: string | null;
1492
+ /** Canonical portal block type (e.g. `flexible`). */
1493
+ type: string;
1494
+ /** Flexible template behind the block (e.g. `info-card`); null for other types. */
1495
+ templateType: string | null;
1496
+ /** Block title as shown in the customizer. */
1497
+ title: string;
1498
+ /** Page area holding the block (e.g. `page_header`, `page_body`). */
1499
+ place: string;
1500
+ /** The block exists only in this portal's customizer draft. */
1501
+ draftOnly: boolean;
1502
+ /**
1503
+ * Typed updatePortal*Block operation that edits this block, or null when its
1504
+ * kind has no typed update operation yet.
1505
+ */
1506
+ editOperation: string | null;
1507
+ layout: PortalBlockLayoutContract;
1508
+ /**
1509
+ * Editable settings specific to the block's kind, or null when its kind has
1510
+ * no typed update operation yet.
1511
+ */
1512
+ settings: PortalBlockSettingsContract | null;
1513
+ }
1514
+ /** Layout fields a note-backed block accepts. Omitted fields keep their current value. */
1515
+ export interface UpdatePortalNoteBlockLayoutContract {
1516
+ /** Block width in page columns: 3, 4, 5 or 6. */
1517
+ colspan?: number;
1518
+ /** Fixed pixel height (at least 50), or null for the automatic height. */
1519
+ height?: number | null;
1520
+ }
1521
+ /**
1522
+ * Partial update of a note-backed block. Every field is optional and an omitted
1523
+ * one keeps its current value; at least one must be sent.
1524
+ */
1525
+ export interface UpdatePortalNoteBlockRequestContract {
1526
+ /** New block title as shown on the page. */
1527
+ title?: string;
1528
+ layout?: UpdatePortalNoteBlockLayoutContract;
1529
+ }
1530
+ /**
1531
+ * Partial update of an Embed block. Every field is optional and an omitted one
1532
+ * keeps its current value; at least one must be sent.
1533
+ *
1534
+ * `title`, `showEmbedLink` and the layout are field-level patches. The source is
1535
+ * NOT: `embedType` with exactly one of `url` or `content` is a complete variant,
1536
+ * so changing the type requires sending the matching source in the same request.
1537
+ */
1538
+ export interface UpdatePortalEmbedBlockRequestContract {
1539
+ /** New block title as shown on the page. */
1540
+ title?: string;
1541
+ /** Customizer Embed variant. `unknown` is not accepted. */
1542
+ embedType?: PortalEmbedType;
1543
+ /** For named variants, forbidden for `custom`: the URL to embed. */
1544
+ url?: string;
1545
+ /** For `custom`, forbidden for named variants: the embed code/URL. */
1546
+ content?: string;
1547
+ /** Whether to show the "open in new tab" link on the block. */
1548
+ showEmbedLink?: boolean;
1549
+ /** Block width in grid columns. */
1550
+ colspan?: 2 | 3 | 4 | 5 | 6;
1551
+ /** Block height in grid rows. */
1552
+ rowspan?: 1 | 2 | 3 | 4;
1553
+ /** Fixed pixel height, or null for the automatic height. */
1554
+ height?: number | null;
1555
+ }
1556
+ /**
1557
+ * Partial update of a Database block. Every field is optional and an omitted one
1558
+ * keeps its current value; at least one must be sent.
1559
+ *
1560
+ * `title`, `itemsPerPage` and the layout are field-level patches. `target` and
1561
+ * `appearance` are NOT: each is a complete variant when sent.
1562
+ */
1563
+ export interface UpdatePortalDatabaseBlockRequestContract {
1564
+ /** Exact ids from listPortalDatabaseBlockSources; names and aliases are rejected. */
1565
+ target?: PortalDatabaseBlockTargetContract;
1566
+ /** New block title as shown on the page. */
1567
+ title?: string;
1568
+ /** Rows shown per page. */
1569
+ itemsPerPage?: 10 | 20 | 50 | 100 | 200 | 500;
1570
+ /** Visual wrapper of the portal block. */
1571
+ appearance?: PortalDatabaseBlockAppearancePatchContract;
1572
+ /** Grid placement. */
1573
+ layout?: PortalDatabaseBlockLayoutContract;
1574
+ }
1575
+ /**
1576
+ * Partial update of a Card block. Every field is optional and an omitted one
1577
+ * keeps its current value; at least one must be sent.
1578
+ *
1579
+ * `content` patches item by item, but each ITEM is a complete variant: a heading
1580
+ * sent with only `size` keeps its stored text, bold and alignment, while a
1581
+ * heading sent as `{ visible: false }` may carry nothing else. `appearance` is a
1582
+ * complete variant too.
1583
+ */
1584
+ export interface UpdatePortalCardBlockRequestContract {
1585
+ /** Card Type. Changing it repaints the text colours, as the Customizer does. */
1586
+ view?: PortalCardViewContract;
1587
+ content?: PortalCardContentContract;
1588
+ /** Visual wrapper of the portal block. */
1589
+ appearance?: PortalCardAppearancePatchContract;
1590
+ /** Grid placement. */
1591
+ layout?: PortalCardLayoutContract;
1592
+ }
1593
+ /**
1594
+ * Partial update of a Carousel block. `content.items`, when sent, is the full
1595
+ * desired list; layout fields remain field-level patches.
1596
+ */
1597
+ export interface UpdatePortalCarouselBlockRequestContract {
1598
+ content?: PortalCarouselUpdateContentContract;
1599
+ layout?: PortalCarouselLayoutContract;
1600
+ }
1601
+ /** Partial update of a Countdown block; omitted fields keep their current value. */
1602
+ export interface UpdatePortalCountdownBlockRequestContract {
1603
+ /** Plain text; only `{{ClientName}}` and `{{ClientLastName}}` are variables. */
1604
+ title?: string;
1605
+ content?: PortalCountdownUpdateContentContract;
1606
+ /** Complete Appearance variant when sent. */
1607
+ appearance?: PortalCountdownAppearancePatchContract;
1608
+ layout?: PortalCountdownLayoutContract;
1609
+ }
1610
+ /** Partial update of a BPMN Diagram block; BPMN XML and process data are not accepted. */
1611
+ export interface UpdatePortalBpmnDiagramBlockRequestContract {
1612
+ /** Plain text; only `{{ClientName}}` and `{{ClientLastName}}` are variables. */
1613
+ title?: string;
1614
+ content?: PortalBpmnDiagramUpdateContentContract;
1615
+ /** Complete Appearance variant when sent. */
1616
+ appearance?: PortalBpmnDiagramAppearancePatchContract;
1617
+ /** Outer block layout; layout.height is separate from content.diagramHeight. */
1618
+ layout?: PortalBpmnDiagramLayoutContract;
1619
+ }
1620
+ /** Partial update of a Dynamic Table shell; provider and table data are not accepted. */
1621
+ export interface UpdatePortalDynamicTableBlockRequestContract {
1622
+ /** Plain text; only `{{ClientName}}` and `{{ClientLastName}}` are variables. */
1623
+ title?: string;
1624
+ /** Complete Appearance variant when sent. */
1625
+ appearance?: PortalDynamicTableAppearancePatchContract;
1626
+ layout?: PortalDynamicTableLayoutContract;
1627
+ }
1628
+ /** Partial update of a Recent files block; file query policy is not accepted. */
1629
+ export interface UpdatePortalRecentFilesBlockRequestContract {
1630
+ /** Plain text block title. */
1631
+ title?: string;
1632
+ /** Entire portal, or one exact page in the same portal. */
1633
+ source?: PortalRecentFilesSourceContract;
1634
+ layout?: PortalRecentFilesLayoutContract;
1635
+ }
1636
+ /** Changes the exact source of a Linked block; presentation is mirrored. */
1637
+ export interface UpdatePortalLinkedBlockRequestContract {
1638
+ source: PortalLinkedBlockSourceContract;
1639
+ }
1640
+ /**
1641
+ * Where the block must end up on its page. Exactly one of these keys is sent.
1642
+ * A raw index is deliberately not accepted — it means something else as soon as
1643
+ * another block is added or moved.
1644
+ */
1645
+ export interface MovePortalBlockRequestContract {
1646
+ /** `first` or `last` on the page. Mutually exclusive with the anchors. */
1647
+ position?: "first" | "last";
1648
+ /** Move the block immediately before this same-page anchor block. */
1649
+ beforeBlockId?: string;
1650
+ /** Move the block immediately after this same-page anchor block. */
1651
+ afterBlockId?: string;
1652
+ }
1653
+ /** Result shared by every staged portal block change. */
1654
+ export interface StagedPortalBlockResponseContract {
1655
+ /** Id of the affected block. */
1656
+ blockId: string;
1657
+ /** Id of the page holding the block. */
1658
+ pageId: string;
1659
+ /** Customizer draft branch the change was staged in. */
1660
+ branchId: string;
1661
+ /** Draft sequence numbers of the staged events. */
1662
+ seqs: number[];
1663
+ /** Always true: the change is staged in the draft and not published. */
1664
+ staged: true;
1001
1665
  }
1002
1666
  export interface ListPortalLinkableBlocksResponseContract {
1003
1667
  /** Blocks of the page in display order; Linked blocks are excluded. */
@@ -1041,6 +1705,14 @@ export type PortalFormAppearanceContract = {
1041
1705
  /** Default: true. */
1042
1706
  showTitle?: boolean;
1043
1707
  };
1708
+ export type PortalFormAppearancePatchContract = {
1709
+ backdrop: "none" | "blank";
1710
+ } | {
1711
+ backdrop: "custom";
1712
+ background?: PortalCardBackgroundContract;
1713
+ padding?: "none" | "s" | "m" | "l";
1714
+ showTitle?: boolean;
1715
+ };
1044
1716
  /** Customizer Layout section of a Form. */
1045
1717
  export interface PortalFormLayoutContract {
1046
1718
  /** Customizer Width. Default: 6. */
@@ -1136,6 +1808,29 @@ export interface PortalFormBlockContentContract {
1136
1808
  description?: PortalFormDescriptionContract;
1137
1809
  form?: PortalFormContentBrickContract;
1138
1810
  }
1811
+ export interface PortalFormUpdateFieldContract extends PortalFormFieldContract {
1812
+ /** Preserve this exact id for an existing field; omit only for a new field. */
1813
+ fieldId?: string;
1814
+ }
1815
+ export type PortalFormUpdateContentBrickContract = {
1816
+ visible: false;
1817
+ } | {
1818
+ visible?: true;
1819
+ /** Full desired field list in visual order. */
1820
+ fields?: PortalFormUpdateFieldContract[];
1821
+ submit?: PortalFormSubmitContract;
1822
+ reusable?: boolean;
1823
+ };
1824
+ export interface PortalFormUpdateContentContract {
1825
+ description?: PortalFormDescriptionContract;
1826
+ form?: PortalFormUpdateContentBrickContract;
1827
+ }
1828
+ export interface UpdatePortalFormBlockRequestContract {
1829
+ title?: string;
1830
+ content?: PortalFormUpdateContentContract;
1831
+ appearance?: PortalFormAppearancePatchContract;
1832
+ layout?: PortalFormLayoutContract;
1833
+ }
1139
1834
  export interface AddPortalFormBlockRequestContract {
1140
1835
  /**
1141
1836
  * Block title shown above the form. Plain text; only `{{ClientName}}` and
@@ -1206,6 +1901,26 @@ export type PortalCardGroupAppearanceContract = {
1206
1901
  /** Default: true. */
1207
1902
  showTitle?: boolean;
1208
1903
  };
1904
+ /** Update/read variant: a stored custom wrapper may still use the portal theme background. */
1905
+ export type PortalCardGroupAppearancePatchContract = {
1906
+ backdrop: "none" | "blank";
1907
+ } | {
1908
+ backdrop: "custom";
1909
+ background?: PortalCardBackgroundContract;
1910
+ padding?: "none" | "s" | "m" | "l";
1911
+ showTitle?: boolean;
1912
+ };
1913
+ export interface PortalCardGroupUpdateContentContract {
1914
+ description?: PortalCardDescriptionContract;
1915
+ /** Full desired card list in visual order. */
1916
+ items?: PortalCardGroupItemContract[];
1917
+ }
1918
+ export interface UpdatePortalCardGroupBlockRequestContract {
1919
+ title?: string;
1920
+ content?: PortalCardGroupUpdateContentContract;
1921
+ appearance?: PortalCardGroupAppearancePatchContract;
1922
+ layout?: PortalCardGroupLayoutContract;
1923
+ }
1209
1924
  export interface AddPortalCardGroupBlockRequestContract {
1210
1925
  /**
1211
1926
  * Wrapper title, shown above the cards. Default: "Card group".
@@ -1320,6 +2035,16 @@ export interface AddPortalInfoBlockRequestContract {
1320
2035
  /** Default: width 1 column, one row and automatic height. */
1321
2036
  layout?: PortalInfoLayoutContract;
1322
2037
  }
2038
+ export interface UpdatePortalInfoBlockRequestContract {
2039
+ /** New tile text. Omitted preserves the current title. */
2040
+ title?: string;
2041
+ /** Complete semantic image variant. */
2042
+ image?: PortalInfoImageContract;
2043
+ /** Complete semantic destination variant. */
2044
+ destination?: PortalInfoDestinationContract;
2045
+ openInNewTab?: boolean;
2046
+ layout?: PortalInfoLayoutContract;
2047
+ }
1323
2048
  export interface AddPortalInfoBlockResponseContract {
1324
2049
  /** Id of the created block. */
1325
2050
  blockId: string;
@@ -1457,6 +2182,21 @@ export type PortalCustomWidgetAppearanceContract = {
1457
2182
  /** Default: true. */
1458
2183
  showTitle?: boolean;
1459
2184
  };
2185
+ /** Update/read variant for a stored custom wrapper still using the portal theme background. */
2186
+ export type PortalCustomWidgetAppearancePatchContract = {
2187
+ backdrop: "none" | "blank";
2188
+ } | {
2189
+ backdrop: "custom";
2190
+ background?: PortalCardBackgroundContract;
2191
+ padding?: "none" | "s" | "m" | "l";
2192
+ showTitle?: boolean;
2193
+ };
2194
+ export interface UpdatePortalCustomWidgetBlockRequestContract {
2195
+ title?: string;
2196
+ content?: PortalCustomWidgetContentContract;
2197
+ appearance?: PortalCustomWidgetAppearancePatchContract;
2198
+ layout?: PortalCustomWidgetLayoutContract;
2199
+ }
1460
2200
  /** Customizer Layout section of a Custom widget. */
1461
2201
  export interface PortalCustomWidgetLayoutContract {
1462
2202
  /** Customizer Width. Default: 2. */
@@ -1528,6 +2268,13 @@ export interface PortalHtmlCssLayoutContract {
1528
2268
  */
1529
2269
  height?: number | null;
1530
2270
  }
2271
+ export interface UpdatePortalHtmlCssBlockRequestContract {
2272
+ /** Existing block title; omitted means unchanged. */
2273
+ title?: string;
2274
+ /** Partial code patch; omitted fields remain unchanged and an empty string clears one. */
2275
+ content?: PortalHtmlCssContentContract;
2276
+ layout?: PortalHtmlCssLayoutContract;
2277
+ }
1531
2278
  export interface AddPortalHtmlCssBlockRequestContract {
1532
2279
  /**
1533
2280
  * Block title. The block's wrapper hides it BY DEFAULT, so it normally only
@@ -1649,6 +2396,15 @@ export type PortalTimelineAppearanceContract = {
1649
2396
  /** Default: true. */
1650
2397
  showTitle?: boolean;
1651
2398
  };
2399
+ /** Update/read variant for a custom wrapper still using the portal theme background. */
2400
+ export type PortalTimelineAppearancePatchContract = {
2401
+ backdrop: "none" | "blank";
2402
+ } | {
2403
+ backdrop: "custom";
2404
+ background?: PortalCardBackgroundContract;
2405
+ padding?: "none" | "s" | "m" | "l";
2406
+ showTitle?: boolean;
2407
+ };
1652
2408
  /** Customizer Layout section of a Timeline. */
1653
2409
  export interface PortalTimelineLayoutContract {
1654
2410
  /** Customizer Width. Default: 6. */
@@ -1659,6 +2415,13 @@ export interface PortalTimelineLayoutContract {
1659
2415
  */
1660
2416
  height?: number | null;
1661
2417
  }
2418
+ export interface UpdatePortalTimelineBlockRequestContract {
2419
+ view?: PortalTimelineViewContract;
2420
+ title?: string;
2421
+ content?: PortalTimelineContentContract;
2422
+ appearance?: PortalTimelineAppearancePatchContract;
2423
+ layout?: PortalTimelineLayoutContract;
2424
+ }
1662
2425
  export interface AddPortalTimelineBlockRequestContract {
1663
2426
  /** Timeline view. Default: `horizontal`. */
1664
2427
  view?: PortalTimelineViewContract;
@@ -1697,6 +2460,14 @@ export interface PortalFileUploaderLayoutContract {
1697
2460
  */
1698
2461
  height?: number | null;
1699
2462
  }
2463
+ export interface UpdatePortalFileUploaderBlockRequestContract {
2464
+ title?: string;
2465
+ /** @maxLength 50 */
2466
+ description?: string;
2467
+ showAuthor?: boolean;
2468
+ showUploadDate?: boolean;
2469
+ layout?: PortalFileUploaderLayoutContract;
2470
+ }
1700
2471
  export interface AddPortalFileUploaderBlockRequestContract {
1701
2472
  /**
1702
2473
  * Block title rendered above the file list. Plain text — the screen has no
@@ -1812,6 +2583,26 @@ export interface AddPortalChatBlockRequestContract {
1812
2583
  /** Fixed pixel height, or null to auto-size. Default: null. */
1813
2584
  height?: number | null;
1814
2585
  }
2586
+ /** Partial Chat widget update; omitted fields retain their stored values. */
2587
+ export interface UpdatePortalChatBlockRequestContract {
2588
+ /**
2589
+ * Non-empty title, up to 200 characters.
2590
+ * @minLength 1
2591
+ * @maxLength 200
2592
+ */
2593
+ title?: string;
2594
+ /** Complete channel or DM target using an exact discovery id. */
2595
+ target?: PortalChatBlockTarget;
2596
+ /** Channel-only; private channels require true. */
2597
+ membersOnly?: boolean;
2598
+ colspan?: 3 | 4 | 5 | 6;
2599
+ rowspan?: 1 | 2 | 3 | 4;
2600
+ /**
2601
+ * Fixed positive pixel height, or null for automatic height.
2602
+ * @minimum 1
2603
+ */
2604
+ height?: number | null;
2605
+ }
1815
2606
  export interface AddPortalChatBlockResponseContract {
1816
2607
  /** Id of the created chat block. */
1817
2608
  blockId: string;
@@ -1862,54 +2653,6 @@ export interface ListPortalChatUsersResponseContract {
1862
2653
  /** Opaque cursor for the next page; absent when there are no more results. */
1863
2654
  nextCursor?: string;
1864
2655
  }
1865
- /**
1866
- * Block types the portal-service draft reducer (`blockFromDto`) understands.
1867
- * Any other value is rejected with 400 (the reducer throws on unknown types,
1868
- * which would otherwise fail the whole draft at publish time).
1869
- */
1870
- export type PortalBlockType = "note" | "content" | "docs" | "help" | "request" | "meetings" | "links" | "files-dashboard" | "tasks-dashboard" | "chats-dashboard" | "flexible";
1871
- export interface AddPortalBlockRequestContract {
1872
- /** Id of the existing portal page node to add the block to. */
1873
- pageId: string;
1874
- /** Block type to stage (see the op description for per-type fields). */
1875
- type: PortalBlockType;
1876
- /** Optional block title (defaults to the page's current title). */
1877
- title?: string;
1878
- /** Required for `note`/`content` blocks: the Fusebase note to embed. */
1879
- noteId?: string;
1880
- /** Required for `flexible` blocks: the flexible template, e.g. `{type:"text"}`. */
1881
- template?: {
1882
- type: string;
1883
- view?: string;
1884
- };
1885
- /** Optional bricks for `flexible` blocks. */
1886
- bricks?: unknown[];
1887
- /**
1888
- * Optional type-specific fields for the staged block, e.g. flat strings
1889
- * `image`/`link` for docs/help/request/meetings/links,
1890
- * `sourcePortalId`/`sourcePageId`/`sourceBlockId` for projection.
1891
- * Also overrides scaffold defaults (colspan,
1892
- * rowspan, …) when provided. Every field is validated against the block's
1893
- * real customizer shape — an unknown field or a wrong-typed value (e.g. an
1894
- * object where a flat string is expected) is rejected with 400.
1895
- */
1896
- properties?: Record<string, unknown>;
1897
- }
1898
- export interface AddPortalBlockResponseContract {
1899
- /** Id of the created block. */
1900
- blockId: string;
1901
- /** Id of the page the block was added to. */
1902
- pageId: string;
1903
- /** Draft branch the change was staged on. */
1904
- branchId: string;
1905
- /** Sequence numbers assigned to the staged change events (addBlock). */
1906
- seqs: number[];
1907
- /**
1908
- * Always true: the block is staged in the portal's customizer draft, not yet
1909
- * live. The portal owner reviews and publishes it from the customizer.
1910
- */
1911
- staged: boolean;
1912
- }
1913
2656
  export interface AddPortalAppPageRequestContract {
1914
2657
  /**
1915
2658
  * Global id of the published Fusebase product that owns the app (the product
@@ -1993,6 +2736,19 @@ export interface AddPortalAppBlockRequestContract {
1993
2736
  /** Title for the block (default: "App"; managed: "Managed Products"). */
1994
2737
  title?: string;
1995
2738
  }
2739
+ /** Partial App block update; any binding change sends all four identity fields. */
2740
+ export interface UpdatePortalAppBlockRequestContract {
2741
+ productId?: string;
2742
+ appId?: string;
2743
+ productType?: "private" | "managed";
2744
+ productOrgId?: string;
2745
+ /**
2746
+ * New block title.
2747
+ * @minLength 1
2748
+ * @maxLength 200
2749
+ */
2750
+ title?: string;
2751
+ }
1996
2752
  export interface AddPortalAppBlockResponseContract {
1997
2753
  /** Id of the created flexible block carrying the app-feature embed. */
1998
2754
  blockId: string;
@@ -2041,6 +2797,86 @@ export interface UpdatePortalCustomCodeResponseContract {
2041
2797
  */
2042
2798
  staged: boolean;
2043
2799
  }
2800
+ export interface UpdatePortalHomepageRequestContract {
2801
+ /**
2802
+ * Title of the homepage. Renames the portal's Home menu item, and with it the
2803
+ * linked homepage itself — the same field as the customizer's Homepage Title.
2804
+ */
2805
+ title?: string;
2806
+ /** Show the sidebar on pages other than the homepage (`theme.sidebar.show`). */
2807
+ showSidebarOnOtherPages?: boolean;
2808
+ /** Show the sidebar on the homepage (`theme.sidebar.homePage`). */
2809
+ showSidebarOnHomePage?: boolean;
2810
+ /**
2811
+ * Start the sidebar expanded rather than collapsed
2812
+ * (`theme.sidebar.minimized`; the renderer uses `collapsed = !minimized`).
2813
+ */
2814
+ expandSidebarByDefault?: boolean;
2815
+ }
2816
+ export interface UpdatePortalHomepageResponseContract {
2817
+ /** Draft branch the change was staged on. */
2818
+ branchId: string;
2819
+ /**
2820
+ * Sequence numbers assigned to the staged change events — one per affected
2821
+ * area (homepage title, sidebar theme), staged together. At most two.
2822
+ */
2823
+ seqs: number[];
2824
+ /**
2825
+ * Always true: the change is staged in the portal's customizer draft, not yet
2826
+ * live. The portal owner reviews and publishes it from the customizer.
2827
+ */
2828
+ staged: boolean;
2829
+ }
2830
+ export interface UpdatePortalItemRequestContract {
2831
+ /** New display name (rename). Also renames the backing page, if any. */
2832
+ name?: string;
2833
+ /** New icon key. */
2834
+ icon?: string;
2835
+ /** Show (true) or hide (false) the item in navigation. */
2836
+ visible?: boolean;
2837
+ /**
2838
+ * New 0-based position among its siblings (reorders the bar). Use this to fix
2839
+ * the newest-first root ordering.
2840
+ *
2841
+ * @minimum 0
2842
+ */
2843
+ index?: number;
2844
+ /**
2845
+ * Move the item to a different navigation bar. A nested item moves to the root
2846
+ * of that bar unless parentId names a folder there. When parentId is also given
2847
+ * it must match the destination parent's bar.
2848
+ */
2849
+ positionType?: PortalContentPositionType;
2850
+ /**
2851
+ * Move the item under a different parent folder ("" = root). The item, and a
2852
+ * folder's whole subtree, follows the new parent's bar. The parent must be
2853
+ * able to hold children (a folder, note, section, process or page) — a link,
2854
+ * dashboard, tag list or the home item is rejected.
2855
+ */
2856
+ parentId?: string;
2857
+ }
2858
+ export interface UpdatePortalItemResponseContract {
2859
+ /** Draft branch the change was staged on. */
2860
+ branchId: string;
2861
+ /** Sequence numbers assigned to the staged change events. */
2862
+ seqs: number[];
2863
+ /**
2864
+ * Always true: the change is staged in the portal's customizer draft, not yet
2865
+ * live. The portal owner reviews and publishes it from the customizer.
2866
+ */
2867
+ staged: boolean;
2868
+ }
2869
+ export interface DeletePortalItemResponseContract {
2870
+ /** Draft branch the change was staged on. */
2871
+ branchId: string;
2872
+ /** Sequence number assigned to the staged change event. */
2873
+ seq: number;
2874
+ /**
2875
+ * Always true: the deletion is staged in the portal's customizer draft, not yet
2876
+ * live. The portal owner reviews and publishes it from the customizer.
2877
+ */
2878
+ staged: boolean;
2879
+ }
2044
2880
  export interface DuplicatePortalItemRequestContract {
2045
2881
  /**
2046
2882
  * Id of the menu item to duplicate (a folder, note page, portal page, or link),
@@ -2082,6 +2918,44 @@ export interface PortalDetailContract {
2082
2918
  cnameType?: string;
2083
2919
  cnameValue?: string;
2084
2920
  cnameStatus?: string;
2921
+ /**
2922
+ * Published branding, the read analogue of updatePortalStyle. Omitted when
2923
+ * portal-service does not return theme settings for the portal.
2924
+ */
2925
+ style?: PortalStyleContract;
2926
+ }
2927
+ /** Published branding of a portal, as stored in its theme. */
2928
+ export interface PortalStyleContract {
2929
+ /** Color theme key. Absent when the portal never had one set explicitly. */
2930
+ theme?: PortalThemeKey;
2931
+ /** Logo image URL, as rendered in the portal header. */
2932
+ logoUrl?: string;
2933
+ /** Favicon image URL, used as the portal's browser tab icon. */
2934
+ faviconUrl?: string;
2935
+ }
2936
+ export interface UpdatePortalStyleRequestContract {
2937
+ /** Color theme to apply, the same picker the customizer's Theme screen shows. */
2938
+ theme?: PortalThemeKey;
2939
+ /** Logo image, shown in the portal header. */
2940
+ logo?: PortalStyleImageContract;
2941
+ /** Favicon image, used as the portal's browser tab icon. */
2942
+ favicon?: PortalStyleImageContract;
2943
+ }
2944
+ /** An image for portal branding, referenced by its uploaded stored file. */
2945
+ export interface PortalStyleImageContract {
2946
+ /** `storedFileUUID` of an already uploaded image file. */
2947
+ storedFileUUID: string;
2948
+ }
2949
+ export interface UpdatePortalStyleResponseContract {
2950
+ /** Draft branch the change was staged on. */
2951
+ branchId: string;
2952
+ /** Sequence number assigned to the staged change event. */
2953
+ seq: number;
2954
+ /**
2955
+ * Always true: the change is staged in the portal's customizer draft, not yet
2956
+ * live. The portal owner reviews and publishes it from the customizer.
2957
+ */
2958
+ staged: boolean;
2085
2959
  }
2086
2960
  export interface InviteToPortalRequestContract {
2087
2961
  email: string;
@@ -2195,6 +3069,12 @@ export interface PortalContentItemContract {
2195
3069
  type: PortalMenuItemType;
2196
3070
  name: string;
2197
3071
  slug: string;
3072
+ /**
3073
+ * Full path of the item inside the portal (e.g. "/docs/start"). Pass this
3074
+ * verbatim to updatePortalContentPermissions; never rebuild a nested path
3075
+ * from `slug`. Absent for menu items that have no path of their own.
3076
+ */
3077
+ path?: string;
2198
3078
  positionType: PortalContentPositionType;
2199
3079
  index: number;
2200
3080
  visible: boolean;
@@ -2206,6 +3086,63 @@ export interface PortalContentItemContract {
2206
3086
  export interface ListPortalContentResponseContract {
2207
3087
  items: PortalContentItemContract[];
2208
3088
  }
3089
+ /**
3090
+ * "replace" leaves access to exactly the supplied emails; "add" keeps everyone
3091
+ * who already has access and appends them.
3092
+ */
3093
+ export type PortalContentPermissionsMode = "replace" | "add";
3094
+ export interface UpdatePortalContentPermissionsRequestContract {
3095
+ /**
3096
+ * Exact full path of the published page or folder inside the portal, e.g.
3097
+ * "/inspiration-page" or "/docs/start". Take it from
3098
+ * listPortalContent items[].path; do not rebuild it from `slug`.
3099
+ */
3100
+ path: string;
3101
+ /**
3102
+ * Emails to grant access to: between 1 and 50. Compared case-insensitively;
3103
+ * duplicates are ignored. The count is enforced by the service — the schema
3104
+ * generator drops `@minItems` / `@maxItems`, so declaring them here would read
3105
+ * as shipped and be inert.
3106
+ */
3107
+ emails: string[];
3108
+ /** How the supplied emails combine with the current access list. */
3109
+ mode: PortalContentPermissionsMode;
3110
+ }
3111
+ export interface PortalContentPermissionsContract {
3112
+ allowAll: boolean;
3113
+ rejectAll: boolean;
3114
+ allowUserIds: number[];
3115
+ rejectUserIds: number[];
3116
+ }
3117
+ export interface PortalContentPermissionsUserContract {
3118
+ /** Normalized (trimmed, lowercased) email. */
3119
+ email: string;
3120
+ userId: number;
3121
+ /** True when this call created the portal membership for that email. */
3122
+ invited: boolean;
3123
+ /** Only for a freshly created invitation. */
3124
+ magicLink?: string;
3125
+ }
3126
+ export interface UpdatePortalContentPermissionsResponseContract {
3127
+ /** The published page or folder the path resolved to. */
3128
+ item: {
3129
+ id: string;
3130
+ type: PortalMenuItemType;
3131
+ name: string;
3132
+ path: string;
3133
+ };
3134
+ mode: PortalContentPermissionsMode;
3135
+ /** Access list stored on the item after the change. */
3136
+ permissions: PortalContentPermissionsContract;
3137
+ users: PortalContentPermissionsUserContract[];
3138
+ /** The item plus every descendant the cascade updated. */
3139
+ affectedItemIds: string[];
3140
+ /**
3141
+ * Always true: the change is live immediately. Do NOT call publishPortalDraft
3142
+ * after this operation.
3143
+ */
3144
+ published: boolean;
3145
+ }
2209
3146
  export interface PortalAiAgentContract {
2210
3147
  /** Agent global id — pass verbatim to addPortalAiAgentBlock as agentId. */
2211
3148
  id: string;
@@ -2236,6 +3173,10 @@ export interface AddPortalAiAgentBlockRequestContract {
2236
3173
  /** Exact agent id from listPortalAiAgents. Never invent one. */
2237
3174
  agentId: string;
2238
3175
  }
3176
+ export interface UpdatePortalAiAgentBlockRequestContract {
3177
+ /** Exact id returned by listPortalAiAgents. @minLength 1 */
3178
+ agentId: string;
3179
+ }
2239
3180
  export interface AddPortalAiAgentBlockResponseContract {
2240
3181
  /** Id of the created AI Agent block. */
2241
3182
  blockId: string;
@@ -2262,6 +3203,11 @@ export declare const PortalDatabaseBlockAppearanceContract: {
2262
3203
  readonly Blank: "blank";
2263
3204
  readonly Custom: "custom";
2264
3205
  };
3206
+ export declare const PortalDatabaseBlockAppearancePatchContract: {
3207
+ readonly None: "none";
3208
+ readonly Blank: "blank";
3209
+ readonly Custom: "custom";
3210
+ };
2265
3211
  export declare const PortalTextBackgroundContract: {
2266
3212
  readonly Color: "color";
2267
3213
  };
@@ -2270,6 +3216,11 @@ export declare const PortalFlexibleTextAppearanceContract: {
2270
3216
  readonly Blank: "blank";
2271
3217
  readonly Custom: "custom";
2272
3218
  };
3219
+ export declare const PortalFlexibleTextAppearancePatchContract: {
3220
+ readonly None: "none";
3221
+ readonly Blank: "blank";
3222
+ readonly Custom: "custom";
3223
+ };
2273
3224
  export declare const PortalCardBackgroundContract: {
2274
3225
  readonly Color: "color";
2275
3226
  };
@@ -2284,6 +3235,11 @@ export declare const PortalCardAppearanceContract: {
2284
3235
  readonly Blank: "blank";
2285
3236
  readonly Custom: "custom";
2286
3237
  };
3238
+ export declare const PortalCardAppearancePatchContract: {
3239
+ readonly None: "none";
3240
+ readonly Blank: "blank";
3241
+ readonly Custom: "custom";
3242
+ };
2287
3243
  export declare const PortalCardDestinationContract: {
2288
3244
  readonly Portalpage: "portalPage";
2289
3245
  };
@@ -2292,16 +3248,31 @@ export declare const PortalCountdownAppearanceContract: {
2292
3248
  readonly Blank: "blank";
2293
3249
  readonly Custom: "custom";
2294
3250
  };
3251
+ export declare const PortalCountdownAppearancePatchContract: {
3252
+ readonly None: "none";
3253
+ readonly Blank: "blank";
3254
+ readonly Custom: "custom";
3255
+ };
2295
3256
  export declare const PortalBpmnDiagramAppearanceContract: {
2296
3257
  readonly None: "none";
2297
3258
  readonly Blank: "blank";
2298
3259
  readonly Custom: "custom";
2299
3260
  };
3261
+ export declare const PortalBpmnDiagramAppearancePatchContract: {
3262
+ readonly None: "none";
3263
+ readonly Blank: "blank";
3264
+ readonly Custom: "custom";
3265
+ };
2300
3266
  export declare const PortalDynamicTableAppearanceContract: {
2301
3267
  readonly None: "none";
2302
3268
  readonly Blank: "blank";
2303
3269
  readonly Custom: "custom";
2304
3270
  };
3271
+ export declare const PortalDynamicTableAppearancePatchContract: {
3272
+ readonly None: "none";
3273
+ readonly Blank: "blank";
3274
+ readonly Custom: "custom";
3275
+ };
2305
3276
  export declare const PortalRecentFilesSourceContract: {
2306
3277
  readonly Entireportal: "entirePortal";
2307
3278
  readonly Portalpage: "portalPage";
@@ -2311,6 +3282,11 @@ export declare const PortalFormAppearanceContract: {
2311
3282
  readonly Blank: "blank";
2312
3283
  readonly Custom: "custom";
2313
3284
  };
3285
+ export declare const PortalFormAppearancePatchContract: {
3286
+ readonly None: "none";
3287
+ readonly Blank: "blank";
3288
+ readonly Custom: "custom";
3289
+ };
2314
3290
  export declare const PortalFormFieldTypeContract: {
2315
3291
  readonly Text: "text";
2316
3292
  readonly Textarea: "textarea";
@@ -2337,6 +3313,11 @@ export declare const PortalCardGroupAppearanceContract: {
2337
3313
  readonly Blank: "blank";
2338
3314
  readonly Custom: "custom";
2339
3315
  };
3316
+ export declare const PortalCardGroupAppearancePatchContract: {
3317
+ readonly None: "none";
3318
+ readonly Blank: "blank";
3319
+ readonly Custom: "custom";
3320
+ };
2340
3321
  export declare const PortalInfoImageContract: {
2341
3322
  readonly Emoji: "emoji";
2342
3323
  };
@@ -2354,6 +3335,11 @@ export declare const PortalCustomWidgetAppearanceContract: {
2354
3335
  readonly Blank: "blank";
2355
3336
  readonly Custom: "custom";
2356
3337
  };
3338
+ export declare const PortalCustomWidgetAppearancePatchContract: {
3339
+ readonly None: "none";
3340
+ readonly Blank: "blank";
3341
+ readonly Custom: "custom";
3342
+ };
2357
3343
  export declare const PortalTimelineViewContract: {
2358
3344
  readonly Horizontal: "horizontal";
2359
3345
  readonly Vertical: "vertical";
@@ -2363,3 +3349,8 @@ export declare const PortalTimelineAppearanceContract: {
2363
3349
  readonly Blank: "blank";
2364
3350
  readonly Custom: "custom";
2365
3351
  };
3352
+ export declare const PortalTimelineAppearancePatchContract: {
3353
+ readonly None: "none";
3354
+ readonly Blank: "blank";
3355
+ readonly Custom: "custom";
3356
+ };