@gitbook/api 0.160.1 → 0.162.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
@@ -302,6 +302,8 @@ export interface Space {
302
302
  changeRequestsDraft: number;
303
303
  /** Whether the space is powered by V2 of the content system. */
304
304
  internal_poweredByV2?: boolean;
305
+ /** Whether the space uses a single websocket connection for all real-time communication. */
306
+ internal_singleWebsocket?: boolean;
305
307
  /** The set of permissions for the space */
306
308
  permissions: {
307
309
  /** Can the user view the space content. */
@@ -814,6 +816,8 @@ export interface DocumentBlockHint {
814
816
  key?: string;
815
817
  data: {
816
818
  style: 'info' | 'warning' | 'danger' | 'success';
819
+ /** Name of the icon */
820
+ icon?: Icon;
817
821
  };
818
822
  nodes: DocumentBlocksEssentials[];
819
823
  isVoid?: false;
@@ -1439,7 +1443,7 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
1439
1443
  /** Meta links associated with the page. */
1440
1444
  metaLinks?: RevisionPageMetaLinks;
1441
1445
  /** A list of all the tags added to this page */
1442
- tags?: RevisionPageTag[];
1446
+ tags: RevisionPageTag[];
1443
1447
  } & ({
1444
1448
  computed: ComputedContentSourceDocument;
1445
1449
  /** Seed to use for the generation of IDs. */
@@ -1601,6 +1605,8 @@ export interface RevisionPageLayoutOptions {
1601
1605
  pagination: boolean;
1602
1606
  /** Should the page metadata (last modified, author, etc.) be visible? */
1603
1607
  metadata: boolean;
1608
+ /** Should the tags be visible on the page? */
1609
+ tags: boolean;
1604
1610
  }
1605
1611
  export interface RevisionPageDocumentCover {
1606
1612
  /** Content reference pointing to the source image. */
@@ -1704,12 +1710,18 @@ export type RevisionReusableContent = {
1704
1710
  document?: string;
1705
1711
  });
1706
1712
  /** A reusable tag that different types of content can be associated to (e.g. pages, update entries) */
1707
- export interface RevisionTag {
1713
+ export type RevisionTag = {
1708
1714
  /** The slug identifier for the tag, immutable after creation. */
1709
1715
  slug: string;
1710
1716
  /** Display label for the tag. Can be renamed and differ from the slug. */
1711
1717
  label: string;
1712
- }
1718
+ } & ({
1719
+ /** Unicode codepoint or character of the emoji */
1720
+ emoji: Emoji;
1721
+ } | {
1722
+ /** Name of the icon */
1723
+ icon?: Icon;
1724
+ });
1713
1725
  export interface GitSyncCommit {
1714
1726
  /** SHA for the commit */
1715
1727
  oid: string;
@@ -1733,7 +1745,7 @@ export interface RevisionBase {
1733
1745
  files: RevisionFile[];
1734
1746
  reusableContents: RevisionReusableContent[];
1735
1747
  /** List of available tags within this revision */
1736
- tags?: RevisionTag[];
1748
+ tags: RevisionTag[];
1737
1749
  variables?: Variables;
1738
1750
  /** When the revision was created. */
1739
1751
  createdAt: Timestamp;
@@ -1849,6 +1861,7 @@ export interface ApplySpaceTemplate {
1849
1861
  * Name of the organization
1850
1862
  * @minLength 2
1851
1863
  * @maxLength 255
1864
+ * @pattern \S.*\S
1852
1865
  */
1853
1866
  export type OrganizationTitle = string;
1854
1867
  export type OrganizationEmailDomains = string[];
@@ -4636,7 +4649,7 @@ export interface SearchAIQuery {
4636
4649
  * Page source
4637
4650
  * The source points to a page in a space.
4638
4651
  */
4639
- export interface SearchAIAnswerSource {
4652
+ export interface SearchAIAnswerSourcePage {
4640
4653
  type: 'page';
4641
4654
  /** Short explanation of how the source was used to answer. */
4642
4655
  reason?: string;
@@ -4649,6 +4662,27 @@ export interface SearchAIAnswerSource {
4649
4662
  /** The IDs of the sections of the page that were used to answer the question. */
4650
4663
  sections: string[];
4651
4664
  }
4665
+ /**
4666
+ * Site context record source
4667
+ * The source points to an ingested site context record.
4668
+ */
4669
+ export interface SearchAIAnswerSourceRecord {
4670
+ type: 'record';
4671
+ /** Short explanation of how the source was used to answer. */
4672
+ reason?: string;
4673
+ /** The context record ID of the source. */
4674
+ record: string;
4675
+ /** The site ID owning the source record. */
4676
+ site: string;
4677
+ /** The title of the source record. */
4678
+ title: string;
4679
+ /**
4680
+ * The source URL of the context record.
4681
+ * @format uri
4682
+ */
4683
+ url: string;
4684
+ }
4685
+ export type SearchAIAnswerSource = SearchAIAnswerSourcePage | SearchAIAnswerSourceRecord;
4652
4686
  /** Answer from AI for a question asked on a content. */
4653
4687
  export interface SearchAIAnswer {
4654
4688
  answer?: Document;
@@ -5742,7 +5776,7 @@ export declare enum ContextRecordType {
5742
5776
  Document = "document"
5743
5777
  }
5744
5778
  /** Integration source */
5745
- export type ContextConnector = string | 'builtin:email' | 'builtin:api' | 'builtin:website';
5779
+ export type ContextConnector = string | 'builtin:email' | 'builtin:api' | 'builtin:website' | 'builtin:youtube';
5746
5780
  /**
5747
5781
  * Title for the context record
5748
5782
  * @minLength 1
@@ -5832,6 +5866,12 @@ export type ContextConnectorSetup = {
5832
5866
  /** @format uri */
5833
5867
  url: string;
5834
5868
  };
5869
+ } | {
5870
+ connector: 'builtin:youtube';
5871
+ setupSettings: {
5872
+ /** @pattern ^UC[A-Za-z0-9_-]{22}$ */
5873
+ channelId: string;
5874
+ };
5835
5875
  };
5836
5876
  export type ContextConnection = {
5837
5877
  object: 'context-connection';
@@ -5897,192 +5937,126 @@ export interface ContextTopic {
5897
5937
  location: string;
5898
5938
  };
5899
5939
  }
5900
- export type SiteSpaceCustomizationSettings = SiteCustomizationSettings & {
5901
- /** Indicates whether the site customization settings have been overridden. */
5902
- hasOverrides: boolean;
5903
- };
5904
- export interface SiteSectionGroupPointer {
5905
- type: 'site-section' | 'site-section-group';
5906
- /** Unique identifier for the site section */
5940
+ /** Aggregated feedback for answers linked to a site question. */
5941
+ export interface SiteQuestionStatsFeedback {
5942
+ /** Count of answers with positive feedback. */
5943
+ positive: number;
5944
+ /** Count of answers with negative feedback. */
5945
+ negative: number;
5946
+ /** Count of answers without feedback. */
5947
+ unrated: number;
5948
+ }
5949
+ /** Aggregated answered assessment for answers linked to a site question. */
5950
+ export interface SiteQuestionStatsAnswered {
5951
+ /** Count of answers assessed as fully answered. */
5952
+ yes: number;
5953
+ /** Count of answers assessed as partially answered. */
5954
+ partially: number;
5955
+ /** Count of answers assessed as not answered. */
5956
+ no: number;
5957
+ }
5958
+ /** Aggregated stats for answers linked to a site question. */
5959
+ export interface SiteQuestionStats {
5960
+ /** Total count of answers linked to the question. */
5961
+ answers: number;
5962
+ /** Aggregated feedback for answers linked to a site question. */
5963
+ feedback: SiteQuestionStatsFeedback;
5964
+ /** Aggregated answered assessment for answers linked to a site question. */
5965
+ answered: SiteQuestionStatsAnswered;
5966
+ }
5967
+ export interface SiteQuestion {
5968
+ object: 'site-question';
5969
+ /** The ID of the site question. */
5907
5970
  id: string;
5908
- }
5909
- /** Position at which to move the site section group. */
5910
- export interface SiteSectionGroupMovePosition {
5911
- before?: SiteSectionGroupPointer;
5912
- after?: SiteSectionGroupPointer;
5913
- }
5914
- export interface SiteSectionPointer {
5915
- type: 'site-section';
5916
- /** Unique identifier for the site section */
5917
- siteSection: string;
5918
- }
5919
- /** Position at which to move the site section to. */
5920
- export interface SiteSectionMovePosition {
5921
- before?: SiteSectionPointer;
5922
- after?: SiteSectionPointer;
5923
- }
5924
- export interface SiteSpacePointer {
5925
- type: 'site-space';
5926
- /** Unique identifier for the site space */
5927
- siteSpace: string;
5928
- }
5929
- /** Position at which to move the site space to. */
5930
- export interface SiteSpaceMovePosition {
5931
- before?: SiteSpacePointer;
5932
- after?: SiteSpacePointer;
5933
- }
5934
- export interface OrganizationPointer {
5935
- type: 'organization';
5936
- /** Unique identifier for the organization */
5937
- organization: string;
5938
- }
5939
- /** Permission of a user in a site. */
5940
- export interface UserSitePermission {
5941
- /** The role of a member in an organization, null for guests */
5942
- permission: MemberRoleOrGuest;
5943
- user: User;
5944
- /** The content or organization that enforced this permission level. */
5945
- origin: SpacePointer | OrganizationPointer;
5946
- }
5947
- /** Context about the current user sending a message. */
5948
- export interface AIMessageContext {
5949
- location?: {
5950
- /** ID of the current space. */
5951
- spaceId: string;
5952
- /** ID of the current page. */
5953
- pageId: string;
5971
+ /** Canonical text for the unique site question. */
5972
+ question: string;
5973
+ createdAt: Timestamp;
5974
+ /** Aggregated stats for answers linked to a site question. */
5975
+ stats: SiteQuestionStats;
5976
+ /** URLs associated with the site question. */
5977
+ urls: {
5978
+ /**
5979
+ * URL of the site question in the API.
5980
+ * @format uri
5981
+ */
5982
+ location: string;
5954
5983
  };
5955
5984
  }
5956
- export interface AIAttachmentImage {
5957
- type: 'image';
5958
- url: URL;
5985
+ /** Whether the response answered the question. */
5986
+ export declare enum SiteQuestionAnswerResolution {
5987
+ No = "no",
5988
+ Partially = "partially",
5989
+ Yes = "yes"
5959
5990
  }
5960
- export interface AIAttachmentFile {
5961
- type: 'file';
5962
- url: URL;
5963
- /** Name of the file. */
5964
- filename: string;
5965
- contentType: 'application/pdf';
5991
+ /** Confidence in whether the response answered the question. */
5992
+ export declare enum SiteQuestionAnswerConfidence {
5993
+ Low = "low",
5994
+ Medium = "medium",
5995
+ High = "high"
5966
5996
  }
5967
- export type AIAttachment = AIAttachmentImage | AIAttachmentFile;
5968
- /** Input version of an AI message. */
5969
- export interface AIMessageInput {
5970
- role: 'user';
5971
- content: string | JSONDocument;
5972
- /** Context about the current user sending a message. */
5973
- context?: AIMessageContext;
5974
- attachments?: AIAttachment[];
5997
+ /** Relevance classification of the user question. */
5998
+ export declare enum SiteQuestionAnswerRelevance {
5999
+ Relevant = "relevant",
6000
+ Spam = "spam",
6001
+ OffTopic = "off-topic",
6002
+ Unclear = "unclear"
5975
6003
  }
5976
- export declare enum AIModel {
5977
- Fast = "fast",
5978
- ReasoningLow = "reasoning-low",
5979
- ReasoningMedium = "reasoning-medium",
5980
- ReasoningHigh = "reasoning-high"
6004
+ /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
6005
+ export interface SiteInsightsSession {
6006
+ /** GitBook's unique identifier of the visitor. */
6007
+ visitorId: string;
6008
+ /** GitBook's unique identifier of the visitor's session. */
6009
+ sessionId: string;
5981
6010
  }
5982
- /** Description of a tool that can be called from an AI agent. */
5983
- export interface AIToolDefinition {
5984
- /** The name of the tool. It should be unique within the agent. */
5985
- name: string;
5986
- /** The description of the tool, passed to the AI agent. */
5987
- description: string;
5988
- /** JSON schema describing the input of the tool. */
5989
- inputSchema?: {
5990
- type: 'object';
5991
- properties: Record<string, {
5992
- type: 'string' | 'number' | 'boolean' | 'array' | 'object';
5993
- /** Description of the property. */
5994
- description: string;
5995
- [key: string]: any;
5996
- }>;
6011
+ export interface SiteQuestionAnswer {
6012
+ object: 'site-question-answer';
6013
+ /** The ID of the site question answer. */
6014
+ id: string;
6015
+ /** The ID of the parent site question. */
6016
+ question: string;
6017
+ input: {
6018
+ /** Normalized question text for this answer. */
6019
+ text?: string;
6020
+ /** Raw question text as asked by the user. */
6021
+ raw?: string;
6022
+ };
6023
+ thread?: {
6024
+ /** The ID of the thread this answer belongs to. */
6025
+ id: string;
6026
+ /** ID of the previous answer in the same thread. */
6027
+ previous: string;
6028
+ };
6029
+ /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
6030
+ session?: SiteInsightsSession;
6031
+ feedback?: {
6032
+ /** Feedback rating provided by the user. */
6033
+ rating: -1 | 1;
6034
+ };
6035
+ /** The response identifier for this answer. */
6036
+ responseId: string;
6037
+ /** ISO language code of the question. */
6038
+ language: string;
6039
+ /** Whether the response answered the question. */
6040
+ answered: SiteQuestionAnswerResolution;
6041
+ /** Confidence in whether the response answered the question. */
6042
+ confidence: SiteQuestionAnswerConfidence;
6043
+ /** Relevance classification of the user question. */
6044
+ relevance: SiteQuestionAnswerRelevance;
6045
+ createdAt: Timestamp;
6046
+ updatedAt?: Timestamp;
6047
+ /** URLs associated with the site question answer. */
6048
+ urls: {
6049
+ /**
6050
+ * URL of the site question answer in the API.
6051
+ * @format uri
6052
+ */
6053
+ location: string;
5997
6054
  };
5998
6055
  }
5999
- /** Summary of a generic tool call. */
6000
- export interface AIToolCallOtherSummary {
6001
- /** Name of the icon */
6002
- icon: Icon;
6003
- /** Text to display to the user to describe the tool call. */
6004
- text: string;
6005
- }
6006
- /** Result of a tool call. */
6007
- export interface AIToolCallResult {
6008
- /** The name of the tool that was called. */
6009
- tool: string;
6010
- /** The ID of the tool call. */
6011
- toolCallId: string;
6012
- /** The output to the tool call. */
6013
- output: object;
6014
- /** Summary of a generic tool call. */
6015
- summary?: AIToolCallOtherSummary;
6016
- }
6017
- /** When the agent is responding to a comment. */
6018
- export type AIMessageTask = {
6019
- type: 'respond_to_comment';
6020
- /** The ID of the space to respond to the comment in. */
6021
- spaceId: string;
6022
- /** The ID of the change request to respond to the comment in. */
6023
- changeRequestId?: string;
6024
- /** The ID of the comment to respond to. */
6025
- commentId: string;
6026
- } | {
6027
- type: 'review_change_request';
6028
- /** The ID of the space the change request is in. */
6029
- spaceId: string;
6030
- /** The ID of the change request to review. */
6031
- changeRequestId: string;
6032
- } | {
6033
- type: 'implement_change_request';
6034
- /** The ID of the space the change request is in. */
6035
- spaceId: string;
6036
- /** The ID of the change request to implement the task in. */
6037
- changeRequestId: string;
6038
- };
6039
- /** Message emitted by the server to indicate the start of the AI response. */
6040
- export interface AIStreamResponseStart {
6041
- type: 'response_start';
6042
- /** The ID of the message that this event is composing. */
6043
- messageId: string;
6044
- /** When the agent is responding to a comment. */
6045
- task?: AIMessageTask;
6046
- }
6047
- /** The response that generated this message. */
6048
- export interface AIMessageResponseMetadata {
6049
- /** The reason the response was stopped. If not defined, the response finished normally. */
6050
- stopReason?: 'aborted';
6051
- /** The ID of the response that generated this message. It can be undefined if the stream was aborted. */
6052
- id?: string;
6053
- /** The ID of the previous response that this message is based on. */
6054
- previous?: string;
6055
- }
6056
- /** Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests. */
6057
- export interface AIStreamResponseFinish {
6058
- type: 'response_finish';
6059
- /** The ID of the message that this event is composing. */
6060
- messageId: string;
6061
- /**
6062
- * The ID of the response
6063
- * @deprecated
6064
- */
6065
- responseId?: string;
6066
- /** The response metadata associated with the message. */
6067
- response: AIMessageResponseMetadata;
6068
- }
6069
- /** Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block. */
6070
- export interface AIStreamResponseDocument {
6071
- type: 'response_document' | 'response_reasoning';
6072
- /** The ID of the message that this event is composing. */
6073
- messageId: string;
6074
- /** The index of the step of the message that this event is composing. */
6075
- stepIndex: number;
6076
- operation: 'insert' | 'update';
6077
- blocks: DocumentBlocksTopLevels[];
6078
- }
6079
- /** Message emitted by the server to indicate a chunk of the JSON object response. */
6080
- export interface AIStreamResponseObject {
6081
- type: 'response_object';
6082
- /** The ID of the message that this event is composing. */
6083
- messageId: string;
6084
- /** The chunk of the JSON object response */
6085
- jsonChunk: string;
6056
+ export declare enum AIMessageRole {
6057
+ User = "user",
6058
+ Assistant = "assistant",
6059
+ Developer = "developer"
6086
6060
  }
6087
6061
  export interface AIToolCallGetPageContent {
6088
6062
  tool: 'getPageContent';
@@ -6106,8 +6080,12 @@ export interface AIToolCallGetReusableContents {
6106
6080
  /** The revision ID of the space. */
6107
6081
  revisionId: string;
6108
6082
  }
6109
- /** Result of a search */
6110
- export interface AIToolCallSearchResult {
6083
+ /**
6084
+ * Page result
6085
+ * Result of a search matching a page.
6086
+ */
6087
+ export interface AIToolCallSearchResultPage {
6088
+ type: 'page';
6111
6089
  /** The ID of the space */
6112
6090
  spaceId: string;
6113
6091
  /** The ID of the page */
@@ -6121,6 +6099,28 @@ export interface AIToolCallSearchResult {
6121
6099
  /** The description of the result */
6122
6100
  description?: string;
6123
6101
  }
6102
+ /**
6103
+ * Site context record result
6104
+ * Result of a search matching a site context record.
6105
+ */
6106
+ export interface AIToolCallSearchResultRecord {
6107
+ type: 'record';
6108
+ /** The ID of the site owning the context record */
6109
+ siteId: string;
6110
+ /** The ID of the context record */
6111
+ recordId: string;
6112
+ /** The title of the record */
6113
+ title: string;
6114
+ /** The description of the record */
6115
+ description?: string;
6116
+ /**
6117
+ * URL of the record in its original source
6118
+ * @format uri
6119
+ */
6120
+ url?: string;
6121
+ }
6122
+ /** Result of a search */
6123
+ export type AIToolCallSearchResult = AIToolCallSearchResultPage | AIToolCallSearchResultRecord;
6124
6124
  /** Tool to search for content */
6125
6125
  export interface AIToolCallSearch {
6126
6126
  tool: 'search';
@@ -6256,13 +6256,298 @@ export interface AIToolCallMCP {
6256
6256
  /** The title of the tool that has been called. */
6257
6257
  mcpToolTitle?: string;
6258
6258
  }
6259
- /** Any tool call that is unknown by GitBook */
6260
- export interface AIToolCallOther {
6261
- tool: 'other';
6259
+ /** Summary of a generic tool call. */
6260
+ export interface AIToolCallOtherSummary {
6261
+ /** Name of the icon */
6262
+ icon: Icon;
6263
+ /** Text to display to the user to describe the tool call. */
6264
+ text: string;
6265
+ }
6266
+ /** Any tool call that is unknown by GitBook */
6267
+ export interface AIToolCallOther {
6268
+ tool: 'other';
6269
+ /** Summary of a generic tool call. */
6270
+ summary: AIToolCallOtherSummary;
6271
+ }
6272
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6273
+ export interface Timerange {
6274
+ start: Timestamp;
6275
+ end: Timestamp;
6276
+ }
6277
+ export interface AIAttachmentImage {
6278
+ type: 'image';
6279
+ url: URL;
6280
+ }
6281
+ export interface AIAttachmentFile {
6282
+ type: 'file';
6283
+ url: URL;
6284
+ /** Name of the file. */
6285
+ filename: string;
6286
+ contentType: 'application/pdf';
6287
+ }
6288
+ export type AIAttachment = AIAttachmentImage | AIAttachmentFile;
6289
+ /** A step in a message from the AI agent. */
6290
+ export interface AIMessageStep {
6291
+ content: JSONDocument;
6292
+ reasoning?: JSONDocument;
6293
+ toolCalls?: AIToolCall[];
6294
+ /** The timing of the step. */
6295
+ timing?: {
6296
+ reasoning?: Timerange;
6297
+ };
6298
+ attachments?: AIAttachment[];
6299
+ }
6300
+ /** When the agent is responding to a comment. */
6301
+ export type AIMessageTask = {
6302
+ type: 'respond_to_comment';
6303
+ /** The ID of the space to respond to the comment in. */
6304
+ spaceId: string;
6305
+ /** The ID of the change request to respond to the comment in. */
6306
+ changeRequestId?: string;
6307
+ /** The ID of the comment to respond to. */
6308
+ commentId: string;
6309
+ } | {
6310
+ type: 'review_change_request';
6311
+ /** The ID of the space the change request is in. */
6312
+ spaceId: string;
6313
+ /** The ID of the change request to review. */
6314
+ changeRequestId: string;
6315
+ } | {
6316
+ type: 'implement_change_request';
6317
+ /** The ID of the space the change request is in. */
6318
+ spaceId: string;
6319
+ /** The ID of the change request to implement the task in. */
6320
+ changeRequestId: string;
6321
+ };
6322
+ /** The response that generated this message. */
6323
+ export interface AIMessageResponseMetadata {
6324
+ /** The reason the response was stopped. If not defined, the response finished normally. */
6325
+ stopReason?: 'aborted';
6326
+ /** The ID of the response that generated this message. It can be undefined if the stream was aborted. */
6327
+ id?: string;
6328
+ /** The ID of the previous response that this message is based on. */
6329
+ previous?: string;
6330
+ }
6331
+ export interface AIMessage {
6332
+ id: string;
6333
+ role: AIMessageRole;
6334
+ steps: AIMessageStep[];
6335
+ /** When the agent is responding to a comment. */
6336
+ task?: AIMessageTask;
6337
+ /** The response that generated this message. */
6338
+ response?: AIMessageResponseMetadata;
6339
+ }
6340
+ export type SiteQuestionAnswerWithResponse = SiteQuestionAnswer & {
6341
+ response: AIMessage;
6342
+ };
6343
+ export interface SiteQuestionAnswerSourceBase {
6344
+ object: 'site-question-answer-source';
6345
+ /** The ID of the source. */
6346
+ id: string;
6347
+ /** Relative weight of this source in the generated answer. */
6348
+ weight: number;
6349
+ /** The title of the source. */
6350
+ title: string;
6351
+ /** URLs associated with the site question answer. */
6352
+ urls: {
6353
+ /**
6354
+ * URL of the site question answer in the API.
6355
+ * @format uri
6356
+ */
6357
+ location: string;
6358
+ };
6359
+ }
6360
+ /** Source data pointing to a page used for a site question answer. */
6361
+ export type SiteQuestionAnswerSourcePage = SiteQuestionAnswerSourceBase & {
6362
+ type: 'page';
6363
+ /** The space ID of the source page. */
6364
+ space: string;
6365
+ /** The revision ID used for this source page. */
6366
+ revision: string;
6367
+ /** The page ID of the source page. */
6368
+ page: string;
6369
+ };
6370
+ export type SiteQuestionAnswerSourceRecord = SiteQuestionAnswerSourceBase & {
6371
+ type: 'record';
6372
+ /** The site context record ID. */
6373
+ record: string;
6374
+ };
6375
+ export type SiteQuestionAnswerSource = SiteQuestionAnswerSourcePage | SiteQuestionAnswerSourceRecord;
6376
+ export type SiteSpaceCustomizationSettings = SiteCustomizationSettings & {
6377
+ /** Indicates whether the site customization settings have been overridden. */
6378
+ hasOverrides: boolean;
6379
+ };
6380
+ export interface SiteSectionGroupPointer {
6381
+ type: 'site-section' | 'site-section-group';
6382
+ /** Unique identifier for the site section */
6383
+ id: string;
6384
+ }
6385
+ /** Position at which to move the site section group. */
6386
+ export interface SiteSectionGroupMovePosition {
6387
+ before?: SiteSectionGroupPointer;
6388
+ after?: SiteSectionGroupPointer;
6389
+ }
6390
+ export interface SiteSectionPointer {
6391
+ type: 'site-section';
6392
+ /** Unique identifier for the site section */
6393
+ siteSection: string;
6394
+ }
6395
+ /** Position at which to move the site section to. */
6396
+ export interface SiteSectionMovePosition {
6397
+ before?: SiteSectionPointer;
6398
+ after?: SiteSectionPointer;
6399
+ }
6400
+ export interface SiteSpacePointer {
6401
+ type: 'site-space';
6402
+ /** Unique identifier for the site space */
6403
+ siteSpace: string;
6404
+ }
6405
+ /** Position at which to move the site space to. */
6406
+ export interface SiteSpaceMovePosition {
6407
+ before?: SiteSpacePointer;
6408
+ after?: SiteSpacePointer;
6409
+ }
6410
+ export type InviteSiteUsersAndTeams = ({
6411
+ /** @minItems 1 */
6412
+ teams: string[];
6413
+ } | {
6414
+ /** @minItems 1 */
6415
+ users: string[];
6416
+ }) & {
6417
+ /** Role to set. */
6418
+ role: MemberRole;
6419
+ };
6420
+ export interface OrganizationPointer {
6421
+ type: 'organization';
6422
+ /** Unique identifier for the organization */
6423
+ organization: string;
6424
+ }
6425
+ /** Permission of a user in a site. */
6426
+ export interface UserSitePermission {
6427
+ /** The role of a member in an organization, null for guests */
6428
+ permission: MemberRoleOrGuest;
6429
+ user: User;
6430
+ /** The content or organization that enforced this permission level. */
6431
+ origin: SpacePointer | OrganizationPointer;
6432
+ }
6433
+ /** Permission override of a user in a site. */
6434
+ export interface UserSitePermissionOverride {
6435
+ /**
6436
+ * "The role of a member in an organization.
6437
+ * "admin": Can administrate the content: create, delete spaces, ...
6438
+ * "create": Can create content.
6439
+ * "review": Can review content.
6440
+ * "edit": Can edit the content (live or change requests).
6441
+ * "comment": Can access the content and its discussions.
6442
+ * "read": Can access the content, but cannot update it in any way.
6443
+ */
6444
+ permission: MemberRole;
6445
+ user: User;
6446
+ }
6447
+ /** Permission override of a team in a site. */
6448
+ export interface TeamSitePermissionOverride {
6449
+ /**
6450
+ * "The role of a member in an organization.
6451
+ * "admin": Can administrate the content: create, delete spaces, ...
6452
+ * "create": Can create content.
6453
+ * "review": Can review content.
6454
+ * "edit": Can edit the content (live or change requests).
6455
+ * "comment": Can access the content and its discussions.
6456
+ * "read": Can access the content, but cannot update it in any way.
6457
+ */
6458
+ permission: MemberRole;
6459
+ team: OrganizationTeam;
6460
+ }
6461
+ /** Context about the current user sending a message. */
6462
+ export interface AIMessageContext {
6463
+ location?: {
6464
+ /** ID of the current space. */
6465
+ spaceId: string;
6466
+ /** ID of the current page. */
6467
+ pageId: string;
6468
+ };
6469
+ }
6470
+ /** Input version of an AI message. */
6471
+ export interface AIMessageInput {
6472
+ role: 'user';
6473
+ content: string | JSONDocument;
6474
+ /** Context about the current user sending a message. */
6475
+ context?: AIMessageContext;
6476
+ attachments?: AIAttachment[];
6477
+ }
6478
+ export declare enum AIModel {
6479
+ Fast = "fast",
6480
+ ReasoningLow = "reasoning-low",
6481
+ ReasoningMedium = "reasoning-medium",
6482
+ ReasoningHigh = "reasoning-high"
6483
+ }
6484
+ /** Description of a tool that can be called from an AI agent. */
6485
+ export interface AIToolDefinition {
6486
+ /** The name of the tool. It should be unique within the agent. */
6487
+ name: string;
6488
+ /** The description of the tool, passed to the AI agent. */
6489
+ description: string;
6490
+ /** JSON schema describing the input of the tool. */
6491
+ inputSchema?: {
6492
+ type: 'object';
6493
+ properties: Record<string, {
6494
+ type: 'string' | 'number' | 'boolean' | 'array' | 'object';
6495
+ /** Description of the property. */
6496
+ description: string;
6497
+ [key: string]: any;
6498
+ }>;
6499
+ };
6500
+ }
6501
+ /** Result of a tool call. */
6502
+ export interface AIToolCallResult {
6503
+ /** The name of the tool that was called. */
6504
+ tool: string;
6505
+ /** The ID of the tool call. */
6506
+ toolCallId: string;
6507
+ /** The output to the tool call. */
6508
+ output: object;
6262
6509
  /** Summary of a generic tool call. */
6263
- summary: AIToolCallOtherSummary;
6510
+ summary?: AIToolCallOtherSummary;
6511
+ }
6512
+ /** Message emitted by the server to indicate the start of the AI response. */
6513
+ export interface AIStreamResponseStart {
6514
+ type: 'response_start';
6515
+ /** The ID of the message that this event is composing. */
6516
+ messageId: string;
6517
+ /** When the agent is responding to a comment. */
6518
+ task?: AIMessageTask;
6519
+ }
6520
+ /** Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests. */
6521
+ export interface AIStreamResponseFinish {
6522
+ type: 'response_finish';
6523
+ /** The ID of the message that this event is composing. */
6524
+ messageId: string;
6525
+ /**
6526
+ * The ID of the response
6527
+ * @deprecated
6528
+ */
6529
+ responseId?: string;
6530
+ /** The response metadata associated with the message. */
6531
+ response: AIMessageResponseMetadata;
6532
+ }
6533
+ /** Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block. */
6534
+ export interface AIStreamResponseDocument {
6535
+ type: 'response_document' | 'response_reasoning';
6536
+ /** The ID of the message that this event is composing. */
6537
+ messageId: string;
6538
+ /** The index of the step of the message that this event is composing. */
6539
+ stepIndex: number;
6540
+ operation: 'insert' | 'update';
6541
+ blocks: DocumentBlocksTopLevels[];
6542
+ }
6543
+ /** Message emitted by the server to indicate a chunk of the JSON object response. */
6544
+ export interface AIStreamResponseObject {
6545
+ type: 'response_object';
6546
+ /** The ID of the message that this event is composing. */
6547
+ messageId: string;
6548
+ /** The chunk of the JSON object response */
6549
+ jsonChunk: string;
6264
6550
  }
6265
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6266
6551
  /** Message emitted by the server to indicate that the AI has called a tool. */
6267
6552
  export interface AIStreamResponseToolCall {
6268
6553
  type: 'response_tool_call';
@@ -6307,11 +6592,7 @@ export interface AIStreamResponseAttachment {
6307
6592
  }
6308
6593
  export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion | AIStreamResponseAttachment;
6309
6594
  /** Analytics info on the GitBook's site session. */
6310
- export interface SiteInsightsEventSession {
6311
- /** GitBook's unique identifier of the visitor. */
6312
- visitorId: string;
6313
- /** GitBook's unique identifier of the visitor's session. */
6314
- sessionId: string;
6595
+ export type SiteInsightsEventSession = SiteInsightsSession & {
6315
6596
  /** The visitors cookies. */
6316
6597
  cookies: Record<string, string>;
6317
6598
  /**
@@ -6341,7 +6622,7 @@ export interface SiteInsightsEventSession {
6341
6622
  * This is used to identify the visitor with adaptive content.
6342
6623
  */
6343
6624
  visitorAuthClaims?: PlainObject;
6344
- }
6625
+ };
6345
6626
  /** Context in which the event was recorded. */
6346
6627
  export declare enum SiteInsightsDisplayContext {
6347
6628
  Site = "site",
@@ -7088,6 +7369,17 @@ export type BackOfficeSite = Site & {
7088
7369
  /** ID of the organization owning this site */
7089
7370
  organization: string;
7090
7371
  };
7372
+ export type PublishedContentRedirect = {
7373
+ /** Type of target for the redirect */
7374
+ target: 'application' | 'content';
7375
+ redirect: URL;
7376
+ } | {
7377
+ /** Type of target for the redirect */
7378
+ target: 'external';
7379
+ /** ID of the resolved site. */
7380
+ site: string;
7381
+ redirect: URL;
7382
+ };
7091
7383
  /** Site Content */
7092
7384
  export interface PublishedSiteContent {
7093
7385
  /** ID of the site matching. */
@@ -7121,21 +7413,13 @@ export interface PublishedSiteContent {
7121
7413
  /** The canonical URL of the resolution. */
7122
7414
  canonicalUrl: string;
7123
7415
  }
7124
- export type PublishedSiteContentLookup = {
7125
- /** Type of target for the redirect */
7126
- target: 'application' | 'content' | 'external';
7127
- redirect: URL;
7128
- } | PublishedSiteContent;
7416
+ export type PublishedSiteContentLookup = PublishedContentRedirect | PublishedSiteContent;
7129
7417
  /** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
7130
7418
  export interface SiteVisitorPayload {
7131
7419
  /** JWT token generated for a authenticated access session. */
7132
7420
  jwtToken?: string;
7133
7421
  unsignedClaims?: PlainObject;
7134
7422
  }
7135
- export interface Timerange {
7136
- start: Timestamp;
7137
- end: Timestamp;
7138
- }
7139
7423
  /**
7140
7424
  * @minLength 64
7141
7425
  * @maxLength 64
@@ -7874,6 +8158,11 @@ export declare enum SiteAdsStatus {
7874
8158
  Rejected = "rejected",
7875
8159
  Disabled = "disabled"
7876
8160
  }
8161
+ /** Source type used to answer a site question. */
8162
+ export declare enum SiteQuestionAnswerSourceType {
8163
+ Page = "page",
8164
+ Record = "record"
8165
+ }
7877
8166
  export interface Seat {
7878
8167
  object: 'seat';
7879
8168
  /** The unique ID of the organization */
@@ -7885,31 +8174,6 @@ export interface Seat {
7885
8174
  /** @format date-time */
7886
8175
  updatedAt: string;
7887
8176
  }
7888
- export declare enum AIMessageRole {
7889
- User = "user",
7890
- Assistant = "assistant",
7891
- Developer = "developer"
7892
- }
7893
- /** A step in a message from the AI agent. */
7894
- export interface AIMessageStep {
7895
- content: JSONDocument;
7896
- reasoning?: JSONDocument;
7897
- toolCalls?: AIToolCall[];
7898
- /** The timing of the step. */
7899
- timing?: {
7900
- reasoning?: Timerange;
7901
- };
7902
- attachments?: AIAttachment[];
7903
- }
7904
- export interface AIMessage {
7905
- id: string;
7906
- role: AIMessageRole;
7907
- steps: AIMessageStep[];
7908
- /** When the agent is responding to a comment. */
7909
- task?: AIMessageTask;
7910
- /** The response that generated this message. */
7911
- response?: AIMessageResponseMetadata;
7912
- }
7913
8177
  /** Payload emitted by the agent to reset the messages. */
7914
8178
  export interface AgentStreamMessages {
7915
8179
  type: 'messages';
@@ -8340,7 +8604,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8340
8604
  /**
8341
8605
  * No description
8342
8606
  *
8343
- * @tags space-users, space-teams
8607
+ * @tags space-permissions
8344
8608
  * @name InviteToSpace
8345
8609
  * @summary Invite a user or a team to a space
8346
8610
  * @request POST:/spaces/{spaceId}/permissions
@@ -8356,9 +8620,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8356
8620
  /**
8357
8621
  * No description
8358
8622
  *
8359
- * @tags space-teams
8623
+ * @tags space-permissions
8360
8624
  * @name UpdateTeamPermissionInSpace
8361
- * @summary Update a space team permission
8625
+ * @summary Update an org team's permission in a space
8362
8626
  * @request PATCH:/spaces/{spaceId}/permissions/teams/{teamId}
8363
8627
  * @secure
8364
8628
  */
@@ -8375,9 +8639,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8375
8639
  /**
8376
8640
  * No description
8377
8641
  *
8378
- * @tags space-teams
8642
+ * @tags space-permissions
8379
8643
  * @name RemoveTeamFromSpace
8380
- * @summary Remove a space team
8644
+ * @summary Remove an org team from a space
8381
8645
  * @request DELETE:/spaces/{spaceId}/permissions/teams/{teamId}
8382
8646
  * @secure
8383
8647
  */
@@ -8391,7 +8655,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8391
8655
  /**
8392
8656
  * No description
8393
8657
  *
8394
- * @tags space-users
8658
+ * @tags space-permissions
8395
8659
  * @name ListUserPermissionsInSpace
8396
8660
  * @summary List space user permissions
8397
8661
  * @request GET:/spaces/{spaceId}/permissions/users
@@ -8418,7 +8682,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8418
8682
  /**
8419
8683
  * No description
8420
8684
  *
8421
- * @tags space-users
8685
+ * @tags space-permissions
8422
8686
  * @name UpdateUserPermissionInSpace
8423
8687
  * @summary Update space user permissions
8424
8688
  * @request PATCH:/spaces/{spaceId}/permissions/users/{userId}
@@ -8437,7 +8701,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8437
8701
  /**
8438
8702
  * No description
8439
8703
  *
8440
- * @tags space-users
8704
+ * @tags space-permissions
8441
8705
  * @name RemoveUserFromSpace
8442
8706
  * @summary Remove a space user
8443
8707
  * @request DELETE:/spaces/{spaceId}/permissions/users/{userId}
@@ -8447,9 +8711,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8447
8711
  /**
8448
8712
  * No description
8449
8713
  *
8450
- * @tags space-teams
8714
+ * @tags space-permissions
8451
8715
  * @name ListTeamPermissionsInSpace
8452
- * @summary List space team persmissions
8716
+ * @summary List an org team's permission in a space
8453
8717
  * @request GET:/spaces/{spaceId}/permissions/teams
8454
8718
  * @secure
8455
8719
  */
@@ -10027,7 +10291,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10027
10291
  /**
10028
10292
  * No description
10029
10293
  *
10030
- * @tags space-users
10294
+ * @tags space-permissions
10031
10295
  * @name ListPermissionsAggregateInSpace
10032
10296
  * @summary List all space users permissions
10033
10297
  * @request GET:/spaces/{spaceId}/permissions/aggregate
@@ -10258,7 +10522,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10258
10522
  /**
10259
10523
  * No description
10260
10524
  *
10261
- * @tags collection-users
10525
+ * @tags collection-permissions
10262
10526
  * @name InviteToCollection
10263
10527
  * @summary Invite to a collection
10264
10528
  * @request POST:/collections/{collectionId}/permissions
@@ -10274,9 +10538,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10274
10538
  /**
10275
10539
  * No description
10276
10540
  *
10277
- * @tags collection-teams
10541
+ * @tags collection-permissions
10278
10542
  * @name ListTeamPermissionsInCollection
10279
- * @summary List a collection team permissions
10543
+ * @summary List an org team's permission in collection
10280
10544
  * @request GET:/collections/{collectionId}/permissions/teams
10281
10545
  * @secure
10282
10546
  */
@@ -10307,9 +10571,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10307
10571
  /**
10308
10572
  * No description
10309
10573
  *
10310
- * @tags collection-teams
10574
+ * @tags collection-permissions
10311
10575
  * @name UpdateTeamPermissionInCollection
10312
- * @summary Update a collection team permission
10576
+ * @summary Update an org team's permission in a collection
10313
10577
  * @request PATCH:/collections/{collectionId}/permissions/teams/{teamId}
10314
10578
  * @secure
10315
10579
  */
@@ -10326,9 +10590,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10326
10590
  /**
10327
10591
  * No description
10328
10592
  *
10329
- * @tags collection-teams
10593
+ * @tags collection-permissions
10330
10594
  * @name RemoveTeamFromCollection
10331
- * @summary Remove a team from a collection
10595
+ * @summary Remove an org team from a collection
10332
10596
  * @request DELETE:/collections/{collectionId}/permissions/teams/{teamId}
10333
10597
  * @secure
10334
10598
  */
@@ -10336,7 +10600,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10336
10600
  /**
10337
10601
  * No description
10338
10602
  *
10339
- * @tags collection-users
10603
+ * @tags collection-permissions
10340
10604
  * @name ListUserPermissionsInCollection
10341
10605
  * @summary List collection user permissions
10342
10606
  * @request GET:/collections/{collectionId}/permissions/users
@@ -10363,7 +10627,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10363
10627
  /**
10364
10628
  * No description
10365
10629
  *
10366
- * @tags collection-users
10630
+ * @tags collection-permissions
10367
10631
  * @name UpdateUserPermissionInCollection
10368
10632
  * @summary Update a collection user permission
10369
10633
  * @request PATCH:/collections/{collectionId}/permissions/users/{userId}
@@ -10382,7 +10646,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10382
10646
  /**
10383
10647
  * No description
10384
10648
  *
10385
- * @tags collection-users
10649
+ * @tags collection-permissions
10386
10650
  * @name RemoveUserFromCollection
10387
10651
  * @summary Remove a user from a collection
10388
10652
  * @request DELETE:/collections/{collectionId}/permissions/users/{userId}
@@ -10392,7 +10656,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10392
10656
  /**
10393
10657
  * No description
10394
10658
  *
10395
- * @tags collection-users
10659
+ * @tags space-permissions
10396
10660
  * @name ListPermissionsAggregateInCollection
10397
10661
  * @summary List all collections users permissions
10398
10662
  * @request GET:/collections/{collectionId}/permissions/aggregate
@@ -13349,6 +13613,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13349
13613
  /** Optional label for the connection */
13350
13614
  label?: ContextConnectionLabel;
13351
13615
  }, params?: RequestParams) => Promise<HttpResponse<ContextConnection, any>>;
13616
+ /**
13617
+ * No description
13618
+ *
13619
+ * @tags site-context
13620
+ * @name DeleteSiteContextConnectionById
13621
+ * @summary Delete a context connection
13622
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/context-connections/{siteContextConnectionId}
13623
+ * @secure
13624
+ */
13625
+ deleteSiteContextConnectionById: (organizationId: string, siteId: string, siteContextConnectionId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
13352
13626
  /**
13353
13627
  * No description
13354
13628
  *
@@ -13408,6 +13682,101 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13408
13682
  updateSiteContextTopicById: (organizationId: string, siteId: string, siteContextTopicId: string, data: {
13409
13683
  usageSettings: ContextUsageSettings;
13410
13684
  }, params?: RequestParams) => Promise<HttpResponse<ContextTopic, any>>;
13685
+ /**
13686
+ * No description
13687
+ *
13688
+ * @tags site-questions
13689
+ * @name ListSiteQuestions
13690
+ * @summary List all questions in a site
13691
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/questions
13692
+ * @secure
13693
+ */
13694
+ listSiteQuestions: (organizationId: string, siteId: string, query?: {
13695
+ /** Identifier of the page results to fetch. */
13696
+ page?: string;
13697
+ /**
13698
+ * The number of results per page
13699
+ * @min 0
13700
+ * @max 1000
13701
+ */
13702
+ limit?: number;
13703
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
13704
+ items: SiteQuestion[];
13705
+ }, any>>;
13706
+ /**
13707
+ * No description
13708
+ *
13709
+ * @tags site-questions
13710
+ * @name GetSiteQuestionById
13711
+ * @summary Get a site question by ID
13712
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/questions/{siteQuestionId}
13713
+ * @secure
13714
+ */
13715
+ getSiteQuestionById: (organizationId: string, siteId: string, siteQuestionId: string, params?: RequestParams) => Promise<HttpResponse<SiteQuestion, any>>;
13716
+ /**
13717
+ * No description
13718
+ *
13719
+ * @tags site-questions
13720
+ * @name ListSiteQuestionAnswers
13721
+ * @summary List all answers for a site
13722
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/answers
13723
+ * @secure
13724
+ */
13725
+ listSiteQuestionAnswers: (organizationId: string, siteId: string, query?: {
13726
+ /** Filter answers to a specific site question ID. */
13727
+ question?: string;
13728
+ /** Filter answers by ISO language code. */
13729
+ language?: string;
13730
+ /** Filter answers by answered resolution. */
13731
+ answered?: SiteQuestionAnswerResolution;
13732
+ /** Filter answers by answered confidence. */
13733
+ confidence?: SiteQuestionAnswerConfidence;
13734
+ /** Filter answers by question relevance. */
13735
+ relevance?: SiteQuestionAnswerRelevance;
13736
+ /** Filter answers by thread root answer ID. Includes the root answer itself. */
13737
+ thread?: string;
13738
+ /** Identifier of the page results to fetch. */
13739
+ page?: string;
13740
+ /**
13741
+ * The number of results per page
13742
+ * @min 0
13743
+ * @max 1000
13744
+ */
13745
+ limit?: number;
13746
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
13747
+ items: SiteQuestionAnswer[];
13748
+ }, any>>;
13749
+ /**
13750
+ * No description
13751
+ *
13752
+ * @tags site-questions
13753
+ * @name GetSiteQuestionAnswerById
13754
+ * @summary Get a site answer by ID
13755
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/answers/{siteQuestionAnswerId}
13756
+ * @secure
13757
+ */
13758
+ getSiteQuestionAnswerById: (organizationId: string, siteId: string, siteQuestionAnswerId: string, params?: RequestParams) => Promise<HttpResponse<SiteQuestionAnswerWithResponse, any>>;
13759
+ /**
13760
+ * No description
13761
+ *
13762
+ * @tags site-questions
13763
+ * @name ListSiteQuestionAnswerSources
13764
+ * @summary List the sources for an answer
13765
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/answers/{siteQuestionAnswerId}/sources
13766
+ * @secure
13767
+ */
13768
+ listSiteQuestionAnswerSources: (organizationId: string, siteId: string, siteQuestionAnswerId: string, query?: {
13769
+ /** Identifier of the page results to fetch. */
13770
+ page?: string;
13771
+ /**
13772
+ * The number of results per page
13773
+ * @min 0
13774
+ * @max 1000
13775
+ */
13776
+ limit?: number;
13777
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
13778
+ items: SiteQuestionAnswerSource[];
13779
+ }, any>>;
13411
13780
  /**
13412
13781
  * No description
13413
13782
  *
@@ -13682,6 +14051,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13682
14051
  message: string;
13683
14052
  };
13684
14053
  }>>;
14054
+ /**
14055
+ * No description
14056
+ *
14057
+ * @tags site-permissions
14058
+ * @name InviteToSite
14059
+ * @summary Invite a user or a team to a site
14060
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/permissions
14061
+ * @secure
14062
+ */
14063
+ inviteToSite: (organizationId: string, siteId: string, data: InviteSiteUsersAndTeams, params?: RequestParams) => Promise<HttpResponse<void, {
14064
+ error: {
14065
+ /** @format int32 */
14066
+ code: 404;
14067
+ message: string;
14068
+ };
14069
+ }>>;
13685
14070
  /**
13686
14071
  * No description
13687
14072
  *
@@ -13703,6 +14088,134 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13703
14088
  }, params?: RequestParams) => Promise<HttpResponse<List & {
13704
14089
  items: UserSitePermission[];
13705
14090
  }, any>>;
14091
+ /**
14092
+ * No description
14093
+ *
14094
+ * @tags site-users
14095
+ * @name ListUserPermissionsInSite
14096
+ * @summary List site user permissions
14097
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/permissions/users
14098
+ * @secure
14099
+ */
14100
+ listUserPermissionsInSite: (organizationId: string, siteId: string, query?: {
14101
+ /** Identifier of the page results to fetch. */
14102
+ page?: string;
14103
+ /**
14104
+ * The number of results per page
14105
+ * @min 0
14106
+ * @max 1000
14107
+ */
14108
+ limit?: number;
14109
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
14110
+ items: UserSitePermissionOverride[];
14111
+ }, {
14112
+ error: {
14113
+ /** @format int32 */
14114
+ code: 404;
14115
+ message: string;
14116
+ };
14117
+ }>>;
14118
+ /**
14119
+ * No description
14120
+ *
14121
+ * @tags site-users
14122
+ * @name UpdateUserPermissionInSite
14123
+ * @summary Update site user permissions
14124
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/permissions/users/{userId}
14125
+ * @secure
14126
+ */
14127
+ updateUserPermissionInSite: (organizationId: string, siteId: string, userId: string, data: {
14128
+ /**
14129
+ * "The role of a member in an organization.
14130
+ * "admin": Can administrate the content: create, delete spaces, ...
14131
+ * "create": Can create content.
14132
+ * "review": Can review content.
14133
+ * "edit": Can edit the content (live or change requests).
14134
+ * "comment": Can access the content and its discussions.
14135
+ * "read": Can access the content, but cannot update it in any way.
14136
+ */
14137
+ role?: MemberRole;
14138
+ }, params?: RequestParams) => Promise<HttpResponse<void, {
14139
+ error: {
14140
+ /** @format int32 */
14141
+ code: 404;
14142
+ message: string;
14143
+ };
14144
+ }>>;
14145
+ /**
14146
+ * No description
14147
+ *
14148
+ * @tags site-users
14149
+ * @name RemoveUserFromSite
14150
+ * @summary Remove a site user
14151
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/permissions/users/{userId}
14152
+ * @secure
14153
+ */
14154
+ removeUserFromSite: (organizationId: string, siteId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
14155
+ /**
14156
+ * No description
14157
+ *
14158
+ * @tags site-permissions
14159
+ * @name ListTeamPermissionsInSite
14160
+ * @summary List an org team's permission in a site
14161
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/permissions/teams
14162
+ * @secure
14163
+ */
14164
+ listTeamPermissionsInSite: (organizationId: string, siteId: string, query?: {
14165
+ /** Identifier of the page results to fetch. */
14166
+ page?: string;
14167
+ /**
14168
+ * The number of results per page
14169
+ * @min 0
14170
+ * @max 1000
14171
+ */
14172
+ limit?: number;
14173
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
14174
+ items: TeamSitePermissionOverride[];
14175
+ }, {
14176
+ error: {
14177
+ /** @format int32 */
14178
+ code: 404;
14179
+ message: string;
14180
+ };
14181
+ }>>;
14182
+ /**
14183
+ * No description
14184
+ *
14185
+ * @tags site-permissions
14186
+ * @name UpdateTeamPermissionInSite
14187
+ * @summary Update an org team's permission in a site
14188
+ * @request PATCH:/orgs/{organizationId}/sites/{siteId}/permissions/teams/{teamId}
14189
+ * @secure
14190
+ */
14191
+ updateTeamPermissionInSite: (organizationId: string, siteId: string, teamId: string, data: {
14192
+ /**
14193
+ * "The role of a member in an organization.
14194
+ * "admin": Can administrate the content: create, delete spaces, ...
14195
+ * "create": Can create content.
14196
+ * "review": Can review content.
14197
+ * "edit": Can edit the content (live or change requests).
14198
+ * "comment": Can access the content and its discussions.
14199
+ * "read": Can access the content, but cannot update it in any way.
14200
+ */
14201
+ role?: MemberRole;
14202
+ }, params?: RequestParams) => Promise<HttpResponse<void, {
14203
+ error: {
14204
+ /** @format int32 */
14205
+ code: 404;
14206
+ message: string;
14207
+ };
14208
+ }>>;
14209
+ /**
14210
+ * No description
14211
+ *
14212
+ * @tags site-permissions
14213
+ * @name RemoveTeamFromSite
14214
+ * @summary Remove an org team from a site
14215
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/permissions/teams/{teamId}
14216
+ * @secure
14217
+ */
14218
+ removeTeamFromSite: (organizationId: string, siteId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
13706
14219
  /**
13707
14220
  * @description Generate an AI response in a conversation.
13708
14221
  *
@@ -13722,6 +14235,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13722
14235
  tools?: AIToolDefinition[];
13723
14236
  /** Result of a tool call. */
13724
14237
  toolCall?: AIToolCallResult;
14238
+ /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
14239
+ session?: SiteInsightsSession;
13725
14240
  }, params?: RequestParams) => EventIterator<AIStreamResponse>;
13726
14241
  /**
13727
14242
  * No description