@gitbook/api 0.206.0 → 0.207.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -379,6 +379,13 @@ export declare enum SiteQuestionAnswerResolution {
379
379
  Partially = "partially",
380
380
  Yes = "yes"
381
381
  }
382
+ /** Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API. */
383
+ export declare enum SiteQuestionVisitorType {
384
+ Human = "human",
385
+ Agent = "agent",
386
+ Bot = "bot",
387
+ Unknown = "unknown"
388
+ }
382
389
  export declare enum SiteConfigurableChannelType {
383
390
  BuiltinSlack = "builtin:slack",
384
391
  BuiltinDiscord = "builtin:discord",
@@ -445,6 +452,25 @@ export declare enum SiteQuestionType {
445
452
  Reference = "reference",
446
453
  Unknown = "unknown"
447
454
  }
455
+ /**
456
+ * An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
457
+ * - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
458
+ * - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
459
+ * - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
460
+ * - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
461
+ * - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
462
+ * - `ignore` dismisses it.
463
+ * - `restore` reopens a dismissed finding.
464
+ */
465
+ export declare enum SiteFindingAction {
466
+ Approve = "approve",
467
+ Reject = "reject",
468
+ CreateRedirect = "create-redirect",
469
+ MarkResolved = "mark-resolved",
470
+ Reopen = "reopen",
471
+ Ignore = "ignore",
472
+ Restore = "restore"
473
+ }
448
474
  /**
449
475
  * The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `sources` returns the findings with the most linked sources (questions plus records) first. `suggestedFix` is for link findings: those that come with a fix (a suggested redirect, or an outbound link to correct) come before broken URLs the audit found no page for, most severe first within each group. Other finding types sort with the second group. Defaults to 'updatedAt'.
450
476
  * @default "updatedAt"
@@ -459,6 +485,30 @@ export declare enum SiteFindingOrderBy {
459
485
  export declare enum SiteTriageFilterQuestions {
460
486
  Questions = "questions"
461
487
  }
488
+ /**
489
+ * Where a link finding stands, from its status and what GitBook did with it.
490
+ * - `open` needs a fix.
491
+ * - `awaiting-approval` has a redirect GitBook drafted at its path, waiting to be approved or rejected.
492
+ * - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
493
+ * - `ignored` was dismissed.
494
+ */
495
+ export declare enum SiteFindingState {
496
+ Open = "open",
497
+ AwaitingApproval = "awaiting-approval",
498
+ Resolved = "resolved",
499
+ Ignored = "ignored"
500
+ }
501
+ /**
502
+ * What GitBook did on its own to resolve a finding.
503
+ * - `drafted` drafted a fix that waits for approval.
504
+ * - `applied` has its fix live, applied on its own or approved from a draft, resolving the finding.
505
+ * - `undone` had its fix undone or rejected, so GitBook won't try again.
506
+ */
507
+ export declare enum SiteFindingAutoResolution {
508
+ Drafted = "drafted",
509
+ Applied = "applied",
510
+ Undone = "undone"
511
+ }
462
512
  /** Estimated end-user severity of a site finding. */
463
513
  export declare enum SiteFindingSeverity {
464
514
  Low = "low",
@@ -516,6 +566,14 @@ export declare enum SiteChangeRequestMemberStatus {
516
566
  Active = "active",
517
567
  Removed = "removed"
518
568
  }
569
+ /** A step of the setup of a site, in the order they are done. */
570
+ export declare enum SiteSetupStepId {
571
+ FirstEdit = "first-edit",
572
+ Customize = "customize",
573
+ GitSync = "git-sync",
574
+ Domain = "domain",
575
+ Publish = "publish"
576
+ }
519
577
  /** The platform of the social handle. */
520
578
  export declare enum SiteSocialAccountPlatform {
521
579
  Twitter = "twitter",
@@ -777,7 +835,8 @@ export declare enum StorageUploadKind {
777
835
  export declare enum TranslationStatus {
778
836
  Pending = "pending",
779
837
  Running = "running",
780
- Completed = "completed"
838
+ Completed = "completed",
839
+ Failed = "failed"
781
840
  }
782
841
  /** OpenAPI processing error code */
783
842
  export declare enum OpenAPISpecProcessingErrorCode {
@@ -791,6 +850,12 @@ export declare enum OpenAPISpecProcessingState {
791
850
  Progress = "progress",
792
851
  Complete = "complete"
793
852
  }
853
+ /** Identity provider that provisions members through the SCIM connection. */
854
+ export declare enum SCIMConnectionProvider {
855
+ Okta = "okta",
856
+ Entra = "entra",
857
+ Generic = "generic"
858
+ }
794
859
  /**
795
860
  * Status of the provider.
796
861
  * - `active`: The provider is active and can be used to authenticate users.
@@ -813,6 +878,7 @@ export declare enum OrganizationFeature {
813
878
  MembersTeams = "members-teams",
814
879
  MembersTeamOwners = "members-team-owners",
815
880
  SecuritySaml = "security-saml",
881
+ Scim = "scim",
816
882
  ChangeRequestsMergeRules = "change-requests-merge-rules"
817
883
  }
818
884
  /**
@@ -924,7 +990,6 @@ export declare enum SiteFeatureKey {
924
990
  SitesBasicCustomization = "sites-basic-customization",
925
991
  SitesBrokenLinks = "sites-broken-links",
926
992
  SitesCustomDomain = "sites-custom-domain",
927
- SitesCustomFonts = "sites-custom-fonts",
928
993
  SitesCustomSubdirectory = "sites-custom-subdirectory",
929
994
  SitesFullTextSearch = "sites-full-text-search",
930
995
  SitesMultivariantSite = "sites-multivariant-site",
@@ -968,9 +1033,7 @@ export declare enum SiteType {
968
1033
  Basic = "basic",
969
1034
  Premium = "premium",
970
1035
  Ultimate = "ultimate",
971
- Sponsored = "sponsored",
972
- LegacyBasic = "legacy-basic",
973
- LegacyPremium = "legacy-premium"
1036
+ Sponsored = "sponsored"
974
1037
  }
975
1038
  export declare enum PageFeedbackRating {
976
1039
  Bad = "bad",
@@ -1026,9 +1089,6 @@ export declare enum BillingProduct {
1026
1089
  Pro2024 = "pro_2024",
1027
1090
  Enterprise2024 = "enterprise_2024",
1028
1091
  Community2024 = "community_2024",
1029
- Free = "free",
1030
- Plus = "plus",
1031
- Pro = "pro",
1032
1092
  Internal = "internal"
1033
1093
  }
1034
1094
  export declare enum OrganizationCommunityType {
@@ -1090,6 +1150,17 @@ export declare enum IntegrationTarget {
1090
1150
  Space = "space",
1091
1151
  Organization = "organization"
1092
1152
  }
1153
+ /**
1154
+ * Why a member is disabled in an organization.
1155
+ * "billing": The organization's plan has reached its maximum number of members.
1156
+ * "scim": The member was deactivated by the organization's identity provider.
1157
+ * "admin": An organization admin disabled the member.
1158
+ */
1159
+ export declare enum MemberDisabledReason {
1160
+ Billing = "billing",
1161
+ Scim = "scim",
1162
+ Admin = "admin"
1163
+ }
1093
1164
  /** The core layout presets for a page. */
1094
1165
  export declare enum RevisionPageLayoutPreset {
1095
1166
  Docs = "docs",
@@ -1302,14 +1373,19 @@ export declare enum ContentVisibility {
1302
1373
  /** Data passed through a realtime channel */
1303
1374
  export type APIChannelData = APIChannelGitSyncOperationData | APIChannelGitSyncSiteOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
1304
1375
  /** Channel to subscribe to for realtime updates. */
1305
- export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelGitSyncSiteOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1376
+ export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationSCIMConnections | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelGitSyncSiteOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1306
1377
  /** The plan upgrade that would make a feature available. */
1307
1378
  export type FeatureUpgradeRequirement = {
1308
1379
  type: "organization";
1309
1380
  /** An organization feature used for plan access and upgrade prompts. */
1310
1381
  feature: OrganizationFeature;
1311
- /** The minimum organization plan that includes the feature. */
1382
+ /** The internal identifier of the minimum organization plan that includes the feature. The human-readable name is provided in requiredPlanName. */
1312
1383
  requiredPlan: BillingProduct;
1384
+ /**
1385
+ * The human-readable name of the required organization plan.
1386
+ * @example "Pro"
1387
+ */
1388
+ requiredPlanName: string;
1313
1389
  /**
1314
1390
  * Where an admin may upgrade the organization's plan.
1315
1391
  * @format uri
@@ -1319,8 +1395,13 @@ export type FeatureUpgradeRequirement = {
1319
1395
  type: "site";
1320
1396
  /** The site feature identifier */
1321
1397
  feature: SiteFeatureKey;
1322
- /** The minimum site plan that includes the feature. */
1398
+ /** The internal identifier of the minimum site plan that includes the feature. The human-readable name is provided in requiredPlanName. */
1323
1399
  requiredPlan: SiteType;
1400
+ /**
1401
+ * The human-readable name of the required site plan.
1402
+ * @example "Ultimate"
1403
+ */
1404
+ requiredPlanName: string;
1324
1405
  /**
1325
1406
  * Where an admin may upgrade the site's plan.
1326
1407
  * @format uri
@@ -1388,7 +1469,13 @@ export type ChangeRequestContentChange = ({
1388
1469
  operation: "insert_files";
1389
1470
  } & ChangeRequestContentChangeInsertFiles) | ({
1390
1471
  operation: "insert_computed_page";
1391
- } & ChangeRequestContentChangeInsertComputedPage);
1472
+ } & ChangeRequestContentChangeInsertComputedPage) | ({
1473
+ operation: "insert_reusable_contents";
1474
+ } & ChangeRequestContentChangeInsertReusableContents) | ({
1475
+ operation: "update_reusable_content";
1476
+ } & ChangeRequestContentChangeUpdateReusableContent) | ({
1477
+ operation: "delete_reusable_content";
1478
+ } & ChangeRequestContentChangeDeleteReusableContent);
1392
1479
  export type Revision = RevisionTypeEdits | RevisionTypeMerge | RevisionTypeRollback | RevisionTypeUpdate | RevisionTypeComputed;
1393
1480
  export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink | RevisionPageComputed;
1394
1481
  export interface ApiInformation {
@@ -2670,7 +2757,7 @@ export interface DocumentBlockExpandable {
2670
2757
  fragment: "expandable-body";
2671
2758
  type: "expandable-body";
2672
2759
  /** @minItems 1 */
2673
- nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper)[];
2760
+ nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper | DocumentBlockTabs)[];
2674
2761
  }))[];
2675
2762
  meta?: {
2676
2763
  /** Unique ID to be used in an URL for the block. */
@@ -3821,6 +3908,12 @@ export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
3821
3908
  at?: number;
3822
3909
  /** Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path. */
3823
3910
  ref?: string;
3911
+ /**
3912
+ * Stable identifier for the page's content, such as the ID of the record it is generated from. The page's ID is derived from it, so re-inserting a deleted page with the same key restores its ID and links to it keep working. The same key gives the same page ID in every space, including duplicated spaces. To change a page that exists, use `update_page`: an insert whose key matches an existing page, or another insert in the batch, is rejected, so deleting a page and re-inserting its key must be done in separate requests. A re-created page takes over the old page's comments, redirects, insights and history. When two change requests insert the same key, merging both keeps only one of the pages, without a conflict.
3913
+ * @minLength 1
3914
+ * @maxLength 255
3915
+ */
3916
+ stableKey?: string;
3824
3917
  /** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
3825
3918
  document: Document;
3826
3919
  };
@@ -3900,6 +3993,55 @@ export interface ChangeRequestContentChangeInsertComputedPage {
3900
3993
  */
3901
3994
  at?: number;
3902
3995
  }
3996
+ /**
3997
+ * Create reusable content (snippets shared by several pages) in the change request. A markdown document includes one as `{% include "/reusable-content/<reusableContentId>" %}` — use a `ref` to include it from a page in the same batch, or read the generated IDs from `insertedReusableContents`.
3998
+ * @example {"operation":"insert_reusable_contents","reusableContents":[{"ref":"disclaimer","title":"Disclaimer","document":{"markdown":"{% hint style=\"warning\" %}\nThis feature is in beta.\n{% endhint %}\n"}}]}
3999
+ */
4000
+ export interface ChangeRequestContentChangeInsertReusableContents {
4001
+ operation: "insert_reusable_contents";
4002
+ /**
4003
+ * @maxItems 20
4004
+ * @minItems 1
4005
+ */
4006
+ reusableContents: {
4007
+ /** Temporary local reference for the reusable content, used only for the lifetime of this request and never persisted. Pages in the same batch can include it by its ref (e.g. `{% include "./<ref>" %}`), which resolves to the reusable content's ID at apply time — regardless of operation order. A ref must be unique among the reusable content refs of the batch. */
4008
+ ref?: string;
4009
+ /**
4010
+ * Title of the reusable content, shown when picking it in the editor.
4011
+ * @minLength 1
4012
+ * @maxLength 100
4013
+ */
4014
+ title: string;
4015
+ /** Body of the reusable content. */
4016
+ document: Document;
4017
+ }[];
4018
+ }
4019
+ /**
4020
+ * Update an existing reusable content's title and/or document. Its ID is unchanged, so every page including it shows the update.
4021
+ * @example {"operation":"update_reusable_content","reusableContent":"reusable_content_id","title":"Beta disclaimer"}
4022
+ */
4023
+ export interface ChangeRequestContentChangeUpdateReusableContent {
4024
+ operation: "update_reusable_content";
4025
+ /** ID of the reusable content to update. */
4026
+ reusableContent: string;
4027
+ /**
4028
+ * New title of the reusable content. Omit to keep the current title.
4029
+ * @minLength 1
4030
+ * @maxLength 100
4031
+ */
4032
+ title?: string;
4033
+ /** New body of the reusable content. Omit to keep the current body. */
4034
+ document?: Document;
4035
+ }
4036
+ /**
4037
+ * Delete an existing reusable content from the change request.
4038
+ * @example {"operation":"delete_reusable_content","reusableContent":"reusable_content_id"}
4039
+ */
4040
+ export interface ChangeRequestContentChangeDeleteReusableContent {
4041
+ operation: "delete_reusable_content";
4042
+ /** ID of the reusable content to delete. */
4043
+ reusableContent: string;
4044
+ }
3903
4045
  export interface ChangeRequestContentUpdatePageRef {
3904
4046
  /** Type of Object, always equals to "page". */
3905
4047
  object: "page";
@@ -3941,6 +4083,8 @@ export interface ChangeRequestContentUpdate {
3941
4083
  changes: ChangeRequestContentUpdateChange[];
3942
4084
  /** Files created by the `insert_files` changes in this batch, in the order they were inserted. Use their IDs to reference them from a document. */
3943
4085
  insertedFiles?: RevisionFile[];
4086
+ /** Reusable contents created by the `insert_reusable_contents` changes in this batch, in the order they were inserted. Use their IDs to include them from a document. */
4087
+ insertedReusableContents?: RevisionReusableContent[];
3944
4088
  }
3945
4089
  export interface ChangedRevisionPage {
3946
4090
  id: string;
@@ -4094,13 +4238,46 @@ export interface RevisionSemanticChangeTagDeleted {
4094
4238
  }
4095
4239
  export interface RevisionTagChangeAttributes {
4096
4240
  label?: ChangeAttributeString;
4241
+ group?: ChangeAttributeString;
4242
+ parent?: ChangeAttributeString;
4097
4243
  }
4098
4244
  export interface RevisionSemanticChangeTagEdited {
4099
4245
  type: "tag_edited";
4100
4246
  tag: ChangedRevisionTag;
4101
4247
  attributes: RevisionTagChangeAttributes;
4102
4248
  }
4103
- export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited | RevisionSemanticChangeTagCreated | RevisionSemanticChangeTagDeleted | RevisionSemanticChangeTagEdited;
4249
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4250
+ export interface RevisionTagGroup {
4251
+ /** Immutable group identifier, unique within the revision. */
4252
+ slug: string;
4253
+ /** Display name of the group. */
4254
+ label: string;
4255
+ /** Parent group slug. Omitted for root groups. */
4256
+ parent?: string;
4257
+ /** Lexicographic sibling sort key. Break ties using the slug. */
4258
+ orderIndex: string;
4259
+ }
4260
+ export interface RevisionSemanticChangeTagGroupCreated {
4261
+ type: "tag_group_created";
4262
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4263
+ tagGroup: RevisionTagGroup;
4264
+ }
4265
+ export interface RevisionSemanticChangeTagGroupEdited {
4266
+ type: "tag_group_edited";
4267
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4268
+ tagGroup: RevisionTagGroup;
4269
+ attributes: {
4270
+ label?: ChangeAttributeString;
4271
+ parent?: ChangeAttributeString;
4272
+ orderIndex?: ChangeAttributeString;
4273
+ };
4274
+ }
4275
+ export interface RevisionSemanticChangeTagGroupDeleted {
4276
+ type: "tag_group_deleted";
4277
+ /** A space-scoped group of tags in this revision. Groups may contain other groups. */
4278
+ tagGroup: RevisionTagGroup;
4279
+ }
4280
+ export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited | RevisionSemanticChangeTagCreated | RevisionSemanticChangeTagDeleted | RevisionSemanticChangeTagEdited | RevisionSemanticChangeTagGroupCreated | RevisionSemanticChangeTagGroupEdited | RevisionSemanticChangeTagGroupDeleted;
4104
4281
  export interface RevisionSemanticChanges {
4105
4282
  /** The change request object that initiated the changes in the case of a merge revision. */
4106
4283
  mergedFrom?: ChangeRequest;
@@ -4116,6 +4293,8 @@ export interface UpdateCommentReplySchema {
4116
4293
  /** Reactions to remove from the comment. */
4117
4294
  removedReactions?: string[];
4118
4295
  }
4296
+ /** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
4297
+ export type MemberDisabled = false | MemberDisabledReason;
4119
4298
  export interface OrganizationMember {
4120
4299
  /** Type of Object, always equals to "member" */
4121
4300
  object: "member";
@@ -4124,8 +4303,8 @@ export interface OrganizationMember {
4124
4303
  /** The role of a member in an organization, null for guests */
4125
4304
  role: MemberRoleOrGuest;
4126
4305
  user: User;
4127
- /** Whatever the membership of this user is disabled and prevent them from accessing content. */
4128
- disabled: boolean;
4306
+ /** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
4307
+ disabled: MemberDisabled;
4129
4308
  /** Date at which the user joined the organization. */
4130
4309
  joinedAt: Timestamp;
4131
4310
  /** Date at which the user was last seen active in the organization. */
@@ -4410,6 +4589,8 @@ export interface Organization {
4410
4589
  sso?: boolean;
4411
4590
  /** If true, the organization is configured to use all our AI features. */
4412
4591
  ai?: boolean;
4592
+ /** Whether the master AI setting is turned on, regardless of plan availability. Contract overrides forcing AI off take precedence. */
4593
+ aiPreference?: boolean;
4413
4594
  /** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
4414
4595
  aiSettings?: OrganizationAISettings;
4415
4596
  /** Whether AI features have been paused automatically due to lack of AI credits. */
@@ -4459,14 +4640,6 @@ export interface Organization {
4459
4640
  /** A short description giving context on the reason for the block. */
4460
4641
  reason: BlockReason;
4461
4642
  };
4462
- internal_billingMigration?: {
4463
- /** When we will upgrade the organization onto new pricing, if they haven't already. */
4464
- deadline?: Timestamp;
4465
- /** A discount the organization may have received thanks to migrating early. */
4466
- discountPercent?: number;
4467
- /** The expiration date of the discount, after wich regular pricing resumes. */
4468
- discountEndDate?: Timestamp;
4469
- };
4470
4643
  /** The set of permissions for the organization */
4471
4644
  permissions: {
4472
4645
  /** Can the user view the organization. */
@@ -5221,6 +5394,8 @@ export interface Site {
5221
5394
  type: SiteType;
5222
5395
  /** The currently applied type of the site. For example, frozen sites will have this set to Basic. */
5223
5396
  appliedType: SiteType;
5397
+ /** Who unpublished this site last. Cleared when the site is published again. */
5398
+ unpublishedBy?: "user" | "system";
5224
5399
  /** Title of the site */
5225
5400
  title: SiteTitle;
5226
5401
  icon?: CustomizationFavicon | null;
@@ -5813,6 +5988,8 @@ export interface SiteSection {
5813
5988
  default?: boolean;
5814
5989
  /** Whether the site section is draft and not live. */
5815
5990
  draft: boolean;
5991
+ /** Whether the site section is hidden. It is hidden when all of its site spaces are hidden, in which case it is not shown in the site's navigation. */
5992
+ hidden?: boolean;
5816
5993
  /** Path to the section on the site */
5817
5994
  path: SiteSectionPath;
5818
5995
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
@@ -5851,6 +6028,8 @@ export interface SiteSectionGroup {
5851
6028
  * @deprecated
5852
6029
  */
5853
6030
  sections: SiteSection[];
6031
+ /** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor. */
6032
+ condition?: Expression;
5854
6033
  /** ID of the parent section group this group belongs to */
5855
6034
  sectionGroup?: string;
5856
6035
  /** Whether the site section group is draft and not live. */
@@ -6422,34 +6601,6 @@ export type BillingUpgrade = {
6422
6601
  } | {
6423
6602
  result: "interval_changed";
6424
6603
  };
6425
- export interface MigrateOrganizationParameters {
6426
- /** The desired billing interval */
6427
- interval: BillingInterval;
6428
- /** The new product to upgrade to */
6429
- product: "free_2024" | "plus_2024" | "pro_2024";
6430
- /** Changes to apply during a subscription upgrade or downgrade */
6431
- changes: SubscriptionChanges;
6432
- }
6433
- export interface Error {
6434
- error: {
6435
- /** @format int32 */
6436
- code: number;
6437
- message: string;
6438
- };
6439
- }
6440
- export interface BillingDiscount {
6441
- /** How many months the discount will last */
6442
- duration: number;
6443
- /** Percent that will be deducted from the subtotal of the invoice */
6444
- percentOff: number;
6445
- }
6446
- export interface SitePageviews {
6447
- object: "site-pageviews";
6448
- /** The identifier of the site */
6449
- siteId: string;
6450
- /** Number of pageviews in the past 30 days */
6451
- pageviews: number;
6452
- }
6453
6604
  export interface BillingPortal {
6454
6605
  /** URL to the billing portal for an organization */
6455
6606
  url: string;
@@ -6590,6 +6741,47 @@ export interface OrganizationSAMLProvider {
6590
6741
  location: string;
6591
6742
  };
6592
6743
  }
6744
+ /**
6745
+ * Name of the SCIM connection, shown to organization admins.
6746
+ * @minLength 1
6747
+ * @maxLength 100
6748
+ */
6749
+ export type SCIMConnectionLabel = string;
6750
+ /** A SCIM connection through which an identity provider provisions organization members. */
6751
+ export interface OrganizationSCIMConnection {
6752
+ /** The object type, which is always "scim-connection" */
6753
+ object: "scim-connection";
6754
+ /** Unique identifier of the SCIM connection */
6755
+ id: string;
6756
+ /** Name of the SCIM connection, shown to organization admins. */
6757
+ label: SCIMConnectionLabel;
6758
+ /** Identity provider that provisions members through the SCIM connection. */
6759
+ provider: SCIMConnectionProvider;
6760
+ /** SCIM base URL to configure in the identity provider */
6761
+ baseURL: URL;
6762
+ /** Last characters of the current token, to identify it */
6763
+ tokenHint: string;
6764
+ /** Date the current token was created */
6765
+ tokenCreatedAt: Timestamp;
6766
+ /** Date of the last request authenticated with the token */
6767
+ lastUsedAt?: Timestamp;
6768
+ /** Date of creation */
6769
+ createdAt: Timestamp;
6770
+ /** Date of the last update */
6771
+ updatedAt: Timestamp;
6772
+ /** URLs associated with the object */
6773
+ urls: {
6774
+ /** URL of the SCIM connection in the API */
6775
+ location: URL;
6776
+ };
6777
+ }
6778
+ /** A SCIM connection with its token, returned only when the token is created. */
6779
+ export interface OrganizationSCIMConnectionWithToken {
6780
+ /** A SCIM connection through which an identity provider provisions organization members. */
6781
+ connection: OrganizationSCIMConnection;
6782
+ /** Bearer token to configure in the identity provider. It can't be retrieved again. */
6783
+ token: string;
6784
+ }
6593
6785
  export interface OrganizationSSOProviderLogin {
6594
6786
  /** Unique identifier for the provider. */
6595
6787
  id: string;
@@ -6611,14 +6803,7 @@ export interface OrganizationUsageCollections {
6611
6803
  total: number;
6612
6804
  }
6613
6805
  /** Sites usage metrics of an organization */
6614
- export type OrganizationUsageSites = {
6615
- /** Count of all sites */
6616
- total: number;
6617
- /** Count of all legacy basic sites */
6618
- legacyBasic: number;
6619
- /** Count of all legacy premium sites */
6620
- legacyPremium: number;
6621
- } | {
6806
+ export interface OrganizationUsageSites {
6622
6807
  /** Count of all sites */
6623
6808
  total: number;
6624
6809
  /** Count of all basic sites */
@@ -6629,7 +6814,7 @@ export type OrganizationUsageSites = {
6629
6814
  ultimate: number;
6630
6815
  /** Count of all sponsored sites */
6631
6816
  sponsored: number;
6632
- };
6817
+ }
6633
6818
  /** Team members usage metrics of an organization */
6634
6819
  export interface OrganizationUsageTeams {
6635
6820
  /** Count of all teams */
@@ -6637,9 +6822,20 @@ export interface OrganizationUsageTeams {
6637
6822
  }
6638
6823
  /** Members usage metrics of an organization */
6639
6824
  export interface OrganizationUsageMembers {
6640
- /** Count of all members */
6825
+ /** Count of all members, including disabled ones */
6641
6826
  total: number;
6642
- /** Count of all paid seats */
6827
+ /** Count of members that are not disabled */
6828
+ active: number;
6829
+ /** Count of disabled members, by the reason they are disabled */
6830
+ disabled: {
6831
+ billing: number;
6832
+ scim: number;
6833
+ admin: number;
6834
+ };
6835
+ /**
6836
+ * Count of paid seats. On the Free plan, it includes members disabled for billing, since
6837
+ * upgrading re-enables them. On paid plans, it only includes active members.
6838
+ */
6643
6839
  seats: number;
6644
6840
  /** Count of all admins */
6645
6841
  admin: number;
@@ -7170,6 +7366,13 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
7170
7366
  location: string;
7171
7367
  };
7172
7368
  };
7369
+ export interface Error {
7370
+ error: {
7371
+ /** @format int32 */
7372
+ code: number;
7373
+ message: string;
7374
+ };
7375
+ }
7173
7376
  /** Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions. */
7174
7377
  export type SiteAdaptiveRegions = Record<any, {
7175
7378
  /** ISO 3166-1 alpha-2 codes of the countries in the region. */
@@ -7529,6 +7732,17 @@ export interface PublishedContentSite {
7529
7732
  };
7530
7733
  scripts: SiteIntegrationScript[];
7531
7734
  }
7735
+ /** Steps to set up a site, each completed or not from the site's current data. */
7736
+ export interface SiteSetup {
7737
+ /** Every setup step, in order. Empty once the site has been published, which ends the setup even if other steps are not completed. */
7738
+ steps: {
7739
+ /** A step of the setup of a site, in the order they are done. */
7740
+ id: SiteSetupStepId;
7741
+ completed: boolean;
7742
+ /** How to complete the step. Only present when it is not completed. */
7743
+ action?: string;
7744
+ }[];
7745
+ }
7532
7746
  /** State shared by every resource changed by a site change request. Each resource is versioned independently; the change request reviews and merges them as one. */
7533
7747
  export interface SiteChangeRequestMember {
7534
7748
  object: "site-change-request-member";
@@ -7993,6 +8207,37 @@ export type SiteTriageFilterConnections = string;
7993
8207
  * @maxLength 256
7994
8208
  */
7995
8209
  export type SiteFindingTitle = string;
8210
+ /**
8211
+ * Serving redirect
8212
+ * The live redirect serving a `broken-link` finding's path.
8213
+ */
8214
+ export interface SiteFindingServingRedirect {
8215
+ /** ID of the redirect. */
8216
+ redirect: string;
8217
+ /** Whether a wildcard redirect covers the path rather than one at the path itself. Reopening the finding would delete it, so `reopen` isn't offered. */
8218
+ wildcard: boolean;
8219
+ /** Whether GitBook created the redirect on its own. */
8220
+ createdByAgent: boolean;
8221
+ }
8222
+ /**
8223
+ * Available action
8224
+ * An action a finding allows now, with the site permission it needs.
8225
+ */
8226
+ export interface SiteFindingAvailableAction {
8227
+ /**
8228
+ * An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
8229
+ * - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
8230
+ * - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
8231
+ * - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
8232
+ * - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
8233
+ * - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
8234
+ * - `ignore` dismisses it.
8235
+ * - `restore` reopens a dismissed finding.
8236
+ */
8237
+ action: SiteFindingAction;
8238
+ /** Site permission the action needs. */
8239
+ permission: "edit" | "admin";
8240
+ }
7996
8241
  /**
7997
8242
  * The source path to redirect from.
7998
8243
  * @maxLength 512
@@ -8014,20 +8259,22 @@ export interface SiteFindingBrokenLinkAction {
8014
8259
  captureWildcard?: boolean;
8015
8260
  destination?: SiteRedirectInputDestinationPath;
8016
8261
  }
8017
- /** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
8262
+ /** Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type. */
8018
8263
  export interface SiteFindingOutboundLink {
8019
8264
  /**
8020
- * The external URL that fails to resolve.
8265
+ * The external URL that fails. Absent when `host` is set.
8021
8266
  * @format uri
8022
8267
  */
8023
- url: string;
8024
- /** Current health status of the URL for this site. */
8025
- status: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
8268
+ url?: string;
8269
+ /** The domain that doesn't resolve, set instead of `url` when the finding covers every link to that domain on the site. */
8270
+ host?: string;
8271
+ /** Current health status of the URL or domain for this site. */
8272
+ status?: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
8026
8273
  /** Classification of the confirmed failure. */
8027
8274
  failureKind?: "client-error" | "server-error" | "redirect" | "dns" | "tls" | "connection" | "timeout";
8028
8275
  /** HTTP status code of the last observation, when one was received. */
8029
8276
  httpStatus?: number;
8030
- /** When the URL was last observed over HTTP. */
8277
+ /** When the URL or domain was last observed. */
8031
8278
  checkedAt?: Timestamp;
8032
8279
  }
8033
8280
  export interface SiteFinding {
@@ -8071,9 +8318,23 @@ export interface SiteFinding {
8071
8318
  description: JSONDocument;
8072
8319
  /** Whether an AI agent should be able to fix this finding directly */
8073
8320
  autoFixable: boolean;
8321
+ /** What GitBook did on its own to resolve the finding. Null when it never acted on the finding. */
8322
+ autoResolution: SiteFindingAutoResolution | null;
8323
+ /**
8324
+ * Where a link finding stands, from its status and what GitBook did with it.
8325
+ * - `open` needs a fix.
8326
+ * - `awaiting-approval` has a redirect GitBook drafted at its path, waiting to be approved or rejected.
8327
+ * - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
8328
+ * - `ignored` was dismissed.
8329
+ */
8330
+ state?: SiteFindingState;
8331
+ /** The live redirect serving a `broken-link` finding's path. */
8332
+ servingRedirect?: SiteFindingServingRedirect;
8333
+ /** Actions the finding allows now, applied with `applySiteFindingAction`. */
8334
+ actions?: SiteFindingAvailableAction[];
8074
8335
  /** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). The destination is absent when the audit judged the URL and found no page to redirect to: a redirect can still be created from the source with a destination of your choosing. */
8075
8336
  brokenLinkAction?: SiteFindingBrokenLinkAction;
8076
- /** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
8337
+ /** Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type. */
8077
8338
  outboundLink?: SiteFindingOutboundLink;
8078
8339
  createdAt: Timestamp;
8079
8340
  updatedAt: Timestamp;
@@ -8127,6 +8388,13 @@ export interface SiteQuestionStatsTypes {
8127
8388
  export type SiteQuestionStatsChannelTypes = Record<string, number>;
8128
8389
  /** Count of answers by site channel ID. */
8129
8390
  export type SiteQuestionStatsChannels = Record<string, number>;
8391
+ /** Count of answers by visitor type. */
8392
+ export interface SiteQuestionStatsVisitorTypes {
8393
+ human: number;
8394
+ agent: number;
8395
+ bot: number;
8396
+ unknown: number;
8397
+ }
8130
8398
  /** Aggregated stats for questions and linked answers. */
8131
8399
  export interface SiteQuestionStats {
8132
8400
  /** Total count of questions included in the aggregation. */
@@ -8143,6 +8411,8 @@ export interface SiteQuestionStats {
8143
8411
  channelTypes: SiteQuestionStatsChannelTypes;
8144
8412
  /** Count of answers by site channel ID. */
8145
8413
  channels: SiteQuestionStatsChannels;
8414
+ /** Count of answers by visitor type. */
8415
+ visitorTypes: SiteQuestionStatsVisitorTypes;
8146
8416
  /**
8147
8417
  * Weekly count of related question answers for the past 3 months.
8148
8418
  * @maxItems 13
@@ -8602,6 +8872,8 @@ export interface SiteQuestionAnswer {
8602
8872
  /** ID of the associated site channel when the answer originates from a configurable channel. Null if the channel has been deleted. */
8603
8873
  id: string | null;
8604
8874
  };
8875
+ /** Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API. */
8876
+ visitorType: SiteQuestionVisitorType;
8605
8877
  createdAt: Timestamp;
8606
8878
  updatedAt?: Timestamp;
8607
8879
  /** URLs associated with the site question answer. */
@@ -8860,6 +9132,13 @@ export interface AIToolCallArchiveChangeRequest {
8860
9132
  /** Why the agent gave up on implementing the change request. */
8861
9133
  reason: string;
8862
9134
  }
9135
+ export interface AIToolCallMergeChangeRequest {
9136
+ tool: "mergeChangeRequest";
9137
+ /** The ID of the space the change request belongs to. */
9138
+ spaceId: string;
9139
+ /** The ID of the change request that was merged. */
9140
+ changeRequestId: string;
9141
+ }
8863
9142
  export interface AIToolCallComment {
8864
9143
  tool: "comment";
8865
9144
  /** The ID of the space being commented. */
@@ -8926,6 +9205,32 @@ export interface AIToolCallCheckContentImport {
8926
9205
  /** Number of pages the import has discovered so far. */
8927
9206
  totalPages: number;
8928
9207
  }
9208
+ export interface AIToolCallImportOpenAPISpec {
9209
+ tool: "importOpenAPISpec";
9210
+ /** The ID of the space the API reference is added to. */
9211
+ spaceId: string;
9212
+ /** The ID of the change request the API reference is added to. */
9213
+ changeRequestId: string;
9214
+ /** The slug of the OpenAPI spec the reference is generated from. */
9215
+ specSlug: string;
9216
+ /** The URL the spec is imported from, when importing from a URL. */
9217
+ url?: string;
9218
+ /** Name of the attached file the spec is imported from, when importing a file. */
9219
+ file?: string;
9220
+ }
9221
+ export interface AIToolCallSiteSetupStep {
9222
+ tool: "siteSetupStep";
9223
+ /** A step of the setup of a site, in the order they are done. */
9224
+ step: SiteSetupStepId;
9225
+ /**
9226
+ * Where the setup step stands in the conversation.
9227
+ * * `current`: The step is being worked on.
9228
+ * * `done`: The step is completed.
9229
+ * * `skipped`: The user skipped the step.
9230
+ * * `pending`: The step is not started: it waits again after the user went back to an earlier step.
9231
+ */
9232
+ status: "current" | "done" | "skipped" | "pending";
9233
+ }
8929
9234
  /** Tool call recording that the agent started a background agent: a child conversation running one bounded task on its own, in parallel with the conversation that started it. The client renders its live status from `AgentState.backgroundAgents`, matched on `agentId`, and can open the child conversation to read what it did. */
8930
9235
  export interface AIToolCallStartBackgroundAgent {
8931
9236
  tool: "startBackgroundAgent";
@@ -8963,7 +9268,7 @@ export interface AIToolCallOther {
8963
9268
  /** Summary of a generic tool call. */
8964
9269
  summary: AIToolCallOtherSummary;
8965
9270
  }
8966
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallStartBackgroundAgent | AIToolCallMCP | AIToolCallOther;
9271
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallMergeChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallImportOpenAPISpec | AIToolCallSiteSetupStep | AIToolCallStartBackgroundAgent | AIToolCallMCP | AIToolCallOther;
8967
9272
  export interface Timerange {
8968
9273
  start: Timestamp;
8969
9274
  end: Timestamp;
@@ -9082,6 +9387,8 @@ export interface AIMessage {
9082
9387
  * @format date-time
9083
9388
  */
9084
9389
  createdAt?: string;
9390
+ /** The identifier the client gave the message when it sent it. Absent on messages the agent wrote, and on messages sent without one. */
9391
+ clientMessageId?: string;
9085
9392
  }
9086
9393
  export type SiteQuestionAnswerWithResponse = SiteQuestionAnswer & {
9087
9394
  response: AIMessage;
@@ -9154,8 +9461,8 @@ export interface UserSitePermission {
9154
9461
  user: User;
9155
9462
  /** The origin that enforced the effective permission level for a user in a site. */
9156
9463
  origin: UserSitePermissionOrigin;
9157
- /** Whether the user is disabled */
9158
- disabled: boolean;
9464
+ /** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
9465
+ disabled: MemberDisabled;
9159
9466
  /** Date at which the user was last seen */
9160
9467
  lastSeenAt?: Timestamp;
9161
9468
  }
@@ -9178,6 +9485,11 @@ export interface AIMessageInput {
9178
9485
  /** Context about the current user sending a message. */
9179
9486
  context?: AIMessageContext;
9180
9487
  attachments?: AIAttachment[];
9488
+ /**
9489
+ * Identifier the client gives the message it sends, echoed on the message the agent adds to the conversation, so the client can tell its own message apart from any other.
9490
+ * @maxLength 64
9491
+ */
9492
+ clientMessageId?: string;
9181
9493
  }
9182
9494
  /** Description of a tool that can be called from an AI agent. */
9183
9495
  export interface AIToolDefinition {
@@ -9364,6 +9676,11 @@ export interface SiteStyleguideRun {
9364
9676
  createdAt: Timestamp;
9365
9677
  createdBy: User;
9366
9678
  }
9679
+ /**
9680
+ * User agent of the visitor.
9681
+ * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
9682
+ */
9683
+ export type SiteInsightsUserAgent = string;
9367
9684
  /** Analytics info on the GitBook's site session. */
9368
9685
  export type SiteInsightsEventSession = SiteInsightsSession & {
9369
9686
  /** The visitors cookies. */
@@ -9374,10 +9691,10 @@ export type SiteInsightsEventSession = SiteInsightsSession & {
9374
9691
  */
9375
9692
  ip?: string;
9376
9693
  /**
9377
- * User-agent of the visitor.
9694
+ * User agent of the visitor.
9378
9695
  * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
9379
9696
  */
9380
- userAgent: string;
9697
+ userAgent: SiteInsightsUserAgent;
9381
9698
  /**
9382
9699
  * Language of the visitor.
9383
9700
  * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
@@ -9554,11 +9871,21 @@ export interface SiteInsightsQueryDateTimeColumn {
9554
9871
  column: "datetime";
9555
9872
  interval?: "hour" | "day" | "week" | "month";
9556
9873
  }
9557
- /** Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
9874
+ /** Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
9558
9875
  export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
9559
9876
  column: "dayOfWeek";
9877
+ /**
9878
+ * IANA time zone the event is read in, UTC when omitted.
9879
+ * @example "Europe/Paris"
9880
+ */
9881
+ timezone?: string;
9560
9882
  } | {
9561
9883
  column: "hourOfDay";
9884
+ /**
9885
+ * IANA time zone the event is read in, UTC when omitted.
9886
+ * @example "Europe/Paris"
9887
+ */
9888
+ timezone?: string;
9562
9889
  } | {
9563
9890
  column: "url";
9564
9891
  } | {
@@ -9859,7 +10186,7 @@ export interface SiteInsightsQueryEventsAggregation {
9859
10186
  where?: SiteInsightsQueryEventsFilter[];
9860
10187
  groupBy?: SiteInsightsQueryEventsColumn[];
9861
10188
  order?: {
9862
- /** Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
10189
+ /** Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
9863
10190
  by: SiteInsightsQueryEventsColumn;
9864
10191
  direction: "asc" | "desc";
9865
10192
  };
@@ -10084,6 +10411,43 @@ export interface SignedURL {
10084
10411
  /** Expiration time of the signed URL */
10085
10412
  expiresAt: Timestamp;
10086
10413
  }
10414
+ export interface APIProfilingSession {
10415
+ object: "api_cpu_profiling_session";
10416
+ /** @format uuid */
10417
+ id: string;
10418
+ status: "active" | "stopped" | "expired";
10419
+ /** The profiler selected for this session. Earlier sessions without this field use CPU profiling. */
10420
+ mode?: "cpu" | "allocations";
10421
+ releaseVersion: string;
10422
+ releaseBuild: string;
10423
+ /** @format date-time */
10424
+ createdAt: string;
10425
+ /** @format date-time */
10426
+ expiresAt: string;
10427
+ /** @format date-time */
10428
+ stoppedAt?: string;
10429
+ startedBy: string;
10430
+ urls: {
10431
+ location: string;
10432
+ };
10433
+ }
10434
+ export interface APICPUProfile {
10435
+ object: "api_cpu_profile" | "api_allocation_profile";
10436
+ mode?: "cpu" | "allocations";
10437
+ /** @format uuid */
10438
+ id: string;
10439
+ instanceId: string;
10440
+ /** @format date-time */
10441
+ startedAt: string;
10442
+ /** @format date-time */
10443
+ endedAt: string;
10444
+ bytes: number;
10445
+ urls: {
10446
+ location: string;
10447
+ /** Download the raw .cpuprofile or .heapprofile for Chrome DevTools. */
10448
+ devtools?: string;
10449
+ };
10450
+ }
10087
10451
  /** The context to send when purging the CDN Cache */
10088
10452
  export interface PurgeCDNCacheContext {
10089
10453
  /** The list of tags to purge */
@@ -10647,6 +11011,8 @@ export interface GitSyncSiteStructureSectionGroup {
10647
11011
  localizedTitle?: LocalizedString128;
10648
11012
  /** Name of the icon */
10649
11013
  icon?: Icon;
11014
+ /** Expression to evaluate */
11015
+ condition?: Expression;
10650
11016
  /** Whether the section group is draft and not live. */
10651
11017
  draft?: boolean;
10652
11018
  /** Section, section group, or external link nodes nested under this group. */
@@ -11059,6 +11425,12 @@ export interface ContentComputeRevisionEventResponse {
11059
11425
  pages?: InputPage[];
11060
11426
  files?: InputFile[];
11061
11427
  }
11428
+ export interface BillingDiscount {
11429
+ /** How many months the discount will last */
11430
+ duration: number;
11431
+ /** Percent that will be deducted from the subtotal of the invoice */
11432
+ percentOff: number;
11433
+ }
11062
11434
  export type APIScope = IntegrationScope | APIIntegrationScope;
11063
11435
  /** Common properties for all Content API tokens. */
11064
11436
  export interface ContentAPIBaseToken {
@@ -11248,6 +11620,11 @@ export interface APIChannelOrganizationTranslationsGlossary {
11248
11620
  channel: "organization-translations-glossary";
11249
11621
  organization: string;
11250
11622
  }
11623
+ /** Subscription channel for changes in the SCIM connections of an organization. */
11624
+ export interface APIChannelOrganizationSCIMConnections {
11625
+ channel: "organization-scim-connections";
11626
+ organization: string;
11627
+ }
11251
11628
  /** Subscription channel for changes in custom fonts in an organization. */
11252
11629
  export interface APIChannelOrganizationCustomFonts {
11253
11630
  channel: "organization-fonts";
@@ -12912,7 +13289,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12912
13289
  computed?: boolean;
12913
13290
  }, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
12914
13291
  /**
12915
- * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. **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. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
13292
+ * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. **Reusable content** (snippets shared by several pages, Git Sync's `.gitbook/includes/`) is created with `insert_reusable_contents`, changed with `update_reusable_content` and removed with `delete_reusable_content`. A page includes one in markdown as `{% include "/reusable-content/<reusableContentId>" %}`; give a new one a `ref` and a page in the same batch can include it as `{% include "./<ref>" %}`, regardless of operation order. Created reusable contents are listed as `insertedReusableContents` when `compat=false`. An update keeps the ID, so every page including it shows the change. Deleting one leaves the includes in pages unresolved, as in the editor: remove them from those pages too. Reusable content cannot include other reusable content, so an include in its document is dropped. Unlike a link, an include that matches no reusable content of the change request (or of the batch) rejects the batch, since dropping it would remove it from the page silently. **Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "<spec slug>" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `"grouping": "by-operation"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. For change requests with frequent concurrent edits, consider `expectedRevision` to protect against overwriting changes made since your read. If the branch has changed since the supplied revision, the batch is rejected with HTTP 409 and none of the submitted changes are applied. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
12916
13293
  *
12917
13294
  * @tags change-request-content
12918
13295
  * @name UpdateChangeRequestContent
@@ -12921,6 +13298,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12921
13298
  * @secure
12922
13299
  */
12923
13300
  updateChangeRequestContent: (spaceId: EntityId, changeRequestId: EntityId, data: {
13301
+ /**
13302
+ * The saved branch revision on which these changes are based, available in getChangeRequestById's revision field. If the branch has changed, including pending realtime edits, the batch is rejected with 409 and none of the submitted changes are applied. This field is optional and most changes can omit it.
13303
+ * @minLength 1
13304
+ */
13305
+ expectedRevision?: string;
12924
13306
  /**
12925
13307
  * @maxItems 50
12926
13308
  * @minItems 1
@@ -12938,6 +13320,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12938
13320
  code: 404;
12939
13321
  message: string;
12940
13322
  };
13323
+ } | {
13324
+ error: {
13325
+ /** @format int32 */
13326
+ code: 409;
13327
+ message: string;
13328
+ };
12941
13329
  }>>;
12942
13330
  /**
12943
13331
  * @description Returns the full flat list of all pages in the change request's current draft revision, including page groups. Does not include page body content — use the individual page endpoint to fetch content. Use this to get an overview of the draft's page structure before reading or modifying specific pages.
@@ -14873,9 +15261,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14873
15261
  updateMemberInOrganizationById: (organizationId: EntityId, userId: string, data: {
14874
15262
  /** The role of a member in an organization, null for guests */
14875
15263
  role?: MemberRoleOrGuest;
15264
+ /** Disable or re-enable the member. Only members disabled by an admin can be re-enabled. */
15265
+ disabled?: boolean;
14876
15266
  }, params?: RequestParams) => Promise<HttpResponse<OrganizationMember, any>>;
14877
15267
  /**
14878
- * No description
15268
+ * @description Users cannot remove their own membership. Ask another organization admin to remove it.
14879
15269
  *
14880
15270
  * @tags organization-members
14881
15271
  * @name RemoveMemberFromOrganizationById
@@ -15587,6 +15977,130 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15587
15977
  * @secure
15588
15978
  */
15589
15979
  deleteOrganizationSamlProvider: (organizationId: EntityId, samlProviderId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
15980
+ /**
15981
+ * No description
15982
+ *
15983
+ * @tags scim
15984
+ * @name ListOrganizationScimConnections
15985
+ * @summary List SCIM connections
15986
+ * @request GET:/orgs/{organizationId}/scim/connections
15987
+ * @secure
15988
+ */
15989
+ listOrganizationScimConnections: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<List & {
15990
+ items: OrganizationSCIMConnection[];
15991
+ }, {
15992
+ error: {
15993
+ /** @format int32 */
15994
+ code: 404;
15995
+ message: string;
15996
+ };
15997
+ }>>;
15998
+ /**
15999
+ * @description Creates a SCIM connection and its token. The token is only returned in this response.
16000
+ *
16001
+ * @tags scim
16002
+ * @name CreateOrganizationScimConnection
16003
+ * @summary Create a SCIM connection
16004
+ * @request POST:/orgs/{organizationId}/scim/connections
16005
+ * @secure
16006
+ */
16007
+ createOrganizationScimConnection: (organizationId: EntityId, data: {
16008
+ /** Name of the SCIM connection, shown to organization admins. */
16009
+ label: SCIMConnectionLabel;
16010
+ /** Identity provider that provisions members through the SCIM connection. */
16011
+ provider: SCIMConnectionProvider;
16012
+ }, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnectionWithToken, {
16013
+ error: {
16014
+ /** @format int32 */
16015
+ code: 400;
16016
+ message: string;
16017
+ };
16018
+ } | {
16019
+ error: {
16020
+ /** @format int32 */
16021
+ code: 404;
16022
+ message: string;
16023
+ };
16024
+ } | {
16025
+ error: {
16026
+ /** @format int32 */
16027
+ code: 412;
16028
+ message: string;
16029
+ };
16030
+ }>>;
16031
+ /**
16032
+ * No description
16033
+ *
16034
+ * @tags scim
16035
+ * @name GetOrganizationScimConnection
16036
+ * @summary Get a SCIM connection by its ID
16037
+ * @request GET:/orgs/{organizationId}/scim/connections/{scimConnectionId}
16038
+ * @secure
16039
+ */
16040
+ getOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnection, {
16041
+ error: {
16042
+ /** @format int32 */
16043
+ code: 404;
16044
+ message: string;
16045
+ };
16046
+ }>>;
16047
+ /**
16048
+ * No description
16049
+ *
16050
+ * @tags scim
16051
+ * @name UpdateOrganizationScimConnection
16052
+ * @summary Update a SCIM connection
16053
+ * @request PATCH:/orgs/{organizationId}/scim/connections/{scimConnectionId}
16054
+ * @secure
16055
+ */
16056
+ updateOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, data: {
16057
+ /** Name of the SCIM connection, shown to organization admins. */
16058
+ label: SCIMConnectionLabel;
16059
+ }, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnection, {
16060
+ error: {
16061
+ /** @format int32 */
16062
+ code: 400;
16063
+ message: string;
16064
+ };
16065
+ } | {
16066
+ error: {
16067
+ /** @format int32 */
16068
+ code: 404;
16069
+ message: string;
16070
+ };
16071
+ }>>;
16072
+ /**
16073
+ * @description Deletes a SCIM connection. Its token stops working immediately.
16074
+ *
16075
+ * @tags scim
16076
+ * @name DeleteOrganizationScimConnection
16077
+ * @summary Delete a SCIM connection
16078
+ * @request DELETE:/orgs/{organizationId}/scim/connections/{scimConnectionId}
16079
+ * @secure
16080
+ */
16081
+ deleteOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<void, {
16082
+ error: {
16083
+ /** @format int32 */
16084
+ code: 404;
16085
+ message: string;
16086
+ };
16087
+ }>>;
16088
+ /**
16089
+ * @description Replaces the token of a SCIM connection. The previous token stops working immediately, and the new token is only returned in this response.
16090
+ *
16091
+ * @tags scim
16092
+ * @name RotateOrganizationScimConnectionToken
16093
+ * @summary Rotate the token of a SCIM connection
16094
+ * @request POST:/orgs/{organizationId}/scim/connections/{scimConnectionId}/token
16095
+ * @secure
16096
+ */
16097
+ rotateOrganizationScimConnectionToken: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnectionWithToken, {
16098
+ error: {
16099
+ /** @format int32 */
16100
+ code: 404;
16101
+ message: string;
16102
+ };
16103
+ }>>;
15590
16104
  /**
15591
16105
  * No description
15592
16106
  *
@@ -16477,6 +16991,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16477
16991
  /** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
16478
16992
  subscriptionNotice?: SubscriptionNotice;
16479
16993
  }, any>>;
16994
+ /**
16995
+ * @description Lists the steps to set up a site, from a first edit to publishing, and whether each one is completed. Use it to know what is left to do on a site. Returns no steps once the site has been published.
16996
+ *
16997
+ * @tags sites
16998
+ * @name GetSiteSetup
16999
+ * @summary Get the setup steps of a site
17000
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/setup
17001
+ * @secure
17002
+ */
17003
+ getSiteSetup: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<SiteSetup, {
17004
+ error: {
17005
+ /** @format int32 */
17006
+ code: 400;
17007
+ message: string;
17008
+ };
17009
+ }>>;
16480
17010
  /**
16481
17011
  * @description Removes the site from public access by unpublishing it. The site's configuration and content are preserved; use the publish endpoint to make it accessible again. Use this when you need to temporarily hide a site or take it down for maintenance.
16482
17012
  *
@@ -16956,6 +17486,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16956
17486
  addSectionGroupToSite: (organizationId: EntityId, siteId: string, data: {
16957
17487
  /** Title of the site section group */
16958
17488
  title: SiteSectionGroupTitle;
17489
+ /** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). */
17490
+ condition?: Expression;
16959
17491
  icon?: Icon | null;
16960
17492
  /** IDs of the sections to be added to the section group */
16961
17493
  sections?: string[];
@@ -16981,6 +17513,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
16981
17513
  title?: SiteSectionGroupTitle;
16982
17514
  /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
16983
17515
  localizedTitle?: LocalizedString128;
17516
+ /** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
17517
+ condition?: Expression | null;
16984
17518
  icon?: Icon | null;
16985
17519
  /** Whether the site section group should be kept in draft mode. Setting it to true makes the site section group draft. Setting it to false makes the site section group live. */
16986
17520
  draft?: boolean;
@@ -17073,6 +17607,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17073
17607
  path?: SiteSectionPath;
17074
17608
  /** ID of the site-space to be used as the default in this section. */
17075
17609
  defaultSiteSpace?: string;
17610
+ /** Whether to hide the site section from the site's navigation. Setting it updates all the site spaces of the section, and site spaces added to a hidden section are hidden too. The default site section cannot be hidden. */
17611
+ hidden?: boolean;
17076
17612
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
17077
17613
  condition?: Expression | null;
17078
17614
  icon?: Icon | null;
@@ -17449,8 +17985,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17449
17985
  url?: string;
17450
17986
  /** Filter findings by estimated severity. */
17451
17987
  severity?: SiteFindingSeverity;
17988
+ /** Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person. */
17989
+ autoResolution?: SiteFindingAutoResolution;
17990
+ /**
17991
+ * Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
17992
+ * @format date-time
17993
+ */
17994
+ autoResolvedAfter?: string;
17452
17995
  /** Filter findings that have at least one associated change request. */
17453
17996
  hasChangeRequests?: boolean;
17997
+ /** Filter link findings by where they stand, for example `awaiting-approval` for broken links with a redirect GitBook drafted. */
17998
+ state?: SiteFindingState;
17454
17999
  /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are returned. */
17455
18000
  source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
17456
18001
  /**
@@ -17479,12 +18024,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17479
18024
  */
17480
18025
  getSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
17481
18026
  /**
17482
- * @description Changes the status of a documentation issue found by GitBook's AI, typically after fixing it (for example via `triggerChangeRequestsForSiteFinding`) or dismissing it as not worth acting on. This does not edit any content itself — it only records the outcome.
18027
+ * @description Changes the status of a documentation issue found by GitBook's AI. Refuses `broken-link` findings, whose status follows the redirects at their path. Deprecated in favour of `applySiteFindingAction`, which applies one of the `actions` a finding lists: `mark-resolved`, `ignore`, `reopen` or `restore`.
17483
18028
  *
17484
18029
  * @tags site-context
17485
18030
  * @name UpdateSiteFindingById
17486
- * @summary Resolve, dismiss, or reopen a documentation issue
18031
+ * @summary Resolve, dismiss, or reopen a documentation issue. (Deprecated) use applySiteFindingAction instead.
17487
18032
  * @request PATCH:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
18033
+ * @deprecated
17488
18034
  * @secure
17489
18035
  */
17490
18036
  updateSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, data: {
@@ -17591,6 +18137,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17591
18137
  }, params?: RequestParams) => Promise<HttpResponse<List & {
17592
18138
  items: ContextRecord[];
17593
18139
  }, any>>;
18140
+ /**
18141
+ * @description Applies one of the `actions` a finding lists, with the site permission it gives: resolve, dismiss or reopen it, or act on a broken link's redirect. Returns 409 when the finding doesn't allow the action now.
18142
+ *
18143
+ * @tags site-context
18144
+ * @name ApplySiteFindingAction
18145
+ * @summary Apply an action to a finding
18146
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/actions
18147
+ * @secure
18148
+ */
18149
+ applySiteFindingAction: (organizationId: EntityId, siteId: string, siteFindingId: string, data: {
18150
+ /**
18151
+ * An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
18152
+ * - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding.
18153
+ * - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again.
18154
+ * - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
18155
+ * - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
18156
+ * - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
18157
+ * - `ignore` dismisses it.
18158
+ * - `restore` reopens a dismissed finding.
18159
+ */
18160
+ action: SiteFindingAction;
18161
+ }, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
17594
18162
  /**
17595
18163
  * @description Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.
17596
18164
  *
@@ -17609,6 +18177,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17609
18177
  type?: SiteFindingType[];
17610
18178
  /** Filter findings by estimated severity. */
17611
18179
  severity?: SiteFindingSeverity;
18180
+ /** Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person. */
18181
+ autoResolution?: SiteFindingAutoResolution;
18182
+ /**
18183
+ * Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
18184
+ * @format date-time
18185
+ */
18186
+ autoResolvedAfter?: string;
17612
18187
  /** Filter findings that have at least one associated change request. */
17613
18188
  hasChangeRequests?: boolean;
17614
18189
  /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are counted. */
@@ -17745,6 +18320,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17745
18320
  relevance?: SiteQuestionAnswerRelevance[];
17746
18321
  /** Filter stats by answer channel type. */
17747
18322
  channelType?: SiteChannelType[];
18323
+ /** Filter by whether a person or an AI agent asked the question. */
18324
+ visitorType?: SiteQuestionVisitorType[];
17748
18325
  /** Filter stats by answer resolution. */
17749
18326
  answered?: SiteQuestionAnswerResolution[];
17750
18327
  }, params?: RequestParams) => Promise<HttpResponse<{
@@ -17773,7 +18350,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17773
18350
  usageSettings: SiteTopicUsageSettings;
17774
18351
  }, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
17775
18352
  /**
17776
- * @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `updateSiteFindingById` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
18353
+ * @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `applySiteFindingAction` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
17777
18354
  *
17778
18355
  * @tags site-context
17779
18356
  * @name DeleteSiteTopicFindings
@@ -17802,6 +18379,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17802
18379
  relevance?: SiteQuestionAnswerRelevance[];
17803
18380
  /** Filter questions by answer channel type. */
17804
18381
  channelType?: SiteChannelType[];
18382
+ /** Filter by whether a person or an AI agent asked the question. */
18383
+ visitorType?: SiteQuestionVisitorType[];
17805
18384
  /** Filter questions by answer resolution. */
17806
18385
  answered?: SiteQuestionAnswerResolution[];
17807
18386
  /** Filter questions by associated site topic IDs. */
@@ -17842,6 +18421,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17842
18421
  relevance?: SiteQuestionAnswerRelevance[];
17843
18422
  /** Filter stats by answer channel type. */
17844
18423
  channelType?: SiteChannelType[];
18424
+ /** Filter by whether a person or an AI agent asked the question. */
18425
+ visitorType?: SiteQuestionVisitorType[];
17845
18426
  /** Filter stats by answer resolution. */
17846
18427
  answered?: SiteQuestionAnswerResolution[];
17847
18428
  }, params?: RequestParams) => Promise<HttpResponse<SiteQuestion, any>>;
@@ -17871,6 +18452,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17871
18452
  relevance?: SiteQuestionAnswerRelevance[];
17872
18453
  /** Filter answer sources by answer channel type. */
17873
18454
  channelType?: SiteChannelType[];
18455
+ /** Filter by whether a person or an AI agent asked the question. */
18456
+ visitorType?: SiteQuestionVisitorType[];
17874
18457
  /** Filter answer sources by answer resolution. */
17875
18458
  answered?: SiteQuestionAnswerResolution[];
17876
18459
  }, params?: RequestParams) => Promise<HttpResponse<List & {
@@ -17896,6 +18479,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17896
18479
  relevance?: SiteQuestionAnswerRelevance[];
17897
18480
  /** Filter stats by answer channel type. */
17898
18481
  channelType?: SiteChannelType[];
18482
+ /** Filter by whether a person or an AI agent asked the question. */
18483
+ visitorType?: SiteQuestionVisitorType[];
17899
18484
  /** Filter stats by answer resolution. */
17900
18485
  answered?: SiteQuestionAnswerResolution[];
17901
18486
  }, params?: RequestParams) => Promise<HttpResponse<SiteQuestionStats, any>>;
@@ -17925,6 +18510,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
17925
18510
  relevance?: SiteQuestionAnswerRelevance[];
17926
18511
  /** Filter answers by answer channel type. */
17927
18512
  channelType?: SiteChannelType[];
18513
+ /** Filter by whether a person or an AI agent asked the question. */
18514
+ visitorType?: SiteQuestionVisitorType[];
17928
18515
  /** Filter answers by question type. */
17929
18516
  "question.type"?: SiteQuestionType;
17930
18517
  /** Filter answers by associated site topic ID. */