@gitbook/api 0.191.0 → 0.193.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/client.d.ts CHANGED
@@ -50,10 +50,6 @@ export declare enum GitSyncOperationStage {
50
50
  ContentProcess = "content_process",
51
51
  Finalize = "finalize"
52
52
  }
53
- export declare enum GitSyncOperationDirection {
54
- Export = "export",
55
- Import = "import"
56
- }
57
53
  /** The type of semantic change. */
58
54
  export declare enum RevisionSemanticChangeType {
59
55
  PageCreated = "page_created",
@@ -72,11 +68,6 @@ export declare enum RevisionSemanticChangeType {
72
68
  export declare enum GitBookUsers {
73
69
  GitbookAgent = "gitbook:agent"
74
70
  }
75
- /** The provider of the Git Sync installation. */
76
- export declare enum GitSyncInstallationProvider {
77
- Github = "github",
78
- Gitlab = "gitlab"
79
- }
80
71
  /** The Cloudflare Hostname TLS validation method */
81
72
  export declare enum CloudflareHostnameTLSValidationMethod {
82
73
  Http = "http",
@@ -332,6 +323,15 @@ export declare enum SiteQuestionType {
332
323
  Reference = "reference",
333
324
  Unknown = "unknown"
334
325
  }
326
+ /**
327
+ * The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `questions` returns the most asked-about findings first. Defaults to 'updatedAt'.
328
+ * @default "updatedAt"
329
+ */
330
+ export declare enum SiteFindingOrderBy {
331
+ UpdatedAt = "updatedAt",
332
+ Severity = "severity",
333
+ Questions = "questions"
334
+ }
335
335
  /** Findings source filter matching evidence coming from site questions. */
336
336
  export declare enum SiteTriageFilterQuestions {
337
337
  Questions = "questions"
@@ -622,6 +622,11 @@ export declare enum CustomizationTheme {
622
622
  Bold = "bold",
623
623
  Gradient = "gradient"
624
624
  }
625
+ /** The provider of the Git Sync installation. */
626
+ export declare enum GitSyncInstallationProvider {
627
+ Github = "github",
628
+ Gitlab = "gitlab"
629
+ }
625
630
  /** Which side should be treated as the source of truth when Git Sync is configured. */
626
631
  export declare enum GitSyncInstallationPriority {
627
632
  Git = "git",
@@ -995,6 +1000,10 @@ export declare enum MemberRole {
995
1000
  Comment = "comment",
996
1001
  Read = "read"
997
1002
  }
1003
+ export declare enum GitSyncOperationDirection {
1004
+ Export = "export",
1005
+ Import = "import"
1006
+ }
998
1007
  /**
999
1008
  * * `running`: The operation is still running
1000
1009
  * * `failure`: The operation failed
@@ -1128,6 +1137,14 @@ export type ContentKitInlineElement = ContentKitText | ContentKitImage | Content
1128
1137
  export type ContentKitDescendantElement = ContentKitButton | ContentKitTextInput | ContentKitHStack | ContentKitVStack | ContentKitBox | ContentKitDivider | ContentKitWebFrame | ContentKitCodeBlock | ContentKitMarkdown | ContentKitCard | ContentKitImage | ContentKitInput | ContentKitSelect | ContentKitSwitch | ContentKitCheckbox | ContentKitRadio | ContentKitText | ContentKitHint | ContentKitLink | ContentKitStepperStep;
1129
1138
  /** Any event that can be received from GitBook. */
1130
1139
  export type Event = InstallationSetupEvent | InstallationDeletedEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | SiteInstallationSetupEvent | SiteInstallationDeletedEvent | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | TaskEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent | ContentComputeDocumentEvent | ContentComputeRevisionEvent | PageFeedbackEvent;
1140
+ /** An outcome of a content change. */
1141
+ export type ChangeRequestContentUpdateChange = ({
1142
+ object: "created_page";
1143
+ } & ChangeRequestContentUpdateInsertedPage) | ({
1144
+ object: "updated_page";
1145
+ } & ChangeRequestContentUpdateUpdatedPage) | ({
1146
+ object: "deleted_page";
1147
+ } & ChangeRequestContentUpdateDeletedPage);
1131
1148
  export type ChangeRequestContentChange = ({
1132
1149
  operation: "update_page";
1133
1150
  } & ChangeRequestContentChangeUpdatePage) | ({
@@ -1278,16 +1295,18 @@ export type MergeRulesSpaceConfiguration = MergeRulesConfigurationInherit | Merg
1278
1295
  export interface GitSyncState {
1279
1296
  /** Repository name. */
1280
1297
  repoName?: string;
1281
- installationStatus?: GitSyncInstallationStatus;
1298
+ installationStatus: GitSyncInstallationStatus;
1282
1299
  /** The provider of the Git Sync installation. */
1283
- installationProvider?: GitSyncProvider;
1300
+ installationProvider: GitSyncProvider;
1284
1301
  /**
1285
1302
  * The integration name providing the Git Sync.
1286
1303
  * @deprecated
1287
1304
  */
1288
1305
  integration?: string;
1289
1306
  /** The ID of the Git Sync installation. */
1290
- installationId?: string;
1307
+ installationId: string;
1308
+ /** The ID of the parent Git Sync installation, if any. */
1309
+ parentInstallationId?: string;
1291
1310
  /** The URL to the repository tree, used when rendering public content. */
1292
1311
  url?: string;
1293
1312
  /** The latest operation on the Git Sync installation. */
@@ -1299,6 +1318,11 @@ export interface GitSyncState {
1299
1318
  * * `timeout`: The operation timed out
1300
1319
  */
1301
1320
  state: GitSyncOperationState;
1321
+ direction: GitSyncOperationDirection;
1322
+ startedAt: Timestamp;
1323
+ endedAt?: Timestamp;
1324
+ /** Why the operation failed, when it did. */
1325
+ error?: string;
1302
1326
  };
1303
1327
  /** When the Git provider details were last updated */
1304
1328
  updatedAt?: Timestamp;
@@ -1495,6 +1519,8 @@ export interface SearchSectionResult {
1495
1519
  path: string;
1496
1520
  /** Relevance score for a search result. Higher is better and the score is unbounded. */
1497
1521
  score: SearchResultScore;
1522
+ /** Whether the result matched on the page fields (title, description) or on the section content. When "page", the section is an arbitrary section of the matching page. */
1523
+ resultType?: "page" | "section";
1498
1524
  body: string;
1499
1525
  /** URLs associated with the object */
1500
1526
  urls: {
@@ -1512,6 +1538,8 @@ export interface SearchPageResult {
1512
1538
  path: string;
1513
1539
  /** Relevance score for a search result. Higher is better and the score is unbounded. */
1514
1540
  score: SearchResultScore;
1541
+ /** Whether the page matched on its own fields (title, description) or on the content of one of its sections. */
1542
+ resultType?: "page" | "section";
1515
1543
  sections?: SearchSectionResult[];
1516
1544
  /** Data about the ancestors of the current page, from top-level to direct parent. */
1517
1545
  ancestors: {
@@ -1925,6 +1953,69 @@ export interface DocumentBlockCode {
1925
1953
  nodes: DocumentBlockCodeLine[];
1926
1954
  isVoid?: false;
1927
1955
  }
1956
+ export interface DocumentBlockEmbed {
1957
+ object: "block";
1958
+ type: "embed";
1959
+ key?: string;
1960
+ data: {
1961
+ url: string;
1962
+ fullWidth?: boolean;
1963
+ };
1964
+ isVoid: true;
1965
+ }
1966
+ export type PlainObject = any;
1967
+ /** Action to open an overlay modal defined by "componentId". */
1968
+ export type ContentKitDefaultAction = {
1969
+ action: "@ui.modal.open";
1970
+ componentId: string;
1971
+ props: PlainObject;
1972
+ } | {
1973
+ action: "@ui.modal.close";
1974
+ returnValue: PlainObject;
1975
+ } | {
1976
+ action: "@ui.url.open";
1977
+ url: string;
1978
+ } | {
1979
+ action: "@link.unfurl";
1980
+ url: string;
1981
+ } | {
1982
+ action: "@editor.node.updateProps";
1983
+ props: PlainObject;
1984
+ };
1985
+ /** Custom action to re-render the block. */
1986
+ export type ContentKitAction = {
1987
+ action: string;
1988
+ [key: string]: any;
1989
+ } | ContentKitDefaultAction;
1990
+ export interface DocumentBlockIntegration {
1991
+ object: "block";
1992
+ type: "integration";
1993
+ key?: string;
1994
+ data: {
1995
+ /** Name of the integration */
1996
+ integration: string;
1997
+ /** ID of the block in the integration */
1998
+ block: string;
1999
+ /** Properties passed to the block during rendering */
2000
+ props: PlainObject;
2001
+ /** Custom action to re-render the block. */
2002
+ action?: ContentKitAction;
2003
+ /**
2004
+ * URL associated with the content represented by the block.
2005
+ * This property is set when creating a block from a URL (unfurl) to ensure
2006
+ * we can convert the block back to an embed.
2007
+ */
2008
+ url?: string;
2009
+ fullWidth?: boolean;
2010
+ };
2011
+ isVoid: true;
2012
+ meta?: {
2013
+ /** A content token that can be used to authenticate requests for cross-space integration blocks. */
2014
+ token?: string;
2015
+ /** ID of the space the integration block originates from */
2016
+ spaceId?: string;
2017
+ };
2018
+ }
1928
2019
  export interface DocumentBlockHint {
1929
2020
  object: "block";
1930
2021
  type: "hint";
@@ -1934,7 +2025,7 @@ export interface DocumentBlockHint {
1934
2025
  /** Name of the icon */
1935
2026
  icon?: Icon;
1936
2027
  };
1937
- nodes: DocumentBlocksEssentials[];
2028
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration)[];
1938
2029
  isVoid?: false;
1939
2030
  }
1940
2031
  export interface DocumentBlockQuote {
@@ -2205,16 +2296,6 @@ export interface DocumentBlockDrawing {
2205
2296
  };
2206
2297
  isVoid: true;
2207
2298
  }
2208
- export interface DocumentBlockEmbed {
2209
- object: "block";
2210
- type: "embed";
2211
- key?: string;
2212
- data: {
2213
- url: string;
2214
- fullWidth?: boolean;
2215
- };
2216
- isVoid: true;
2217
- }
2218
2299
  export interface DocumentBlockReusableContent {
2219
2300
  object: "block";
2220
2301
  type: "reusable-content";
@@ -2228,59 +2309,6 @@ export interface DocumentBlockReusableContent {
2228
2309
  token?: string;
2229
2310
  };
2230
2311
  }
2231
- export type PlainObject = any;
2232
- /** Action to open an overlay modal defined by "componentId". */
2233
- export type ContentKitDefaultAction = {
2234
- action: "@ui.modal.open";
2235
- componentId: string;
2236
- props: PlainObject;
2237
- } | {
2238
- action: "@ui.modal.close";
2239
- returnValue: PlainObject;
2240
- } | {
2241
- action: "@ui.url.open";
2242
- url: string;
2243
- } | {
2244
- action: "@link.unfurl";
2245
- url: string;
2246
- } | {
2247
- action: "@editor.node.updateProps";
2248
- props: PlainObject;
2249
- };
2250
- /** Custom action to re-render the block. */
2251
- export type ContentKitAction = {
2252
- action: string;
2253
- [key: string]: any;
2254
- } | ContentKitDefaultAction;
2255
- export interface DocumentBlockIntegration {
2256
- object: "block";
2257
- type: "integration";
2258
- key?: string;
2259
- data: {
2260
- /** Name of the integration */
2261
- integration: string;
2262
- /** ID of the block in the integration */
2263
- block: string;
2264
- /** Properties passed to the block during rendering */
2265
- props: PlainObject;
2266
- /** Custom action to re-render the block. */
2267
- action?: ContentKitAction;
2268
- /**
2269
- * URL associated with the content represented by the block.
2270
- * This property is set when creating a block from a URL (unfurl) to ensure
2271
- * we can convert the block back to an embed.
2272
- */
2273
- url?: string;
2274
- fullWidth?: boolean;
2275
- };
2276
- isVoid: true;
2277
- meta?: {
2278
- /** A content token that can be used to authenticate requests for cross-space integration blocks. */
2279
- token?: string;
2280
- /** ID of the space the integration block originates from */
2281
- spaceId?: string;
2282
- };
2283
- }
2284
2312
  export interface DocumentBlockExpandable {
2285
2313
  object: "block";
2286
2314
  type: "expandable";
@@ -2502,12 +2530,19 @@ export interface DocumentInlineMention {
2502
2530
  };
2503
2531
  isVoid: true;
2504
2532
  }
2533
+ /** Action to perform when an inline button is clicked. */
2505
2534
  export type DocumentAction = {
2506
2535
  action: "search";
2536
+ /** The search query to prefill. */
2507
2537
  query?: string;
2508
2538
  } | {
2509
2539
  action: "ask";
2540
+ /** The question to prefill. */
2510
2541
  query?: string;
2542
+ } | {
2543
+ action: "select";
2544
+ /** The slug of the option to select. */
2545
+ slug: string;
2511
2546
  };
2512
2547
  export interface DocumentInlineButton {
2513
2548
  object: "inline";
@@ -2523,6 +2558,7 @@ export interface DocumentInlineButton {
2523
2558
  /** A relative reference to content in GitBook. */
2524
2559
  ref: ContentRef;
2525
2560
  } | {
2561
+ /** Action to perform when an inline button is clicked. */
2526
2562
  action: DocumentAction;
2527
2563
  });
2528
2564
  isVoid: true;
@@ -3283,6 +3319,8 @@ export interface RevisionPageUpdate {
3283
3319
  * @minLength 1
3284
3320
  */
3285
3321
  title?: string;
3322
+ /** Slug of the page in its parent, used to build the page's path. When omitted, the slug is derived from the title. The slug must be unique among the page's siblings; any collision is rejected. */
3323
+ slug?: RevisionPageSlug;
3286
3324
  /** Emoji of the page. Set to an empty string to remove it. */
3287
3325
  emoji?: Emoji;
3288
3326
  /** Icon of the page. Set to an empty string to remove it. */
@@ -3322,6 +3360,8 @@ export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
3322
3360
  * @min 0
3323
3361
  */
3324
3362
  at?: number;
3363
+ /** Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path. */
3364
+ ref?: string;
3325
3365
  /** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
3326
3366
  document: Document;
3327
3367
  };
@@ -3347,6 +3387,46 @@ export interface ChangeRequestContentChangeRevertPage {
3347
3387
  /** Keys of the specific blocks to revert within the page's document, as they appear in the page's document. If omitted, the whole page is reverted. */
3348
3388
  block?: string[];
3349
3389
  }
3390
+ export interface ChangeRequestContentUpdatePageRef {
3391
+ /** Type of Object, always equals to "page". */
3392
+ object: "page";
3393
+ /** Unique identifier of the page. */
3394
+ id: string;
3395
+ urls: {
3396
+ /** API URL to fetch the page's full, normalized content. */
3397
+ location: URL;
3398
+ };
3399
+ }
3400
+ /** A page created by the operation with its resolved ID, ref as passed by the caller, and a URL to fetch its content. */
3401
+ export interface ChangeRequestContentUpdateInsertedPage {
3402
+ /** Type of Object, always equals to "created_page". */
3403
+ object: "created_page";
3404
+ /** The batch-local `ref` provided on the insert operation, echoed so the caller can map their reference to the created page's ID. Absent when the operation had no ref. */
3405
+ ref?: string;
3406
+ /** Reference to the created page, with a URL to fetch its normalized content. */
3407
+ page: ChangeRequestContentUpdatePageRef;
3408
+ }
3409
+ /** A page updated by the operation, with a URL to fetch its content. */
3410
+ export interface ChangeRequestContentUpdateUpdatedPage {
3411
+ /** Type of Object, always equals to "updated_page". */
3412
+ object: "updated_page";
3413
+ /** Reference to the updated page, with a URL to fetch its normalized content. */
3414
+ page: ChangeRequestContentUpdatePageRef;
3415
+ }
3416
+ /** A page deleted by the batch. Only its ID is returned, as it no longer has content. */
3417
+ export interface ChangeRequestContentUpdateDeletedPage {
3418
+ /** Type of Object, always equals to "deleted_page". */
3419
+ object: "deleted_page";
3420
+ /** ID of the deleted page. */
3421
+ page: string;
3422
+ }
3423
+ /** The result of applying a batch of content changes. */
3424
+ export interface ChangeRequestContentUpdate {
3425
+ /** The change request after the batch was applied. */
3426
+ changeRequest: ChangeRequest;
3427
+ /** One entry per affected page (deduplicated), in the order the pages were first touched by the batch. */
3428
+ changes: ChangeRequestContentUpdateChange[];
3429
+ }
3350
3430
  export interface ChangedRevisionPage {
3351
3431
  id: string;
3352
3432
  type: RevisionPageType;
@@ -5051,6 +5131,8 @@ export interface SiteSpace {
5051
5131
  default?: boolean;
5052
5132
  /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor. */
5053
5133
  condition?: Expression;
5134
+ /** Custom home page within the space, rendered at the site space's path root instead of the space's default landing page. */
5135
+ pageId?: string | null;
5054
5136
  /** Whether the site space is draft and not live. */
5055
5137
  draft: boolean;
5056
5138
  /** Whether the space has advanced customization feature enabled */
@@ -6053,13 +6135,56 @@ export interface GitSyncInstallationSetupGitLab {
6053
6135
  }
6054
6136
  /** Provider-specific setup payload for a Git Sync installation. */
6055
6137
  export type GitSyncInstallationSetup = GitSyncInstallationSetupCommon & (GitSyncInstallationSetupGitHub | GitSyncInstallationSetupGitLab);
6138
+ export interface GitRepositoryConnection {
6139
+ object: "git-repository-connection";
6140
+ /** Unique identifier of the repository connection. */
6141
+ id: string;
6142
+ /** The provider of the Git Sync installation. */
6143
+ provider: GitSyncInstallationProvider;
6144
+ /** Repository identifier assigned by the provider. */
6145
+ repositoryId: string;
6146
+ /** Full repository name assigned by the provider. */
6147
+ repositoryName: string;
6148
+ /**
6149
+ * URL of the repository on the provider.
6150
+ * @format uri
6151
+ */
6152
+ repositoryUrl: string;
6153
+ /** Default branch reported by the provider. */
6154
+ defaultBranch?: string;
6155
+ authState: "pending" | "active" | "unauthenticated";
6156
+ /** Provider operations available to this repository connection. */
6157
+ capabilities: {
6158
+ /** Whether the connection can create and update GitHub pull requests or GitLab merge requests. */
6159
+ pullRequests: boolean;
6160
+ /** Whether the connection can publish GitBook synchronization results as provider commit statuses. */
6161
+ commitStatuses: boolean;
6162
+ };
6163
+ createdAt: Timestamp;
6164
+ updatedAt: Timestamp;
6165
+ }
6166
+ export interface GitRepositoryRef {
6167
+ object: "git-repository-ref";
6168
+ /** Unique identifier of the repository ref. */
6169
+ id: string;
6170
+ /** Fully qualified provider ref name. */
6171
+ name: string;
6172
+ type: "branch" | "tag" | "change-request-head";
6173
+ latestObservedCommitId?: string;
6174
+ latestImportedCommitId?: string;
6175
+ updatedAt: Timestamp;
6176
+ }
6056
6177
  export type GitSyncInstallation = GitSyncInstallationSetup & {
6057
6178
  object: "git-sync-installation";
6058
6179
  /** Unique identifier of the Git Sync installation. */
6059
6180
  id: string;
6181
+ /** The ID of the parent Git Sync installation, if any. */
6182
+ parentInstallationId?: string;
6060
6183
  /** Resource targeted by a Git Sync installation. */
6061
6184
  target: GitSyncInstallationTarget;
6062
6185
  status: GitSyncInstallationStatus;
6186
+ repositoryConnection?: GitRepositoryConnection;
6187
+ repositoryRef?: GitRepositoryRef;
6063
6188
  createdAt: Timestamp;
6064
6189
  /** Identifier of the user who created the installation. */
6065
6190
  createdBy: string;
@@ -6200,6 +6325,11 @@ export type CustomizationSuggestedQuestion = string;
6200
6325
  * @maxItems 5
6201
6326
  */
6202
6327
  export type CustomizationSuggestedQuestions = CustomizationSuggestedQuestion[];
6328
+ /**
6329
+ * Additional instructions for the AI Assistant, injected after the base system prompt. Use them to adjust tone of voice and contribute site-specific knowledge. These instructions refine, but never override, the assistant's built-in guardrails. Only available to site admins and never exposed on the published site.
6330
+ * @maxLength 10000
6331
+ */
6332
+ export type CustomizationAIInstructions = string;
6203
6333
  /**
6204
6334
  * A handle on a social platform, without prefixes like the @ symbol.
6205
6335
  * @minLength 1
@@ -6333,6 +6463,8 @@ export interface SiteCustomizationSettingsBase {
6333
6463
  mode: CustomizationAIMode;
6334
6464
  /** Suggested questions to display at the start of the chosen AI mode. */
6335
6465
  suggestions?: CustomizationSuggestedQuestions;
6466
+ /** Additional instructions for the AI Assistant, injected after the base system prompt. Use them to adjust tone of voice and contribute site-specific knowledge. These instructions refine, but never override, the assistant's built-in guardrails. Only available to site admins and never exposed on the published site. */
6467
+ instructions?: CustomizationAIInstructions;
6336
6468
  };
6337
6469
  advancedCustomization: {
6338
6470
  /** If true, Advanced customization is enabled */
@@ -6789,6 +6921,41 @@ export interface SiteQuestion {
6789
6921
  location: string;
6790
6922
  };
6791
6923
  }
6924
+ /** Count of findings by status. Candidate findings are never counted. */
6925
+ export interface SiteFindingStatsStatuses {
6926
+ /** Count of findings surfaced to users and still under investigation. */
6927
+ open: number;
6928
+ /** Count of findings that have been resolved. */
6929
+ done: number;
6930
+ /** Count of findings that have been canceled. */
6931
+ canceled: number;
6932
+ }
6933
+ /** Count of findings by estimated end-user severity. */
6934
+ export interface SiteFindingStatsSeverities {
6935
+ /** Count of findings with a low estimated severity. */
6936
+ low: number;
6937
+ /** Count of findings with a medium estimated severity. */
6938
+ medium: number;
6939
+ /** Count of findings with a high estimated severity. */
6940
+ high: number;
6941
+ }
6942
+ /** Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total. */
6943
+ export type SiteFindingStatsConnectors = Record<string, number>;
6944
+ /** Aggregated stats for the findings identified on a site. */
6945
+ export interface SiteFindingStats {
6946
+ /** Total count of findings included in the aggregation. */
6947
+ total: number;
6948
+ /** Count of findings by status. Candidate findings are never counted. */
6949
+ statuses: SiteFindingStatsStatuses;
6950
+ /** Count of findings by estimated end-user severity. */
6951
+ severities: SiteFindingStatsSeverities;
6952
+ /** Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total. */
6953
+ connectors: SiteFindingStatsConnectors;
6954
+ /** Count of findings with at least one piece of evidence coming from a site question. */
6955
+ questions: number;
6956
+ /** Count of change requests created to fix a finding that have been merged. */
6957
+ mergedChangeRequests: number;
6958
+ }
6792
6959
  /**
6793
6960
  * Optional label for the connection
6794
6961
  * @minLength 0
@@ -7890,21 +8057,6 @@ export type SiteInsightsEventPagePostFeedbackComment = SiteInsightsEventBase & {
7890
8057
  };
7891
8058
  export type SiteInsightsEventAgentFeedback = SiteInsightsEventBase & {
7892
8059
  type: "agent_feedback";
7893
- feedback: {
7894
- /**
7895
- * @minLength 1
7896
- * @maxLength 2048
7897
- */
7898
- content: string;
7899
- /**
7900
- * Classification of a site finding:
7901
- * - Outdated content: The content was correct but is no longer up to date with external context and may be misleading or incorrect.
7902
- * - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
7903
- * - Content gap: The content is missing important information that should be present to answer user questions effectively.
7904
- * - Other: Any other type of finding not covered by the above categories.
7905
- */
7906
- category: SiteFindingType;
7907
- };
7908
8060
  };
7909
8061
  export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
7910
8062
  type: "ask_question";
@@ -8440,6 +8592,12 @@ export interface UnsplashImage {
8440
8592
  export interface HiveAccessToken {
8441
8593
  contents: Record<string, string>;
8442
8594
  }
8595
+ export interface APIIntercomMessengerToken {
8596
+ /** Short-lived JWT used to authenticate the user with Intercom Messenger */
8597
+ token: string;
8598
+ /** Unix timestamp in seconds when the token expires */
8599
+ expiresAt: number;
8600
+ }
8443
8601
  export interface SignedURL {
8444
8602
  /** The kind of signed URL */
8445
8603
  object: "signed-url";
@@ -8938,10 +9096,11 @@ export interface GitSyncSiteStructureSectionGroup {
8938
9096
  * A space — a single content unit in the site's navigation tree. Discriminated
8939
9097
  * by `type: space`.
8940
9098
  *
8941
- * The space's content lives in the synced repository at the directory pointed
8942
- * to by `content.directory`. Hierarchy comes from where the space appears in
8943
- * the YAML (under a section, a section group, or at the root), not from an
8944
- * explicit parent reference.
9099
+ * The space's content either lives in the synced repository at the directory
9100
+ * pointed to by `content.directory`, or does not inherit the site's repository
9101
+ * when `content.directory` is `null`. Hierarchy comes from where the space
9102
+ * appears in the YAML (under a section, a section group, or at the root), not
9103
+ * from an explicit parent reference.
8945
9104
  */
8946
9105
  export interface GitSyncSiteStructureSpace {
8947
9106
  /** Discriminator for a space node. */
@@ -8967,13 +9126,10 @@ export interface GitSyncSiteStructureSpace {
8967
9126
  draft?: boolean;
8968
9127
  /** Expression to evaluate */
8969
9128
  condition?: Expression;
8970
- /** Where the space's content lives in the synced repository. */
9129
+ /** Where the space's content is managed. */
8971
9130
  content: {
8972
- /**
8973
- * Repository-relative directory containing this space's content.
8974
- * @minLength 1
8975
- */
8976
- directory: string;
9131
+ /** Repository-relative directory containing this space's content. */
9132
+ directory: string | null;
8977
9133
  language?: TranslationLanguage;
8978
9134
  };
8979
9135
  }
@@ -9006,8 +9162,6 @@ export interface GitSyncSiteStructureSection {
9006
9162
  icon?: Icon;
9007
9163
  /** Whether this is the default section for the site. */
9008
9164
  default?: boolean;
9009
- /** Whether the section is draft and not live. */
9010
- draft?: boolean;
9011
9165
  /** Path to the section on the site */
9012
9166
  path: SiteSectionPath;
9013
9167
  /** Expression to evaluate */
@@ -9025,459 +9179,6 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
9025
9179
  * three node types: a section group, a section, or a space.
9026
9180
  */
9027
9181
  export type GitSyncSiteStructure = GitSyncSiteStructureNode[];
9028
- /**
9029
- * Reserved repository-relative path to the font file:
9030
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9031
- * font definition's `key`, `<weight>` is this face's `weight`, and
9032
- * `<ext>` is one of `woff2`, `woff`.
9033
- *
9034
- * For example, a font with `key: brand` and a `700` face is read from
9035
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9036
- * @minLength 1
9037
- */
9038
- export type GitSyncSiteCustomizationFontSource = string;
9039
- /**
9040
- * Custom font definition for a `site.fonts[]` entry. Referenced from
9041
- * `customization.styling.font` or `customization.styling.monospaceFont` via
9042
- * its `key`.
9043
- *
9044
- * Rules enforced on a definition:
9045
- * - It must declare exactly one face for the `400` weight and one for the
9046
- * `700` weight; the `600` weight is optional. No other weights are allowed,
9047
- * and a weight may not be declared more than once.
9048
- * - Each face has a single source file whose `url` is the reserved repository
9049
- * asset path `.gitbook/assets/<key>-<weight>.<ext>` (`<ext>` is `woff2` or
9050
- * `woff`). For example a definition with `key: brand` is read from
9051
- * `.gitbook/assets/brand-400.woff2` and `.gitbook/assets/brand-700.woff2`.
9052
- */
9053
- export interface GitSyncSiteCustomizationFontDefinition {
9054
- /**
9055
- * Stable identifier referenced from `styling.font` /
9056
- * `styling.monospaceFont`, and used as the prefix of each face's
9057
- * reserved asset path (`.gitbook/assets/<key>-<weight>.<ext>`).
9058
- * @minLength 1
9059
- * @pattern ^[A-Za-z0-9][A-Za-z0-9_-]*$
9060
- */
9061
- key: string;
9062
- /** The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display"). */
9063
- fontFamily: FontFamily;
9064
- /**
9065
- * Font-face declarations keyed by weight, each specifying its single
9066
- * source file. The `400` and `700` weights are required; `600` is
9067
- * optional.
9068
- */
9069
- fontFaces: {
9070
- /**
9071
- * Reserved repository-relative path to the font file:
9072
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9073
- * font definition's `key`, `<weight>` is this face's `weight`, and
9074
- * `<ext>` is one of `woff2`, `woff`.
9075
- *
9076
- * For example, a font with `key: brand` and a `700` face is read from
9077
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9078
- */
9079
- "400": GitSyncSiteCustomizationFontSource;
9080
- /**
9081
- * Reserved repository-relative path to the font file:
9082
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9083
- * font definition's `key`, `<weight>` is this face's `weight`, and
9084
- * `<ext>` is one of `woff2`, `woff`.
9085
- *
9086
- * For example, a font with `key: brand` and a `700` face is read from
9087
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9088
- */
9089
- "600"?: GitSyncSiteCustomizationFontSource;
9090
- /**
9091
- * Reserved repository-relative path to the font file:
9092
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9093
- * font definition's `key`, `<weight>` is this face's `weight`, and
9094
- * `<ext>` is one of `woff2`, `woff`.
9095
- *
9096
- * For example, a font with `key: brand` and a `700` face is read from
9097
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9098
- */
9099
- "700": GitSyncSiteCustomizationFontSource;
9100
- };
9101
- }
9102
- /** Themed color (light + dark). */
9103
- export interface GitSyncSiteCustomizationThemedColor {
9104
- light: Color;
9105
- dark: Color;
9106
- }
9107
- /** Tint configuration. */
9108
- export interface GitSyncSiteCustomizationTint {
9109
- /** Themed color (light + dark). */
9110
- color: GitSyncSiteCustomizationThemedColor;
9111
- }
9112
- /** Reference to a custom font defined under `site.fonts[]`. Matches by `key`. */
9113
- export interface GitSyncSiteCustomizationFontReference {
9114
- /**
9115
- * Matches the `key` of an entry in `site.fonts[]`.
9116
- * @minLength 1
9117
- */
9118
- key: string;
9119
- }
9120
- /**
9121
- * Body font for the site. Either one of the built-in `CustomizationDefaultFont`
9122
- * values, or a reference to a custom font declared in `site.fonts[]`.
9123
- */
9124
- export type GitSyncSiteCustomizationFont = CustomizationDefaultFont | GitSyncSiteCustomizationFontReference;
9125
- /**
9126
- * Monospace font for the site. Either one of the built-in
9127
- * `CustomizationDefaultMonospaceFont` values, or a reference to a custom font
9128
- * declared in `site.fonts[]`.
9129
- */
9130
- export type GitSyncSiteCustomizationMonospaceFont = CustomizationDefaultMonospaceFont | GitSyncSiteCustomizationFontReference;
9131
- /** Themed code theme (light + dark). */
9132
- export interface GitSyncSiteCustomizationThemedCodeTheme {
9133
- light: CustomizationCodeTheme;
9134
- dark: CustomizationCodeTheme;
9135
- }
9136
- /** Code-block syntax-highlighting themes — one for default code blocks and one for OpenAPI request/response samples. */
9137
- export interface GitSyncSiteCustomizationCodeThemes {
9138
- /** Themed code theme (light + dark). */
9139
- default: GitSyncSiteCustomizationThemedCodeTheme;
9140
- /** Themed code theme (light + dark). */
9141
- openapi: GitSyncSiteCustomizationThemedCodeTheme;
9142
- }
9143
- /** Sidebar style settings. */
9144
- export interface GitSyncSiteCustomizationSidebar {
9145
- /**
9146
- * - `default`: No background, content sits directly against sidebar edge.
9147
- * - `filled`: Muted background color that extends to sidebar edges.
9148
- */
9149
- background: CustomizationSidebarBackgroundStyle;
9150
- /**
9151
- * - `default`: Simple list items without special styling, groups are inset with a line.
9152
- * - `pill`: Rounded capsule shape around selected/active items.
9153
- * - `line`: Continuous line next to all items, with colored line part for selected/active items.
9154
- */
9155
- list: CustomizationSidebarListStyle;
9156
- }
9157
- /** Styling settings. */
9158
- export interface GitSyncSiteCustomizationStyling {
9159
- /**
9160
- * The theme to apply to the site. Supercedes the old header preset themes.
9161
- * - `clean`: Modern theme featuring translucency and minimally-styled elements.
9162
- * - `muted`: Sophisticated theme with decreased contrast between elements.
9163
- * - `bold`: High-impact theme with prominent colors and strong contrasts.
9164
- * - `gradient`: Trendy theme featuring colorful gradients and splashes of color.
9165
- */
9166
- theme?: CustomizationTheme;
9167
- /** Themed color (light + dark). */
9168
- primaryColor?: GitSyncSiteCustomizationThemedColor;
9169
- /** Tint configuration. */
9170
- tint?: GitSyncSiteCustomizationTint;
9171
- /** Themed color (light + dark). */
9172
- infoColor?: GitSyncSiteCustomizationThemedColor;
9173
- /** Themed color (light + dark). */
9174
- successColor?: GitSyncSiteCustomizationThemedColor;
9175
- /** Themed color (light + dark). */
9176
- warningColor?: GitSyncSiteCustomizationThemedColor;
9177
- /** Themed color (light + dark). */
9178
- dangerColor?: GitSyncSiteCustomizationThemedColor;
9179
- corners?: CustomizationCorners;
9180
- /**
9181
- * The degree of visual depth (through shadows, gradients and elevation effects) of elements on the site.
9182
- * - `subtle`: Subtle shadows and minimal elevation.
9183
- * - `flat`: Flat elements, no shadows and no elevation.
9184
- */
9185
- depth?: CustomizationDepth;
9186
- /**
9187
- * The style used for regular links in the main content, header and footer. Sidebar items are styled separately.
9188
- * - `default`: Links are colored in the primary color and feature an underline in the same color.
9189
- * - `accent`: Links are colored the same as body text and feature an underline in the primary color.
9190
- */
9191
- links?: CustomizationLinksStyle;
9192
- /**
9193
- * Body font for the site. Either one of the built-in `CustomizationDefaultFont`
9194
- * values, or a reference to a custom font declared in `site.fonts[]`.
9195
- */
9196
- font?: GitSyncSiteCustomizationFont;
9197
- /**
9198
- * Monospace font for the site. Either one of the built-in
9199
- * `CustomizationDefaultMonospaceFont` values, or a reference to a custom font
9200
- * declared in `site.fonts[]`.
9201
- */
9202
- monospaceFont?: GitSyncSiteCustomizationMonospaceFont;
9203
- icons?: CustomizationIconsStyle;
9204
- /** Code-block syntax-highlighting themes — one for default code blocks and one for OpenAPI request/response samples. */
9205
- codeTheme?: GitSyncSiteCustomizationCodeThemes;
9206
- /** Sidebar style settings. */
9207
- sidebar?: GitSyncSiteCustomizationSidebar;
9208
- /**
9209
- * The style of the search button.
9210
- * - `prominent`: large search bar in the middle of the header, with less room for other header items,
9211
- * - `subtle`: small search bar in the corner of the header, with more room for other header items.
9212
- */
9213
- search?: CustomizationSearchStyle;
9214
- }
9215
- /**
9216
- * Repository-relative path to an asset in a site Git Sync, e.g.
9217
- * `.gitbook/assets/header-logo-light.svg`. Absolute URLs are not accepted
9218
- * here — Git Sync assets must live in the synced repository under
9219
- * `.gitbook/assets/`.
9220
- *
9221
- * This is the shared base type and only validates the `.gitbook/assets/`
9222
- * prefix. Each field that uses it additionally reserves a specific filename
9223
- * and set of allowed extensions (e.g. the header logo must be
9224
- * `header-logo-light.<ext>` / `header-logo-dark.<ext>`); see the description
9225
- * on the consuming field for the exact reserved path.
9226
- * @maxLength 2048
9227
- * @pattern ^\.gitbook/assets/.+
9228
- */
9229
- export type GitSyncSiteCustomizationAssetPath = string;
9230
- /**
9231
- * Light/dark variants of a Git Sync repository asset path. Used for logos and
9232
- * favicons that switch with the active theme. Both variants are required.
9233
- *
9234
- * Each consuming field reserves the exact light/dark filenames and allowed
9235
- * extensions (e.g. header logo → `header-logo-light.<ext>` /
9236
- * `header-logo-dark.<ext>`); see the description on the consuming field.
9237
- */
9238
- export interface GitSyncSiteCustomizationThemedAssetPath {
9239
- /**
9240
- * Repository-relative path to an asset in a site Git Sync, e.g.
9241
- * `.gitbook/assets/header-logo-light.svg`. Absolute URLs are not accepted
9242
- * here — Git Sync assets must live in the synced repository under
9243
- * `.gitbook/assets/`.
9244
- *
9245
- * This is the shared base type and only validates the `.gitbook/assets/`
9246
- * prefix. Each field that uses it additionally reserves a specific filename
9247
- * and set of allowed extensions (e.g. the header logo must be
9248
- * `header-logo-light.<ext>` / `header-logo-dark.<ext>`); see the description
9249
- * on the consuming field for the exact reserved path.
9250
- */
9251
- light: GitSyncSiteCustomizationAssetPath;
9252
- /**
9253
- * Repository-relative path to an asset in a site Git Sync, e.g.
9254
- * `.gitbook/assets/header-logo-light.svg`. Absolute URLs are not accepted
9255
- * here — Git Sync assets must live in the synced repository under
9256
- * `.gitbook/assets/`.
9257
- *
9258
- * This is the shared base type and only validates the `.gitbook/assets/`
9259
- * prefix. Each field that uses it additionally reserves a specific filename
9260
- * and set of allowed extensions (e.g. the header logo must be
9261
- * `header-logo-light.<ext>` / `header-logo-dark.<ext>`); see the description
9262
- * on the consuming field for the exact reserved path.
9263
- */
9264
- dark: GitSyncSiteCustomizationAssetPath;
9265
- }
9266
- /** Favicon for the published site. The `icon` variant references a repository asset path; the `emoji` variant uses a single emoji character; */
9267
- export type GitSyncSiteCustomizationFavicon = {
9268
- /**
9269
- * Themed favicon. Each variant must use its reserved repository
9270
- * asset path — light: `.gitbook/assets/favicon-light.<ext>`,
9271
- * dark: `.gitbook/assets/favicon-dark.<ext>`, where `<ext>` is
9272
- * the image's file extension (e.g. `png`, `svg`, `ico`). Any
9273
- * other filename is rejected.
9274
- */
9275
- icon: GitSyncSiteCustomizationThemedAssetPath;
9276
- } | {
9277
- /** Unicode codepoint or character of the emoji */
9278
- emoji: Emoji;
9279
- };
9280
- /**
9281
- * Link destination, written as a path-string in YAML. Same format as
9282
- * markdown content links, e.g. `https://example.com`, `/pages/<id>`,
9283
- * `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
9284
- */
9285
- export type GitSyncSiteCustomizationContentLinkTo = string;
9286
- /** A label plus a destination, used inside header items, footer groups, and announcements. */
9287
- export interface GitSyncSiteCustomizationContentLink {
9288
- title: CustomizationContentLinkTitle;
9289
- /** Localized overrides for the link title, keyed by locale. */
9290
- localizedTitle?: LocalizedString64;
9291
- /**
9292
- * Link destination, written as a path-string in YAML. Same format as
9293
- * markdown content links, e.g. `https://example.com`, `/pages/<id>`,
9294
- * `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
9295
- */
9296
- to: GitSyncSiteCustomizationContentLinkTo;
9297
- }
9298
- /** A single item in the published site's top navigation bar. */
9299
- export interface GitSyncSiteCustomizationHeaderItem {
9300
- title: string;
9301
- /** Localized overrides for the header item title, keyed by locale. */
9302
- localizedTitle?: LocalizedString;
9303
- style?: "link" | "button-primary" | "button-secondary";
9304
- /**
9305
- * Header item destination. Use `null` for items that act as a
9306
- * dropdown root without a link of their own.
9307
- */
9308
- to: GitSyncSiteCustomizationContentLinkTo | null;
9309
- /** Sub-links shown as a dropdown under this header item. Empty array means no dropdown. */
9310
- links: GitSyncSiteCustomizationContentLink[];
9311
- /** Conditional expression evaluated to decide whether the item is shown to the visitor. */
9312
- condition?: Expression;
9313
- }
9314
- /** Header settings. */
9315
- export interface GitSyncSiteCustomizationHeader {
9316
- /**
9317
- * Themed header logo. Each variant must use its reserved repository
9318
- * asset path — light: `.gitbook/assets/header-logo-light.<ext>`, dark:
9319
- * `.gitbook/assets/header-logo-dark.<ext>`, where `<ext>` is the
9320
- * image's file extension (e.g. `png`, `svg`). Any other filename is
9321
- * rejected.
9322
- */
9323
- logo?: GitSyncSiteCustomizationThemedAssetPath;
9324
- /**
9325
- * Link destination, written as a path-string in YAML. Same format as
9326
- * markdown content links, e.g. `https://example.com`, `/pages/<id>`,
9327
- * `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
9328
- */
9329
- primaryLink?: GitSyncSiteCustomizationContentLinkTo;
9330
- links?: GitSyncSiteCustomizationHeaderItem[];
9331
- }
9332
- /** A group of links shown in the published site's footer. */
9333
- export interface GitSyncSiteCustomizationFooterGroup {
9334
- title: string;
9335
- /** Localized overrides for the footer group title, keyed by locale. */
9336
- localizedTitle?: LocalizedString;
9337
- links: GitSyncSiteCustomizationContentLink[];
9338
- }
9339
- /** Footer settings. */
9340
- export interface GitSyncSiteCustomizationFooter {
9341
- /**
9342
- * Themed footer logo. Each variant must use its reserved repository
9343
- * asset path — light: `.gitbook/assets/footer-logo-light.<ext>`, dark:
9344
- * `.gitbook/assets/footer-logo-dark.<ext>`, where `<ext>` is the
9345
- * image's file extension (e.g. `png`, `svg`). Any other filename is
9346
- * rejected.
9347
- */
9348
- logo?: GitSyncSiteCustomizationThemedAssetPath;
9349
- groups?: GitSyncSiteCustomizationFooterGroup[];
9350
- /** @maxLength 300 */
9351
- copyright?: string;
9352
- }
9353
- /** Announcement banner shown above the published site. */
9354
- export interface GitSyncSiteCustomizationAnnouncement {
9355
- /** Whether to show the site's announcement. */
9356
- enabled: boolean;
9357
- /** The text content of the announcement. */
9358
- message: CustomizationAnnouncementMessage;
9359
- /** Localized overrides for the announcement message, keyed by locale. */
9360
- localizedMessage?: LocalizedString128;
9361
- /** The content or URL the announcement links to when clicked. */
9362
- link?: GitSyncSiteCustomizationContentLink;
9363
- /** Semantic style of the announcement banner. */
9364
- style: "info" | "warning" | "danger" | "success";
9365
- }
9366
- /** Dark/light theme mode settings. */
9367
- export interface GitSyncSiteCustomizationThemeModes {
9368
- default: CustomizationDefaultThemeMode;
9369
- /** Whether readers can switch between dark and light mode. */
9370
- toggeable: boolean;
9371
- }
9372
- /** Reader feedback settings. */
9373
- export interface GitSyncSiteCustomizationFeedback {
9374
- /** Whether reader feedback gathering is enabled. */
9375
- enabled: boolean;
9376
- }
9377
- /** AI assistant settings. */
9378
- export interface GitSyncSiteCustomizationAI {
9379
- mode: CustomizationAIMode;
9380
- /** Suggested questions to display at the start of the chosen AI mode. */
9381
- suggestions?: CustomizationSuggestedQuestions;
9382
- }
9383
- /**
9384
- * Ordered page-level action buttons exposed in the published site's page menu.
9385
- * @uniqueItems true
9386
- */
9387
- export type GitSyncSiteCustomizationPageActions = CustomizationPageActionType[];
9388
- /** External link behavior. */
9389
- export interface GitSyncSiteCustomizationExternalLinks {
9390
- /**
9391
- * How external links should open when clicked.
9392
- * - `self`: External links open in the current tab.
9393
- * - `blank`: External links open in a new browser tab.
9394
- */
9395
- target: SiteExternalLinksTarget;
9396
- }
9397
- /** Pagination navigation settings. */
9398
- export interface GitSyncSiteCustomizationPagination {
9399
- /** Whether the prev/next pagination navigation is shown on pages. */
9400
- enabled: boolean;
9401
- }
9402
- /** Privacy policy link shown on the published site. */
9403
- export interface GitSyncSiteCustomizationPrivacyPolicy {
9404
- url?: URL;
9405
- }
9406
- /** Social preview asset. */
9407
- export interface GitSyncSiteCustomizationSocialPreview {
9408
- /**
9409
- * Reserved repository asset path for the social preview image:
9410
- * `.gitbook/assets/social-preview.<ext>`, where `<ext>` is the
9411
- * image's file extension (e.g. `png`, `jpg`). Any other filename is
9412
- * rejected.
9413
- */
9414
- url?: GitSyncSiteCustomizationAssetPath;
9415
- }
9416
- /** A single social account entry. */
9417
- export interface GitSyncSiteCustomizationSocialAccount {
9418
- /** The platform of the social handle. */
9419
- platform: SiteSocialAccountPlatform;
9420
- /** A handle on a social platform, without prefixes like the @ symbol. */
9421
- handle: SiteSocialAccountHandle;
9422
- display: {
9423
- footer: boolean;
9424
- header: boolean;
9425
- };
9426
- }
9427
- /** Visitor insights settings. */
9428
- export interface GitSyncSiteCustomizationInsights {
9429
- /** Whether GitBook identifies visitors on the site using a cookie. */
9430
- trackingCookie: boolean;
9431
- }
9432
- /**
9433
- * Customization settings for the published site, authored in `docs.yaml`.
9434
- *
9435
- * Every top-level field is optional — a Git Sync YAML is a **sparse override** of
9436
- * the live customization. Fields you don't include stay at whatever the site
9437
- * has as default.
9438
- *
9439
- * Custom fonts referenced from `styling.font` / `styling.monospaceFont` must
9440
- * have a matching definition under `site.fonts[]`.
9441
- */
9442
- export interface GitSyncSiteCustomization {
9443
- /** Title to use for the published site. If omitted, falls back to the default site title. */
9444
- publishedTitle?: SiteTitle;
9445
- /** Localized titles for the published site, keyed by locale. */
9446
- localizedPublishedTitles?: LocalizedString128;
9447
- /** Styling settings. */
9448
- styling?: GitSyncSiteCustomizationStyling;
9449
- /** Favicon for the published site. The `icon` variant references a repository asset path; the `emoji` variant uses a single emoji character; */
9450
- favicon?: GitSyncSiteCustomizationFavicon;
9451
- /** Header settings. */
9452
- header?: GitSyncSiteCustomizationHeader;
9453
- /** Footer settings. */
9454
- footer?: GitSyncSiteCustomizationFooter;
9455
- /** Announcement banner shown above the published site. */
9456
- announcement?: GitSyncSiteCustomizationAnnouncement;
9457
- /** Dark/light theme mode settings. */
9458
- themeModes?: GitSyncSiteCustomizationThemeModes;
9459
- /** Reader feedback settings. */
9460
- feedback?: GitSyncSiteCustomizationFeedback;
9461
- /** AI assistant settings. */
9462
- ai?: GitSyncSiteCustomizationAI;
9463
- /** Ordered page-level action buttons exposed in the published site's page menu. */
9464
- pageActions?: GitSyncSiteCustomizationPageActions;
9465
- /** External link behavior. */
9466
- externalLinks?: GitSyncSiteCustomizationExternalLinks;
9467
- /** Pagination navigation settings. */
9468
- pagination?: GitSyncSiteCustomizationPagination;
9469
- /** Privacy policy link shown on the published site. */
9470
- privacyPolicy?: GitSyncSiteCustomizationPrivacyPolicy;
9471
- /** Social preview asset. */
9472
- socialPreview?: GitSyncSiteCustomizationSocialPreview;
9473
- /**
9474
- * Social accounts to surface on the site.
9475
- * @maxItems 10
9476
- */
9477
- socialAccounts?: GitSyncSiteCustomizationSocialAccount[];
9478
- /** Visitor insights settings. */
9479
- insights?: GitSyncSiteCustomizationInsights;
9480
- }
9481
9182
  /**
9482
9183
  * Schema for a site `docs.yaml` file — the canonical contract for what
9483
9184
  * can be authored in Git Sync to drive a site's customization and structure.
@@ -9500,19 +9201,6 @@ export interface GitSyncSiteConfig {
9500
9201
  * three node types: a section group, a section, or a space.
9501
9202
  */
9502
9203
  structure: GitSyncSiteStructure;
9503
- /** Custom font definitions referenced from `site.customization.styling`. */
9504
- fonts?: GitSyncSiteCustomizationFontDefinition[];
9505
- /**
9506
- * Customization settings for the published site, authored in `docs.yaml`.
9507
- *
9508
- * Every top-level field is optional — a Git Sync YAML is a **sparse override** of
9509
- * the live customization. Fields you don't include stay at whatever the site
9510
- * has as default.
9511
- *
9512
- * Custom fonts referenced from `styling.font` / `styling.monospaceFont` must
9513
- * have a matching definition under `site.fonts[]`.
9514
- */
9515
- customization?: GitSyncSiteCustomization;
9516
9204
  };
9517
9205
  }
9518
9206
  export type IntegrationEnvironmentSpaceInstallation = IntegrationContentInstallationBase & {
@@ -10281,7 +9969,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10281
9969
  */
10282
9970
  deleteSpaceById: (spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10283
9971
  /**
10284
- * @description Creates a new space that is a complete copy of the specified space, including all pages and their content. The duplicate is created in the same organization. Returns the newly created space. Use this to create a template-based copy or to snapshot a space before making large changes.
9972
+ * @description Creates a new space that is a complete copy of the specified space, including all pages and their content. The duplicate is created in the same organization. It does not preserve or create a placement in a site. When duplicating from a site context, use duplicateSiteSpace instead. Use this operation for an organization-level or orphan-space copy.
10285
9973
  *
10286
9974
  * @tags spaces
10287
9975
  * @name DuplicateSpace
@@ -10370,7 +10058,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10370
10058
  items: SearchPageResult[];
10371
10059
  }, any>>;
10372
10060
  /**
10373
- * @description Triggers an import from the linked Git repository into the space, updating the space's content to match the repository. This is an async operation — it runs in the background after the request returns 204. Use getSpaceGitInfo to check sync status. The space must already have a Git provider configured.
10061
+ * @description Triggers an import from provided Git repository into the space, updating the space's content to match the repository (if not standalone). This is an async operation — it runs in the background after the request returns 204.
10374
10062
  *
10375
10063
  * @tags space-git
10376
10064
  * @name ImportGitRepository
@@ -10380,7 +10068,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10380
10068
  */
10381
10069
  importGitRepository: (spaceId: EntityId, data: ImportGitRepository, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10382
10070
  /**
10383
- * @description Triggers an export of the space's current content to the linked Git repository. This is an async operation — the export runs in the background after the request returns 204. Use getSpaceGitInfo to check the current git sync status. The space must already have a Git provider configured.
10071
+ * @description Triggers an export of the space's current content to the provided Git repository. This is an async operation — the export runs in the background after the request returns 204.
10384
10072
  *
10385
10073
  * @tags space-git
10386
10074
  * @name ExportToGitRepository
@@ -11296,7 +10984,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11296
10984
  computed?: boolean;
11297
10985
  }, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
11298
10986
  /**
11299
- * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.
10987
+ * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
11300
10988
  *
11301
10989
  * @tags change-request-content
11302
10990
  * @name UpdateChangeRequestContent
@@ -11310,7 +10998,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11310
10998
  * @minItems 1
11311
10999
  */
11312
11000
  changes: ChangeRequestContentChange[];
11313
- }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, {
11001
+ }, query?: {
11002
+ /**
11003
+ * When `true`, the updated change request is returned. When `false`, the updated change request and the list of affected pages are returned.
11004
+ * @default true
11005
+ */
11006
+ compat?: boolean;
11007
+ }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest | ChangeRequestContentUpdate, {
11314
11008
  error: {
11315
11009
  /** @format int32 */
11316
11010
  code: 404;
@@ -14877,6 +14571,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14877
14571
  * @default false
14878
14572
  */
14879
14573
  draft?: boolean;
14574
+ /** Custom home page within the space, rendered at the site space's path root instead of the space's default landing page. */
14575
+ pageId?: string | null;
14880
14576
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
14881
14577
  /**
14882
14578
  * @description Returns a paginated list of site spaces — the links between a site and its content source spaces. Each site space can be a language variant or content version within a section. Use the default filter to retrieve only the primary site space, or omit it to get all linked spaces including drafts.
@@ -15283,6 +14979,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15283
14979
  hasChangeRequests?: boolean;
15284
14980
  /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are returned. */
15285
14981
  source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
14982
+ /** Sort findings by the given field. */
14983
+ orderBy?: SiteFindingOrderBy;
15286
14984
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15287
14985
  items: SiteFinding[];
15288
14986
  }, any>>;
@@ -15409,6 +15107,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15409
15107
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15410
15108
  items: ContextRecord[];
15411
15109
  }, any>>;
15110
+ /**
15111
+ * @description Returns aggregate statistics about the findings GitBook identified on a site — how many were found, how they break down by status and severity, which connectors surfaced them, and how many change requests created to fix them have been merged. Accepts the same filters as the finding list endpoint, so the stats can follow the list the user is looking at. Use it for a high-level view before drilling into individual findings.
15112
+ *
15113
+ * @tags site-context
15114
+ * @name GetSiteFindingStats
15115
+ * @summary Get aggregate statistics about the findings identified on a site
15116
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/stats/findings
15117
+ * @secure
15118
+ */
15119
+ getSiteFindingStats: (organizationId: EntityId, siteId: string, query?: {
15120
+ /** Filter findings by associated site topic ID. */
15121
+ topic?: string;
15122
+ /** Filter findings by status. */
15123
+ status?: SiteFindingStatus;
15124
+ /** Filter findings by type. */
15125
+ type?: SiteFindingType;
15126
+ /** Filter findings by estimated severity. */
15127
+ severity?: SiteFindingSeverity;
15128
+ /** Filter findings that have at least one associated change request. */
15129
+ hasChangeRequests?: boolean;
15130
+ /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are counted. */
15131
+ source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
15132
+ }, params?: RequestParams) => Promise<HttpResponse<SiteFindingStats, any>>;
15412
15133
  /**
15413
15134
  * No description
15414
15135
  *
@@ -15770,6 +15491,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15770
15491
  path?: SiteSpacePath;
15771
15492
  /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
15772
15493
  condition?: Expression | null;
15494
+ /** Custom home page within the space, rendered at the site space's path root instead of the space's default landing page. If not set, the page will remain unchanged unless spaceId is changed, in which case the custom home page will be removed. If set to null, the custom home page will be removed. */
15495
+ pageId?: string | null;
15773
15496
  /** The content that this site space points to. If not set, the space will remain unchanged. */
15774
15497
  spaceId?: string;
15775
15498
  /** Whether the site space is hidden. If true, the site space will not be shown in the site's navigation. If not set, the hidden state will remain unchanged. If set to false, the site space will be shown in site navigation. */
@@ -15787,6 +15510,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15787
15510
  * @secure
15788
15511
  */
15789
15512
  deleteSiteSpaceById: (organizationId: EntityId, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15513
+ /**
15514
+ * @description Creates a full copy of the space linked by the specified site space. When the site space is the only variant in a section, the copy is placed in a new sibling section. Otherwise, it is added as a variant under the same parent. Prefer this operation over duplicateSpace whenever the request originates from a site or needs to preserve site placement.
15515
+ *
15516
+ * @tags site-spaces, spaces
15517
+ * @name DuplicateSiteSpace
15518
+ * @summary Duplicate a space in a site
15519
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/duplicate
15520
+ * @secure
15521
+ */
15522
+ duplicateSiteSpace: (organizationId: EntityId, siteId: string, siteSpaceId: string, data: {
15523
+ /**
15524
+ * Whether the duplicated site space and any new section should be created as drafts.
15525
+ * @default false
15526
+ */
15527
+ draft?: boolean;
15528
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
15790
15529
  /**
15791
15530
  * @description Retrieves the customization settings that override the site-level branding for a specific site space, such as a language variant or content version. Returns the effective settings with site-level defaults where no override is set. Use this before applying or removing overrides.
15792
15531
  *
@@ -16233,6 +15972,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16233
15972
  type: SiteCoreChannelType;
16234
15973
  };
16235
15974
  }, params?: RequestParams) => EventIterator<AIStreamResponse>;
15975
+ /**
15976
+ * @description Populates an empty site with GitBook's default documentation structure, content, and customization. Use this after creating a site without spaces to give it a ready-to-edit starting point.
15977
+ *
15978
+ * @tags sites
15979
+ * @name ApplyTemplateToSite
15980
+ * @summary Apply the default documentation template to a site
15981
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/template
15982
+ * @secure
15983
+ */
15984
+ applyTemplateToSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16236
15985
  /**
16237
15986
  * @description Retrieves the configuration for the AI built into the GitBook editor that assists authors with drafting and refining content changes. Use this before updating agent settings to understand the current configuration.
16238
15987
  *