@gitbook/api 0.209.0 → 0.210.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
@@ -201,51 +201,6 @@ export declare enum SiteInsightsQueryOperator {
201
201
  export declare enum SiteInsightsPageNotFoundType {
202
202
  Conditional = "conditional"
203
203
  }
204
- export declare enum SiteInsightsVisitorBot {
205
- Unknown = "unknown",
206
- Googlebot = "googlebot",
207
- Bingbot = "bingbot",
208
- Duckduckbot = "duckduckbot",
209
- Facebookbot = "facebookbot",
210
- Applebot = "applebot",
211
- Chatgpt = "chatgpt",
212
- Openai = "openai",
213
- Claude = "claude",
214
- Anthropic = "anthropic",
215
- Gemini = "gemini",
216
- Perplexity = "perplexity",
217
- Cohere = "cohere",
218
- Mistral = "mistral",
219
- Deepseek = "deepseek",
220
- Meta = "meta",
221
- Bytespider = "bytespider",
222
- Ccbot = "ccbot",
223
- Amazonbot = "amazonbot",
224
- Youbot = "youbot",
225
- Cursor = "cursor",
226
- Vscode = "vscode",
227
- ClaudeCode = "claude-code",
228
- Codex = "codex",
229
- Opencode = "opencode",
230
- Gptbot = "gptbot",
231
- Claudebot = "claudebot",
232
- MetaFetcher = "meta-fetcher",
233
- Grok = "grok",
234
- GithubCopilot = "github-copilot",
235
- MetaWebindexer = "meta-webindexer",
236
- MetaAds = "meta-ads",
237
- Duckassist = "duckassist",
238
- AmznSearchbot = "amzn-searchbot",
239
- AmznUser = "amzn-user",
240
- OtherBot = "other-bot",
241
- Parallel = "parallel",
242
- Exa = "exa",
243
- Linkup = "linkup",
244
- VertexAi = "vertex-ai",
245
- Atlassian = "atlassian",
246
- Kapa = "kapa",
247
- Bedrock = "bedrock"
248
- }
249
204
  export declare enum SiteInsightsVisitorOS {
250
205
  Windows = "windows",
251
206
  Macos = "macos",
@@ -393,6 +348,71 @@ export declare enum SiteQuestionAnswerResolution {
393
348
  Partially = "partially",
394
349
  Yes = "yes"
395
350
  }
351
+ /** Whether the visitor who asked was signed in to the site: `authenticated` on a site behind authenticated access, or when they asked with a verified visitor token, and `anonymous` otherwise. Questions asked through the API or a connected channel, and those asked before this was recorded, are neither. */
352
+ export declare enum SiteQuestionVisitorAuthentication {
353
+ Authenticated = "authenticated",
354
+ Anonymous = "anonymous"
355
+ }
356
+ /** Who should act on an answer, derived from what was asked and what the site said. `docs` the site had no answer, or only a weak one, to a question a page could answer for everyone, so the content should be written or fixed; `team` the question needs a decision or clarification from a team beyond the docs, such as product, sales or marketing, for example when the site said something is not supported or only available on another plan; `support` only a person can resolve it, because it concerns the asker's own account, order, data or contract; `none` the site answered it. */
357
+ export declare enum SiteQuestionEscalation {
358
+ Docs = "docs",
359
+ Team = "team",
360
+ Support = "support",
361
+ None = "none"
362
+ }
363
+ /** What the site's content said about the main thing asked, judged from the answer. Unlike `answered`, which measures the assistant, it tells a product limit from a content gap: `covered` the site confirms it is possible or explains how it works; `limited` possible only under a named condition such as a plan, version, role or quota; `unsupported` the site says it cannot be done; `no-answer` the site gave no answer to a question a page could answer for everyone; `needs-support` only a person can resolve it, because it concerns the asker's own account, order, data or contract. */
364
+ export declare enum SiteQuestionAnswerSiteSaid {
365
+ Covered = "covered",
366
+ Limited = "limited",
367
+ Unsupported = "unsupported",
368
+ NoAnswer = "no-answer",
369
+ NeedsSupport = "needs-support"
370
+ }
371
+ export declare enum SiteInsightsVisitorBot {
372
+ Unknown = "unknown",
373
+ Googlebot = "googlebot",
374
+ Bingbot = "bingbot",
375
+ Duckduckbot = "duckduckbot",
376
+ Facebookbot = "facebookbot",
377
+ Applebot = "applebot",
378
+ Chatgpt = "chatgpt",
379
+ Openai = "openai",
380
+ Claude = "claude",
381
+ Anthropic = "anthropic",
382
+ Gemini = "gemini",
383
+ Perplexity = "perplexity",
384
+ Cohere = "cohere",
385
+ Mistral = "mistral",
386
+ Deepseek = "deepseek",
387
+ Meta = "meta",
388
+ Bytespider = "bytespider",
389
+ Ccbot = "ccbot",
390
+ Amazonbot = "amazonbot",
391
+ Youbot = "youbot",
392
+ Cursor = "cursor",
393
+ Vscode = "vscode",
394
+ ClaudeCode = "claude-code",
395
+ Codex = "codex",
396
+ Opencode = "opencode",
397
+ Gptbot = "gptbot",
398
+ Claudebot = "claudebot",
399
+ MetaFetcher = "meta-fetcher",
400
+ Grok = "grok",
401
+ GithubCopilot = "github-copilot",
402
+ MetaWebindexer = "meta-webindexer",
403
+ MetaAds = "meta-ads",
404
+ Duckassist = "duckassist",
405
+ AmznSearchbot = "amzn-searchbot",
406
+ AmznUser = "amzn-user",
407
+ OtherBot = "other-bot",
408
+ Parallel = "parallel",
409
+ Exa = "exa",
410
+ Linkup = "linkup",
411
+ VertexAi = "vertex-ai",
412
+ Atlassian = "atlassian",
413
+ Kapa = "kapa",
414
+ Bedrock = "bedrock"
415
+ }
396
416
  /** 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. */
397
417
  export declare enum SiteQuestionVisitorType {
398
418
  Human = "human",
@@ -458,6 +478,18 @@ export declare enum ContextConnectionStatus {
458
478
  Failed = "failed",
459
479
  Skipped = "skipped"
460
480
  }
481
+ /** What the person was asking for, independent of the type of site: `can-it` whether it does, supports or integrates with something; `how-to` the steps to get something done; `how-it-works` rules, defaults and what happens when; `details` exact values, syntax, limits or lists; `troubleshoot` errors and why something fails; `pricing` price, plans and licensing; `trust` security, compliance and data handling; `fit` use-case fit, alternatives and switching from another tool; `other` anything else. */
482
+ export declare enum SiteQuestionIntent {
483
+ CanIt = "can-it",
484
+ HowTo = "how-to",
485
+ HowItWorks = "how-it-works",
486
+ Details = "details",
487
+ Troubleshoot = "troubleshoot",
488
+ Pricing = "pricing",
489
+ Trust = "trust",
490
+ Fit = "fit",
491
+ Other = "other"
492
+ }
461
493
  /** Type classification of the user question. */
462
494
  export declare enum SiteQuestionType {
463
495
  Exploring = "exploring",
@@ -870,6 +902,26 @@ export declare enum SCIMConnectionProvider {
870
902
  Entra = "entra",
871
903
  Generic = "generic"
872
904
  }
905
+ /** Verification status of the domain. "legacy" is a domain added before verification existed: it keeps letting people join automatically without being verified. */
906
+ export declare enum OrganizationDomainStatus {
907
+ Legacy = "legacy",
908
+ Pending = "pending",
909
+ Verified = "verified",
910
+ Error = "error"
911
+ }
912
+ /**
913
+ * State of a SAML provider's email domain in the organization.
914
+ * - `verified`: People with an email on this domain can sign in through the provider.
915
+ * - `pending`, `error`, `legacy`: The domain isn't verified yet, so it doesn't let anyone sign in.
916
+ * - `removed`: The organization no longer has this domain.
917
+ */
918
+ export declare enum SAMLProviderDomainStatus {
919
+ Verified = "verified",
920
+ Pending = "pending",
921
+ Error = "error",
922
+ Legacy = "legacy",
923
+ Removed = "removed"
924
+ }
873
925
  /**
874
926
  * Status of the provider.
875
927
  * - `active`: The provider is active and can be used to authenticate users.
@@ -893,6 +945,7 @@ export declare enum OrganizationFeature {
893
945
  MembersTeamOwners = "members-team-owners",
894
946
  SecuritySaml = "security-saml",
895
947
  Scim = "scim",
948
+ VerifiedDomains = "verified-domains",
896
949
  ChangeRequestsMergeRules = "change-requests-merge-rules"
897
950
  }
898
951
  /**
@@ -1385,7 +1438,7 @@ export declare enum ContentVisibility {
1385
1438
  /** Data passed through a realtime channel */
1386
1439
  export type APIChannelData = APIChannelGitSyncOperationData | APIChannelGitSyncSiteOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
1387
1440
  /** Channel to subscribe to for realtime updates. */
1388
- 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;
1441
+ export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserPasskeys | 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 | APIChannelOrganizationDomains | 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;
1389
1442
  /** The plan upgrade that would make a feature available. */
1390
1443
  export type FeatureUpgradeRequirement = {
1391
1444
  type: "organization";
@@ -1547,6 +1600,46 @@ export interface APITemporaryToken {
1547
1600
  /** Temporary access token to authenticate with the API */
1548
1601
  token: string;
1549
1602
  }
1603
+ /** @format date-time */
1604
+ export type Timestamp = string;
1605
+ /** A passkey the user registered to sign in to GitBook. */
1606
+ export interface UserPasskey {
1607
+ /** The object type, which is always "passkey" */
1608
+ object: "passkey";
1609
+ /** Unique identifier of the passkey. */
1610
+ id: string;
1611
+ /** Name the user gave the passkey, usually the device or password manager that holds it. */
1612
+ name: string;
1613
+ /** When the passkey was registered. */
1614
+ createdAt: Timestamp;
1615
+ /** When the passkey was last used to sign in. Absent if it has never been used. */
1616
+ lastUsedAt?: Timestamp;
1617
+ /** Whether the passkey is synced across devices, for example by a password manager. */
1618
+ backedUp: boolean;
1619
+ }
1620
+ /** The browser's answer to the passkey registration options (RegistrationResponseJSON). */
1621
+ export interface PasskeyRegistrationResponse {
1622
+ id: string;
1623
+ rawId: string;
1624
+ type: "public-key";
1625
+ response: {
1626
+ clientDataJSON: string;
1627
+ attestationObject: string;
1628
+ /**
1629
+ * How the browser reaches the authenticator, such as usb, nfc, ble, smart-card, hybrid or internal. WebAuthn can add values, so any short lowercase name is accepted.
1630
+ * @maxItems 8
1631
+ */
1632
+ transports?: string[];
1633
+ };
1634
+ clientExtensionResults: Record<string, any>;
1635
+ authenticatorAttachment?: "platform" | "cross-platform";
1636
+ }
1637
+ /** WebAuthn options for creating a passkey (PublicKeyCredentialCreationOptionsJSON), to pass unchanged to the browser. */
1638
+ export interface PasskeyRegistrationOptions {
1639
+ /** Single-use challenge the new passkey must sign. */
1640
+ challenge: string;
1641
+ [key: string]: any;
1642
+ }
1550
1643
  export interface List {
1551
1644
  next?: {
1552
1645
  /** Unique identifier to query the next results page */
@@ -1557,8 +1650,6 @@ export interface List {
1557
1650
  }
1558
1651
  /** @maxLength 50 */
1559
1652
  export type APITokenLabel = string;
1560
- /** @format date-time */
1561
- export type Timestamp = string;
1562
1653
  /** The API token details, excluding the token itself. */
1563
1654
  export interface UserAPIToken {
1564
1655
  /** The API token ID. */
@@ -1571,6 +1662,8 @@ export interface UserAPIToken {
1571
1662
  revoked: boolean;
1572
1663
  /** When the API token stops authenticating. Absent for a token that never expires. */
1573
1664
  expiresAt?: Timestamp;
1665
+ /** When the API token last authenticated a request, accurate to within an hour. Absent for a token that has never been used. */
1666
+ lastUsedAt?: Timestamp;
1574
1667
  }
1575
1668
  /** The API token details, including the token itself. */
1576
1669
  export type UserAPITokenExtended = UserAPIToken & {
@@ -2313,6 +2406,12 @@ export interface DocumentInlineLink {
2313
2406
  data: {
2314
2407
  /** A relative reference to content in GitBook. */
2315
2408
  ref: ContentRef;
2409
+ /**
2410
+ * Where the link opens when clicked. When absent, the link follows the site's default behavior.
2411
+ * - `self`: The link opens in the current tab.
2412
+ * - `blank`: The link opens in a new browser tab.
2413
+ */
2414
+ target?: "self" | "blank";
2316
2415
  };
2317
2416
  isVoid?: false;
2318
2417
  }
@@ -2513,7 +2612,7 @@ export interface DocumentTableViewGrid {
2513
2612
  export interface DocumentTableViewCards {
2514
2613
  type: "cards";
2515
2614
  /** Size of the cards. It indicates how many columns will be used */
2516
- cardSize: "medium" | "large";
2615
+ cardSize: "small" | "medium" | "large";
2517
2616
  /** Ordered list of the definition IDs to display */
2518
2617
  columns: string[];
2519
2618
  /** Definition ID to use as a target link for the card */
@@ -2723,29 +2822,6 @@ export interface DocumentBlockPrompt {
2723
2822
  isVoid?: false;
2724
2823
  }
2725
2824
  export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockIf | DocumentBlockColumns | DocumentBlockUpdates;
2726
- export interface DocumentBlockIf {
2727
- object: "block";
2728
- type: "if";
2729
- key?: string;
2730
- nodes: DocumentBlocksTopLevels[];
2731
- isVoid?: false;
2732
- data: {
2733
- expression: string;
2734
- };
2735
- }
2736
- export interface DocumentBlockReusableContent {
2737
- object: "block";
2738
- type: "reusable-content";
2739
- key?: string;
2740
- data: {
2741
- ref: ContentRefReusableContent;
2742
- };
2743
- isVoid: true;
2744
- meta?: {
2745
- /** A content token that can be used to fetch the reusable content from the API. */
2746
- token?: string;
2747
- };
2748
- }
2749
2825
  export interface DocumentBlockContentRef {
2750
2826
  object: "block";
2751
2827
  type: "content-ref";
@@ -2792,13 +2868,29 @@ export interface DocumentBlockExpandable {
2792
2868
  id: string;
2793
2869
  };
2794
2870
  }
2795
- export interface DocumentBlockStepper {
2871
+ export interface DocumentBlockIf {
2796
2872
  object: "block";
2797
- type: "stepper";
2873
+ type: "if";
2798
2874
  key?: string;
2799
- nodes: DocumentBlockStepperStep[];
2875
+ /** Blocks shown when the expression is true. Directly inside an `updates` block, these are `update` blocks, and only there. */
2876
+ nodes: (DocumentBlocksTopLevels | DocumentBlockUpdate)[];
2800
2877
  isVoid?: false;
2801
- data?: object;
2878
+ data: {
2879
+ expression: string;
2880
+ };
2881
+ }
2882
+ export interface DocumentBlockReusableContent {
2883
+ object: "block";
2884
+ type: "reusable-content";
2885
+ key?: string;
2886
+ data: {
2887
+ ref: ContentRefReusableContent;
2888
+ };
2889
+ isVoid: true;
2890
+ meta?: {
2891
+ /** A content token that can be used to fetch the reusable content from the API. */
2892
+ token?: string;
2893
+ };
2802
2894
  }
2803
2895
  export interface DocumentBlockTabs {
2804
2896
  object: "block";
@@ -2810,6 +2902,24 @@ export interface DocumentBlockTabs {
2810
2902
  fullWidth?: boolean;
2811
2903
  };
2812
2904
  }
2905
+ export interface DocumentBlockStepper {
2906
+ object: "block";
2907
+ type: "stepper";
2908
+ key?: string;
2909
+ nodes: DocumentBlockStepperStep[];
2910
+ isVoid?: false;
2911
+ data?: object;
2912
+ }
2913
+ export interface DocumentBlockStepperStep {
2914
+ object: "block";
2915
+ type: "stepper-step";
2916
+ key?: string;
2917
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2918
+ data: {
2919
+ icon?: string;
2920
+ };
2921
+ isVoid?: false;
2922
+ }
2813
2923
  export interface DocumentBlockTabsItem {
2814
2924
  object: "block";
2815
2925
  type: "tabs-item";
@@ -2828,13 +2938,16 @@ export interface DocumentBlockTabsItem {
2828
2938
  };
2829
2939
  isVoid?: false;
2830
2940
  }
2831
- export interface DocumentBlockStepperStep {
2941
+ export interface DocumentBlockUpdate {
2832
2942
  object: "block";
2833
- type: "stepper-step";
2943
+ type: "update";
2834
2944
  key?: string;
2835
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
2945
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockIf | DocumentBlockStepper)[];
2836
2946
  data: {
2837
- icon?: string;
2947
+ /** 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. */
2948
+ date: string | Timestamp;
2949
+ /** Array of tags. Each tag is id'ed by its slug. */
2950
+ tags?: ContentRefTag[];
2838
2951
  };
2839
2952
  isVoid?: false;
2840
2953
  }
@@ -2988,24 +3101,12 @@ export interface DocumentBlockColumns {
2988
3101
  nodes: DocumentBlockColumn[];
2989
3102
  isVoid: false;
2990
3103
  }
2991
- export interface DocumentBlockUpdate {
2992
- object: "block";
2993
- type: "update";
2994
- key?: string;
2995
- nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockIf | DocumentBlockStepper)[];
2996
- data: {
2997
- /** 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. */
2998
- date: string | Timestamp;
2999
- /** Array of tags. Each tag is id'ed by its slug. */
3000
- tags?: ContentRefTag[];
3001
- };
3002
- isVoid?: false;
3003
- }
3004
3104
  export interface DocumentBlockUpdates {
3005
3105
  object: "block";
3006
3106
  type: "updates";
3007
3107
  key?: string;
3008
- nodes: DocumentBlockUpdate[];
3108
+ /** The updates. An `if` block wraps updates shown only when its expression is true; it holds `update` blocks only. */
3109
+ nodes: (DocumentBlockUpdate | DocumentBlockIf)[];
3009
3110
  isVoid?: false;
3010
3111
  data: {
3011
3112
  /** @default "full" */
@@ -3392,6 +3493,10 @@ export type RevisionTag = {
3392
3493
  slug: string;
3393
3494
  /** Display label for the tag. Can be renamed and differ from the slug. */
3394
3495
  label: string;
3496
+ /** Categories organize tags and cannot be assigned to pages or blocks. Immutable after creation. */
3497
+ kind?: "category";
3498
+ /** Slug of the parent tag or category. Omitted for root tags. Normal tags nest one level beneath another normal tag; categories nest up to three levels deep. */
3499
+ parent?: string;
3395
3500
  /** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
3396
3501
  color: DocumentTextColor;
3397
3502
  } & ({
@@ -3423,7 +3528,7 @@ export interface RevisionBase {
3423
3528
  pages: RevisionPage[];
3424
3529
  files: RevisionFile[];
3425
3530
  reusableContents: RevisionReusableContent[];
3426
- /** List of available tags within this revision */
3531
+ /** Tags and categories in hierarchy order: parents before children, sibling categories by manual position, then normal tags by manual position inside a parent and by label at the top level */
3427
3532
  tags: RevisionTag[];
3428
3533
  variables?: Variables;
3429
3534
  /** When the revision was created. */
@@ -3773,7 +3878,10 @@ export interface ChangeRequestReview {
3773
3878
  };
3774
3879
  }
3775
3880
  /** Exact review totals for the applied filters, independent of pagination. Keyed by review status, with a count of zero for a status nobody used. */
3776
- export type ChangeRequestReviewStats = Record<ChangeRequestReviewStatus, number>;
3881
+ export interface ChangeRequestReviewStats {
3882
+ approved: number;
3883
+ "changes-requested": number;
3884
+ }
3777
3885
  export interface Team {
3778
3886
  /** Type of Object, always equals to "team" */
3779
3887
  object: "team";
@@ -3913,7 +4021,7 @@ export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
3913
4021
  operation: "update_page";
3914
4022
  /** ID of the page to update. */
3915
4023
  page: string;
3916
- /** New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields. */
4024
+ /** New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. A `tags` list replaces the page's tags; each must be an existing tag slug in the space. Omit to update only the metadata fields. */
3917
4025
  document?: Document;
3918
4026
  /** Move the page to be a child of this page ID. Set to `null` to move it to the root of the page tree. Omit to leave the page's parent unchanged. The target cannot be the page itself or one of its own descendants. */
3919
4027
  into?: string | null;
@@ -3944,7 +4052,7 @@ export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
3944
4052
  * @maxLength 255
3945
4053
  */
3946
4054
  stableKey?: string;
3947
- /** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
4055
+ /** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata, including its `tags` (existing tag slugs in the space). */
3948
4056
  document: Document;
3949
4057
  };
3950
4058
  /**
@@ -4126,12 +4234,12 @@ export interface ChangeRequestContentChangeDeleteVariable {
4126
4234
  variable: VariableName;
4127
4235
  }
4128
4236
  /**
4129
- * Display label of a tag.
4237
+ * Display label of a tag or category.
4130
4238
  * @minLength 1
4131
4239
  * @maxLength 50
4132
4240
  */
4133
4241
  export type RevisionTagLabel = string;
4134
- /** Create flat tags in array order. The batch is rejected atomically if any tag is invalid. */
4242
+ /** Create normal tags and categories in array order. Parents must exist or appear earlier in the array. The batch is rejected atomically if any tag is invalid. Kind cannot be changed through an update or a delete-and-reinsert within the same batch. After deletion in an earlier request, the slug can be reused for a new definition. */
4135
4243
  export interface ChangeRequestContentChangeInsertTags {
4136
4244
  operation: "insert_tags";
4137
4245
  /**
@@ -4144,7 +4252,8 @@ export interface ChangeRequestContentChangeInsertTags {
4144
4252
  * @minLength 1
4145
4253
  */
4146
4254
  slug?: string;
4147
- /** Display label of a tag. */
4255
+ kind?: "category";
4256
+ /** Display label of a tag or category. */
4148
4257
  label: RevisionTagLabel;
4149
4258
  /** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
4150
4259
  color?: DocumentTextColor;
@@ -4152,17 +4261,24 @@ export interface ChangeRequestContentChangeInsertTags {
4152
4261
  icon?: Icon;
4153
4262
  /** Unicode codepoint or character of the emoji */
4154
4263
  emoji?: Emoji;
4264
+ /** Parent category or normal tag slug. Null places the tag at the root. */
4265
+ parent?: string | null;
4266
+ /**
4267
+ * Zero-based position among siblings of the same kind (categories, or tags inside a category or parent tag). Top-level tags sort by label and take no position; omit to append when moving to another parent.
4268
+ * @min 0
4269
+ */
4270
+ at?: number;
4155
4271
  }[];
4156
4272
  }
4157
- /** Rename or restyle an existing tag. The slug is immutable. */
4273
+ /** Rename, restyle, reparent or reorder an existing tag or category. Moving a parent keeps all descendants attached. Kind cannot be changed. */
4158
4274
  export interface ChangeRequestContentChangeUpdateTag {
4159
4275
  operation: "update_tag";
4160
4276
  /**
4161
- * Slug of the tag to update.
4277
+ * Slug of the tag or category to update.
4162
4278
  * @minLength 1
4163
4279
  */
4164
4280
  tag: string;
4165
- /** Display label of a tag. */
4281
+ /** Display label of a tag or category. */
4166
4282
  label?: RevisionTagLabel;
4167
4283
  /** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
4168
4284
  color?: DocumentTextColor;
@@ -4170,8 +4286,15 @@ export interface ChangeRequestContentChangeUpdateTag {
4170
4286
  icon?: Icon | null;
4171
4287
  /** Emoji to set. Null removes the emoji; omission preserves it. */
4172
4288
  emoji?: Emoji | null;
4289
+ /** Parent category or normal tag slug. Null places the tag at the root. */
4290
+ parent?: string | null;
4291
+ /**
4292
+ * Zero-based position among siblings of the same kind (categories, or tags inside a category or parent tag). Top-level tags sort by label and take no position; omit to append when moving to another parent.
4293
+ * @min 0
4294
+ */
4295
+ at?: number;
4173
4296
  }
4174
- /** Delete an existing tag definition. Page and block references remain in content but stop resolving. */
4297
+ /** Delete an empty category or a normal tag. A normal tag's children are reparented to its parent. Page and block references to the deleted tag stop resolving. */
4175
4298
  export interface ChangeRequestContentChangeDeleteTag {
4176
4299
  operation: "delete_tag";
4177
4300
  /** @minLength 1 */
@@ -4362,6 +4485,10 @@ export interface RevisionSemanticChangeReusableContentEdited {
4362
4485
  export interface ChangedRevisionTag {
4363
4486
  slug: string;
4364
4487
  label: string;
4488
+ /** Present for categories; omitted for normal tags. */
4489
+ kind?: "category";
4490
+ /** Parent tag or category slug. Omitted for root tags. */
4491
+ parent?: string;
4365
4492
  }
4366
4493
  export interface RevisionSemanticChangeTagCreated {
4367
4494
  type: "tag_created";
@@ -4373,6 +4500,22 @@ export interface RevisionSemanticChangeTagDeleted {
4373
4500
  }
4374
4501
  export interface RevisionTagChangeAttributes {
4375
4502
  label?: ChangeAttributeString;
4503
+ kind?: ChangeAttributeString;
4504
+ parent?: ChangeAttributeString;
4505
+ orderIndex?: ChangeAttributeString;
4506
+ color?: ChangeAttributeString;
4507
+ icon?: {
4508
+ /** Name of the icon */
4509
+ before?: Icon;
4510
+ /** Name of the icon */
4511
+ after?: Icon;
4512
+ };
4513
+ emoji?: {
4514
+ /** Unicode codepoint or character of the emoji */
4515
+ before?: Emoji;
4516
+ /** Unicode codepoint or character of the emoji */
4517
+ after?: Emoji;
4518
+ };
4376
4519
  }
4377
4520
  export interface RevisionSemanticChangeTagEdited {
4378
4521
  type: "tag_edited";
@@ -4688,8 +4831,12 @@ export interface Organization {
4688
4831
  defaultRole?: MemberRoleOrGuest;
4689
4832
  /** The default content for the organization */
4690
4833
  defaultContent?: OrganizationDefaultContent;
4691
- /** Whether SSO is enforced organization-wide */
4834
+ /** Whether SSO is enforced organization-wide. Requires an active SAML provider and at least one organization admin linked through SSO. */
4692
4835
  sso?: boolean;
4836
+ /** Whether Enforce SSO is turned on, regardless of whether its requirements are met. */
4837
+ ssoPreference?: boolean;
4838
+ /** Whether Enforce SSO applies to the current user, because one of the organization's SAML providers can sign in their email. Members no provider can sign in keep their other sign-in methods. */
4839
+ ssoRequired?: boolean;
4693
4840
  /** If true, the organization is configured to use all our AI features. */
4694
4841
  ai?: boolean;
4695
4842
  /** Whether the master AI setting is turned on, regardless of plan availability. Contract overrides forcing AI off take precedence. */
@@ -5258,6 +5405,8 @@ export interface Site {
5258
5405
  /** Can the user edit the adaptive schema of the site. */
5259
5406
  editAdaptiveSchema: boolean;
5260
5407
  };
5408
+ /** Whether visitors can preview change requests and historical revisions on the published site. Previews inside GitBook are not affected. */
5409
+ publicChangeRequestPreviews: boolean;
5261
5410
  /** Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting. */
5262
5411
  published: boolean;
5263
5412
  siteSpaces: number;
@@ -5636,6 +5785,13 @@ export interface ContentKitRenderOutputComplete {
5636
5785
  }
5637
5786
  /** Output of the integration when rendering a UI. */
5638
5787
  export type ContentKitRenderOutput = ContentKitRenderOutputElement | ContentKitRenderOutputComplete;
5788
+ export interface Error {
5789
+ error: {
5790
+ /** @format int32 */
5791
+ code: number;
5792
+ message: string;
5793
+ };
5794
+ }
5639
5795
  /** Common properties for ContentKit context. */
5640
5796
  export interface ContentKitContextBase {
5641
5797
  theme: "dark" | "light";
@@ -5768,6 +5924,13 @@ export interface UpdateIntegrationSiteInstallation {
5768
5924
  /** ID of a consumed OAuth transaction for this exact target, authorizing a credential write. Single use. */
5769
5925
  oauthTransaction?: string;
5770
5926
  }
5927
+ /**
5928
+ * Name of a new organization
5929
+ * @minLength 2
5930
+ * @maxLength 80
5931
+ * @pattern \S.*\S
5932
+ */
5933
+ export type NewOrganizationTitle = string;
5771
5934
  /** Preferences collected from the user during site onboarding, used to tailor recommendations and to apply their initial setup choices. */
5772
5935
  export interface SiteOnboardingPreferences {
5773
5936
  source: SiteOnboardingSource | null;
@@ -5775,8 +5938,12 @@ export interface SiteOnboardingPreferences {
5775
5938
  interests: SiteOnboardingInterest[];
5776
5939
  }
5777
5940
  export interface CreateOrganization {
5778
- /** Name of the organization */
5779
- title: OrganizationTitle;
5941
+ /** Name of a new organization */
5942
+ title: NewOrganizationTitle;
5943
+ /**
5944
+ * No longer supported: a non-empty list is rejected. Add and verify domains with the domain management API after the organization is created.
5945
+ * @deprecated
5946
+ */
5780
5947
  emailDomains?: OrganizationEmailDomains;
5781
5948
  /** Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true. */
5782
5949
  onboardingPreferences?: SiteOnboardingPreferences;
@@ -6187,6 +6354,12 @@ export interface InviteUsersToOrganization {
6187
6354
  })[];
6188
6355
  /** Default role to set on newly invited members. */
6189
6356
  role?: MemberRoleOrGuest;
6357
+ /**
6358
+ * Teams to add the invitees to as Members, preserving existing team roles. The caller must be an owner of every team or an organization admin. Team-owner email invitations require acceptance before granting organization Guest and team Member access, including when the recipient already belongs to the organization. Existing roles are preserved. Granting an organization role or SSO access requires an organization admin.
6359
+ * @minItems 1
6360
+ * @uniqueItems true
6361
+ */
6362
+ teamIds?: EntityId[];
6190
6363
  /** If true, invites the user as an SSO user of the organization. Defaults to false. */
6191
6364
  sso?: boolean;
6192
6365
  }
@@ -6226,6 +6399,15 @@ export interface InviteLinkToOrganization {
6226
6399
  role: MemberRoleOrGuest;
6227
6400
  /** An invite is redundant if the requesting user already has all necessary permissions. */
6228
6401
  redundant: boolean;
6402
+ /** Details shown to the recipient before accepting a team invitation. */
6403
+ teamInvitation?: {
6404
+ /** Display name of the person who sent the invitation. */
6405
+ inviter: string;
6406
+ teams: {
6407
+ id: string;
6408
+ title: string;
6409
+ }[];
6410
+ };
6229
6411
  }
6230
6412
  export interface CreateInviteToOrganization {
6231
6413
  /** The role of the member in the organization */
@@ -6290,13 +6472,11 @@ export type BillingCancellationFeedback = {
6290
6472
  } | {
6291
6473
  reason: "will_vibe_code_our_own_app";
6292
6474
  /** The tool the organization is moving to */
6293
- reasonDetail: "claude" | "codex" | "replit";
6294
- } | {
6295
- reason: "will_vibe_code_our_own_app";
6296
- /** The tool the organization is moving to */
6297
- reasonDetail: "other";
6475
+ reasonDetail: "claude" | "codex" | "cursor" | "lovable" | "replit" | "other";
6298
6476
  /** Free-text detail a user typed alongside their cancellation reason. */
6299
- reasonComment: BillingCancellationComment;
6477
+ reasonComment?: BillingCancellationComment;
6478
+ /** Where the organization plans to host its own solution */
6479
+ reasonHosting?: "own_website_or_app" | "vercel" | "netlify" | "github_pages" | "cloudflare_pages" | "not_decided" | "other";
6300
6480
  } | {
6301
6481
  reason: "found_better_alternative";
6302
6482
  /** Free-text detail a user typed alongside their cancellation reason. */
@@ -6307,6 +6487,28 @@ export type BillingCancellationFeedback = {
6307
6487
  reason: "other_reason";
6308
6488
  /** Free-text detail a user typed alongside their cancellation reason. */
6309
6489
  reasonComment: BillingCancellationComment;
6490
+ } | {
6491
+ reason: "not_using_enough";
6492
+ reasonDetail: "yes_in_a_few_months" | "no";
6493
+ /** Free-text detail a user typed alongside their cancellation reason. */
6494
+ reasonComment?: BillingCancellationComment;
6495
+ } | {
6496
+ reason: "found_better_alternative";
6497
+ reasonDetail: "mintlify" | "readme" | "docusaurus" | "notion" | "confluence" | "self_hosted" | "other";
6498
+ /** Free-text detail a user typed alongside their cancellation reason. */
6499
+ reasonComment?: BillingCancellationComment;
6500
+ } | {
6501
+ reason: "not_satisfied_with_product";
6502
+ /** Free-text detail a user typed alongside their cancellation reason. */
6503
+ reasonComment: BillingCancellationComment;
6504
+ } | {
6505
+ reason: "budget";
6506
+ reasonDetail: "budget_cuts" | "plan_price_increase" | "consolidating_tools" | "funding_changed" | "excess_seats_or_sites" | "project_budget_reduced";
6507
+ } | {
6508
+ reason: "budget";
6509
+ reasonDetail: "other";
6510
+ /** Free-text detail a user typed alongside their cancellation reason. */
6511
+ reasonComment: BillingCancellationComment;
6310
6512
  };
6311
6513
  /**
6312
6514
  * Coupon or promotion code to apply to billing operations.
@@ -6621,6 +6823,19 @@ export type SAMLProviderLabel = string;
6621
6823
  export type SAMLProviderEntityID = string;
6622
6824
  /** @maxLength 10000 */
6623
6825
  export type SAMLProviderCertificate = string;
6826
+ /** Role given to people on their first sign-in through the provider. null adds them as guests, "default" uses the organization's default role, and "domain" uses the role of the verified email domain they signed in with. */
6827
+ export type SAMLProviderDefaultRole = MemberRole | null | "default" | "domain";
6828
+ /** An email domain of a SAML provider, with its verification state in the organization. */
6829
+ export interface SAMLProviderDomain {
6830
+ domain: string;
6831
+ /**
6832
+ * State of a SAML provider's email domain in the organization.
6833
+ * - `verified`: People with an email on this domain can sign in through the provider.
6834
+ * - `pending`, `error`, `legacy`: The domain isn't verified yet, so it doesn't let anyone sign in.
6835
+ * - `removed`: The organization no longer has this domain.
6836
+ */
6837
+ status: SAMLProviderDomainStatus;
6838
+ }
6624
6839
  export interface OrganizationSAMLProvider {
6625
6840
  /** Type of Object, always equals to "saml-provider" */
6626
6841
  object: "saml-provider";
@@ -6631,8 +6846,10 @@ export interface OrganizationSAMLProvider {
6631
6846
  entityID: SAMLProviderEntityID;
6632
6847
  certificate: SAMLProviderCertificate;
6633
6848
  defaultTeam?: OrganizationTeam;
6634
- /** The role of a member in an organization, null for guests */
6635
- defaultRole: MemberRoleOrGuest;
6849
+ /** Whether people join the team of the verified email domain they signed in with, instead of `defaultTeam`. */
6850
+ defaultTeamFromDomain?: boolean;
6851
+ /** Role given to people on their first sign-in through the provider. null adds them as guests, "default" uses the organization's default role, and "domain" uses the role of the verified email domain they signed in with. */
6852
+ defaultRole: SAMLProviderDefaultRole;
6636
6853
  /** Date at which the provider was created. */
6637
6854
  createdAt: Timestamp;
6638
6855
  /**
@@ -6641,6 +6858,8 @@ export interface OrganizationSAMLProvider {
6641
6858
  * - `pending`: The provider is pending and is not yet fully configured.
6642
6859
  */
6643
6860
  status: SAMLProviderStatus;
6861
+ /** Email domains the provider signs people in for. Absent on providers created before domains existed, which accept any email. */
6862
+ domains?: SAMLProviderDomain[];
6644
6863
  /** Metadata about the service provider. */
6645
6864
  service: {
6646
6865
  /**
@@ -6664,6 +6883,46 @@ export interface OrganizationSAMLProvider {
6664
6883
  location: string;
6665
6884
  };
6666
6885
  }
6886
+ /**
6887
+ * Email domains the provider signs people in for. Each one must be an email domain of the organization. Only emails on a verified domain in this list can sign in through the provider.
6888
+ * @maxItems 50
6889
+ * @uniqueItems true
6890
+ */
6891
+ export type SAMLProviderDomains = string[];
6892
+ /** Role given to people who join through the domain. "default" uses the organization's default role, and "guest" adds them as guests. */
6893
+ export type OrganizationDomainDefaultRole = MemberRole | "default" | "guest";
6894
+ /** An email domain of an organization. */
6895
+ export interface OrganizationDomain {
6896
+ /** The object type, which is always "organization-domain" */
6897
+ object: "organization-domain";
6898
+ /** The email domain, such as "example.com" */
6899
+ domain: string;
6900
+ /** Verification status of the domain. "legacy" is a domain added before verification existed: it keeps letting people join automatically without being verified. */
6901
+ status: OrganizationDomainStatus;
6902
+ /** Why the last verification failed */
6903
+ statusDescription?: string;
6904
+ /** DNS TXT record to add to the domain to verify it */
6905
+ verificationRecord?: {
6906
+ type: "TXT";
6907
+ name: string;
6908
+ value: string;
6909
+ };
6910
+ /** Whether people with an email on the domain join the organization automatically */
6911
+ autoJoinEnabled: boolean;
6912
+ /** Role given to people who join through the domain. "default" uses the organization's default role, and "guest" adds them as guests. */
6913
+ defaultRole: OrganizationDomainDefaultRole;
6914
+ /** ID of the team that people joining through the domain are added to */
6915
+ defaultTeam?: string;
6916
+ /** Date the domain was verified */
6917
+ verifiedAt?: Timestamp;
6918
+ /** Date the domain was added */
6919
+ createdAt: Timestamp;
6920
+ /** URLs associated with the object */
6921
+ urls: {
6922
+ /** URL of the domain in the API */
6923
+ location: URL;
6924
+ };
6925
+ }
6667
6926
  /**
6668
6927
  * Name of the SCIM connection, shown to organization admins.
6669
6928
  * @minLength 1
@@ -7279,6 +7538,8 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
7279
7538
  createdAt: Timestamp;
7280
7539
  /** Identifier of the user who created the installation. */
7281
7540
  createdBy: string;
7541
+ /** Identifier of the user who connected the Git provider credentials. Only this user can browse repositories or change the repository and branch with them. Null when it is unknown, for credentials connected before it was recorded, until someone reconnects the provider. */
7542
+ authorizedBy: string | null;
7282
7543
  updatedAt: Timestamp;
7283
7544
  /** URLs associated with the installation */
7284
7545
  urls: {
@@ -7289,13 +7550,6 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
7289
7550
  location: string;
7290
7551
  };
7291
7552
  };
7292
- export interface Error {
7293
- error: {
7294
- /** @format int32 */
7295
- code: number;
7296
- message: string;
7297
- };
7298
- }
7299
7553
  /** 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. */
7300
7554
  export type SiteAdaptiveRegions = Record<any, {
7301
7555
  /** ISO 3166-1 alpha-2 codes of the countries in the region. */
@@ -7883,6 +8137,16 @@ export interface SearchRecordResult {
7883
8137
  */
7884
8138
  url: string;
7885
8139
  }
8140
+ /** Short-lived credential that lets a published site's visitor call the site search operation directly. It is opaque, accepted only by that operation for one site, and expires within five minutes. */
8141
+ export interface SiteSearchPass {
8142
+ /** Credential to send as a bearer token in the Authorization header. */
8143
+ token: string;
8144
+ /**
8145
+ * When the credential expires.
8146
+ * @format date-time
8147
+ */
8148
+ expiresAt: string;
8149
+ }
7886
8150
  /**
7887
8151
  * The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is working towards.
7888
8152
  * @maxLength 1024
@@ -8334,6 +8598,36 @@ export interface SiteQuestionStatsVisitorTypes {
8334
8598
  bot: number;
8335
8599
  unknown: number;
8336
8600
  }
8601
+ /** Count of answers by the intent of their question. `unlabelled` counts questions not labelled yet. */
8602
+ export interface SiteQuestionStatsIntents {
8603
+ "can-it": number;
8604
+ "how-to": number;
8605
+ "how-it-works": number;
8606
+ details: number;
8607
+ troubleshoot: number;
8608
+ pricing: number;
8609
+ trust: number;
8610
+ fit: number;
8611
+ other: number;
8612
+ unlabelled: number;
8613
+ }
8614
+ /** Count of answers by what the site said about the main thing asked. `unlabelled` counts answers not labelled yet. */
8615
+ export interface SiteQuestionStatsSiteSaid {
8616
+ covered: number;
8617
+ limited: number;
8618
+ unsupported: number;
8619
+ "no-answer": number;
8620
+ "needs-support": number;
8621
+ unlabelled: number;
8622
+ }
8623
+ /** Count of answers by who should act on them (see `SiteQuestionEscalation`). `unlabelled` counts answers that cannot be escalated until their question and answer are labelled. */
8624
+ export interface SiteQuestionStatsEscalations {
8625
+ docs: number;
8626
+ team: number;
8627
+ support: number;
8628
+ none: number;
8629
+ unlabelled: number;
8630
+ }
8337
8631
  /** Aggregated stats for questions and linked answers. */
8338
8632
  export interface SiteQuestionStats {
8339
8633
  /** Total count of questions included in the aggregation. */
@@ -8352,6 +8646,14 @@ export interface SiteQuestionStats {
8352
8646
  channels: SiteQuestionStatsChannels;
8353
8647
  /** Count of answers by visitor type. */
8354
8648
  visitorTypes: SiteQuestionStatsVisitorTypes;
8649
+ /** Count of answers by the intent of their question. `unlabelled` counts questions not labelled yet. */
8650
+ intents: SiteQuestionStatsIntents;
8651
+ /** Count of answers by what the site said about the main thing asked. `unlabelled` counts answers not labelled yet. */
8652
+ siteSaid: SiteQuestionStatsSiteSaid;
8653
+ /** Count of answers by who should act on them (see `SiteQuestionEscalation`). `unlabelled` counts answers that cannot be escalated until their question and answer are labelled. */
8654
+ escalations: SiteQuestionStatsEscalations;
8655
+ /** Count of distinct goals agents gave with the answers. */
8656
+ goals: number;
8355
8657
  /**
8356
8658
  * Weekly count of related question answers for the past 3 months.
8357
8659
  * @maxItems 13
@@ -8367,6 +8669,8 @@ export interface SiteQuestion {
8367
8669
  question: string;
8368
8670
  /** Type classification of the user question. */
8369
8671
  type: SiteQuestionType;
8672
+ /** What the person was asking for; `null` until the question is labelled. */
8673
+ intent: SiteQuestionIntent | null;
8370
8674
  createdAt: Timestamp;
8371
8675
  askedAt: Timestamp;
8372
8676
  /** Aggregated stats for questions and linked answers. */
@@ -8776,6 +9080,24 @@ export interface SiteQuestionTimelineBucket {
8776
9080
  export interface SiteQuestionTimeline {
8777
9081
  items: SiteQuestionTimelineBucket[];
8778
9082
  }
9083
+ /** A distinct goal AI agents gave when asking a site's questions: the task they were working on for someone. Agents giving the same goal in the same words share one goal. */
9084
+ export interface SiteGoal {
9085
+ object: "site-goal";
9086
+ /** The ID of the site goal. */
9087
+ id: string;
9088
+ /** The goal as the first agent to give it wrote it. */
9089
+ goal: string;
9090
+ createdAt: Timestamp;
9091
+ /** Activity of the goal within the requested filters. */
9092
+ stats: {
9093
+ /** Count of distinct questions agents asked with this goal. */
9094
+ questions: number;
9095
+ /** Count of answers given to questions asked with this goal. */
9096
+ answers: number;
9097
+ /** When a question was last asked with this goal. */
9098
+ askedAt: Timestamp;
9099
+ };
9100
+ }
8779
9101
  export interface SiteQuestionAnswer {
8780
9102
  object: "site-question-answer";
8781
9103
  /** The ID of the site question answer. */
@@ -10152,10 +10474,12 @@ export interface SiteInsightsQueryEventsAggregation {
10152
10474
  * @default 1000
10153
10475
  */
10154
10476
  limit?: number;
10477
+ /** The `next.page` value of a previous result, to fetch the rows that follow it. Send the rest of the query unchanged. Relative ranges stay fixed to the time of the first page, but events recorded while paging can still move rows between pages. */
10478
+ page?: string;
10155
10479
  }
10156
- export interface SiteInsightsQueryEventsAggregationResult {
10480
+ export type SiteInsightsQueryEventsAggregationResult = List & {
10157
10481
  columns: SiteInsightsQueryEventsValues[];
10158
- }
10482
+ };
10159
10483
  /** A segment of visitors with the same characteristics. */
10160
10484
  export interface SiteInsightsVisitorSegment {
10161
10485
  /** The title of the visitor profile. */
@@ -10334,6 +10658,26 @@ export interface CustomHostname {
10334
10658
  location: string;
10335
10659
  };
10336
10660
  }
10661
+ /** The browser's answer to the passkey sign-in options (AuthenticationResponseJSON). */
10662
+ export interface PasskeyAuthenticationResponse {
10663
+ id: string;
10664
+ rawId: string;
10665
+ type: "public-key";
10666
+ response: {
10667
+ clientDataJSON: string;
10668
+ authenticatorData: string;
10669
+ signature: string;
10670
+ userHandle?: string;
10671
+ };
10672
+ clientExtensionResults: Record<string, any>;
10673
+ authenticatorAttachment?: "platform" | "cross-platform";
10674
+ }
10675
+ /** WebAuthn options for signing in with a passkey (PublicKeyCredentialRequestOptionsJSON), to pass unchanged to the browser. */
10676
+ export interface PasskeySignInOptions {
10677
+ /** Single-use challenge the passkey must sign. */
10678
+ challenge: string;
10679
+ [key: string]: any;
10680
+ }
10337
10681
  export interface UnsplashImage {
10338
10682
  kind: "unsplash_image";
10339
10683
  id: string;
@@ -11760,6 +12104,10 @@ export interface APIChannelUserOrganizations {
11760
12104
  channel: "user-organizations";
11761
12105
  user: string;
11762
12106
  }
12107
+ export interface APIChannelUserPasskeys {
12108
+ channel: "user-passkeys";
12109
+ user: string;
12110
+ }
11763
12111
  export interface APIChannelUserProfile {
11764
12112
  channel: "user-profile";
11765
12113
  user: string;
@@ -11875,6 +12223,11 @@ export interface APIChannelOrganizationSCIMConnections {
11875
12223
  channel: "organization-scim-connections";
11876
12224
  organization: string;
11877
12225
  }
12226
+ /** Subscription channel for changes in the email domains of an organization. */
12227
+ export interface APIChannelOrganizationDomains {
12228
+ channel: "organization-domains";
12229
+ organization: string;
12230
+ }
11878
12231
  /** Subscription channel for changes in custom fonts in an organization. */
11879
12232
  export interface APIChannelOrganizationCustomFonts {
11880
12233
  channel: "organization-fonts";
@@ -13526,7 +13879,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13526
13879
  computed?: boolean;
13527
13880
  }, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
13528
13881
  /**
13529
- * @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. **Tags**: create flat tag definitions with `insert_tags` and a `tags` array of 1-50 entries, edit their label or appearance with `update_tag`, and remove definitions with `delete_tag`. Slugs are immutable and generated from the label when omitted on insertion. Operations apply in order, so later updates or deletions can target newly inserted tags. Set `icon` or `emoji` to `null` to clear that field; omission preserves it. A non-null icon takes precedence over a non-null emoji. Deleting a tag leaves references in content unresolved. For example: `{"changes":[{"operation":"insert_tags","tags":[{"label":"Beta"}]}, {"operation":"update_tag","tag":"beta","color":"blue"}]}`. 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. **Variables** (space variables, Git Sync's `.gitbook/vars.yaml`) are created with `insert_variables`, changed with `update_variable` and removed with `delete_variable`. A variable is identified by its name, which content references as an expression: `<code class="expression">space.vars.<name></code>` in markdown. Inserting a name the change request already uses, or updating or deleting one it does not, rejects the batch. Deleting a variable keeps the expressions referencing it, as in the editor: remove them from those pages too. A page's own variables (`page.vars.<name>`) are set with `insert_page`/`update_page`'s `variables`, or the `vars` frontmatter of a markdown document, which replace all of that page's variables. To change one of them without resending the rest, give `insert_variables`, `update_variable` or `delete_variable` a `page`; the same rules apply to that page's variables. **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.
13882
+ * @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. **Tags and categories**: create with `insert_tags` using a `tags` array (1-50 entries), change appearance or placement with `update_tag`, and delete with `delete_tag`. A category (`kind: category`) must be empty before deletion and cannot be assigned to pages or blocks. Categories nest up to three levels deep; normal tags nest one level under other normal tags. Deleting a normal tag reparents its children to its parent. Changes apply in order, so newly created tags can be used by later changes, including page frontmatter. Tags within an insert apply in array order; create parents before children. For example: `{"changes":[{"operation":"insert_tags","tags":[{"label":"Products","slug":"products","kind":"category"}, {"label":"Autonomous DEM","slug":"autonomous-dem","parent":"products"}, {"label":"Core","slug":"core","parent":"autonomous-dem"}]}]}`. 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. **Variables** (space variables, Git Sync's `.gitbook/vars.yaml`) are created with `insert_variables`, changed with `update_variable` and removed with `delete_variable`. A variable is identified by its name, which content references as an expression: `<code class="expression">space.vars.<name></code>` in markdown. Inserting a name the change request already uses, or updating or deleting one it does not, rejects the batch. Deleting a variable keeps the expressions referencing it, as in the editor: remove them from those pages too. A page's own variables (`page.vars.<name>`) are set with `insert_page`/`update_page`'s `variables`, or the `vars` frontmatter of a markdown document, which replace all of that page's variables. To change one of them without resending the rest, give `insert_variables`, `update_variable` or `delete_variable` a `page`; the same rules apply to that page's variables. **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.
13530
13883
  *
13531
13884
  * @tags change-request-content
13532
13885
  * @name UpdateChangeRequestContent
@@ -14935,7 +15288,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14935
15288
  */
14936
15289
  disableIntegrationDevelopmentMode: (integrationName: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
14937
15290
  /**
14938
- * No description
15291
+ * @description Declared integration input errors return 422. Integration connection or configuration failures return 424, independently of the caller's GitBook authentication. Invalid or failing integration responses return 502. Transport failures remain 5xx. Failed actions are not automatically retried.
14939
15292
  *
14940
15293
  * @tags integrations
14941
15294
  * @name RenderIntegrationUiWithGet
@@ -14946,9 +15299,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14946
15299
  renderIntegrationUiWithGet: (integrationName: string, query: {
14947
15300
  /** LZ-string compressed JSON request */
14948
15301
  request: string;
14949
- }, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, any>>;
15302
+ }, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, Error>>;
14950
15303
  /**
14951
- * No description
15304
+ * @description Declared integration input errors return 422. Integration connection or configuration failures return 424, independently of the caller's GitBook authentication. Invalid or failing integration responses return 502. Transport failures remain 5xx. Failed actions are not automatically retried.
14952
15305
  *
14953
15306
  * @tags integrations
14954
15307
  * @name RenderIntegrationUiWithPost
@@ -14956,7 +15309,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14956
15309
  * @request POST:/integrations/{integrationName}/render
14957
15310
  * @secure
14958
15311
  */
14959
- renderIntegrationUiWithPost: (integrationName: string, data: RenderIntegrationUI, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, any>>;
15312
+ renderIntegrationUiWithPost: (integrationName: string, data: RenderIntegrationUI, params?: RequestParams) => Promise<HttpResponse<ContentKitRenderOutput, Error>>;
14960
15313
  /**
14961
15314
  * No description
14962
15315
  *
@@ -14999,7 +15352,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14999
15352
  };
15000
15353
  }>>;
15001
15354
  /**
15002
- * @description Updates the account-level configuration of an installation, and which spaces or sites it applies to.
15355
+ * @description Updates the account-level configuration of an installation, and which spaces or sites it applies to. Only a user can change `space_selection` and `site_selection`; integration and installation tokens get a 403 when they send them.
15003
15356
  *
15004
15357
  * @tags integrations
15005
15358
  * @name UpdateIntegrationInstallation
@@ -15438,7 +15791,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15438
15791
  };
15439
15792
  }>>;
15440
15793
  /**
15441
- * @description Lists recorded changes for an activated organization. Access is restricted to organization administrators and GitBook staff, and results are ordered by occurrence time, newest first. An active Enterprise plan is required except for GitBook's own organization.
15794
+ * @description Lists recorded changes for an activated organization. Access is restricted to organization administrators and GitBook staff, and results are ordered by occurrence time, newest first. An active Enterprise plan is required except for GitBook's own organization. Only events from the latest 365 days are available, including in counts and facets.
15442
15795
  *
15443
15796
  * @tags organizations
15444
15797
  * @name ListOrganizationAuditEvents
@@ -15457,7 +15810,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15457
15810
  */
15458
15811
  limit?: number;
15459
15812
  /**
15460
- * Include events occurring at or after this time.
15813
+ * Include events occurring at or after this time, within the latest 365 days.
15461
15814
  * @format date-time
15462
15815
  */
15463
15816
  from?: string;
@@ -15516,7 +15869,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15516
15869
  };
15517
15870
  }>>;
15518
15871
  /**
15519
- * @description Returns the full allowlisted payload for one recorded organization change. Access is restricted to organization administrators and GitBook staff. The organization must be activated and on an active Enterprise plan, except for GitBook's own organization.
15872
+ * @description Returns the full allowlisted payload for one recorded organization change. Access is restricted to organization administrators and GitBook staff. The organization must be activated and on an active Enterprise plan, except for GitBook's own organization. Events older than 365 days are unavailable and return 404.
15520
15873
  *
15521
15874
  * @tags organizations
15522
15875
  * @name GetOrganizationAuditEvent
@@ -15856,7 +16209,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15856
16209
  */
15857
16210
  deleteMemberFromOrganizationTeamById: (organizationId: EntityId, teamId: EntityId, userId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15858
16211
  /**
15859
- * No description
16212
+ * @description Optionally adds invitees to teams using teamIds. Team owners may invite organization Guests into teams they own. Other organization invitations require an organization admin.
15860
16213
  *
15861
16214
  * @tags organization-invites
15862
16215
  * @name InviteUsersToOrganization
@@ -15868,7 +16221,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15868
16221
  users: string[];
15869
16222
  /** The number of users who were added to the organization */
15870
16223
  invited: number;
16224
+ /** @deprecated */
15871
16225
  failedSSOEmails?: string[];
16226
+ /** Addresses awaiting acceptance of a team-owner invitation. Every requested address follows this flow, regardless of account existence or organization membership. No access is granted until acceptance. */
16227
+ pendingConsentEmails?: string[];
16228
+ /** Email addresses that must be verified before their existing accounts can be invited. */
16229
+ unverifiedEmails?: string[];
15872
16230
  }, {
15873
16231
  error: {
15874
16232
  /** @format int32 */
@@ -15954,7 +16312,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15954
16312
  */
15955
16313
  deleteOrganizationInviteById: (organizationId: EntityId, inviteId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15956
16314
  /**
15957
- * @description Join an organization if the user's verified email domain matches one of the organization's allowed email domains. This endpoint allows existing users to join organizations they're eligible for based on their email domain.
16315
+ * @description Join an organization if the user's verified email domain matches one of the organization's allowed email domains. This endpoint allows existing users to join organizations they're eligible for based on their email domain. If the user is already a member, refresh their access without changing their membership.
15958
16316
  *
15959
16317
  * @tags organizations
15960
16318
  * @name JoinOrganization
@@ -16289,8 +16647,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16289
16647
  certificate?: SAMLProviderCertificate;
16290
16648
  ssoURL?: URL;
16291
16649
  defaultTeam?: string;
16292
- /** The role of a member in an organization, null for guests */
16293
- defaultRole?: MemberRoleOrGuest;
16650
+ defaultTeamFromDomain?: boolean;
16651
+ /** Role given to people on their first sign-in through the provider. null adds them as guests, "default" uses the organization's default role, and "domain" uses the role of the verified email domain they signed in with. */
16652
+ defaultRole?: SAMLProviderDefaultRole;
16653
+ /** Email domains the provider signs people in for. Each one must be an email domain of the organization. Only emails on a verified domain in this list can sign in through the provider. */
16654
+ domains?: SAMLProviderDomains;
16294
16655
  }, params?: RequestParams) => Promise<HttpResponse<OrganizationSAMLProvider, any>>;
16295
16656
  /**
16296
16657
  * No description
@@ -16323,8 +16684,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16323
16684
  certificate?: SAMLProviderCertificate;
16324
16685
  ssoURL?: URL;
16325
16686
  defaultTeam?: string;
16326
- /** The role of a member in an organization, null for guests */
16327
- defaultRole?: MemberRoleOrGuest;
16687
+ defaultTeamFromDomain?: boolean;
16688
+ /** Role given to people on their first sign-in through the provider. null adds them as guests, "default" uses the organization's default role, and "domain" uses the role of the verified email domain they signed in with. */
16689
+ defaultRole?: SAMLProviderDefaultRole;
16690
+ /** Email domains the provider signs people in for. Each one must be an email domain of the organization. Only emails on a verified domain in this list can sign in through the provider. */
16691
+ domains?: SAMLProviderDomains;
16328
16692
  }, params?: RequestParams) => Promise<HttpResponse<OrganizationSAMLProvider, any>>;
16329
16693
  /**
16330
16694
  * No description
@@ -16336,6 +16700,137 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16336
16700
  * @secure
16337
16701
  */
16338
16702
  deleteOrganizationSamlProvider: (organizationId: EntityId, samlProviderId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
16703
+ /**
16704
+ * No description
16705
+ *
16706
+ * @tags organizations
16707
+ * @name ListOrganizationDomains
16708
+ * @summary List the email domains of an organization
16709
+ * @request GET:/orgs/{organizationId}/domains
16710
+ * @secure
16711
+ */
16712
+ listOrganizationDomains: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<List & {
16713
+ items: OrganizationDomain[];
16714
+ }, {
16715
+ error: {
16716
+ /** @format int32 */
16717
+ code: 404;
16718
+ message: string;
16719
+ };
16720
+ }>>;
16721
+ /**
16722
+ * @description Adds an email domain. People only join through it once the domain is verified.
16723
+ *
16724
+ * @tags organizations
16725
+ * @name AddOrganizationDomain
16726
+ * @summary Add an email domain to an organization
16727
+ * @request POST:/orgs/{organizationId}/domains
16728
+ * @secure
16729
+ */
16730
+ addOrganizationDomain: (organizationId: EntityId, data: {
16731
+ /** @maxLength 253 */
16732
+ domain: string;
16733
+ }, params?: RequestParams) => Promise<HttpResponse<OrganizationDomain, {
16734
+ error: {
16735
+ /** @format int32 */
16736
+ code: 400;
16737
+ message: string;
16738
+ };
16739
+ } | {
16740
+ error: {
16741
+ /** @format int32 */
16742
+ code: 404;
16743
+ message: string;
16744
+ };
16745
+ } | {
16746
+ error: {
16747
+ /** @format int32 */
16748
+ code: 409;
16749
+ message: string;
16750
+ };
16751
+ }>>;
16752
+ /**
16753
+ * No description
16754
+ *
16755
+ * @tags organizations
16756
+ * @name GetOrganizationDomain
16757
+ * @summary Get an email domain of an organization
16758
+ * @request GET:/orgs/{organizationId}/domains/{emailDomain}
16759
+ * @secure
16760
+ */
16761
+ getOrganizationDomain: (organizationId: EntityId, emailDomain: string, params?: RequestParams) => Promise<HttpResponse<OrganizationDomain, {
16762
+ error: {
16763
+ /** @format int32 */
16764
+ code: 404;
16765
+ message: string;
16766
+ };
16767
+ }>>;
16768
+ /**
16769
+ * No description
16770
+ *
16771
+ * @tags organizations
16772
+ * @name UpdateOrganizationDomain
16773
+ * @summary Update an email domain of an organization
16774
+ * @request PATCH:/orgs/{organizationId}/domains/{emailDomain}
16775
+ * @secure
16776
+ */
16777
+ updateOrganizationDomain: (organizationId: EntityId, emailDomain: string, data: {
16778
+ autoJoinEnabled?: boolean;
16779
+ /** Role given to people who join through the domain. "default" uses the organization's default role, and "guest" adds them as guests. */
16780
+ defaultRole?: OrganizationDomainDefaultRole;
16781
+ /** ID of a team of the organization, or null to add no team */
16782
+ defaultTeam?: string | null;
16783
+ }, params?: RequestParams) => Promise<HttpResponse<OrganizationDomain, {
16784
+ error: {
16785
+ /** @format int32 */
16786
+ code: 400;
16787
+ message: string;
16788
+ };
16789
+ } | {
16790
+ error: {
16791
+ /** @format int32 */
16792
+ code: 404;
16793
+ message: string;
16794
+ };
16795
+ }>>;
16796
+ /**
16797
+ * @description Removes an email domain. Members who joined through it stay members.
16798
+ *
16799
+ * @tags organizations
16800
+ * @name DeleteOrganizationDomain
16801
+ * @summary Remove an email domain from an organization
16802
+ * @request DELETE:/orgs/{organizationId}/domains/{emailDomain}
16803
+ * @secure
16804
+ */
16805
+ deleteOrganizationDomain: (organizationId: EntityId, emailDomain: string, params?: RequestParams) => Promise<HttpResponse<void, {
16806
+ error: {
16807
+ /** @format int32 */
16808
+ code: 404;
16809
+ message: string;
16810
+ };
16811
+ }>>;
16812
+ /**
16813
+ * @description Checks the domain's DNS TXT record. A legacy domain first gets its verification record, and keeps letting people join until it is verified.
16814
+ *
16815
+ * @tags organizations
16816
+ * @name VerifyOrganizationDomain
16817
+ * @summary Verify an email domain of an organization
16818
+ * @request POST:/orgs/{organizationId}/domains/{emailDomain}/verify
16819
+ * @secure
16820
+ */
16821
+ verifyOrganizationDomain: (organizationId: EntityId, emailDomain: string, params?: RequestParams) => Promise<HttpResponse<OrganizationDomain, {
16822
+ error: {
16823
+ /** @format int32 */
16824
+ code: 404;
16825
+ message: string;
16826
+ };
16827
+ } | {
16828
+ error: {
16829
+ /** @format int32 */
16830
+ code: 409;
16831
+ message: string;
16832
+ };
16833
+ }>>;
16339
16834
  /**
16340
16835
  * No description
16341
16836
  *
@@ -17200,6 +17695,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17200
17695
  updateSiteById: (organizationId: EntityId, siteId: string, data: {
17201
17696
  /** Title of the site */
17202
17697
  title?: SiteTitle;
17698
+ /** Allow visitors to preview change requests and historical revisions on the published site. */
17699
+ publicChangeRequestPreviews?: boolean;
17203
17700
  /**
17204
17701
  * The visibility setting of the site determines the audience of the site.
17205
17702
  * * `public`: Anyone can access the site, and the site is indexed by search engines.
@@ -18122,6 +18619,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18122
18619
  }, params?: RequestParams) => Promise<HttpResponse<List & {
18123
18620
  items: (SearchSpaceResult | SearchRecordResult)[];
18124
18621
  }, any>>;
18622
+ /**
18623
+ * @description Exchanges the content token of a published site's visitor for a short-lived search pass, which lets the visitor's browser call the site search operation directly. The reply has no pass when search passes are not enabled for the site, or when the visitor token of an authenticated visitor is missing, invalid or expired.
18624
+ *
18625
+ * @tags sites
18626
+ * @name GenerateSiteSearchPass
18627
+ * @summary Generate a site search pass
18628
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/search/pass
18629
+ * @secure
18630
+ */
18631
+ generateSiteSearchPass: (organizationId: EntityId, siteId: string, data?: {
18632
+ /** Visitor token of the session the content token was resolved for. Required for a pass on a site with visitor authentication or for an authenticated visitor; the pass never outlives it. */
18633
+ visitorToken?: string;
18634
+ }, params?: RequestParams) => Promise<HttpResponse<{
18635
+ /** Short-lived credential that lets a published site's visitor call the site search operation directly. It is opaque, accepted only by that operation for one site, and expires within five minutes. */
18636
+ searchPass?: SiteSearchPass;
18637
+ }, any>>;
18125
18638
  /**
18126
18639
  * @description Hints the search backend that latency-sensitive site search requests are likely to arrive soon. Call this when a visitor opens the site's search interface.
18127
18640
  *
@@ -18659,8 +19172,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18659
19172
  relevance?: SiteQuestionAnswerRelevance[];
18660
19173
  /** Filter stats by answer channel type. */
18661
19174
  channelType?: SiteChannelType[];
18662
- /** Filter by whether a person or an AI agent asked the question. */
19175
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18663
19176
  visitorType?: SiteQuestionVisitorType[];
19177
+ /** Filter by the AI agent or bot that asked the question. */
19178
+ visitorBot?: SiteInsightsVisitorBot[];
19179
+ /** Filter by the intent of the question. */
19180
+ intent?: SiteQuestionIntent[];
19181
+ /** Filter by what the site said in the answer about the main thing asked. */
19182
+ siteSaid?: SiteQuestionAnswerSiteSaid[];
19183
+ /** Filter by who should act on the answer (docs, another team, support or nobody). */
19184
+ escalation?: SiteQuestionEscalation[];
19185
+ /** Filter by whether the visitor who asked was signed in to the site. */
19186
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18664
19187
  /** Filter to answers that cited one of these pages as a source, each given as `{spaceId}/{pageId}`. */
18665
19188
  citedPage?: string[];
18666
19189
  /** Filter stats by answer resolution. */
@@ -18720,8 +19243,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18720
19243
  relevance?: SiteQuestionAnswerRelevance[];
18721
19244
  /** Filter questions by answer channel type. */
18722
19245
  channelType?: SiteChannelType[];
18723
- /** Filter by whether a person or an AI agent asked the question. */
19246
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18724
19247
  visitorType?: SiteQuestionVisitorType[];
19248
+ /** Filter by the AI agent or bot that asked the question. */
19249
+ visitorBot?: SiteInsightsVisitorBot[];
19250
+ /** Filter by the intent of the question. */
19251
+ intent?: SiteQuestionIntent[];
19252
+ /** Filter by what the site said in the answer about the main thing asked. */
19253
+ siteSaid?: SiteQuestionAnswerSiteSaid[];
19254
+ /** Filter by who should act on the answer (docs, another team, support or nobody). */
19255
+ escalation?: SiteQuestionEscalation[];
19256
+ /** Filter by whether the visitor who asked was signed in to the site. */
19257
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18725
19258
  /** Filter to answers that cited one of these pages as a source, each given as `{spaceId}/{pageId}`. */
18726
19259
  citedPage?: string[];
18727
19260
  /** Filter questions whose text contains this value. */
@@ -18766,8 +19299,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18766
19299
  relevance?: SiteQuestionAnswerRelevance[];
18767
19300
  /** Filter stats by answer channel type. */
18768
19301
  channelType?: SiteChannelType[];
18769
- /** Filter by whether a person or an AI agent asked the question. */
19302
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18770
19303
  visitorType?: SiteQuestionVisitorType[];
19304
+ /** Filter by whether the visitor who asked was signed in to the site. */
19305
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18771
19306
  /** Filter stats by answer resolution. */
18772
19307
  answered?: SiteQuestionAnswerResolution[];
18773
19308
  }, params?: RequestParams) => Promise<HttpResponse<SiteQuestion, any>>;
@@ -18797,8 +19332,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18797
19332
  relevance?: SiteQuestionAnswerRelevance[];
18798
19333
  /** Filter answer sources by answer channel type. */
18799
19334
  channelType?: SiteChannelType[];
18800
- /** Filter by whether a person or an AI agent asked the question. */
19335
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18801
19336
  visitorType?: SiteQuestionVisitorType[];
19337
+ /** Filter by whether the visitor who asked was signed in to the site. */
19338
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18802
19339
  /** Filter answer sources by answer resolution. */
18803
19340
  answered?: SiteQuestionAnswerResolution[];
18804
19341
  }, params?: RequestParams) => Promise<HttpResponse<List & {
@@ -18824,8 +19361,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18824
19361
  relevance?: SiteQuestionAnswerRelevance[];
18825
19362
  /** Filter stats by answer channel type. */
18826
19363
  channelType?: SiteChannelType[];
18827
- /** Filter by whether a person or an AI agent asked the question. */
19364
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18828
19365
  visitorType?: SiteQuestionVisitorType[];
19366
+ /** Filter by the AI agent or bot that asked the question. */
19367
+ visitorBot?: SiteInsightsVisitorBot[];
19368
+ /** Filter by the intent of the question. */
19369
+ intent?: SiteQuestionIntent[];
19370
+ /** Filter by what the site said in the answer about the main thing asked. */
19371
+ siteSaid?: SiteQuestionAnswerSiteSaid[];
19372
+ /** Filter by who should act on the answer (docs, another team, support or nobody). */
19373
+ escalation?: SiteQuestionEscalation[];
19374
+ /** Filter by whether the visitor who asked was signed in to the site. */
19375
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18829
19376
  /** Filter to answers that cited one of these pages as a source, each given as `{spaceId}/{pageId}`. */
18830
19377
  citedPage?: string[];
18831
19378
  /** Filter stats by answer resolution. */
@@ -18853,8 +19400,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18853
19400
  relevance?: SiteQuestionAnswerRelevance[];
18854
19401
  /** Filter answers by channel type. */
18855
19402
  channelType?: SiteChannelType[];
18856
- /** Filter by whether a person or an AI agent asked the question. */
19403
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18857
19404
  visitorType?: SiteQuestionVisitorType[];
19405
+ /** Filter by the AI agent or bot that asked the question. */
19406
+ visitorBot?: SiteInsightsVisitorBot[];
19407
+ /** Filter by the intent of the question. */
19408
+ intent?: SiteQuestionIntent[];
19409
+ /** Filter by what the site said in the answer about the main thing asked. */
19410
+ siteSaid?: SiteQuestionAnswerSiteSaid[];
19411
+ /** Filter by who should act on the answer (docs, another team, support or nobody). */
19412
+ escalation?: SiteQuestionEscalation[];
19413
+ /** Filter by whether the visitor who asked was signed in to the site. */
19414
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18858
19415
  /** Filter to answers that cited one of these pages as a source, each given as `{spaceId}/{pageId}`. */
18859
19416
  citedPage?: string[];
18860
19417
  /** Filter answers by resolution. */
@@ -18886,8 +19443,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
18886
19443
  relevance?: SiteQuestionAnswerRelevance[];
18887
19444
  /** Filter answers by answer channel type. */
18888
19445
  channelType?: SiteChannelType[];
18889
- /** Filter by whether a person or an AI agent asked the question. */
19446
+ /** Filter by who asked the question (a person, an AI agent, another bot, or unknown). */
18890
19447
  visitorType?: SiteQuestionVisitorType[];
19448
+ /** Filter by whether the visitor who asked was signed in to the site. */
19449
+ visitorAuthentication?: SiteQuestionVisitorAuthentication[];
18891
19450
  /** Filter answers by question type. */
18892
19451
  "question.type"?: SiteQuestionType;
18893
19452
  /** Filter answers by associated site topic ID. */
@@ -19571,7 +20130,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
19571
20130
  events: SiteInsightsEvent[];
19572
20131
  }, params?: RequestParams) => Promise<HttpResponse<void, any>>;
19573
20132
  /**
19574
- * @description Runs an aggregation query over a published site's Insights events, grouped and filtered over a time range. Use it to answer analytics questions about how visitors engage with a site's documentation: page views, visitors, searches, referrers, and broken URLs (404s). A 404 is a `page_view` or `search_open_result` event whose `page` is `null`, in the `site` display context; filter `eventPageNotFoundType` not in `conditional` to leave out 404s that adaptive content explains. Group by `datetime` for a trend over time and by `urlPath` for the top broken URLs.
20133
+ * @description Runs an aggregation query over a published site's Insights events, grouped and filtered over a time range. Use it to answer analytics questions about how visitors engage with a site's documentation: page views, visitors, searches, referrers, and broken URLs (404s). A 404 is a `page_view` or `search_open_result` event whose `page` is `null`, in the `site` display context; filter `eventPageNotFoundType` not in `conditional` to leave out 404s that adaptive content explains. Group by `datetime` for a trend over time and by `urlPath` for the top broken URLs. A result holds at most `limit` rows; when more match, pass its `next.page` back as `page` to fetch the rest.
19575
20134
  *
19576
20135
  * @tags site-insights
19577
20136
  * @name AggregateSiteEvents