@gitbook/api 0.154.0 → 0.157.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
@@ -117,7 +117,7 @@ export type MergeRule = {
117
117
  /** List of user IDs. */
118
118
  users: string[];
119
119
  } | {
120
- rule: 'require_at_least_one_review' | 'require_all_reviews_approved' | 'require_agent_review' | 'require_up_to_date_change_request' | 'require_change_request_subject' | 'require_change_request_description' | 'require_author_to_merge';
120
+ rule: 'require_at_least_one_review' | 'require_at_least_one_approved_review' | 'require_all_reviews_approved' | 'require_agent_review' | 'require_up_to_date_change_request' | 'require_change_request_subject' | 'require_change_request_description' | 'require_author_to_merge';
121
121
  } | {
122
122
  rule: 'custom';
123
123
  /** Expression to evaluate */
@@ -585,26 +585,12 @@ export declare enum DocumentTextColor {
585
585
  Warning = "$warning",
586
586
  Danger = "$danger"
587
587
  }
588
- export declare enum DocumentTextBackgroundColor {
589
- Default = "default",
590
- Green = "green",
591
- Blue = "blue",
592
- Red = "red",
593
- Orange = "orange",
594
- Yellow = "yellow",
595
- Purple = "purple",
596
- Primary = "$primary",
597
- Info = "$info",
598
- Success = "$success",
599
- Warning = "$warning",
600
- Danger = "$danger"
601
- }
602
588
  export interface DocumentMarkColor {
603
589
  object: 'mark';
604
590
  type: 'color';
605
591
  data: {
606
592
  text: DocumentTextColor;
607
- background: DocumentTextBackgroundColor;
593
+ background: DocumentTextColor;
608
594
  };
609
595
  }
610
596
  export interface DocumentMarkSuperscript {
@@ -1011,7 +997,7 @@ export interface DocumentBlockDivider {
1011
997
  isVoid: true;
1012
998
  data: object;
1013
999
  }
1014
- export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper;
1000
+ export type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockIf;
1015
1001
  export interface DocumentBlockIf {
1016
1002
  object: 'block';
1017
1003
  type: 'if';
@@ -1114,7 +1100,7 @@ export interface DocumentBlockExpandable {
1114
1100
  fragment: 'expandable-body';
1115
1101
  type: 'expandable-body';
1116
1102
  /** @minItems 1 */
1117
- nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockQuote | DocumentBlockReusableContent)[];
1103
+ nodes: (DocumentBlocksEssentials | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockQuote | DocumentBlockReusableContent)[];
1118
1104
  }))[];
1119
1105
  meta?: {
1120
1106
  /** Unique ID to be used in an URL for the block. */
@@ -1303,7 +1289,7 @@ export interface DocumentBlockColumn {
1303
1289
  object: 'block';
1304
1290
  type: 'column';
1305
1291
  key?: string;
1306
- nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable)[];
1292
+ nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper)[];
1307
1293
  isVoid?: false;
1308
1294
  data: {
1309
1295
  width?: Length;
@@ -1353,6 +1339,13 @@ export interface DocumentInlineMention {
1353
1339
  };
1354
1340
  isVoid: true;
1355
1341
  }
1342
+ export type DocumentAction = {
1343
+ action: 'search';
1344
+ query?: string;
1345
+ } | {
1346
+ action: 'ask';
1347
+ query?: string;
1348
+ };
1356
1349
  export interface DocumentInlineButton {
1357
1350
  object: 'inline';
1358
1351
  type: 'button';
@@ -1362,10 +1355,12 @@ export interface DocumentInlineButton {
1362
1355
  kind: 'primary' | 'secondary';
1363
1356
  /** Name of the icon */
1364
1357
  icon?: Icon;
1365
- } & {
1358
+ } & ({
1366
1359
  /** A relative reference to content in GitBook. */
1367
1360
  ref: ContentRef;
1368
- };
1361
+ } | {
1362
+ action: DocumentAction;
1363
+ });
1369
1364
  isVoid: true;
1370
1365
  }
