@gitbook/api 0.171.0 → 0.173.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
@@ -231,6 +231,17 @@ export declare enum SiteInsightsDisplayContext {
231
231
  Embed = "embed",
232
232
  Mcp = "mcp"
233
233
  }
234
+ /** Controls how issue remediation change requests should be handled for a site. */
235
+ export declare enum SiteSettingsFindingChangeRequests {
236
+ Always = "always",
237
+ AutoFixable = "auto-fixable",
238
+ Never = "never"
239
+ }
240
+ /** Controls when topics are being scanned for findings. */
241
+ export declare enum SiteSettingsScanTopics {
242
+ Auto = "auto",
243
+ Never = "never"
244
+ }
234
245
  export declare enum AIModel {
235
246
  Fast = "fast",
236
247
  ReasoningLow = "reasoning-low",
@@ -668,6 +679,11 @@ export declare enum SiteAdsTopic {
668
679
  Webdev = "webdev",
669
680
  Crypto = "crypto"
670
681
  }
682
+ /** Permissions resolution mode for the site. */
683
+ export declare enum SitePermissionsModel {
684
+ Legacy = "legacy",
685
+ Site = "site"
686
+ }
671
687
  /**
672
688
  * The visibility setting of the site determines the audience of the site.
673
689
  * * `public`: Anyone can access the site, and the site is indexed by search engines.
@@ -1004,7 +1020,7 @@ export declare enum ContentVisibility {
1004
1020
  /** Data passed through a realtime channel */
1005
1021
  export type APIChannelData = APIChannelGitSyncOperationData | APIChannelSpaceContentRefsData | APIChannelChangeRequestContentRefsData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
1006
1022
  /** Channel to subscribe to for realtime updates. */
1007
- export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | 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 | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1023
+ export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | 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 | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
1008
1024
  export type PublishedContentRedirect = {
1009
1025
  /** Type of target for the redirect */
1010
1026
  target: "application" | "content";
@@ -1794,6 +1810,8 @@ export interface DocumentTableViewGrid {
1794
1810
  columnWidths?: Record<string, number>;
1795
1811
  /** Should we display the header with column titles */
1796
1812
  hideHeader: boolean;
1813
+ /** Should we keep the table header sticky while the page scrolls */
1814
+ stickyHeader?: boolean;
1797
1815
  /**
1798
1816
  * Tables in GitBook originally used a scaled width approach i.e. the width defined
1799
1817
  * in columnWidths would be scaled to ensure a 100% width table.
@@ -4324,6 +4342,10 @@ export interface Site {
4324
4342
  * * `visitor-auth`: Anyone authenticated through a JWT token can access the site.
4325
4343
  */
4326
4344
  visibility: SiteVisibility;
4345
+ /** Permissions resolution mode for the site. */
4346
+ permissionsModel: SitePermissionsModel;
4347
+ /** Default level for a piece of content */
4348
+ defaultLevel: DefaultLevel;
4327
4349
  /** Whether the site is live or not. If true, the site is accessible to the audience defined by the visibility setting. */
4328
4350
  published: boolean;
4329
4351
  siteSpaces: number;
@@ -4771,6 +4793,8 @@ export interface SiteSpace {
4771
4793
  default?: boolean;
4772
4794
  /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor. */
4773
4795
  condition?: Expression;
4796
+ /** Whether the site space is draft and not live. */
4797
+ draft: boolean;
4774
4798
  /** Whether the space has advanced customization feature enabled */
4775
4799
  hasAdvancedCustomizationFeature?: boolean;
4776
4800
  /** URLs associated with the object */
@@ -4799,6 +4823,8 @@ export interface SiteSection {
4799
4823
  localizedDescription?: LocalizedSectionDescription;
4800
4824
  /** Whether this is the default section for the site */
4801
4825
  default?: boolean;
4826
+ /** Whether the site section is draft and not live. */
4827
+ draft: boolean;
4802
4828
  /** Path to the section on the site */
4803
4829
  path: SiteSectionPath;
4804
4830
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
@@ -4839,6 +4865,8 @@ export interface SiteSectionGroup {
4839
4865
  sections: SiteSection[];
4840
4866
  /** ID of the parent section group this group belongs to */
4841
4867
  sectionGroup?: string;
4868
+ /** Whether the site section group is draft and not live. */
4869
+ draft: boolean;
4842
4870
  /** List of all child sections and groups nested under this group */
4843
4871
  children: (SiteSection | SiteSectionGroup)[];
4844
4872
  /** Name of the icon */
@@ -5666,8 +5694,6 @@ export interface SiteAdaptiveTemplateCondition {
5666
5694
  /** The suggested condition. */
5667
5695
  condition: string;
5668
5696
  }
5669
- /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
5670
- export type LocalizedString = object;
5671
5697
  /** @pattern ^#(?:[0-9a-fA-F]{3}){1,2}$ */
5672
5698
  export type Color = string;
5673
5699
  export interface CustomizationThemedColor {
@@ -5755,7 +5781,7 @@ export interface SiteCustomizationSettingsBase {
5755
5781
  /** Title to use for the published site. If not defined, it'll fallback to the default content title. */
5756
5782
  title?: SiteTitle;
5757
5783
  /** Localized titles for the site, keyed by locale. If not defined, the localized title will not be changed. */
5758
- localizedTitle?: LocalizedString;
5784
+ localizedTitle?: LocalizedTitle;
5759
5785
  styling: {
5760
5786
  /**
5761
5787
  * The theme to apply to the site. Supercedes the old header preset themes.
@@ -6386,6 +6412,13 @@ export interface SiteTopic {
6386
6412
  pages: number;
6387
6413
  /** The number of records in the topic */
6388
6414
  records: number;
6415
+ /** The number of findings linked to the topic */
6416
+ findings: {
6417
+ /** The number of open findings linked to the topic */
6418
+ open: number;
6419
+ /** The total number of findings linked to the topic */
6420
+ total: number;
6421
+ };
6389
6422
  /** Aggregated stats for questions and linked answers. */
6390
6423
  questions: SiteQuestionStats;
6391
6424
  /** URLs associated with the topic */
@@ -6428,6 +6461,8 @@ export type SiteQuestionAnswerSourceRecord = SiteQuestionAnswerSourceBase & {
6428
6461
  type: "record";
6429
6462
  /** The site context record ID. */
6430
6463
  record: string;
6464
+ /** Integration source */
6465
+ connector?: ContextConnector;
6431
6466
  };
6432
6467
  /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
6433
6468
  export interface SiteInsightsSession {
@@ -6450,9 +6485,9 @@ export interface SiteQuestionAnswer {
6450
6485
  topics: string[];
6451
6486
  input: {
6452
6487
  /** Normalized question text for this answer. */
6453
- text?: string;
6488
+ text: string;
6454
6489
  /** Raw question text as asked by the user. */
6455
- raw?: string;
6490
+ raw: string;
6456
6491
  };
6457
6492
  thread?: {
6458
6493
  /** The ID of the thread this answer belongs to. */
@@ -6502,6 +6537,21 @@ export interface AIToolCallGetPageContent {
6502
6537
  revisionId: string;
6503
6538
  page: ChangedRevisionPage;
6504
6539
  }
6540
+ /** Tool to read the body of an external record. */
6541
+ export interface AIToolCallGetRecordContent {
6542
+ tool: "getRecordContent";
6543
+ /** The ID of the site owning the context record. */
6544
+ siteId: string;
6545
+ /** The ID of the context record. */
6546
+ recordId: string;
6547
+ /** The title of the record. */
6548
+ title: string;
6549
+ /**
6550
+ * URL of the record in the source system.
6551
+ * @format uri
6552
+ */
6553
+ url?: string;
6554
+ }
6505
6555
  export interface AIToolCallGetPages {
6506
6556
  tool: "getPages";
6507
6557
  /** The ID of the space being accessed. */
@@ -6703,7 +6753,7 @@ export interface AIToolCallOther {
6703
6753
  /** Summary of a generic tool call. */
6704
6754
  summary: AIToolCallOtherSummary;
6705
6755
  }
6706
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6756
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6707
6757
  export interface Timerange {
6708
6758
  start: Timestamp;
6709
6759
  end: Timestamp;
@@ -6816,7 +6866,7 @@ export type InviteSiteUsersAndTeams = ({
6816
6866
  users: string[];
6817
6867
  }) & {
6818
6868
  /** Role to set. */
6819
- role: MemberRole;
6869
+ role: MemberRoleOrGuest;
6820
6870
  };
6821
6871
  export interface OrganizationPointer {
6822
6872
  type: "organization";
@@ -6833,30 +6883,14 @@ export interface UserSitePermission {
6833
6883
  }
6834
6884
  /** Permission override of a user in a site. */
6835
6885
  export interface UserSitePermissionOverride {
6836
- /**
6837
- * "The role of a member in an organization.
6838
- * "admin": Can administrate the content: create, delete spaces, ...
6839
- * "create": Can create content.
6840
- * "review": Can review content.
6841
- * "edit": Can edit the content (live or change requests).
6842
- * "comment": Can access the content and its discussions.
6843
- * "read": Can access the content, but cannot update it in any way.
6844
- */
6845
- permission: MemberRole;
6886
+ /** The role of a member in an organization, null for guests */
6887
+ permission: MemberRoleOrGuest;
6846
6888
  user: User;
6847
6889
  }
6848
6890
  /** Permission override of a team in a site. */
6849
6891
  export interface TeamSitePermissionOverride {
6850
- /**
6851
- * "The role of a member in an organization.
6852
- * "admin": Can administrate the content: create, delete spaces, ...
6853
- * "create": Can create content.
6854
- * "review": Can review content.
6855
- * "edit": Can edit the content (live or change requests).
6856
- * "comment": Can access the content and its discussions.
6857
- * "read": Can access the content, but cannot update it in any way.
6858
- */
6859
- permission: MemberRole;
6892
+ /** The role of a member in an organization, null for guests */
6893
+ permission: MemberRoleOrGuest;
6860
6894
  team: OrganizationTeam;
6861
6895
  }
6862
6896
  /** Context about the current user sending a message. */
@@ -6986,6 +7020,32 @@ export interface AIStreamResponseAttachment {
6986
7020
  attachment: AIAttachment;
6987
7021
  }
6988
7022
  export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion | AIStreamResponseAttachment;
7023
+ export interface SiteAgentSettingsInput {
7024
+ /** Settings related to scanning for a site. */
7025
+ scans: {
7026
+ /** Controls when topics are being scanned for findings. */
7027
+ topics: SiteSettingsScanTopics;
7028
+ };
7029
+ /** Settings related to processing of findings for a site. */
7030
+ findings: {
7031
+ /** Controls how issue remediation change requests should be handled for a site. */
7032
+ changeRequests: SiteSettingsFindingChangeRequests;
7033
+ };
7034
+ /** Site-specific instructions for the editing agent. */
7035
+ editing: {
7036
+ customInstructions: JSONDocument;
7037
+ };
7038
+ }
7039
+ export type SiteAgentSettings = {
7040
+ object: "site-agent-settings";
7041
+ updatedAt?: Timestamp;
7042
+ /** Identifier of the member who last updated the settings. */
7043
+ updatedBy?: string;
7044
+ urls: {
7045
+ /** Relative URL to the resource in the API. */
7046
+ location: string;
7047
+ };
7048
+ } & SiteAgentSettingsInput;
6989
7049
  /** Analytics info on the GitBook's site session. */
6990
7050
  export type SiteInsightsEventSession = SiteInsightsSession & {
6991
7051
  /** The visitors cookies. */
@@ -8288,6 +8348,10 @@ export interface APIChannelSiteCustomization {
8288
8348
  channel: "site-customization";
8289
8349
  site: string;
8290
8350
  }
8351
+ export interface APIChannelSiteAgentSettings {
8352
+ channel: "site-agent-settings";
8353
+ site: string;
8354
+ }
8291
8355
  export interface APIChannelSiteIntegrations {
8292
8356
  channel: "site-integrations";
8293
8357
  site: string;
@@ -8465,6 +8529,8 @@ export interface MergeRulesEvaluationContext {
8465
8529
  /** The user who is attempting to merge the change request. */
8466
8530
  actor: User;
8467
8531
  }
8532
+ /** Localized string value, keyed by locale. Contains overrides for non-default languages only. */
8533
+ export type LocalizedString = Record<TranslationLanguage, string>;
8468
8534
  export type RequestSpaceTrackPageView = SpaceTrackPageView;
8469
8535
  export type RequestSiteTrackPageView = SiteTrackPageView;
8470
8536
  export type RequestPublishIntegration = PublishIntegration;
@@ -12946,6 +13012,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12946
13012
  /** Basename for the site. For e.g. api */
12947
13013
  basename?: SiteBasename;
12948
13014
  adaptiveContent?: SiteAdaptiveContent;
13015
+ /** Permissions resolution mode for the site. */
13016
+ permissionsModel?: SitePermissionsModel;
13017
+ /** Default level for a piece of content */
13018
+ defaultLevel?: DefaultLevel;
12949
13019
  /** ID of the site-space to be used as the default at the root level. If site has sections, this will mark the default site space in the site's default section. */
12950
13020
  defaultSiteSpace?: string;
12951
13021
  /** ID of the site-section to be used as the default. */
@@ -13324,6 +13394,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13324
13394
  spaceId: string;
13325
13395
  /** ID of the section to add the space to. If not provided, the space will be added to the default section or at the root level if the site has no sections. */
13326
13396
  sectionId?: string;
13397
+ /**
13398
+ * Whether the site space should be created as draft. Defaults to false.
13399
+ * @default false
13400
+ */
13401
+ draft?: boolean;
13327
13402
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
13328
13403
  /**
13329
13404
  * No description
@@ -13388,6 +13463,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13388
13463
  sections?: string[];
13389
13464
  /** ID of the parent section group to nest this group under. If not provided, the section group will be added at the root of the site. */
13390
13465
  parent?: string;
13466
+ /** Whether the section group should be created in draft mode. */
13467
+ draft?: boolean;
13391
13468
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
13392
13469
  /**
13393
13470
  * No description
@@ -13404,6 +13481,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13404
13481
  /** Localized title value, keyed by locale. Contains overrides for non-default languages only. */
13405
13482
  localizedTitle?: LocalizedTitle;
13406
13483
  icon?: Icon | null;
13484
+ /** Whether the site section group is draft and not live. */
13485
+ draft?: boolean;
13407
13486
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
13408
13487
  /**
13409
13488
  * No description
@@ -13422,6 +13501,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13422
13501
  * @name AddSectionToGroup
13423
13502
  * @summary Add a section to a section group
13424
13503
  * @request POST:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections
13504
+ * @deprecated
13425
13505
  * @secure
13426
13506
  */
13427
13507
  addSectionToGroup: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, data: {
@@ -13435,6 +13515,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13435
13515
  * @name RemoveSectionFromGroup
13436
13516
  * @summary Remove a section from a section group
13437
13517
  * @request DELETE:/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/sections/{siteSectionId}
13518
+ * @deprecated
13438
13519
  * @secure
13439
13520
  */
13440
13521
  removeSectionFromGroup: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
@@ -13452,6 +13533,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13452
13533
  spaceId: string;
13453
13534
  title?: SiteSectionTitle | null;
13454
13535
  icon?: Icon | null;
13536
+ /** Whether the section should be created in draft mode. */
13537
+ draft?: boolean;
13538
+ /** ID of the section group to create the section in */
13539
+ siteSectionGroupId?: string;
13455
13540
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
13456
13541
  /**
13457
13542
  * No description
@@ -13497,9 +13582,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13497
13582
  /** 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. */
13498
13583
  condition?: Expression | null;
13499
13584
  icon?: Icon | null;
13585
+ /** Whether the site section is draft and not live. */
13586
+ draft?: boolean;
13500
13587
  description?: SiteSectionDescription | null;
13501
13588
  /** Localized section description value, keyed by locale. Contains overrides for non-default languages only. */
13502
13589
  localizedDescription?: LocalizedSectionDescription;
13590
+ /** ID of the section group to move the section into. Set to null to move the section to the root of the site. */
13591
+ siteSectionGroupId?: string | null;
13503
13592
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
13504
13593
  /**
13505
13594
  * No description
@@ -14149,6 +14238,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14149
14238
  spaceId?: string;
14150
14239
  /** Whether the site space is hidden. If true, the site space will not be shown in the site's navigation. If not set, the hidden state will remain unchanged. If set to false, the site space will be shown in site navigation. */
14151
14240
  hidden?: boolean;
14241
+ /** Whether the site space should be kept in draft mode. Setting it to false makes the site space live. */
14242
+ draft?: boolean;
14152
14243
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
14153
14244
  /**
14154
14245
  * No description
@@ -14598,6 +14689,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14598
14689
  type: SiteCoreChannelType;
14599
14690
  };
14600
14691
  }, params?: RequestParams) => EventIterator<AIStreamResponse>;
14692
+ /**
14693
+ * No description
14694
+ *
14695
+ * @tags site-agent-settings
14696
+ * @name GetSiteAgentSettingsById
14697
+ * @summary Get site agent settings
14698
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/agent-settings
14699
+ * @secure
14700
+ */
14701
+ getSiteAgentSettingsById: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<SiteAgentSettings, {
14702
+ error: {
14703
+ /** @format int32 */
14704
+ code: 400;
14705
+ message: string;
14706
+ };
14707
+ }>>;
14708
+ /**
14709
+ * No description
14710
+ *
14711
+ * @tags site-agent-settings
14712
+ * @name UpdateSiteAgentSettingsById
14713
+ * @summary Update site agent settings
14714
+ * @request PUT:/orgs/{organizationId}/sites/{siteId}/agent-settings
14715
+ * @secure
14716
+ */
14717
+ updateSiteAgentSettingsById: (organizationId: EntityId, siteId: string, data: SiteAgentSettingsInput, params?: RequestParams) => Promise<HttpResponse<SiteAgentSettings, {
14718
+ error: {
14719
+ /** @format int32 */
14720
+ code: 400;
14721
+ message: string;
14722
+ };
14723
+ }>>;
14601
14724
  /**
14602
14725
  * No description
14603
14726
  *
@@ -77,6 +77,7 @@ export declare const SITE_BASENAME_MIN_LENGTH = 1;
77
77
  export declare const SITE_PROXY_ORIGIN_MAX_LENGTH = 512;
78
78
  export declare const SITE_PROXY_ORIGIN_PATTERN = "^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$";
79
79
  export declare const SITE_VISIBILITY_ENUM: ["public", "unlisted", "share-link", "visitor-auth"];
80
+ export declare const SITE_PERMISSIONS_MODEL_ENUM: ["legacy", "site"];
80
81
  export declare const SITE_ADS_TOPIC_ENUM: ["webdev", "crypto"];
81
82
  export declare const SITE_FEATURE_KEY_ENUM: ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-custom-domain", "sites-custom-fonts", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
82
83
  export declare const SITE_CUSTOMIZATION_FEATURE_ENUM: ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
@@ -156,6 +157,8 @@ export declare const SITE_CORE_CHANNEL_TYPE_ENUM: ["site", "embed", "api"];
156
157
  export declare const SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM: ["builtin:slack", "builtin:discord"];
157
158
  export declare const AIMESSAGE_ROLE_ENUM: ["user", "assistant", "developer"];
158
159
  export declare const AIMODEL_ENUM: ["fast", "reasoning-low", "reasoning-medium", "reasoning-high"];
160
+ export declare const SITE_SETTINGS_SCAN_TOPICS_ENUM: ["auto", "never"];
161
+ export declare const SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM: ["always", "auto-fixable", "never"];
159
162
  export declare const SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM: ["site", "server", "embed", "mcp"];
160
163
  export declare const SITE_INSIGHTS_LINK_POSITION_ENUM: ["announcement", "header", "footer", "sidebar", "content"];
161
164
  export declare const SITE_INSIGHTS_TRADEMARK_PLACEMENT_ENUM: ["sidebar", "ad", "footer", "pdf", "embed"];
package/dist/index.cjs CHANGED
@@ -409,6 +409,7 @@ __export(src_exports, {
409
409
  SITE_INSIGHTS_VISITOR_OS_ENUM: () => SITE_INSIGHTS_VISITOR_OS_ENUM,
410
410
  SITE_MCP_SERVER_NAME_MAX_LENGTH: () => SITE_MCP_SERVER_NAME_MAX_LENGTH,
411
411
  SITE_MCP_SERVER_NAME_MIN_LENGTH: () => SITE_MCP_SERVER_NAME_MIN_LENGTH,
412
+ SITE_PERMISSIONS_MODEL_ENUM: () => SITE_PERMISSIONS_MODEL_ENUM,
412
413
  SITE_PROXY_ORIGIN_MAX_LENGTH: () => SITE_PROXY_ORIGIN_MAX_LENGTH,
413
414
  SITE_PROXY_ORIGIN_PATTERN: () => SITE_PROXY_ORIGIN_PATTERN,
414
415
  SITE_QUESTION_ANSWER_HELPFULNESS_ENUM: () => SITE_QUESTION_ANSWER_HELPFULNESS_ENUM,
@@ -427,6 +428,8 @@ __export(src_exports, {
427
428
  SITE_SECTION_PATH_MIN_LENGTH: () => SITE_SECTION_PATH_MIN_LENGTH,
428
429
  SITE_SECTION_TITLE_MAX_LENGTH: () => SITE_SECTION_TITLE_MAX_LENGTH,
429
430
  SITE_SECTION_TITLE_MIN_LENGTH: () => SITE_SECTION_TITLE_MIN_LENGTH,
431
+ SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM: () => SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM,
432
+ SITE_SETTINGS_SCAN_TOPICS_ENUM: () => SITE_SETTINGS_SCAN_TOPICS_ENUM,
430
433
  SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH: () => SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH,
431
434
  SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH: () => SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH,
432
435
  SITE_SOCIAL_ACCOUNT_PLATFORM_ENUM: () => SITE_SOCIAL_ACCOUNT_PLATFORM_ENUM,
@@ -463,12 +466,15 @@ __export(src_exports, {
463
466
  SiteInsightsVisitorBrowser: () => SiteInsightsVisitorBrowser,
464
467
  SiteInsightsVisitorDevice: () => SiteInsightsVisitorDevice,
465
468
  SiteInsightsVisitorOS: () => SiteInsightsVisitorOS,
469
+ SitePermissionsModel: () => SitePermissionsModel,
466
470
  SiteQuestionAnswerHelpfulness: () => SiteQuestionAnswerHelpfulness,
467
471
  SiteQuestionAnswerRelevance: () => SiteQuestionAnswerRelevance,
468
472
  SiteQuestionAnswerResolution: () => SiteQuestionAnswerResolution,
469
473
  SiteQuestionAnswerSourceType: () => SiteQuestionAnswerSourceType,
470
474
  SiteQuestionType: () => SiteQuestionType,
471
475
  SiteScanStatus: () => SiteScanStatus,
476
+ SiteSettingsFindingChangeRequests: () => SiteSettingsFindingChangeRequests,
477
+ SiteSettingsScanTopics: () => SiteSettingsScanTopics,
472
478
  SiteSocialAccountPlatform: () => SiteSocialAccountPlatform,
473
479
  SiteType: () => SiteType,
474
480
  SiteVisibility: () => SiteVisibility,
@@ -490,7 +496,7 @@ module.exports = __toCommonJS(src_exports);
490
496
 
491
497
  // package.json
492
498
  var name = "@gitbook/api";
493
- var version = "0.171.0";
499
+ var version = "0.173.0";
494
500
 
495
501
  // src/client.ts
496
502
  var import_event_iterator = __toESM(require_node(), 1);
@@ -836,6 +842,17 @@ var SiteInsightsDisplayContext = /* @__PURE__ */ ((SiteInsightsDisplayContext2)
836
842
  SiteInsightsDisplayContext2["Mcp"] = "mcp";
837
843
  return SiteInsightsDisplayContext2;
838
844
  })(SiteInsightsDisplayContext || {});
845
+ var SiteSettingsFindingChangeRequests = /* @__PURE__ */ ((SiteSettingsFindingChangeRequests2) => {
846
+ SiteSettingsFindingChangeRequests2["Always"] = "always";
847
+ SiteSettingsFindingChangeRequests2["AutoFixable"] = "auto-fixable";
848
+ SiteSettingsFindingChangeRequests2["Never"] = "never";
849
+ return SiteSettingsFindingChangeRequests2;
850
+ })(SiteSettingsFindingChangeRequests || {});
851
+ var SiteSettingsScanTopics = /* @__PURE__ */ ((SiteSettingsScanTopics2) => {
852
+ SiteSettingsScanTopics2["Auto"] = "auto";
853
+ SiteSettingsScanTopics2["Never"] = "never";
854
+ return SiteSettingsScanTopics2;
855
+ })(SiteSettingsScanTopics || {});
839
856
  var AIModel = /* @__PURE__ */ ((AIModel2) => {
840
857
  AIModel2["Fast"] = "fast";
841
858
  AIModel2["ReasoningLow"] = "reasoning-low";
@@ -1238,6 +1255,11 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
1238
1255
  SiteAdsTopic2["Crypto"] = "crypto";
1239
1256
  return SiteAdsTopic2;
1240
1257
  })(SiteAdsTopic || {});
1258
+ var SitePermissionsModel = /* @__PURE__ */ ((SitePermissionsModel2) => {
1259
+ SitePermissionsModel2["Legacy"] = "legacy";
1260
+ SitePermissionsModel2["Site"] = "site";
1261
+ return SitePermissionsModel2;
1262
+ })(SitePermissionsModel || {});
1241
1263
  var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
1242
1264
  SiteVisibility2["Public"] = "public";
1243
1265
  SiteVisibility2["Unlisted"] = "unlisted";
@@ -4209,6 +4231,22 @@ var Api = class extends HttpClient {
4209
4231
  type: "application/json" /* Json */,
4210
4232
  ...params
4211
4233
  }),
4234
+ getSiteAgentSettingsById: (organizationId, siteId, params = {}) => this.request({
4235
+ path: `/orgs/${organizationId}/sites/${siteId}/agent-settings`,
4236
+ method: "GET",
4237
+ secure: true,
4238
+ format: "json",
4239
+ ...params
4240
+ }),
4241
+ updateSiteAgentSettingsById: (organizationId, siteId, data, params = {}) => this.request({
4242
+ path: `/orgs/${organizationId}/sites/${siteId}/agent-settings`,
4243
+ method: "PUT",
4244
+ body: data,
4245
+ secure: true,
4246
+ type: "application/json" /* Json */,
4247
+ format: "json",
4248
+ ...params
4249
+ }),
4212
4250
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
4213
4251
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
4214
4252
  method: "POST",
@@ -4567,6 +4605,7 @@ var SITE_BASENAME_MIN_LENGTH = 1;
4567
4605
  var SITE_PROXY_ORIGIN_MAX_LENGTH = 512;
4568
4606
  var SITE_PROXY_ORIGIN_PATTERN = "^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$";
4569
4607
  var SITE_VISIBILITY_ENUM = ["public", "unlisted", "share-link", "visitor-auth"];
4608
+ var SITE_PERMISSIONS_MODEL_ENUM = ["legacy", "site"];
4570
4609
  var SITE_ADS_TOPIC_ENUM = ["webdev", "crypto"];
4571
4610
  var SITE_FEATURE_KEY_ENUM = ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-custom-domain", "sites-custom-fonts", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
4572
4611
  var SITE_CUSTOMIZATION_FEATURE_ENUM = ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
@@ -4646,6 +4685,8 @@ var SITE_CORE_CHANNEL_TYPE_ENUM = ["site", "embed", "api"];
4646
4685
  var SITE_CONFIGURABLE_CHANNEL_TYPE_ENUM = ["builtin:slack", "builtin:discord"];
4647
4686
  var AIMESSAGE_ROLE_ENUM = ["user", "assistant", "developer"];
4648
4687
  var AIMODEL_ENUM = ["fast", "reasoning-low", "reasoning-medium", "reasoning-high"];
4688
+ var SITE_SETTINGS_SCAN_TOPICS_ENUM = ["auto", "never"];
4689
+ var SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM = ["always", "auto-fixable", "never"];
4649
4690
  var SITE_INSIGHTS_DISPLAY_CONTEXT_ENUM = ["site", "server", "embed", "mcp"];
4650
4691
  var SITE_INSIGHTS_LINK_POSITION_ENUM = ["announcement", "header", "footer", "sidebar", "content"];
4651
4692
  var SITE_INSIGHTS_TRADEMARK_PLACEMENT_ENUM = ["sidebar", "ad", "footer", "pdf", "embed"];
@@ -4979,6 +5020,7 @@ var GitBookAPI = class extends Api {
4979
5020
  SITE_INSIGHTS_VISITOR_OS_ENUM,
4980
5021
  SITE_MCP_SERVER_NAME_MAX_LENGTH,
4981
5022
  SITE_MCP_SERVER_NAME_MIN_LENGTH,
5023
+ SITE_PERMISSIONS_MODEL_ENUM,
4982
5024
  SITE_PROXY_ORIGIN_MAX_LENGTH,
4983
5025
  SITE_PROXY_ORIGIN_PATTERN,
4984
5026
  SITE_QUESTION_ANSWER_HELPFULNESS_ENUM,
@@ -4997,6 +5039,8 @@ var GitBookAPI = class extends Api {
4997
5039
  SITE_SECTION_PATH_MIN_LENGTH,
4998
5040
  SITE_SECTION_TITLE_MAX_LENGTH,
4999
5041
  SITE_SECTION_TITLE_MIN_LENGTH,
5042
+ SITE_SETTINGS_FINDING_CHANGE_REQUESTS_ENUM,
5043
+ SITE_SETTINGS_SCAN_TOPICS_ENUM,
5000
5044
  SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH,
5001
5045
  SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH,
5002
5046
  SITE_SOCIAL_ACCOUNT_PLATFORM_ENUM,
@@ -5033,12 +5077,15 @@ var GitBookAPI = class extends Api {
5033
5077
  SiteInsightsVisitorBrowser,
5034
5078
  SiteInsightsVisitorDevice,
5035
5079
  SiteInsightsVisitorOS,
5080
+ SitePermissionsModel,
5036
5081
  SiteQuestionAnswerHelpfulness,
5037
5082
  SiteQuestionAnswerRelevance,
5038
5083
  SiteQuestionAnswerResolution,
5039
5084
  SiteQuestionAnswerSourceType,
5040
5085
  SiteQuestionType,
5041
5086
  SiteScanStatus,
5087
+ SiteSettingsFindingChangeRequests,
5088
+ SiteSettingsScanTopics,
5042
5089
  SiteSocialAccountPlatform,
5043
5090
  SiteType,
5044
5091
  SiteVisibility,