@gitbook/api 0.205.0 → 0.207.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
@@ -335,6 +335,18 @@ export declare enum SiteSettingsScanTopics {
335
335
  Auto = "auto",
336
336
  Never = "never"
337
337
  }
338
+ /**
339
+ * How much GitBook may do on its own when it resolves broken links automatically. GitBook never
340
+ * applies a fix it isn't sure about, at any level.
341
+ * - `suggest-fixes` drafts fixes for approval and applies none.
342
+ * - `fix-clear-matches` applies the clearest fixes and drafts the less certain ones for approval.
343
+ * - `fix-close-matches` applies the clear and the close fixes.
344
+ */
345
+ export declare enum SiteSettingsBrokenLinksAutonomyLevel {
346
+ SuggestFixes = "suggest-fixes",
347
+ FixClearMatches = "fix-clear-matches",
348
+ FixCloseMatches = "fix-close-matches"
349
+ }
338
350
  export declare enum AIModel {
339
351
  Fast = "fast",
340
352
  ReasoningLow = "reasoning-low",
@@ -367,6 +379,13 @@ export declare enum SiteQuestionAnswerResolution {
367
379
  Partially = "partially",
368
380
  Yes = "yes"
369
381
  }
382
+ /** Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API. */
383
+ export declare enum SiteQuestionVisitorType {
384
+ Human = "human",
385
+ Agent = "agent",
386
+ Bot = "bot",
387
+ Unknown = "unknown"
388
+ }
370
389
  export declare enum SiteConfigurableChannelType {
371
390
  BuiltinSlack = "builtin:slack",
372
391
  BuiltinDiscord = "builtin:discord",
@@ -433,6 +452,25 @@ export declare enum SiteQuestionType {
433
452
  Reference = "reference",
434
453
  Unknown = "unknown"
435
454
  }
455
+ /**
456
+ * An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
457
+ * - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
458
+ * - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
459
+ * - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
460
+ * - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
461
+ * - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
462
+ * - `ignore` dismisses it.
463
+ * - `restore` reopens a dismissed finding.
464
+ */
465
+ export declare enum SiteFindingAction {
466
+ Approve = "approve",
467
+ Reject = "reject",
468
+ CreateRedirect = "create-redirect",
469
+ MarkResolved = "mark-resolved",
470
+ Reopen = "reopen",
471
+ Ignore = "ignore",
472
+ Restore = "restore"
473
+ }
436
474
  /**
437
475
  * 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'.
438
476
  * @default "updatedAt"
@@ -447,6 +485,30 @@ export declare enum SiteFindingOrderBy {
447
485
  export declare enum SiteTriageFilterQuestions {
448
486
  Questions = "questions"
449
487
  }
488
+ /**
489
+ * Where a link finding stands, from its status and what GitBook did with it.
490
+ * - `open` needs a fix.
491
+ * - `awaiting-approval` has a redirect GitBook drafted at its path, waiting to be approved or rejected.
492
+ * - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
493
+ * - `ignored` was dismissed.
494
+ */
495
+ export declare enum SiteFindingState {
496
+ Open = "open",
497
+ AwaitingApproval = "awaiting-approval",
498
+ Resolved = "resolved",
499
+ Ignored = "ignored"
500
+ }
501
+ /**
502
+ * What GitBook did on its own to resolve a finding.
503
+ * - `drafted` drafted a fix that waits for approval.
504
+ * - `applied` has its fix live, applied on its own or approved from a draft, resolving the finding.
505
+ * - `undone` had its fix undone or rejected, so GitBook won't try again.
506
+ */
507
+ export declare enum SiteFindingAutoResolution {
508
+ Drafted = "drafted",
509
+ Applied = "applied",
510
+ Undone = "undone"
511
+ }
450
512
  /** Estimated end-user severity of a site finding. */
451
513
  export declare enum SiteFindingSeverity {
452
514
  Low = "low",
@@ -504,6 +566,14 @@ export declare enum SiteChangeRequestMemberStatus {
504
566
  Active = "active",
505
567
  Removed = "removed"
506
568
  }
569
+ /** A step of the setup of a site, in the order they are done. */
570
+ export declare enum SiteSetupStepId {
571
+ FirstEdit = "first-edit",
572
+ Customize = "customize",
573
+ GitSync = "git-sync",
574
+ Domain = "domain",
575
+ Publish = "publish"
576
+ }
507
577
  /** The platform of the social handle. */
508
578
  export declare enum SiteSocialAccountPlatform {
509
579
  Twitter = "twitter",
@@ -765,7 +835,8 @@ export declare enum StorageUploadKind {
765
835
  export declare enum TranslationStatus {
766
836
  Pending = "pending",
767
837
  Running = "running",
768
- Completed = "completed"
838
+ Completed = "completed",
839
+ Failed = "failed"
769
840
  }
770
841
  /** OpenAPI processing error code */
771
842
  export declare enum OpenAPISpecProcessingErrorCode {
@@ -779,6 +850,12 @@ export declare enum OpenAPISpecProcessingState {
779
850
  Progress = "progress",
780
851
  Complete = "complete"
781
852
  }
853
+ /** Identity provider that provisions members through the SCIM connection. */
854
+ export declare enum SCIMConnectionProvider {
855
+ Okta = "okta",
856
+ Entra = "entra",
857
+ Generic = "generic"
858
+ }
782
859
  /**
783
860
  * Status of the provider.
784
861
  * - `active`: The provider is active and can be used to authenticate users.
@@ -801,6 +878,7 @@ export declare enum OrganizationFeature {
801
878
  MembersTeams = "members-teams",
802
879
  MembersTeamOwners = "members-team-owners",
803
880
  SecuritySaml = "security-saml",
881
+ Scim = "scim",
804
882
  ChangeRequestsMergeRules = "change-requests-merge-rules"
805
883
  }
806
884
  /**
@@ -912,7 +990,6 @@ export declare enum SiteFeatureKey {
912
990
  SitesBasicCustomization = "sites-basic-customization",
913
991
  SitesBrokenLinks = "sites-broken-links",
914
992
  SitesCustomDomain = "sites-custom-domain",
915
- SitesCustomFonts = "sites-custom-fonts",
916
993
  SitesCustomSubdirectory = "sites-custom-subdirectory",
917
994
  SitesFullTextSearch = "sites-full-text-search",
918
995
  SitesMultivariantSite = "sites-multivariant-site",
@@ -956,9 +1033,7 @@ export declare enum SiteType {
956
1033
  Basic = "basic",
957
1034
  Premium = "premium",
958
1035
  Ultimate = "ultimate",
959
- Sponsored = "sponsored",
960
- LegacyBasic = "legacy-basic",
961
- LegacyPremium = "legacy-premium"
1036
+ Sponsored = "sponsored"
962
1037
  }
963
1038
  export declare enum PageFeedbackRating {
964
1039
  Bad = "bad",
@@ -1014,9 +1089,6 @@ export declare enum BillingProduct {
1014
1089
  Pro2024 = "pro_2024",
1015
1090
  Enterprise2024 = "enterprise_2024",
1016
1091
  Community2024 = "community_2024",
1017
- Free = "free",
1018
- Plus = "plus",
1019
- Pro = "pro",
1020
1092
  Internal = "internal"
1021
1093
  }
1022
1094
  export declare enum OrganizationCommunityType {
@@ -1078,6 +1150,17 @@ export declare enum IntegrationTarget {
1078
1150
  Space = "space",
1079
1151
  Organization = "organization"
1080
1152
  }
1153
+ /**
1154
+ * Why a member is disabled in an organization.
1155
+ * "billing": The organization's plan has reached its maximum number of members.
1156
+ * "scim": The member was deactivated by the organization's identity provider.
1157
+ * "admin": An organization admin disabled the member.
1158
+ */
1159
+ export declare enum MemberDisabledReason {
1160
+ Billing = "billing",
1161
+ Scim = "scim",
1162
+ Admin = "admin"
1163
+ }
1081
1164
  /** The core layout presets for a page. */
1082
1165
  export declare enum RevisionPageLayoutPreset {
1083
1166
  Docs = "docs",
@@ -1256,7 +1339,10 @@ export declare enum TranslationLanguage {
1256
1339
  Lt = "lt",
1257
1340
  Lv = "lv",
1258
1341
  Et = "et",
1259
- Sl = "sl"
1342
+ Sl = "sl",
1343
+ FrCa = "fr-ca",
1344
+ EsMx = "es-mx",
1345
+ Es419 = "es-419"
1260
1346
  }
1261
1347
  /**
1262
1348
  * Determines how a Space can be edited.
@@ -1287,7 +1373,41 @@ export declare enum ContentVisibility {
1287
1373
  /** Data passed through a realtime channel */
1288
1374
  export type APIChannelData = APIChannelGitSyncOperationData | APIChannelGitSyncSiteOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
1289
1375
  /** Channel to subscribe to for realtime updates. */
1290
- export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelGitSyncSiteOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1376
+ export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationSCIMConnections | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelGitSyncSiteOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1377
+ /** The plan upgrade that would make a feature available. */
1378
+ export type FeatureUpgradeRequirement = {
1379
+ type: "organization";
1380
+ /** An organization feature used for plan access and upgrade prompts. */
1381
+ feature: OrganizationFeature;
1382
+ /** The internal identifier of the minimum organization plan that includes the feature. The human-readable name is provided in requiredPlanName. */
1383
+ requiredPlan: BillingProduct;
1384
+ /**
1385
+ * The human-readable name of the required organization plan.
1386
+ * @example "Pro"
1387
+ */
1388
+ requiredPlanName: string;
1389
+ /**
1390
+ * Where an admin may upgrade the organization's plan.
1391
+ * @format uri
1392
+ */
1393
+ url: string;
1394
+ } | {
1395
+ type: "site";
1396
+ /** The site feature identifier */
1397
+ feature: SiteFeatureKey;
1398
+ /** The internal identifier of the minimum site plan that includes the feature. The human-readable name is provided in requiredPlanName. */
1399
+ requiredPlan: SiteType;
1400
+ /**
1401
+ * The human-readable name of the required site plan.
1402
+ * @example "Ultimate"
1403
+ */
1404
+ requiredPlanName: string;
1405
+ /**
1406
+ * Where an admin may upgrade the site's plan.
1407
+ * @format uri
1408
+ */
1409
+ url: string;
1410
+ };
1291
1411
  /** An absolute reference to content in GitBook. */
1292
1412
  export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent | ContentLocationOpenAPI;
1293
1413
  export type PublishedContentRedirect = {
@@ -1347,7 +1467,15 @@ export type ChangeRequestContentChange = ({
1347
1467
  operation: "revert_page";
1348
1468
  } & ChangeRequestContentChangeRevertPage) | ({
1349
1469
  operation: "insert_files";
1350
- } & ChangeRequestContentChangeInsertFiles);
1470
+ } & ChangeRequestContentChangeInsertFiles) | ({
1471
+ operation: "insert_computed_page";
1472
+ } & ChangeRequestContentChangeInsertComputedPage) | ({
1473
+ operation: "insert_reusable_contents";
1474
+ } & ChangeRequestContentChangeInsertReusableContents) | ({
1475
+ operation: "update_reusable_content";
1476
+ } & ChangeRequestContentChangeUpdateReusableContent) | ({
1477
+ operation: "delete_reusable_content";
1478
+ } & ChangeRequestContentChangeDeleteReusableContent);
1351
1479
  export type Revision = RevisionTypeEdits | RevisionTypeMerge | RevisionTypeRollback | RevisionTypeUpdate | RevisionTypeComputed;
1352
1480
  export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink | RevisionPageComputed;
1353
1481
  export interface ApiInformation {
@@ -2253,6 +2381,13 @@ export interface DocumentBlockCode {
2253
2381
  nodes: DocumentBlockCodeLine[];
2254
2382
  isVoid?: false;
2255
2383
  }
2384
+ export interface DocumentFragment {
2385
+ object: "fragment";
2386
+ key?: string;
2387
+ fragment?: string;
2388
+ type?: string;
2389
+ nodes: DocumentBlock[];
2390
+ }
2256
2391
  export interface DocumentBlockEmbed {
2257
2392
  object: "block";
2258
2393
  type: "embed";
@@ -2261,6 +2396,10 @@ export interface DocumentBlockEmbed {
2261
2396
  url: string;
2262
2397
  fullWidth?: boolean;
2263
2398
  };
2399
+ fragments?: (DocumentFragment & {
2400
+ fragment: "caption";
2401
+ nodes: DocumentBlockParagraph[];
2402
+ })[];
2264
2403
  isVoid: true;
2265
2404
  }
2266
2405
  export type PlainObject = any;
@@ -2436,13 +2575,6 @@ export interface DocumentTableCellMerge {
2436
2575
  /** Number of rows or columns covered by a table cell merge */
2437
2576
  colSpan: DocumentTableCellSpan;
2438
2577
  }
2439
- export interface DocumentFragment {
2440
- object: "fragment";
2441
- key?: string;
2442
- fragment?: string;
2443
- type?: string;
2444
- nodes: DocumentBlock[];
2445
- }
2446
2578
  export interface DocumentBlockTable {
2447
2579
  object: "block";
2448
2580
  type: "table";
@@ -2461,33 +2593,38 @@ export interface DocumentBlockTable {
2461
2593
  };
2462
2594
  fragments: DocumentFragment[];
2463
2595
  }
2464
- export interface DocumentBlockHint {
2465
- object: "block";
2466
- type: "hint";
2467
- key?: string;
2468
- data: {
2469
- style: "info" | "warning" | "danger" | "success";
2470
- /** Name of the icon */
2471
- icon?: Icon;
2472
- };
2473
- nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable)[];
2474
- isVoid?: false;
2475
- }
2476
2596
  export interface DocumentBlockQuote {
2477
2597
  object: "block";
2478
2598
  type: "blockquote";
2479
2599
  key?: string;
2480
- nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
2600
+ nodes: (DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockCode | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockExpandable | DocumentBlockFile | DocumentBlockHint | DocumentBlockIf | DocumentBlockMath | DocumentBlockPrompt | DocumentBlockStepper | DocumentBlockTabs)[];
2481
2601
  isVoid?: false;
2482
2602
  data?: object;
2483
2603
  }
2484
- export interface DocumentBlockMath {
2604
+ export interface DocumentBlockDrawing {
2485
2605
  object: "block";
2486
- type: "math";
2606
+ type: "drawing";
2487
2607
  key?: string;
2488
2608
  data: {
2489
- formula: string;
2609
+ ref?: ContentRefFile;
2490
2610
  };
2611
+ fragments?: (DocumentFragment & {
2612
+ fragment: "caption";
2613
+ nodes: DocumentBlockParagraph[];
2614
+ })[];
2615
+ isVoid: true;
2616
+ }
2617
+ export interface DocumentBlockFile {
2618
+ object: "block";
2619
+ type: "file";
2620
+ key?: string;
2621
+ data: {
2622
+ ref: ContentRefFile;
2623
+ };
2624
+ fragments?: (DocumentFragment & {
2625
+ fragment: "caption";
2626
+ nodes: DocumentBlockParagraph[];
2627
+ })[];
2491
2628
  isVoid: true;
2492
2629
  }
2493
2630
  export type Length = number | {
@@ -2523,50 +2660,18 @@ export interface DocumentBlockImages {
2523
2660
  nodes: DocumentBlockImage[];
2524
2661
  isVoid: false;
2525
2662
  }
2526
- export interface DocumentBlockListItem {
2527
- object: "block";
2528
- type: "list-item";
2529
- key?: string;
2530
- nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable | DocumentBlockImages)[];
2531
- isVoid?: false;
2532
- data?: {
2533
- checked?: boolean;
2534
- };
2535
- }
2536
- export interface DocumentBlockListOrdered {
2663
+ export interface DocumentBlockHint {
2537
2664
  object: "block";
2538
- type: "list-ordered";
2665
+ type: "hint";
2539
2666
  key?: string;
2540
2667
  data: {
2541
- /** An integer to start counting from for the list items. */
2542
- start?: number;
2668
+ style: "info" | "warning" | "danger" | "success";
2669
+ /** Name of the icon */
2670
+ icon?: Icon;
2543
2671
  };
2544
- nodes: DocumentBlockListItem[];
2672
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockQuote | DocumentBlockCode | DocumentBlockDrawing | DocumentBlockExpandable | DocumentBlockFile | DocumentBlockHint | DocumentBlockIf | DocumentBlockMath | DocumentBlockPrompt | DocumentBlockStepper | DocumentBlockTabs)[];
2545
2673
  isVoid?: false;
2546
2674
  }
2547
- export interface DocumentBlockListUnordered {
2548
- object: "block";
2549
- type: "list-unordered";
2550
- key?: string;
2551
- nodes: DocumentBlockListItem[];
2552
- data?: object;
2553
- isVoid?: false;
2554
- }
2555
- export interface DocumentBlockListTasks {
2556
- object: "block";
2557
- type: "list-tasks";
2558
- key?: string;
2559
- nodes: DocumentBlockListItem[];
2560
- isVoid?: false;
2561
- data?: object;
2562
- }
2563
- export interface DocumentBlockDivider {
2564
- object: "block";
2565
- type: "divider";
2566
- key?: string;
2567
- isVoid: true;
2568
- data: object;
2569
- }
2570
2675
  export interface DocumentBlockPrompt {
2571
2676
  object: "block";
2572
2677
  type: "prompt";
@@ -2600,24 +2705,6 @@ export interface DocumentBlockIf {
2600
2705
  expression: string;
2601
2706
  };
2602
2707
  }
2603
- export interface DocumentBlockFile {
2604
- object: "block";
2605
- type: "file";
2606
- key?: string;
2607
- data: {
2608
- ref: ContentRefFile;
2609
- };
2610
- isVoid: true;
2611
- }
2612
- export interface DocumentBlockDrawing {
2613
- object: "block";
2614
- type: "drawing";
2615
- key?: string;
2616
- data: {
2617
- ref?: ContentRefFile;
2618
- };
2619
- isVoid: true;
2620
- }
2621
2708
  export interface DocumentBlockReusableContent {
2622
2709
  object: "block";
2623
2710
  type: "reusable-content";
@@ -2641,6 +2728,15 @@ export interface DocumentBlockContentRef {
2641
2728
  };
2642
2729
  isVoid: true;
2643
2730
  }
2731
+ export interface DocumentBlockMath {
2732
+ object: "block";
2733
+ type: "math";
2734
+ key?: string;
2735
+ data: {
2736
+ formula: string;
2737
+ };
2738
+ isVoid: true;
2739
+ }
2644
2740
  export interface DocumentBlockExpandable {
2645
2741
  object: "block";
2646
2742
  type: "expandable";
@@ -2661,7 +2757,7 @@ export interface DocumentBlockExpandable {
2661
2757
  fragment: "expandable-body";
2662
2758
  type: "expandable-body";
2663
2759
  /** @minItems 1 */
2664
- nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper)[];
2760
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper | DocumentBlockTabs)[];
2665
2761
  }))[];
2666
2762
  meta?: {
2667
2763
  /** Unique ID to be used in an URL for the block. */
@@ -2676,11 +2772,21 @@ export interface DocumentBlockStepper {
2676
2772
  isVoid?: false;
2677
2773
  data?: object;
2678
2774
  }
2775
+ export interface DocumentBlockTabs {
2776
+ object: "block";
2777
+ type: "tabs";
2778
+ key?: string;
2779
+ nodes: DocumentBlockTabsItem[];
2780
+ isVoid?: false;
2781
+ data?: {
2782
+ fullWidth?: boolean;
2783
+ };
2784
+ }
2679
2785
  export interface DocumentBlockTabsItem {
2680
2786
  object: "block";
2681
2787
  type: "tabs-item";
2682
2788
  key?: string;
2683
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2789
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockTabs)[];
2684
2790
  data: {
2685
2791
  title?: string;
2686
2792
  /** Name of the icon */
@@ -2694,26 +2800,60 @@ export interface DocumentBlockTabsItem {
2694
2800
  };
2695
2801
  isVoid?: false;
2696
2802
  }
2697
- export interface DocumentBlockTabs {
2803
+ export interface DocumentBlockStepperStep {
2698
2804
  object: "block";
2699
- type: "tabs";
2805
+ type: "stepper-step";
2700
2806
  key?: string;
2701
- nodes: DocumentBlockTabsItem[];
2807
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2808
+ data: {
2809
+ icon?: string;
2810
+ };
2811
+ isVoid?: false;
2812
+ }
2813
+ export interface DocumentBlockListItem {
2814
+ object: "block";
2815
+ type: "list-item";
2816
+ key?: string;
2817
+ nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable | DocumentBlockImages)[];
2702
2818
  isVoid?: false;
2703
2819
  data?: {
2704
- fullWidth?: boolean;
2820
+ checked?: boolean;
2705
2821
  };
2706
2822
  }
2707
- export interface DocumentBlockStepperStep {
2823
+ export interface DocumentBlockListOrdered {
2708
2824
  object: "block";
2709
- type: "stepper-step";
2825
+ type: "list-ordered";
2710
2826
  key?: string;
2711
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2712
2827
  data: {
2713
- icon?: string;
2828
+ /** An integer to start counting from for the list items. */
2829
+ start?: number;
2714
2830
  };
2831
+ nodes: DocumentBlockListItem[];
2832
+ isVoid?: false;
2833
+ }
2834
+ export interface DocumentBlockListUnordered {
2835
+ object: "block";
2836
+ type: "list-unordered";
2837
+ key?: string;
2838
+ nodes: DocumentBlockListItem[];
2839
+ data?: object;
2715
2840
  isVoid?: false;
2716
2841
  }
2842
+ export interface DocumentBlockListTasks {
2843
+ object: "block";
2844
+ type: "list-tasks";
2845
+ key?: string;
2846
+ nodes: DocumentBlockListItem[];
2847
+ isVoid?: false;
2848
+ data?: object;
2849
+ }
2850
+ export interface DocumentBlockDivider {
2851
+ object: "block";
2852
+ type: "divider";
2853
+ key?: string;
2854
+ isVoid: true;
2855
+ data: object;
2856
+ }
2717
2857
  /** Pointer to an operation in the OpenAPI spec. */
2718
2858
  export interface OpenAPIOperationPointer {
2719
2859
  /** Path of the operation in the OpenAPI spec. */
@@ -2826,7 +2966,8 @@ export interface DocumentBlockUpdate {
2826
2966
  key?: string;
2827
2967
  nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockIf | DocumentBlockStepper)[];
2828
2968
  data: {
2829
- date: Timestamp;
2969
+ /** Date of the update. Accepts a YYYY-MM-DD date or a timestamp. Timestamps are normalized to their UTC calendar date; responses use YYYY-MM-DD. */
2970
+ date: string | Timestamp;
2830
2971
  /** Array of tags. Each tag is id'ed by its slug. */
2831
2972
  tags?: ContentRefTag[];
2832
2973
  };
@@ -3397,18 +3538,28 @@ export interface ChangeRequest {
3397
3538
  /** ID of the site topic associated with the change request. */
3398
3539
  topic: string;
3399
3540
  /**
3400
- * 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.
3541
+ * ID of the site finding the change request fixes. Use `siteFindings` instead: a change request can fix a finding without belonging to a topic, and this field is absent in that case.
3401
3542
  * @deprecated
3402
3543
  */
3403
3544
  finding?: string;
3404
3545
  };
3405
- /** 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. */
3546
+ /**
3547
+ * First linked site finding. Use `siteFindings` to read all linked findings.
3548
+ * @deprecated
3549
+ */
3406
3550
  siteFinding?: {
3407
3551
  /** ID of the site the finding belongs to. */
3408
3552
  site: string;
3409
3553
  /** ID of the site finding the change request fixes. */
3410
3554
  finding: string;
3411
3555
  };
3556
+ /** Site findings linked to the change request, in link order. Absent when none are linked. Merging resolves findings once every linked change request is merged, except outbound broken links, which are resolved by the outbound checker. */
3557
+ siteFindings?: {
3558
+ /** ID of the site the finding belongs to. */
3559
+ site: string;
3560
+ /** ID of the site finding the change request fixes. */
3561
+ finding: string;
3562
+ }[];
3412
3563
  /** 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. */
3413
3564
  styleguide?: {
3414
3565
  /** ID of the site the style guide belongs to. */
@@ -3757,6 +3908,12 @@ export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
3757
3908
  at?: number;
3758
3909
  /** Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path. */
3759
3910
  ref?: string;
3911
+ /**
3912
+ * Stable identifier for the page's content, such as the ID of the record it is generated from. The page's ID is derived from it, so re-inserting a deleted page with the same key restores its ID and links to it keep working. The same key gives the same page ID in every space, including duplicated spaces. To change a page that exists, use `update_page`: an insert whose key matches an existing page, or another insert in the batch, is rejected, so deleting a page and re-inserting its key must be done in separate requests. A re-created page takes over the old page's comments, redirects, insights and history. When two change requests insert the same key, merging both keeps only one of the pages, without a conflict.
3913
+ * @minLength 1
3914
+ * @maxLength 255
3915
+ */
3916
+ stableKey?: string;
3760
3917
  /** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
3761
3918
  document: Document;
3762
3919
  };
@@ -3815,13 +3972,83 @@ export interface ChangeRequestContentChangeInsertFiles {
3815
3972
  contentType?: string;
3816
3973
  })[];
3817
3974
  }
3975
+ /**
3976
+ * Insert a page whose content GitBook generates from a source instead of a document: an OpenAPI spec of the organization, rendered as an API reference. GitBook replaces the page, at its position, with the pages it generates and regenerates them whenever the source changes.
3977
+ * @example {"operation":"insert_computed_page","title":"API reference","computed":{"type":"builtin:openapi","props":{"models":true},"dependencies":{"spec":{"ref":{"kind":"openapi","spec":"my-api"}}}}}
3978
+ */
3979
+ export interface ChangeRequestContentChangeInsertComputedPage {
3980
+ operation: "insert_computed_page";
3981
+ /** Parameters for an OpenAPI computed revision */
3982
+ computed: ComputedContentSourceRevisionOpenAPI;
3983
+ /**
3984
+ * Title of the page, only shown in the editor since the generated pages take its place. Defaults to "OpenAPI".
3985
+ * @minLength 1
3986
+ */
3987
+ title?: string;
3988
+ /** ID of the parent page to insert the page into, so the generated pages are nested under it. If omitted, the page is inserted at the root. */
3989
+ into?: string;
3990
+ /**
3991
+ * Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
3992
+ * @min 0
3993
+ */
3994
+ at?: number;
3995
+ }
3996
+ /**
3997
+ * Create reusable content (snippets shared by several pages) in the change request. A markdown document includes one as `{% include "/reusable-content/<reusableContentId>" %}` — use a `ref` to include it from a page in the same batch, or read the generated IDs from `insertedReusableContents`.
3998
+ * @example {"operation":"insert_reusable_contents","reusableContents":[{"ref":"disclaimer","title":"Disclaimer","document":{"markdown":"{% hint style=\"warning\" %}\nThis feature is in beta.\n{% endhint %}\n"}}]}
3999
+ */
4000
+ export interface ChangeRequestContentChangeInsertReusableContents {
4001
+ operation: "insert_reusable_contents";
4002
+ /**
4003
+ * @maxItems 20
4004
+ * @minItems 1
4005
+ */
4006
+ reusableContents: {
4007
+ /** Temporary local reference for the reusable content, used only for the lifetime of this request and never persisted. Pages in the same batch can include it by its ref (e.g. `{% include "./<ref>" %}`), which resolves to the reusable content's ID at apply time — regardless of operation order. A ref must be unique among the reusable content refs of the batch. */
4008
+ ref?: string;
4009
+ /**
4010
+ * Title of the reusable content, shown when picking it in the editor.
4011
+ * @minLength 1
4012
+ * @maxLength 100
4013
+ */
4014
+ title: string;
4015
+ /** Body of the reusable content. */
4016
+ document: Document;
4017
+ }[];
4018
+ }
4019
+ /**
4020
+ * Update an existing reusable content's title and/or document. Its ID is unchanged, so every page including it shows the update.
4021
+ * @example {"operation":"update_reusable_content","reusableContent":"reusable_content_id","title":"Beta disclaimer"}
4022
+ */
4023
+ export interface ChangeRequestContentChangeUpdateReusableContent {
4024
+ operation: "update_reusable_content";
4025
+ /** ID of the reusable content to update. */
4026
+ reusableContent: string;
4027
+ /**
4028
+ * New title of the reusable content. Omit to keep the current title.
4029
+ * @minLength 1
4030
+ * @maxLength 100
4031
+ */
4032
+ title?: string;
4033
+ /** New body of the reusable content. Omit to keep the current body. */
4034
+ document?: Document;
4035
+ }
4036
+ /**
4037
+ * Delete an existing reusable content from the change request.
4038
+ * @example {"operation":"delete_reusable_content","reusableContent":"reusable_content_id"}
4039
+ */
4040
+ export interface ChangeRequestContentChangeDeleteReusableContent {
4041
+ operation: "delete_reusable_content";
4042
+ /** ID of the reusable content to delete. */
4043
+ reusableContent: string;
4044
+ }
3818
4045
  export interface ChangeRequestContentUpdatePageRef {
3819
4046
  /** Type of Object, always equals to "page". */
3820
4047
  object: "page";
3821
4048
  /** Unique identifier of the page. */
3822
4049
  id: string;
3823
4050
  urls: {
3824
- /** API URL to fetch the page's full, normalized content. */
4051
+ /** API URL to fetch the page's full, normalized content. For a computed page, it reads the page as stored (`computed=false`), since the computed content replaces the page with the pages it generates. */
3825
4052
  location: URL;
3826
4053
  };
3827
4054
  }
@@ -3856,6 +4083,8 @@ export interface ChangeRequestContentUpdate {
3856
4083
  changes: ChangeRequestContentUpdateChange[];
3857
4084
  /** Files created by the `insert_files` changes in this batch, in the order they were inserted. Use their IDs to reference them from a document. */
3858
4085
  insertedFiles?: RevisionFile[];
4086
+ /** Reusable contents created by the `insert_reusable_contents` changes in this batch, in the order they were inserted. Use their IDs to include them from a document. */
4087
+ insertedReusableContents?: RevisionReusableContent[];
3859
4088
  }
3860
4089
  export interface ChangedRevisionPage {
3861
4090
  id: string;
@@ -4009,13 +4238,46 @@ export interface RevisionSemanticChangeTagDeleted {
4009
4238
  }
4010
4239
  export interface RevisionTagChangeAttributes {
4011
4240
  label?: ChangeAttributeString;
4241
+ group?: ChangeAttributeString;
4242
+ parent?: ChangeAttributeString;
4012
4243
  }
4013
4244
  export interface RevisionSemanticChangeTagEdited {
4014
4245
  type: "tag_edited";
4015
4246
  tag: ChangedRevisionTag;
4016
4247
  attributes: RevisionTagChangeAttributes;
4017
4248
  }
4018
- export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited | RevisionSemanticChangeTagCreated | RevisionSemanticChangeTagDeleted | RevisionSemanticChangeTagEdited;
4249
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4250
+ export interface RevisionTagGroup {
4251
+ /** Immutable group identifier, unique within the revision. */
4252
+ slug: string;
4253
+ /** Display name of the group. */
4254
+ label: string;
4255
+ /** Parent group slug. Omitted for root groups. */
4256
+ parent?: string;
4257
+ /** Lexicographic sibling sort key. Break ties using the slug. */
4258
+ orderIndex: string;
4259
+ }
4260
+ export interface RevisionSemanticChangeTagGroupCreated {
4261
+ type: "tag_group_created";
4262
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4263
+ tagGroup: RevisionTagGroup;
4264
+ }
4265
+ export interface RevisionSemanticChangeTagGroupEdited {
4266
+ type: "tag_group_edited";
4267
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4268
+ tagGroup: RevisionTagGroup;
4269
+ attributes: {
4270
+ label?: ChangeAttributeString;
4271
+ parent?: ChangeAttributeString;
4272
+ orderIndex?: ChangeAttributeString;
4273
+ };
4274
+ }
4275
+ export interface RevisionSemanticChangeTagGroupDeleted {
4276
+ type: "tag_group_deleted";
4277
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4278
+ tagGroup: RevisionTagGroup;
4279
+ }
4280
+ export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited | RevisionSemanticChangeTagCreated | RevisionSemanticChangeTagDeleted | RevisionSemanticChangeTagEdited | RevisionSemanticChangeTagGroupCreated | RevisionSemanticChangeTagGroupEdited | RevisionSemanticChangeTagGroupDeleted;
4019
4281
  export interface RevisionSemanticChanges {
4020
4282
  /** The change request object that initiated the changes in the case of a merge revision. */
4021
4283
  mergedFrom?: ChangeRequest;
@@ -4031,6 +4293,8 @@ export interface UpdateCommentReplySchema {
4031
4293
  /** Reactions to remove from the comment. */
4032
4294
  removedReactions?: string[];
4033
4295
  }
4296
+ /** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
4297
+ export type MemberDisabled = false | MemberDisabledReason;
4034
4298
  export interface OrganizationMember {
4035
4299
  /** Type of Object, always equals to "member" */
4036
4300
  object: "member";
@@ -4039,8 +4303,8 @@ export interface OrganizationMember {
4039
4303
  /** The role of a member in an organization, null for guests */
4040
4304
  role: MemberRoleOrGuest;
4041
4305
  user: User;
4042
- /** Whatever the membership of this user is disabled and prevent them from accessing content. */
4043
- disabled: boolean;
4306
+ /** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
4307
+ disabled: MemberDisabled;
4044
4308
  /** Date at which the user joined the organization. */
4045
4309
  joinedAt: Timestamp;
4046
4310
  /** Date at which the user was last seen active in the organization. */
@@ -4325,6 +4589,8 @@ export interface Organization {
4325
4589
  sso?: boolean;
4326
4590
  /** If true, the organization is configured to use all our AI features. */
4327
4591
  ai?: boolean;
4592
+ /** Whether the master AI setting is turned on, regardless of plan availability. Contract overrides forcing AI off take precedence. */
4593
+ aiPreference?: boolean;
4328
4594
  /** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4329
4595
  aiSettings?: OrganizationAISettings;
4330
4596
  /** Whether AI features have been paused automatically due to lack of AI credits. */
@@ -4374,14 +4640,6 @@ export interface Organization {
4374
4640
  /** A short description giving context on the reason for the block. */
4375
4641
  reason: BlockReason;
4376
4642
  };
4377
- internal_billingMigration?: {
4378
- /** When we will upgrade the organization onto new pricing, if they haven't already. */
4379
- deadline?: Timestamp;
4380
- /** A discount the organization may have received thanks to migrating early. */
4381
- discountPercent?: number;
4382
- /** The expiration date of the discount, after wich regular pricing resumes. */
4383
- discountEndDate?: Timestamp;
4384
- };
4385
4643
  /** The set of permissions for the organization */
4386
4644
  permissions: {
4387
4645
  /** Can the user view the organization. */
@@ -5136,6 +5394,8 @@ export interface Site {
5136
5394
  type: SiteType;
5137
5395
  /** The currently applied type of the site. For example, frozen sites will have this set to Basic. */
5138
5396
  appliedType: SiteType;
5397
+ /** Who unpublished this site last. Cleared when the site is published again. */
5398
+ unpublishedBy?: "user" | "system";
5139
5399
  /** Title of the site */
5140
5400
  title: SiteTitle;
5141
5401
  icon?: CustomizationFavicon | null;
@@ -5728,6 +5988,8 @@ export interface SiteSection {
5728
5988
  default?: boolean;
5729
5989
  /** Whether the site section is draft and not live. */
5730
5990
  draft: boolean;
5991
+ /** Whether the site section is hidden. It is hidden when all of its site spaces are hidden, in which case it is not shown in the site's navigation. */
5992
+ hidden?: boolean;
5731
5993
  /** Path to the section on the site */
5732
5994
  path: SiteSectionPath;
5733
5995
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
@@ -5766,6 +6028,8 @@ export interface SiteSectionGroup {
5766
6028
  * @deprecated
5767
6029
  */
5768
6030
  sections: SiteSection[];
6031
+ /** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor. */
6032
+ condition?: Expression;
5769
6033
  /** ID of the parent section group this group belongs to */
5770
6034
  sectionGroup?: string;
5771
6035
  /** Whether the site section group is draft and not live. */
@@ -6328,43 +6592,15 @@ export type BillingUpgrade = {
6328
6592
  } | {
6329
6593
  result: "preview";
6330
6594
  invoice: BillingInvoicePreview;
6331
- } | {
6332
- result: "upgraded";
6333
- /** Credit balance after an accepted bundle change, including grants pending webhook synchronization. */
6334
- creditBalance?: BillingCreditBalance;
6335
- } | {
6336
- result: "downgraded";
6337
- } | {
6338
- result: "interval_changed";
6339
- };
6340
- export interface MigrateOrganizationParameters {
6341
- /** The desired billing interval */
6342
- interval: BillingInterval;
6343
- /** The new product to upgrade to */
6344
- product: "free_2024" | "plus_2024" | "pro_2024";
6345
- /** Changes to apply during a subscription upgrade or downgrade */
6346
- changes: SubscriptionChanges;
6347
- }
6348
- export interface Error {
6349
- error: {
6350
- /** @format int32 */
6351
- code: number;
6352
- message: string;
6353
- };
6354
- }
6355
- export interface BillingDiscount {
6356
- /** How many months the discount will last */
6357
- duration: number;
6358
- /** Percent that will be deducted from the subtotal of the invoice */
6359
- percentOff: number;
6360
- }
6361
- export interface SitePageviews {
6362
- object: "site-pageviews";
6363
- /** The identifier of the site */
6364
- siteId: string;
6365
- /** Number of pageviews in the past 30 days */
6366
- pageviews: number;
6367
- }
6595
+ } | {
6596
+ result: "upgraded";
6597
+ /** Credit balance after an accepted bundle change, including grants pending webhook synchronization. */
6598
+ creditBalance?: BillingCreditBalance;
6599
+ } | {
6600
+ result: "downgraded";
6601
+ } | {
6602
+ result: "interval_changed";
6603
+ };
6368
6604
  export interface BillingPortal {
6369
6605
  /** URL to the billing portal for an organization */
6370
6606
  url: string;
@@ -6505,6 +6741,47 @@ export interface OrganizationSAMLProvider {
6505
6741
  location: string;
6506
6742
  };
6507
6743
  }
6744
+ /**
6745
+ * Name of the SCIM connection, shown to organization admins.
6746
+ * @minLength 1
6747
+ * @maxLength 100
6748
+ */
6749
+ export type SCIMConnectionLabel = string;
6750
+ /** A SCIM connection through which an identity provider provisions organization members. */
6751
+ export interface OrganizationSCIMConnection {
6752
+ /** The object type, which is always "scim-connection" */
6753
+ object: "scim-connection";
6754
+ /** Unique identifier of the SCIM connection */
6755
+ id: string;
6756
+ /** Name of the SCIM connection, shown to organization admins. */
6757
+ label: SCIMConnectionLabel;
6758
+ /** Identity provider that provisions members through the SCIM connection. */
6759
+ provider: SCIMConnectionProvider;
6760
+ /** SCIM base URL to configure in the identity provider */
6761
+ baseURL: URL;
6762
+ /** Last characters of the current token, to identify it */
6763
+ tokenHint: string;
6764
+ /** Date the current token was created */
6765
+ tokenCreatedAt: Timestamp;
6766
+ /** Date of the last request authenticated with the token */
6767
+ lastUsedAt?: Timestamp;
6768
+ /** Date of creation */
6769
+ createdAt: Timestamp;
6770
+ /** Date of the last update */
6771
+ updatedAt: Timestamp;
6772
+ /** URLs associated with the object */
6773
+ urls: {
6774
+ /** URL of the SCIM connection in the API */
6775
+ location: URL;
6776
+ };
6777
+ }
6778
+ /** A SCIM connection with its token, returned only when the token is created. */
6779
+ export interface OrganizationSCIMConnectionWithToken {
6780
+ /** A SCIM connection through which an identity provider provisions organization members. */
6781
+ connection: OrganizationSCIMConnection;
6782
+ /** Bearer token to configure in the identity provider. It can't be retrieved again. */
6783
+ token: string;
6784
+ }
6508
6785
  export interface OrganizationSSOProviderLogin {
6509
6786
  /** Unique identifier for the provider. */
6510
6787
  id: string;
@@ -6526,14 +6803,7 @@ export interface OrganizationUsageCollections {
6526
6803
  total: number;
6527
6804
  }
6528
6805
  /** Sites usage metrics of an organization */
6529
- export type OrganizationUsageSites = {
6530
- /** Count of all sites */
6531
- total: number;
6532
- /** Count of all legacy basic sites */
6533
- legacyBasic: number;
6534
- /** Count of all legacy premium sites */
6535
- legacyPremium: number;
6536
- } | {
6806
+ export interface OrganizationUsageSites {
6537
6807
  /** Count of all sites */
6538
6808
  total: number;
6539
6809
  /** Count of all basic sites */
@@ -6544,7 +6814,7 @@ export type OrganizationUsageSites = {
6544
6814
  ultimate: number;
6545
6815
  /** Count of all sponsored sites */
6546
6816
  sponsored: number;
6547
- };
6817
+ }
6548
6818
  /** Team members usage metrics of an organization */
6549
6819
  export interface OrganizationUsageTeams {
6550
6820
  /** Count of all teams */
@@ -6552,9 +6822,20 @@ export interface OrganizationUsageTeams {
6552
6822
  }
6553
6823
  /** Members usage metrics of an organization */
6554
6824
  export interface OrganizationUsageMembers {
6555
- /** Count of all members */
6825
+ /** Count of all members, including disabled ones */
6556
6826
  total: number;
6557
- /** Count of all paid seats */
6827
+ /** Count of members that are not disabled */
6828
+ active: number;
6829
+ /** Count of disabled members, by the reason they are disabled */
6830
+ disabled: {
6831
+ billing: number;
6832
+ scim: number;
6833
+ admin: number;
6834
+ };
6835
+ /**
6836
+ * Count of paid seats. On the Free plan, it includes members disabled for billing, since
6837
+ * upgrading re-enables them. On paid plans, it only includes active members.
6838
+ */
6558
6839
  seats: number;
6559
6840
  /** Count of all admins */
6560
6841
  admin: number;
@@ -7085,6 +7366,13 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
7085
7366
  location: string;
7086
7367
  };
7087
7368
  };
7369
+ export interface Error {
7370
+ error: {
7371
+ /** @format int32 */
7372
+ code: number;
7373
+ message: string;
7374
+ };
7375
+ }
7088
7376
  /** 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. */
7089
7377
  export type SiteAdaptiveRegions = Record<any, {
7090
7378
  /** ISO 3166-1 alpha-2 codes of the countries in the region. */
@@ -7444,6 +7732,17 @@ export interface PublishedContentSite {
7444
7732
  };
7445
7733
  scripts: SiteIntegrationScript[];
7446
7734
  }
7735
+ /** Steps to set up a site, each completed or not from the site's current data. */
7736
+ export interface SiteSetup {
7737
+ /** Every setup step, in order. Empty once the site has been published, which ends the setup even if other steps are not completed. */
7738
+ steps: {
7739
+ /** A step of the setup of a site, in the order they are done. */
7740
+ id: SiteSetupStepId;
7741
+ completed: boolean;
7742
+ /** How to complete the step. Only present when it is not completed. */
7743
+ action?: string;
7744
+ }[];
7745
+ }
7447
7746
  /** 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. */
7448
7747
  export interface SiteChangeRequestMember {
7449
7748
  object: "site-change-request-member";
@@ -7908,6 +8207,37 @@ export type SiteTriageFilterConnections = string;
7908
8207
  * @maxLength 256
7909
8208
  */
7910
8209
  export type SiteFindingTitle = string;
8210
+ /**
8211
+ * Serving redirect
8212
+ * The live redirect serving a `broken-link` finding's path.
8213
+ */
8214
+ export interface SiteFindingServingRedirect {
8215
+ /** ID of the redirect. */
8216
+ redirect: string;
8217
+ /** Whether a wildcard redirect covers the path rather than one at the path itself. Reopening the finding would delete it, so `reopen` isn't offered. */
8218
+ wildcard: boolean;
8219
+ /** Whether GitBook created the redirect on its own. */
8220
+ createdByAgent: boolean;
8221
+ }
8222
+ /**
8223
+ * Available action
8224
+ * An action a finding allows now, with the site permission it needs.
8225
+ */
8226
+ export interface SiteFindingAvailableAction {
8227
+ /**
8228
+ * An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
8229
+ * - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
8230
+ * - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
8231
+ * - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
8232
+ * - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
8233
+ * - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
8234
+ * - `ignore` dismisses it.
8235
+ * - `restore` reopens a dismissed finding.
8236
+ */
8237
+ action: SiteFindingAction;
8238
+ /** Site permission the action needs. */
8239
+ permission: "edit" | "admin";
8240
+ }
7911
8241
  /**
7912
8242
  * The source path to redirect from.
7913
8243
  * @maxLength 512
@@ -7929,20 +8259,22 @@ export interface SiteFindingBrokenLinkAction {
7929
8259
  captureWildcard?: boolean;
7930
8260
  destination?: SiteRedirectInputDestinationPath;
7931
8261
  }
7932
- /** 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. */
8262
+ /** Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type. */
7933
8263
  export interface SiteFindingOutboundLink {
7934
8264
  /**
7935
- * The external URL that fails to resolve.
8265
+ * The external URL that fails. Absent when `host` is set.
7936
8266
  * @format uri
7937
8267
  */
7938
- url: string;
7939
- /** Current health status of the URL for this site. */
7940
- status: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
8268
+ url?: string;
8269
+ /** The domain that doesn't resolve, set instead of `url` when the finding covers every link to that domain on the site. */
8270
+ host?: string;
8271
+ /** Current health status of the URL or domain for this site. */
8272
+ status?: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
7941
8273
  /** Classification of the confirmed failure. */
7942
8274
  failureKind?: "client-error" | "server-error" | "redirect" | "dns" | "tls" | "connection" | "timeout";
7943
8275
  /** HTTP status code of the last observation, when one was received. */
7944
8276
  httpStatus?: number;
7945
- /** When the URL was last observed over HTTP. */
8277
+ /** When the URL or domain was last observed. */
7946
8278
  checkedAt?: Timestamp;
7947
8279
  }
7948
8280
  export interface SiteFinding {
@@ -7986,9 +8318,23 @@ export interface SiteFinding {
7986
8318
  description: JSONDocument;
7987
8319
  /** Whether an AI agent should be able to fix this finding directly */
7988
8320
  autoFixable: boolean;
8321
+ /** What GitBook did on its own to resolve the finding. Null when it never acted on the finding. */
8322
+ autoResolution: SiteFindingAutoResolution | null;
8323
+ /**
8324
+ * Where a link finding stands, from its status and what GitBook did with it.
8325
+ * - `open` needs a fix.
8326
+ * - `awaiting-approval` has a redirect GitBook drafted at its path, waiting to be approved or rejected.
8327
+ * - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
8328
+ * - `ignored` was dismissed.
8329
+ */
8330
+ state?: SiteFindingState;
8331
+ /** The live redirect serving a `broken-link` finding's path. */
8332
+ servingRedirect?: SiteFindingServingRedirect;
8333
+ /** Actions the finding allows now, applied with `applySiteFindingAction`. */
8334
+ actions?: SiteFindingAvailableAction[];
7989
8335
  /** 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. */
7990
8336
  brokenLinkAction?: SiteFindingBrokenLinkAction;
7991
- /** 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. */
8337
+ /** Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type. */
7992
8338
  outboundLink?: SiteFindingOutboundLink;
7993
8339
  createdAt: Timestamp;
7994
8340
  updatedAt: Timestamp;
@@ -8042,6 +8388,13 @@ export interface SiteQuestionStatsTypes {
8042
8388
  export type SiteQuestionStatsChannelTypes = Record<string, number>;
8043
8389
  /** Count of answers by site channel ID. */
8044
8390
  export type SiteQuestionStatsChannels = Record<string, number>;
8391
+ /** Count of answers by visitor type. */
8392
+ export interface SiteQuestionStatsVisitorTypes {
8393
+ human: number;
8394
+ agent: number;
8395
+ bot: number;
8396
+ unknown: number;
8397
+ }
8045
8398
  /** Aggregated stats for questions and linked answers. */
8046
8399
  export interface SiteQuestionStats {
8047
8400
  /** Total count of questions included in the aggregation. */
@@ -8058,6 +8411,8 @@ export interface SiteQuestionStats {
8058
8411
  channelTypes: SiteQuestionStatsChannelTypes;
8059
8412
  /** Count of answers by site channel ID. */
8060
8413
  channels: SiteQuestionStatsChannels;
8414
+ /** Count of answers by visitor type. */
8415
+ visitorTypes: SiteQuestionStatsVisitorTypes;
8061
8416
  /**
8062
8417
  * Weekly count of related question answers for the past 3 months.
8063
8418
  * @maxItems 13
@@ -8517,6 +8872,8 @@ export interface SiteQuestionAnswer {
8517
8872
  /** ID of the associated site channel when the answer originates from a configurable channel. Null if the channel has been deleted. */
8518
8873
  id: string | null;
8519
8874
  };
8875
+ /** Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API. */
8876
+ visitorType: SiteQuestionVisitorType;
8520
8877
  createdAt: Timestamp;
8521
8878
  updatedAt?: Timestamp;
8522
8879
  /** URLs associated with the site question answer. */
@@ -8775,6 +9132,13 @@ export interface AIToolCallArchiveChangeRequest {
8775
9132
  /** Why the agent gave up on implementing the change request. */
8776
9133
  reason: string;
8777
9134
  }
9135
+ export interface AIToolCallMergeChangeRequest {
9136
+ tool: "mergeChangeRequest";
9137
+ /** The ID of the space the change request belongs to. */
9138
+ spaceId: string;
9139
+ /** The ID of the change request that was merged. */
9140
+ changeRequestId: string;
9141
+ }
8778
9142
  export interface AIToolCallComment {
8779
9143
  tool: "comment";
8780
9144
  /** The ID of the space being commented. */
@@ -8841,6 +9205,32 @@ export interface AIToolCallCheckContentImport {
8841
9205
  /** Number of pages the import has discovered so far. */
8842
9206
  totalPages: number;
8843
9207
  }
9208
+ export interface AIToolCallImportOpenAPISpec {
9209
+ tool: "importOpenAPISpec";
9210
+ /** The ID of the space the API reference is added to. */
9211
+ spaceId: string;
9212
+ /** The ID of the change request the API reference is added to. */
9213
+ changeRequestId: string;
9214
+ /** The slug of the OpenAPI spec the reference is generated from. */
9215
+ specSlug: string;
9216
+ /** The URL the spec is imported from, when importing from a URL. */
9217
+ url?: string;
9218
+ /** Name of the attached file the spec is imported from, when importing a file. */
9219
+ file?: string;
9220
+ }
9221
+ export interface AIToolCallSiteSetupStep {
9222
+ tool: "siteSetupStep";
9223
+ /** A step of the setup of a site, in the order they are done. */
9224
+ step: SiteSetupStepId;
9225
+ /**
9226
+ * Where the setup step stands in the conversation.
9227
+ * * `current`: The step is being worked on.
9228
+ * * `done`: The step is completed.
9229
+ * * `skipped`: The user skipped the step.
9230
+ * * `pending`: The step is not started: it waits again after the user went back to an earlier step.
9231
+ */
9232
+ status: "current" | "done" | "skipped" | "pending";
9233
+ }
8844
9234
  /** 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. */
8845
9235
  export interface AIToolCallStartBackgroundAgent {
8846
9236
  tool: "startBackgroundAgent";
@@ -8878,7 +9268,7 @@ export interface AIToolCallOther {
8878
9268
  /** Summary of a generic tool call. */
8879
9269
  summary: AIToolCallOtherSummary;
8880
9270
  }
8881
- 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;
9271
+ 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 | AIToolCallMergeChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallImportOpenAPISpec | AIToolCallSiteSetupStep | AIToolCallStartBackgroundAgent | AIToolCallMCP | AIToolCallOther;
8882
9272
  export interface Timerange {
8883
9273
  start: Timestamp;
8884
9274
  end: Timestamp;
@@ -8997,6 +9387,8 @@ export interface AIMessage {
8997
9387
  * @format date-time
8998
9388
  */
8999
9389
  createdAt?: string;
9390
+ /** The identifier the client gave the message when it sent it. Absent on messages the agent wrote, and on messages sent without one. */
9391
+ clientMessageId?: string;
9000
9392
  }
9001
9393
  export type SiteQuestionAnswerWithResponse = SiteQuestionAnswer & {
9002
9394
  response: AIMessage;
@@ -9069,8 +9461,8 @@ export interface UserSitePermission {
9069
9461
  user: User;
9070
9462
  /** The origin that enforced the effective permission level for a user in a site. */
9071
9463
  origin: UserSitePermissionOrigin;
9072
- /** Whether the user is disabled */
9073
- disabled: boolean;
9464
+ /** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
9465
+ disabled: MemberDisabled;
9074
9466
  /** Date at which the user was last seen */
9075
9467
  lastSeenAt?: Timestamp;
9076
9468
  }
@@ -9093,6 +9485,11 @@ export interface AIMessageInput {
9093
9485
  /** Context about the current user sending a message. */
9094
9486
  context?: AIMessageContext;
9095
9487
  attachments?: AIAttachment[];
9488
+ /**
9489
+ * Identifier the client gives the message it sends, echoed on the message the agent adds to the conversation, so the client can tell its own message apart from any other.
9490
+ * @maxLength 64
9491
+ */
9492
+ clientMessageId?: string;
9096
9493
  }
9097
9494
  /** Description of a tool that can be called from an AI agent. */
9098
9495
  export interface AIToolDefinition {
@@ -9222,6 +9619,19 @@ export interface AIStreamResponseCompaction {
9222
9619
  stepIndex: number;
9223
9620
  }
9224
9621
  export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseStepStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion | AIStreamResponseAttachment | AIStreamResponseCompaction;
9622
+ /** Settings for how GitBook resolves the broken links it finds on a site. */
9623
+ export interface SiteSettingsBrokenLinks {
9624
+ /** Whether GitBook resolves broken links automatically. */
9625
+ autoResolve: boolean;
9626
+ /**
9627
+ * How much GitBook may do on its own when it resolves broken links automatically. GitBook never
9628
+ * applies a fix it isn't sure about, at any level.
9629
+ * - `suggest-fixes` drafts fixes for approval and applies none.
9630
+ * - `fix-clear-matches` applies the clearest fixes and drafts the less certain ones for approval.
9631
+ * - `fix-close-matches` applies the clear and the close fixes.
9632
+ */
9633
+ autonomyLevel: SiteSettingsBrokenLinksAutonomyLevel;
9634
+ }
9225
9635
  export interface SiteAgentSettingsInput {
9226
9636
  /** Settings related to scanning for a site. */
9227
9637
  scans: {
@@ -9237,9 +9647,13 @@ export interface SiteAgentSettingsInput {
9237
9647
  editing: {
9238
9648
  customInstructions: JSONDocument;
9239
9649
  };
9650
+ /** Settings for how GitBook resolves the broken links it finds on a site. */
9651
+ brokenLinks?: SiteSettingsBrokenLinks;
9240
9652
  }
9241
9653
  export type SiteAgentSettings = {
9242
9654
  object: "site-agent-settings";
9655
+ /** Settings for how GitBook resolves the broken links it finds on a site. */
9656
+ brokenLinks: SiteSettingsBrokenLinks;
9243
9657
  updatedAt?: Timestamp;
9244
9658
  /** Identifier of the member who last updated the settings. */
9245
9659
  updatedBy?: string;
@@ -9262,6 +9676,11 @@ export interface SiteStyleguideRun {
9262
9676
  createdAt: Timestamp;
9263
9677
  createdBy: User;
9264
9678
  }
9679
+ /**
9680
+ * User agent of the visitor.
9681
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
9682
+ */
9683
+ export type SiteInsightsUserAgent = string;
9265
9684
  /** Analytics info on the GitBook's site session. */
9266
9685
  export type SiteInsightsEventSession = SiteInsightsSession & {
9267
9686
  /** The visitors cookies. */
@@ -9272,10 +9691,10 @@ export type SiteInsightsEventSession = SiteInsightsSession & {
9272
9691
  */
9273
9692
  ip?: string;
9274
9693
  /**
9275
- * User-agent of the visitor.
9694
+ * User agent of the visitor.
9276
9695
  * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
9277
9696
  */
9278
- userAgent: string;
9697
+ userAgent: SiteInsightsUserAgent;
9279
9698
  /**
9280
9699
  * Language of the visitor.
9281
9700
  * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
@@ -9452,11 +9871,21 @@ export interface SiteInsightsQueryDateTimeColumn {
9452
9871
  column: "datetime";
9453
9872
  interval?: "hour" | "day" | "week" | "month";
9454
9873
  }
9455
- /** Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
9874
+ /** Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
9456
9875
  export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
9457
9876
  column: "dayOfWeek";
9877
+ /**
9878
+ * IANA time zone the event is read in, UTC when omitted.
9879
+ * @example "Europe/Paris"
9880
+ */
9881
+ timezone?: string;
9458
9882
  } | {
9459
9883
  column: "hourOfDay";
9884
+ /**
9885
+ * IANA time zone the event is read in, UTC when omitted.
9886
+ * @example "Europe/Paris"
9887
+ */
9888
+ timezone?: string;
9460
9889
  } | {
9461
9890
  column: "url";
9462
9891
  } | {
@@ -9757,7 +10186,7 @@ export interface SiteInsightsQueryEventsAggregation {
9757
10186
  where?: SiteInsightsQueryEventsFilter[];
9758
10187
  groupBy?: SiteInsightsQueryEventsColumn[];
9759
10188
  order?: {
9760
- /** Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
10189
+ /** Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
9761
10190
  by: SiteInsightsQueryEventsColumn;
9762
10191
  direction: "asc" | "desc";
9763
10192
  };
@@ -9982,6 +10411,43 @@ export interface SignedURL {
9982
10411
  /** Expiration time of the signed URL */
9983
10412
  expiresAt: Timestamp;
9984
10413
  }
10414
+ export interface APIProfilingSession {
10415
+ object: "api_cpu_profiling_session";
10416
+ /** @format uuid */
10417
+ id: string;
10418
+ status: "active" | "stopped" | "expired";
10419
+ /** The profiler selected for this session. Earlier sessions without this field use CPU profiling. */
10420
+ mode?: "cpu" | "allocations";
10421
+ releaseVersion: string;
10422
+ releaseBuild: string;
10423
+ /** @format date-time */
10424
+ createdAt: string;
10425
+ /** @format date-time */
10426
+ expiresAt: string;
10427
+ /** @format date-time */
10428
+ stoppedAt?: string;
10429
+ startedBy: string;
10430
+ urls: {
10431
+ location: string;
10432
+ };
10433
+ }
10434
+ export interface APICPUProfile {
10435
+ object: "api_cpu_profile" | "api_allocation_profile";
10436
+ mode?: "cpu" | "allocations";
10437
+ /** @format uuid */
10438
+ id: string;
10439
+ instanceId: string;
10440
+ /** @format date-time */
10441
+ startedAt: string;
10442
+ /** @format date-time */
10443
+ endedAt: string;
10444
+ bytes: number;
10445
+ urls: {
10446
+ location: string;
10447
+ /** Download the raw .cpuprofile or .heapprofile for Chrome DevTools. */
10448
+ devtools?: string;
10449
+ };
10450
+ }
9985
10451
  /** The context to send when purging the CDN Cache */
9986
10452
  export interface PurgeCDNCacheContext {
9987
10453
  /** The list of tags to purge */
@@ -10545,6 +11011,8 @@ export interface GitSyncSiteStructureSectionGroup {
10545
11011
  localizedTitle?: LocalizedString128;
10546
11012
  /** Name of the icon */
10547
11013
  icon?: Icon;
11014
+ /** Expression to evaluate */
11015
+ condition?: Expression;
10548
11016
  /** Whether the section group is draft and not live. */
10549
11017
  draft?: boolean;
10550
11018
  /** Section, section group, or external link nodes nested under this group. */
@@ -10957,6 +11425,12 @@ export interface ContentComputeRevisionEventResponse {
10957
11425
  pages?: InputPage[];
10958
11426
  files?: InputFile[];
10959
11427
  }
11428
+ export interface BillingDiscount {
11429
+ /** How many months the discount will last */
11430
+ duration: number;
11431
+ /** Percent that will be deducted from the subtotal of the invoice */
11432
+ percentOff: number;
11433
+ }
10960
11434
  export type APIScope = IntegrationScope | APIIntegrationScope;
10961
11435
  /** Common properties for all Content API tokens. */
10962
11436
  export interface ContentAPIBaseToken {
@@ -10966,6 +11440,8 @@ export interface ContentAPIBaseToken {
10966
11440
  spaces: string[];
10967
11441
  /** Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted. */
10968
11442
  visitorType?: "human" | "agent";
11443
+ /** Whether the visitor is authenticated. Only set for sites with adaptive content enabled when token verification succeeded. */
11444
+ visitorIsAuthenticated?: boolean;
10969
11445
  /** The region containing the country of the visitor for whom the token was generated. Omitted if the country isn't in any region. */
10970
11446
  visitorRegion?: string;
10971
11447
  /** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
@@ -11144,6 +11620,11 @@ export interface APIChannelOrganizationTranslationsGlossary {
11144
11620
  channel: "organization-translations-glossary";
11145
11621
  organization: string;
11146
11622
  }
11623
+ /** Subscription channel for changes in the SCIM connections of an organization. */
11624
+ export interface APIChannelOrganizationSCIMConnections {
11625
+ channel: "organization-scim-connections";
11626
+ organization: string;
11627
+ }
11147
11628
  /** Subscription channel for changes in custom fonts in an organization. */
11148
11629
  export interface APIChannelOrganizationCustomFonts {
11149
11630
  channel: "organization-fonts";
@@ -12153,10 +12634,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12153
12634
  */
12154
12635
  evaluated?: boolean | "deterministic-only";
12155
12636
  /**
12156
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
12157
- * - When set to `true`, the entire document will be deferenced
12158
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
12159
- * @default false
12637
+ * Controls whether references to other content are resolved and expanded.
12638
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
12639
+ * - When set to `true`, all supported content references are expanded.
12640
+ * - When set to `reusable-contents`, only reusable content references are expanded.
12641
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
12160
12642
  */
12161
12643
  dereferenced?: boolean | "reusable-contents";
12162
12644
  /**
@@ -12209,10 +12691,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12209
12691
  */
12210
12692
  evaluated?: boolean | "deterministic-only";
12211
12693
  /**
12212
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
12213
- * - When set to `true`, the entire document will be deferenced
12214
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
12215
- * @default false
12694
+ * Controls whether references to other content are resolved and expanded.
12695
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
12696
+ * - When set to `true`, all supported content references are expanded.
12697
+ * - When set to `reusable-contents`, only reusable content references are expanded.
12698
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
12216
12699
  */
12217
12700
  dereferenced?: boolean | "reusable-contents";
12218
12701
  /**
@@ -12301,7 +12784,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12301
12784
  schema?: "current" | "next";
12302
12785
  }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
12303
12786
  /**
12304
- * @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.
12787
+ * @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. Pass `siteFindingIds` to link the documentation findings this change request fixes. Outbound broken links are resolved by the outbound checker, rather than by merging.
12305
12788
  *
12306
12789
  * @tags change-requests
12307
12790
  * @name CreateChangeRequest
@@ -12316,8 +12799,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12316
12799
  template?: ApplySpaceTemplate;
12317
12800
  /** 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. */
12318
12801
  description?: JSONDocument;
12319
- /** 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. */
12802
+ /**
12803
+ * The site finding this change request fixes. Use `siteFindingIds` instead. The finding's site must contain this space.
12804
+ * @deprecated
12805
+ */
12320
12806
  siteFindingId?: string;
12807
+ /**
12808
+ * Site findings this change request fixes. Each finding's site must contain this space, and the caller must have edit permission on each site. Takes precedence over `siteFindingId` when both are supplied.
12809
+ * @maxItems 25
12810
+ */
12811
+ siteFindingIds?: string[];
12321
12812
  [key: string]: any;
12322
12813
  }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
12323
12814
  /**
@@ -12373,7 +12864,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12373
12864
  };
12374
12865
  }>>;
12375
12866
  /**
12376
- * @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.
12867
+ * @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 `siteFindingIds` to replace the documentation findings linked to the change request. Outbound broken links are resolved by the outbound checker, rather than by merging.
12377
12868
  *
12378
12869
  * @tags change-requests
12379
12870
  * @name UpdateChangeRequestById
@@ -12391,8 +12882,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12391
12882
  */
12392
12883
  links?: ChangeRequestLinkInput[];
12393
12884
  status?: "draft" | "open" | "archived";
12394
- /** 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. */
12885
+ /**
12886
+ * The site finding this change request fixes. Use `siteFindingIds` instead. The finding's site must contain this space. Replaces the whole set of linked findings with this finding. Pass null to unlink all findings.
12887
+ * @deprecated
12888
+ */
12395
12889
  siteFindingId?: string | null;
12890
+ /**
12891
+ * Replaces the linked site findings. Each finding's site must contain this space, and the caller must have edit permission on each site. Pass null or an empty list to unlink all findings. Omit to keep the current links. Takes precedence over `siteFindingId` when both are supplied.
12892
+ * @maxItems 25
12893
+ */
12894
+ siteFindingIds?: any[] | null;
12396
12895
  }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
12397
12896
  /**
12398
12897
  * @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.
@@ -12790,7 +13289,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12790
13289
  computed?: boolean;
12791
13290
  }, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
12792
13291
  /**
12793
- * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
13292
+ * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. **Reusable content** (snippets shared by several pages, Git Sync's `.gitbook/includes/`) is created with `insert_reusable_contents`, changed with `update_reusable_content` and removed with `delete_reusable_content`. A page includes one in markdown as `{% include "/reusable-content/<reusableContentId>" %}`; give a new one a `ref` and a page in the same batch can include it as `{% include "./<ref>" %}`, regardless of operation order. Created reusable contents are listed as `insertedReusableContents` when `compat=false`. An update keeps the ID, so every page including it shows the change. Deleting one leaves the includes in pages unresolved, as in the editor: remove them from those pages too. Reusable content cannot include other reusable content, so an include in its document is dropped. Unlike a link, an include that matches no reusable content of the change request (or of the batch) rejects the batch, since dropping it would remove it from the page silently. **Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "<spec slug>" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `"grouping": "by-operation"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. For change requests with frequent concurrent edits, consider `expectedRevision` to protect against overwriting changes made since your read. If the branch has changed since the supplied revision, the batch is rejected with HTTP 409 and none of the submitted changes are applied. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
12794
13293
  *
12795
13294
  * @tags change-request-content
12796
13295
  * @name UpdateChangeRequestContent
@@ -12799,6 +13298,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12799
13298
  * @secure
12800
13299
  */
12801
13300
  updateChangeRequestContent: (spaceId: EntityId, changeRequestId: EntityId, data: {
13301
+ /**
13302
+ * The saved branch revision on which these changes are based, available in getChangeRequestById's revision field. If the branch has changed, including pending realtime edits, the batch is rejected with 409 and none of the submitted changes are applied. This field is optional and most changes can omit it.
13303
+ * @minLength 1
13304
+ */
13305
+ expectedRevision?: string;
12802
13306
  /**
12803
13307
  * @maxItems 50
12804
13308
  * @minItems 1
@@ -12816,6 +13320,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12816
13320
  code: 404;
12817
13321
  message: string;
12818
13322
  };
13323
+ } | {
13324
+ error: {
13325
+ /** @format int32 */
13326
+ code: 409;
13327
+ message: string;
13328
+ };
12819
13329
  }>>;
12820
13330
  /**
12821
13331
  * @description Returns the full flat list of all pages in the change request's current draft revision, including page groups. Does not include page body content — use the individual page endpoint to fetch content. Use this to get an overview of the draft's page structure before reading or modifying specific pages.
@@ -12921,10 +13431,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12921
13431
  */
12922
13432
  evaluated?: boolean | "deterministic-only";
12923
13433
  /**
12924
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
12925
- * - When set to `true`, the entire document will be deferenced
12926
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
12927
- * @default false
13434
+ * Controls whether references to other content are resolved and expanded.
13435
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
13436
+ * - When set to `true`, all supported content references are expanded.
13437
+ * - When set to `reusable-contents`, only reusable content references are expanded.
13438
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
12928
13439
  */
12929
13440
  dereferenced?: boolean | "reusable-contents";
12930
13441
  /**
@@ -13160,10 +13671,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13160
13671
  */
13161
13672
  evaluated?: boolean | "deterministic-only";
13162
13673
  /**
13163
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
13164
- * - When set to `true`, the entire document will be deferenced
13165
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
13166
- * @default false
13674
+ * Controls whether references to other content are resolved and expanded.
13675
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
13676
+ * - When set to `true`, all supported content references are expanded.
13677
+ * - When set to `reusable-contents`, only reusable content references are expanded.
13678
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
13167
13679
  */
13168
13680
  dereferenced?: boolean | "reusable-contents";
13169
13681
  /**
@@ -13196,10 +13708,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13196
13708
  */
13197
13709
  evaluated?: boolean | "deterministic-only";
13198
13710
  /**
13199
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
13200
- * - When set to `true`, the entire document will be deferenced
13201
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
13202
- * @default false
13711
+ * Controls whether references to other content are resolved and expanded.
13712
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
13713
+ * - When set to `true`, all supported content references are expanded.
13714
+ * - When set to `reusable-contents`, only reusable content references are expanded.
13715
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
13203
13716
  */
13204
13717
  dereferenced?: boolean | "reusable-contents";
13205
13718
  }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
@@ -13232,10 +13745,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13232
13745
  */
13233
13746
  evaluated?: boolean | "deterministic-only";
13234
13747
  /**
13235
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
13236
- * - When set to `true`, the entire document will be deferenced
13237
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
13238
- * @default false
13748
+ * Controls whether references to other content are resolved and expanded.
13749
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
13750
+ * - When set to `true`, all supported content references are expanded.
13751
+ * - When set to `reusable-contents`, only reusable content references are expanded.
13752
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
13239
13753
  */
13240
13754
  dereferenced?: boolean | "reusable-contents";
13241
13755
  /**
@@ -13293,10 +13807,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13293
13807
  */
13294
13808
  evaluated?: boolean | "deterministic-only";
13295
13809
  /**
13296
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
13297
- * - When set to `true`, the entire document will be deferenced
13298
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
13299
- * @default false
13810
+ * Controls whether references to other content are resolved and expanded.
13811
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
13812
+ * - When set to `true`, all supported content references are expanded.
13813
+ * - When set to `reusable-contents`, only reusable content references are expanded.
13814
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
13300
13815
  */
13301
13816
  dereferenced?: boolean | "reusable-contents";
13302
13817
  /**
@@ -13355,10 +13870,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13355
13870
  */
13356
13871
  evaluated?: boolean | "deterministic-only";
13357
13872
  /**
13358
- * Controls whether the document should be deferenced (eference to other content will be resolved and expanded).
13359
- * - When set to `true`, the entire document will be deferenced
13360
- * - When set to `reusable-contents`, only reusable contents will be deferenced.
13361
- * @default false
13873
+ * Controls whether references to other content are resolved and expanded.
13874
+ * - When set to `false`, references are preserved, including reusable content includes in Markdown.
13875
+ * - When set to `true`, all supported content references are expanded.
13876
+ * - When set to `reusable-contents`, only reusable content references are expanded.
13877
+ * When omitted, Markdown responses expand all supported content references, while document responses preserve them.
13362
13878
  */
13363
13879
  dereferenced?: boolean | "reusable-contents";
13364
13880
  }, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
@@ -14745,9 +15261,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14745
15261
  updateMemberInOrganizationById: (organizationId: EntityId, userId: string, data: {
14746
15262
  /** The role of a member in an organization, null for guests */
14747
15263
  role?: MemberRoleOrGuest;
15264
+ /** Disable or re-enable the member. Only members disabled by an admin can be re-enabled. */
15265
+ disabled?: boolean;
14748
15266
  }, params?: RequestParams) => Promise<HttpResponse<OrganizationMember, any>>;
14749
15267
  /**
14750
- * No description
15268
+ * @description Users cannot remove their own membership. Ask another organization admin to remove it.
14751
15269
  *
14752
15270
  * @tags organization-members
14753
15271
  * @name RemoveMemberFromOrganizationById
@@ -15459,6 +15977,130 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15459
15977
  * @secure
15460
15978
  */
15461
15979
  deleteOrganizationSamlProvider: (organizationId: EntityId, samlProviderId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15980
+ /**
15981
+ * No description
15982
+ *
15983
+ * @tags scim
15984
+ * @name ListOrganizationScimConnections
15985
+ * @summary List SCIM connections
15986
+ * @request GET:/orgs/{organizationId}/scim/connections
15987
+ * @secure
15988
+ */
15989
+ listOrganizationScimConnections: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<List & {
15990
+ items: OrganizationSCIMConnection[];
15991
+ }, {
15992
+ error: {
15993
+ /** @format int32 */
15994
+ code: 404;
15995
+ message: string;
15996
+ };
15997
+ }>>;
15998
+ /**
15999
+ * @description Creates a SCIM connection and its token. The token is only returned in this response.
16000
+ *
16001
+ * @tags scim
16002
+ * @name CreateOrganizationScimConnection
16003
+ * @summary Create a SCIM connection
16004
+ * @request POST:/orgs/{organizationId}/scim/connections
16005
+ * @secure
16006
+ */
16007
+ createOrganizationScimConnection: (organizationId: EntityId, data: {
16008
+ /** Name of the SCIM connection, shown to organization admins. */
16009
+ label: SCIMConnectionLabel;
16010
+ /** Identity provider that provisions members through the SCIM connection. */
16011
+ provider: SCIMConnectionProvider;
16012
+ }, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnectionWithToken, {
16013
+ error: {
16014
+ /** @format int32 */
16015
+ code: 400;
16016
+ message: string;
16017
+ };
16018
+ } | {
16019
+ error: {
16020
+ /** @format int32 */
16021
+ code: 404;
16022
+ message: string;
16023
+ };
16024
+ } | {
16025
+ error: {
16026
+ /** @format int32 */
16027
+ code: 412;
16028
+ message: string;
16029
+ };
16030
+ }>>;
16031
+ /**
16032
+ * No description
16033
+ *
16034
+ * @tags scim
16035
+ * @name GetOrganizationScimConnection
16036
+ * @summary Get a SCIM connection by its ID
16037
+ * @request GET:/orgs/{organizationId}/scim/connections/{scimConnectionId}
16038
+ * @secure
16039
+ */
16040
+ getOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnection, {
16041
+ error: {
16042
+ /** @format int32 */
16043
+ code: 404;
16044
+ message: string;
16045
+ };
16046
+ }>>;
16047
+ /**
16048
+ * No description
16049
+ *
16050
+ * @tags scim
16051
+ * @name UpdateOrganizationScimConnection
16052
+ * @summary Update a SCIM connection
16053
+ * @request PATCH:/orgs/{organizationId}/scim/connections/{scimConnectionId}
16054
+ * @secure
16055
+ */
16056
+ updateOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, data: {
16057
+ /** Name of the SCIM connection, shown to organization admins. */
16058
+ label: SCIMConnectionLabel;
16059
+ }, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnection, {
16060
+ error: {
16061
+ /** @format int32 */
16062
+ code: 400;
16063
+ message: string;
16064
+ };
16065
+ } | {
16066
+ error: {
16067
+ /** @format int32 */
16068
+ code: 404;
16069
+ message: string;
16070
+ };
16071
+ }>>;
16072
+ /**
16073
+ * @description Deletes a SCIM connection. Its token stops working immediately.
16074
+ *
16075
+ * @tags scim
16076
+ * @name DeleteOrganizationScimConnection
16077
+ * @summary Delete a SCIM connection
16078
+ * @request DELETE:/orgs/{organizationId}/scim/connections/{scimConnectionId}
16079
+ * @secure
16080
+ */
16081
+ deleteOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<void, {
16082
+ error: {
16083
+ /** @format int32 */
16084
+ code: 404;
16085
+ message: string;
16086
+ };
16087
+ }>>;
16088
+ /**
16089
+ * @description Replaces the token of a SCIM connection. The previous token stops working immediately, and the new token is only returned in this response.
16090
+ *
16091
+ * @tags scim
16092
+ * @name RotateOrganizationScimConnectionToken
16093
+ * @summary Rotate the token of a SCIM connection
16094
+ * @request POST:/orgs/{organizationId}/scim/connections/{scimConnectionId}/token
16095
+ * @secure
16096
+ */
16097
+ rotateOrganizationScimConnectionToken: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnectionWithToken, {
16098
+ error: {
16099
+ /** @format int32 */
16100
+ code: 404;
16101
+ message: string;
16102
+ };
16103
+ }>>;
15462
16104
  /**
15463
16105
  * No description
15464
16106
  *
@@ -15547,7 +16189,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15547
16189
  items: OpenAPISpec[];
15548
16190
  }, any>>;
15549
16191
  /**
15550
- * No description
16192
+ * @description Adds an OpenAPI spec to the organization, from a URL or from its text. The spec is processed asynchronously and no page is created: to publish its API reference in a space, insert a page that renders it with an `insert_computed_page` change, through the `updateChangeRequestContent` operation. That reference fills in once processing completes and is regenerated each time the spec is updated.
15551
16193
  *
15552
16194
  * @tags openapi
15553
16195
  * @name CreateOpenApiSpec
@@ -15584,7 +16226,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15584
16226
  };
15585
16227
  }>>;
15586
16228
  /**
15587
- * No description
16229
+ * @description Creates the organization's OpenAPI spec with this slug, or replaces its source with a new version. The spec is processed asynchronously, and pages that already render it are regenerated once it is. Creating a spec adds no page: to publish its API reference in a space, insert a page that renders it with an `insert_computed_page` change, through the `updateChangeRequestContent` operation.
15588
16230
  *
15589
16231
  * @tags openapi
15590
16232
  * @name CreateOrUpdateOpenApiSpecBySlug
@@ -16349,6 +16991,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16349
16991
  /** 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. */
16350
16992
  subscriptionNotice?: SubscriptionNotice;
16351
16993
  }, any>>;
16994
+ /**
16995
+ * @description Lists the steps to set up a site, from a first edit to publishing, and whether each one is completed. Use it to know what is left to do on a site. Returns no steps once the site has been published.
16996
+ *
16997
+ * @tags sites
16998
+ * @name GetSiteSetup
16999
+ * @summary Get the setup steps of a site
17000
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/setup
17001
+ * @secure
17002
+ */
17003
+ getSiteSetup: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<SiteSetup, {
17004
+ error: {
17005
+ /** @format int32 */
17006
+ code: 400;
17007
+ message: string;
17008
+ };
17009
+ }>>;
16352
17010
  /**
16353
17011
  * @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.
16354
17012
  *
@@ -16645,6 +17303,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16645
17303
  claims?: string;
16646
17304
  /** 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`. */
16647
17305
  country?: string;
17306
+ /** Whether the visitor for which we want to preview the site is signed in, as `visitor.isAuthenticated` reports it. Claims outside `unsigned` already imply a signed-in visitor; set this to preview one that is signed in while carrying no claim. */
17307
+ visitorAuthenticated?: boolean;
16648
17308
  /**
16649
17309
  * Whether to include draft content in the preview. Defaults to true
16650
17310
  * @default true
@@ -16738,7 +17398,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16738
17398
  items: Integration[];
16739
17399
  }, any>>;
16740
17400
  /**
16741
- * @description Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces are blank unless a template is provided.
17401
+ * @description Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).
16742
17402
  *
16743
17403
  * @tags site-spaces
16744
17404
  * @name AddSpaceToSite
@@ -16760,6 +17420,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16760
17420
  draft?: boolean;
16761
17421
  /** Custom home page within an existing space, rendered at the site space's path root instead of the space's default landing page. Providing it when `spaceId` is `null` returns a 400 error. */
16762
17422
  pageId?: string | null;
17423
+ /**
17424
+ * Create the new space without any content, not even a blank page. Useful when the content is about to be populated, for example by an import. Only valid when `spaceId` is `null` and no template is provided.
17425
+ * @default false
17426
+ */
17427
+ empty?: boolean;
16763
17428
  /** Site-specific title override for the variant. Also used as the space title when `spaceId` is `null` and no template is provided. */
16764
17429
  title?: SiteTitle;
16765
17430
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
@@ -16821,6 +17486,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16821
17486
  addSectionGroupToSite: (organizationId: EntityId, siteId: string, data: {
16822
17487
  /** Title of the site section group */
16823
17488
  title: SiteSectionGroupTitle;
17489
+ /** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). */
17490
+ condition?: Expression;
16824
17491
  icon?: Icon | null;
16825
17492
  /** IDs of the sections to be added to the section group */
16826
17493
  sections?: string[];
@@ -16846,6 +17513,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16846
17513
  title?: SiteSectionGroupTitle;
16847
17514
  /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
16848
17515
  localizedTitle?: LocalizedString128;
17516
+ /** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
17517
+ condition?: Expression | null;
16849
17518
  icon?: Icon | null;
16850
17519
  /** Whether the site section group should be kept in draft mode. Setting it to true makes the site section group draft. Setting it to false makes the site section group live. */
16851
17520
  draft?: boolean;
@@ -16863,7 +17532,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16863
17532
  */
16864
17533
  deleteSiteSectionGroupById: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16865
17534
  /**
16866
- * @description Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces are blank unless a template is provided.
17535
+ * @description Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).
16867
17536
  *
16868
17537
  * @tags site-sections
16869
17538
  * @name AddSectionToSite
@@ -16876,6 +17545,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16876
17545
  spaceId: string | null;
16877
17546
  /** Template for the new space when `spaceId` is `null`. Templates that provision organization-level resources, such as OpenAPI specifications, are not supported by this site-scoped operation. */
16878
17547
  template?: ApplySpaceTemplate;
17548
+ /**
17549
+ * Create the new space without any content, not even a blank page. Useful when the content is about to be populated, for example by an import. Only valid when `spaceId` is `null` and no template is provided.
17550
+ * @default false
17551
+ */
17552
+ empty?: boolean;
16879
17553
  /** Section title. Also used as the space title when `spaceId` is `null` and no template is provided. */
16880
17554
  title?: SiteSectionTitle | null;
16881
17555
  icon?: Icon | null;
@@ -16933,6 +17607,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16933
17607
  path?: SiteSectionPath;
16934
17608
  /** ID of the site-space to be used as the default in this section. */
16935
17609
  defaultSiteSpace?: string;
17610
+ /** Whether to hide the site section from the site's navigation. Setting it updates all the site spaces of the section, and site spaces added to a hidden section are hidden too. The default site section cannot be hidden. */
17611
+ hidden?: boolean;
16936
17612
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
16937
17613
  condition?: Expression | null;
16938
17614
  icon?: Icon | null;
@@ -17309,8 +17985,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17309
17985
  url?: string;
17310
17986
  /** Filter findings by estimated severity. */
17311
17987
  severity?: SiteFindingSeverity;
17988
+ /** Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person. */
17989
+ autoResolution?: SiteFindingAutoResolution;
17990
+ /**
17991
+ * Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
17992
+ * @format date-time
17993
+ */
17994
+ autoResolvedAfter?: string;
17312
17995
  /** Filter findings that have at least one associated change request. */
17313
17996
  hasChangeRequests?: boolean;
17997
+ /** Filter link findings by where they stand, for example `awaiting-approval` for broken links with a redirect GitBook drafted. */
17998
+ state?: SiteFindingState;
17314
17999
  /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are returned. */
17315
18000
  source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
17316
18001
  /**
@@ -17339,12 +18024,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17339
18024
  */
17340
18025
  getSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
17341
18026
  /**
17342
- * @description Changes the status of a documentation issue found by GitBook's AI, typically after fixing it (for example via `triggerChangeRequestsForSiteFinding`) or dismissing it as not worth acting on. This does not edit any content itself — it only records the outcome.
18027
+ * @description Changes the status of a documentation issue found by GitBook's AI. Refuses `broken-link` findings, whose status follows the redirects at their path. Deprecated in favour of `applySiteFindingAction`, which applies one of the `actions` a finding lists: `mark-resolved`, `ignore`, `reopen` or `restore`.
17343
18028
  *
17344
18029
  * @tags site-context
17345
18030
  * @name UpdateSiteFindingById
17346
- * @summary Resolve, dismiss, or reopen a documentation issue
18031
+ * @summary Resolve, dismiss, or reopen a documentation issue. (Deprecated) use applySiteFindingAction instead.
17347
18032
  * @request PATCH:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
18033
+ * @deprecated
17348
18034
  * @secure
17349
18035
  */
17350
18036
  updateSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, data: {
@@ -17451,6 +18137,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17451
18137
  }, params?: RequestParams) => Promise<HttpResponse<List & {
17452
18138
  items: ContextRecord[];
17453
18139
  }, any>>;
18140
+ /**
18141
+ * @description Applies one of the `actions` a finding lists, with the site permission it gives: resolve, dismiss or reopen it, or act on a broken link's redirect. Returns 409 when the finding doesn't allow the action now.
18142
+ *
18143
+ * @tags site-context
18144
+ * @name ApplySiteFindingAction
18145
+ * @summary Apply an action to a finding
18146
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/actions
18147
+ * @secure
18148
+ */
18149
+ applySiteFindingAction: (organizationId: EntityId, siteId: string, siteFindingId: string, data: {
18150
+ /**
18151
+ * An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
18152
+ * - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
18153
+ * - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
18154
+ * - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
18155
+ * - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
18156
+ * - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
18157
+ * - `ignore` dismisses it.
18158
+ * - `restore` reopens a dismissed finding.
18159
+ */
18160
+ action: SiteFindingAction;
18161
+ }, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
17454
18162
  /**
17455
18163
  * @description Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.
17456
18164
  *
@@ -17469,6 +18177,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17469
18177
  type?: SiteFindingType[];
17470
18178
  /** Filter findings by estimated severity. */
17471
18179
  severity?: SiteFindingSeverity;
18180
+ /** Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person. */
18181
+ autoResolution?: SiteFindingAutoResolution;
18182
+ /**
18183
+ * Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
18184
+ * @format date-time
18185
+ */
18186
+ autoResolvedAfter?: string;
17472
18187
  /** Filter findings that have at least one associated change request. */
17473
18188
  hasChangeRequests?: boolean;
17474
18189
  /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are counted. */
@@ -17605,6 +18320,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17605
18320
  relevance?: SiteQuestionAnswerRelevance[];
17606
18321
  /** Filter stats by answer channel type. */
17607
18322
  channelType?: SiteChannelType[];
18323
+ /** Filter by whether a person or an AI agent asked the question. */
18324
+ visitorType?: SiteQuestionVisitorType[];
17608
18325
  /** Filter stats by answer resolution. */
17609
18326
  answered?: SiteQuestionAnswerResolution[];
17610
18327
  }, params?: RequestParams) => Promise<HttpResponse<{
@@ -17633,7 +18350,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17633
18350
  usageSettings: SiteTopicUsageSettings;
17634
18351
  }, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
17635
18352
  /**
17636
- * @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `updateSiteFindingById` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
18353
+ * @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `applySiteFindingAction` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
17637
18354
  *
17638
18355
  * @tags site-context
17639
18356
  * @name DeleteSiteTopicFindings
@@ -17662,6 +18379,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17662
18379
  relevance?: SiteQuestionAnswerRelevance[];
17663
18380
  /** Filter questions by answer channel type. */
17664
18381
  channelType?: SiteChannelType[];
18382
+ /** Filter by whether a person or an AI agent asked the question. */
18383
+ visitorType?: SiteQuestionVisitorType[];
17665
18384
  /** Filter questions by answer resolution. */
17666
18385
  answered?: SiteQuestionAnswerResolution[];
17667
18386
  /** Filter questions by associated site topic IDs. */
@@ -17702,6 +18421,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17702
18421
  relevance?: SiteQuestionAnswerRelevance[];
17703
18422
  /** Filter stats by answer channel type. */
17704
18423
  channelType?: SiteChannelType[];
18424
+ /** Filter by whether a person or an AI agent asked the question. */
18425
+ visitorType?: SiteQuestionVisitorType[];
17705
18426
  /** Filter stats by answer resolution. */
17706
18427
  answered?: SiteQuestionAnswerResolution[];
17707
18428
  }, params?: RequestParams) => Promise<HttpResponse<SiteQuestion, any>>;
@@ -17731,6 +18452,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17731
18452
  relevance?: SiteQuestionAnswerRelevance[];
17732
18453
  /** Filter answer sources by answer channel type. */
17733
18454
  channelType?: SiteChannelType[];
18455
+ /** Filter by whether a person or an AI agent asked the question. */
18456
+ visitorType?: SiteQuestionVisitorType[];
17734
18457
  /** Filter answer sources by answer resolution. */
17735
18458
  answered?: SiteQuestionAnswerResolution[];
17736
18459
  }, params?: RequestParams) => Promise<HttpResponse<List & {
@@ -17756,6 +18479,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17756
18479
  relevance?: SiteQuestionAnswerRelevance[];
17757
18480
  /** Filter stats by answer channel type. */
17758
18481
  channelType?: SiteChannelType[];
18482
+ /** Filter by whether a person or an AI agent asked the question. */
18483
+ visitorType?: SiteQuestionVisitorType[];
17759
18484
  /** Filter stats by answer resolution. */
17760
18485
  answered?: SiteQuestionAnswerResolution[];
17761
18486
  }, params?: RequestParams) => Promise<HttpResponse<SiteQuestionStats, any>>;
@@ -17785,6 +18510,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17785
18510
  relevance?: SiteQuestionAnswerRelevance[];
17786
18511
  /** Filter answers by answer channel type. */
17787
18512
  channelType?: SiteChannelType[];
18513
+ /** Filter by whether a person or an AI agent asked the question. */
18514
+ visitorType?: SiteQuestionVisitorType[];
17788
18515
  /** Filter answers by question type. */
17789
18516
  "question.type"?: SiteQuestionType;
17790
18517
  /** Filter answers by associated site topic ID. */
@@ -18182,6 +18909,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18182
18909
  /** Team identifier. Filter the list to members of a specific team. */
18183
18910
  team?: string;
18184
18911
  }, params?: RequestParams) => Promise<HttpResponse<List & {
18912
+ /**
18913
+ * Number of users with a role in the site, guests excluded. It ignores the filters and the pagination of the request.
18914
+ * @min 0
18915
+ */
18916
+ membersCount: number;
18185
18917
  items: UserSitePermission[];
18186
18918
  }, any>>;
18187
18919
  /**
@@ -18365,7 +19097,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18365
19097
  };
18366
19098
  }>>;
18367
19099
  /**
18368
- * @description Replaces the configuration for the AI built into the GitBook editor that helps authors draft, review, and refine content changes. Use this to customize how the AI behaves when assisting authors working on content for this site.
19100
+ * @description Replaces the configuration for the AI built into the GitBook editor that helps authors draft, review, and refine content changes. Use this to customize how the AI behaves when assisting authors working on content for this site. When `brokenLinks` is omitted, the current broken links settings are kept.
18369
19101
  *
18370
19102
  * @tags site-agent-settings
18371
19103
  * @name UpdateSiteAgentSettingsById