@gitbook/api 0.199.0 → 0.200.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",
@@ -2205,35 +2216,6 @@ export interface DocumentBlockIntegration {
2205
2216
  spaceId?: string;
2206
2217
  };
2207
2218
  }
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
2219
  export interface DocumentTableViewGrid {
2238
2220
  type: "grid";
2239
2221
  /** Ordered list of the definition IDs to display */
@@ -2379,6 +2361,35 @@ export interface DocumentBlockTable {
2379
2361
  };
2380
2362
  fragments: DocumentFragment[];
2381
2363
  }
2364
+ export interface DocumentBlockHint {
2365
+ object: "block";
2366
+ type: "hint";
2367
+ key?: string;
2368
+ data: {
2369
+ style: "info" | "warning" | "danger" | "success";
2370
+ /** Name of the icon */
2371
+ icon?: Icon;
2372
+ };
2373
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable)[];
2374
+ isVoid?: false;
2375
+ }
2376
+ export interface DocumentBlockQuote {
2377
+ object: "block";
2378
+ type: "blockquote";
2379
+ key?: string;
2380
+ nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
2381
+ isVoid?: false;
2382
+ data?: object;
2383
+ }
2384
+ export interface DocumentBlockMath {
2385
+ object: "block";
2386
+ type: "math";
2387
+ key?: string;
2388
+ data: {
2389
+ formula: string;
2390
+ };
2391
+ isVoid: true;
2392
+ }
2382
2393
  export interface DocumentBlockListItem {
2383
2394
  object: "block";
2384
2395
  type: "list-item";
@@ -3263,6 +3274,15 @@ export interface ChangeRequest {
3263
3274
  /** ID of the site finding associated with the change request, when applicable. */
3264
3275
  finding?: string;
3265
3276
  };
3277
+ /** Style guide check run that opened the change request, when it came from one. */
3278
+ styleguide?: {
3279
+ /** ID of the site the style guide belongs to. */
3280
+ site: string;
3281
+ /** ID of the style guide check run that opened the change request. */
3282
+ run: string;
3283
+ /** Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed. */
3284
+ changedPages?: number;
3285
+ };
3266
3286
  /** If true, the change request is not up-to-date with latest changes in the main content. */
3267
3287
  outdated: boolean;
3268
3288
  /** Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request. */
@@ -5776,6 +5796,44 @@ export interface SubscriptionChanges {
5776
5796
  isPublished: boolean;
5777
5797
  })[];
5778
5798
  }
5799
+ /**
5800
+ * Free-text detail a user typed alongside their cancellation reason.
5801
+ * @minLength 1
5802
+ * @maxLength 500
5803
+ */
5804
+ export type BillingCancellationComment = string;
5805
+ /** 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. */
5806
+ export type BillingCancellationFeedback = {
5807
+ reason: "not_satisfied_with_product";
5808
+ /** The feature that was not satisfactory */
5809
+ reasonDetail: "editor" | "gitsync" | "ai_features";
5810
+ } | {
5811
+ reason: "not_satisfied_with_product";
5812
+ /** The feature that was not satisfactory */
5813
+ reasonDetail: "other";
5814
+ /** Free-text detail a user typed alongside their cancellation reason. */
5815
+ reasonComment: BillingCancellationComment;
5816
+ } | {
5817
+ reason: "will_vibe_code_our_own_app";
5818
+ /** The tool the organization is moving to */
5819
+ reasonDetail: "claude" | "codex" | "replit";
5820
+ } | {
5821
+ reason: "will_vibe_code_our_own_app";
5822
+ /** The tool the organization is moving to */
5823
+ reasonDetail: "other";
5824
+ /** Free-text detail a user typed alongside their cancellation reason. */
5825
+ reasonComment: BillingCancellationComment;
5826
+ } | {
5827
+ reason: "found_better_alternative";
5828
+ /** Free-text detail a user typed alongside their cancellation reason. */
5829
+ reasonComment: BillingCancellationComment;
5830
+ } | {
5831
+ reason: "company_shutdown";
5832
+ } | {
5833
+ reason: "other_reason";
5834
+ /** Free-text detail a user typed alongside their cancellation reason. */
5835
+ reasonComment: BillingCancellationComment;
5836
+ };
5779
5837
  /**
5780
5838
  * Coupon or promotion code to apply to billing operations.
5781
5839
  * @minLength 1
@@ -5791,6 +5849,8 @@ export interface UpgradeOrganizationBilling {
5791
5849
  changes?: SubscriptionChanges;
5792
5850
  /** Reason that triggered the billing upgrade */