1371
1366
  export interface JSONDocument {
@@ -2763,11 +2758,17 @@ export interface IntegrationContentSource {
2763
2758
  /** ContentKit component for configuration */
2764
2759
  configuration: IntegrationConfigurationComponent;
2765
2760
  }
2761
+ /**
2762
+ * Property title for an integration configuration property
2763
+ * @minLength 2
2764
+ * @maxLength 50
2765
+ */
2766
+ export type IntegrationPropertyTitle = string;
2766
2767
  /** Schema for a configuration */
2767
2768
  export interface IntegrationConfigurationSchema {
2768
2769
  properties: Record<string, {
2769
- /** @maxLength 30 */
2770
- title?: string;
2770
+ /** Property title for an integration configuration property */
2771
+ title?: IntegrationPropertyTitle;
2771
2772
  /** @maxLength 100 */
2772
2773
  description?: string;
2773
2774
  } & ({
@@ -3557,6 +3558,8 @@ export interface Site {
3557
3558
  id: string;
3558
3559
  /** The type of the site */
3559
3560
  type: SiteType;
3561
+ /** The currently applied type of the site. For example, frozen sites will have this set to Basic. */
3562
+ appliedType: SiteType;
3560
3563
  /** Title of the site */
3561
3564
  title: SiteTitle;
3562
3565
  icon?: CustomizationFavicon | null;
@@ -5613,12 +5616,25 @@ export interface AIMessageContext {
5613
5616
  pageId: string;
5614
5617
  };
5615
5618
  }
5619
+ export interface AIAttachmentImage {
5620
+ type: 'image';
5621
+ url: URL;
5622
+ }
5623
+ export interface AIAttachmentFile {
5624
+ type: 'file';
5625
+ url: URL;
5626
+ /** Name of the file. */
5627
+ filename: string;
5628
+ contentType: 'application/pdf';
5629
+ }
5630
+ export type AIAttachment = AIAttachmentImage | AIAttachmentFile;
5616
5631
  /** Input version of an AI message. */
5617
5632
  export interface AIMessageInput {
5618
5633
  role: 'user';
5619
5634
  content: string | JSONDocument;
5620
5635
  /** Context about the current user sending a message. */
5621
5636
  context?: AIMessageContext;
5637
+ attachments?: AIAttachment[];
5622
5638
  }
5623
5639
  export declare enum AIModel {
5624
5640
  Fast = "fast",
@@ -5693,8 +5709,10 @@ export interface AIStreamResponseStart {
5693
5709
  }
5694
5710
  /** The response that generated this message. */
5695
5711
  export interface AIMessageResponseMetadata {
5696
- /** The ID of the response that generated this message. */
5697
- id: string;
5712
+ /** The reason the response was stopped. If not defined, the response finished normally. */
5713
+ stopReason?: 'aborted';
5714
+ /** The ID of the response that generated this message. It can be undefined if the stream was aborted. */
5715
+ id?: string;
5698
5716
  /** The ID of the previous response that this message is based on. */
5699
5717
  previous?: string;
5700
5718
  }
@@ -5707,8 +5725,8 @@ export interface AIStreamResponseFinish {
5707
5725
  * The ID of the response
5708
5726
  * @deprecated
5709
5727
  */
5710
- responseId: string;
5711
- /** The response that generated this message. */
5728
+ responseId?: string;
5729
+ /** The response metadata associated with the message. */
5712
5730
  response: AIMessageResponseMetadata;
5713
5731
  }
5714
5732
  /** 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. */
@@ -5744,6 +5762,13 @@ export interface AIToolCallGetPages {
5744
5762
  /** The revision ID of the space. */
5745
5763
  revisionId: string;
5746
5764
  }
5765
+ export interface AIToolCallGetReusableContents {
5766
+ tool: 'getReusableContents';
5767
+ /** The ID of the space being accessed. */
5768
+ spaceId: string;
5769
+ /** The revision ID of the space. */
5770
+ revisionId: string;
5771
+ }
5747
5772
  /** Result of a search */
5748
5773
  export interface AIToolCallSearchResult {
5749
5774
  /** The ID of the space */
@@ -5900,7 +5925,7 @@ export interface AIToolCallOther {
5900
5925
  /** Summary of a generic tool call. */
5901
5926
  summary: AIToolCallOtherSummary;
5902
5927
  }
5903
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
5928
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
5904
5929
  /** Message emitted by the server to indicate that the AI has called a tool. */
5905
5930
  export interface AIStreamResponseToolCall {
5906
5931
  type: 'response_tool_call';
@@ -5934,7 +5959,16 @@ export interface AIStreamResponseFollowupSuggestion {
5934
5959
  messageId: string;
5935
5960
  suggestions: string[];
5936
5961
  }
5937
- export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion;
5962
+ /** Message emitted by the server to indicate that the AI has attached an image. */
5963
+ export interface AIStreamResponseAttachment {
5964
+ type: 'response_attachment';
5965
+ /** The ID of the message that this event is composing. */
5966
+ messageId: string;
5967
+ /** The index of the step of the message that this event is composing. */
5968
+ stepIndex: number;
5969
+ attachment: AIAttachment;
5970
+ }
5971
+ export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion | AIStreamResponseAttachment;
5938
5972
  /** Analytics info on the GitBook's site session. */
5939
5973
  export interface SiteInsightsEventSession {
5940
5974
  /** GitBook's unique identifier of the visitor. */
@@ -6761,6 +6795,10 @@ export interface SiteVisitorPayload {
6761
6795
  jwtToken?: string;
6762
6796
  unsignedClaims?: PlainObject;
6763
6797
  }
6798
+ export interface Timerange {
6799
+ start: Timestamp;
6800
+ end: Timestamp;
6801
+ }
6764
6802
  /**
6765
6803
  * @minLength 64
6766
6804
  * @maxLength 64
@@ -7512,6 +7550,11 @@ export interface AIMessageStep {
7512
7550
  content: JSONDocument;
7513
7551
  reasoning?: JSONDocument;
7514
7552
  toolCalls?: AIToolCall[];
7553
+ /** The timing of the step. */
7554
+ timing?: {
7555
+ reasoning?: Timerange;
7556
+ };
7557
+ attachments?: AIAttachment[];
7515
7558
  }
7516
7559
  export interface AIMessage {
7517
7560
  id: string;
@@ -7579,9 +7622,11 @@ export type RequestUpdateContentPublishingAuth = UpdateContentPublishingAuth;
7579
7622
  export type RequestCreateOrganization = CreateOrganization;
7580
7623
  export type RequestUpdateSpaceGitInfo = UpdateSpaceGitInfo;
7581
7624
  export type RequestPurgeCDNCacheContext = PurgeCDNCacheContext;
7625
+ export type DocumentTextBackgroundColor = DocumentTextColor;
7582
7626
  export type SpaceVisitorAuth = VisitorAuth;
7583
7627
  export type SpaceVisitorAuthCustomBackend = VisitorAuthCustomBackend;
7584
7628
  export type SpaceVisitorAuthIntegrationBackend = VisitorAuthIntegrationBackend;
7629
+ export type IngegrationPropertyTitle = IntegrationPropertyTitle;
7585
7630
  export type UserPermissions = Index;
7586
7631
  export type SiteRedirectDestinationSpace = SiteRedirectDestinationSiteSpace;
7587
7632
  export type OpenAPISpecSourceURL = URL;
@@ -13171,16 +13216,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13171
13216
  /** Result of a tool call. */
13172
13217
  toolCall?: AIToolCallResult;
13173
13218
  }, params?: RequestParams) => EventIterator<AIStreamResponse>;
13174
- /**
13175
- * @description Experimental operation to get an existing AI response in a site.
13176
- *
13177
- * @tags site-ai
13178
- * @name StreamExistingAiResponseInSite
13179
- * @summary Get an existing AI response in a site
13180
- * @request GET:/orgs/{organizationId}/sites/{siteId}/ai/response/{responseId}
13181
- * @secure
13182
- */
13183
- streamExistingAiResponseInSite: (organizationId: string, siteId: string, responseId: string, params?: RequestParams) => EventIterator<AIStreamResponse>;
13184
13219
  /**
13185
13220
  * No description
13186
13221
  *
@@ -13,7 +13,6 @@ export declare const ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
13
13
  export declare const ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
14
14
  export declare const ICON_MAX_LENGTH = 50;
15
15
  export declare const DOCUMENT_TEXT_COLOR_ENUM: ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
16
- export declare const DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM: ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
17
16
  export declare const TEXT_ALIGNMENT_ENUM: ["start", "center", "end"];
18
17
  export declare const CARDS_IMAGE_OBJECT_FIT_ENUM: ["contain", "fill", "cover"];
19
18
  export declare const VERTICAL_ALIGNMENT_ENUM: ["top", "middle", "bottom"];
@@ -60,6 +59,8 @@ export declare const INTEGRATION_TARGET_ENUM: ["all", "site", "space", "organiza
60
59
  export declare const INTEGRATION_VISIBILITY_ENUM: ["public", "private", "unlisted"];
61
60
  export declare const INTEGRATION_SCOPE_ENUM: ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "openapi:read", "openapi:write", "conversations:ingest"];
62
61
  export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
62
+ export declare const INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
63
+ export declare const INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
63
64
  export declare const INTEGRATION_INSTALLATION_STATUS_ENUM: ["active", "pending", "paused"];
64
65
  export declare const INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM: ["all", "selected"];
65
66
  export declare const INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM: ["all", "selected"];
package/dist/index.cjs CHANGED
@@ -277,9 +277,7 @@ __export(src_exports, {
277
277
  CustomizationSidebarListStyle: () => CustomizationSidebarListStyle,
278
278
  CustomizationTheme: () => CustomizationTheme,
279
279
  CustomizationThemeMode: () => CustomizationThemeMode,
280
- DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM: () => DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM,
281
280
  DOCUMENT_TEXT_COLOR_ENUM: () => DOCUMENT_TEXT_COLOR_ENUM,
282
- DocumentTextBackgroundColor: () => DocumentTextBackgroundColor,
283
281
  DocumentTextColor: () => DocumentTextColor,
284
282
  EMOJI_MAX_LENGTH: () => EMOJI_MAX_LENGTH,
285
283
  EXPRESSION_MAX_LENGTH: () => EXPRESSION_MAX_LENGTH,
@@ -306,6 +304,8 @@ __export(src_exports, {
306
304
  INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM: () => INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM,
307
305
  INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM: () => INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM,
308
306
  INTEGRATION_INSTALLATION_STATUS_ENUM: () => INTEGRATION_INSTALLATION_STATUS_ENUM,
307
+ INTEGRATION_PROPERTY_TITLE_MAX_LENGTH: () => INTEGRATION_PROPERTY_TITLE_MAX_LENGTH,
308
+ INTEGRATION_PROPERTY_TITLE_MIN_LENGTH: () => INTEGRATION_PROPERTY_TITLE_MIN_LENGTH,
309
309
  INTEGRATION_SCOPE_ENUM: () => INTEGRATION_SCOPE_ENUM,
310
310
  INTEGRATION_SUMMARY_MAX_LENGTH: () => INTEGRATION_SUMMARY_MAX_LENGTH,
311
311
  INTEGRATION_TARGET_ENUM: () => INTEGRATION_TARGET_ENUM,
@@ -449,7 +449,7 @@ module.exports = __toCommonJS(src_exports);
449
449
 
450
450
  // package.json
451
451
  var name = "@gitbook/api";
452
- var version = "0.154.0";
452
+ var version = "0.157.0";
453
453
 
454
454
  // src/client.ts
455
455
  var import_event_iterator = __toESM(require_node(), 1);
@@ -641,21 +641,6 @@ var DocumentTextColor = /* @__PURE__ */ ((DocumentTextColor2) => {
641
641
  DocumentTextColor2["Danger"] = "$danger";
642
642
  return DocumentTextColor2;
643
643
  })(DocumentTextColor || {});
644
- var DocumentTextBackgroundColor = /* @__PURE__ */ ((DocumentTextBackgroundColor2) => {
645
- DocumentTextBackgroundColor2["Default"] = "default";
646
- DocumentTextBackgroundColor2["Green"] = "green";
647
- DocumentTextBackgroundColor2["Blue"] = "blue";
648
- DocumentTextBackgroundColor2["Red"] = "red";
649
- DocumentTextBackgroundColor2["Orange"] = "orange";
650
- DocumentTextBackgroundColor2["Yellow"] = "yellow";
651
- DocumentTextBackgroundColor2["Purple"] = "purple";
652
- DocumentTextBackgroundColor2["Primary"] = "$primary";
653
- DocumentTextBackgroundColor2["Info"] = "$info";
654
- DocumentTextBackgroundColor2["Success"] = "$success";
655
- DocumentTextBackgroundColor2["Warning"] = "$warning";
656
- DocumentTextBackgroundColor2["Danger"] = "$danger";
657
- return DocumentTextBackgroundColor2;
658
- })(DocumentTextBackgroundColor || {});
659
644
  var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
660
645
  TextAlignment2["Start"] = "start";
661
646
  TextAlignment2["Center"] = "center";
@@ -3773,12 +3758,6 @@ var Api = class extends HttpClient {
3773
3758
  type: "application/json" /* Json */,
3774
3759
  ...params
3775
3760
  }),
3776
- streamExistingAiResponseInSite: (organizationId, siteId, responseId, params = {}) => this.streamRequest({
3777
- path: `/orgs/${organizationId}/sites/${siteId}/ai/response/${responseId}`,
3778
- method: "GET",
3779
- secure: true,
3780
- ...params
3781
- }),
3782
3761
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3783
3762
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3784
3763
  method: "POST",
@@ -4034,7 +4013,6 @@ var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
4034
4013
  var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
4035
4014
  var ICON_MAX_LENGTH = 50;
4036
4015
  var DOCUMENT_TEXT_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
4037
- var DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
4038
4016
  var TEXT_ALIGNMENT_ENUM = ["start", "center", "end"];
4039
4017
  var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
4040
4018
  var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
@@ -4081,6 +4059,8 @@ var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4081
4059
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
4082
4060
  var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "openapi:read", "openapi:write", "conversations:ingest"];
4083
4061
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4062
+ var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4063
+ var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
4084
4064
  var INTEGRATION_INSTALLATION_STATUS_ENUM = ["active", "pending", "paused"];
4085
4065
  var INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM = ["all", "selected"];
4086
4066
  var INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM = ["all", "selected"];
@@ -4351,9 +4331,7 @@ var GitBookAPI = class extends Api {
4351
4331
  CustomizationSidebarListStyle,
4352
4332
  CustomizationTheme,
4353
4333
  CustomizationThemeMode,
4354
- DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM,
4355
4334
  DOCUMENT_TEXT_COLOR_ENUM,
4356
- DocumentTextBackgroundColor,
4357
4335
  DocumentTextColor,
4358
4336
  EMOJI_MAX_LENGTH,
4359
4337
  EXPRESSION_MAX_LENGTH,
@@ -4380,6 +4358,8 @@ var GitBookAPI = class extends Api {
4380
4358
  INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM,
4381
4359
  INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM,
4382
4360
  INTEGRATION_INSTALLATION_STATUS_ENUM,
4361
+ INTEGRATION_PROPERTY_TITLE_MAX_LENGTH,
4362
+ INTEGRATION_PROPERTY_TITLE_MIN_LENGTH,
4383
4363
  INTEGRATION_SCOPE_ENUM,
4384
4364
  INTEGRATION_SUMMARY_MAX_LENGTH,
4385
4365
  INTEGRATION_TARGET_ENUM,
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.154.0";
175
+ var version = "0.157.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -364,21 +364,6 @@ var DocumentTextColor = /* @__PURE__ */ ((DocumentTextColor2) => {
364
364
  DocumentTextColor2["Danger"] = "$danger";
365
365
  return DocumentTextColor2;
366
366
  })(DocumentTextColor || {});
367
- var DocumentTextBackgroundColor = /* @__PURE__ */ ((DocumentTextBackgroundColor2) => {
368
- DocumentTextBackgroundColor2["Default"] = "default";
369
- DocumentTextBackgroundColor2["Green"] = "green";
370
- DocumentTextBackgroundColor2["Blue"] = "blue";
371
- DocumentTextBackgroundColor2["Red"] = "red";
372
- DocumentTextBackgroundColor2["Orange"] = "orange";
373
- DocumentTextBackgroundColor2["Yellow"] = "yellow";
374
- DocumentTextBackgroundColor2["Purple"] = "purple";
375
- DocumentTextBackgroundColor2["Primary"] = "$primary";
376
- DocumentTextBackgroundColor2["Info"] = "$info";
377
- DocumentTextBackgroundColor2["Success"] = "$success";
378
- DocumentTextBackgroundColor2["Warning"] = "$warning";
379
- DocumentTextBackgroundColor2["Danger"] = "$danger";
380
- return DocumentTextBackgroundColor2;
381
- })(DocumentTextBackgroundColor || {});
382
367
  var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
383
368
  TextAlignment2["Start"] = "start";
384
369
  TextAlignment2["Center"] = "center";
@@ -3496,12 +3481,6 @@ var Api = class extends HttpClient {
3496
3481
  type: "application/json" /* Json */,
3497
3482
  ...params
3498
3483
  }),
3499
- streamExistingAiResponseInSite: (organizationId, siteId, responseId, params = {}) => this.streamRequest({
3500
- path: `/orgs/${organizationId}/sites/${siteId}/ai/response/${responseId}`,
3501
- method: "GET",
3502
- secure: true,
3503
- ...params
3504
- }),
3505
3484
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3506
3485
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3507
3486
  method: "POST",
@@ -3757,7 +3736,6 @@ var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
3757
3736
  var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
3758
3737
  var ICON_MAX_LENGTH = 50;
3759
3738
  var DOCUMENT_TEXT_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
3760
- var DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
3761
3739
  var TEXT_ALIGNMENT_ENUM = ["start", "center", "end"];
3762
3740
  var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
3763
3741
  var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
@@ -3804,6 +3782,8 @@ var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
3804
3782
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
3805
3783
  var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "openapi:read", "openapi:write", "conversations:ingest"];
3806
3784
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
3785
+ var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
3786
+ var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
3807
3787
  var INTEGRATION_INSTALLATION_STATUS_ENUM = ["active", "pending", "paused"];
3808
3788
  var INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM = ["all", "selected"];
3809
3789
  var INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM = ["all", "selected"];
@@ -4073,9 +4053,7 @@ export {
4073
4053
  CustomizationSidebarListStyle,
4074
4054
  CustomizationTheme,
4075
4055
  CustomizationThemeMode,
4076
- DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM,
4077
4056
  DOCUMENT_TEXT_COLOR_ENUM,
4078
- DocumentTextBackgroundColor,
4079
4057
  DocumentTextColor,
4080
4058
  EMOJI_MAX_LENGTH,
4081
4059
  EXPRESSION_MAX_LENGTH,
@@ -4102,6 +4080,8 @@ export {
4102
4080
  INTEGRATION_INSTALLATION_SITE_SELECTION_ENUM,
4103
4081
  INTEGRATION_INSTALLATION_SPACE_SELECTION_ENUM,
4104
4082
  INTEGRATION_INSTALLATION_STATUS_ENUM,
4083
+ INTEGRATION_PROPERTY_TITLE_MAX_LENGTH,
4084
+ INTEGRATION_PROPERTY_TITLE_MIN_LENGTH,
4105
4085
  INTEGRATION_SCOPE_ENUM,
4106
4086
  INTEGRATION_SUMMARY_MAX_LENGTH,
4107
4087
  INTEGRATION_TARGET_ENUM,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.154.0",
7
+ "version": "0.157.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -15502,51 +15502,6 @@
15502
15502
  }
15503
15503
  }
15504
15504
  },
15505
- "/orgs/{organizationId}/sites/{siteId}/ai/response/{responseId}": {
15506
- "get": {
15507
- "operationId": "streamExistingAIResponseInSite",
15508
- "summary": "Get an existing AI response in a site",
15509
- "description": "Experimental operation to get an existing AI response in a site.\n",
15510
- "tags": [
15511
- "site-ai"
15512
- ],
15513
- "x-internal": true,
15514
- "security": [
15515
- {
15516
- "user": []
15517
- }
15518
- ],
15519
- "parameters": [
15520
- {
15521
- "$ref": "#/components/parameters/organizationId"
15522
- },
15523
- {
15524
- "$ref": "#/components/parameters/siteId"
15525
- },
15526
- {
15527
- "name": "responseId",
15528
- "in": "path",
15529
- "required": true,
15530
- "description": "The unique id of the AI response",
15531
- "schema": {
15532
- "type": "string"
15533
- }
15534
- }
15535
- ],
15536
- "responses": {
15537
- "200": {
15538
- "description": "OK",
15539
- "content": {
15540
- "text/event-stream": {
15541
- "schema": {
15542
- "$ref": "#/components/schemas/AIStreamResponse"
15543
- }
15544
- }
15545
- }
15546
- }
15547
- }
15548
- }
15549
- },
15550
15505
  "/orgs/{organizationId}/sites/{siteId}/insights/events": {
15551
15506
  "post": {
15552
15507
  "operationId": "trackEventsInSiteById",
@@ -17785,6 +17740,7 @@
17785
17740
  "type": "string",
17786
17741
  "enum": [
17787
17742
  "require_at_least_one_review",
17743
+ "require_at_least_one_approved_review",
17788
17744
  "require_all_reviews_approved",
17789
17745
  "require_agent_review",
17790
17746
  "require_up_to_date_change_request",
@@ -18970,23 +18926,6 @@
18970
18926
  "$danger"
18971
18927
  ]
18972
18928
  },
18973
- "DocumentTextBackgroundColor": {
18974
- "type": "string",
18975
- "enum": [
18976
- "default",
18977
- "green",
18978
- "blue",
18979
- "red",
18980
- "orange",
18981
- "yellow",
18982
- "purple",
18983
- "$primary",
18984
- "$info",
18985
- "$success",
18986
- "$warning",
18987
- "$danger"
18988
- ]
18989
- },
18990
18929
  "DocumentMarkColor": {
18991
18930
  "type": "object",
18992
18931
  "properties": {
@@ -19009,7 +18948,7 @@
19009
18948
  "$ref": "#/components/schemas/DocumentTextColor"
19010
18949
  },
19011
18950
  "background": {
19012
- "$ref": "#/components/schemas/DocumentTextBackgroundColor"
18951
+ "$ref": "#/components/schemas/DocumentTextColor"
19013
18952
  }
19014
18953
  },
19015
18954
  "required": [
@@ -21079,6 +21018,9 @@
21079
21018
  },
21080
21019
  {
21081
21020
  "$ref": "#/components/schemas/DocumentBlockStepper"
21021
+ },
21022
+ {
21023
+ "$ref": "#/components/schemas/DocumentBlockIf"
21082
21024
  }
21083
21025
  ]
21084
21026
  },
