@gitbook/api 0.196.0 → 0.198.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
@@ -127,6 +127,15 @@ export declare enum SiteMcpServerTransport {
127
127
  Sse = "sse",
128
128
  Http = "http"
129
129
  }
130
+ /**
131
+ * The field to sort site redirects by. `createdAt` returns the most recently created redirects first. `updatedAt` returns the most recently updated redirects first (falling back to the creation date for redirects never updated). `source` returns redirects sorted alphabetically by source path. Defaults to 'createdAt'.
132
+ * @default "createdAt"
133
+ */
134
+ export declare enum SiteRedirectOrderBy {
135
+ CreatedAt = "createdAt",
136
+ UpdatedAt = "updatedAt",
137
+ Source = "source"
138
+ }
130
139
  export declare enum SiteInsightsQueryRangePreset {
131
140
  LastYear = "lastYear",
132
141
  Last3Months = "last3Months",
@@ -171,7 +180,17 @@ export declare enum SiteInsightsVisitorBot {
171
180
  Vscode = "vscode",
172
181
  ClaudeCode = "claude-code",
173
182
  Codex = "codex",
174
- Opencode = "opencode"
183
+ Opencode = "opencode",
184
+ Gptbot = "gptbot",
185
+ Claudebot = "claudebot",
186
+ MetaFetcher = "meta-fetcher",
187
+ Grok = "grok",
188
+ GithubCopilot = "github-copilot",
189
+ MetaWebindexer = "meta-webindexer",
190
+ MetaAds = "meta-ads",
191
+ Duckassist = "duckassist",
192
+ AmznSearchbot = "amzn-searchbot",
193
+ AmznUser = "amzn-user"
175
194
  }
176
195
  export declare enum SiteInsightsVisitorOS {
177
196
  Windows = "windows",
@@ -360,6 +379,7 @@ export declare enum SiteFindingSeverity {
360
379
  * - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
361
380
  * - Content gap: The content is missing important information that should be present to answer user questions effectively.
362
381
  * - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.
382
+ * - Outbound link error: An external URL used by the site's content fails to resolve, and can be fixed by replacing or removing the link.
363
383
  * - Other: Any other type of finding not covered by the above categories.
364
384
  */
365
385
  export declare enum SiteFindingType {
@@ -367,6 +387,7 @@ export declare enum SiteFindingType {
367
387
  ContentIncorrect = "content-incorrect",
368
388
  ContentGap = "content-gap",
369
389
  BrokenLink = "broken-link",
390
+ OutboundLinkError = "outbound-link-error",
370
391
  Other = "other"
371
392
  }
372
393
  /**
@@ -704,6 +725,25 @@ export declare enum TeamMemberRole {
704
725
  Owner = "owner",
705
726
  Member = "member"
706
727
  }
728
+ /** Something the user is interested in doing with the site. */
729
+ export declare enum SiteOnboardingInterest {
730
+ AdaptiveContent = "adaptive-content",
731
+ ApiDocs = "api-docs",
732
+ ProactiveAgent = "proactive-agent"
733
+ }
734
+ /** Who the user wants to be able to access their site. */
735
+ export declare enum SiteOnboardingAudience {
736
+ Public = "public",
737
+ Mixed = "mixed",
738
+ Protected = "protected",
739
+ Internal = "internal"
740
+ }
741
+ /** Where the user's docs are coming from today. */
742
+ export declare enum SiteOnboardingSource {
743
+ MarkdownInGit = "markdown-in-git",
744
+ Import = "import",
745
+ Template = "template"
746
+ }
707
747
  export declare enum ContentKitIcon {
708
748
  Close = "close",
709
749
  Edit = "edit",
@@ -1145,6 +1185,8 @@ export type PublishedContentRedirect = {
1145
1185
  /** Result of a search */
1146
1186
  export type AIToolCallSearchResult = AIToolCallSearchResultPage | AIToolCallSearchResultRecord;
1147
1187
  export type SiteQuestionAnswerSource = SiteQuestionAnswerSourcePage | SiteQuestionAnswerSourceRecord;
1188
+ /** What the feedback is about. `kind` determines both the shape of the subject and the surface the agent was working through. */
1189
+ export type AgentFeedbackSubject = AgentFeedbackSubjectMCPTool | AgentFeedbackSubjectCliCommand | AgentFeedbackSubjectApiEndpoint | AgentFeedbackSubjectDocumentation | AgentFeedbackSubjectGeneric;
1148
1190
  /** Resource targeted by a Git Sync installation. */
1149
1191
  export type GitSyncInstallationTarget = {
1150
1192
  /** Type of resource targeted by the Git Sync installation. */
@@ -1369,6 +1411,8 @@ export interface GitSyncState {
1369
1411
  /** An action the user can take to resolve a failed Git Sync operation. */
1370
1412
  errorAction?: GitSyncOperationErrorAction;
1371
1413
  };
1414
+ /** How long an operation is allowed to run before it is terminated (in milliseconds). */
1415
+ operationTimeout?: number;
1372
1416
  /** When the Git provider details were last updated */
1373
1417
  updatedAt?: Timestamp;
1374
1418
  }
@@ -3461,7 +3505,7 @@ export interface RevisionPageUpdate {
3461
3505
  condition?: string;
3462
3506
  }
3463
3507
  /**
3464
- * Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed.
3508
+ * Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed, and it can be moved to a new parent and/or position with `into`/`at`.
3465
3509
  * @example {"operation":"update_page","page":"page_id","document":{"markdown":"# Hello World\n\nThis is a markdown document linking to [another page](/pages/page_id).\n"}}
3466
3510
  */
3467
3511
  export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
@@ -3470,6 +3514,13 @@ export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
3470
3514
  page: string;
3471
3515
  /** New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields. */
3472
3516
  document?: Document;
3517
+ /** Move the page to be a child of this page ID. Set to `null` to move it to the root of the page tree. Omit to leave the page's parent unchanged. The target cannot be the page itself or one of its own descendants. */
3518
+ into?: string | null;
3519
+ /**
3520
+ * Zero-based index to move the page to among its new siblings (those of `into`, or the root pages when `into` is omitted or `null`). Omit to leave the page's position unchanged when its parent isn't changing, or to append it at the end when its parent is changing.
3521
+ * @min 0
3522
+ */
3523
+ at?: number;
3473
3524
  };
3474
3525
  /**
3475
3526
  * Insert a new page into the change request. The title is taken from `title`, or, when the document is markdown, from the document's frontmatter or leading heading (which take precedence, matching Git Sync). When no title can be resolved, the page falls back to a default title.
@@ -4829,11 +4880,11 @@ export interface Site {
4829
4880
  view: boolean;
4830
4881
  /** Can the user access the site in the application. */
4831
4882
  access: boolean;
4832
- /** Can the user edit content associated with the site. */
4883
+ /** Can the user edit content and create draft content in the site. */
4833
4884
  edit: boolean;
4834
- /** Can the user create content in the site. */
4885
+ /** Can the user create draft content, publish content, and manage the site's content structure. */
4835
4886
  create: boolean;
4836
- /** Can the user edit the site and manage its settings. */
4887
+ /** Can the user manage the site content, settings and publish the site. */
4837
4888
  admin: boolean;
4838
4889
  /** Can the user install integrations on the site. */
4839
4890
  installIntegration: boolean;
@@ -5254,12 +5305,18 @@ export interface UpdateIntegrationSiteInstallation {
5254
5305
  /** Configuration of the integration at the account level */
5255
5306
  configuration?: IntegrationInstallationConfiguration;
5256
5307
  }
5308
+ /** Preferences collected from the user during site onboarding, used to tailor recommendations and to apply their initial setup choices. */
5309
+ export interface SiteOnboardingPreferences {
5310
+ source: SiteOnboardingSource | null;
5311
+ audience: SiteOnboardingAudience | null;
5312
+ interests: SiteOnboardingInterest[];
5313
+ }
5257
5314
  export interface CreateOrganization {
5258
5315
  /** Name of the organization */
5259
5316
  title: OrganizationTitle;
5260
5317
  emailDomains?: OrganizationEmailDomains;
5261
- type?: OrganizationType;
5262
- useCase?: OrganizationUseCase;
5318
+ /** Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true. */
5319
+ onboardingPreferences?: SiteOnboardingPreferences;
5263
5320
  }
5264
5321
  /**
5265
5322
  * Title of the site section
@@ -5382,14 +5439,38 @@ export interface SiteSectionGroup {
5382
5439
  sectionGroup?: string;
5383
5440
  /** Whether the site section group is draft and not live. */
5384
5441
  draft: boolean;
5385
- /** List of all child sections and groups nested under this group */
5386
- children: (SiteSection | SiteSectionGroup)[];
5442
+ /** List of all child sections, groups, and external links nested under this group */
5443
+ children: (SiteSection | SiteSectionGroup | SiteExternalLink)[];
5387
5444
  /** Name of the icon */
5388
5445
  icon?: Icon;
5389
5446
  }
5447
+ export interface SiteExternalLink {
5448
+ /** The object type, which is always "site-external-link" */
5449
+ object: "site-external-link";
5450
+ /** Unique identifier of the external link */
5451
+ id: string;
5452
+ /** Title of the site section */
5453
+ title: SiteSectionTitle;
5454
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
5455
+ localizedTitle?: LocalizedString128;
5456
+ /** Description of the site section */
5457
+ description?: SiteSectionDescription;
5458
+ /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
5459
+ localizedDescription?: LocalizedString256;
5460
+ /** Name of the icon */
5461
+ icon?: Icon;
5462
+ /** Absolute HTTP or HTTPS URL opened by the external link */
5463
+ url: URL;
5464
+ /** ID of the section group the external link belongs to. Omitted for a root link. */
5465
+ sectionGroup?: string;
5466
+ /** Whether the external link is draft and not live */
5467
+ draft: boolean;
5468
+ /** Conditional expression used to evaluate whether the external link should be shown to the site's visitor */
5469
+ condition?: Expression;
5470
+ }
5390
5471
  export type SiteStructure = {
5391
5472
  type: "sections";
5392
- structure: (SiteSection | SiteSectionGroup)[];
5473
+ structure: (SiteSection | SiteSectionGroup | SiteExternalLink)[];
5393
5474
  } | {
5394
5475
  type: "siteSpaces";
5395
5476
  structure: SiteSpace[];
@@ -6896,21 +6977,21 @@ export interface ShareLink {
6896
6977
  };
6897
6978
  }
6898
6979
  export interface SiteStructureItemPointer {
6899
- type: "site-space" | "site-section" | "site-section-group";
6900
- /** Unique identifier for the site structure item (site space, site section or site section group). */
6980
+ type: "site-space" | "site-section" | "site-section-group" | "site-external-link";
6981
+ /** Unique identifier for the site structure item (site space, site section, site section group, or external link). */
6901
6982
  id: string;
6902
6983
  }
6903
- /** Position at which to move the site structure item (site space, site section or site section group). */
6984
+ /** Position at which to move the site structure item relative to any sibling of the same structure level. */
6904
6985
  export interface SiteStructureItemMovePosition {
6905
6986
  before?: SiteStructureItemPointer;
6906
6987
  after?: SiteStructureItemPointer;
6907
6988
  }
6908
6989
  /**
6909
6990
  * Site Structure Item
6910
- * A site structure item can be a site space, a site section or a site section group.
6991
+ * A site structure item can be a site space, a site section, a site section group, or an external link.
6911
6992
  * It is used to represent the structure of a site.
6912
6993
  */
6913
- export type SiteStructureItem = SiteSpace | SiteSection | SiteSectionGroup;
6994
+ export type SiteStructureItem = SiteSpace | SiteSection | SiteSectionGroup | SiteExternalLink;
6914
6995
  /** A response to a request to preview a paid operation or action. A user might preview an operation before executing it to see which billing steps would be required (if any). This schema defines the response of that preview request. */
6915
6996
  export type BillingOperationPreviewResponse = {
6916
6997
  /** User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes. */
@@ -7008,6 +7089,133 @@ export interface SearchRecordResult {
7008
7089
  * @maxLength 1024
7009
7090
  */
7010
7091
  export type AgentGoal = string;
7092
+ /** The agent that reported the feedback. It must never identify the end user the agent is acting on behalf of. */
7093
+ export interface AgentFeedbackReportedBy {
7094
+ /**
7095
+ * Self-reported model powering the agent.
7096
+ * @maxLength 100
7097
+ */
7098
+ model?: string;
7099
+ /**
7100
+ * User-Agent the agent itself presented, for example `claude-code/1.2.3`. It is what identifies the harness the agent ran in.
7101
+ * @maxLength 512
7102
+ */
7103
+ userAgent?: string;
7104
+ /**
7105
+ * Whether the user explicitly asked the agent to submit this feedback.
7106
+ * @default false
7107
+ */
7108
+ onDemand?: boolean;
7109
+ }
7110
+ /** Feedback about a tool exposed by an MCP server. */
7111
+ export interface AgentFeedbackSubjectMCPTool {
7112
+ kind: "mcp-tool";
7113
+ /**
7114
+ * Name of the tool the agent called, as it was exposed to the agent.
7115
+ * @maxLength 200
7116
+ */
7117
+ toolName: string;
7118
+ /**
7119
+ * What the tool was pointed at, for a tool that dispatches to something else rather than doing one fixed thing. For a tool that invokes an API operation, the identifier of that operation.
7120
+ * @maxLength 200
7121
+ */
7122
+ target?: string;
7123
+ }
7124
+ /** Feedback about a command exposed by a command line interface. */
7125
+ export interface AgentFeedbackSubjectCliCommand {
7126
+ kind: "cli-command";
7127
+ /**
7128
+ * The command the agent ran, without its arguments. Do not include any auth or other sensitive information.
7129
+ * @maxLength 200
7130
+ */
7131
+ command: string;
7132
+ /**
7133
+ * Names of the flags passed to the command. It must never contain their values.
7134
+ * @maxItems 50
7135
+ */
7136
+ flags?: string[];
7137
+ }
7138
+ /** Feedback about an API endpoint the agent called directly, without an MCP server or a command line interface in between. */
7139
+ export interface AgentFeedbackSubjectApiEndpoint {
7140
+ kind: "api-endpoint";
7141
+ /** HTTP method of the endpoint. */
7142
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
7143
+ /**
7144
+ * Templated path of the endpoint, for example `/v1/orders/{orderId}/fulfill`. It must never contain resolved identifiers or query string values.
7145
+ * @maxLength 500
7146
+ */
7147
+ path: string;
7148
+ }
7149
+ /** Feedback about published documentation, such as a page that is outdated, incorrect, or missing information the agent needed to help its user. */
7150
+ export interface AgentFeedbackSubjectDocumentation {
7151
+ kind: "documentation";
7152
+ /** URL of the content the feedback is about. */
7153
+ url: URL;
7154
+ }
7155
+ /** Feedback with no single tool, command, endpoint, or page behind it, such as product friction or a capability the agent expected to find and could not. */
7156
+ export interface AgentFeedbackSubjectGeneric {
7157
+ kind: "generic";
7158
+ }
7159
+ /** The content of the feedback. It must never contain parameter values, request or response bodies, credentials, or anything identifying the end user the agent acted for. */
7160
+ export interface AgentFeedbackContent {
7161
+ /**
7162
+ * Classification of the feedback:
7163
+ * - Usability: The subject was hard to understand or use correctly, such as a confusing name or unclear parameters.
7164
+ * - Reliability: The subject behaved inconsistently, failed unexpectedly, or returned unusable results.
7165
+ * - Documentation: The description, schema, or guidance about the subject was missing, unclear, or misleading.
7166
+ * - Efficiency: Reaching the outcome took more calls, steps, or tokens than it should have.
7167
+ * - Interoperability: The subject did not compose well with other tools, operations, or formats.
7168
+ * - Could not accomplish: Nothing exposed to the agent could accomplish what it needed to do.
7169
+ */
7170
+ category: "usability" | "reliability" | "documentation" | "efficiency" | "interoperability" | "could-not-accomplish";
7171
+ /** How much the issue impeded the agent. */
7172
+ severity?: "low" | "medium" | "high";
7173
+ /** What the agent was working towards when it ran into the issue. */
7174
+ goal?: AgentGoal;
7175
+ /**
7176
+ * A short summary of what went wrong, in the agent's own words.
7177
+ * @minLength 1
7178
+ * @maxLength 256
7179
+ */
7180
+ summary: string;
7181
+ /**
7182
+ * Additional explanation of the issue and how the agent ran into it.
7183
+ * @maxLength 4096
7184
+ */
7185
+ detail?: string;
7186
+ /**
7187
+ * How the agent worked around the issue, when it managed to.
7188
+ * @maxLength 2048
7189
+ */
7190
+ workaround?: string;
7191
+ /** How the agent interacted with the subject before reporting. */
7192
+ metrics?: {
7193
+ /**
7194
+ * Number of times the agent used the subject.
7195
+ * @min 0
7196
+ */
7197
+ callCount?: number;
7198
+ /**
7199
+ * Number of those uses that produced a usable result.
7200
+ * @min 0
7201
+ */
7202
+ successCount?: number;
7203
+ /**
7204
+ * Number of those uses that were retries after a failure.
7205
+ * @min 0
7206
+ */
7207
+ retryCount?: number;
7208
+ };
7209
+ }
7210
+ /** Feedback submitted by an AI agent about a tool, command, endpoint or page it worked with. `reportedBy` and `feedback` have the same shape whatever the feedback is about; only `subject` varies. */
7211
+ export interface AgentFeedbackInput {
7212
+ /** The agent that reported the feedback. It must never identify the end user the agent is acting on behalf of. */
7213
+ reportedBy?: AgentFeedbackReportedBy;
7214
+ /** What the feedback is about. `kind` determines both the shape of the subject and the surface the agent was working through. */
7215
+ subject: AgentFeedbackSubject;
7216
+ /** The content of the feedback. It must never contain parameter values, request or response bodies, credentials, or anything identifying the end user the agent acted for. */
7217
+ feedback: AgentFeedbackContent;
7218
+ }
7011
7219
  /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
7012
7220
  export interface SiteInsightsSession {
7013
7221
  /** GitBook's unique identifier of the visitor. */
@@ -7126,28 +7334,6 @@ export type SiteFindingTitle = string;
7126
7334
  * @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
7127
7335
  */
7128
7336
  export type SiteRedirectSourcePath = string;
7129
- export interface SiteRedirectDestinationSiteSection {
7130
- kind: "site-section";
7131
- /** Unique identifier for the site section to redirect to */
7132
- siteSectionId: string;
7133
- }
7134
- export interface SiteRedirectDestinationSiteSpace {
7135
- kind: "site-space";
7136
- /** Unique identifier for the site space to redirect to */
7137
- siteSpaceId: string;
7138
- }
7139
- export interface SiteRedirectDestinationPage {
7140
- kind: "site-page";
7141
- /** Unique identifier for the site space of the page */
7142
- siteSpaceId: string;
7143
- /** Unique identifier for the page within the site space to redirect to */
7144
- pageId: string;
7145
- }
7146
- export interface SiteRedirectDestinationExternal {
7147
- kind: "external";
7148
- url: URL;
7149
- }
7150
- export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage | SiteRedirectDestinationExternal;
7151
7337
  export interface SiteRedirectInputDestinationPath {
7152
7338
  kind: "path";
7153
7339
  /** Unique identifier for the space containing the page referenced by the path. */
@@ -7155,14 +7341,29 @@ export interface SiteRedirectInputDestinationPath {
7155
7341
  /** Path to the page within the space revision to resolve. */
7156
7342
  path: string;
7157
7343
  }
7158
- export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
7159
7344
  /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
7160
7345
  export interface SiteFindingBrokenLinkAction {
7161
7346
  /** The source path to redirect from. */
7162
7347
  source: SiteRedirectSourcePath;
7163
7348
  /** Whether the redirect appends the wildcard-matched suffix of the source path to the destination. */
7164
7349
  captureWildcard?: boolean;
7165
- destination: SiteRedirectInputDestination;
7350
+ destination: SiteRedirectInputDestinationPath;
7351
+ }
7352
+ /** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
7353
+ export interface SiteFindingOutboundLink {
7354
+ /**
7355
+ * The external URL that fails to resolve.
7356
+ * @format uri
7357
+ */
7358
+ url: string;
7359
+ /** Current health status of the URL for this site. */
7360
+ status: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
7361
+ /** Classification of the confirmed failure. */
7362
+ failureKind?: "client-error" | "server-error" | "redirect" | "dns" | "tls" | "connection" | "timeout";
7363
+ /** HTTP status code of the last observation, when one was received. */
7364
+ httpStatus?: number;
7365
+ /** When the URL was last observed over HTTP. */
7366
+ checkedAt?: Timestamp;
7166
7367
  }
7167
7368
  export interface SiteFinding {
7168
7369
  object: "site-finding";
@@ -7196,6 +7397,7 @@ export interface SiteFinding {
7196
7397
  * - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
7197
7398
  * - Content gap: The content is missing important information that should be present to answer user questions effectively.
7198
7399
  * - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.
7400
+ * - Outbound link error: An external URL used by the site's content fails to resolve, and can be fixed by replacing or removing the link.
7199
7401
  * - Other: Any other type of finding not covered by the above categories.
7200
7402
  */
7201
7403
  type: SiteFindingType;
@@ -7206,6 +7408,8 @@ export interface SiteFinding {
7206
7408
  autoFixable: boolean;
7207
7409
  /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
7208
7410
  brokenLinkAction?: SiteFindingBrokenLinkAction;
7411
+ /** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
7412
+ outboundLink?: SiteFindingOutboundLink;
7209
7413
  createdAt: Timestamp;
7210
7414
  updatedAt: Timestamp;
7211
7415
  /** URLs associated with the finding */
@@ -8864,6 +9068,28 @@ export interface SiteAdsStats {
8864
9068
  clicks: number;
8865
9069
  revenue: string;
8866
9070
  }
9071
+ export interface SiteRedirectDestinationSiteSection {
9072
+ kind: "site-section";
9073
+ /** Unique identifier for the site section to redirect to */
9074
+ siteSectionId: string;
9075
+ }
9076
+ export interface SiteRedirectDestinationSiteSpace {
9077
+ kind: "site-space";
9078
+ /** Unique identifier for the site space to redirect to */
9079
+ siteSpaceId: string;
9080
+ }
9081
+ export interface SiteRedirectDestinationPage {
9082
+ kind: "site-page";
9083
+ /** Unique identifier for the site space of the page */
9084
+ siteSpaceId: string;
9085
+ /** Unique identifier for the page within the site space to redirect to */
9086
+ pageId: string;
9087
+ }
9088
+ export interface SiteRedirectDestinationExternal {
9089
+ kind: "external";
9090
+ url: URL;
9091
+ }
9092
+ export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage | SiteRedirectDestinationExternal;
8867
9093
  export interface SiteRedirect {
8868
9094
  object: "site-redirect";
8869
9095
  /** The unique identifier for the redirect. */
@@ -8875,7 +9101,18 @@ export interface SiteRedirect {
8875
9101
  /** Capture and append the wildcard-matched suffix to the destination URL. */
8876
9102
  captureWildcard: boolean;
8877
9103
  destination: SiteRedirectDestination;
9104
+ /**
9105
+ * When the redirect was created.
9106
+ * @format date-time
9107
+ */
9108
+ createdAt: string;
9109
+ /**
9110
+ * When the redirect was last updated. Absent if never updated since creation.
9111
+ * @format date-time
9112
+ */
9113
+ updatedAt?: string;
8878
9114
  }
9115
+ export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
8879
9116
  /**
8880
9117
  * Name of the MCP server
8881
9118
  * @minLength 1
@@ -9743,7 +9980,7 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
9743
9980
  */
9744
9981
  export type GitSyncSiteStructure = GitSyncSiteStructureNode[];
9745
9982
  /**
9746
- * Schema for a site `docs.yaml` file — the canonical contract for what
9983
+ * Schema for a site `gitbook-docs.yaml` file — the canonical contract for what
9747
9984
  * can be authored in Git Sync to drive a site's structure.
9748
9985
  *
9749
9986
  * The file lives at the root of the site's project directory in the synced
@@ -11638,7 +11875,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11638
11875
  computed?: boolean;
11639
11876
  }, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
11640
11877
  /**
11641
- * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
11878
+ * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
11642
11879
  *
11643
11880
  * @tags change-request-content
11644
11881
  * @name UpdateChangeRequestContent
@@ -12744,7 +12981,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12744
12981
  };
12745
12982
  integrations: {
12746
12983
  /**
12747
- * No description
12984
+ * @description Returns a paginated list of the integrations published in the GitBook marketplace. Use this to discover an integration by name, category, or the blocks and content sources it provides, before installing it on an organization, space or site.
12748
12985
  *
12749
12986
  * @tags integrations
12750
12987
  * @name ListIntegrations
@@ -12785,7 +13022,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12785
13022
  items: Integration[];
12786
13023
  }, any>>;
12787
13024
  /**
12788
- * No description
13025
+ * @description Returns a single integration by its unique name, including the configuration it expects, the targets it can be installed on, and the permissions it requests. Private integrations are only readable by the organization that owns them.
12789
13026
  *
12790
13027
  * @tags integrations
12791
13028
  * @name GetIntegrationByName
@@ -12850,7 +13087,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12850
13087
  items: IntegrationInstallation[];
12851
13088
  }, any>>;
12852
13089
  /**
12853
- * No description
13090
+ * @description Installs an integration on an organization, creating the account-level installation that space and site installations hang off. Configure it with the update operation, then enable it on individual spaces or sites.
12854
13091
  *
12855
13092
  * @tags integrations
12856
13093
  * @name InstallIntegration
@@ -13048,7 +13285,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13048
13285
  };
13049
13286
  }>>;
13050
13287
  /**
13051
- * No description
13288
+ * @description Returns the organization-level installation of an integration, including its account configuration and how many spaces it manages. The configuration can contain credentials the integration stored for third-party services.
13052
13289
  *
13053
13290
  * @tags integrations
13054
13291
  * @name GetIntegrationInstallationById
@@ -13064,7 +13301,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13064
13301
  };
13065
13302
  }>>;
13066
13303
  /**
13067
- * No description
13304
+ * @description Updates the account-level configuration of an installation, and which spaces or sites it applies to.
13068
13305
  *
13069
13306
  * @tags integrations
13070
13307
  * @name UpdateIntegrationInstallation
@@ -13100,7 +13337,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13100
13337
  };
13101
13338
  }>>;
13102
13339
  /**
13103
- * No description
13340
+ * @description Returns a paginated list of the spaces an installation is enabled on, with the configuration of the integration for each of them. Pass extended to get the full space object instead of its ID.
13104
13341
  *
13105
13342
  * @tags integrations
13106
13343
  * @name ListIntegrationInstallationSpaces
@@ -13126,7 +13363,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13126
13363
  items: IntegrationSpaceInstallation[];
13127
13364
  }, any>>;
13128
13365
  /**
13129
- * No description
13366
+ * @description Enables an existing organization-level installation on one space. The organization must already have the integration installed.
13130
13367
  *
13131
13368
  * @name InstallIntegrationOnSpace
13132
13369
  * @summary Install an integration on a space
@@ -13150,7 +13387,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13150
13387
  };
13151
13388
  }>>;
13152
13389
  /**
13153
- * No description
13390
+ * @description Returns the installation of an integration on one space, including the configuration of the integration for that space.
13154
13391
  *
13155
13392
  * @tags integrations
13156
13393
  * @name GetIntegrationSpaceInstallation
@@ -13172,7 +13409,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13172
13409
  };
13173
13410
  }>>;
13174
13411
  /**
13175
- * No description
13412
+ * @description Updates the configuration of an integration for one space.
13176
13413
  *
13177
13414
  * @tags integrations
13178
13415
  * @name UpdateIntegrationSpaceInstallation
@@ -13198,7 +13435,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13198
13435
  */
13199
13436
  uninstallIntegrationFromSpace: (integrationName: string, installationId: string, spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
13200
13437
  /**
13201
- * No description
13438
+ * @description Returns a paginated list of the sites an installation is enabled on, with the configuration of the integration for each of them. Pass extended to get the full site object instead of its ID.
13202
13439
  *
13203
13440
  * @tags integrations
13204
13441
  * @name ListIntegrationInstallationSites
@@ -13224,7 +13461,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13224
13461
  items: IntegrationSiteInstallation[];
13225
13462
  }, any>>;
13226
13463
  /**
13227
- * No description
13464
+ * @description Enables an existing organization-level installation on one site. The organization must already have the integration installed.
13228
13465
  *
13229
13466
  * @tags integrations
13230
13467
  * @name InstallIntegrationOnSite
@@ -13249,7 +13486,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13249
13486
  };
13250
13487
  }>>;
13251
13488
  /**
13252
- * No description
13489
+ * @description Returns the installation of an integration on one site, including the configuration of the integration for that site.
13253
13490
  *
13254
13491
  * @tags integrations
13255
13492
  * @name GetIntegrationSiteInstallation
@@ -13271,7 +13508,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13271
13508
  };
13272
13509
  }>>;
13273
13510
  /**
13274
- * No description
13511
+ * @description Updates the configuration of an integration for one site.
13275
13512
  *
13276
13513
  * @tags integrations
13277
13514
  * @name UpdateIntegrationSiteInstallation
@@ -14052,7 +14289,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14052
14289
  parent?: string;
14053
14290
  }, params?: RequestParams) => Promise<HttpResponse<Collection, any>>;
14054
14291
  /**
14055
- * No description
14292
+ * @description Returns a paginated list of the integrations available to the organization: every publicly published integration plus the private ones the organization owns or is trusted with. Prefer this over the public listing when acting inside an organization.
14056
14293
  *
14057
14294
  * @tags integrations
14058
14295
  * @name ListOrganizationIntegrations
@@ -14093,7 +14330,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14093
14330
  items: Integration[];
14094
14331
  }, any>>;
14095
14332
  /**
14096
- * No description
14333
+ * @description Returns whether an integration is installed for the organization and the status of that installation. Use this for a single integration instead of listing every status.
14097
14334
  *
14098
14335
  * @tags integrations
14099
14336
  * @name GetOrganizationIntegrationStatus
@@ -14138,7 +14375,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14138
14375
  }[];
14139
14376
  }, any>>;
14140
14377
  /**
14141
- * @description Returns integration installations in the organization. Use site or space with the matching target to efficiently scope the result to one resource.
14378
+ * @description Returns integration installations in the organization. Use site or space with the matching target to efficiently scope the result to one resource. The target of each installation says whether it is installed on the organization, a space or a site.
14142
14379
  *
14143
14380
  * @tags integrations, critical
14144
14381
  * @name ListOrganizationIntegrationsStatus
@@ -15171,16 +15408,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15171
15408
  };
15172
15409
  }>>;
15173
15410
  /**
15174
- * @description Reorders an item in the site's navigation structure by moving a site space, section, or section group to a specified position relative to another item. Use this to reorganize the navigation order after adding new sections or to reflect a new content hierarchy.
15411
+ * @description Reorders a site space, section, section group, or external link relative to any sibling at the same structure level. Sorting changes sibling order only; move an item between the root and a group through that item's update operation first.
15175
15412
  *
15176
15413
  * @tags sites
15177
15414
  * @name SortSiteStructure
15178
- * @summary Move a site space, section, or section group to a new position
15415
+ * @summary Move a site structure item to a new position
15179
15416
  * @request PATCH:/orgs/{organizationId}/sites/{siteId}/structure/sort
15180
15417
  * @secure
15181
15418
  */
15182
15419
  sortSiteStructure: (organizationId: EntityId, siteId: string, data: {
15183
- /** pointer to the item (site space, site section or site section group) being moved. */
15420
+ /** Pointer to the site space, section, section group, or external link being moved. */
15184
15421
  item: SiteStructureItemPointer;
15185
15422
  /** The position to move the item to. When not provided the item is moved to the end of the site structure. */
15186
15423
  position: SiteStructureItemMovePosition;
@@ -15346,7 +15583,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15346
15583
  items: Integration[];
15347
15584
  }, any>>;
15348
15585
  /**
15349
- * @description Links an existing space to the site by creating a site space relationship.
15586
+ * @description Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces are blank unless a template is provided.
15350
15587
  *
15351
15588
  * @tags site-spaces
15352
15589
  * @name AddSpaceToSite
@@ -15355,18 +15592,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15355
15592
  * @secure
15356
15593
  */
15357
15594
  addSpaceToSite: (organizationId: EntityId, siteId: string, data: {
15358
- /** ID of the space */
15359
- spaceId: string;
15595
+ /** Pass the ID of an existing space or `null` to create a new space. */
15596
+ spaceId: string | null;
15597
+ /** Template for the new space when `spaceId` is `null`. Templates that provision organization-level resources, such as OpenAPI specifications, are not supported by this site-scoped operation. */
15598
+ template?: ApplySpaceTemplate;
15360
15599
  /** ID of the section to add the space to. If not provided, the space will be added to the default section or at the root level if the site has no sections. */
15361
15600
  sectionId?: string;
15362
15601
  /**
15363
- * Whether the site space should be created as draft. Defaults to false.
15602
+ * Whether the site space should be created as draft. Defaults to false. Editors can set this to true to create draft content on a non-empty site. Creating live content and adding the first content require Creator permission.
15364
15603
  * @default false
15365
15604
  */
15366
15605
  draft?: boolean;
15367
- /** Custom home page within the space, rendered at the site space's path root instead of the space's default landing page. */
15606
+ /** Custom home page within an existing space, rendered at the site space's path root instead of the space's default landing page. Providing it when `spaceId` is `null` returns a 400 error. */
15368
15607
  pageId?: string | null;
15369
- /** Title of the site */
15608
+ /** Site-specific title override for the variant. Also used as the space title when `spaceId` is `null` and no template is provided. */
15370
15609
  title?: SiteTitle;
15371
15610
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
15372
15611
  /**
@@ -15452,6 +15691,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15452
15691
  icon?: Icon | null;
15453
15692
  /** Whether the site section group should be kept in draft mode. Setting it to true makes the site section group draft. Setting it to false makes the site section group live. */
15454
15693
  draft?: boolean;
15694
+ /** ID of the parent section group to move this section group into. Set to null to move the section group to the root of the site. */
15695
+ parentSectionGroupId?: string | null;
15455
15696
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
15456
15697
  /**
15457
15698
  * No description
@@ -15464,7 +15705,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15464
15705
  */
15465
15706
  deleteSiteSectionGroupById: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15466
15707
  /**
15467
- * @description Creates a new top-level navigation section in the site by linking a space as its primary content source. The section appears as a tab or sidebar entry in the site navigation.
15708
+ * @description Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces are blank unless a template is provided.
15468
15709
  *
15469
15710
  * @tags site-sections
15470
15711
  * @name AddSectionToSite
@@ -15473,13 +15714,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15473
15714
  * @secure
15474
15715
  */
15475
15716
  addSectionToSite: (organizationId: EntityId, siteId: string, data: {
15476
- /** ID of the space to be added to the section as a site space variant */
15477
- spaceId: string;
15717
+ /** Pass the ID of an existing space or pass `null` to create a new space. The space will be added to the section as a site space variant. */
15718
+ spaceId: string | null;
15719
+ /** Template for the new space when `spaceId` is `null`. Templates that provision organization-level resources, such as OpenAPI specifications, are not supported by this site-scoped operation. */
15720
+ template?: ApplySpaceTemplate;
15721
+ /** Section title. Also used as the space title when `spaceId` is `null` and no template is provided. */
15478
15722
  title?: SiteSectionTitle | null;
15479
15723
  icon?: Icon | null;
15480
- /** Whether the section should be created in draft mode. */
15724
+ /**
15725
+ * Whether the section should be created in draft mode. Defaults to false. Editors can set this to true to create draft content after sections are enabled. Creating live content requires Creator permission; enabling sections requires Admin permission.
15726
+ * @default false
15727
+ */
15481
15728
  draft?: boolean;
15482
- /** Custom home page within the space, rendered at the section's path root instead of the space's default landing page. */
15729
+ /** Custom home page within an existing space, rendered at the section's path root instead of the space's default landing page. Providing it when `spaceId` is `null` returns a 400 error. */
15483
15730
  pageId?: string;
15484
15731
  /** ID of the section group to create the section in */
15485
15732
  siteSectionGroupId?: string;
@@ -15546,6 +15793,91 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15546
15793
  * @secure
15547
15794
  */
15548
15795
  deleteSiteSectionById: (organizationId: EntityId, siteId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15796
+ /**
15797
+ * @description Creates an external navigation link at the site root or in a section group. External links require a section-based site structure and cannot be placed inside a section. The destination must be an absolute HTTP or HTTPS URL. Draft links and links whose adaptive condition does not match are omitted from published structure responses. Use the generic structure sort operation after creation to change sibling order.
15798
+ *
15799
+ * @tags site-external-links
15800
+ * @name AddExternalLinkToSite
15801
+ * @summary Add an external link to a site's navigation
15802
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/external-links
15803
+ * @secure
15804
+ */
15805
+ addExternalLinkToSite: (organizationId: EntityId, siteId: string, data: {
15806
+ /** Title of the site section */
15807
+ title: SiteSectionTitle;
15808
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
15809
+ localizedTitle?: LocalizedString128;
15810
+ description?: SiteSectionDescription | null;
15811
+ localizedDescription?: LocalizedString256 | null;
15812
+ icon?: Icon | null;
15813
+ /** Absolute HTTP or HTTPS destination URL */
15814
+ url: URL;
15815
+ /** ID of the section group to create the link in. Omit to place it at the site root. */
15816
+ parent?: string;
15817
+ /** Whether the external link should be created in draft mode */
15818
+ draft?: boolean;
15819
+ /** Adaptive condition controlling whether visitors see the link */
15820
+ condition?: Expression | null;
15821
+ }, params?: RequestParams) => Promise<HttpResponse<SiteExternalLink, Error | {
15822
+ error: {
15823
+ /** @format int32 */
15824
+ code: 400;
15825
+ message: string;
15826
+ };
15827
+ }>>;
15828
+ /**
15829
+ * @description Updates an external navigation link. Set parent to a section group ID to move the link into that group, or null to move it to the site root; links cannot be placed inside a section. A changed destination must remain an absolute HTTP or HTTPS URL. Draft and adaptive-condition fields control visibility. Use the generic structure sort operation after changing the parent to adjust the link's sibling order.
15830
+ *
15831
+ * @tags site-external-links
15832
+ * @name UpdateSiteExternalLinkById
15833
+ * @summary Update an external link in a site's navigation
15834
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/external-links/{siteExternalLinkId}
15835
+ * @secure
15836
+ */
15837
+ updateSiteExternalLinkById: (organizationId: EntityId, siteId: string, siteExternalLinkId: string, data: {
15838
+ /** Title of the site section */
15839
+ title?: SiteSectionTitle;
15840
+ localizedTitle?: LocalizedString128 | null;
15841
+ description?: SiteSectionDescription | null;
15842
+ localizedDescription?: LocalizedString256 | null;
15843
+ icon?: Icon | null;
15844
+ /** Absolute HTTP or HTTPS destination URL */
15845
+ url?: URL;
15846
+ /** ID of the section group to move the link into. Set to null to move it to the site root. */
15847
+ parent?: string | null;
15848
+ /** Whether the external link should be kept in draft mode */
15849
+ draft?: boolean;
15850
+ /** Adaptive condition controlling whether visitors see the link */
15851
+ condition?: Expression | null;
15852
+ }, params?: RequestParams) => Promise<HttpResponse<SiteExternalLink, Error | {
15853
+ error: {
15854
+ /** @format int32 */
15855
+ code: 400;
15856
+ message: string;
15857
+ };
15858
+ } | {
15859
+ error: {
15860
+ /** @format int32 */
15861
+ code: 404;
15862
+ message: string;
15863
+ };
15864
+ }>>;
15865
+ /**
15866
+ * @description Deletes an external link. This operation is intentionally unavailable to MCP clients.
15867
+ *
15868
+ * @tags site-external-links
15869
+ * @name DeleteSiteExternalLinkById
15870
+ * @summary Delete an external link from a site's navigation
15871
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/external-links/{siteExternalLinkId}
15872
+ * @secure
15873
+ */
15874
+ deleteSiteExternalLinkById: (organizationId: EntityId, siteId: string, siteExternalLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
15875
+ error: {
15876
+ /** @format int32 */
15877
+ code: 404;
15878
+ message: string;
15879
+ };
15880
+ }>>;
15549
15881
  /**
15550
15882
  * @description Performs a full-text search across all published spaces in the site and returns matching pages with relevant excerpts. Use the scope parameter to restrict the search to specific site spaces or sections. Prefer this over the space-level search when you need to search across a multi-section site in one call.
15551
15883
  *
@@ -15595,12 +15927,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15595
15927
  items: (SearchSpaceResult | SearchRecordResult)[];
15596
15928
  }, any>>;
15597
15929
  /**
15598
- * @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.
15930
+ * @description Hints the search backend that latency-sensitive site search requests are likely to arrive soon. Call this when a visitor opens the site's search interface.
15931
+ *
15932
+ * @tags sites
15933
+ * @name PrewarmSiteSearch
15934
+ * @summary Prewarm a site's search cache
15935
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/search/prewarm
15936
+ * @secure
15937
+ */
15938
+ prewarmSiteSearch: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15939
+ /**
15940
+ * @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. Deprecated in favour of `submitAgentFeedbackToSite`, which collects feedback about every surface a site exposes to agents. Send the same payload there as a `site-content` subject.
15599
15941
  *
15600
15942
  * @tags site-insights
15601
15943
  * @name SubmitSiteAgentFeedback
15602
- * @summary Submit agent feedback for a site
15944
+ * @summary Submit agent feedback for a site. (Deprecated) use submitAgentFeedbackToSite instead.
15603
15945
  * @request POST:/orgs/{organizationId}/sites/{siteId}/agent-feedback
15946
+ * @deprecated
15604
15947
  * @secure
15605
15948
  */
15606
15949
  submitSiteAgentFeedback: (organizationId: EntityId, siteId: string, data: {
@@ -15621,6 +15964,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15621
15964
  /** Surface the feedback was submitted from. When omitted, the feedback is recorded with an unknown source. */
15622
15965
  source?: AgentFeedbackSource;
15623
15966
  }, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15967
+ /**
15968
+ * @description Submit structured feedback from an AI agent about an MCP tool or operation, a CLI command, an API endpoint, a site page/mcp, or the product overall. The site collects and owns the feedback rather than being its subject.
15969
+ *
15970
+ * @tags site-agent-feedback
15971
+ * @name SubmitAgentFeedbackToSite
15972
+ * @summary Submit agent feedback
15973
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/agents/feedback
15974
+ * @secure
15975
+ */
15976
+ submitAgentFeedbackToSite: (organizationId: EntityId, siteId: string, data: AgentFeedbackInput, params?: RequestParams) => Promise<HttpResponse<{
15977
+ /** Unique identifier of the submission. */
15978
+ id: string;
15979
+ /** Message relayed back to the agent, acknowledging the feedback and telling it what happens next. */
15980
+ result: string;
15981
+ }, {
15982
+ error: {
15983
+ /** @format int32 */
15984
+ code: 400;
15985
+ message: string;
15986
+ };
15987
+ } | {
15988
+ error: {
15989
+ /** @format int32 */
15990
+ code: 403;
15991
+ message: string;
15992
+ };
15993
+ }>>;
15624
15994
  /**
15625
15995
  * @description The response is streamed.
15626
15996
  *
@@ -16056,7 +16426,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16056
16426
  items: SiteTopic[];
16057
16427
  }, any>>;
16058
16428
  /**
16059
- * No description
16429
+ * @description Retrieves a single topic of a site by its ID, including its label, its parent topic when it is a subtopic, its summary and usage settings, and its page, record, finding and Ask AI question counts. Use this when you have a topic ID and need the topic's label or its stats.
16060
16430
  *
16061
16431
  * @tags site-context
16062
16432
  * @name GetSiteTopicById
@@ -16893,7 +17263,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16893
17263
  topic?: SiteAdsTopic;
16894
17264
  }, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16895
17265
  /**
16896
- * @description Creates a new redirect rule mapping a source path to a destination URL or content reference. Use the bulk upsert endpoint instead when creating many redirects at once.
17266
+ * @description Creates a new redirect rule mapping a source path to a destination URL or content reference. Creating a live redirect also resolves open broken-link findings for the same source path. Use the bulk upsert endpoint instead when creating many redirects at once.
16897
17267
  *
16898
17268
  * @tags site-redirects
16899
17269
  * @name CreateSiteRedirect
@@ -17024,6 +17394,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17024
17394
  * @default false
17025
17395
  */
17026
17396
  draft?: boolean;
17397
+ /** Sort redirects by the given field. */
17398
+ orderBy?: SiteRedirectOrderBy;
17027
17399
  }, params?: RequestParams) => Promise<HttpResponse<List & {
17028
17400
  items: SiteRedirect[];
17029
17401
  }, any>>;
@@ -17609,7 +17981,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17609
17981
  };
17610
17982
  }>>;
17611
17983
  /**
17612
- * @description Updates the installation configuration, then queues a sync operation using the new settings. A `git` priority queues an import from the selected repository and branch into GitBook; a `gitbook` priority queues an export from GitBook to the repository. Site imports require a `docs.yaml` file at the configured project directory and return a conflict without saving or queuing the sync when the file is missing.
17984
+ * @description Updates the installation configuration, then queues a sync operation using the new settings. A `git` priority queues an import from the selected repository and branch into GitBook; a `gitbook` priority queues an export from GitBook to the repository. Site imports require a `gitbook-docs.yaml` file at the configured project directory and return a conflict without saving or queuing the sync when the file is missing.
17613
17985
  *
17614
17986
  * @tags git
17615
17987
  * @name UpdateGitSyncInstallationById
@@ -17624,9 +17996,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17624
17996
  error: {
17625
17997
  type: "missing_site_git_sync_config";
17626
17998
  details: {
17627
- /** Repository-relative path where `docs.yaml` is required. */
17999
+ /** Repository-relative path where `gitbook-docs.yaml` is required. */
17628
18000
  path: string;
17629
- /** Repository branch where `docs.yaml` is required. */
18001
+ /** Repository branch where `gitbook-docs.yaml` is required. */
17630
18002
  branch: string;
17631
18003
  /** Prompt for a coding agent to create and commit the missing file. */
17632
18004
  prompt: string;