5793
5851
  reason?: string;
5852
+ /** 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. */
5853
+ cancellationFeedback?: BillingCancellationFeedback;
5794
5854
  /** Coupon or promotion code to apply to the subscription */
5795
5855
  coupon?: BillingCoupon;
5796
5856
  /** 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 */
@@ -8644,6 +8704,20 @@ export type SiteAgentSettings = {
8644
8704
  location: string;
8645
8705
  };
8646
8706
  } & SiteAgentSettingsInput;
8707
+ /** 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. */
8708
+ export interface SiteStyleguideRun {
8709
+ object: "styleguide-run";
8710
+ /** The ID of the run */
8711
+ id: string;
8712
+ /** ID of the site the run belongs to */
8713
+ site: string;
8714
+ /** ID of the style guide space the run checked against */
8715
+ styleguide: string;
8716
+ /** 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. */
8717
+ spaces: string[];
8718
+ createdAt: Timestamp;
8719
+ createdBy: User;
8720
+ }
8647
8721
  /** Analytics info on the GitBook's site session. */
8648
8722
  export type SiteInsightsEventSession = SiteInsightsSession & {
8649
8723
  /** The visitors cookies. */
@@ -9175,6 +9249,8 @@ export interface SiteRedirect {
9175
9249
  draft: boolean;
9176
9250
  /** Capture and append the wildcard-matched suffix to the destination URL. */
9177
9251
  captureWildcard: boolean;
9252
+ /** 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. */
9253
+ permanent: boolean;
9178
9254
  destination: SiteRedirectDestination;
9179
9255
  /**
9180
9256
  * When the redirect was created.
@@ -9877,8 +9953,8 @@ export interface GitSyncSiteStructureSectionGroup {
9877
9953
  icon?: Icon;
9878
9954
  /** Whether the section group is draft and not live. */
9879
9955
  draft?: boolean;
9880
- /** Section or section group nodes nested under this group. */
9881
- children?: (GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection)[];
9956
+ /** Section, section group, or external link nodes nested under this group. */
9957
+ children?: (GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureExternalLink)[];
9882
9958
  }
9883
9959
  /**
9884
9960
  * A space — a single content unit in the site's navigation tree. Discriminated
@@ -9972,19 +10048,70 @@ export interface GitSyncSiteStructureSection {
9972
10048
  /** Space nodes nested under this section. */
9973
10049
  children?: GitSyncSiteStructureSpace[];
9974
10050
  }
10051
+ /**
10052
+ * Title of the external link
10053
+ * @minLength 2
10054
+ * @maxLength 128
10055
+ */
10056
+ export type SiteExternalLinkTitle = string;
10057
+ /**
10058
+ * Description of the external link
10059
+ * @minLength 0
10060
+ * @maxLength 256
10061
+ */
10062
+ export type SiteExternalLinkDescription = string;
10063
+ /**
10064
+ * An external link — a leaf that navigates away from the site to an absolute
10065
+ * HTTP(S) URL. Discriminated by `type: external-link`.
10066
+ *
10067
+ * An external link only exists in a section-based site structure: it may sit
10068
+ * at the root alongside sections and section groups, or nested under a
10069
+ * section group, but never inside a section.
10070
+ */
10071
+ export interface GitSyncSiteStructureExternalLink {
10072
+ /** Discriminator for an external link node. */
10073
+ type: "external-link";
10074
+ /**
10075
+ * Stable identifier for this external link, used as the Git Sync key.
10076
+ * Must be unique amongst all other nodes of the site. For example:
10077
+ * `link-status` or `link-1`.
10078
+ * @minLength 1
10079
+ */
10080
+ key: string;
10081
+ /** Title of the external link */
10082
+ title: SiteExternalLinkTitle;
10083
+ /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
10084
+ localizedTitle?: LocalizedString128;
10085
+ /** Description of the external link */
10086
+ description?: SiteExternalLinkDescription;
10087
+ /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
10088
+ localizedDescription?: LocalizedString256;
10089
+ /** Name of the icon */
10090
+ icon?: Icon;
10091
+ /** Absolute HTTP or HTTPS URL opened by the external link. */
10092
+ url: URL;
10093
+ /** Whether the external link is draft and not live. */
10094
+ draft?: boolean;
10095
+ /** Expression to evaluate */
10096
+ condition?: Expression;
10097
+ }
9975
10098
  /**
9976
10099
  * A single node in a Git Sync site structure tree — a section group, a
9977
- * section, or a space, discriminated by `type`.
10100
+ * section, a space, or an external link, discriminated by `type`.
9978
10101
  */