@@ -21598,6 +21540,9 @@
21598
21540
  {
21599
21541
  "$ref": "#/components/schemas/DocumentBlocksEssentials"
21600
21542
  },
21543
+ {
21544
+ "$ref": "#/components/schemas/DocumentBlockFile"
21545
+ },
21601
21546
  {
21602
21547
  "$ref": "#/components/schemas/DocumentBlockImages"
21603
21548
  },
@@ -22566,6 +22511,9 @@
22566
22511
  },
22567
22512
  {
22568
22513
  "$ref": "#/components/schemas/DocumentBlockExpandable"
22514
+ },
22515
+ {
22516
+ "$ref": "#/components/schemas/DocumentBlockStepper"
22569
22517
  }
22570
22518
  ]
22571
22519
  }
@@ -22946,6 +22894,47 @@
22946
22894
  "isVoid"
22947
22895
  ]
22948
22896
  },
22897
+ "DocumentAction": {
22898
+ "type": "object",
22899
+ "oneOf": [
22900
+ {
22901
+ "type": "object",
22902
+ "properties": {
22903
+ "action": {
22904
+ "type": "string",
22905
+ "enum": [
22906
+ "search"
22907
+ ]
22908
+ },
22909
+ "query": {
22910
+ "type": "string"
22911
+ }
22912
+ },
22913
+ "required": [
22914
+ "action"
22915
+ ],
22916
+ "additionalProperties": false
22917
+ },
22918
+ {
22919
+ "type": "object",
22920
+ "properties": {
22921
+ "action": {
22922
+ "type": "string",
22923
+ "enum": [
22924
+ "ask"
22925
+ ]
22926
+ },
22927
+ "query": {
22928
+ "type": "string"
22929
+ }
22930
+ },
22931
+ "required": [
22932
+ "action"
22933
+ ],
22934
+ "additionalProperties": false
22935
+ }
22936
+ ]
22937
+ },
22949
22938
  "DocumentInlineButton": {
22950
22939
  "type": "object",
22951
22940
  "properties": {
@@ -22999,7 +22988,20 @@
22999
22988
  },
23000
22989
  "required": [
23001
22990
  "ref"
23002
- ]
22991
+ ],
22992
+ "additionalProperties": false
22993
+ },
22994
+ {
22995
+ "type": "object",
22996
+ "properties": {
22997
+ "action": {
22998
+ "$ref": "#/components/schemas/DocumentAction"
22999
+ }
23000
+ },
23001
+ "required": [
23002
+ "action"
23003
+ ],
23004
+ "additionalProperties": false
23003
23005
  }
