@gitbook/api 0.191.0 → 0.192.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
@@ -1278,16 +1287,18 @@ export type MergeRulesSpaceConfiguration = MergeRulesConfigurationInherit | Merg
1278
1287
  export interface GitSyncState {
1279
1288
  /** Repository name. */
1280
1289
  repoName?: string;
1281
- installationStatus?: GitSyncInstallationStatus;
1290
+ installationStatus: GitSyncInstallationStatus;
1282
1291
  /** The provider of the Git Sync installation. */
1283
- installationProvider?: GitSyncProvider;
1292
+ installationProvider: GitSyncProvider;
1284
1293
  /**
1285
1294
  * The integration name providing the Git Sync.
1286
1295
  * @deprecated
1287
1296
  */
1288
1297
  integration?: string;
1289
1298
  /** The ID of the Git Sync installation. */
1290
- installationId?: string;
1299
+ installationId: string;
1300
+ /** The ID of the parent Git Sync installation, if any. */
1301
+ parentInstallationId?: string;
1291
1302
  /** The URL to the repository tree, used when rendering public content. */
1292
1303
  url?: string;
1293
1304
  /** The latest operation on the Git Sync installation. */
@@ -1299,6 +1310,11 @@ export interface GitSyncState {
1299
1310
  * * `timeout`: The operation timed out
1300
1311
  */
1301
1312
  state: GitSyncOperationState;
1313
+ direction: GitSyncOperationDirection;
1314
+ startedAt: Timestamp;
1315
+ endedAt?: Timestamp;
1316
+ /** Why the operation failed, when it did. */
1317
+ error?: string;
1302
1318
  };
1303
1319
  /** When the Git provider details were last updated */
1304
1320
  updatedAt?: Timestamp;
@@ -1495,6 +1511,8 @@ export interface SearchSectionResult {
1495
1511
  path: string;
1496
1512
  /** Relevance score for a search result. Higher is better and the score is unbounded. */
1497
1513
  score: SearchResultScore;
1514
+ /** 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. */
1515
+ resultType?: "page" | "section";
1498
1516
  body: string;
1499
1517
  /** URLs associated with the object */
1500
1518
  urls: {
@@ -1512,6 +1530,8 @@ export interface SearchPageResult {
1512
1530
  path: string;
1513
1531
  /** Relevance score for a search result. Higher is better and the score is unbounded. */
1514
1532
  score: SearchResultScore;
1533
+ /** Whether the page matched on its own fields (title, description) or on the content of one of its sections. */
1534
+ resultType?: "page" | "section";
1515
1535
  sections?: SearchSectionResult[];
1516
1536
  /** Data about the ancestors of the current page, from top-level to direct parent. */
1517
1537
  ancestors: {
@@ -1925,6 +1945,69 @@ export interface DocumentBlockCode {
1925
1945
  nodes: DocumentBlockCodeLine[];
1926
1946
  isVoid?: false;
1927
1947
  }
1948
+ export interface DocumentBlockEmbed {
1949
+ object: "block";
1950
+ type: "embed";
1951
+ key?: string;
1952
+ data: {
1953
+ url: string;
1954
+ fullWidth?: boolean;
1955
+ };
1956
+ isVoid: true;
1957
+ }
1958
+ export type PlainObject = any;
1959
+ /** Action to open an overlay modal defined by "componentId". */
1960
+ export type ContentKitDefaultAction = {
1961
+ action: "@ui.modal.open";
1962
+ componentId: string;
1963
+ props: PlainObject;
1964
+ } | {
1965
+ action: "@ui.modal.close";
1966
+ returnValue: PlainObject;
1967
+ } | {
1968
+ action: "@ui.url.open";
1969
+ url: string;
1970
+ } | {
1971
+ action: "@link.unfurl";
1972
+ url: string;
1973
+ } | {
1974
+ action: "@editor.node.updateProps";
1975
+ props: PlainObject;
1976
+ };
1977
+ /** Custom action to re-render the block. */
1978
+ export type ContentKitAction = {
1979
+ action: string;
1980
+ [key: string]: any;
1981
+ } | ContentKitDefaultAction;
1982
+ export interface DocumentBlockIntegration {
1983
+ object: "block";
1984
+ type: "integration";
1985
+ key?: string;
1986
+ data: {
1987
+ /** Name of the integration */
1988
+ integration: string;
1989
+ /** ID of the block in the integration */
1990
+ block: string;
1991
+ /** Properties passed to the block during rendering */
1992
+ props: PlainObject;
1993
+ /** Custom action to re-render the block. */
1994
+ action?: ContentKitAction;
1995
+ /**
1996
+ * URL associated with the content represented by the block.
1997
+ * This property is set when creating a block from a URL (unfurl) to ensure
1998
+ * we can convert the block back to an embed.
1999
+ */
2000
+ url?: string;
2001
+ fullWidth?: boolean;
2002
+ };
2003
+ isVoid: true;
2004
+ meta?: {
2005
+ /** A content token that can be used to authenticate requests for cross-space integration blocks. */
2006
+ token?: string;
2007
+ /** ID of the space the integration block originates from */
2008
+ spaceId?: string;
2009
+ };
2010
+ }
1928
2011
  export interface DocumentBlockHint {
1929
2012
  object: "block";
1930
2013
  type: "hint";
@@ -1934,7 +2017,7 @@ export interface DocumentBlockHint {
1934
2017
  /** Name of the icon */
1935
2018
  icon?: Icon;
1936
2019
  };
1937
- nodes: DocumentBlocksEssentials[];
2020
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration)[];
1938
2021
  isVoid?: false;
1939
2022
  }
1940
2023
  export interface DocumentBlockQuote {
@@ -2205,16 +2288,6 @@ export interface DocumentBlockDrawing {
2205
2288
  };
2206
2289
  isVoid: true;
2207
2290
  }
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
2291
  export interface DocumentBlockReusableContent {
2219
2292
  object: "block";
2220
2293
  type: "reusable-content";
@@ -2228,59 +2301,6 @@ export interface DocumentBlockReusableContent {
2228
2301
  token?: string;
2229
2302
  };
2230
2303
  }
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
2304
  export interface DocumentBlockExpandable {
2285
2305
  object: "block";
2286
2306
  type: "expandable";
@@ -2502,12 +2522,19 @@ export interface DocumentInlineMention {
2502
2522
  };
2503
2523
  isVoid: true;
2504
2524
  }
2525
+ /** Action to perform when an inline button is clicked. */
2505
2526
  export type DocumentAction = {
2506
2527
  action: "search";
2528
+ /** The search query to prefill. */
2507
2529
  query?: string;
2508
2530
  } | {
2509
2531
  action: "ask";
2532
+ /** The question to prefill. */
2510
2533
  query?: string;
2534
+ } | {
2535
+ action: "select";
2536
+ /** The slug of the option to select. */
2537
+ slug: string;
2511
2538
  };
2512
2539
  export interface DocumentInlineButton {
2513
2540
  object: "inline";
@@ -2523,6 +2550,7 @@ export interface DocumentInlineButton {
2523
2550
  /** A relative reference to content in GitBook. */
2524
2551
  ref: ContentRef;
2525
2552
  } | {
2553
+ /** Action to perform when an inline button is clicked. */
2526
2554
  action: DocumentAction;
2527
2555
  });
2528
2556
  isVoid: true;
@@ -6053,13 +6081,56 @@ export interface GitSyncInstallationSetupGitLab {
6053
6081
  }
6054
6082
  /** Provider-specific setup payload for a Git Sync installation. */
6055
6083
  export type GitSyncInstallationSetup = GitSyncInstallationSetupCommon & (GitSyncInstallationSetupGitHub | GitSyncInstallationSetupGitLab);
6084
+ export interface GitRepositoryConnection {
6085
+ object: "git-repository-connection";
6086
+ /** Unique identifier of the repository connection. */
6087
+ id: string;
6088
+ /** The provider of the Git Sync installation. */
6089
+ provider: GitSyncInstallationProvider;
6090
+ /** Repository identifier assigned by the provider. */
6091
+ repositoryId: string;
6092
+ /** Full repository name assigned by the provider. */
6093
+ repositoryName: string;
6094
+ /**
6095
+ * URL of the repository on the provider.
6096
+ * @format uri
6097
+ */
6098
+ repositoryUrl: string;
6099
+ /** Default branch reported by the provider. */
6100
+ defaultBranch?: string;
6101
+ authState: "pending" | "active" | "unauthenticated";
6102
+ /** Provider operations available to this repository connection. */
6103
+ capabilities: {
6104
+ /** Whether the connection can create and update GitHub pull requests or GitLab merge requests. */
6105
+ pullRequests: boolean;
6106
+ /** Whether the connection can publish GitBook synchronization results as provider commit statuses. */
6107
+ commitStatuses: boolean;
6108
+ };
6109
+ createdAt: Timestamp;
6110
+ updatedAt: Timestamp;
6111
+ }
6112
+ export interface GitRepositoryRef {
6113
+ object: "git-repository-ref";
6114
+ /** Unique identifier of the repository ref. */
6115
+ id: string;
6116
+ /** Fully qualified provider ref name. */
6117
+ name: string;
6118
+ type: "branch" | "tag" | "change-request-head";
6119
+ latestObservedCommitId?: string;
6120
+ latestImportedCommitId?: string;
6121
+ updatedAt: Timestamp;
6122
+ }
6056
6123
  export type GitSyncInstallation = GitSyncInstallationSetup & {
6057
6124
  object: "git-sync-installation";
6058
6125
  /** Unique identifier of the Git Sync installation. */
6059
6126
  id: string;
6127
+ /** The ID of the parent Git Sync installation, if any. */
6128
+ parentInstallationId?: string;
6060
6129
  /** Resource targeted by a Git Sync installation. */
6061
6130
  target: GitSyncInstallationTarget;
6062
6131
  status: GitSyncInstallationStatus;
6132
+ repositoryConnection?: GitRepositoryConnection;
6133
+ repositoryRef?: GitRepositoryRef;
6063
6134
  createdAt: Timestamp;
6064
6135
  /** Identifier of the user who created the installation. */
6065
6136
  createdBy: string;
@@ -6200,6 +6271,11 @@ export type CustomizationSuggestedQuestion = string;
6200
6271
  * @maxItems 5
6201
6272
  */
6202
6273
  export type CustomizationSuggestedQuestions = CustomizationSuggestedQuestion[];
6274
+ /**
6275
+ * 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.
6276
+ * @maxLength 10000
6277
+ */
6278
+ export type CustomizationAIInstructions = string;
6203
6279
  /**
6204
6280
  * A handle on a social platform, without prefixes like the @ symbol.
6205
6281
  * @minLength 1
@@ -6333,6 +6409,8 @@ export interface SiteCustomizationSettingsBase {
6333
6409
  mode: CustomizationAIMode;
6334
6410
  /** Suggested questions to display at the start of the chosen AI mode. */
6335
6411
  suggestions?: CustomizationSuggestedQuestions;
6412
+ /** 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. */
6413
+ instructions?: CustomizationAIInstructions;
6336
6414
  };
6337
6415
  advancedCustomization: {
6338
6416
  /** If true, Advanced customization is enabled */
@@ -6789,6 +6867,41 @@ export interface SiteQuestion {
6789
6867
  location: string;
6790
6868
  };
6791
6869
  }
6870
+ /** Count of findings by status. Candidate findings are never counted. */
6871
+ export interface SiteFindingStatsStatuses {
6872
+ /** Count of findings surfaced to users and still under investigation. */
6873
+ open: number;
6874
+ /** Count of findings that have been resolved. */
6875
+ done: number;
6876
+ /** Count of findings that have been canceled. */
6877
+ canceled: number;
6878
+ }
6879
+ /** Count of findings by estimated end-user severity. */
6880
+ export interface SiteFindingStatsSeverities {
6881
+ /** Count of findings with a low estimated severity. */
6882
+ low: number;
6883
+ /** Count of findings with a medium estimated severity. */
6884
+ medium: number;
6885
+ /** Count of findings with a high estimated severity. */
6886
+ high: number;
6887
+ }
6888
+ /** 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. */
6889
+ export type SiteFindingStatsConnectors = Record<string, number>;
6890
+ /** Aggregated stats for the findings identified on a site. */
6891
+ export interface SiteFindingStats {
6892
+ /** Total count of findings included in the aggregation. */
6893
+ total: number;
6894
+ /** Count of findings by status. Candidate findings are never counted. */
6895
+ statuses: SiteFindingStatsStatuses;
6896
+ /** Count of findings by estimated end-user severity. */
6897
+ severities: SiteFindingStatsSeverities;
6898
+ /** 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. */
6899
+ connectors: SiteFindingStatsConnectors;
6900
+ /** Count of findings with at least one piece of evidence coming from a site question. */
6901
+ questions: number;
6902
+ /** Count of change requests created to fix a finding that have been merged. */
6903
+ mergedChangeRequests: number;
6904
+ }
6792
6905
  /**
6793
6906
  * Optional label for the connection
6794
6907
  * @minLength 0
@@ -7890,21 +8003,6 @@ export type SiteInsightsEventPagePostFeedbackComment = SiteInsightsEventBase & {
7890
8003
  };
7891
8004
  export type SiteInsightsEventAgentFeedback = SiteInsightsEventBase & {
7892
8005
  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
8006
  };
7909
8007
  export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
7910
8008
  type: "ask_question";
@@ -8440,6 +8538,12 @@ export interface UnsplashImage {
8440
8538
  export interface HiveAccessToken {
8441
8539
  contents: Record<string, string>;
8442
8540
  }
8541
+ export interface APIIntercomMessengerToken {
8542
+ /** Short-lived JWT used to authenticate the user with Intercom Messenger */
8543
+ token: string;
8544
+ /** Unix timestamp in seconds when the token expires */
8545
+ expiresAt: number;
8546
+ }
8443
8547
  export interface SignedURL {
8444
8548
  /** The kind of signed URL */
8445
8549
  object: "signed-url";
@@ -8938,10 +9042,11 @@ export interface GitSyncSiteStructureSectionGroup {
8938
9042
  * A space — a single content unit in the site's navigation tree. Discriminated
8939
9043
  * by `type: space`.
8940
9044
  *
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.
9045
+ * The space's content either lives in the synced repository at the directory
9046
+ * pointed to by `content.directory`, or does not inherit the site's repository
9047
+ * when `content.directory` is `null`. Hierarchy comes from where the space
9048
+ * appears in the YAML (under a section, a section group, or at the root), not
9049
+ * from an explicit parent reference.
8945
9050
  */
8946
9051
  export interface GitSyncSiteStructureSpace {
8947
9052
  /** Discriminator for a space node. */
@@ -8967,13 +9072,10 @@ export interface GitSyncSiteStructureSpace {
8967
9072
  draft?: boolean;
8968
9073
  /** Expression to evaluate */
8969
9074
  condition?: Expression;
8970
- /** Where the space's content lives in the synced repository. */
9075
+ /** Where the space's content is managed. */
8971
9076
  content: {
8972
- /**
8973
- * Repository-relative directory containing this space's content.
8974
- * @minLength 1
8975
- */
8976
- directory: string;
9077
+ /** Repository-relative directory containing this space's content. */
9078
+ directory: string | null;
8977
9079
  language?: TranslationLanguage;
8978
9080
  };
8979
9081
  }
@@ -9006,8 +9108,6 @@ export interface GitSyncSiteStructureSection {
9006
9108
  icon?: Icon;
9007
9109
  /** Whether this is the default section for the site. */
9008
9110
  default?: boolean;
9009
- /** Whether the section is draft and not live. */
9010
- draft?: boolean;
9011
9111
  /** Path to the section on the site */
9012
9112
  path: SiteSectionPath;
9013
9113
  /** Expression to evaluate */
@@ -9025,459 +9125,6 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
9025
9125
  * three node types: a section group, a section, or a space.
9026
9126
  */
9027
9127
  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
9128
  /**
9482
9129
  * Schema for a site `docs.yaml` file — the canonical contract for what
9483
9130
  * can be authored in Git Sync to drive a site's customization and structure.
@@ -9500,19 +9147,6 @@ export interface GitSyncSiteConfig {
9500
9147
  * three node types: a section group, a section, or a space.
9501
9148
  */
9502
9149
  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
9150
  };
9517
9151
  }
9518
9152
  export type IntegrationEnvironmentSpaceInstallation = IntegrationContentInstallationBase & {
@@ -10281,7 +9915,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10281
9915
  */
10282
9916
  deleteSpaceById: (spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10283
9917
  /**
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.
9918
+ * @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
9919
  *
10286
9920
  * @tags spaces
10287
9921
  * @name DuplicateSpace
@@ -10370,7 +10004,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10370
10004
  items: SearchPageResult[];
10371
10005
  }, any>>;
10372
10006
  /**
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.
10007
+ * @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
10008
  *
10375
10009
  * @tags space-git
10376
10010
  * @name ImportGitRepository
@@ -10380,7 +10014,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10380
10014
  */
10381
10015
  importGitRepository: (spaceId: EntityId, data: ImportGitRepository, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10382
10016
  /**
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.
10017
+ * @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
10018
  *
10385
10019
  * @tags space-git
10386
10020
  * @name ExportToGitRepository
@@ -15283,6 +14917,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15283
14917
  hasChangeRequests?: boolean;
15284
14918
  /** 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
14919
  source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
14920
+ /** Sort findings by the given field. */
14921
+ orderBy?: SiteFindingOrderBy;
15286
14922
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15287
14923
  items: SiteFinding[];
15288
14924
  }, any>>;
@@ -15409,6 +15045,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15409
15045
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15410
15046
  items: ContextRecord[];
15411
15047
  }, any>>;
15048
+ /**
15049
+ * @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.
15050
+ *
15051
+ * @tags site-context
15052
+ * @name GetSiteFindingStats
15053
+ * @summary Get aggregate statistics about the findings identified on a site
15054
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/stats/findings
15055
+ * @secure
15056
+ */
15057
+ getSiteFindingStats: (organizationId: EntityId, siteId: string, query?: {
15058
+ /** Filter findings by associated site topic ID. */
15059
+ topic?: string;
15060
+ /** Filter findings by status. */
15061
+ status?: SiteFindingStatus;
15062
+ /** Filter findings by type. */
15063
+ type?: SiteFindingType;
15064
+ /** Filter findings by estimated severity. */
15065
+ severity?: SiteFindingSeverity;
15066
+ /** Filter findings that have at least one associated change request. */
15067
+ hasChangeRequests?: boolean;
15068
+ /** 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. */
15069
+ source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
15070
+ }, params?: RequestParams) => Promise<HttpResponse<SiteFindingStats, any>>;
15412
15071
  /**
15413
15072
  * No description
15414
15073
  *
@@ -15787,6 +15446,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15787
15446
  * @secure
15788
15447
  */
15789
15448
  deleteSiteSpaceById: (organizationId: EntityId, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15449
+ /**
15450
+ * @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.
15451
+ *
15452
+ * @tags site-spaces, spaces
15453
+ * @name DuplicateSiteSpace
15454
+ * @summary Duplicate a space in a site
15455
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/duplicate
15456
+ * @secure
15457
+ */
15458
+ duplicateSiteSpace: (organizationId: EntityId, siteId: string, siteSpaceId: string, data: {
15459
+ /**
15460
+ * Whether the duplicated site space and any new section should be created as drafts.
15461
+ * @default false
15462
+ */
15463
+ draft?: boolean;
15464
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
15790
15465
  /**
15791
15466
  * @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
15467
  *
@@ -16233,6 +15908,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16233
15908
  type: SiteCoreChannelType;
16234
15909
  };
16235
15910
  }, params?: RequestParams) => EventIterator<AIStreamResponse>;
15911
+ /**
15912
+ * @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.
15913
+ *
15914
+ * @tags sites
15915
+ * @name ApplyTemplateToSite
15916
+ * @summary Apply the default documentation template to a site
15917
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/template
15918
+ * @secure
15919
+ */
15920
+ applyTemplateToSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16236
15921
  /**
16237
15922
  * @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
15923
  *