@gitbook/api 0.199.0 → 0.201.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
@@ -1,3 +1,14 @@
1
+ /**
2
+ * Steering on how far an agent should reach when it changes content.
3
+ * Only `read-only` is a hard boundary: the editing tools are not given to the agent, so it cannot change content whatever it is asked. The other values are guidance the agent follows — they steer where the work belongs. Agents can still make small edits elsewhere when the change it was asked for would otherwise leave the documentation broken (e.g. an inbound link to a page it renamed).
4
+ * `all` sets no specific focus, which is the default. `read-only` reads, searches and comments without editing. `current-page` focuses on the page the user is on and its subpages. `modified-pages` focuses on the pages a change request has already touched.
5
+ */
6
+ export declare enum AgentEditScope {
7
+ All = "all",
8
+ ReadOnly = "read-only",
9
+ CurrentPage = "current-page",
10
+ ModifiedPages = "modified-pages"
11
+ }
1
12
  export declare enum AgentStatus {
2
13
  Idle = "idle",
3
14
  Processing = "processing",
@@ -730,6 +741,20 @@ export declare enum SAMLProviderStatus {
730
741
  Active = "active",
731
742
  Pending = "pending"
732
743
  }
744
+ /** An organization feature used for plan access and upgrade prompts. */
745
+ export declare enum OrganizationFeature {
746
+ MaxMembers = "max-members",
747
+ AiLens = "ai-lens",
748
+ PdfExport = "pdf-export",
749
+ AiWriting = "ai-writing",
750
+ ReusableContent = "reusable-content",
751
+ Translations = "translations",
752
+ MembersAdvancedRoles = "members-advanced-roles",
753
+ MembersTeams = "members-teams",
754
+ MembersTeamOwners = "members-team-owners",
755
+ SecuritySaml = "security-saml",
756
+ ChangeRequestsMergeRules = "change-requests-merge-rules"
757
+ }
733
758
  export declare enum BillingSwitchAction {
734
759
  Trial = "trial",
735
760
  Upgrade = "upgrade",
@@ -2205,35 +2230,6 @@ export interface DocumentBlockIntegration {
2205
2230
  spaceId?: string;
2206
2231
  };
2207
2232
  }
2208
- export interface DocumentBlockHint {
2209
- object: "block";
2210
- type: "hint";
2211
- key?: string;
2212
- data: {
2213
- style: "info" | "warning" | "danger" | "success";
2214
- /** Name of the icon */
2215
- icon?: Icon;
2216
- };
2217
- nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration)[];
2218
- isVoid?: false;
2219
- }
2220
- export interface DocumentBlockQuote {
2221
- object: "block";
2222
- type: "blockquote";
2223
- key?: string;
2224
- nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
2225
- isVoid?: false;
2226
- data?: object;
2227
- }
2228
- export interface DocumentBlockMath {
2229
- object: "block";
2230
- type: "math";
2231
- key?: string;
2232
- data: {
2233
- formula: string;
2234
- };
2235
- isVoid: true;
2236
- }
2237
2233
  export interface DocumentTableViewGrid {
2238
2234
  type: "grid";
2239
2235
  /** Ordered list of the definition IDs to display */
@@ -2379,6 +2375,35 @@ export interface DocumentBlockTable {
2379
2375
  };
2380
2376
  fragments: DocumentFragment[];
2381
2377
  }