23004
23006
  ]
23005
23007
  }
@@ -27059,6 +27061,12 @@
27059
27061
  "configuration"
27060
27062
  ]
27061
27063
  },
27064
+ "IntegrationPropertyTitle": {
27065
+ "type": "string",
27066
+ "description": "Property title for an integration configuration property",
27067
+ "minLength": 2,
27068
+ "maxLength": 50
27069
+ },
27062
27070
  "IntegrationConfigurationSchema": {
27063
27071
  "type": "object",
27064
27072
  "description": "Schema for a configuration",
@@ -27071,8 +27079,7 @@
27071
27079
  "type": "object",
27072
27080
  "properties": {
27073
27081
  "title": {
27074
- "type": "string",
27075
- "maxLength": 30
27082
+ "$ref": "#/components/schemas/IntegrationPropertyTitle"
27076
27083
  },
27077
27084
  "description": {
27078
27085
  "type": "string",
@@ -29333,6 +29340,10 @@
29333
29340
  "type": {
29334
29341
  "$ref": "#/components/schemas/SiteType"
29335
29342
  },
29343
+ "appliedType": {
29344
+ "$ref": "#/components/schemas/SiteType",
29345
+ "description": "The currently applied type of the site. For example, frozen sites will have this set to Basic."
29346
+ },
29336
29347
  "title": {
29337
29348
  "$ref": "#/components/schemas/SiteTitle"
29338
29349
  },
@@ -29419,6 +29430,7 @@
29419
29430
  "object",
29420
29431
  "id",
29421
29432
  "type",
29433
+ "appliedType",
29422
29434
  "title",
29423
29435
  "visibility",
29424
29436
  "published",
@@ -35241,6 +35253,64 @@
35241
35253
  }
35242
35254
  }
35243
35255
  },
