@gitbook/api 0.190.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,19 @@ 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
+ /** Findings source filter matching evidence coming from site questions. */
336
+ export declare enum SiteTriageFilterQuestions {
337
+ Questions = "questions"
338
+ }
335
339
  /** Estimated end-user severity of a site finding. */
336
340
  export declare enum SiteFindingSeverity {
337
341
  Low = "low",
@@ -618,6 +622,11 @@ export declare enum CustomizationTheme {
618
622
  Bold = "bold",
619
623
  Gradient = "gradient"
620
624
  }
625
+ /** The provider of the Git Sync installation. */
626
+ export declare enum GitSyncInstallationProvider {
627
+ Github = "github",
628
+ Gitlab = "gitlab"
629
+ }
621
630
  /** Which side should be treated as the source of truth when Git Sync is configured. */
622
631
  export declare enum GitSyncInstallationPriority {
623
632
  Git = "git",
@@ -991,6 +1000,10 @@ export declare enum MemberRole {
991
1000
  Comment = "comment",
992
1001
  Read = "read"
993
1002
  }
1003
+ export declare enum GitSyncOperationDirection {
1004
+ Export = "export",
1005
+ Import = "import"
1006
+ }
994
1007
  /**
995
1008
  * * `running`: The operation is still running
996
1009
  * * `failure`: The operation failed
@@ -1274,16 +1287,18 @@ export type MergeRulesSpaceConfiguration = MergeRulesConfigurationInherit | Merg
1274
1287
  export interface GitSyncState {
1275
1288
  /** Repository name. */
1276
1289
  repoName?: string;
1277
- installationStatus?: GitSyncInstallationStatus;
1290
+ installationStatus: GitSyncInstallationStatus;
1278
1291
  /** The provider of the Git Sync installation. */
1279
- installationProvider?: GitSyncProvider;
1292
+ installationProvider: GitSyncProvider;
1280
1293
  /**
1281
1294
  * The integration name providing the Git Sync.
1282
1295
  * @deprecated
1283
1296
  */
1284
1297
  integration?: string;
1285
1298
  /** The ID of the Git Sync installation. */
1286
- installationId?: string;
1299
+ installationId: string;
1300
+ /** The ID of the parent Git Sync installation, if any. */
1301
+ parentInstallationId?: string;
1287
1302
  /** The URL to the repository tree, used when rendering public content. */
1288
1303
  url?: string;
1289
1304
  /** The latest operation on the Git Sync installation. */
@@ -1295,6 +1310,11 @@ export interface GitSyncState {
1295
1310
  * * `timeout`: The operation timed out
1296
1311
  */
1297
1312
  state: GitSyncOperationState;
1313
+ direction: GitSyncOperationDirection;
1314
+ startedAt: Timestamp;
1315
+ endedAt?: Timestamp;
1316
+ /** Why the operation failed, when it did. */
1317
+ error?: string;
1298
1318
  };
1299
1319
  /** When the Git provider details were last updated */
1300
1320
  updatedAt?: Timestamp;
@@ -1491,6 +1511,8 @@ export interface SearchSectionResult {
1491
1511
  path: string;
1492
1512
  /** Relevance score for a search result. Higher is better and the score is unbounded. */
1493
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";
1494
1516
  body: string;
1495
1517
  /** URLs associated with the object */
1496
1518
  urls: {
@@ -1508,6 +1530,8 @@ export interface SearchPageResult {
1508
1530
  path: string;
1509
1531
  /** Relevance score for a search result. Higher is better and the score is unbounded. */
1510
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";
1511
1535
  sections?: SearchSectionResult[];
1512
1536
  /** Data about the ancestors of the current page, from top-level to direct parent. */
1513
1537
  ancestors: {
@@ -1921,6 +1945,69 @@ export interface DocumentBlockCode {
1921
1945
  nodes: DocumentBlockCodeLine[];
1922
1946
  isVoid?: false;
1923
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
+ }
1924
2011
  export interface DocumentBlockHint {
1925
2012
  object: "block";
1926
2013
  type: "hint";
@@ -1930,7 +2017,7 @@ export interface DocumentBlockHint {
1930
2017
  /** Name of the icon */
1931
2018
  icon?: Icon;
1932
2019
  };
1933
- nodes: DocumentBlocksEssentials[];
2020
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration)[];
1934
2021
  isVoid?: false;
1935
2022
  }
1936
2023
  export interface DocumentBlockQuote {
@@ -2201,16 +2288,6 @@ export interface DocumentBlockDrawing {
2201
2288
  };
2202
2289
  isVoid: true;
2203
2290
  }
2204
- export interface DocumentBlockEmbed {
2205
- object: "block";
2206
- type: "embed";
2207
- key?: string;
2208
- data: {
2209
- url: string;
2210
- fullWidth?: boolean;
2211
- };
2212
- isVoid: true;
2213
- }
2214
2291
  export interface DocumentBlockReusableContent {
2215
2292
  object: "block";
2216
2293
  type: "reusable-content";
@@ -2224,59 +2301,6 @@ export interface DocumentBlockReusableContent {
2224
2301
  token?: string;
2225
2302
  };
2226
2303
  }
2227
- export type PlainObject = any;
2228
- /** Action to open an overlay modal defined by "componentId". */
2229
- export type ContentKitDefaultAction = {
2230
- action: "@ui.modal.open";
2231
- componentId: string;
2232
- props: PlainObject;
2233
- } | {
2234
- action: "@ui.modal.close";
2235
- returnValue: PlainObject;
2236
- } | {
2237
- action: "@ui.url.open";
2238
- url: string;
2239
- } | {
2240
- action: "@link.unfurl";
2241
- url: string;
2242
- } | {
2243
- action: "@editor.node.updateProps";
2244
- props: PlainObject;
2245
- };
2246
- /** Custom action to re-render the block. */
2247
- export type ContentKitAction = {
2248
- action: string;
2249
- [key: string]: any;
2250
- } | ContentKitDefaultAction;
2251
- export interface DocumentBlockIntegration {
2252
- object: "block";
2253
- type: "integration";
2254
- key?: string;
2255
- data: {
2256
- /** Name of the integration */
2257
- integration: string;
2258
- /** ID of the block in the integration */
2259
- block: string;
2260
- /** Properties passed to the block during rendering */
2261
- props: PlainObject;
2262
- /** Custom action to re-render the block. */
2263
- action?: ContentKitAction;
2264
- /**
2265
- * URL associated with the content represented by the block.
2266
- * This property is set when creating a block from a URL (unfurl) to ensure
2267
- * we can convert the block back to an embed.
2268
- */
2269
- url?: string;
2270
- fullWidth?: boolean;
2271
- };
2272
- isVoid: true;
2273
- meta?: {
2274
- /** A content token that can be used to authenticate requests for cross-space integration blocks. */
2275
- token?: string;
2276
- /** ID of the space the integration block originates from */
2277
- spaceId?: string;
2278
- };
2279
- }
2280
2304
  export interface DocumentBlockExpandable {
2281
2305
  object: "block";
2282
2306
  type: "expandable";
@@ -2498,12 +2522,19 @@ export interface DocumentInlineMention {
2498
2522
  };
2499
2523
  isVoid: true;
2500
2524
  }
2525
+ /** Action to perform when an inline button is clicked. */
2501
2526
  export type DocumentAction = {
2502
2527
  action: "search";
2528
+ /** The search query to prefill. */
2503
2529
  query?: string;
2504
2530
  } | {
2505
2531
  action: "ask";
2532
+ /** The question to prefill. */
2506
2533
  query?: string;
2534
+ } | {
2535
+ action: "select";
2536
+ /** The slug of the option to select. */
2537
+ slug: string;
2507
2538
  };
2508
2539
  export interface DocumentInlineButton {
2509
2540
  object: "inline";
@@ -2519,6 +2550,7 @@ export interface DocumentInlineButton {
2519
2550
  /** A relative reference to content in GitBook. */
2520
2551
  ref: ContentRef;
2521
2552
  } | {
2553
+ /** Action to perform when an inline button is clicked. */
2522
2554
  action: DocumentAction;
2523
2555
  });
2524
2556
  isVoid: true;
@@ -6010,6 +6042,8 @@ export interface GitSyncInstallationSetupCommon {
6010
6042
  * @default false
6011
6043
  */
6012
6044
  previewExternalBranches?: boolean;
6045
+ /** Agent instruction files GitBook should always export at the repository root. */
6046
+ agentInstructions?: ("agents" | "claude")[];
6013
6047
  /** Which side should be treated as the source of truth when Git Sync is configured. */
6014
6048
  priority?: GitSyncInstallationPriority;
6015
6049
  }
@@ -6047,13 +6081,56 @@ export interface GitSyncInstallationSetupGitLab {
6047
6081
  }
6048
6082
  /** Provider-specific setup payload for a Git Sync installation. */
6049
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
+ }
6050
6123
  export type GitSyncInstallation = GitSyncInstallationSetup & {
6051
6124
  object: "git-sync-installation";
6052
6125
  /** Unique identifier of the Git Sync installation. */
6053
6126
  id: string;
6127
+ /** The ID of the parent Git Sync installation, if any. */
6128
+ parentInstallationId?: string;
6054
6129
  /** Resource targeted by a Git Sync installation. */
6055
6130
  target: GitSyncInstallationTarget;
6056
6131
  status: GitSyncInstallationStatus;
6132
+ repositoryConnection?: GitRepositoryConnection;
6133
+ repositoryRef?: GitRepositoryRef;
6057
6134
  createdAt: Timestamp;
6058
6135
  /** Identifier of the user who created the installation. */
6059
6136
  createdBy: string;
@@ -6194,6 +6271,11 @@ export type CustomizationSuggestedQuestion = string;
6194
6271
  * @maxItems 5
6195
6272
  */
6196
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;
6197
6279
  /**
6198
6280
  * A handle on a social platform, without prefixes like the @ symbol.
6199
6281
  * @minLength 1
@@ -6327,6 +6409,8 @@ export interface SiteCustomizationSettingsBase {
6327
6409
  mode: CustomizationAIMode;
6328
6410
  /** Suggested questions to display at the start of the chosen AI mode. */
6329
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;
6330
6414
  };
6331
6415
  advancedCustomization: {
6332
6416
  /** If true, Advanced customization is enabled */
@@ -6637,6 +6721,12 @@ export interface SiteScan {
6637
6721
  location: string;
6638
6722
  };
6639
6723
  }
6724
+ /**
6725
+ * Findings source filter matching evidence coming from a given connection,
6726
+ * encoded as `connection:<connectionId>`.
6727
+ * @pattern ^connection:.+$
6728
+ */
6729
+ export type SiteTriageFilterConnections = string;
6640
6730
  /**
6641
6731
  * Short finding title
6642
6732
  * @maxLength 256
@@ -6777,6 +6867,41 @@ export interface SiteQuestion {
6777
6867
  location: string;
6778
6868
  };
6779
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
+ }
6780
6905
  /**
6781
6906
  * Optional label for the connection
6782
6907
  * @minLength 0
@@ -7432,7 +7557,8 @@ export interface AIAttachmentFile {
7432
7557
  url: URL;
7433
7558
  /** Name of the file. */
7434
7559
  filename: string;
7435
- contentType: "application/pdf";
7560
+ /** MIME type of the file. Must be a file type supported by the underlying model (see the OpenAI file-inputs documentation). */
7561
+ contentType: string;
7436
7562
  }
7437
7563
  export type AIAttachment = AIAttachmentImage | AIAttachmentFile;
7438
7564
  /** Context about the current user sending a message. */
@@ -7877,21 +8003,6 @@ export type SiteInsightsEventPagePostFeedbackComment = SiteInsightsEventBase & {
7877
8003
  };
7878
8004
  export type SiteInsightsEventAgentFeedback = SiteInsightsEventBase & {
7879
8005
  type: "agent_feedback";
7880
- feedback: {
7881
- /**
7882
- * @minLength 1
7883
- * @maxLength 2048
7884
- */
7885
- content: string;
7886
- /**
7887
- * Classification of a site finding:
7888
- * - Outdated content: The content was correct but is no longer up to date with external context and may be misleading or incorrect.
7889
- * - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
7890
- * - Content gap: The content is missing important information that should be present to answer user questions effectively.
7891
- * - Other: Any other type of finding not covered by the above categories.
7892
- */
7893
- category: SiteFindingType;
7894
- };
7895
8006
  };
7896
8007
  export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
7897
8008
  type: "ask_question";
@@ -8427,6 +8538,12 @@ export interface UnsplashImage {
8427
8538
  export interface HiveAccessToken {
8428
8539
  contents: Record<string, string>;
8429
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
+ }
8430
8547
  export interface SignedURL {
8431
8548
  /** The kind of signed URL */
8432
8549
  object: "signed-url";
@@ -8925,10 +9042,11 @@ export interface GitSyncSiteStructureSectionGroup {
8925
9042
  * A space — a single content unit in the site's navigation tree. Discriminated
8926
9043
  * by `type: space`.
8927
9044
  *
8928
- * The space's content lives in the synced repository at the directory pointed
8929
- * to by `content.directory`. Hierarchy comes from where the space appears in
8930
- * the YAML (under a section, a section group, or at the root), not from an
8931
- * 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.
8932
9050
  */
8933
9051
  export interface GitSyncSiteStructureSpace {
8934
9052
  /** Discriminator for a space node. */
@@ -8954,13 +9072,10 @@ export interface GitSyncSiteStructureSpace {
8954
9072
  draft?: boolean;
8955
9073
  /** Expression to evaluate */
8956
9074
  condition?: Expression;
8957
- /** Where the space's content lives in the synced repository. */
9075
+ /** Where the space's content is managed. */
8958
9076
  content: {
8959
- /**
8960
- * Repository-relative directory containing this space's content.
8961
- * @minLength 1
8962
- */
8963
- directory: string;
9077
+ /** Repository-relative directory containing this space's content. */
9078
+ directory: string | null;
8964
9079
  language?: TranslationLanguage;
8965
9080
  };
8966
9081
  }
@@ -8993,8 +9108,6 @@ export interface GitSyncSiteStructureSection {
8993
9108
  icon?: Icon;
8994
9109
  /** Whether this is the default section for the site. */
8995
9110
  default?: boolean;
8996
- /** Whether the section is draft and not live. */
8997
- draft?: boolean;
8998
9111
  /** Path to the section on the site */
8999
9112
  path: SiteSectionPath;
9000
9113
  /** Expression to evaluate */
@@ -9012,459 +9125,6 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
9012
9125
  * three node types: a section group, a section, or a space.
9013
9126
  */
9014
9127
  export type GitSyncSiteStructure = GitSyncSiteStructureNode[];
9015
- /**
9016
- * Reserved repository-relative path to the font file:
9017
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9018
- * font definition's `key`, `<weight>` is this face's `weight`, and
9019
- * `<ext>` is one of `woff2`, `woff`.
9020
- *
9021
- * For example, a font with `key: brand` and a `700` face is read from
9022
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9023
- * @minLength 1
9024
- */
9025
- export type GitSyncSiteCustomizationFontSource = string;
9026
- /**
9027
- * Custom font definition for a `site.fonts[]` entry. Referenced from
9028
- * `customization.styling.font` or `customization.styling.monospaceFont` via
9029
- * its `key`.
9030
- *
9031
- * Rules enforced on a definition:
9032
- * - It must declare exactly one face for the `400` weight and one for the
9033
- * `700` weight; the `600` weight is optional. No other weights are allowed,
9034
- * and a weight may not be declared more than once.
9035
- * - Each face has a single source file whose `url` is the reserved repository
9036
- * asset path `.gitbook/assets/<key>-<weight>.<ext>` (`<ext>` is `woff2` or
9037
- * `woff`). For example a definition with `key: brand` is read from
9038
- * `.gitbook/assets/brand-400.woff2` and `.gitbook/assets/brand-700.woff2`.
9039
- */
9040
- export interface GitSyncSiteCustomizationFontDefinition {
9041
- /**
9042
- * Stable identifier referenced from `styling.font` /
9043
- * `styling.monospaceFont`, and used as the prefix of each face's
9044
- * reserved asset path (`.gitbook/assets/<key>-<weight>.<ext>`).
9045
- * @minLength 1
9046
- * @pattern ^[A-Za-z0-9][A-Za-z0-9_-]*$
9047
- */
9048
- key: string;
9049
- /** The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display"). */
9050
- fontFamily: FontFamily;
9051
- /**
9052
- * Font-face declarations keyed by weight, each specifying its single
9053
- * source file. The `400` and `700` weights are required; `600` is
9054
- * optional.
9055
- */
9056
- fontFaces: {
9057
- /**
9058
- * Reserved repository-relative path to the font file:
9059
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9060
- * font definition's `key`, `<weight>` is this face's `weight`, and
9061
- * `<ext>` is one of `woff2`, `woff`.
9062
- *
9063
- * For example, a font with `key: brand` and a `700` face is read from
9064
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9065
- */
9066
- "400": GitSyncSiteCustomizationFontSource;
9067
- /**
9068
- * Reserved repository-relative path to the font file:
9069
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9070
- * font definition's `key`, `<weight>` is this face's `weight`, and
9071
- * `<ext>` is one of `woff2`, `woff`.
9072
- *
9073
- * For example, a font with `key: brand` and a `700` face is read from
9074
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9075
- */
9076
- "600"?: GitSyncSiteCustomizationFontSource;
9077
- /**
9078
- * Reserved repository-relative path to the font file:
9079
- * `.gitbook/assets/<key>-<weight>.<ext>`, where `<key>` is the parent
9080
- * font definition's `key`, `<weight>` is this face's `weight`, and
9081
- * `<ext>` is one of `woff2`, `woff`.
9082
- *
9083
- * For example, a font with `key: brand` and a `700` face is read from
9084
- * `.gitbook/assets/brand-700.woff2`. Any other path is rejected.
9085
- */
9086
- "700": GitSyncSiteCustomizationFontSource;
9087
- };
9088
- }
9089
- /** Themed color (light + dark). */
9090
- export interface GitSyncSiteCustomizationThemedColor {
9091
- light: Color;
9092
- dark: Color;
9093
- }
9094
- /** Tint configuration. */
9095
- export interface GitSyncSiteCustomizationTint {
9096
- /** Themed color (light + dark). */
9097
- color: GitSyncSiteCustomizationThemedColor;
9098
- }
9099
- /** Reference to a custom font defined under `site.fonts[]`. Matches by `key`. */
9100
- export interface GitSyncSiteCustomizationFontReference {
9101
- /**
9102
- * Matches the `key` of an entry in `site.fonts[]`.
9103
- * @minLength 1
9104
- */
9105
- key: string;
9106
- }
9107
- /**
9108
- * Body font for the site. Either one of the built-in `CustomizationDefaultFont`
9109
- * values, or a reference to a custom font declared in `site.fonts[]`.
9110
- */
9111
- export type GitSyncSiteCustomizationFont = CustomizationDefaultFont | GitSyncSiteCustomizationFontReference;
9112
- /**
9113
- * Monospace font for the site. Either one of the built-in
9114
- * `CustomizationDefaultMonospaceFont` values, or a reference to a custom font
9115
- * declared in `site.fonts[]`.
9116
- */
9117
- export type GitSyncSiteCustomizationMonospaceFont = CustomizationDefaultMonospaceFont | GitSyncSiteCustomizationFontReference;
9118
- /** Themed code theme (light + dark). */
9119
- export interface GitSyncSiteCustomizationThemedCodeTheme {
9120
- light: CustomizationCodeTheme;
9121
- dark: CustomizationCodeTheme;
9122
- }
9123
- /** Code-block syntax-highlighting themes — one for default code blocks and one for OpenAPI request/response samples. */
9124
- export interface GitSyncSiteCustomizationCodeThemes {
9125
- /** Themed code theme (light + dark). */
9126
- default: GitSyncSiteCustomizationThemedCodeTheme;
9127
- /** Themed code theme (light + dark). */
9128
- openapi: GitSyncSiteCustomizationThemedCodeTheme;
9129
- }
9130
- /** Sidebar style settings. */
9131
- export interface GitSyncSiteCustomizationSidebar {
9132
- /**
9133
- * - `default`: No background, content sits directly against sidebar edge.
9134
- * - `filled`: Muted background color that extends to sidebar edges.
9135
- */
9136
- background: CustomizationSidebarBackgroundStyle;
9137
- /**
9138
- * - `default`: Simple list items without special styling, groups are inset with a line.
9139
- * - `pill`: Rounded capsule shape around selected/active items.
9140
- * - `line`: Continuous line next to all items, with colored line part for selected/active items.
9141
- */
9142
- list: CustomizationSidebarListStyle;
9143
- }
9144
- /** Styling settings. */
9145
- export interface GitSyncSiteCustomizationStyling {
9146
- /**
9147
- * The theme to apply to the site. Supercedes the old header preset themes.
9148
- * - `clean`: Modern theme featuring translucency and minimally-styled elements.
9149
- * - `muted`: Sophisticated theme with decreased contrast between elements.
9150
- * - `bold`: High-impact theme with prominent colors and strong contrasts.
9151
- * - `gradient`: Trendy theme featuring colorful gradients and splashes of color.
9152
- */
9153
- theme?: CustomizationTheme;
9154
- /** Themed color (light + dark). */
9155
- primaryColor?: GitSyncSiteCustomizationThemedColor;
9156
- /** Tint configuration. */
9157
- tint?: GitSyncSiteCustomizationTint;
9158
- /** Themed color (light + dark). */
9159
- infoColor?: GitSyncSiteCustomizationThemedColor;
9160
- /** Themed color (light + dark). */
9161
- successColor?: GitSyncSiteCustomizationThemedColor;
9162
- /** Themed color (light + dark). */
9163
- warningColor?: GitSyncSiteCustomizationThemedColor;
9164
- /** Themed color (light + dark). */
9165
- dangerColor?: GitSyncSiteCustomizationThemedColor;
9166
- corners?: CustomizationCorners;
9167
- /**
9168
- * The degree of visual depth (through shadows, gradients and elevation effects) of elements on the site.
9169
- * - `subtle`: Subtle shadows and minimal elevation.
9170
- * - `flat`: Flat elements, no shadows and no elevation.
9171
- */
9172
- depth?: CustomizationDepth;
9173
- /**
9174
- * The style used for regular links in the main content, header and footer. Sidebar items are styled separately.
9175
- * - `default`: Links are colored in the primary color and feature an underline in the same color.
9176
- * - `accent`: Links are colored the same as body text and feature an underline in the primary color.
9177
- */
9178
- links?: CustomizationLinksStyle;
9179
- /**
9180
- * Body font for the site. Either one of the built-in `CustomizationDefaultFont`
9181
- * values, or a reference to a custom font declared in `site.fonts[]`.
9182
- */
9183
- font?: GitSyncSiteCustomizationFont;
9184
- /**
9185
- * Monospace font for the site. Either one of the built-in
9186
- * `CustomizationDefaultMonospaceFont` values, or a reference to a custom font
9187
- * declared in `site.fonts[]`.
9188
- */
9189
- monospaceFont?: GitSyncSiteCustomizationMonospaceFont;
9190
- icons?: CustomizationIconsStyle;
9191
- /** Code-block syntax-highlighting themes — one for default code blocks and one for OpenAPI request/response samples. */
9192
- codeTheme?: GitSyncSiteCustomizationCodeThemes;
9193
- /** Sidebar style settings. */
9194
- sidebar?: GitSyncSiteCustomizationSidebar;
9195
- /**
9196
- * The style of the search button.
9197
- * - `prominent`: large search bar in the middle of the header, with less room for other header items,
9198
- * - `subtle`: small search bar in the corner of the header, with more room for other header items.
9199
- */
9200
- search?: CustomizationSearchStyle;
9201
- }
9202
- /**
9203
- * Repository-relative path to an asset in a site Git Sync, e.g.
9204
- * `.gitbook/assets/header-logo-light.svg`. Absolute URLs are not accepted
9205
- * here — Git Sync assets must live in the synced repository under
9206
- * `.gitbook/assets/`.
9207
- *
9208
- * This is the shared base type and only validates the `.gitbook/assets/`
9209
- * prefix. Each field that uses it additionally reserves a specific filename
9210
- * and set of allowed extensions (e.g. the header logo must be
9211
- * `header-logo-light.<ext>` / `header-logo-dark.<ext>`); see the description
9212
- * on the consuming field for the exact reserved path.
9213
- * @maxLength 2048
9214
- * @pattern ^\.gitbook/assets/.+
9215
- */
9216
- export type GitSyncSiteCustomizationAssetPath = string;
9217
- /**
9218
- * Light/dark variants of a Git Sync repository asset path. Used for logos and
9219
- * favicons that switch with the active theme. Both variants are required.
9220
- *
9221
- * Each consuming field reserves the exact light/dark filenames and allowed
9222
- * extensions (e.g. header logo → `header-logo-light.<ext>` /
9223
- * `header-logo-dark.<ext>`); see the description on the consuming field.
9224
- */
9225
- export interface GitSyncSiteCustomizationThemedAssetPath {
9226
- /**
9227
- * Repository-relative path to an asset in a site Git Sync, e.g.
9228
- * `.gitbook/assets/header-logo-light.svg`. Absolute URLs are not accepted
9229
- * here — Git Sync assets must live in the synced repository under
9230
- * `.gitbook/assets/`.
9231
- *
9232
- * This is the shared base type and only validates the `.gitbook/assets/`
9233
- * prefix. Each field that uses it additionally reserves a specific filename
9234
- * and set of allowed extensions (e.g. the header logo must be
9235
- * `header-logo-light.<ext>` / `header-logo-dark.<ext>`); see the description
9236
- * on the consuming field for the exact reserved path.
9237
- */
9238
- light: GitSyncSiteCustomizationAssetPath;
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
- dark: GitSyncSiteCustomizationAssetPath;
9252
- }
9253
- /** Favicon for the published site. The `icon` variant references a repository asset path; the `emoji` variant uses a single emoji character; */
9254
- export type GitSyncSiteCustomizationFavicon = {
9255
- /**
9256
- * Themed favicon. Each variant must use its reserved repository
9257
- * asset path — light: `.gitbook/assets/favicon-light.<ext>`,
9258
- * dark: `.gitbook/assets/favicon-dark.<ext>`, where `<ext>` is
9259
- * the image's file extension (e.g. `png`, `svg`, `ico`). Any
9260
- * other filename is rejected.
9261
- */
9262
- icon: GitSyncSiteCustomizationThemedAssetPath;
9263
- } | {
9264
- /** Unicode codepoint or character of the emoji */
9265
- emoji: Emoji;
9266
- };
9267
- /**
9268
- * Link destination, written as a path-string in YAML. Same format as
9269
- * markdown content links, e.g. `https://example.com`, `/pages/<id>`,
9270
- * `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
9271
- */
9272
- export type GitSyncSiteCustomizationContentLinkTo = string;
9273
- /** A label plus a destination, used inside header items, footer groups, and announcements. */
9274
- export interface GitSyncSiteCustomizationContentLink {
9275
- title: CustomizationContentLinkTitle;
9276
- /** Localized overrides for the link title, keyed by locale. */
9277
- localizedTitle?: LocalizedString64;
9278
- /**
9279
- * Link destination, written as a path-string in YAML. Same format as
9280
- * markdown content links, e.g. `https://example.com`, `/pages/<id>`,
9281
- * `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
9282
- */
9283
- to: GitSyncSiteCustomizationContentLinkTo;
9284
- }
9285
- /** A single item in the published site's top navigation bar. */
9286
- export interface GitSyncSiteCustomizationHeaderItem {
9287
- title: string;
9288
- /** Localized overrides for the header item title, keyed by locale. */
9289
- localizedTitle?: LocalizedString;
9290
- style?: "link" | "button-primary" | "button-secondary";
9291
- /**
9292
- * Header item destination. Use `null` for items that act as a
9293
- * dropdown root without a link of their own.
9294
- */
9295
- to: GitSyncSiteCustomizationContentLinkTo | null;
9296
- /** Sub-links shown as a dropdown under this header item. Empty array means no dropdown. */
9297
- links: GitSyncSiteCustomizationContentLink[];
9298
- /** Conditional expression evaluated to decide whether the item is shown to the visitor. */
9299
- condition?: Expression;
9300
- }
9301
- /** Header settings. */
9302
- export interface GitSyncSiteCustomizationHeader {
9303
- /**
9304
- * Themed header logo. Each variant must use its reserved repository
9305
- * asset path — light: `.gitbook/assets/header-logo-light.<ext>`, dark:
9306
- * `.gitbook/assets/header-logo-dark.<ext>`, where `<ext>` is the
9307
- * image's file extension (e.g. `png`, `svg`). Any other filename is
9308
- * rejected.
9309
- */
9310
- logo?: GitSyncSiteCustomizationThemedAssetPath;
9311
- /**
9312
- * Link destination, written as a path-string in YAML. Same format as
9313
- * markdown content links, e.g. `https://example.com`, `/pages/<id>`,
9314
- * `/spaces/<id>/pages/<id>`, `#anchor`, `/files/<id>`, `/spaces/<id>`.
9315
- */
9316
- primaryLink?: GitSyncSiteCustomizationContentLinkTo;
9317
- links?: GitSyncSiteCustomizationHeaderItem[];
9318
- }
9319
- /** A group of links shown in the published site's footer. */
9320
- export interface GitSyncSiteCustomizationFooterGroup {
9321
- title: string;
9322
- /** Localized overrides for the footer group title, keyed by locale. */
9323
- localizedTitle?: LocalizedString;
9324
- links: GitSyncSiteCustomizationContentLink[];
9325
- }
9326
- /** Footer settings. */
9327
- export interface GitSyncSiteCustomizationFooter {
9328
- /**
9329
- * Themed footer logo. Each variant must use its reserved repository
9330
- * asset path — light: `.gitbook/assets/footer-logo-light.<ext>`, dark:
9331
- * `.gitbook/assets/footer-logo-dark.<ext>`, where `<ext>` is the
9332
- * image's file extension (e.g. `png`, `svg`). Any other filename is
9333
- * rejected.
9334
- */
9335
- logo?: GitSyncSiteCustomizationThemedAssetPath;
9336
- groups?: GitSyncSiteCustomizationFooterGroup[];
9337
- /** @maxLength 300 */
9338
- copyright?: string;
9339
- }
9340
- /** Announcement banner shown above the published site. */
9341
- export interface GitSyncSiteCustomizationAnnouncement {
9342
- /** Whether to show the site's announcement. */
9343
- enabled: boolean;
9344
- /** The text content of the announcement. */
9345
- message: CustomizationAnnouncementMessage;
9346
- /** Localized overrides for the announcement message, keyed by locale. */
9347
- localizedMessage?: LocalizedString128;
9348
- /** The content or URL the announcement links to when clicked. */
9349
- link?: GitSyncSiteCustomizationContentLink;
9350
- /** Semantic style of the announcement banner. */
9351
- style: "info" | "warning" | "danger" | "success";
9352
- }
9353
- /** Dark/light theme mode settings. */
9354
- export interface GitSyncSiteCustomizationThemeModes {
9355
- default: CustomizationDefaultThemeMode;
9356
- /** Whether readers can switch between dark and light mode. */
9357
- toggeable: boolean;
9358
- }
9359
- /** Reader feedback settings. */
9360
- export interface GitSyncSiteCustomizationFeedback {
9361
- /** Whether reader feedback gathering is enabled. */
9362
- enabled: boolean;
9363
- }
9364
- /** AI assistant settings. */
9365
- export interface GitSyncSiteCustomizationAI {
9366
- mode: CustomizationAIMode;
9367
- /** Suggested questions to display at the start of the chosen AI mode. */
9368
- suggestions?: CustomizationSuggestedQuestions;
9369
- }
9370
- /**
9371
- * Ordered page-level action buttons exposed in the published site's page menu.
9372
- * @uniqueItems true
9373
- */
9374
- export type GitSyncSiteCustomizationPageActions = CustomizationPageActionType[];
9375
- /** External link behavior. */
9376
- export interface GitSyncSiteCustomizationExternalLinks {
9377
- /**
9378
- * How external links should open when clicked.
9379
- * - `self`: External links open in the current tab.
9380
- * - `blank`: External links open in a new browser tab.
9381
- */
9382
- target: SiteExternalLinksTarget;
9383
- }
9384
- /** Pagination navigation settings. */
9385
- export interface GitSyncSiteCustomizationPagination {
9386
- /** Whether the prev/next pagination navigation is shown on pages. */
9387
- enabled: boolean;
9388
- }
9389
- /** Privacy policy link shown on the published site. */
9390
- export interface GitSyncSiteCustomizationPrivacyPolicy {
9391
- url?: URL;
9392
- }
9393
- /** Social preview asset. */
9394
- export interface GitSyncSiteCustomizationSocialPreview {
9395
- /**
9396
- * Reserved repository asset path for the social preview image:
9397
- * `.gitbook/assets/social-preview.<ext>`, where `<ext>` is the
9398
- * image's file extension (e.g. `png`, `jpg`). Any other filename is
9399
- * rejected.
9400
- */
9401
- url?: GitSyncSiteCustomizationAssetPath;
9402
- }
9403
- /** A single social account entry. */
9404
- export interface GitSyncSiteCustomizationSocialAccount {
9405
- /** The platform of the social handle. */
9406
- platform: SiteSocialAccountPlatform;
9407
- /** A handle on a social platform, without prefixes like the @ symbol. */
9408
- handle: SiteSocialAccountHandle;
9409
- display: {
9410
- footer: boolean;
9411
- header: boolean;
9412
- };
9413
- }
9414
- /** Visitor insights settings. */
9415
- export interface GitSyncSiteCustomizationInsights {
9416
- /** Whether GitBook identifies visitors on the site using a cookie. */
9417
- trackingCookie: boolean;
9418
- }
9419
- /**
9420
- * Customization settings for the published site, authored in `docs.yaml`.
9421
- *
9422
- * Every top-level field is optional — a Git Sync YAML is a **sparse override** of
9423
- * the live customization. Fields you don't include stay at whatever the site
9424
- * has as default.
9425
- *
9426
- * Custom fonts referenced from `styling.font` / `styling.monospaceFont` must
9427
- * have a matching definition under `site.fonts[]`.
9428
- */
9429
- export interface GitSyncSiteCustomization {
9430
- /** Title to use for the published site. If omitted, falls back to the default site title. */
9431
- publishedTitle?: SiteTitle;
9432
- /** Localized titles for the published site, keyed by locale. */
9433
- localizedPublishedTitles?: LocalizedString128;
9434
- /** Styling settings. */
9435
- styling?: GitSyncSiteCustomizationStyling;
9436
- /** Favicon for the published site. The `icon` variant references a repository asset path; the `emoji` variant uses a single emoji character; */
9437
- favicon?: GitSyncSiteCustomizationFavicon;
9438
- /** Header settings. */
9439
- header?: GitSyncSiteCustomizationHeader;
9440
- /** Footer settings. */
9441
- footer?: GitSyncSiteCustomizationFooter;
9442
- /** Announcement banner shown above the published site. */
9443
- announcement?: GitSyncSiteCustomizationAnnouncement;
9444
- /** Dark/light theme mode settings. */
9445
- themeModes?: GitSyncSiteCustomizationThemeModes;
9446
- /** Reader feedback settings. */
9447
- feedback?: GitSyncSiteCustomizationFeedback;
9448
- /** AI assistant settings. */
9449
- ai?: GitSyncSiteCustomizationAI;
9450
- /** Ordered page-level action buttons exposed in the published site's page menu. */
9451
- pageActions?: GitSyncSiteCustomizationPageActions;
9452
- /** External link behavior. */
9453
- externalLinks?: GitSyncSiteCustomizationExternalLinks;
9454
- /** Pagination navigation settings. */
9455
- pagination?: GitSyncSiteCustomizationPagination;
9456
- /** Privacy policy link shown on the published site. */
9457
- privacyPolicy?: GitSyncSiteCustomizationPrivacyPolicy;
9458
- /** Social preview asset. */
9459
- socialPreview?: GitSyncSiteCustomizationSocialPreview;
9460
- /**
9461
- * Social accounts to surface on the site.
9462
- * @maxItems 10
9463
- */
9464
- socialAccounts?: GitSyncSiteCustomizationSocialAccount[];
9465
- /** Visitor insights settings. */
9466
- insights?: GitSyncSiteCustomizationInsights;
9467
- }
9468
9128
  /**
9469
9129
  * Schema for a site `docs.yaml` file — the canonical contract for what
9470
9130
  * can be authored in Git Sync to drive a site's customization and structure.
@@ -9487,19 +9147,6 @@ export interface GitSyncSiteConfig {
9487
9147
  * three node types: a section group, a section, or a space.
9488
9148
  */
9489
9149
  structure: GitSyncSiteStructure;
9490
- /** Custom font definitions referenced from `site.customization.styling`. */
9491
- fonts?: GitSyncSiteCustomizationFontDefinition[];
9492
- /**
9493
- * Customization settings for the published site, authored in `docs.yaml`.
9494
- *
9495
- * Every top-level field is optional — a Git Sync YAML is a **sparse override** of
9496
- * the live customization. Fields you don't include stay at whatever the site
9497
- * has as default.
9498
- *
9499
- * Custom fonts referenced from `styling.font` / `styling.monospaceFont` must
9500
- * have a matching definition under `site.fonts[]`.
9501
- */
9502
- customization?: GitSyncSiteCustomization;
9503
9150
  };
9504
9151
  }
9505
9152
  export type IntegrationEnvironmentSpaceInstallation = IntegrationContentInstallationBase & {
@@ -10268,7 +9915,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10268
9915
  */
10269
9916
  deleteSpaceById: (spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10270
9917
  /**
10271
- * @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.
10272
9919
  *
10273
9920
  * @tags spaces
10274
9921
  * @name DuplicateSpace
@@ -10357,7 +10004,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10357
10004
  items: SearchPageResult[];
10358
10005
  }, any>>;
10359
10006
  /**
10360
- * @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.
10361
10008
  *
10362
10009
  * @tags space-git
10363
10010
  * @name ImportGitRepository
@@ -10367,7 +10014,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10367
10014
  */
10368
10015
  importGitRepository: (spaceId: EntityId, data: ImportGitRepository, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10369
10016
  /**
10370
- * @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.
10371
10018
  *
10372
10019
  * @tags space-git
10373
10020
  * @name ExportToGitRepository
@@ -15088,6 +14735,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15088
14735
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15089
14736
  items: (SearchSpaceResult | SearchRecordResult)[];
15090
14737
  }, any>>;
14738
+ /**
14739
+ * @description Submit feedback from an AI agent about the content of the site, such as outdated, incorrect or missing content encountered while helping a user.
14740
+ *
14741
+ * @tags site-insights
14742
+ * @name SubmitSiteAgentFeedback
14743
+ * @summary Submit agent feedback for a site
14744
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/agent-feedback
14745
+ * @secure
14746
+ */
14747
+ submitSiteAgentFeedback: (organizationId: EntityId, siteId: string, data: {
14748
+ /**
14749
+ * The feedback about the content of the site.
14750
+ * @minLength 1
14751
+ * @maxLength 2048
14752
+ */
14753
+ feedback: string;
14754
+ /** The end goal the agent is trying to accomplish on behalf of the user, giving the context the agent was working towards when it encountered the issue. */
14755
+ goal?: AgentGoal;
14756
+ /** URL of the content the feedback is about. */
14757
+ url: URL;
14758
+ /** ID of the space the feedback is about. */
14759
+ spaceId: string;
14760
+ /** ID of the page the feedback is about. */
14761
+ pageId: string;
14762
+ }, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15091
14763
  /**
15092
14764
  * @description The response is streamed.
15093
14765
  *
@@ -15205,19 +14877,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15205
14877
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15206
14878
  items: SiteScan[];
15207
14879
  }, any>>;
15208
- /**
15209
- * No description
15210
- *
15211
- * @tags site-context
15212
- * @name CreateSiteScan
15213
- * @summary Enqueue a new site scan
15214
- * @request POST:/orgs/{organizationId}/sites/{siteId}/scans
15215
- * @secure
15216
- */
15217
- createSiteScan: (organizationId: EntityId, siteId: string, data: {
15218
- /** The site topic ID to scan. */
15219
- topic: string;
15220
- }, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
15221
14880
  /**
15222
14881
  * No description
15223
14882
  *
@@ -15256,6 +14915,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15256
14915
  severity?: SiteFindingSeverity;
15257
14916
  /** Filter findings that have at least one associated change request. */
15258
14917
  hasChangeRequests?: boolean;
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. */
14919
+ source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
14920
+ /** Sort findings by the given field. */
14921
+ orderBy?: SiteFindingOrderBy;
15259
14922
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15260
14923
  items: SiteFinding[];
15261
14924
  }, any>>;
@@ -15382,6 +15045,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15382
15045
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15383
15046
  items: ContextRecord[];
15384
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>>;
15385
15071
  /**
15386
15072
  * No description
15387
15073
  *
@@ -15760,6 +15446,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15760
15446
  * @secure
15761
15447
  */
15762
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>>;
15763
15465
  /**
15764
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.
15765
15467
  *
@@ -16206,6 +15908,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16206
15908
  type: SiteCoreChannelType;
16207
15909
  };
16208
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>>;
16209
15921
  /**
16210
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.
16211
15923
  *