2378
+ export interface DocumentBlockHint {
2379
+ object: "block";
2380
+ type: "hint";
2381
+ key?: string;
2382
+ data: {
2383
+ style: "info" | "warning" | "danger" | "success";
2384
+ /** Name of the icon */
2385
+ icon?: Icon;
2386
+ };
2387
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable)[];
2388
+ isVoid?: false;
2389
+ }
2390
+ export interface DocumentBlockQuote {
2391
+ object: "block";
2392
+ type: "blockquote";
2393
+ key?: string;
2394
+ nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
2395
+ isVoid?: false;
2396
+ data?: object;
2397
+ }
2398
+ export interface DocumentBlockMath {
2399
+ object: "block";
2400
+ type: "math";
2401
+ key?: string;
2402
+ data: {
2403
+ formula: string;
2404
+ };
2405
+ isVoid: true;
2406
+ }
2382
2407
  export interface DocumentBlockListItem {
2383
2408
  object: "block";
2384
2409
  type: "list-item";
@@ -3184,7 +3209,7 @@ export type ChangeRequestSubject = string;
3184
3209
  export type ChangeRequestLinkTitle = string;
3185
3210
  /** External link associated with a change request. */
3186
3211
  export interface ChangeRequestLinkInput {
3187
- /** The ID of an existing link, as served on the change request. Pass it back to update that link; omit it to add a new one. Links created before links were stored individually have no ID and are matched on their URL instead. */
3212
+ /** The ID of an existing link, as served on the change request. Pass it back to update that link, or omit it to add a new one. */
3188
3213
  id?: string;
3189
3214
  ref: ContentRefURL;
3190
3215
  /** Optional title to display for the link. */
@@ -3214,8 +3239,8 @@ export type ChangeRequestLinkExpanded = {
3214
3239
  state: "error";
3215
3240
  };
3216
3241
  export type ChangeRequestLink = ChangeRequestLinkInput & {
3217
- /** The ID of the link. Absent on links not yet stored relationally. */
3218
- id?: string;
3242
+ /** The ID of the link. */
3243
+ id: string;
3219
3244
  /** External ticket data resolved for this link by a configured connector. */
3220
3245
  expanded?: ChangeRequestLinkExpanded;
3221
3246
  };
@@ -3263,6 +3288,15 @@ export interface ChangeRequest {
3263
3288
  /** ID of the site finding associated with the change request, when applicable. */
3264
3289
  finding?: string;
3265
3290
  };
3291
+ /** Style guide check run that opened the change request, when it came from one. */
3292
+ styleguide?: {
3293
+ /** ID of the site the style guide belongs to. */
3294
+ site: string;
3295
+ /** ID of the style guide check run that opened the change request. */
3296
+ run: string;
3297
+ /** Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed. */
3298
+ changedPages?: number;
3299
+ };
3266
3300
  /** If true, the change request is not up-to-date with latest changes in the main content. */
3267
3301
  outdated: boolean;
3268
3302
  /** Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request. */
@@ -5776,6 +5810,44 @@ export interface SubscriptionChanges {
5776
5810
  isPublished: boolean;
5777
5811
  })[];
5778
5812
  }
5813
+ /**
5814
+ * Free-text detail a user typed alongside their cancellation reason.
5815
+ * @minLength 1
5816
+ * @maxLength 500
5817
+ */
5818
+ export type BillingCancellationComment = string;
5819
+ /** Why an organization is cancelling its subscription, as answered by the user in the app. Recorded for analytics only: it never changes how the cancellation is applied. */
5820
+ export type BillingCancellationFeedback = {
5821
+ reason: "not_satisfied_with_product";
5822
+ /** The feature that was not satisfactory */
5823
+ reasonDetail: "editor" | "gitsync" | "ai_features";
5824
+ } | {
5825
+ reason: "not_satisfied_with_product";
5826
+ /** The feature that was not satisfactory */
5827
+ reasonDetail: "other";
5828
+ /** Free-text detail a user typed alongside their cancellation reason. */
5829
+ reasonComment: BillingCancellationComment;
5830
+ } | {
5831
+ reason: "will_vibe_code_our_own_app";
5832
+ /** The tool the organization is moving to */
5833
+ reasonDetail: "claude" | "codex" | "replit";
5834
+ } | {
5835
+ reason: "will_vibe_code_our_own_app";
5836
+ /** The tool the organization is moving to */
5837
+ reasonDetail: "other";
5838
+ /** Free-text detail a user typed alongside their cancellation reason. */
5839
+ reasonComment: BillingCancellationComment;
5840
+ } | {
5841
+ reason: "found_better_alternative";
5842
+ /** Free-text detail a user typed alongside their cancellation reason. */
5843
+ reasonComment: BillingCancellationComment;
5844
+ } | {
5845
+ reason: "company_shutdown";
5846
+ } | {
5847
+ reason: "other_reason";
5848
+ /** Free-text detail a user typed alongside their cancellation reason. */
5849
+ reasonComment: BillingCancellationComment;
5850
+ };
5779
5851
  /**
5780
5852
  * Coupon or promotion code to apply to billing operations.
5781
5853
  * @minLength 1
@@ -5791,6 +5863,8 @@ export interface UpgradeOrganizationBilling {
5791
5863
  changes?: SubscriptionChanges;
5792
5864
  /** Reason that triggered the billing upgrade */