35256
+ "AIAttachmentImage": {
35257
+ "type": "object",
35258
+ "properties": {
35259
+ "type": {
35260
+ "type": "string",
35261
+ "enum": [
35262
+ "image"
35263
+ ]
35264
+ },
35265
+ "url": {
35266
+ "$ref": "#/components/schemas/URL"
35267
+ }
35268
+ },
35269
+ "required": [
35270
+ "type",
35271
+ "url"
35272
+ ]
35273
+ },
35274
+ "AIAttachmentFile": {
35275
+ "type": "object",
35276
+ "properties": {
35277
+ "type": {
35278
+ "type": "string",
35279
+ "enum": [
35280
+ "file"
35281
+ ]
35282
+ },
35283
+ "url": {
35284
+ "$ref": "#/components/schemas/URL"
35285
+ },
35286
+ "filename": {
35287
+ "type": "string",
35288
+ "description": "Name of the file."
35289
+ },
35290
+ "contentType": {
35291
+ "type": "string",
35292
+ "enum": [
35293
+ "application/pdf"
35294
+ ]
35295
+ }
35296
+ },
35297
+ "required": [
35298
+ "type",
35299
+ "url",
35300
+ "filename",
35301
+ "contentType"
35302
+ ]
35303
+ },
35304
+ "AIAttachment": {
35305
+ "oneOf": [
35306
+ {
35307
+ "$ref": "#/components/schemas/AIAttachmentImage"
35308
+ },
35309
+ {
35310
+ "$ref": "#/components/schemas/AIAttachmentFile"
35311
+ }
35312
+ ]
35313
+ },
35244
35314
  "AIMessageInput": {
35245
35315
  "type": "object",
35246
35316
  "description": "Input version of an AI message.",
@@ -35264,6 +35334,12 @@
35264
35334
  },
35265
35335
  "context": {
35266
35336
  "$ref": "#/components/schemas/AIMessageContext"
35337
+ },
35338
+ "attachments": {
35339
+ "type": "array",
35340
+ "items": {
35341
+ "$ref": "#/components/schemas/AIAttachment"
35342
+ }
35267
35343
  }
35268
35344
  },
35269
35345
  "required": [
@@ -35494,18 +35570,22 @@
35494
35570
  "description": "The response that generated this message.",
35495
35571
  "type": "object",
35496
35572
  "properties": {
35573
+ "stopReason": {
35574
+ "type": "string",
35575
+ "description": "The reason the response was stopped. If not defined, the response finished normally.",
35576
+ "enum": [
35577
+ "aborted"
35578
+ ]
35579
+ },
35497
35580
  "id": {
35498
35581
  "type": "string",
35499
- "description": "The ID of the response that generated this message."
35582
+ "description": "The ID of the response that generated this message. It can be undefined if the stream was aborted."
35500
35583
  },
35501
35584
  "previous": {
35502
35585
  "type": "string",
35503
35586
  "description": "The ID of the previous response that this message is based on."
35504
35587
  }
35505
- },
35506
- "required": [
35507
- "id"
35508
- ]
35588
+ }
35509
35589
  },
35510
35590
  "AIStreamResponseFinish": {
35511
35591
  "type": "object",
@@ -35527,13 +35607,13 @@
35527
35607
  "description": "The ID of the response"
35528
35608
  },
