@gitbook/api 0.203.0 → 0.205.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
@@ -236,7 +236,15 @@ export declare enum SiteInsightsVisitorBot {
236
236
  MetaAds = "meta-ads",
237
237
  Duckassist = "duckassist",
238
238
  AmznSearchbot = "amzn-searchbot",
239
- AmznUser = "amzn-user"
239
+ AmznUser = "amzn-user",
240
+ OtherBot = "other-bot",
241
+ Parallel = "parallel",
242
+ Exa = "exa",
243
+ Linkup = "linkup",
244
+ VertexAi = "vertex-ai",
245
+ Atlassian = "atlassian",
246
+ Kapa = "kapa",
247
+ Bedrock = "bedrock"
240
248
  }
241
249
  export declare enum SiteInsightsVisitorOS {
242
250
  Windows = "windows",
@@ -272,6 +280,7 @@ export declare enum SiteInsightsEventType {
272
280
  AgentFeedback = "agent_feedback",
273
281
  AskQuestion = "ask_question",
274
282
  AskView = "ask_view",
283
+ AskTriggerClick = "ask_trigger_click",
275
284
  AskRateResponse = "ask_rate_response",
276
285
  LinkClick = "link_click",
277
286
  ApiClientOpen = "api_client_open",
@@ -382,6 +391,25 @@ export declare enum ContextSearchBoost {
382
391
  X10 = "x1.0",
383
392
  X12 = "x1.2"
384
393
  }
394
+ /**
395
+ * Why an AI task was skipped before execution.
396
+ *
397
+ * - `ai_unavailable_for_organization`: The organization's effective plan does not include AI or a
398
+ * required feature. Takes precedence when both the organization and site plans block the task.
399
+ * - `ai_unavailable_for_site`: The site's effective plan does not include the required feature.
400
+ * The site's applied plan takes precedence over its own plan.
401
+ * - `ai_paused`: AI usage is temporarily paused by automatic usage controls.
402
+ * - `ai_disabled`: AI or a required AI feature has been turned off in the organization's settings.
403
+ * - `ai_restricted`: AI is blocked by GitBook or a contractual restriction and cannot be enabled
404
+ * through organization settings.
405
+ */
406
+ export declare enum AISkipReason {
407
+ AiUnavailableForOrganization = "ai_unavailable_for_organization",
408
+ AiUnavailableForSite = "ai_unavailable_for_site",
409
+ AiDisabled = "ai_disabled",
410
+ AiRestricted = "ai_restricted",
411
+ AiPaused = "ai_paused"
412
+ }
385
413
  /** Why a synchronization failed, indicating who can resolve it. `authentication` and `misconfigured` need the connection to be reconfigured; `rate_limited` and `upstream_unavailable` are the source's own limits or downtime and are retried; `unknown` could not be attributed to the source's response. */
386
414
  export declare enum ContextConnectionFailureReason {
387
415
  Authentication = "authentication",
@@ -394,7 +422,8 @@ export declare enum ContextConnectionStatus {
394
422
  Pending = "pending",
395
423
  Syncing = "syncing",
396
424
  Succeeded = "succeeded",
397
- Failed = "failed"
425
+ Failed = "failed",
426
+ Skipped = "skipped"
398
427
  }
399
428
  /** Type classification of the user question. */
400
429
  export declare enum SiteQuestionType {
@@ -791,6 +820,14 @@ export declare enum BillingSwitchAction {
791
820
  Downgrade = "downgrade",
792
821
  SwitchInterval = "switch_interval"
793
822
  }
823
+ /** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
824
+ export declare enum AICreditGrantType {
825
+ Paid = "paid",
826
+ Bonus = "bonus",
827
+ Site = "site",
828
+ Rollover = "rollover",
829
+ Custom = "custom"
830
+ }
794
831
  /** Identifier of a billing meter */
795
832
  export declare enum BillingMeter {
796
833
  AiResponses = "ai_responses",
@@ -2038,6 +2075,24 @@ export interface DocumentInlineImage {
2038
2075
  };
2039
2076
  isVoid: true;
2040
2077
  }
2078
+ export interface DocumentInlineMath {
2079
+ object: "inline";
2080
+ type: "inline-math";
2081
+ key?: string;
2082
+ data: {
2083
+ formula: string;
2084
+ };
2085
+ isVoid: true;
2086
+ }
2087
+ export interface DocumentInlineExpression {
2088
+ object: "inline";
2089
+ type: "expression";
2090
+ key?: string;
2091
+ data: {
2092
+ expression: string;
2093
+ };
2094
+ isVoid: true;
2095
+ }
2041
2096
  export interface ContentRefPage {
2042
2097
  kind: "page";
2043
2098
  page: string;
@@ -2084,11 +2139,21 @@ export interface ContentRefOpenAPI {
2084
2139
  }
2085
2140
  /** A relative reference to content in GitBook. */
2086
2141
  export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent | ContentRefTag | ContentRefOpenAPI;
2142
+ export interface DocumentInlineMention {
2143
+ object: "inline";
2144
+ type: "mention";
2145
+ key?: string;
2146
+ data: {
2147
+ /** A relative reference to content in GitBook. */
2148
+ ref: ContentRef;
2149
+ };
2150
+ isVoid: true;
2151
+ }
2087
2152
  export interface DocumentInlineLink {
2088
2153
  object: "inline";
2089
2154
  type: "link";
2090
2155
  key?: string;
2091
- nodes: (DocumentText | DocumentInlineImage)[];
2156
+ nodes: (DocumentText | DocumentInlineImage | DocumentInlineMath | DocumentInlineExpression | DocumentInlineMention)[];
2092
2157
  data: {
2093
2158
  /** A relative reference to content in GitBook. */
2094
2159
  ref: ContentRef;
@@ -2115,24 +2180,6 @@ export interface DocumentInlineIcon {
2115
2180
  };
2116
2181
  isVoid: true;
2117
2182
  }
2118
- export interface DocumentInlineExpression {
2119
- object: "inline";
2120
- type: "expression";
2121
- key?: string;
2122
- data: {
2123
- expression: string;
2124
- };
2125
- isVoid: true;
2126
- }
2127
- export interface DocumentInlineMath {
2128
- object: "inline";
2129
- type: "inline-math";
2130
- key?: string;
2131
- data: {
2132
- formula: string;
2133
- };
2134
- isVoid: true;
2135
- }
2136
2183
  export interface DocumentBlockParagraph {
2137
2184
  object: "block";
2138
2185
  type: "paragraph";
@@ -2443,11 +2490,44 @@ export interface DocumentBlockMath {
2443
2490
  };
2444
2491
  isVoid: true;
2445
2492
  }
2493
+ export type Length = number | {
2494
+ unit: string;
2495
+ value: number;
2496
+ };
2497
+ export interface DocumentBlockImage {
2498
+ object: "block";
2499
+ type: "image";
2500
+ key?: string;
2501
+ data: {
2502
+ ref: ContentRefURL | ContentRefFile;
2503
+ refDark?: ContentRefURL | ContentRefFile;
2504
+ width?: Length;
2505
+ height?: Length;
2506
+ alt?: string;
2507
+ };
2508
+ fragments: (DocumentFragment & {
2509
+ fragment: "caption";
2510
+ nodes: DocumentBlockParagraph[];
2511
+ })[];
2512
+ isVoid: true;
2513
+ }
2514
+ export interface DocumentBlockImages {
2515
+ object: "block";
2516
+ type: "images";
2517
+ key?: string;
2518
+ data: {
2519
+ align?: "center" | "left" | "right";
2520
+ fullWidth?: boolean;
2521
+ withFrame?: boolean;
2522
+ };
2523
+ nodes: DocumentBlockImage[];
2524
+ isVoid: false;
2525
+ }
2446
2526
  export interface DocumentBlockListItem {
2447
2527
  object: "block";
2448
2528
  type: "list-item";
2449
2529
  key?: string;
2450
- nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable)[];
2530
+ nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable | DocumentBlockImages)[];
2451
2531
  isVoid?: false;
2452
2532
  data?: {
2453
2533
  checked?: boolean;
@@ -2520,39 +2600,6 @@ export interface DocumentBlockIf {
2520
2600
  expression: string;
2521
2601
  };
2522
2602
  }
2523
- export type Length = number | {
2524
- unit: string;
2525
- value: number;
2526
- };
2527
- export interface DocumentBlockImage {
2528
- object: "block";
2529
- type: "image";
2530
- key?: string;
2531
- data: {
2532
- ref: ContentRefURL | ContentRefFile;
2533
- refDark?: ContentRefURL | ContentRefFile;
2534
- width?: Length;
2535
- height?: Length;
2536
- alt?: string;
2537
- };
2538
- fragments: (DocumentFragment & {
2539
- fragment: "caption";
2540
- nodes: DocumentBlockParagraph[];
2541
- })[];
2542
- isVoid: true;
2543
- }
2544
- export interface DocumentBlockImages {
2545
- object: "block";
2546
- type: "images";
2547
- key?: string;
2548
- data: {
2549
- align?: "center" | "left" | "right";
2550
- fullWidth?: boolean;
2551
- withFrame?: boolean;
2552
- };
2553
- nodes: DocumentBlockImage[];
2554
- isVoid: false;
2555
- }
2556
2603
  export interface DocumentBlockFile {
2557
2604
  object: "block";
2558
2605
  type: "file";
@@ -2584,6 +2631,16 @@ export interface DocumentBlockReusableContent {
2584
2631
  token?: string;
2585
2632
  };
2586
2633
  }
2634
+ export interface DocumentBlockContentRef {
2635
+ object: "block";
2636
+ type: "content-ref";
2637
+ key?: string;
2638
+ data: {
2639
+ /** A relative reference to content in GitBook. */
2640
+ ref: ContentRef;
2641
+ };
2642
+ isVoid: true;
2643
+ }
2587
2644
  export interface DocumentBlockExpandable {
2588
2645
  object: "block";
2589
2646
  type: "expandable";
@@ -2604,28 +2661,26 @@ export interface DocumentBlockExpandable {
2604
2661
  fragment: "expandable-body";
2605
2662
  type: "expandable-body";
2606
2663
  /** @minItems 1 */
2607
- nodes: (DocumentBlocksEssentials | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockReusableContent | DocumentBlockIntegration)[];
2664
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper)[];
2608
2665
  }))[];
2609
2666
  meta?: {
2610
2667
  /** Unique ID to be used in an URL for the block. */
2611
2668
  id: string;
2612
2669
  };
2613
2670
  }
2614
- export interface DocumentBlockContentRef {
2671
+ export interface DocumentBlockStepper {
2615
2672
  object: "block";
2616
- type: "content-ref";
2673
+ type: "stepper";
2617
2674
  key?: string;
2618
- data: {
2619
- /** A relative reference to content in GitBook. */
2620
- ref: ContentRef;
2621
- };
2622
- isVoid: true;
2675
+ nodes: DocumentBlockStepperStep[];
2676
+ isVoid?: false;
2677
+ data?: object;
2623
2678
  }
2624
2679
  export interface DocumentBlockTabsItem {
2625
2680
  object: "block";
2626
2681
  type: "tabs-item";
2627
2682
  key?: string;
2628
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration)[];
2683
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2629
2684
  data: {
2630
2685
  title?: string;
2631
2686
  /** Name of the icon */
@@ -2649,6 +2704,16 @@ export interface DocumentBlockTabs {
2649
2704
  fullWidth?: boolean;
2650
2705
  };
2651
2706
  }
2707
+ export interface DocumentBlockStepperStep {
2708
+ object: "block";
2709
+ type: "stepper-step";
2710
+ key?: string;
2711
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2712
+ data: {
2713
+ icon?: string;
2714
+ };
2715
+ isVoid?: false;
2716
+ }
2652
2717
  /** Pointer to an operation in the OpenAPI spec. */
2653
2718
  export interface OpenAPIOperationPointer {
2654
2719
  /** Path of the operation in the OpenAPI spec. */
@@ -2734,29 +2799,11 @@ export interface DocumentBlockOpenAPIWebhook {
2734
2799
  id: string;
2735
2800
  };
2736
2801
  }
2737
- export interface DocumentBlockStepperStep {
2738
- object: "block";
2739
- type: "stepper-step";
2740
- key?: string;
2741
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable)[];
2742
- data: {
2743
- icon?: string;
2744
- };
2745
- isVoid?: false;
2746
- }
2747
- export interface DocumentBlockStepper {
2748
- object: "block";
2749
- type: "stepper";
2750
- key?: string;
2751
- nodes: DocumentBlockStepperStep[];
2752
- isVoid?: false;
2753
- data?: object;
2754
- }
2755
2802
  export interface DocumentBlockColumn {
2756
2803
  object: "block";
2757
2804
  type: "column";
2758
2805
  key?: string;
2759
- nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper)[];
2806
+ nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper | DocumentBlockIf)[];
2760
2807
  isVoid?: false;
2761
2808
  data: {
2762
2809
  width?: Length;
@@ -2777,7 +2824,7 @@ export interface DocumentBlockUpdate {
2777
2824
  object: "block";
2778
2825
  type: "update";
2779
2826
  key?: string;
2780
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable)[];
2827
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockIf | DocumentBlockStepper)[];
2781
2828
  data: {
2782
2829
  date: Timestamp;
2783
2830
  /** Array of tags. Each tag is id'ed by its slug. */
@@ -2797,21 +2844,13 @@ export interface DocumentBlockUpdates {
2797
2844
  };
2798
2845
  }
2799
2846
  export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockIf | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep | DocumentBlockColumns | DocumentBlockColumn | DocumentBlockUpdates | DocumentBlockUpdate;
2800
- export interface DocumentInlineMention {
2801
- object: "inline";
2802
- type: "mention";
2803
- key?: string;
2804
- data: {
2805
- /** A relative reference to content in GitBook. */
2806
- ref: ContentRef;
2807
- };
2808
- isVoid: true;
2809
- }
2810
2847
  /** Action to perform when an inline button is clicked. */
2811
2848
  export type DocumentAction = {
2812
2849
  action: "search";
2813
2850
  /** The search query to prefill. */
2814
2851
  query?: string;
2852
+ /** Where to search. `site` searches the whole site; `space` limits the search to the space the visitor is reading. */
2853
+ scope?: "site" | "space";
2815
2854
  } | {
2816
2855
  action: "ask";
2817
2856
  /** The question to prefill. */
@@ -2876,6 +2915,11 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
2876
2915
  /** Complete path to access the page in the revision. */
2877
2916
  path: string;
2878
2917
  description?: string;
2918
+ /**
2919
+ * Optional title for the page's HTML `<title>` tag. When set, it replaces the page title in the composed `<title>` (`<tagTitle || title> | <section> | <site>`), while the page's visible heading and navigation title remain unchanged. Use this when the search result or browser tab should use a different title from the page itself.
2920
+ * @maxLength 100
2921
+ */
2922
+ tagTitle?: string;
2879
2923
  pages: (RevisionPageDocument | RevisionPageLink | RevisionPageComputed)[];
2880
2924
  git?: GitSyncBlob;
2881
2925
  layout: RevisionPageLayoutOptions;
@@ -3245,6 +3289,26 @@ export type RevisionTypeEdits = RevisionBase & {
3245
3289
  * @maxLength 100
3246
3290
  */
3247
3291
  export type ChangeRequestSubject = string;
3292
+ /** Counts of entities grouped by how they changed relative to the change request base. */
3293
+ export interface ChangeRequestChangeCountsByType {
3294
+ /** @min 0 */
3295
+ added: number;
3296
+ /** @min 0 */
3297
+ modified: number;
3298
+ /** @min 0 */
3299
+ deleted: number;
3300
+ }
3301
+ /** Exact semantic entity and page-document block counts for a change request at its current head and base revisions. */
3302
+ export interface ChangeRequestChangeCounts {
3303
+ /** Counts of entities grouped by how they changed relative to the change request base. */
3304
+ pages: ChangeRequestChangeCountsByType;
3305
+ /** Counts of entities grouped by how they changed relative to the change request base. */
3306
+ library: ChangeRequestChangeCountsByType;
3307
+ /** Nested user-visible page-document block counts. Absent when `blocksOmittedReason` is set. */
3308
+ blocks?: ChangeRequestChangeCountsByType;
3309
+ /** Why `blocks` is absent: too many pages changed (`too-many-pages`), the changed pages hold too many blocks to compare within the counting budget (`too-many-blocks`; this is not a count of changed blocks), or counting ran out of time (`timeout`). Page and library counts are still exact. */
3310
+ blocksOmittedReason?: "too-many-pages" | "too-many-blocks" | "timeout";
3311
+ }
3248
3312
  /**
3249
3313
  * Optional title to display for the link.
3250
3314
  * @maxLength 128
@@ -3324,6 +3388,8 @@ export interface ChangeRequest {
3324
3388
  revisionMerged?: string;
3325
3389
  /** Count of opened comments on the change request. */
3326
3390
  comments: number;
3391
+ /** Change counts computed when the change request gets a new revision, for its current head and base revisions. Merged change requests keep their last computed counts. Absent until computed. */
3392
+ changeCounts?: ChangeRequestChangeCounts;
3327
3393
  /** Site topic the change request was created from, when it came from one. */
3328
3394
  siteTopic?: {
3329
3395
  /** ID of the site associated with the change request. */
@@ -3639,6 +3705,16 @@ export interface RevisionPageUpdate {
3639
3705
  icon?: Icon;
3640
3706
  /** Description of the page. */
3641
3707
  description?: string;
3708
+ /**
3709
+ * Optional custom title used for the page in the table of contents and mentions instead of its page title. Set to an empty string to remove it.
3710
+ * @maxLength 100
3711
+ */
3712
+ linkTitle?: string;
3713
+ /**
3714
+ * Optional title for the page's HTML `<title>` tag. When set, it replaces the page title in the composed `<title>` (`<tagTitle || title> | <section> | <site>`), while the page's visible heading and navigation title remain unchanged. Use this when the search result or browser tab should use a different title from the page itself. Set to an empty string to remove it.
3715
+ * @maxLength 100
3716
+ */
3717
+ tagTitle?: string;
3642
3718
  /** If true, the page is not displayed in the navigation, while still being accessible. */
3643
3719
  hidden?: boolean;
3644
3720
  /** If true, the page is not indexable in the search and ask features. */
@@ -4094,10 +4170,8 @@ export interface SitePointer {
4094
4170
  export type OrganizationDefaultContent = SitePointer;
4095
4171
  /** An AI credit threshold from 5% to 50%, or null when disabled. */
4096
4172
  export type AICreditThreshold = number | null;
4097
- /** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4173
+ /** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4098
4174
  export interface OrganizationAISettings {
4099
- /** Whether AI features are automatically paused because credits are low. */
4100
- aiPaused?: boolean;
4101
4175
  "ai-agent"?: false;
4102
4176
  "ai-assistant"?: false;
4103
4177
  "ai-broken-links"?: false;
@@ -4186,6 +4260,8 @@ export interface OrganizationBilling {
4186
4260
  canChangeInterval: boolean;
4187
4261
  /** Whether configuring SAML is allowed */
4188
4262
  canUseSAML: boolean;
4263
+ /** Whether AI can be enabled for the organization */
4264
+ canUseAI: boolean;
4189
4265
  /** The AI credit bundle the organization tops up every month, or null when the organization is not billed for AI usage. `none` means pay as you go. */
4190
4266
  creditsBundle: BillingCreditsBundle | null;
4191
4267
  /** The yearly AI credit allowance agreed in the organization's contract, or null when none is set. */
@@ -4249,8 +4325,10 @@ export interface Organization {
4249
4325
  sso?: boolean;
4250
4326
  /** If true, the organization is configured to use all our AI features. */
4251
4327
  ai?: boolean;
4252
- /** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4328
+ /** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4253
4329
  aiSettings?: OrganizationAISettings;
4330
+ /** Whether AI features have been paused automatically due to lack of AI credits. */
4331
+ aiPaused?: boolean;
4254
4332
  /** If true, invite links are enabled for this organization. */
4255
4333
  inviteLinks: boolean;
4256
4334
  /** Whether audit logs can currently be accessed for this organization. */
@@ -6125,8 +6203,8 @@ export interface BillingInvoicePreview {
6125
6203
  adjustments: BillingInvoiceAdjustment[];
6126
6204
  /** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
6127
6205
  creditGrants: {
6128
- /** Where the credits come from. `paid` is the credits the monthly bundle pays for, `bonus` the ones included with it, `site` the allowance of the organization's published paid sites, and `rollover` what was left of the previous period. `custom` is a grant created outside GitBook. */
6129
- type: "paid" | "bonus" | "site" | "rollover" | "custom";
6206
+ /** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
6207
+ type: AICreditGrantType;
6130
6208
  /** Stripe spending priority. Lower values are consumed first. */
6131
6209
  priority?: number;
6132
6210
  /** Credits available from this grant before the current invoice usage. */
@@ -6212,8 +6290,8 @@ export interface Credits {
6212
6290
  }
6213
6291
  /** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
6214
6292
  export type CreditGrants = {
6215
- /** Where the credits come from. `paid` is the credits the monthly bundle pays for, `bonus` the ones included with it, `site` the allowance of the organization's published paid sites, and `rollover` what was left of the previous period. `custom` is a grant created outside GitBook. */
6216
- type: "paid" | "bonus" | "site" | "rollover" | "custom";
6293
+ /** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
6294
+ type: AICreditGrantType;
6217
6295
  /** Stripe spending priority. Lower values are consumed first. */
6218
6296
  priority?: number;
6219
6297
  /** Credits available from this grant before the current invoice usage. */
@@ -8086,6 +8164,36 @@ export type YoutubeChannelId = string;
8086
8164
  export type YoutubeChannelName = string;
8087
8165
  /** A YouTube channel identifier, either a channel ID or a channel handle. */
8088
8166
  export type YoutubeChannelPattern = YoutubeChannelId | YoutubeChannelName;
8167
+ export interface JiraConnectorSetupSettings {
8168
+ /**
8169
+ * Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
8170
+ * @format uri
8171
+ * @minLength 1
8172
+ * @maxLength 2048
8173
+ */
8174
+ baseUrl: string;
8175
+ /**
8176
+ * Email of the Atlassian account whose API token is used.
8177
+ * @format email
8178
+ * @minLength 1
8179
+ * @maxLength 254
8180
+ */
8181
+ apiEmail: string;
8182
+ /**
8183
+ * Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes.
8184
+ * @minLength 1
8185
+ * @maxLength 1024
8186
+ */
8187
+ apiToken: string;
8188
+ /**
8189
+ * Projects where GitBook handles issues. Empty means all accessible projects.
8190
+ * @maxItems 100
8191
+ * @uniqueItems true
8192
+ */
8193
+ projectKeys?: string[];
8194
+ /** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
8195
+ statusMapping?: Record<ChangeRequestStatus, string>;
8196
+ }
8089
8197
  export type ContextConnectorSetup = {
8090
8198
  connector: "builtin:email";
8091
8199
  } | {
@@ -8197,36 +8305,7 @@ export type ContextConnectorSetup = {
8197
8305
  };
8198
8306
  } | {
8199
8307
  connector: "builtin:jira";
8200
- setupSettings: {
8201
- /**
8202
- * Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
8203
- * @format uri
8204
- * @minLength 1
8205
- * @maxLength 2048
8206
- */
8207
- baseUrl: string;
8208
- /**
8209
- * Email of the Atlassian account whose API token is used.
8210
- * @format email
8211
- * @minLength 1
8212
- * @maxLength 254
8213
- */
8214
- apiEmail: string;
8215
- /**
8216
- * Atlassian API token used for outbound writes. Redacted when read back.
8217
- * @minLength 1
8218
- * @maxLength 1024
8219
- */
8220
- apiToken: string;
8221
- /**
8222
- * Projects where GitBook handles issues. Empty means all accessible projects.
8223
- * @maxItems 100
8224
- * @uniqueItems true
8225
- */
8226
- projectKeys?: string[];
8227
- /** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
8228
- statusMapping?: Record<ChangeRequestStatus, string>;
8229
- };
8308
+ setupSettings: JiraConnectorSetupSettings;
8230
8309
  };
8231
8310
  export type ContextConnection = {
8232
8311
  object: "context-connection";
@@ -8245,6 +8324,19 @@ export type ContextConnection = {
8245
8324
  failureMessage?: string;
8246
8325
  /** Why a synchronization failed, indicating who can resolve it. `authentication` and `misconfigured` need the connection to be reconfigured; `rate_limited` and `upstream_unavailable` are the source's own limits or downtime and are retried; `unknown` could not be attributed to the source's response. */
8247
8326
  failureReason?: ContextConnectionFailureReason;
8327
+ /**
8328
+ * Why an AI task was skipped before execution.
8329
+ *
8330
+ * - `ai_unavailable_for_organization`: The organization's effective plan does not include AI or a
8331
+ * required feature. Takes precedence when both the organization and site plans block the task.
8332
+ * - `ai_unavailable_for_site`: The site's effective plan does not include the required feature.
8333
+ * The site's applied plan takes precedence over its own plan.
8334
+ * - `ai_paused`: AI usage is temporarily paused by automatic usage controls.
8335
+ * - `ai_disabled`: AI or a required AI feature has been turned off in the organization's settings.
8336
+ * - `ai_restricted`: AI is blocked by GitBook or a contractual restriction and cannot be enabled
8337
+ * through organization settings.
8338
+ */
8339
+ skipReason?: AISkipReason;
8248
8340
  /** Parameters associated with the connection when it is an email connection */
8249
8341
  email?: {
8250
8342
  /**
@@ -8263,6 +8355,34 @@ export type ContextConnection = {
8263
8355
  location: string;
8264
8356
  };
8265
8357
  } & ContextConnectorSetup;
8358
+ /**
8359
+ * Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
8360
+ * @format uri
8361
+ * @minLength 1
8362
+ * @maxLength 2048
8363
+ */
8364
+ export type BaseUrl = string;
8365
+ /**
8366
+ * Email of the Atlassian account whose API token is used.
8367
+ * @format email
8368
+ * @minLength 1
8369
+ * @maxLength 254
8370
+ */
8371
+ export type ApiEmail = string;
8372
+ /**
8373
+ * Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes.
8374
+ * @minLength 1
8375
+ * @maxLength 1024
8376
+ */
8377
+ export type ApiToken = string;
8378
+ /**
8379
+ * Projects where GitBook handles issues. Empty means all accessible projects.
8380
+ * @maxItems 100
8381
+ * @uniqueItems true
8382
+ */
8383
+ export type ProjectKeys = string[];
8384
+ /** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
8385
+ export type StatusMapping = Record<ChangeRequestStatus, string>;
8266
8386
  export interface ContextConnectionTestResult {
8267
8387
  object: "context-connection-test-result";
8268
8388
  /** Whether the stored credentials authenticated successfully. */
@@ -8270,6 +8390,7 @@ export interface ContextConnectionTestResult {
8270
8390
  /** A human-readable reason for the failure, when the test failed. */
8271
8391
  error?: string;
8272
8392
  }
8393
+ export type SiteChannelType = SiteCoreChannelType | SiteConfigurableChannelType;
8273
8394
  export interface SiteTopicUsageSettings {
8274
8395
  /** Whether to use context to propose change requests */
8275
8396
  changeRequests: boolean;
@@ -8315,7 +8436,6 @@ export interface SiteTopic {
8315
8436
  location: string;
8316
8437
  };
8317
8438
  }
8318
- export type SiteChannelType = SiteCoreChannelType | SiteConfigurableChannelType;
8319
8439
  export interface SiteQuestionAnswerSourceBase {
8320
8440
  object: "site-question-answer-source";
8321
8441
  /** The ID of the source. */
@@ -9267,7 +9387,12 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
9267
9387
  /** Event when a user views the ask UI. */
9268
9388
  export type SiteInsightsEventAskView = SiteInsightsEventBase & {
9269
9389
  type: "ask_view";
9270
- trigger?: "hover" | "selection" | "site" | "page" | "embed";
9390
+ trigger?: "hover" | "selection" | "site" | "page" | "code" | "embed";
9391
+ };
9392
+ /** Event when a user clicks an entry point that opens the ask UI. */
9393
+ export type SiteInsightsEventAskTriggerClick = SiteInsightsEventBase & {
9394
+ type: "ask_trigger_click";
9395
+ trigger: "hover" | "selection" | "site" | "page" | "code";
9271
9396
  };
9272
9397
  export type SiteInsightsEventAskRateResponse = SiteInsightsEventBase & {
9273
9398
  type: "ask_rate_response";
@@ -9322,7 +9447,7 @@ export type SiteInsightsEventMCPRequest = SiteInsightsEventBase & {
9322
9447
  export type SiteInsightsEventRSSRequest = SiteInsightsEventBase & {
9323
9448
  type: "rss_request";
9324
9449
  };
9325
- export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventPageMarkdownRequest | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventPagePostFeedbackComment | SiteInsightsEventAgentFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventAskView | SiteInsightsEventAskRateResponse | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest | SiteInsightsEventTrademarkClick | SiteInsightsEventAdClick | SiteInsightsEventAdDisplay | SiteInsightsEventLLMSRequest | SiteInsightsEventMCPRequest | SiteInsightsEventRSSRequest;
9450
+ export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventPageMarkdownRequest | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventPagePostFeedbackComment | SiteInsightsEventAgentFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventAskView | SiteInsightsEventAskTriggerClick | SiteInsightsEventAskRateResponse | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest | SiteInsightsEventTrademarkClick | SiteInsightsEventAdClick | SiteInsightsEventAdDisplay | SiteInsightsEventLLMSRequest | SiteInsightsEventMCPRequest | SiteInsightsEventRSSRequest;
9326
9451
  export interface SiteInsightsQueryDateTimeColumn {
9327
9452
  column: "datetime";
9328
9453
  interval?: "hour" | "day" | "week" | "month";
@@ -9373,6 +9498,10 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
9373
9498
  column: "visitorBot";
9374
9499
  } | {
9375
9500
  column: "visitorLanguage";
9501
+ } | {
9502
+ column: "visitorUserAgent";
9503
+ } | {
9504
+ column: "visitorId";
9376
9505
  } | {
9377
9506
  column: "eventLinkTargetValue";
9378
9507
  } | {
@@ -9538,6 +9667,12 @@ export type SiteInsightsQueryEventsValues = {
9538
9667
  } | {
9539
9668
  column: "visitorLanguage";
9540
9669
  values: (string | null)[];
9670
+ } | {
9671
+ column: "visitorUserAgent";
9672
+ values: string[];
9673
+ } | {
9674
+ column: "visitorId";
9675
+ values: string[];
9541
9676
  } | {
9542
9677
  column: "eventLinkTargetDomain";
9543
9678
  values: (string | null)[];
@@ -9979,6 +10114,8 @@ export interface OrganizationBillingOverrides {
9979
10114
  aiCreditAlertThreshold?: Percentage;
9980
10115
  /** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
9981
10116
  aiCreditPauseEnabled?: boolean;
10117
+ /** False when the organization's contract requires AI to stay off, regardless of the admin setting. */
10118
+ hasAI?: false;
9982
10119
  /** Current minimum users override, when set. */
9983
10120
  minUsers?: OrganizationBillingNumericOverride;
9984
10121
  /** Current maximum users override, when set. */
@@ -10270,6 +10407,12 @@ export type InputPageDocument = InputPageBase & {
10270
10407
  * @maxLength 300
10271
10408
  */
10272
10409
  description?: string;
10410
+ /**
10411
+ * Optional custom title overriding only the page-title segment of the composed `<title>` tag (`<tagTitle || title> | <section> | <site>`).
10412
+ * @minLength 0
10413
+ * @maxLength 100
10414
+ */
10415
+ tagTitle?: string;
10273
10416
  /** Page's slug in its direct parent */
10274
10417
  slug?: string;
10275
10418
  pages?: (InputPageDocument | InputPageLink | InputPageComputed)[];
@@ -16812,7 +16955,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16812
16955
  */
16813
16956
  deleteSiteSectionById: (organizationId: EntityId, siteId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16814
16957
  /**
16815
- * @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.
16958
+ * @description Creates an external navigation link at the site root or in a section group. On a site with root variants and no sections, creating the first external link enables sections and moves those variants into a default section. Links 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.
16816
16959
  *
16817
16960
  * @tags site-external-links
16818
16961
  * @name AddExternalLinkToSite
@@ -17386,6 +17529,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17386
17529
  * @secure
17387
17530
  */
17388
17531
  updateSiteContextConnectionById: (organizationId: EntityId, siteId: string, siteContextConnectionId: string, data: ContextConnectorSetup | {
17532
+ connector: "builtin:jira";
17533
+ /** Optional label for the connection */
17534
+ label?: ContextConnectionLabel;
17535
+ setupSettings: {
17536
+ /** Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net. */
17537
+ baseUrl: BaseUrl;
17538
+ /** Email of the Atlassian account whose API token is used. */
17539
+ apiEmail: ApiEmail;
17540
+ /** Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes. */
17541
+ apiToken?: ApiToken;
17542
+ /** Projects where GitBook handles issues. Empty means all accessible projects. */
17543
+ projectKeys?: ProjectKeys;
17544
+ /** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
17545
+ statusMapping?: StatusMapping;
17546
+ };
17547
+ } | {
17389
17548
  usageSettings?: ContextUsageSettings;
17390
17549
  /** Optional label for the connection */
17391
17550
  label?: ContextConnectionLabel;
@@ -17442,6 +17601,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17442
17601
  from?: Timestamp;
17443
17602
  /** Filter stats to answers created at or before this timestamp. */
17444
17603
  to?: Timestamp;
17604
+ /** Filter stats by question relevance. */
17605
+ relevance?: SiteQuestionAnswerRelevance[];
17606
+ /** Filter stats by answer channel type. */
17607
+ channelType?: SiteChannelType[];
17608
+ /** Filter stats by answer resolution. */
17609
+ answered?: SiteQuestionAnswerResolution[];
17445
17610
  }, params?: RequestParams) => Promise<HttpResponse<{
17446
17611
  items: SiteTopic[];
17447
17612
  }, any>>;
@@ -18651,7 +18816,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18651
18816
  role?: SiteChannelRole;
18652
18817
  }, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
18653
18818
  /**
18654
- * @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira credentials are verified without saving a connection. Slack includes public channels and accessible private channels, excluding archived channels. To fetch another page, pass the opaque token from `next.page` as the `page` query parameter with the same request body. An absent `next` means there are no more pages; an empty `items` array alone does not indicate the end of the list.
18819
+ * @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira uses either the credentials supplied, verified without saving a connection, or those stored on an existing Jira context connection of this site. Slack includes public channels and accessible private channels, excluding archived channels. To fetch another page, pass the opaque token from `next.page` as the `page` query parameter with the same request body. An absent `next` means there are no more pages; an empty `items` array alone does not indicate the end of the list.
18655
18820
  *
18656
18821
  * @tags site-channels
18657
18822
  * @name ListSiteChannelScopes
@@ -18671,6 +18836,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18671
18836
  provider: "slack";
18672
18837
  /** ID of an already-connected channel belonging to this site and matching the provider. */
18673
18838
  siteChannelId: string;
18839
+ } | {
18840
+ provider: "jira";
18841
+ /** ID of a Jira context connection belonging to this site, whose stored credentials are used. */
18842
+ siteContextConnectionId: string;
18674
18843
  } | {
18675
18844
  provider: "jira";
18676
18845
  credentials: {