9979
- export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureSpace;
10102
+ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureSpace | GitSyncSiteStructureExternalLink;
9980
10103
  /**
9981
10104
  * 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.
10105
+ * four node types: a section group, a section, a space, or an external link.
9983
10106
  *
9984
10107
  * A **space** is a leaf holding content, pointed at a repository directory. A
9985
10108
  * **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.
10109
+ * **section group** gathers sections. An **external link** is a leaf that
10110
+ * navigates away from the site to an absolute HTTP(S) URL — it may sit at the
10111
+ * root or under a section group, but never inside a section, and only exists
10112
+ * in a site that also has at least one section. A site either uses sections
10113
+ * (optionally alongside external links) or lists its spaces at the top level,
10114
+ * never both.
9988
10115
  *
9989
10116
  * ```yaml
9990
10117
  * structure:
@@ -10047,8 +10174,12 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
10047
10174
  * - A site declaring any section marks exactly one of those sections
10048
10175
  * `default: true`, and lists no space at the top level: once a section
10049
10176
  * 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.
10177
+ * - Sections hold only spaces. Section groups hold only sections, nested
10178
+ * section groups (one further level), or external links — nothing nests
10179
+ * deeper than that.
10180
+ * - External links are only valid at the root or nested in a section group,
10181
+ * never inside a section. A site containing an external link must use
10182
+ * sections, with at least one section declared.
10052
10183
  * - Spaces pointed at the same `content.directory` declare the same
10053
10184
  * `content.language`. One directory is read once, so it cannot produce two
10054
10185
  * languages at the same time.
@@ -10082,12 +10213,16 @@ export interface GitSyncSiteConfig {
10082
10213
  title: string;
10083
10214
  /**
10084
10215
  * 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.
10216
+ * four node types: a section group, a section, a space, or an external link.
10086
10217
  *
10087
10218
  * A **space** is a leaf holding content, pointed at a repository directory. A
10088
10219
  * **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.
10220
+ * **section group** gathers sections. An **external link** is a leaf that
10221
+ * navigates away from the site to an absolute HTTP(S) URL — it may sit at the
10222
+ * root or under a section group, but never inside a section, and only exists
10223
+ * in a site that also has at least one section. A site either uses sections
10224
+ * (optionally alongside external links) or lists its spaces at the top level,
10225
+ * never both.
10091
10226
  *
10092
10227
  * ```yaml
10093
10228
  * structure:
@@ -10150,8 +10285,12 @@ export interface GitSyncSiteConfig {
10150
10285
  * - A site declaring any section marks exactly one of those sections
10151
10286
  * `default: true`, and lists no space at the top level: once a section
10152
10287
  * 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.
10288
+ * - Sections hold only spaces. Section groups hold only sections, nested
10289
+ * section groups (one further level), or external links — nothing nests
10290
+ * deeper than that.
10291
+ * - External links are only valid at the root or nested in a section group,
10292
+ * never inside a section. A site containing an external link must use
10293
+ * sections, with at least one section declared.
10155
10294
  * - Spaces pointed at the same `content.directory` declare the same
10156
10295
  * `content.language`. One directory is read once, so it cannot produce two
10157
10296
  * languages at the same time.
@@ -10707,6 +10846,10 @@ export interface AgentState {
10707
10846
  pendingQuestion?: AgentPendingQuestion;
10708
10847
  /** 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
10848
  editTarget?: AgentEditTarget;
10849
+ /** How far this conversation should reach when it changes content. */
10850
+ editScope?: AgentEditScope;
10851
+ /** 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. */
10852
+ consultOnly?: boolean;
10710
10853
  }
