@gitbook/api 0.202.0 → 0.203.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,13 @@
1
+ /**
2
+ * What became of a background agent.
3
+ * `running` while it works, `completed` when it reported its result, `failed` when it crashed without recovering or its request was refused, and `stopped` when someone stopped it.
4
+ */
5
+ export declare enum AgentBackgroundAgentStatus {
6
+ Running = "running",
7
+ Completed = "completed",
8
+ Failed = "failed",
9
+ Stopped = "stopped"
10
+ }
1
11
  /**
2
12
  * Steering on how far an agent should reach when it changes content.
3
13
  * 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).
@@ -100,7 +110,8 @@ export declare enum RevisionSemanticChangeType {
100
110
  }
101
111
  /** Predefined GitBook user identifiers */
102
112
  export declare enum GitBookUsers {
103
- GitbookAgent = "gitbook:agent"
113
+ GitbookAgent = "gitbook:agent",
114
+ GitbookGitsync = "gitbook:gitsync"
104
115
  }
105
116
  /** The Cloudflare Hostname TLS validation method */
106
117
  export declare enum CloudflareHostnameTLSValidationMethod {
@@ -171,6 +182,7 @@ export declare enum SiteRedirectOrderBy {
171
182
  Source = "source"
172
183
  }
173
184
  export declare enum SiteInsightsQueryRangePreset {
185
+ YearToDate = "yearToDate",
174
186
  LastYear = "lastYear",
175
187
  Last3Months = "last3Months",
176
188
  Last30Days = "last30Days",
@@ -393,13 +405,14 @@ export declare enum SiteQuestionType {
393
405
  Unknown = "unknown"
394
406
  }
395
407
  /**
396
- * The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `sources` returns the findings with the most linked sources (questions plus records) first. Defaults to 'updatedAt'.
408
+ * The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `sources` returns the findings with the most linked sources (questions plus records) first. `suggestedFix` is for link findings: those that come with a fix (a suggested redirect, or an outbound link to correct) come before broken URLs the audit found no page for, most severe first within each group. Other finding types sort with the second group. Defaults to 'updatedAt'.
397
409
  * @default "updatedAt"
398
410
  */
399
411
  export declare enum SiteFindingOrderBy {
400
412
  UpdatedAt = "updatedAt",
401
413
  Severity = "severity",
402
- Sources = "sources"
414
+ Sources = "sources",
415
+ SuggestedFix = "suggestedFix"
403
416
  }
404
417
  /** Findings source filter matching evidence coming from site questions. */
405
418
  export declare enum SiteTriageFilterQuestions {
@@ -457,6 +470,11 @@ export declare enum AgentFeedbackSource {
457
470
  Mcp = "mcp",
458
471
  Assistant = "assistant"
459
472
  }
473
+ /** Whether the member is part of the change request, or a tombstone kept so that a member removed and later re-added keeps its identity, comments and history. */
474
+ export declare enum SiteChangeRequestMemberStatus {
475
+ Active = "active",
476
+ Removed = "removed"
477
+ }
460
478
  /** The platform of the social handle. */
461
479
  export declare enum SiteSocialAccountPlatform {
462
480
  Twitter = "twitter",
@@ -744,6 +762,7 @@ export declare enum SAMLProviderStatus {
744
762
  /** An organization feature used for plan access and upgrade prompts. */
745
763
  export declare enum OrganizationFeature {
746
764
  MaxMembers = "max-members",
765
+ Ai = "ai",
747
766
  AiLens = "ai-lens",
748
767
  PdfExport = "pdf-export",
749
768
  AiWriting = "ai-writing",
@@ -871,6 +890,7 @@ export declare enum SiteFeatureKey {
871
890
  SitesSections = "sites-sections",
872
891
  SitesSeo = "sites-seo",
873
892
  SitesShareLinks = "sites-share-links",
893
+ SitesStyleGuide = "sites-style-guide",
874
894
  SitesUnlistedVisibility = "sites-unlisted-visibility",
875
895
  SitesUserContribution = "sites-user-contribution",
876
896
  SitesVisitorAuthentication = "sites-visitor-authentication",
@@ -940,10 +960,10 @@ export declare enum BillingTrialStatus {
940
960
  /** The AI credit bundle to top up every month */
941
961
  export declare enum BillingCreditsBundle {
942
962
  None = "none",
943
- Value135001500 = "13500_1500",
944
- Value240006000 = "24000_6000",
945
- Value4200018000 = "42000_18000",
946
- Value6000040000 = "60000_40000"
963
+ Value4750250 = "4750_250",
964
+ Value90001000 = "9000_1000",
965
+ Value127502250 = "12750_2250",
966
+ Value3000010000 = "30000_10000"
947
967
  }
948
968
  /** Interval for a billing subscription */
949
969
  export declare enum BillingInterval {
@@ -1456,6 +1476,8 @@ export interface GitSyncState {
1456
1476
  parentInstallationId?: string;
1457
1477
  /** The URL to the repository tree, used when rendering public content. */
1458
1478
  url?: string;
1479
+ /** Directory in the repository this content syncs from, resolved against the parent installation when the installation is managed by a site. Absent when the content syncs from the root of the repository. */
1480
+ installationProjectDirectory?: string;
1459
1481
  /** The latest operation on the Git Sync installation. */
1460
1482
  operation?: {
1461
1483
  /**
@@ -1478,6 +1500,11 @@ export interface GitSyncState {
1478
1500
  /** When the Git provider details were last updated */
1479
1501
  updatedAt?: Timestamp;
1480
1502
  }
1503
+ /** What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation. */
1504
+ export interface PreviousGitSyncState {
1505
+ /** The URL to the directory of the repository tree the content synced with before its Git Sync installation was removed, at the branch it synced. */
1506
+ url: string;
1507
+ }
1481
1508
  export type ContentImportSource = {
1482
1509
  type: "website";
1483
1510
  url: URL;
@@ -1622,6 +1649,8 @@ export interface Space {
1622
1649
  parent?: string;
1623
1650
  language?: TranslationLanguage;
1624
1651
  gitSync?: GitSyncState;
1652
+ /** What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation. */
1653
+ previousGitSync?: PreviousGitSyncState;
1625
1654
  /** Import runs targeting this space, still running or ended recently, most recent first. Only returned when fetching a single space. */
1626
1655
  imports?: ContentImportRun[];
1627
1656
  visitorAuth?: VisitorAuth;
@@ -3232,7 +3261,7 @@ export interface ChangeRequestLinkInput {
3232
3261
  /** External ticket data resolved for this link by a configured connector. */
3233
3262
  export type ChangeRequestLinkExpanded = {
3234
3263
  kind: "external-ticket";
3235
- provider: "jira";
3264
+ provider: "jira" | "linear";
3236
3265
  state: "connected";
3237
3266
  /** The ticket's provider-specific key. */
3238
3267
  key: string;
@@ -3249,12 +3278,14 @@ export type ChangeRequestLinkExpanded = {
3249
3278
  summary: string;
3250
3279
  } | {
3251
3280
  kind: "external-ticket";
3252
- provider: "jira";
3281
+ provider: "jira" | "linear";
3253
3282
  state: "error";
3254
3283
  };
3255
3284
  export type ChangeRequestLink = ChangeRequestLinkInput & {
3256
3285
  /** The ID of the link. */
3257
3286
  id: string;
3287
+ /** Whether this link owns synchronization with the external issue. Other links are references only. */
3288
+ isSyncing: boolean;
3258
3289
  /** External ticket data resolved for this link by a configured connector. */
3259
3290
  expanded?: ChangeRequestLinkExpanded;
3260
3291
  };
@@ -3293,15 +3324,25 @@ export interface ChangeRequest {
3293
3324
  revisionMerged?: string;
3294
3325
  /** Count of opened comments on the change request. */
3295
3326
  comments: number;
3296
- /** Site context associated with the change request when it was created from a site topic or finding. */
3327
+ /** Site topic the change request was created from, when it came from one. */
3297
3328
  siteTopic?: {
3298
3329
  /** ID of the site associated with the change request. */
3299
3330
  site: string;
3300
3331
  /** ID of the site topic associated with the change request. */
3301
3332
  topic: string;
3302
- /** ID of the site finding associated with the change request, when applicable. */
3333
+ /**
3334
+ * ID of the site finding the change request fixes. Use `siteFinding` instead: a change request can fix a finding without belonging to a topic, and this field is absent in that case.
3335
+ * @deprecated
3336
+ */
3303
3337
  finding?: string;
3304
3338
  };
3339
+ /** Site finding the change request fixes, when it is linked to one. Merging the change request resolves the finding, once every change request linked to it is merged. */
3340
+ siteFinding?: {
3341
+ /** ID of the site the finding belongs to. */
3342
+ site: string;
3343
+ /** ID of the site finding the change request fixes. */
3344
+ finding: string;
3345
+ };
3305
3346
  /** Style guide check that opened the change request, when it came from one. A check can be run again on the change request already open on a space, rather than opening a second one, so several checks can share a change request. */
3306
3347
  styleguide?: {
3307
3348
  /** ID of the site the style guide belongs to. */
@@ -3486,6 +3527,8 @@ export interface ChangeRequestReview {
3486
3527
  location: string;
3487
3528
  };
3488
3529
  }
3530
+ /** Exact review totals for the applied filters, independent of pagination. Keyed by review status, with a count of zero for a status nobody used. */
3531
+ export type ChangeRequestReviewStats = Record<ChangeRequestReviewStatus, number>;
3489
3532
  export interface Team {
3490
3533
  /** Type of Object, always equals to "team" */
3491
3534
  object: "team";
@@ -4049,6 +4092,28 @@ export interface SitePointer {
4049
4092
  }
4050
4093
  /** The default content for the organization */
4051
4094
  export type OrganizationDefaultContent = SitePointer;
4095
+ /** An AI credit threshold from 5% to 50%, or null when disabled. */
4096
+ 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. */
4098
+ export interface OrganizationAISettings {
4099
+ /** Whether AI features are automatically paused because credits are low. */
4100
+ aiPaused?: boolean;
4101
+ "ai-agent"?: false;
4102
+ "ai-assistant"?: false;
4103
+ "ai-broken-links"?: false;
4104
+ "ai-content-gap"?: false;
4105
+ "ai-insight"?: false;
4106
+ "ai-import"?: false;
4107
+ "ai-platform"?: false;
4108
+ "ai-style-guide"?: false;
4109
+ "ai-translation"?: false;
4110
+ /** An AI credit threshold from 5% to 50%, or null when disabled. */
4111
+ aiCreditAlertThreshold?: AICreditThreshold;
4112
+ /** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
4113
+ aiCreditPauseEnabled?: boolean;
4114
+ aiAlertNotificationAlertId?: string;
4115
+ aiPauseNotificationAlertId?: string;
4116
+ }
4052
4117
  /** Pricing pair for monthly and yearly intervals */
4053
4118
  export interface OrganizationPricePair {
4054
4119
  /**
@@ -4123,9 +4188,39 @@ export interface OrganizationBilling {
4123
4188
  canUseSAML: boolean;
4124
4189
  /** 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. */
4125
4190
  creditsBundle: BillingCreditsBundle | null;
4126
- /** Percentage of total AI credits remaining at which to send a low-balance alert, or null when the alert is disabled. */
4127
- aiCreditAlertThreshold: number | null;
4191
+ /** The yearly AI credit allowance agreed in the organization's contract, or null when none is set. */
4192
+ aiCreditAllowance: number | null;
4193
+ /**
4194
+ * The percentage of unused paid bundle credits carried over to the next monthly AI billing period.
4195
+ * @min 0
4196
+ * @max 100
4197
+ */
4198
+ aiCreditRollover: number;
4128
4199
  }
4200
+ /** What support costs the organization, per ticket or per hour of agent time, used to estimate how much AI answers save in site insights. */
4201
+ export type OrganizationSupportCost = {
4202
+ /**
4203
+ * Cost of one support ticket, in `currency`.
4204
+ * @min 0.01
4205
+ */
4206
+ perTicket: number;
4207
+ /**
4208
+ * ISO 4217 currency code.
4209
+ * @pattern ^[A-Z]{3}$
4210
+ */
4211
+ currency: string;
4212
+ } | {
4213
+ /**
4214
+ * Cost of one hour of support agent time, in `currency`.
4215
+ * @min 0.01
4216
+ */
4217
+ perHour: number;
4218
+ /**
4219
+ * ISO 4217 currency code.
4220
+ * @pattern ^[A-Z]{3}$
4221
+ */
4222
+ currency: string;
4223
+ };
4129
4224
  /**
4130
4225
  * A short description giving context on the reason for the block.
4131
4226
  * @minLength 1
@@ -4154,6 +4249,8 @@ export interface Organization {
4154
4249
  sso?: boolean;
4155
4250
  /** If true, the organization is configured to use all our AI features. */
4156
4251
  ai?: boolean;
4252
+ /** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4253
+ aiSettings?: OrganizationAISettings;
4157
4254
  /** If true, invite links are enabled for this organization. */
4158
4255
  inviteLinks: boolean;
4159
4256
  /** Whether audit logs can currently be accessed for this organization. */
@@ -4163,6 +4260,8 @@ export interface Organization {
4163
4260
  /** Billing details, only available for org members. */
4164
4261
  billing?: OrganizationBilling;
4165
4262
  mergeRules: MergeRulesStandaloneConfiguration;
4263
+ /** Support cost set by the organization, only available for org members. */
4264
+ supportCost?: OrganizationSupportCost;
4166
4265
  /** URLs associated with the object */
4167
4266
  urls: {
4168
4267
  /**
@@ -5421,6 +5520,57 @@ export interface CreateOrganization {
5421
5520
  /** Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true. */
5422
5521
  onboardingPreferences?: SiteOnboardingPreferences;
5423
5522
  }
5523
+ /** The current or last trial of an organization. */
5524
+ export interface SubscriptionTrial {
5525
+ /** - notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do. */
5526
+ status: BillingTrialStatus;
5527
+ /** When the trial ends, or ended. */
5528
+ endDate: Timestamp;
5529
+ /** Days left in the trial, rounded up, so 1 is its last day. 0 once it has ended. */
5530
+ daysRemaining: number;
5531
+ }
5532
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
5533
+ export interface SubscriptionNotice {
5534
+ /** - trial_started, the operation started the organization's trial. - trial_countdown, the organization's trial ends soon. - checkout_required, the operation needs a paid plan to complete. */
5535
+ type: "trial_started" | "trial_countdown" | "checkout_required";
5536
+ /** What the user was doing when the notice was given. */
5537
+ context: "trial_started" | "site_publishing" | "site_features" | "site_customization";
5538
+ /** Whether the organization is on a trial, the free plan, or a paid plan. */
5539
+ commercialStatus: "trial" | "free" | "paid";
5540
+ /** Message to show the user. For users who cannot upgrade, it asks them to reach out to an administrator of the organization. */
5541
+ message: string;
5542
+ /** The current or last trial of an organization. */
5543
+ trial?: SubscriptionTrial;
5544
+ /** Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade. */
5545
+ canManageBilling: boolean;
5546
+ /** Where to upgrade in the application. Only set when `canManageBilling` is true. */
5547
+ upgradeUrl?: URL;
5548
+ /** Public page comparing the GitBook plans. */
5549
+ pricingUrl: URL;
5550
+ }
5551
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5552
+ export type OptOutUpdate = false | null;
5553
+ /** Partial AI preference update. Omitted keys are unchanged; null removes an opt-out. */
5554
+ export interface OrganizationAISettingsUpdate {
5555
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5556
+ "ai-agent"?: OptOutUpdate;
5557
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5558
+ "ai-assistant"?: OptOutUpdate;
5559
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5560
+ "ai-broken-links"?: OptOutUpdate;
5561
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5562
+ "ai-content-gap"?: OptOutUpdate;
5563
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5564
+ "ai-insight"?: OptOutUpdate;
5565
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5566
+ "ai-import"?: OptOutUpdate;
5567
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5568
+ "ai-platform"?: OptOutUpdate;
5569
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5570
+ "ai-style-guide"?: OptOutUpdate;
5571
+ /** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
5572
+ "ai-translation"?: OptOutUpdate;
5573
+ }
5424
5574
  /**
5425
5575
  * Title of the site section
5426
5576
  * @minLength 2
@@ -5609,6 +5759,13 @@ export interface AuditEventActor {
5609
5759
  id: string;
5610
5760
  /** Display label captured when the event was recorded. */
5611
5761
  label?: string;
5762
+ /** GitBook staff member acting as this user. Present only for recorded impersonation; older events may not have this information. The actor ID remains the effective user for filtering. */
5763
+ impersonator?: {
5764
+ /** Stable ID of the impersonating staff member. */
5765
+ id: string;
5766
+ /** Staff display name captured when the event was recorded, if available. */
5767
+ label?: string;
5768
+ };
5612
5769
  }
5613
5770
  export interface AuditEventTarget {
5614
5771
  /** Kind of resource affected by the change. */
@@ -5683,6 +5840,28 @@ export interface StyleguideTemplate {
5683
5840
  export interface StyleguideTemplates {
5684
5841
  templates: StyleguideTemplate[];
5685
5842
  }
5843
+ /** An organization's subscription, as needed to tell a user their plan, trial and how to upgrade. */
5844
+ export interface OrganizationSubscription {
5845
+ /** Type of Object, always equals to "organization-subscription" */
5846
+ object: "organization-subscription";
5847
+ /** Whether the organization is on a trial, the free plan, or a paid plan. */
5848
+ status: "trial" | "free" | "paid";
5849
+ /** The plan in effect, which is the trial's plan while trialing. */
5850
+ plan: {
5851
+ /** Name of the product */
5852
+ id: BillingProduct;
5853
+ /** Name of the plan shown to users, e.g. Pro. */
5854
+ title: string;
5855
+ };
5856
+ /** The current or last trial. Absent when the organization never had one. */
5857
+ trial?: SubscriptionTrial;
5858
+ /** Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade. */
5859
+ canManageBilling: boolean;
5860
+ /** Where to upgrade in the application. Only set when `canManageBilling` is true. */
5861
+ upgradeUrl?: URL;
5862
+ /** Public page comparing the GitBook plans. */
5863
+ pricingUrl: URL;
5864
+ }
5686
5865
  /** Permission of a member in a content. */
5687
5866
  export interface MemberContentPermission {
5688
5867
  /**
@@ -5946,9 +6125,11 @@ export interface BillingInvoicePreview {
5946
6125
  adjustments: BillingInvoiceAdjustment[];
5947
6126
  /** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
5948
6127
  creditGrants: {
5949
- /** 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. */
5950
- type: "paid" | "bonus" | "site" | "rollover";
5951
- /** Credits the grant was created with. */
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";
6130
+ /** Stripe spending priority. Lower values are consumed first. */
6131
+ priority?: number;
6132
+ /** Credits available from this grant before the current invoice usage. */
5952
6133
  grantedCredits: number;
5953
6134
  /** Credits of the grant spent by the usage metered so far. */
5954
6135
  usedCredits: number;
@@ -5978,7 +6159,7 @@ export interface BillingInvoicePreview {
5978
6159
  coveredAmount: number;
5979
6160
  /** The credits the organization pays for. */
5980
6161
  paid: BillingCreditsTotals;
5981
- /** The credits included at no extra cost, from the bundle, sites and rollover. */
6162
+ /** The bonus, site and custom credits. */
5982
6163
  free: BillingCreditsTotals;
5983
6164
  /** The credits of the monthly bundle, both paid and bonus. */
5984
6165
  bundle: BillingCreditsTotals;
@@ -6024,16 +6205,18 @@ export interface Credits {
6024
6205
  coveredAmount: number;
6025
6206
  /** The credits the organization pays for. */
6026
6207
  paid: BillingCreditsTotals;
6027
- /** The credits included at no extra cost, from the bundle, sites and rollover. */
6208
+ /** The bonus, site and custom credits. */
6028
6209
  free: BillingCreditsTotals;
6029
6210
  /** The credits of the monthly bundle, both paid and bonus. */
6030
6211
  bundle: BillingCreditsTotals;
6031
6212
  }
6032
6213
  /** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
6033
6214
  export type CreditGrants = {
6034
- /** 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. */
6035
- type: "paid" | "bonus" | "site" | "rollover";
6036
- /** Credits the grant was created with. */
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";
6217
+ /** Stripe spending priority. Lower values are consumed first. */
6218
+ priority?: number;
6219
+ /** Credits available from this grant before the current invoice usage. */
6037
6220
  grantedCredits: number;
6038
6221
  /** Credits of the grant spent by the usage metered so far. */
6039
6222
  usedCredits: number;
@@ -6361,6 +6544,8 @@ export interface SearchAIAnswerSourcePage {
6361
6544
  revision: string;
6362
6545
  /** The space ID owning the page. */
6363
6546
  space: string;
6547
+ /** The title of the page, as of `revision`. */
6548
+ title: string;
6364
6549
  /** The IDs of the sections of the page that were used to answer the question. */
6365
6550
  sections: string[];
6366
6551
  }
@@ -6822,6 +7007,11 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
6822
7007
  location: string;
6823
7008
  };
6824
7009
  };
7010
+ /** Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions. */
7011
+ export type SiteAdaptiveRegions = Record<any, {
7012
+ /** ISO 3166-1 alpha-2 codes of the countries in the region. */
7013
+ countries: ("AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
7014
+ }>;
6825
7015
  export type SiteAdaptiveDeterministicJSONSchemaPrimitives = {
6826
7016
  type: "boolean";
6827
7017
  description: string;
@@ -6847,8 +7037,10 @@ export type SiteAdaptiveJSONSchemaClaimsProperties = SiteAdaptiveJSONSchemaPrimi
6847
7037
  properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
6848
7038
  additionalProperties: false;
6849
7039
  };
6850
- /** JSON schema describing the expected attributes of an Adaptive site schema. */
6851
- export interface SiteAdaptiveJSONSchema {
7040
+ /** JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from. */
7041
+ export interface SiteAdaptiveJSONSchemaWithRegions {
7042
+ /** Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions. */
7043
+ regions?: SiteAdaptiveRegions;
6852
7044
  $schema?: "http://json-schema.org/draft-07/schema#";
6853
7045
  type: "object";
6854
7046
  properties: {
@@ -6865,8 +7057,8 @@ export interface SiteAdaptiveJSONSchema {
6865
7057
  }
6866
7058
  export interface SiteAdaptiveSchema {
6867
7059
  object: "site-adaptive-schema";
6868
- /** JSON schema describing the expected attributes of an Adaptive site schema. */
6869
- jsonSchema: SiteAdaptiveJSONSchema;
7060
+ /** JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from. */
7061
+ jsonSchema: SiteAdaptiveJSONSchemaWithRegions;
6870
7062
  /** When the adaptive schema was updated. */
6871
7063
  updatedAt: Timestamp;
6872
7064
  }
@@ -7174,6 +7366,89 @@ export interface PublishedContentSite {
7174
7366
  };
7175
7367
  scripts: SiteIntegrationScript[];
7176
7368
  }
7369
+ /** State shared by every resource changed by a site change request. Each resource is versioned independently; the change request reviews and merges them as one. */
7370
+ export interface SiteChangeRequestMember {
7371
+ object: "site-change-request-member";
7372
+ /** Unique identifier for the member */
7373
+ id: string;
7374
+ /** Whether the member is part of the change request, or a tombstone kept so that a member removed and later re-added keeps its identity, comments and history. */
7375
+ status: SiteChangeRequestMemberStatus;
7376
+ createdAt: Timestamp;
7377
+ updatedAt: Timestamp;
7378
+ }
7379
+ /** Content of one space changed by a site change request. */
7380
+ export type SiteChangeRequestContentMember = SiteChangeRequestMember & {
7381
+ /** ID of the space whose content changes. */
7382
+ space: string;
7383
+ /** ID of the revision in the space's main content this member diverged from. */
7384
+ baseRevisionId: string;
7385
+ /** ID of the revision currently proposed for the space. */
7386
+ headRevisionId: string;
7387
+ /** ID of the revision produced in the space's main content when this member was merged. Only present once the change request has been merged. */
7388
+ mergedRevisionId?: string;
7389
+ };
7390
+ /** Structure of the site changed by a site change request: its space membership, sections, ordering and paths. */
7391
+ export type SiteChangeRequestStructureMember = SiteChangeRequestMember & {
7392
+ /** The live site structure this member diverged from. */
7393
+ base?: SiteStructure;
7394
+ /** The site structure currently proposed. */
7395
+ head?: SiteStructure;
7396
+ };
7397
+ /** Customization settings of the site changed by a site change request. */
7398
+ export type SiteChangeRequestCustomizationMember = SiteChangeRequestMember & {
7399
+ /** The live customization settings this member diverged from. */
7400
+ base?: SiteCustomizationSettings;
7401
+ /** The customization settings currently proposed. */
7402
+ head?: SiteCustomizationSettings;
7403
+ };
7404
+ /** A change request reviewing a site as a whole. It groups every proposed change — the site's structure and its content — into one review, one lifecycle and one merge decision. */
7405
+ export interface SiteChangeRequest {
7406
+ object: "site-change-request";
7407
+ /** Unique identifier for the change request */
7408
+ id: string;
7409
+ /** ID of the organization owning the change request. */
7410
+ organization: string;
7411
+ /** ID of the site reviewed by the change request. */
7412
+ site: string;
7413
+ /** Incremental identifier of the change request within the site. */
7414
+ number: number;
7415
+ /** Identity of the complete set of member states currently exposed. It increments once per completed update, so a review can detect that it applies to outdated content. */
7416
+ version: number;
7417
+ status: ChangeRequestStatus;
7418
+ /** Subject of the change request */
7419
+ subject: ChangeRequestSubject;
7420
+ description?: JSONDocument;
7421
+ /** External links associated with the change request. */
7422
+ links?: ChangeRequestLinks;
7423
+ /** Spaces whose content the change request changes, one entry per space. Empty when it only changes the site itself. */
7424
+ content: SiteChangeRequestContentMember[];
7425
+ /** Only present when the change request changes the site structure. */
7426
+ structure?: SiteChangeRequestStructureMember;
7427
+ /** Only present when the change request changes the site customization settings. */
7428
+ customization?: SiteChangeRequestCustomizationMember;
7429
+ /** Count of opened comments across all members of the change request. */
7430
+ comments: number;
7431
+ createdBy: User;
7432
+ createdAt: Timestamp;
7433
+ updatedAt: Timestamp;
7434
+ /** User who merged the change request. Only present when it has been merged. */
7435
+ mergedBy?: User;
7436
+ /** Date at which the change request was merged. Only present when it has been merged. */
7437
+ mergedAt?: Timestamp;
7438
+ /** URLs associated with the object */
7439
+ urls: {
7440
+ /**
7441
+ * URL of the change request in the application
7442
+ * @format uri
7443
+ */
7444
+ app: string;
7445
+ /**
7446
+ * URL of the change request in the API
7447
+ * @format uri
7448
+ */
7449
+ location: string;
7450
+ };
7451
+ }
7177
7452
  /**
7178
7453
  * Name of the share link
7179
7454
  * @minLength 0
@@ -7568,13 +7843,13 @@ export interface SiteRedirectInputDestinationPath {
7568
7843
  /** Path to the page within the space revision to resolve. */
7569
7844
  path: string;
7570
7845
  }
7571
- /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
7846
+ /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). The destination is absent when the audit judged the URL and found no page to redirect to: a redirect can still be created from the source with a destination of your choosing. */
7572
7847
  export interface SiteFindingBrokenLinkAction {
7573
7848
  /** The source path to redirect from. */
7574
7849
  source: SiteRedirectSourcePath;
7575
7850
  /** Whether the redirect appends the wildcard-matched suffix of the source path to the destination. */
7576
7851
  captureWildcard?: boolean;
7577
- destination: SiteRedirectInputDestinationPath;
7852
+ destination?: SiteRedirectInputDestinationPath;
7578
7853
  }
7579
7854
  /** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
7580
7855
  export interface SiteFindingOutboundLink {
@@ -7633,7 +7908,7 @@ export interface SiteFinding {
7633
7908
  description: JSONDocument;
7634
7909
  /** Whether an AI agent should be able to fix this finding directly */
7635
7910
  autoFixable: boolean;
7636
- /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
7911
+ /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). The destination is absent when the audit judged the URL and found no page to redirect to: a redirect can still be created from the source with a destination of your choosing. */
7637
7912
  brokenLinkAction?: SiteFindingBrokenLinkAction;
7638
7913
  /** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
7639
7914
  outboundLink?: SiteFindingOutboundLink;
@@ -7753,6 +8028,13 @@ export interface SiteFindingStatsSeverities {
7753
8028
  }
7754
8029
  /** Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total. */
7755
8030
  export type SiteFindingStatsConnectors = Record<string, number>;
8031
+ /** Breakdown of the broken-link findings included in the aggregation. */
8032
+ export interface SiteFindingStatsBrokenLinks {
8033
+ /** Broken URLs the audit found a page to redirect to. */
8034
+ redirectSuggested: number;
8035
+ /** Broken URLs the audit judged and found no page to redirect to. */
8036
+ noMatchingPage: number;
8037
+ }
7756
8038
  /** Aggregated stats for the findings identified on a site. */
7757
8039
  export interface SiteFindingStats {
7758
8040
  /** Total count of findings included in the aggregation. */
@@ -7763,6 +8045,8 @@ export interface SiteFindingStats {
7763
8045
  severities: SiteFindingStatsSeverities;
7764
8046
  /** Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total. */
7765
8047
  connectors: SiteFindingStatsConnectors;
8048
+ /** Breakdown of the broken-link findings included in the aggregation. */
8049
+ brokenLinks: SiteFindingStatsBrokenLinks;
7766
8050
  /** Count of findings with at least one piece of evidence coming from a site question. */
7767
8051
  questions: number;
7768
8052
  /** Count of change requests created to fix a finding that have been merged. */
@@ -7934,6 +8218,12 @@ export type ContextConnectorSetup = {
7934
8218
  * @maxLength 1024
7935
8219
  */
7936
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[];
7937
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. */
7938
8228
  statusMapping?: Record<ChangeRequestStatus, string>;
7939
8229
  };
@@ -8167,6 +8457,8 @@ export interface AIToolCallSearchResultPage {
8167
8457
  pageId: string;
8168
8458
  /** The revision ID of the result */
8169
8459
  revisionId: string;
8460
+ /** The path of the page within its space, as the published site serves it. */
8461
+ path?: string;
8170
8462
  /** The anchor of the result */
8171
8463
  anchor?: string;
8172
8464
  /** The title of the result */
@@ -8429,6 +8721,20 @@ export interface AIToolCallCheckContentImport {
8429
8721
  /** Number of pages the import has discovered so far. */
8430
8722
  totalPages: number;
8431
8723
  }
8724
+ /** Tool call recording that the agent started a background agent: a child conversation running one bounded task on its own, in parallel with the conversation that started it. The client renders its live status from `AgentState.backgroundAgents`, matched on `agentId`, and can open the child conversation to read what it did. */
8725
+ export interface AIToolCallStartBackgroundAgent {
8726
+ tool: "startBackgroundAgent";
8727
+ /** Identifier of the background agent within the conversation that started it. */
8728
+ agentId: string;
8729
+ /** The child conversation holding the background agent's transcript. It can only be read, never continued. */
8730
+ conversationId: string;
8731
+ /** A few words naming what the background agent is doing, for a tab and a line of a transcript. The task itself is a brief and far too long to label anything with. */
8732
+ title: string;
8733
+ /** The task the background agent was given. */
8734
+ task: string;
8735
+ /** IDs of the pages the background agent owns, when it was started to change content. Two background agents of the same conversation never own the same page. */
8736
+ pages?: string[];
8737
+ }
8432
8738
  /** Tool called from an MCP server */
8433
8739
  export interface AIToolCallMCP {
8434
8740
  tool: "mcp";
@@ -8452,7 +8758,7 @@ export interface AIToolCallOther {
8452
8758
  /** Summary of a generic tool call. */
8453
8759
  summary: AIToolCallOtherSummary;
8454
8760
  }
8455
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallMCP | AIToolCallOther;
8761
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallStartBackgroundAgent | AIToolCallMCP | AIToolCallOther;
8456
8762
  export interface Timerange {
8457
8763
  start: Timestamp;
8458
8764
  end: Timestamp;
@@ -8544,6 +8850,10 @@ export type AIMessageTask = {
8544
8850
  spaceId: string;
8545
8851
  /** The ID of the change request to implement the task in. */
8546
8852
  changeRequestId: string;
8853
+ } | {
8854
+ type: "background_agent";
8855
+ /** The conversation that started this background agent. */
8856
+ parentConversationId: string;
8547
8857
  };
8548
8858
  /** The response that generated this message. */
8549
8859
  export interface AIMessageResponseMetadata {
@@ -8868,6 +9178,8 @@ export type SiteInsightsEventSession = SiteInsightsSession & {
8868
9178
  export interface SiteInsightsEventLocation {
8869
9179
  /** URL of the location. */
8870
9180
  url: URL;
9181
+ /** URL of the page of the site the visitor was on before this one, if any. Unlike the session referrer, it follows navigation within the site. Only recorded when it has the same origin as `url`; any other value is discarded. */
9182
+ previousUrl?: null | URL;
8871
9183
  /**
8872
9184
  * Whether the event was tracked on the site, the server, or an embed widget.
8873
9185
  * @default "site"
@@ -8955,6 +9267,7 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
8955
9267
  /** Event when a user views the ask UI. */
8956
9268
  export type SiteInsightsEventAskView = SiteInsightsEventBase & {
8957
9269
  type: "ask_view";
9270
+ trigger?: "hover" | "selection" | "site" | "page" | "embed";
8958
9271
  };
8959
9272
  export type SiteInsightsEventAskRateResponse = SiteInsightsEventBase & {
8960
9273
  type: "ask_rate_response";
@@ -9096,6 +9409,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
9096
9409
  column: "referrer";
9097
9410
  } | {
9098
9411
  column: "referrerDomain";
9412
+ } | {
9413
+ column: "previousUrl";
9099
9414
  } | {
9100
9415
  column: "utmSource";
9101
9416
  } | {
@@ -9120,6 +9435,10 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
9120
9435
  } | {
9121
9436
  column: "eventTrademarkPlacement";
9122
9437
  };
9438
+ /**
9439
+ * Ratings submitted on a page, counted once per rating a reader submitted rather than once
9440
+ * per event.
9441
+ */
9123
9442
  export type SiteInsightsQueryEventsValues = {
9124
9443
  column: "datetime";
9125
9444
  values: Timestamp[];
@@ -9262,6 +9581,9 @@ export type SiteInsightsQueryEventsValues = {
9262
9581
  } | {
9263
9582
  column: "referrerDomain";
9264
9583
  values: string[];
9584
+ } | {
9585
+ column: "previousUrl";
9586
+ values: string[];
9265
9587
  } | {
9266
9588
  column: "utmSource";
9267
9589
  values: string[];
@@ -9638,11 +9960,11 @@ export type OrganizationBillingDateOverride = true | Timestamp;
9638
9960
  */
9639
9961
  export type OrganizationBillingNumericOverride = number;
9640
9962
  /**
9641
- * Current percentage billing override, when set.
9963
+ * A percentage from 0 to 100.
9642
9964
  * @min 0
9643
9965
  * @max 100
9644
9966
  */
9645
- export type OrganizationBillingPercentageOverride = number;
9967
+ export type Percentage = number;
9646
9968
  export interface OrganizationBillingOverrides {
9647
9969
  overrides: {
9648
9970
  /** Current interval-change override, when set. */
@@ -9652,9 +9974,11 @@ export interface OrganizationBillingOverrides {
9652
9974
  /** Contractual AI credit allowance for Enterprise organizations only. */
9653
9975
  aiCreditAllowance?: OrganizationBillingNumericOverride;
9654
9976
  /** Percentage of remaining paid AI credits carried into the next billing period. Paid self-serve organizations default to 50% when unset. */
9655
- aiCreditRollover?: OrganizationBillingPercentageOverride;
9977
+ aiCreditRollover?: Percentage;
9656
9978
  /** Percentage of total AI credits remaining at which to send a low-balance alert. */
9657
- aiCreditAlertThreshold?: OrganizationBillingPercentageOverride;
9979
+ aiCreditAlertThreshold?: Percentage;
9980
+ /** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
9981
+ aiCreditPauseEnabled?: boolean;
9658
9982
  /** Current minimum users override, when set. */
9659
9983
  minUsers?: OrganizationBillingNumericOverride;
9660
9984
  /** Current maximum users override, when set. */
@@ -9669,6 +9993,8 @@ export interface OrganizationBillingOverrides {
9669
9993
  maxUltimateSites?: OrganizationBillingNumericOverride;
9670
9994
  };
9671
9995
  }
9996
+ /** A percentage threshold, or null when disabled. */
9997
+ export type PercentageThreshold = Percentage | null;
9672
9998
  export type BackOfficeSite = Site & {
9673
9999
  /** ID of the organization owning this site */
9674
10000
  organization: string;
@@ -9715,6 +10041,8 @@ export interface SiteVisitorPayload {
9715
10041
  type?: "human" | "agent";
9716
10042
  /** JWT token generated for a authenticated access session. */
9717
10043
  jwtToken?: string;
10044
+ /** ISO 3166-1 alpha-2 code of the country the visitor is browsing from, as detected by the renderer. */
10045
+ country?: string;
9718
10046
  unsignedClaims?: PlainObject;
9719
10047
  }
9720
10048
  /** GitHub repository that can be selected for Git Sync. */
@@ -10495,6 +10823,8 @@ export interface ContentAPIBaseToken {
10495
10823
  spaces: string[];
10496
10824
  /** Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted. */
10497
10825
  visitorType?: "human" | "agent";
10826
+ /** The region containing the country of the visitor for whom the token was generated. Omitted if the country isn't in any region. */
10827
+ visitorRegion?: string;
10498
10828
  /** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
10499
10829
  claims?: Record<string, any>;
10500
10830
  /** Multiplier for the rate limit applied to the token. */
@@ -10883,6 +11213,22 @@ export interface APIChannelMutationData {
10883
11213
  executionId: string;
10884
11214
  };
10885
11215
  }
11216
+ /** JSON schema describing the expected attributes of an Adaptive site schema. */
11217
+ export interface SiteAdaptiveJSONSchema {
11218
+ $schema?: "http://json-schema.org/draft-07/schema#";
11219
+ type: "object";
11220
+ properties: {
11221
+ /** Unsigned claims of the site visitor. */
11222
+ unsigned?: {
11223
+ type: "object";
11224
+ description: "Unsigned claims of the site visitor.";
11225
+ properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
11226
+ additionalProperties: false;
11227
+ };
11228
+ [key: string]: any;
11229
+ };
11230
+ additionalProperties: false;
11231
+ }
10886
11232
  export type SiteAdaptiveDeterministicJSONSchemaClaimsProperties = SiteAdaptiveDeterministicJSONSchemaPrimitives | {
10887
11233
  type: "object";
10888
11234
  description: string;
@@ -10955,6 +11301,34 @@ export interface AgentEditTarget {
10955
11301
  /** The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits. */
10956
11302
  changeRequestId?: string;
10957
11303
  }
11304
+ /** A background agent of the conversation: a child running one task on its own. Carries what a client shows about it and nothing of what it produced — the report it writes goes to the agent that started it, and its transcript is read by opening its conversation. */
11305
+ export interface AgentBackgroundAgent {
11306
+ /** Identifier of the background agent within the conversation that started it. */
11307
+ id: string;
11308
+ /** The child conversation holding its transcript, which can only be read. */
11309
+ conversationId: string;
11310
+ /** A few words naming what it is doing, for a tab and a line of a transcript. */
11311
+ title: string;
11312
+ /** The task it was given. */
11313
+ task: string;
11314
+ /**
11315
+ * What became of a background agent.
11316
+ * `running` while it works, `completed` when it reported its result, `failed` when it crashed without recovering or its request was refused, and `stopped` when someone stopped it.
11317
+ */
11318
+ status: AgentBackgroundAgentStatus;
11319
+ /**
11320
+ * When it was started.
11321
+ * @format date-time
11322
+ */
11323
+ startedAt: string;
11324
+ /**
11325
+ * When it stopped running. Absent while it still runs.
11326
+ * @format date-time
11327
+ */
11328
+ finishedAt?: string;
11329
+ /** Why it failed, when it did. */
11330
+ error?: string;
11331
+ }
10958
11332
  export interface AgentState {
10959
11333
  status: AgentStatus;
10960
11334
  /** List of response suggestions for the user to select from. */
@@ -10971,6 +11345,8 @@ export interface AgentState {
10971
11345
  editTarget?: AgentEditTarget;
10972
11346
  /** How far this conversation should reach when it changes content. */
10973
11347
  editScope?: AgentEditScope;
11348
+ /** The background agents this conversation has started, oldest first. Present on every state event so a client can render each one's live status against the tool call that started it. */
11349
+ backgroundAgents?: AgentBackgroundAgent[];
10974
11350
  /** 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. */
10975
11351
  consultOnly?: boolean;
10976
11352
  }
@@ -11782,7 +12158,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11782
12158
  schema?: "current" | "next";
11783
12159
  }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
11784
12160
  /**
11785
- * @description Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready.
12161
+ * @description Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready. When the change request fixes a documentation issue found by GitBook, pass its `siteFindingId` so that merging the change request resolves the finding.
11786
12162
  *
11787
12163
  * @tags change-requests
11788
12164
  * @name CreateChangeRequest
@@ -11795,6 +12171,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11795
12171
  subject?: string;
11796
12172
  /** Template to apply to the change request */
11797
12173
  template?: ApplySpaceTemplate;
12174
+ /** Description of the change request, explaining what it changes and why, for whoever reviews it. Only paragraphs and lists are kept; other blocks are stripped along with their text. */
12175
+ description?: JSONDocument;
12176
+ /** The site finding this change request fixes. Merging the change request resolves the finding, once every change request linked to it has been merged. The finding's site must contain this space. */
12177
+ siteFindingId?: string;
11798
12178
  [key: string]: any;
11799
12179
  }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
11800
12180
  /**
@@ -11850,7 +12230,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11850
12230
  };
11851
12231
  }>>;
11852
12232
  /**
11853
- * @description Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead.
12233
+ * @description Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead. Set `siteFindingId` to record that the change request fixes a documentation issue found by GitBook, so that merging it resolves the finding.
11854
12234
  *
11855
12235
  * @tags change-requests
11856
12236
  * @name UpdateChangeRequestById
@@ -11868,6 +12248,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11868
12248
  */
11869
12249
  links?: ChangeRequestLinkInput[];
11870
12250
  status?: "draft" | "open" | "archived";
12251
+ /** The site finding this change request fixes. Merging the change request resolves the finding, once every change request linked to it has been merged. The finding's site must contain this space. Pass null to unlink a finding linked by mistake. */
12252
+ siteFindingId?: string | null;
11871
12253
  }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
11872
12254
  /**
11873
12255
  * @description Merges the change request's draft content into the space's primary (published) content, making all changes live. If the result is "conflicts", the merge was still applied but the space may need manual conflict resolution. Consider running updateChangeRequest first to sync with the latest live content and reduce conflicts.
@@ -11943,6 +12325,25 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11943
12325
  /** Optionally, provide a comment along with the review. */
11944
12326
  comment?: Document;
11945
12327
  }, params?: RequestParams) => Promise<HttpResponse<ChangeRequestReview, any>>;
12328
+ /**
12329
+ * @description Returns how many reviews were approved and how many requested changes, for the same reviews the list endpoint returns under the same filters. Use this to summarise where a change request stands without paginating through every review.
12330
+ *
12331
+ * @tags change-requests-reviews
12332
+ * @name GetReviewStatsByChangeRequestId
12333
+ * @summary Get review totals for a change request
12334
+ * @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/reviews/stats
12335
+ * @secure
12336
+ */
12337
+ getReviewStatsByChangeRequestId: (spaceId: EntityId, changeRequestId: EntityId, query?: {
12338
+ /** Filter reviews marked as outdated. */
12339
+ outdated?: boolean;
12340
+ }, params?: RequestParams) => Promise<HttpResponse<ChangeRequestReviewStats, {
12341
+ error: {
12342
+ /** @format int32 */
12343
+ code: 404;
12344
+ message: string;
12345
+ };
12346
+ }>>;
11946
12347
  /**
11947
12348
  * @description Retrieves the full details of a single review submission on a change request, including the decision status (approved/changes-requested), reviewer, and any attached comment. Use this when you have a review ID and need its full details.
11948
12349
  *
@@ -13951,7 +14352,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13951
14352
  withDefaultSite?: boolean;
13952
14353
  /** URL of an OpenAPI/Swagger specification to import and attach to the default site as a reference. Only used when `withDefaultSite` is true. */
13953
14354
  openapiUrl?: string;
13954
- }, params?: RequestParams) => Promise<HttpResponse<Organization, any>>;
14355
+ }, params?: RequestParams) => Promise<HttpResponse<Organization & {
14356
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
14357
+ subscriptionNotice?: SubscriptionNotice;
14358
+ }, any>>;
13955
14359
  /**
13956
14360
  * No description
13957
14361
  *
@@ -13989,8 +14393,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13989
14393
  logo?: URL | null;
13990
14394
  sso?: boolean;
13991
14395
  ai?: boolean;
14396
+ /** Partial AI preference update. Omitted keys are unchanged; null removes an opt-out. */
14397
+ aiSettings?: OrganizationAISettingsUpdate;
13992
14398
  inviteLinks?: boolean;
13993
14399
  mergeRules?: MergeRulesStandaloneConfiguration;
14400
+ supportCost?: OrganizationSupportCost | null;
13994
14401
  }, params?: RequestParams) => Promise<HttpResponse<Organization, {
13995
14402
  error: {
13996
14403
  /** @format int32 */
@@ -14219,6 +14626,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14219
14626
  /** A JTW token containing the claims to attach to this user. */
14220
14627
  gitbookVisitorClaims?: string;
14221
14628
  }, any>>;
14629
+ /**
14630
+ * @description Returns whether the organization is on a trial, the free plan or a paid plan, when its trial ends, and where to upgrade. Use it to answer questions about the plan or the trial, or to find how to upgrade.
14631
+ *
14632
+ * @tags organizations
14633
+ * @name GetOrganizationSubscription
14634
+ * @summary Get an organization's subscription
14635
+ * @request GET:/orgs/{organizationId}/subscription
14636
+ * @secure
14637
+ */
14638
+ getOrganizationSubscription: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<OrganizationSubscription, {
14639
+ error: {
14640
+ /** @format int32 */
14641
+ code: 404;
14642
+ message: string;
14643
+ };
14644
+ }>>;
14222
14645
  /**
14223
14646
  * No description
14224
14647
  *
@@ -15548,7 +15971,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15548
15971
  */
15549
15972
  deleteCustomFont: (organizationId: EntityId, fontId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15550
15973
  /**
15551
- * @description Returns a paginated list of all documentation sites belonging to the organization. Use this to discover available sites before fetching their content, settings, or structure.
15974
+ * @description Returns a paginated list of all documentation sites belonging to the organization. Use this to discover available sites before fetching their content, settings, or structure. Members with access only to individual spaces receive the sites that use those spaces as site items, with site administration fields omitted.
15552
15975
  *
15553
15976
  * @tags sites, critical
15554
15977
  * @name ListSites
@@ -15606,7 +16029,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15606
16029
  spaces?: string[];
15607
16030
  }, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
15608
16031
  /**
15609
- * @description Retrieves full details for a single documentation site. Use this to inspect a specific site's metadata before reading or modifying its settings, structure, or content.
16032
+ * @description Retrieves full details for a single documentation site. Use this to inspect a specific site's metadata before reading or modifying its settings, structure, or content. Members with access only through a linked space can retrieve a limited site summary; site administration fields are omitted.
15610
16033
  *
15611
16034
  * @tags sites
15612
16035
  * @name GetSiteById
@@ -15724,8 +16147,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15724
16147
  * @secure
15725
16148
  */
15726
16149
  updateSiteAdaptiveSchema: (organizationId: EntityId, siteId: string, data: {
15727
- /** The JSON schema to set on the site. */
15728
- jsonSchema: SiteAdaptiveJSONSchema;
16150
+ /** The JSON schema to set on the site. `regions` is only accepted for organizations with regions enabled. */
16151
+ jsonSchema: SiteAdaptiveJSONSchemaWithRegions;
15729
16152
  }, params?: RequestParams) => Promise<HttpResponse<SiteAdaptiveSchema, Error | {
15730
16153
  error: {
15731
16154
  /** @format int32 */
@@ -15773,10 +16196,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15773
16196
  * @request POST:/orgs/{organizationId}/sites/{siteId}/publish
15774
16197
  * @secure
15775
16198
  */
15776
- publishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site | {
16199
+ publishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<(Site & {
16200
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
16201
+ subscriptionNotice?: SubscriptionNotice;
16202
+ }) | {
15777
16203
  type: "checkout";
15778
16204
  /** Stripe payment session ID */
15779
16205
  sessionId: string;
16206
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
16207
+ subscriptionNotice?: SubscriptionNotice;
15780
16208
  }, any>>;
15781
16209
  /**
15782
16210
  * @description Removes the site from public access by unpublishing it. The site's configuration and content are preserved; use the publish endpoint to make it accessible again. Use this when you need to temporarily hide a site or take it down for maintenance.
@@ -15788,6 +16216,122 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15788
16216
  * @secure
15789
16217
  */
15790
16218
  unpublishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
16219
+ /**
16220
+ * @description Returns a paginated list of change requests reviewing the site. A site change request groups changes to the site structure and to any number of its spaces into one review. Use this to discover existing change requests before creating a new one.
16221
+ *
16222
+ * @tags site-change-requests
16223
+ * @name ListChangeRequestsForSite
16224
+ * @summary List all change requests for a site
16225
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/change-requests
16226
+ * @secure
16227
+ */
16228
+ listChangeRequestsForSite: (organizationId: EntityId, siteId: string, query?: {
16229
+ /** Identifier of the page results to fetch. */
16230
+ page?: string;
16231
+ /**
16232
+ * The number of results per page
16233
+ * @min 0
16234
+ * @max 1000
16235
+ */
16236
+ limit?: number;
16237
+ /**
16238
+ * If defined, only change requests matching this status will be returned.
16239
+ * @default "open"
16240
+ */
16241
+ status?: ChangeRequestStatus;
16242
+ /** If defined, only change requests created by this user will be returned. */
16243
+ createdBy?: string;
16244
+ /** If defined, only change requests moved out of draft by this user will be returned. */
16245
+ openedBy?: string;
16246
+ /** If defined, only change requests archived by this user will be returned. */
16247
+ archivedBy?: string;
16248
+ /** If defined, only change requests merged by this user will be returned. */
16249
+ mergedBy?: string;
16250
+ /** If defined, only change requests with contributions from this user will be returned. */
16251
+ contributor?: string;
16252
+ /**
16253
+ * Status of the members.
16254
+ * @default "active"
16255
+ */
16256
+ memberStatus?: SiteChangeRequestMemberStatus;
16257
+ /** The field to sort change requests by. Defaults to 'updatedAt'. */
16258
+ orderBy?: ChangeRequestOrderBy;
16259
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
16260
+ items: SiteChangeRequest[];
16261
+ }, any>>;
16262
+ /**
16263
+ * @description Creates a change request reviewing the site, as a draft working copy of the content of the spaces it changes. It starts with no members: a space becomes one on its first edit.
16264
+ *
16265
+ * @tags site-change-requests
16266
+ * @name CreateSiteChangeRequest
16267
+ * @summary Create a new change request in a site
16268
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/change-requests
16269
+ * @secure
16270
+ */
16271
+ createSiteChangeRequest: (organizationId: EntityId, siteId: string, data: {
16272
+ /** Subject of the change request */
16273
+ subject?: ChangeRequestSubject;
16274
+ description?: JSONDocument;
16275
+ }, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, any>>;
16276
+ /**
16277
+ * @description Retrieves a single site change request, including its status, subject, description, aggregate version and active members. Use this to check its current state before deciding to merge, update or request a review.
16278
+ *
16279
+ * @tags site-change-requests
16280
+ * @name GetSiteChangeRequestById
16281
+ * @summary Get a site change request by its ID
16282
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
16283
+ * @secure
16284
+ */
16285
+ getSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, {
16286
+ error: {
16287
+ /** @format int32 */
16288
+ code: 404;
16289
+ message: string;
16290
+ };
16291
+ }>>;
16292
+ /**
16293
+ * @description Updates the metadata of a site change request. Use this to rename it, add context before requesting a review, or change its workflow status without merging. To change the resources it reviews, update its members instead.
16294
+ *
16295
+ * @tags site-change-requests
16296
+ * @name UpdateSiteChangeRequestById
16297
+ * @summary Update a site change request's subject, description, or status
16298
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
16299
+ * @secure
16300
+ */
16301
+ updateSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, data: {
16302
+ /** Subject of the change request */
16303
+ subject?: ChangeRequestSubject;
16304
+ description?: JSONDocument;
16305
+ status?: "draft" | "open" | "archived";
16306
+ }, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, {
16307
+ error: {
16308
+ /** @format int32 */
16309
+ code: 404;
16310
+ message: string;
16311
+ };
16312
+ } | {
16313
+ error: {
16314
+ /** @format int32 */
16315
+ code: 409;
16316
+ message: string;
16317
+ };
16318
+ }>>;
16319
+ /**
16320
+ * @description Permanently deletes a change request and its members. Merged change requests cannot be deleted; archive a change request instead to keep its review history.
16321
+ *
16322
+ * @tags site-change-requests
16323
+ * @name DeleteSiteChangeRequestById
16324
+ * @summary Delete a site change request
16325
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
16326
+ * @secure
16327
+ */
16328
+ deleteSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, {
16329
+ error: {
16330
+ /** @format int32 */
16331
+ code: 409;
16332
+ message: string;
16333
+ };
16334
+ }>>;
15791
16335
  /**
15792
16336
  * @description Returns a paginated list of share links configured for the site. Share links grant access to a private site without requiring full authentication. Use this to audit existing share links, check their active status, or find a link ID before updating or revoking it.
15793
16337
  *
@@ -15849,7 +16393,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15849
16393
  */
15850
16394
  deleteSiteShareLinkById: (organizationId: EntityId, siteId: string, shareLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15851
16395
  /**
15852
- * @description Returns the complete hierarchical structure of a site, including all sections, section groups, and site spaces in their current order. Use this to understand how a site's navigation is organized before making structural changes, or to render the full navigation tree of a site.
16396
+ * @description Returns the complete hierarchical structure of a site, including all sections, section groups, and site spaces in their current order. Use this to understand how a site's navigation is organized before making structural changes, or to render the full navigation tree of a site. Members with access only to individual spaces receive only the site items backed by those spaces and their parent sections.
15853
16397
  *
15854
16398
  * @tags site-structure
15855
16399
  * @name GetSiteStructure
@@ -15956,6 +16500,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15956
16500
  siteSpace?: string;
15957
16501
  /** Rison encoded string of attributes/assertions about the visitor for which we want to preview the site. */
15958
16502
  claims?: string;
16503
+ /** ISO 3166-1 alpha-2 code of the country of the visitor for which we want to preview the site. It is matched against the `regions` of the site adaptive schema to resolve `visitor.region`. */
16504
+ country?: string;
15959
16505
  /**
15960
16506
  * Whether to include draft content in the preview. Defaults to true
15961
16507
  * @default true
@@ -16004,7 +16550,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16004
16550
  * @request PUT:/orgs/{organizationId}/sites/{siteId}/customization
16005
16551
  * @secure
16006
16552
  */
16007
- updateSiteCustomizationById: (organizationId: EntityId, siteId: string, data: SiteCustomizationSettingsInput, params?: RequestParams) => Promise<HttpResponse<SiteCustomizationSettings, {
16553
+ updateSiteCustomizationById: (organizationId: EntityId, siteId: string, data: SiteCustomizationSettingsInput, params?: RequestParams) => Promise<HttpResponse<SiteCustomizationSettingsBase & {
16554
+ /** When the customization settings were updated. If missing, customization was not updated. */
16555
+ updatedAt?: Timestamp;
16556
+ } & {
16557
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
16558
+ subscriptionNotice?: SubscriptionNotice;
16559
+ }, {
16008
16560
  error: {
16009
16561
  /** @format int32 */
16010
16562
  code: 400;
@@ -16069,7 +16621,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16069
16621
  title?: SiteTitle;
16070
16622
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
16071
16623
  /**
16072
- * @description Returns a paginated list of site spaces — the links between a site and its content source spaces. Each site space can be a language variant or content version within a section. Use the default filter to retrieve only the primary site space, or omit it to get all linked spaces including drafts.
16624
+ * @description Returns a paginated list of site spaces — the links between a site and its content source spaces. Each site space can be a language variant or content version within a section. Use the default filter to retrieve only the primary site space, or omit it to get all linked spaces including drafts. Members with access only to individual spaces receive only site-space links for those spaces.
16073
16625
  *
16074
16626
  * @tags site-spaces, critical
16075
16627
  * @name ListSiteSpaces
@@ -16133,7 +16685,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16133
16685
  parent?: string;
16134
16686
  /** Whether the section group should be created in draft mode. */
16135
16687
  draft?: boolean;
16136
- }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
16688
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup & {
16689
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
16690
+ subscriptionNotice?: SubscriptionNotice;
16691
+ }, any>>;
16137
16692
  /**
16138
16693
  * @description Updates a section group's properties in the site's navigation structure.
16139
16694
  *
@@ -16190,7 +16745,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16190
16745
  pageId?: string;
16191
16746
  /** ID of the section group to create the section in */
16192
16747
  siteSectionGroupId?: string;
16193
- }, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
16748
+ }, params?: RequestParams) => Promise<HttpResponse<SiteSection & {
16749
+ /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
16750
+ subscriptionNotice?: SubscriptionNotice;
16751
+ }, any>>;
16194
16752
  /**
16195
16753
  * @description Returns a paginated list of sections in the site. Each section is a top-level navigation item backed by one or more site spaces. Use this to inspect the current navigation structure, find a section ID before updating it, or check whether sections are in draft or live state.
16196
16754
  *
@@ -16579,7 +17137,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16579
17137
  */
16580
17138
  getSiteScanById: (organizationId: EntityId, siteId: string, siteScanId: string, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
16581
17139
  /**
16582
- * @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.
17140
+ * @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. Only findings with status "open" need work; "candidate" ones have not been confirmed yet. A "broken-link" finding is fixed by a redirect rather than a content edit: pass its `brokenLinkAction` to createSiteRedirect. Fix the rest by opening a change request with its `siteFindingId` set, so merging the change request resolves it.
16583
17141
  *
16584
17142
  * @tags site-context
16585
17143
  * @name ListSiteFindings
@@ -16604,6 +17162,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16604
17162
  status?: SiteFindingStatus;
16605
17163
  /** Filter findings by type. When multiple types are given, findings matching any of them are returned. */
16606
17164
  type?: SiteFindingType[];
17165
+ /** Filter link findings whose URL contains this text: the broken path of a `broken-link` finding, or the checked URL of an `outbound-link-error` one. Findings of any other type never match, so this narrows the list to link findings on its own. */
17166
+ url?: string;
16607
17167
  /** Filter findings by estimated severity. */
16608
17168
  severity?: SiteFindingSeverity;
16609
17169
  /** Filter findings that have at least one associated change request. */
@@ -17781,6 +18341,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17781
18341
  * @secure
17782
18342
  */
17783
18343
  createSiteRedirect: (organizationId: EntityId, siteId: string, data: {
18344
+ /** The broken-link finding that prompted this redirect. Must belong to this site. Used to attribute redirect creation, including drafts, to the finding. */
18345
+ siteFindingId?: string;
17784
18346
  /** The source path to redirect from. */
17785
18347
  source: SiteRedirectSourcePath;
17786
18348
  /**
@@ -18088,6 +18650,88 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18088
18650
  createSiteChannel: (organizationId: EntityId, siteId: string, data: SiteChannelSetup & {
18089
18651
  role?: SiteChannelRole;
18090
18652
  }, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
18653
+ /**
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.
18655
+ *
18656
+ * @tags site-channels
18657
+ * @name ListSiteChannelScopes
18658
+ * @summary List available site channel scopes
18659
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/channels/scopes
18660
+ * @secure
18661
+ */
18662
+ listSiteChannelScopes: (organizationId: EntityId, siteId: string, data: {
18663
+ provider: "linear";
18664
+ /** ID of an already-connected channel belonging to this site and matching the provider. */
18665
+ siteChannelId: string;
18666
+ } | {
18667
+ provider: "github";
18668
+ /** ID of an already-connected channel belonging to this site and matching the provider. */
18669
+ siteChannelId: string;
18670
+ } | {
18671
+ provider: "slack";
18672
+ /** ID of an already-connected channel belonging to this site and matching the provider. */
18673
+ siteChannelId: string;
18674
+ } | {
18675
+ provider: "jira";
18676
+ credentials: {
18677
+ /**
18678
+ * Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
18679
+ * @format uri
18680
+ * @minLength 1
18681
+ * @maxLength 2048
18682
+ */
18683
+ baseUrl: string;
18684
+ /**
18685
+ * Email of the Atlassian account whose API token is used.
18686
+ * @format email
18687
+ * @minLength 1
18688
+ * @maxLength 254
18689
+ */
18690
+ apiEmail: string;
18691
+ /**
18692
+ * Atlassian API token used to verify the account and list accessible projects. Not saved.
18693
+ * @minLength 1
18694
+ * @maxLength 1024
18695
+ */
18696
+ apiToken: string;
18697
+ };
18698
+ }, query?: {
18699
+ /** Identifier of the page results to fetch. */
18700
+ page?: string;
18701
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
18702
+ object: "site-channel-scopes";
18703
+ /** Linear workspace name, GitHub account name, Slack workspace name (or ID if unavailable), or Jira Cloud hostname. */
18704
+ connection: string;
18705
+ items: {
18706
+ /** Value accepted by the provider scope settings, such as a team key, repository full name, channel name, Jira project key. */
18707
+ key: string;
18708
+ name: string;
18709
+ }[];
18710
+ }, {
18711
+ error: {
18712
+ /** @format int32 */
18713
+ code: 400;
18714
+ message: string;
18715
+ };
18716
+ } | {
18717
+ error: {
18718
+ /** @format int32 */
18719
+ code: 401;
18720
+ message: string;
18721
+ };
18722
+ } | {
18723
+ error: {
18724
+ /** @format int32 */
18725
+ code: 403;
18726
+ message: string;
18727
+ };
18728
+ } | {
18729
+ error: {
18730
+ /** @format int32 */
18731
+ code: 404;
18732
+ message: string;
18733
+ };
18734
+ }>>;
18091
18735
  /**
18092
18736
  * @description Retrieves the configuration of a specific GitBook Agent channel integration, including its connected platform type and role. Use this to inspect or verify the channel's setup before updating it.
18093
18737
  *
@@ -18111,7 +18755,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18111
18755
  role?: SiteChannelRole;
18112
18756
  }, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
18113
18757
  /**
18114
- * No description
18758
+ * @description Removes the channel configuration from the site, so GitBook Agent stops answering and collaborating through the connected platform. The app itself is not uninstalled and its access is not revoked on the platform, so remove it there as well to fully disconnect.
18115
18759
  *
18116
18760
  * @tags site-channels
18117
18761
  * @name DeleteSiteChannelById