5793
5865
  reason?: string;
5866
+ /** Why an organization is cancelling its subscription, as answered by the user in the app. Recorded for analytics only: it never changes how the cancellation is applied. */
5867
+ cancellationFeedback?: BillingCancellationFeedback;
5794
5868
  /** Coupon or promotion code to apply to the subscription */
5795
5869
  coupon?: BillingCoupon;
5796
5870
  /** Optional usage addons to apply when upgrading: - if set, apply provided billable addons (non-billable meters are ignored) - if omitted, keep current subscription addons (or billing addons for new subs) - if omitted during interval switch, keep addon selection and switch addon price interval - if empty, or all provided meters are ignored, remove all existing billable addons */
@@ -6909,7 +6983,7 @@ export interface SiteCustomizationSettingsBase {
6909
6983
  footer: {
6910
6984
  logo?: CustomizationThemedURL;
6911
6985
  groups: CustomizationFooterGroup[];
6912
- /** @maxLength 300 */
6986
+ /** @maxLength 512 */
6913
6987
  copyright?: string;
6914
6988
  };
6915
6989
  announcement?: CustomizationAnnouncement;
@@ -7154,6 +7228,11 @@ export interface AgentFeedbackReportedBy {
7154
7228
  * @maxLength 512
7155
7229
  */
7156
7230
  userAgent?: string;
7231
+ /**
7232
+ * Identifier the surface gave the agent for the call being reported, used to find that call in the surface's own logs. Not an identifier of this report.
7233
+ * @maxLength 100
7234
+ */
7235
+ correlationId?: string;
7157
7236
  /**
7158
7237
  * Whether the user explicitly asked the agent to submit this feedback.
7159
7238
  * @default false
@@ -8644,6 +8723,20 @@ export type SiteAgentSettings = {
8644
8723
  location: string;
8645
8724
  };
8646
8725
  } & SiteAgentSettingsInput;
8726
+ /** A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each. */
8727
+ export interface SiteStyleguideRun {
8728
+ object: "styleguide-run";
8729
+ /** The ID of the run */
8730
+ id: string;
8731
+ /** ID of the site the run belongs to */
8732
+ site: string;
8733
+ /** ID of the style guide space the run checked against */
8734
+ styleguide: string;
8735
+ /** IDs of the spaces the run was asked to check. A change request may have failed to open for one of them, so this is the intent rather than the result. */
8736
+ spaces: string[];
8737
+ createdAt: Timestamp;
8738
+ createdBy: User;
8739
+ }
8647
8740
  /** Analytics info on the GitBook's site session. */
8648
8741
  export type SiteInsightsEventSession = SiteInsightsSession & {
8649
8742
  /** The visitors cookies. */
@@ -9175,6 +9268,8 @@ export interface SiteRedirect {
9175
9268
  draft: boolean;
9176
9269
  /** Capture and append the wildcard-matched suffix to the destination URL. */
9177
9270
  captureWildcard: boolean;
9271
+ /** Whether the redirect is configured as permanent. Permanent redirects are served as HTTP 308 for public live traffic and HTTP 307 in non-public contexts. */
9272
+ permanent: boolean;
9178
9273
  destination: SiteRedirectDestination;
9179
9274
  /**
9180
9275
  * When the redirect was created.
@@ -9877,8 +9972,8 @@ export interface GitSyncSiteStructureSectionGroup {
9877
9972
  icon?: Icon;
9878
9973
  /** Whether the section group is draft and not live. */
9879
9974
  draft?: boolean;
9880
- /** Section or section group nodes nested under this group. */
9881
- children?: (GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection)[];
9975
+ /** Section, section group, or external link nodes nested under this group. */
9976
+ children?: (GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureExternalLink)[];
9882
9977
  }
9883
9978
  /**
9884
9979
  * A space — a single content unit in the site's navigation tree. Discriminated
@@ -9972,19 +10067,70 @@ export interface GitSyncSiteStructureSection {
9972
10067
  /** Space nodes nested under this section. */
9973
10068
  children?: GitSyncSiteStructureSpace[];
9974
10069
  }
10070
+ /**
10071
+ * Title of the external link
10072
+ * @minLength 2
10073
+ * @maxLength 128
10074
+ */
10075
+ export type SiteExternalLinkTitle = string;
10076
+ /**
10077
+ * Description of the external link
10078
+ * @minLength 0
10079
+ * @maxLength 256
10080
+ */
10081
+ export type SiteExternalLinkDescription = string;
10082
+ /**
10083
+ * An external link — a leaf that navigates away from the site to an absolute
10084
+ * HTTP(S) URL. Discriminated by `type: external-link`.
10085
+ *
10086
+ * An external link only exists in a section-based site structure: it may sit
10087
+ * at the root alongside sections and section groups, or nested under a
10088
+ * section group, but never inside a section.
10089
+ */
10090
+ export interface GitSyncSiteStructureExternalLink {
10091
+ /** Discriminator for an external link node. */
10092
+ type: "external-link";
10093
+ /**
10094
+ * Stable identifier for this external link, used as the Git Sync key.
10095
+ * Must be unique amongst all other nodes of the site. For example:
10096
+ * `link-status` or `link-1`.
10097
+ * @minLength 1
10098
+ */
10099
+ key: string;
10100
+ /** Title of the external link */
10101
+ title: SiteExternalLinkTitle;
10102
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
10103
+ localizedTitle?: LocalizedString128;
10104
+ /** Description of the external link */
10105
+ description?: SiteExternalLinkDescription;
10106
+ /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
10107
+ localizedDescription?: LocalizedString256;
10108
+ /** Name of the icon */
10109
+ icon?: Icon;
10110
+ /** Absolute HTTP or HTTPS URL opened by the external link. */
10111
+ url: URL;
10112
+ /** Whether the external link is draft and not live. */
10113
+ draft?: boolean;
10114
+ /** Expression to evaluate */
10115
+ condition?: Expression;
10116
+ }
9975
10117
  /**
9976
10118
  * A single node in a Git Sync site structure tree — a section group, a
9977
- * section, or a space, discriminated by `type`.
10119
+ * section, a space, or an external link, discriminated by `type`.
9978
10120
  */
9979
- export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureSpace;
10121
+ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureSpace | GitSyncSiteStructureExternalLink;
9980
10122
  /**
9981
10123
  * Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
9982
- * three node types: a section group, a section, or a space.
10124
+ * four node types: a section group, a section, a space, or an external link.
9983
10125
  *
9984
10126
  * A **space** is a leaf holding content, pointed at a repository directory. A
9985
10127
  * **section** gathers spaces behind one top-level navigation entry. A
9986
- * **section group** gathers sections. A site either uses sections or lists its
9987
- * spaces at the top level, never both.
10128
+ * **section group** gathers sections. An **external link** is a leaf that
10129
+ * navigates away from the site to an absolute HTTP(S) URL — it may sit at the
10130
+ * root or under a section group, but never inside a section, and only exists
10131
+ * in a site that also has at least one section. A site either uses sections
10132
+ * (optionally alongside external links) or lists its spaces at the top level,
10133
+ * never both.
9988
10134
  *
9989
10135
  * ```yaml
9990
10136
  * structure:
@@ -10047,8 +10193,12 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
10047
10193
  * - A site declaring any section marks exactly one of those sections
10048
10194
  * `default: true`, and lists no space at the top level: once a section
10049
10195
  * exists, every space belongs inside one.
10050
- * - Sections hold only spaces. Section groups hold only sections, or one
10051
- * further level of section groups — nothing nests deeper than that.
10196
+ * - Sections hold only spaces. Section groups hold only sections, nested
10197
+ * section groups (one further level), or external links — nothing nests
10198
+ * deeper than that.
10199
+ * - External links are only valid at the root or nested in a section group,
10200
+ * never inside a section. A site containing an external link must use
10201
+ * sections, with at least one section declared.
10052
10202
  * - Spaces pointed at the same `content.directory` declare the same
10053
10203
  * `content.language`. One directory is read once, so it cannot produce two
10054
10204
  * languages at the same time.
@@ -10082,12 +10232,16 @@ export interface GitSyncSiteConfig {
10082
10232
  title: string;
10083
10233
  /**
10084
10234
  * Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
10085
- * three node types: a section group, a section, or a space.
10235
+ * four node types: a section group, a section, a space, or an external link.
10086
10236
  *
10087
10237
  * A **space** is a leaf holding content, pointed at a repository directory. A
10088
10238
  * **section** gathers spaces behind one top-level navigation entry. A
10089
- * **section group** gathers sections. A site either uses sections or lists its
10090
- * spaces at the top level, never both.
10239
+ * **section group** gathers sections. An **external link** is a leaf that
10240
+ * navigates away from the site to an absolute HTTP(S) URL — it may sit at the
10241
+ * root or under a section group, but never inside a section, and only exists
10242
+ * in a site that also has at least one section. A site either uses sections
10243
+ * (optionally alongside external links) or lists its spaces at the top level,
10244
+ * never both.
10091
10245
  *
10092
10246
  * ```yaml
10093
10247
  * structure:
@@ -10150,8 +10304,12 @@ export interface GitSyncSiteConfig {
10150
10304
  * - A site declaring any section marks exactly one of those sections
10151
10305
  * `default: true`, and lists no space at the top level: once a section
10152
10306
  * exists, every space belongs inside one.
10153
- * - Sections hold only spaces. Section groups hold only sections, or one
10154
- * further level of section groups — nothing nests deeper than that.
10307
+ * - Sections hold only spaces. Section groups hold only sections, nested
10308
+ * section groups (one further level), or external links — nothing nests
10309
+ * deeper than that.
10310
+ * - External links are only valid at the root or nested in a section group,
10311
+ * never inside a section. A site containing an external link must use
10312
+ * sections, with at least one section declared.
10155
10313
  * - Spaces pointed at the same `content.directory` declare the same
10156
10314
  * `content.language`. One directory is read once, so it cannot produce two
10157
10315
  * languages at the same time.
@@ -10707,6 +10865,10 @@ export interface AgentState {
10707
10865
  pendingQuestion?: AgentPendingQuestion;
10708
10866
  /** Where the agent currently edits content. Absent until something is attached: the organization agent starts read-only, while a change request agent always edits the change request it belongs to. */
10709
10867
  editTarget?: AgentEditTarget;
10868
+ /** How far this conversation should reach when it changes content. */
10869
+ editScope?: AgentEditScope;
10870
+ /** Whether this conversation can only be read. Set on a transcript the agent produced on its own — an agent review — which is published for its requester to consult rather than to be continued: the client shows no composer and the agent refuses a message sent to it anyway. */
10871
+ consultOnly?: boolean;
10710
10872
  }
10711
10873
  /** Payload emitted by the agent with its current state. */
10712
10874
  export interface AgentStreamState {
@@ -11435,6 +11597,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11435
11597
  * @default true
11436
11598
  */
11437
11599
  metadata?: boolean;
11600
+ /**
11601
+ * If `true` is passed, mutable Git metadata may be served from a cache.
11602
+ * @default false
11603
+ */
11604
+ cachedMetadata?: boolean;
11438
11605
  /**
11439
11606
  * If `false` is passed, content will not be computed
11440
11607
  * @default true
@@ -12428,6 +12595,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12428
12595
  * @default true
12429
12596
  */
12430
12597
  metadata?: boolean;
12598
+ /**
12599
+ * If `true` is passed, mutable Git metadata may be served from a cache.
12600
+ * @default false
12601
+ */
12602
+ cachedMetadata?: boolean;
12431
12603
  /**
12432
12604
  * If `false` is passed, content will not be computed
12433
12605
  * @default true
@@ -12484,6 +12656,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12484
12656
  * @default true
12485
12657
  */
12486
12658
  metadata?: boolean;
12659
+ /**
12660
+ * If `true` is passed, mutable Git metadata may be served from a cache.
12661
+ * @default false
12662
+ */
12663
+ cachedMetadata?: boolean;
12487
12664
  /**
12488
12665
  * If `false` is passed, content will not be computed
12489
12666
  * @default true
@@ -14309,6 +14486,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14309
14486
  space?: string;
14310
14487
  /** If defined, only change requests linked to this site topic will be returned. */
14311
14488
  topic?: string;
14489
+ /** If defined, only change requests opened by this style guide check run will be returned. */
14490
+ styleguideRun?: string;
14312
14491
  /** Controls whether change requests from triage are included. Pass `none` to exclude change requests from triage, or `all` to include them. Default is `none`. */
14313
14492
  finding?: "none" | "all";
14314
14493
  /** The field to sort change requests by. Defaults to 'updatedAt'. */
@@ -16273,11 +16452,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16273
16452
  */
16274
16453
  getSiteScanById: (organizationId: EntityId, siteId: string, siteScanId: string, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
16275
16454
  /**
16276
- * No description
16455
+ * @description Lists the quality issues GitBook's AI has identified on a site by comparing its content against real usage and external sources — content gaps, outdated or incorrect content, and broken or outbound links. Use this when asked to find, audit, or fix problems in a site's docs.
16277
16456
  *
16278
16457
  * @tags site-context
16279
16458
  * @name ListSiteFindings
16280
- * @summary List all site context findings
16459
+ * @summary List documentation issues GitBook has found on a site
16281
16460
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings
16282
16461
  * @secure
16283
16462
  */
@@ -16320,21 +16499,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16320
16499
  items: SiteFinding[];
16321
16500
  }, any>>;
16322
16501
  /**
16323
- * No description
16502
+ * @description Retrieves the full detail of one documentation issue found by GitBook's AI. Use this after `listSiteFindings` to inspect a specific issue before deciding to fix, dismiss, or investigate it further.
16324
16503
  *
16325
16504
  * @tags site-context
16326
16505
  * @name GetSiteFindingById
16327
- * @summary Get a site finding by ID
16506
+ * @summary Get details of a single documentation issue
16328
16507
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
16329
16508
  * @secure
16330
16509
  */
16331
16510
  getSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
16332
16511
  /**
16333
- * No description
16512
+ * @description Changes the status of a documentation issue found by GitBook's AI, typically after fixing it (for example via `triggerChangeRequestsForSiteFinding`) or dismissing it as not worth acting on. This does not edit any content itself — it only records the outcome.
16334
16513
  *
16335
16514
  * @tags site-context
16336
16515
  * @name UpdateSiteFindingById
16337
- * @summary Update a site finding
16516
+ * @summary Resolve, dismiss, or reopen a documentation issue
16338
16517
  * @request PATCH:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
16339
16518
  * @secure
16340
16519
  */
@@ -16349,11 +16528,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16349
16528
  status: SiteFindingStatus;
16350
16529
  }, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
16351
16530
  /**
16352
- * No description
16531
+ * @description Lists the change requests created to fix a documentation issue. Use this to check whether an issue already has a pending or merged fix before triggering a new one.
16353
16532
  *
16354
16533
  * @tags site-context
16355
16534
  * @name ListChangeRequestsForSiteFinding
16356
- * @summary List change requests linked to a site finding
16535
+ * @summary List content fixes already proposed for a documentation issue
16357
16536
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests
16358
16537
  * @secure
16359
16538
  */
@@ -16370,21 +16549,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16370
16549
  items: ChangeRequest[];
16371
16550
  }, any>>;