10711
10854
  /** Payload emitted by the agent with its current state. */
10712
10855
  export interface AgentStreamState {
@@ -14309,6 +14452,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14309
14452
  space?: string;
14310
14453
  /** If defined, only change requests linked to this site topic will be returned. */
14311
14454
  topic?: string;
14455
+ /** If defined, only change requests opened by this style guide check run will be returned. */
14456
+ styleguideRun?: string;
14312
14457
  /** 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
14458
  finding?: "none" | "all";
14314
14459
  /** The field to sort change requests by. Defaults to 'updatedAt'. */
@@ -16273,11 +16418,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16273
16418
  */
16274
16419
  getSiteScanById: (organizationId: EntityId, siteId: string, siteScanId: string, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
16275
16420
  /**
16276
- * No description
16421
+ * @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
16422
  *
16278
16423
  * @tags site-context
16279
16424
  * @name ListSiteFindings
16280
- * @summary List all site context findings
16425
+ * @summary List documentation issues GitBook has found on a site
16281
16426
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings
16282
16427
  * @secure
16283
16428
  */
@@ -16320,21 +16465,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16320
16465
  items: SiteFinding[];
16321
16466
  }, any>>;
16322
16467
  /**
16323
- * No description
16468
+ * @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
16469
  *
16325
16470
  * @tags site-context
16326
16471
  * @name GetSiteFindingById
16327
- * @summary Get a site finding by ID
16472
+ * @summary Get details of a single documentation issue
16328
16473
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
16329
16474
  * @secure
16330
16475
  */
16331
16476
  getSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
16332
16477
  /**
16333
- * No description
16478
+ * @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
16479
  *
16335
16480
  * @tags site-context
16336
16481
  * @name UpdateSiteFindingById
16337
- * @summary Update a site finding
16482
+ * @summary Resolve, dismiss, or reopen a documentation issue
16338
16483
  * @request PATCH:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
16339
16484
  * @secure
16340
16485
  */
@@ -16349,11 +16494,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16349
16494
  status: SiteFindingStatus;
16350
16495
  }, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
16351
16496
  /**
16352
- * No description
16497
+ * @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
16498
  *
16354
16499
  * @tags site-context
16355
16500
  * @name ListChangeRequestsForSiteFinding
16356
- * @summary List change requests linked to a site finding
16501
+ * @summary List content fixes already proposed for a documentation issue
16357
16502
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests
16358
16503
  * @secure
16359
16504
  */
@@ -16370,21 +16515,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16370
16515
  items: ChangeRequest[];
16371
16516
  }, any>>;
16372
16517
  /**
16373
- * No description
16518
+ * @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
16519
  *
16375
16520
  * @tags site-context
16376
16521
  * @name TriggerChangeRequestsForSiteFinding
16377
- * @summary Process a site finding into change requests
16522
+ * @summary Fix a documentation issue by generating a change request
16378
16523
  * @request POST:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests
16379
16524
  * @secure
16380
16525
  */
16381
16526
  triggerChangeRequestsForSiteFinding: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16382
16527
  /**
16383
- * No description
16528
+ * @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
16529
  *
16385
16530
  * @tags site-context
16386
16531
  * @name ListPagesForSiteFinding
16387
- * @summary List pages linked to a site finding
16532
+ * @summary List the pages affected by a documentation issue
16388
16533
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/pages
16389
16534
  * @secure
16390
16535
  */
@@ -16401,11 +16546,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16401
16546
  items: SiteFindingPage[];