35529
35609
  "response": {
35610
+ "description": "The response metadata associated with the message.",
35530
35611
  "$ref": "#/components/schemas/AIMessageResponseMetadata"
35531
35612
  }
35532
35613
  },
35533
35614
  "required": [
35534
35615
  "type",
35535
35616
  "messageId",
35536
- "responseId",
35537
35617
  "response"
35538
35618
  ]
35539
35619
  },
@@ -35655,6 +35735,30 @@
35655
35735
  "revisionId"
35656
35736
  ]
35657
35737
  },
35738
+ "AIToolCallGetReusableContents": {
35739
+ "type": "object",
35740
+ "properties": {
35741
+ "tool": {
35742
+ "type": "string",
35743
+ "enum": [
35744
+ "getReusableContents"
35745
+ ]
35746
+ },
35747
+ "spaceId": {
35748
+ "type": "string",
35749
+ "description": "The ID of the space being accessed."
35750
+ },
35751
+ "revisionId": {
35752
+ "type": "string",
35753
+ "description": "The revision ID of the space."
35754
+ }
35755
+ },
35756
+ "required": [
35757
+ "tool",
35758
+ "spaceId",
35759
+ "revisionId"
35760
+ ]
35761
+ },
35658
35762
  "AIToolCallSearchResult": {
35659
35763
  "type": "object",
35660
35764
  "description": "Result of a search",
@@ -36173,6 +36277,9 @@
36173
36277
  {
36174
36278
  "$ref": "#/components/schemas/AIToolCallGetPages"
36175
36279
  },
36280
+ {
36281
+ "$ref": "#/components/schemas/AIToolCallGetReusableContents"
36282
+ },
36176
36283
  {
36177
36284
  "$ref": "#/components/schemas/AIToolCallSearch"
36178
36285
  },
@@ -36332,6 +36439,35 @@
36332
36439
  "suggestions"
36333
36440
  ]
36334
36441
  },
36442
+ "AIStreamResponseAttachment": {
36443
+ "type": "object",
36444
+ "description": "Message emitted by the server to indicate that the AI has attached an image.\n",
36445
+ "properties": {
36446
+ "type": {
36447
+ "type": "string",
36448
+ "enum": [
36449
+ "response_attachment"
36450
+ ]
36451
+ },
36452
+ "messageId": {
36453
+ "type": "string",
36454
+ "description": "The ID of the message that this event is composing.\n"
36455
+ },
36456
+ "stepIndex": {
36457
+ "type": "integer",
36458
+ "description": "The index of the step of the message that this event is composing.\n"
36459
+ },
36460
+ "attachment": {
36461
+ "$ref": "#/components/schemas/AIAttachment"
36462
+ }
36463
+ },
36464
+ "required": [
36465
+ "type",
36466
+ "messageId",
36467
+ "stepIndex",
36468
+ "attachment"
36469
+ ]
36470
+ },
36335
36471
  "AIStreamResponse": {
36336
36472
  "oneOf": [
36337
36473
  {
@@ -36354,6 +36490,9 @@
36354
36490
  },
36355
36491
  {
36356
36492
  "$ref": "#/components/schemas/AIStreamResponseFollowupSuggestion"
36493
+ },
36494
+ {
36495
+ "$ref": "#/components/schemas/AIStreamResponseAttachment"
36357
36496
  }
36358
36497
  ]
36359
36498
  },
@@ -39744,6 +39883,21 @@
39744
39883
  }
39745
39884
  }
39746
39885
  },
39886
+ "Timerange": {
39887
+ "type": "object",
39888
+ "properties": {
39889
+ "start": {
39890
+ "$ref": "#/components/schemas/Timestamp"
39891
+ },
39892
+ "end": {
39893
+ "$ref": "#/components/schemas/Timestamp"
39894
+ }
39895
+ },
39896
+ "required": [
39897
+ "start",
39898
+ "end"
39899
+ ]
39900
+ },
39747
39901
  "SHA256": {
39748
39902
  "type": "string",
39749
39903
  "minLength": 64,
@@ -42541,6 +42695,21 @@
42541
42695
  "items": {
42542
42696
  "$ref": "#/components/schemas/AIToolCall"
42543
42697
  }
42698
+ },
42699
+ "timing": {
42700
+ "type": "object",
42701
+ "description": "The timing of the step.",
42702
+ "properties": {
42703
+ "reasoning": {
42704
+ "$ref": "#/components/schemas/Timerange"
42705
+ }
42706
+ }
42707
+ },
42708
+ "attachments": {
42709
+ "type": "array",
42710
+ "items": {
42711
+ "$ref": "#/components/schemas/AIAttachment"
42712
+ }
42544
42713
  }
42545
42714
  },