16372
16551
  /**
16373
- * No description
16552
+ * @description Starts GitBook's AI on fixing a documentation issue directly: it drafts the content change and opens it as a change request for review, rather than editing content in place. This is the primary way to act on "fix issues/gaps/broken links in my docs" requests once `listSiteFindings` has surfaced the relevant findings. Processing is asynchronous; poll `listChangeRequestsForSiteFinding` for the resulting change request, then review and merge it with `submitOrMergeChangeRequest`.
16374
16553
  *
16375
16554
  * @tags site-context
16376
16555
  * @name TriggerChangeRequestsForSiteFinding
16377
- * @summary Process a site finding into change requests
16556
+ * @summary Fix a documentation issue by generating a change request
16378
16557
  * @request POST:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests
16379
16558
  * @secure
16380
16559
  */
16381
16560
  triggerChangeRequestsForSiteFinding: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16382
16561
  /**
16383
- * No description
16562
+ * @description Lists the site pages a documentation issue relates to. Use this to locate which page(s) to edit when fixing an issue manually instead of via `triggerChangeRequestsForSiteFinding`.
16384
16563
  *
16385
16564
  * @tags site-context
16386
16565
  * @name ListPagesForSiteFinding
16387
- * @summary List pages linked to a site finding
16566
+ * @summary List the pages affected by a documentation issue
16388
16567
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/pages
16389
16568
  * @secure
16390
16569
  */
@@ -16401,11 +16580,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16401
16580
  items: SiteFindingPage[];
16402
16581
  }, any>>;
16403
16582
  /**
16404
- * No description
16583
+ * @description Lists the questions end users asked GitBook's Ask-AI assistant that were used as evidence for a documentation issue. Use this to see what users actually wanted to know before deciding how to fix the issue.
16405
16584
  *
16406
16585
  * @tags site-context
16407
16586
  * @name ListQuestionsForSiteFinding
16408
- * @summary List questions linked to a site finding
16587
+ * @summary List the Ask-AI questions evidencing a documentation issue
16409
16588
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/questions
16410
16589
  * @secure
16411
16590
  */
@@ -16422,11 +16601,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16422
16601
  items: SiteQuestion[];
16423
16602
  }, any>>;
16424
16603
  /**
16425
- * No description
16604
+ * @description Lists the context records that GitBook's AI used as evidence for a documentation issue. Use this to see what real-world signal led to the finding before deciding how to fix it.
16426
16605
  *
16427
16606
  * @tags site-context
16428
16607
  * @name ListRecordsForSiteFinding
16429
- * @summary List records linked to a site finding
16608
+ * @summary List the source content evidencing a documentation issue
16430
16609
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/records
16431
16610
  * @secure
16432
16611
  */
@@ -16443,11 +16622,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16443
16622
  items: ContextRecord[];
16444
16623
  }, any>>;
16445
16624
  /**
16446
- * @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.
16625
+ * @description Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.
16447
16626
  *
16448
16627
  * @tags site-context
16449
16628
  * @name GetSiteFindingStats
16450
- * @summary Get aggregate statistics about the findings identified on a site
16629
+ * @summary Get a summary of documentation issues found on a site
16451
16630
  * @request GET:/orgs/{organizationId}/sites/{siteId}/stats/findings
16452
16631
  * @secure
16453
16632
  */
@@ -16602,11 +16781,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16602
16781
  usageSettings: SiteTopicUsageSettings;
16603
16782
  }, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
16604
16783
  /**
16605
- * No description
16784
+ * @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `updateSiteFindingById` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
16606
16785
  *
16607
16786
  * @tags site-context
16608
16787
  * @name DeleteSiteTopicFindings
16609
- * @summary Delete all findings for a topic
16788
+ * @summary Delete all documentation issues found under a topic
16610
16789
  * @request DELETE:/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}/findings
16611
16790
  * @secure
16612
16791
  */
@@ -16965,7 +17144,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16965
17144
  groups?: any[] | null;
16966
17145
  /**
16967
17146
  * The copyright text that is displayed in the footer. Set to null to reset the override.
16968
- * @maxLength 300
17147
+ * @maxLength 512
16969
17148
  */
16970
17149
  copyright?: string | null;
16971
17150
  };
@@ -17368,6 +17547,55 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17368
17547
  message: string;
17369
17548
  };
17370
17549
  }>>;
17550
+ /**
17551
+ * @description Starts a style guide check: GitBook Agent reviews the given spaces against the site's style guide and proposes fixes. One draft change request is opened per space, each marked as belonging to the returned run. Fails if the site has no style guide.
17552
+ *
17553
+ * @tags sites
17554
+ * @name CreateSiteStyleguideRun
17555
+ * @summary Start a style guide check run for a site
17556
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/styleguide/runs
17557
+ * @secure
17558
+ */
17559
+ createSiteStyleguideRun: (organizationId: EntityId, siteId: string, data: {
17560
+ /**
17561
+ * IDs of the site's spaces to check. Each must be an editable content space of the site, and not the style guide itself.
17562
+ * @maxItems 3
17563
+ * @minItems 1
17564
+ */
17565
+ spaces: string[];
17566
+ }, params?: RequestParams) => Promise<HttpResponse<{
17567
+ /** A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each. */
17568
+ run: SiteStyleguideRun;
17569
+ /** The change requests opened by the run, one per space that could be started. */
17570
+ changeRequests: ChangeRequest[];
17571
+ }, {
17572
+ error: {
17573
+ /** @format int32 */
17574
+ code: 404;
17575
+ message: string;
17576
+ };
17577
+ }>>;
17578
+ /**
17579
+ * @description Returns the site's style guide check runs, most recent first. Use the `styleguideRun` filter on the organization change requests endpoint to get the change requests a run opened.
17580
+ *
17581
+ * @tags sites
17582
+ * @name ListSiteStyleguideRuns
17583
+ * @summary List the style guide check runs of a site
17584
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/styleguide/runs
17585
+ * @secure
17586
+ */
17587
+ listSiteStyleguideRuns: (organizationId: EntityId, siteId: string, query?: {
17588
+ /** Identifier of the page results to fetch. */
17589
+ page?: string;
17590
+ /**
17591
+ * The number of results per page
17592
+ * @min 0
17593
+ * @max 1000
17594
+ */
17595
+ limit?: number;
17596
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
17597
+ items: SiteStyleguideRun[];
17598
+ }, any>>;
17371
17599
  /**
17372
17600
  * No description
17373
17601
  *
@@ -17438,6 +17666,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17438
17666
  * @default false
17439
17667
  */
17440
17668
  draft?: boolean;
17669
+ /**
17670
+ * Whether the redirect is permanent for public live traffic.
17671
+ * @default false
17672
+ */
17673
+ permanent?: boolean;
17441
17674
  destination: SiteRedirectInputDestination;
17442
17675
  }, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
17443
17676
  /**
@@ -17474,6 +17707,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17474
17707
  * @default false
17475
17708
  */
17476
17709
  captureWildcard?: boolean;
17710
+ /** Whether the redirect is permanent for public live traffic. */
17711
+ permanent?: boolean;
17477
17712
  /** If set to null, the redirect matching the source+intent target will be deleted. */
17478
17713
  destination: SiteRedirectInputDestination | null;
17479
17714
  })[];
@@ -17569,6 +17804,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17569
17804
  captureWildcard?: boolean;
17570
17805
  /** When true, it can be used to promote a draft redirect to live. */
17571
17806
  draft?: boolean;
17807
+ /** Whether the redirect is permanent for public live traffic. */
17808
+ permanent?: boolean;
17572
17809
  destination?: SiteRedirectDestination;
17573
17810
  }, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
17574
17811
  /**