16402
16547
  }, any>>;
16403
16548
  /**
16404
- * No description
16549
+ * @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
16550
  *
16406
16551
  * @tags site-context
16407
16552
  * @name ListQuestionsForSiteFinding
16408
- * @summary List questions linked to a site finding
16553
+ * @summary List the Ask-AI questions evidencing a documentation issue
16409
16554
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/questions
16410
16555
  * @secure
16411
16556
  */
@@ -16422,11 +16567,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16422
16567
  items: SiteQuestion[];
16423
16568
  }, any>>;
16424
16569
  /**
16425
- * No description
16570
+ * @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
16571
  *
16427
16572
  * @tags site-context
16428
16573
  * @name ListRecordsForSiteFinding
16429
- * @summary List records linked to a site finding
16574
+ * @summary List the source content evidencing a documentation issue
16430
16575
  * @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/records
16431
16576
  * @secure
16432
16577
  */
@@ -16443,11 +16588,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16443
16588
  items: ContextRecord[];
16444
16589
  }, any>>;
16445
16590
  /**
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.
16591
+ * @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
16592
  *
16448
16593
  * @tags site-context
16449
16594
  * @name GetSiteFindingStats
16450
- * @summary Get aggregate statistics about the findings identified on a site
16595
+ * @summary Get a summary of documentation issues found on a site
16451
16596
  * @request GET:/orgs/{organizationId}/sites/{siteId}/stats/findings
16452
16597
  * @secure
16453
16598
  */
@@ -16602,11 +16747,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16602
16747
  usageSettings: SiteTopicUsageSettings;
16603
16748
  }, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
16604
16749
  /**
16605
- * No description
16750
+ * @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
16751
  *
16607
16752
  * @tags site-context
16608
16753
  * @name DeleteSiteTopicFindings
16609
- * @summary Delete all findings for a topic
16754
+ * @summary Delete all documentation issues found under a topic
16610
16755
  * @request DELETE:/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}/findings
16611
16756
  * @secure
16612
16757
  */
@@ -17368,6 +17513,55 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17368
17513
  message: string;
17369
17514
  };
17370
17515
  }>>;
17516
+ /**
17517
+ * @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.
17518
+ *
17519
+ * @tags sites
17520
+ * @name CreateSiteStyleguideRun
17521
+ * @summary Start a style guide check run for a site
17522
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/styleguide/runs
17523
+ * @secure
17524
+ */
17525
+ createSiteStyleguideRun: (organizationId: EntityId, siteId: string, data: {
17526
+ /**
17527
+ * IDs of the site's spaces to check. Each must be an editable content space of the site, and not the style guide itself.
17528
+ * @maxItems 3
17529
+ * @minItems 1
17530
+ */
17531
+ spaces: string[];
17532
+ }, params?: RequestParams) => Promise<HttpResponse<{
17533
+ /** 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. */
17534
+ run: SiteStyleguideRun;
17535
+ /** The change requests opened by the run, one per space that could be started. */
17536
+ changeRequests: ChangeRequest[];
17537
+ }, {
17538
+ error: {
17539
+ /** @format int32 */
17540
+ code: 404;
17541
+ message: string;
17542
+ };
17543
+ }>>;
17544
+ /**
17545
+ * @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.
17546
+ *
17547
+ * @tags sites
17548
+ * @name ListSiteStyleguideRuns
17549
+ * @summary List the style guide check runs of a site
17550
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/styleguide/runs
17551
+ * @secure
17552
+ */
17553
+ listSiteStyleguideRuns: (organizationId: EntityId, siteId: string, query?: {
17554
+ /** Identifier of the page results to fetch. */
17555
+ page?: string;
17556
+ /**
17557
+ * The number of results per page
17558
+ * @min 0
17559
+ * @max 1000
17560
+ */
17561
+ limit?: number;
17562
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
17563
+ items: SiteStyleguideRun[];
17564
+ }, any>>;
17371
17565
  /**
17372
17566
  * No description
17373
17567
  *
@@ -17438,6 +17632,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17438
17632
  * @default false
17439
17633
  */
17440
17634
  draft?: boolean;
17635
+ /**
17636
+ * Whether the redirect is permanent for public live traffic.
17637
+ * @default false
17638
+ */
17639
+ permanent?: boolean;
17441
17640
  destination: SiteRedirectInputDestination;
17442
17641
  }, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
17443
17642
  /**
@@ -17474,6 +17673,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17474
17673
  * @default false
17475
17674
  */
17476
17675
  captureWildcard?: boolean;
17676
+ /** Whether the redirect is permanent for public live traffic. */
17677
+ permanent?: boolean;
17477
17678
  /** If set to null, the redirect matching the source+intent target will be deleted. */
17478
17679
  destination: SiteRedirectInputDestination | null;
17479
17680
  })[];
@@ -17569,6 +17770,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17569
17770
  captureWildcard?: boolean;
17570
17771
  /** When true, it can be used to promote a draft redirect to live. */
17571
17772
  draft?: boolean;
17773
+ /** Whether the redirect is permanent for public live traffic. */
17774
+ permanent?: boolean;
17572
17775
  destination?: SiteRedirectDestination;
17573
17776
  }, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
17574
17777
  /**
@@ -94,6 +94,8 @@ export declare const SITE_SPACE_PATH_MIN_LENGTH = 1;
94
94
  export declare const SITE_SECTION_GROUP_TITLE_MAX_LENGTH = 100;
95
95
  export declare const SITE_SECTION_GROUP_TITLE_MIN_LENGTH = 1;
96
96
  export declare const TEAM_MEMBER_ROLE_ENUM: ["owner", "member"];
97
+ export declare const BILLING_CANCELLATION_COMMENT_MAX_LENGTH = 500;
98
+ export declare const BILLING_CANCELLATION_COMMENT_MIN_LENGTH = 1;
97
99
  export declare const BILLING_COUPON_MAX_LENGTH = 500;
98
100
  export declare const BILLING_COUPON_MIN_LENGTH = 1;
99
101
  export declare const BILLING_METER_ENUM: ["ai_responses", "ai_agent_responses", "translation_words"];
@@ -219,9 +221,14 @@ export declare const GIT_SYNC_OPERATION_STAGE_ENUM: ["repo_fetch", "config_check
219
221
  export declare const GIT_SYNC_RUN_OPERATION_ENUM: ["import", "export", "check", "merge", "recovery"];
220
222
  export declare const GIT_SYNC_RUN_STATE_ENUM: ["queued", "running", "success", "failure", "timeout", "cancelled"];
221
223
  export declare const GIT_PROVIDER_CHANGE_STATE_ENUM: ["open", "closed", "merged"];
224
+ export declare const SITE_EXTERNAL_LINK_TITLE_MAX_LENGTH = 128;
225
+ export declare const SITE_EXTERNAL_LINK_TITLE_MIN_LENGTH = 2;
226
+ export declare const SITE_EXTERNAL_LINK_DESCRIPTION_MAX_LENGTH = 256;
227
+ export declare const SITE_EXTERNAL_LINK_DESCRIPTION_MIN_LENGTH = 0;
222
228
  export declare const BILLING_STATUS_ENUM: ["trialing", "active", "past_due", "incomplete_expired", "canceled", "unpaid", "paused"];
223
229
  export declare const APIINTEGRATION_SCOPE_ENUM: ["integration:read", "integration:update", "integration:installation:read", "integration:installation:update"];
224
230
  export declare const CUSTOMIZATION_THEME_MODE_ENUM: ["light", "dark"];
225
231
  export declare const SITE_ADS_STATUS_ENUM: ["pending", "in-review", "live", "rejected", "disabled"];
226
232
  export declare const SITE_QUESTION_ANSWER_SOURCE_TYPE_ENUM: ["page", "record"];
227
233
  export declare const AGENT_STATUS_ENUM: ["idle", "processing", "errored"];
234
+ export declare const AGENT_EDIT_SCOPE_ENUM: ["all", "read-only", "current-page", "modified-pages"];