42546
42715
  "required": [
@@ -42789,6 +42958,9 @@
42789
42958
  "RequestPurgeCDNCacheContext": {
42790
42959
  "$ref": "#/components/schemas/PurgeCDNCacheContext"
42791
42960
  },
42961
+ "DocumentTextBackgroundColor": {
42962
+ "$ref": "#/components/schemas/DocumentTextColor"
42963
+ },
42792
42964
  "SpaceVisitorAuth": {
42793
42965
  "$ref": "#/components/schemas/VisitorAuth"
42794
42966
  },
@@ -42798,6 +42970,9 @@
42798
42970
  "SpaceVisitorAuthIntegrationBackend": {
42799
42971
  "$ref": "#/components/schemas/VisitorAuthIntegrationBackend"
42800
42972
  },
42973
+ "IngegrationPropertyTitle": {
42974
+ "$ref": "#/components/schemas/IntegrationPropertyTitle"
42975
+ },
42801
42976
  "UserPermissions": {
42802
42977
  "$ref": "#/components/schemas/_index"
42803
42978
  },
package/spec/openapi.yaml CHANGED
@@ -8772,33 +8772,6 @@ paths:
8772
8772
  text/event-stream:
8773
8773
  schema:
8774
8774
  $ref: "#/components/schemas/AIStreamResponse"
8775
- "/orgs/{organizationId}/sites/{siteId}/ai/response/{responseId}":
8776
- get:
8777
- operationId: streamExistingAIResponseInSite
8778
- summary: Get an existing AI response in a site
8779
- description: |
8780
- Experimental operation to get an existing AI response in a site.
8781
- tags:
8782
- - site-ai
8783
- x-internal: true
8784
- security:
8785
- - user: []
8786
- parameters:
8787
- - $ref: "#/components/parameters/organizationId"
8788
- - $ref: "#/components/parameters/siteId"
8789
- - name: responseId
8790
- in: path
8791
- required: true
8792
- description: The unique id of the AI response
8793
- schema:
8794
- type: string
8795
- responses:
8796
- "200":
8797
- description: OK
8798
- content:
8799
- text/event-stream:
8800
- schema:
8801
- $ref: "#/components/schemas/AIStreamResponse"
8802
8775
  "/orgs/{organizationId}/sites/{siteId}/insights/events":
8803
8776
  post:
8804
8777
  operationId: trackEventsInSiteById
@@ -10255,6 +10228,7 @@ components:
10255
10228
  type: string
10256
10229
  enum:
10257
10230
  - require_at_least_one_review
10231
+ - require_at_least_one_approved_review
10258
10232
  - require_all_reviews_approved
10259
10233
  - require_agent_review
10260
10234
  - require_up_to_date_change_request
@@ -11088,21 +11062,6 @@ components:
11088
11062
  - $success
11089
11063
  - $warning
11090
11064
  - $danger
11091
- DocumentTextBackgroundColor:
11092
- type: string
11093
- enum:
11094
- - default
11095
- - green
11096
- - blue
11097
- - red
11098
- - orange
11099
- - yellow
11100
- - purple
11101
- - $primary
11102
- - $info
11103
- - $success
11104
- - $warning
11105
- - $danger
11106
11065
  DocumentMarkColor:
11107
11066
  type: object
11108
11067
  properties:
@@ -11120,7 +11079,7 @@ components:
11120
11079
  text:
11121
11080
  $ref: "#/components/schemas/DocumentTextColor"
11122
11081
  background:
11123
- $ref: "#/components/schemas/DocumentTextBackgroundColor"
11082
+ $ref: "#/components/schemas/DocumentTextColor"
11124
11083
  required:
11125
11084
  - text
11126
11085
  - background
@@ -12396,6 +12355,7 @@ components:
12396
12355
  - $ref: "#/components/schemas/DocumentBlockIntegration"
12397
12356
  - $ref: "#/components/schemas/DocumentBlockReusableContent"
12398
12357
  - $ref: "#/components/schemas/DocumentBlockStepper"
12358
+ - $ref: "#/components/schemas/DocumentBlockIf"
12399
12359
  DocumentBlockIf:
12400
12360
  type: object
12401
12361
  properties:
@@ -12729,6 +12689,7 @@ components:
12729
12689
  items:
12730
12690
  oneOf:
12731
12691
  - $ref: "#/components/schemas/DocumentBlocksEssentials"
12692
+ - $ref: "#/components/schemas/DocumentBlockFile"
12732
12693
  - $ref: "#/components/schemas/DocumentBlockImages"
12733
12694
  - $ref: "#/components/schemas/DocumentBlockCode"
12734
12695
  - $ref: "#/components/schemas/DocumentBlockTable"
@@ -13311,6 +13272,7 @@ components:
13311
13272
  - $ref: "#/components/schemas/DocumentBlockQuote"
13312
13273
  - $ref: "#/components/schemas/DocumentBlockTable"
13313
13274
  - $ref: "#/components/schemas/DocumentBlockExpandable"
13275
+ - $ref: "#/components/schemas/DocumentBlockStepper"
13314
13276
  isVoid:
13315
13277
  type: boolean
13316
13278
  enum:
@@ -13515,6 +13477,31 @@ components:
13515
13477
  - type
13516
13478
  - data
13517
13479
  - isVoid
13480
+ DocumentAction:
13481
+ type: object
13482
+ oneOf:
13483
+ - type: object
13484
+ properties:
13485
+ action:
13486
+ type: string
13487
+ enum:
13488
+ - search
13489
+ query:
13490
+ type: string
13491
+ required:
13492
+ - action
13493
+ additionalProperties: false
13494
+ - type: object
13495
+ properties:
13496
+ action:
13497
+ type: string
13498
+ enum:
13499
+ - ask
13500
+ query:
13501
+ type: string
13502
+ required:
13503
+ - action
13504
+ additionalProperties: false
13518
13505
  DocumentInlineButton:
13519
13506
  type: object
13520
13507
  properties:
@@ -13551,6 +13538,14 @@ components:
13551
13538
  $ref: "#/components/schemas/ContentRef"
13552
13539
  required:
13553
13540
  - ref
13541
+ additionalProperties: false
13542
+ - type: object
13543
+ properties:
13544
+ action:
13545
+ $ref: "#/components/schemas/DocumentAction"
13546
+ required:
13547
+ - action
13548
+ additionalProperties: false
13554
13549
  isVoid:
13555
13550
  type: boolean
13556
13551
  enum:
@@ -16287,6 +16282,11 @@ components:
16287
16282
  - id
16288
16283
  - title
16289
16284
  - configuration
16285
+ IntegrationPropertyTitle:
16286
+ type: string
16287
+ description: Property title for an integration configuration property
16288
+ minLength: 2
16289
+ maxLength: 50
16290
16290
  IntegrationConfigurationSchema:
16291
16291
  type: object
16292
16292
  description: Schema for a configuration
@@ -16298,8 +16298,7 @@ components:
16298
16298
  - type: object
16299
16299
  properties:
16300
16300
  title:
16301
- type: string
16302
- maxLength: 30
16301
+ $ref: "#/components/schemas/IntegrationPropertyTitle"
16303
16302
  description:
16304
16303
  type: string
16305
16304
  maxLength: 100
@@ -17780,6 +17779,9 @@ components:
17780
17779
  description: Unique identifier of the site
17781
17780
  type:
17782
17781
  $ref: "#/components/schemas/SiteType"
17782
+ appliedType:
17783
+ $ref: "#/components/schemas/SiteType"
17784
+ description: The currently applied type of the site. For example, frozen sites will have this set to Basic.
17783
17785
  title:
17784
17786
  $ref: "#/components/schemas/SiteTitle"
17785
17787
  icon:
@@ -17840,6 +17842,7 @@ components:
17840
17842
  - object
17841
17843
  - id
17842
17844
  - type
17845
+ - appliedType
17843
17846
  - title
17844
17847
  - visibility
17845
17848
  - published
@@ -21802,6 +21805,43 @@ components:
21802
21805
  required:
21803
21806
  - spaceId
21804
21807
  - pageId
21808
+ AIAttachmentImage:
21809
+ type: object
21810
+ properties:
21811
+ type:
21812
+ type: string
21813
+ enum:
21814
+ - image
21815
+ url:
21816
+ $ref: "#/components/schemas/URL"
21817
+ required:
21818
+ - type
21819
+ - url
21820
+ AIAttachmentFile:
21821
+ type: object
21822
+ properties:
21823
+ type:
21824
+ type: string
21825
+ enum:
21826
+ - file
21827
+ url:
21828
+ $ref: "#/components/schemas/URL"
21829
+ filename:
21830
+ type: string
21831
+ description: Name of the file.
21832
+ contentType:
21833
+ type: string
21834
+ enum:
21835
+ - application/pdf
21836
+ required:
21837
+ - type
21838
+ - url
21839
+ - filename
21840
+ - contentType
21841
+ AIAttachment:
21842
+ oneOf:
21843
+ - $ref: "#/components/schemas/AIAttachmentImage"
21844
+ - $ref: "#/components/schemas/AIAttachmentFile"
21805
21845
  AIMessageInput:
21806
21846
  type: object
21807
21847
  description: Input version of an AI message.
@@ -21817,6 +21857,10 @@ components:
21817
21857
  - $ref: "#/components/schemas/JSONDocument"
21818
21858
  context:
21819
21859
  $ref: "#/components/schemas/AIMessageContext"
21860
+ attachments:
21861
+ type: array
21862
+ items:
21863
+ $ref: "#/components/schemas/AIAttachment"
21820
21864
  required:
21821
21865
  - role
21822
21866
  - content
@@ -21980,14 +22024,17 @@ components:
21980
22024
  description: The response that generated this message.
21981
22025
  type: object
21982
22026
  properties:
22027
+ stopReason:
22028
+ type: string
22029
+ description: The reason the response was stopped. If not defined, the response finished normally.
22030
+ enum:
22031
+ - aborted
21983
22032
  id:
21984
22033
  type: string
21985
- description: The ID of the response that generated this message.
22034
+ description: The ID of the response that generated this message. It can be undefined if the stream was aborted.
21986
22035
  previous:
21987
22036
  type: string
21988
22037
  description: The ID of the previous response that this message is based on.
21989
- required:
21990
- - id
21991
22038
  AIStreamResponseFinish:
21992
22039
  type: object
21993
22040
  description: |
@@ -22006,11 +22053,11 @@ components:
22006
22053
  deprecated: true
22007
22054
  description: The ID of the response
22008
22055
  response:
22056
+ description: The response metadata associated with the message.
22009
22057
  $ref: "#/components/schemas/AIMessageResponseMetadata"
22010
22058
  required:
22011
22059
  - type
22012
22060
  - messageId
22013
- - responseId
22014
22061
  - response
22015
22062
  AIStreamResponseDocument:
22016
22063
  type: object
@@ -22102,6 +22149,23 @@ components:
22102
22149
  - tool
22103
22150
  - spaceId
22104
22151
  - revisionId
22152
+ AIToolCallGetReusableContents:
22153
+ type: object
22154
+ properties:
22155
+ tool:
22156
+ type: string
22157
+ enum:
22158
+ - getReusableContents
22159
+ spaceId:
22160
+ type: string
22161
+ description: The ID of the space being accessed.
22162
+ revisionId:
22163
+ type: string
22164
+ description: The revision ID of the space.
22165
+ required:
22166
+ - tool
22167
+ - spaceId
22168
+ - revisionId
22105
22169
  AIToolCallSearchResult:
22106
22170
  type: object
22107
22171
  description: Result of a search
@@ -22474,6 +22538,7 @@ components:
22474
22538
  oneOf:
22475
22539
  - $ref: "#/components/schemas/AIToolCallGetPageContent"
22476
22540
  - $ref: "#/components/schemas/AIToolCallGetPages"
22541
+ - $ref: "#/components/schemas/AIToolCallGetReusableContents"
22477
22542
  - $ref: "#/components/schemas/AIToolCallSearch"
22478
22543
  - $ref: "#/components/schemas/AIToolCallEditPage"
22479
22544
  - $ref: "#/components/schemas/AIToolCallCreatePage"
@@ -22577,6 +22642,30 @@ components:
22577
22642
  - type
22578
22643
  - messageId
22579
22644
  - suggestions
22645
+ AIStreamResponseAttachment:
22646
+ type: object
22647
+ description: |
22648
+ Message emitted by the server to indicate that the AI has attached an image.
22649
+ properties:
22650
+ type:
22651
+ type: string
22652
+ enum:
22653
+ - response_attachment
22654
+ messageId:
22655
+ type: string
22656
+ description: |
22657
+ The ID of the message that this event is composing.
22658
+ stepIndex:
22659
+ type: integer
22660
+ description: |
22661
+ The index of the step of the message that this event is composing.
22662
+ attachment:
22663
+ $ref: "#/components/schemas/AIAttachment"
22664
+ required:
22665
+ - type
22666
+ - messageId
22667
+ - stepIndex
22668
+ - attachment
22580
22669
  AIStreamResponse:
22581
22670
  oneOf:
22582
22671
  - $ref: "#/components/schemas/AIStreamResponseStart"
@@ -22586,6 +22675,7 @@ components:
22586
22675
  - $ref: "#/components/schemas/AIStreamResponseToolCall"
22587
22676
  - $ref: "#/components/schemas/AIStreamResponseToolCallPending"
22588
22677
  - $ref: "#/components/schemas/AIStreamResponseFollowupSuggestion"
22678
+ - $ref: "#/components/schemas/AIStreamResponseAttachment"
22589
22679
  SiteInsightsEventSession:
22590
22680
  type: object
22591
22681
  description: Analytics info on the GitBook's site session.
@@ -24750,6 +24840,16 @@ components:
24750
24840
  description: JWT token generated for a authenticated access session.
24751
24841
  unsignedClaims:
24752
24842
  $ref: "#/components/schemas/PlainObject"
24843
+ Timerange:
24844
+ type: object
24845
+ properties:
24846
+ start:
24847
+ $ref: "#/components/schemas/Timestamp"
24848
+ end:
24849
+ $ref: "#/components/schemas/Timestamp"
24850
+ required:
24851
+ - start
24852
+ - end
24753
24853
  SHA256:
24754
24854
  type: string
24755
24855
  minLength: 64
@@ -26565,6 +26665,16 @@ components:
26565
26665
  type: array
26566
26666
  items:
26567
26667
  $ref: "#/components/schemas/AIToolCall"
26668
+ timing:
26669
+ type: object
26670
+ description: The timing of the step.
26671
+ properties:
26672
+ reasoning:
26673
+ $ref: "#/components/schemas/Timerange"
26674
+ attachments:
26675
+ type: array
26676
+ items:
26677
+ $ref: "#/components/schemas/AIAttachment"
26568
26678
  required:
26569
26679
  - content
26570
26680
  AIMessage:
@@ -26730,12 +26840,16 @@ components:
26730
26840
  $ref: "#/components/schemas/UpdateSpaceGitInfo"
26731
26841
  RequestPurgeCDNCacheContext:
26732
26842
  $ref: "#/components/schemas/PurgeCDNCacheContext"
26843
+ DocumentTextBackgroundColor:
26844
+ $ref: "#/components/schemas/DocumentTextColor"
26733
26845
  SpaceVisitorAuth:
26734
26846
  $ref: "#/components/schemas/VisitorAuth"
26735
26847
  SpaceVisitorAuthCustomBackend:
26736
26848
  $ref: "#/components/schemas/VisitorAuthCustomBackend"
26737
26849
  SpaceVisitorAuthIntegrationBackend:
26738
26850
  $ref: "#/components/schemas/VisitorAuthIntegrationBackend"
26851
+ IngegrationPropertyTitle:
26852
+ $ref: "#/components/schemas/IntegrationPropertyTitle"
26739
26853
  UserPermissions:
26740
26854
  $ref: "#/components/schemas/_index"
26741
26855
  SiteRedirectDestinationSpace: