@gitbook/api 0.154.0 → 0.155.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';
@@ -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 {
@@ -3557,6 +3552,8 @@ export interface Site {
3557
3552
  id: string;
3558
3553
  /** The type of the site */
3559
3554
  type: SiteType;
3555
+ /** The currently applied type of the site. For example, frozen sites will have this set to Basic. */
3556
+ appliedType: SiteType;
3560
3557
  /** Title of the site */
3561
3558
  title: SiteTitle;
3562
3559
  icon?: CustomizationFavicon | null;
@@ -5613,12 +5610,18 @@ export interface AIMessageContext {
5613
5610
  pageId: string;
5614
5611
  };
5615
5612
  }
5613
+ export interface AIAttachmentImage {
5614
+ type: 'image';
5615
+ url: URL;
5616
+ }
5617
+ export type AIAttachment = AIAttachmentImage;
5616
5618
  /** Input version of an AI message. */
5617
5619
  export interface AIMessageInput {
5618
5620
  role: 'user';
5619
5621
  content: string | JSONDocument;
5620
5622
  /** Context about the current user sending a message. */
5621
5623
  context?: AIMessageContext;
5624
+ attachments?: AIAttachment[];
5622
5625
  }
5623
5626
  export declare enum AIModel {
5624
5627
  Fast = "fast",
@@ -5693,8 +5696,10 @@ export interface AIStreamResponseStart {
5693
5696
  }
5694
5697
  /** The response that generated this message. */
5695
5698
  export interface AIMessageResponseMetadata {
5696
- /** The ID of the response that generated this message. */
5697
- id: string;
5699
+ /** The reason the response was stopped. If not defined, the response finished normally. */
5700
+ stopReason?: 'aborted';
5701
+ /** The ID of the response that generated this message. It can be undefined if the stream was aborted. */
5702
+ id?: string;
5698
5703
  /** The ID of the previous response that this message is based on. */
5699
5704
  previous?: string;
5700
5705
  }
@@ -5707,8 +5712,8 @@ export interface AIStreamResponseFinish {
5707
5712
  * The ID of the response
5708
5713
  * @deprecated
5709
5714
  */
5710
- responseId: string;
5711
- /** The response that generated this message. */
5715
+ responseId?: string;
5716
+ /** The response metadata associated with the message. */
5712
5717
  response: AIMessageResponseMetadata;
5713
5718
  }
5714
5719
  /** 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. */
@@ -5934,7 +5939,16 @@ export interface AIStreamResponseFollowupSuggestion {
5934
5939
  messageId: string;
5935
5940
  suggestions: string[];
5936
5941
  }
5937
- export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion;
5942
+ /** Message emitted by the server to indicate that the AI has attached an image. */
5943
+ export interface AIStreamResponseAttachment {
5944
+ type: 'response_attachment';
5945
+ /** The ID of the message that this event is composing. */
5946
+ messageId: string;
5947
+ /** The index of the step of the message that this event is composing. */
5948
+ stepIndex: number;
5949
+ attachment: AIAttachment;
5950
+ }
5951
+ export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion | AIStreamResponseAttachment;
5938
5952
  /** Analytics info on the GitBook's site session. */
5939
5953
  export interface SiteInsightsEventSession {
5940
5954
  /** GitBook's unique identifier of the visitor. */
@@ -6761,6 +6775,10 @@ export interface SiteVisitorPayload {
6761
6775
  jwtToken?: string;
6762
6776
  unsignedClaims?: PlainObject;
6763
6777
  }
6778
+ export interface Timerange {
6779
+ start: Timestamp;
6780
+ end: Timestamp;
6781
+ }
6764
6782
  /**
6765
6783
  * @minLength 64
6766
6784
  * @maxLength 64
@@ -7512,6 +7530,11 @@ export interface AIMessageStep {
7512
7530
  content: JSONDocument;
7513
7531
  reasoning?: JSONDocument;
7514
7532
  toolCalls?: AIToolCall[];
7533
+ /** The timing of the step. */
7534
+ timing?: {
7535
+ reasoning?: Timerange;
7536
+ };
7537
+ attachments?: AIAttachment[];
7515
7538
  }
7516
7539
  export interface AIMessage {
7517
7540
  id: string;
@@ -7579,6 +7602,7 @@ export type RequestUpdateContentPublishingAuth = UpdateContentPublishingAuth;
7579
7602
  export type RequestCreateOrganization = CreateOrganization;
7580
7603
  export type RequestUpdateSpaceGitInfo = UpdateSpaceGitInfo;
7581
7604
  export type RequestPurgeCDNCacheContext = PurgeCDNCacheContext;
7605
+ export type DocumentTextBackgroundColor = DocumentTextColor;
7582
7606
  export type SpaceVisitorAuth = VisitorAuth;
7583
7607
  export type SpaceVisitorAuthCustomBackend = VisitorAuthCustomBackend;
7584
7608
  export type SpaceVisitorAuthIntegrationBackend = VisitorAuthIntegrationBackend;
@@ -13171,16 +13195,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13171
13195
  /** Result of a tool call. */
13172
13196
  toolCall?: AIToolCallResult;
13173
13197
  }, 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
13198
  /**
13185
13199
  * No description
13186
13200
  *
@@ -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"];
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,
@@ -449,7 +447,7 @@ module.exports = __toCommonJS(src_exports);
449
447
 
450
448
  // package.json
451
449
  var name = "@gitbook/api";
452
- var version = "0.154.0";
450
+ var version = "0.155.0";
453
451
 
454
452
  // src/client.ts
455
453
  var import_event_iterator = __toESM(require_node(), 1);
@@ -641,21 +639,6 @@ var DocumentTextColor = /* @__PURE__ */ ((DocumentTextColor2) => {
641
639
  DocumentTextColor2["Danger"] = "$danger";
642
640
  return DocumentTextColor2;
643
641
  })(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
642
  var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
660
643
  TextAlignment2["Start"] = "start";
661
644
  TextAlignment2["Center"] = "center";
@@ -3773,12 +3756,6 @@ var Api = class extends HttpClient {
3773
3756
  type: "application/json" /* Json */,
3774
3757
  ...params
3775
3758
  }),
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
3759
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3783
3760
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3784
3761
  method: "POST",
@@ -4034,7 +4011,6 @@ var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
4034
4011
  var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
4035
4012
  var ICON_MAX_LENGTH = 50;
4036
4013
  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
4014
  var TEXT_ALIGNMENT_ENUM = ["start", "center", "end"];
4039
4015
  var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
4040
4016
  var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
@@ -4351,9 +4327,7 @@ var GitBookAPI = class extends Api {
4351
4327
  CustomizationSidebarListStyle,
4352
4328
  CustomizationTheme,
4353
4329
  CustomizationThemeMode,
4354
- DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM,
4355
4330
  DOCUMENT_TEXT_COLOR_ENUM,
4356
- DocumentTextBackgroundColor,
4357
4331
  DocumentTextColor,
4358
4332
  EMOJI_MAX_LENGTH,
4359
4333
  EXPRESSION_MAX_LENGTH,
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.155.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"];
@@ -4073,9 +4051,7 @@ export {
4073
4051
  CustomizationSidebarListStyle,
4074
4052
  CustomizationTheme,
4075
4053
  CustomizationThemeMode,
4076
- DOCUMENT_TEXT_BACKGROUND_COLOR_ENUM,
4077
4054
  DOCUMENT_TEXT_COLOR_ENUM,
4078
- DocumentTextBackgroundColor,
4079
4055
  DocumentTextColor,
4080
4056
  EMOJI_MAX_LENGTH,
4081
4057
  EXPRESSION_MAX_LENGTH,
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.155.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
  },
@@ -22566,6 +22508,9 @@
22566
22508
  },
22567
22509
  {
22568
22510
  "$ref": "#/components/schemas/DocumentBlockExpandable"
22511
+ },
22512
+ {
22513
+ "$ref": "#/components/schemas/DocumentBlockStepper"
22569
22514
  }
22570
22515
  ]
22571
22516
  }
@@ -22946,6 +22891,47 @@
22946
22891
  "isVoid"
22947
22892
  ]
22948
22893
  },
22894
+ "DocumentAction": {
22895
+ "type": "object",
22896
+ "oneOf": [
22897
+ {
22898
+ "type": "object",
22899
+ "properties": {
22900
+ "action": {
22901
+ "type": "string",
22902
+ "enum": [
22903
+ "search"
22904
+ ]
22905
+ },
22906
+ "query": {
22907
+ "type": "string"
22908
+ }
22909
+ },
22910
+ "required": [
22911
+ "action"
22912
+ ],
22913
+ "additionalProperties": false
22914
+ },
22915
+ {
22916
+ "type": "object",
22917
+ "properties": {
22918
+ "action": {
22919
+ "type": "string",
22920
+ "enum": [
22921
+ "ask"
22922
+ ]
22923
+ },
22924
+ "query": {
22925
+ "type": "string"
22926
+ }
22927
+ },
22928
+ "required": [
22929
+ "action"
22930
+ ],
22931
+ "additionalProperties": false
22932
+ }
22933
+ ]
22934
+ },
22949
22935
  "DocumentInlineButton": {
22950
22936
  "type": "object",
22951
22937
  "properties": {
@@ -22999,7 +22985,20 @@
22999
22985
  },
23000
22986
  "required": [
23001
22987
  "ref"
23002
- ]
22988
+ ],
22989
+ "additionalProperties": false
22990
+ },
22991
+ {
22992
+ "type": "object",
22993
+ "properties": {
22994
+ "action": {
22995
+ "$ref": "#/components/schemas/DocumentAction"
22996
+ }
22997
+ },
22998
+ "required": [
22999
+ "action"
23000
+ ],
23001
+ "additionalProperties": false
23003
23002
  }
23004
23003
  ]
23005
23004
  }
@@ -29333,6 +29332,10 @@
29333
29332
  "type": {
29334
29333
  "$ref": "#/components/schemas/SiteType"
29335
29334
  },
29335
+ "appliedType": {
29336
+ "$ref": "#/components/schemas/SiteType",
29337
+ "description": "The currently applied type of the site. For example, frozen sites will have this set to Basic."
29338
+ },
29336
29339
  "title": {
29337
29340
  "$ref": "#/components/schemas/SiteTitle"
29338
29341
  },
@@ -29419,6 +29422,7 @@
29419
29422
  "object",
29420
29423
  "id",
29421
29424
  "type",
29425
+ "appliedType",
29422
29426
  "title",
29423
29427
  "visibility",
29424
29428
  "published",
@@ -35241,6 +35245,31 @@
35241
35245
  }
35242
35246
  }
35243
35247
  },
35248
+ "AIAttachmentImage": {
35249
+ "type": "object",
35250
+ "properties": {
35251
+ "type": {
35252
+ "type": "string",
35253
+ "enum": [
35254
+ "image"
35255
+ ]
35256
+ },
35257
+ "url": {
35258
+ "$ref": "#/components/schemas/URL"
35259
+ }
35260
+ },
35261
+ "required": [
35262
+ "type",
35263
+ "url"
35264
+ ]
35265
+ },
35266
+ "AIAttachment": {
35267
+ "oneOf": [
35268
+ {
35269
+ "$ref": "#/components/schemas/AIAttachmentImage"
35270
+ }
35271
+ ]
35272
+ },
35244
35273
  "AIMessageInput": {
35245
35274
  "type": "object",
35246
35275
  "description": "Input version of an AI message.",
@@ -35264,6 +35293,12 @@
35264
35293
  },
35265
35294
  "context": {
35266
35295
  "$ref": "#/components/schemas/AIMessageContext"
35296
+ },
35297
+ "attachments": {
35298
+ "type": "array",
35299
+ "items": {
35300
+ "$ref": "#/components/schemas/AIAttachment"
35301
+ }
35267
35302
  }
35268
35303
  },
35269
35304
  "required": [
@@ -35494,18 +35529,22 @@
35494
35529
  "description": "The response that generated this message.",
35495
35530
  "type": "object",
35496
35531
  "properties": {
35532
+ "stopReason": {
35533
+ "type": "string",
35534
+ "description": "The reason the response was stopped. If not defined, the response finished normally.",
35535
+ "enum": [
35536
+ "aborted"
35537
+ ]
35538
+ },
35497
35539
  "id": {
35498
35540
  "type": "string",
35499
- "description": "The ID of the response that generated this message."
35541
+ "description": "The ID of the response that generated this message. It can be undefined if the stream was aborted."
35500
35542
  },
35501
35543
  "previous": {
35502
35544
  "type": "string",
35503
35545
  "description": "The ID of the previous response that this message is based on."
35504
35546
  }
35505
- },
35506
- "required": [
35507
- "id"
35508
- ]
35547
+ }
35509
35548
  },
35510
35549
  "AIStreamResponseFinish": {
35511
35550
  "type": "object",
@@ -35527,13 +35566,13 @@
35527
35566
  "description": "The ID of the response"
35528
35567
  },
35529
35568
  "response": {
35569
+ "description": "The response metadata associated with the message.",
35530
35570
  "$ref": "#/components/schemas/AIMessageResponseMetadata"
35531
35571
  }
35532
35572
  },
35533
35573
  "required": [
35534
35574
  "type",
35535
35575
  "messageId",
35536
- "responseId",
35537
35576
  "response"
35538
35577
  ]
35539
35578
  },
@@ -36332,6 +36371,35 @@
36332
36371
  "suggestions"
36333
36372
  ]
36334
36373
  },
36374
+ "AIStreamResponseAttachment": {
36375
+ "type": "object",
36376
+ "description": "Message emitted by the server to indicate that the AI has attached an image.\n",
36377
+ "properties": {
36378
+ "type": {
36379
+ "type": "string",
36380
+ "enum": [
36381
+ "response_attachment"
36382
+ ]
36383
+ },
36384
+ "messageId": {
36385
+ "type": "string",
36386
+ "description": "The ID of the message that this event is composing.\n"
36387
+ },
36388
+ "stepIndex": {
36389
+ "type": "integer",
36390
+ "description": "The index of the step of the message that this event is composing.\n"
36391
+ },
36392
+ "attachment": {
36393
+ "$ref": "#/components/schemas/AIAttachment"
36394
+ }
36395
+ },
36396
+ "required": [
36397
+ "type",
36398
+ "messageId",
36399
+ "stepIndex",
36400
+ "attachment"
36401
+ ]
36402
+ },
36335
36403
  "AIStreamResponse": {
36336
36404
  "oneOf": [
36337
36405
  {
@@ -36354,6 +36422,9 @@
36354
36422
  },
36355
36423
  {
36356
36424
  "$ref": "#/components/schemas/AIStreamResponseFollowupSuggestion"
36425
+ },
36426
+ {
36427
+ "$ref": "#/components/schemas/AIStreamResponseAttachment"
36357
36428
  }
36358
36429
  ]
36359
36430
  },
@@ -39744,6 +39815,21 @@
39744
39815
  }
39745
39816
  }
39746
39817
  },
39818
+ "Timerange": {
39819
+ "type": "object",
39820
+ "properties": {
39821
+ "start": {
39822
+ "$ref": "#/components/schemas/Timestamp"
39823
+ },
39824
+ "end": {
39825
+ "$ref": "#/components/schemas/Timestamp"
39826
+ }
39827
+ },
39828
+ "required": [
39829
+ "start",
39830
+ "end"
39831
+ ]
39832
+ },
39747
39833
  "SHA256": {
39748
39834
  "type": "string",
39749
39835
  "minLength": 64,
@@ -42541,6 +42627,21 @@
42541
42627
  "items": {
42542
42628
  "$ref": "#/components/schemas/AIToolCall"
42543
42629
  }
42630
+ },
42631
+ "timing": {
42632
+ "type": "object",
42633
+ "description": "The timing of the step.",
42634
+ "properties": {
42635
+ "reasoning": {
42636
+ "$ref": "#/components/schemas/Timerange"
42637
+ }
42638
+ }
42639
+ },
42640
+ "attachments": {
42641
+ "type": "array",
42642
+ "items": {
42643
+ "$ref": "#/components/schemas/AIAttachment"
42644
+ }
42544
42645
  }
42545
42646
  },
42546
42647
  "required": [
@@ -42789,6 +42890,9 @@
42789
42890
  "RequestPurgeCDNCacheContext": {
42790
42891
  "$ref": "#/components/schemas/PurgeCDNCacheContext"
42791
42892
  },
42893
+ "DocumentTextBackgroundColor": {
42894
+ "$ref": "#/components/schemas/DocumentTextColor"
42895
+ },
42792
42896
  "SpaceVisitorAuth": {
42793
42897
  "$ref": "#/components/schemas/VisitorAuth"
42794
42898
  },
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:
@@ -13311,6 +13271,7 @@ components:
13311
13271
  - $ref: "#/components/schemas/DocumentBlockQuote"
13312
13272
  - $ref: "#/components/schemas/DocumentBlockTable"
13313
13273
  - $ref: "#/components/schemas/DocumentBlockExpandable"
13274
+ - $ref: "#/components/schemas/DocumentBlockStepper"
13314
13275
  isVoid:
13315
13276
  type: boolean
13316
13277
  enum:
@@ -13515,6 +13476,31 @@ components:
13515
13476
  - type
13516
13477
  - data
13517
13478
  - isVoid
13479
+ DocumentAction:
13480
+ type: object
13481
+ oneOf:
13482
+ - type: object
13483
+ properties:
13484
+ action:
13485
+ type: string
13486
+ enum:
13487
+ - search
13488
+ query:
13489
+ type: string
13490
+ required:
13491
+ - action
13492
+ additionalProperties: false
13493
+ - type: object
13494
+ properties:
13495
+ action:
13496
+ type: string
13497
+ enum:
13498
+ - ask
13499
+ query:
13500
+ type: string
13501
+ required:
13502
+ - action
13503
+ additionalProperties: false
13518
13504
  DocumentInlineButton:
13519
13505
  type: object
13520
13506
  properties:
@@ -13551,6 +13537,14 @@ components:
13551
13537
  $ref: "#/components/schemas/ContentRef"
13552
13538
  required:
13553
13539
  - ref
13540
+ additionalProperties: false
13541
+ - type: object
13542
+ properties:
13543
+ action:
13544
+ $ref: "#/components/schemas/DocumentAction"
13545
+ required:
13546
+ - action
13547
+ additionalProperties: false
13554
13548
  isVoid:
13555
13549
  type: boolean
13556
13550
  enum:
@@ -17780,6 +17774,9 @@ components:
17780
17774
  description: Unique identifier of the site
17781
17775
  type:
17782
17776
  $ref: "#/components/schemas/SiteType"
17777
+ appliedType:
17778
+ $ref: "#/components/schemas/SiteType"
17779
+ description: The currently applied type of the site. For example, frozen sites will have this set to Basic.
17783
17780
  title:
17784
17781
  $ref: "#/components/schemas/SiteTitle"
17785
17782
  icon:
@@ -17840,6 +17837,7 @@ components:
17840
17837
  - object
17841
17838
  - id
17842
17839
  - type
17840
+ - appliedType
17843
17841
  - title
17844
17842
  - visibility
17845
17843
  - published
@@ -21802,6 +21800,21 @@ components:
21802
21800
  required:
21803
21801
  - spaceId
21804
21802
  - pageId
21803
+ AIAttachmentImage:
21804
+ type: object
21805
+ properties:
21806
+ type:
21807
+ type: string
21808
+ enum:
21809
+ - image
21810
+ url:
21811
+ $ref: "#/components/schemas/URL"
21812
+ required:
21813
+ - type
21814
+ - url
21815
+ AIAttachment:
21816
+ oneOf:
21817
+ - $ref: "#/components/schemas/AIAttachmentImage"
21805
21818
  AIMessageInput:
21806
21819
  type: object
21807
21820
  description: Input version of an AI message.
@@ -21817,6 +21830,10 @@ components:
21817
21830
  - $ref: "#/components/schemas/JSONDocument"
21818
21831
  context:
21819
21832
  $ref: "#/components/schemas/AIMessageContext"
21833
+ attachments:
21834
+ type: array
21835
+ items:
21836
+ $ref: "#/components/schemas/AIAttachment"
21820
21837
  required:
21821
21838
  - role
21822
21839
  - content
@@ -21980,14 +21997,17 @@ components:
21980
21997
  description: The response that generated this message.
21981
21998
  type: object
21982
21999
  properties:
22000
+ stopReason:
22001
+ type: string
22002
+ description: The reason the response was stopped. If not defined, the response finished normally.
22003
+ enum:
22004
+ - aborted
21983
22005
  id:
21984
22006
  type: string
21985
- description: The ID of the response that generated this message.
22007
+ description: The ID of the response that generated this message. It can be undefined if the stream was aborted.
21986
22008
  previous:
21987
22009
  type: string
21988
22010
  description: The ID of the previous response that this message is based on.
21989
- required:
21990
- - id
21991
22011
  AIStreamResponseFinish:
21992
22012
  type: object
21993
22013
  description: |
@@ -22006,11 +22026,11 @@ components:
22006
22026
  deprecated: true
22007
22027
  description: The ID of the response
22008
22028
  response:
22029
+ description: The response metadata associated with the message.
22009
22030
  $ref: "#/components/schemas/AIMessageResponseMetadata"
22010
22031
  required:
22011
22032
  - type
22012
22033
  - messageId
22013
- - responseId
22014
22034
  - response
22015
22035
  AIStreamResponseDocument:
22016
22036
  type: object
@@ -22577,6 +22597,30 @@ components:
22577
22597
  - type
22578
22598
  - messageId
22579
22599
  - suggestions
22600
+ AIStreamResponseAttachment:
22601
+ type: object
22602
+ description: |
22603
+ Message emitted by the server to indicate that the AI has attached an image.
22604
+ properties:
22605
+ type:
22606
+ type: string
22607
+ enum:
22608
+ - response_attachment
22609
+ messageId:
22610
+ type: string
22611
+ description: |
22612
+ The ID of the message that this event is composing.
22613
+ stepIndex:
22614
+ type: integer
22615
+ description: |
22616
+ The index of the step of the message that this event is composing.
22617
+ attachment:
22618
+ $ref: "#/components/schemas/AIAttachment"
22619
+ required:
22620
+ - type
22621
+ - messageId
22622
+ - stepIndex
22623
+ - attachment
22580
22624
  AIStreamResponse:
22581
22625
  oneOf:
22582
22626
  - $ref: "#/components/schemas/AIStreamResponseStart"
@@ -22586,6 +22630,7 @@ components:
22586
22630
  - $ref: "#/components/schemas/AIStreamResponseToolCall"
22587
22631
  - $ref: "#/components/schemas/AIStreamResponseToolCallPending"
22588
22632
  - $ref: "#/components/schemas/AIStreamResponseFollowupSuggestion"
22633
+ - $ref: "#/components/schemas/AIStreamResponseAttachment"
22589
22634
  SiteInsightsEventSession:
22590
22635
  type: object
22591
22636
  description: Analytics info on the GitBook's site session.
@@ -24750,6 +24795,16 @@ components:
24750
24795
  description: JWT token generated for a authenticated access session.
24751
24796
  unsignedClaims:
24752
24797
  $ref: "#/components/schemas/PlainObject"
24798
+ Timerange:
24799
+ type: object
24800
+ properties:
24801
+ start:
24802
+ $ref: "#/components/schemas/Timestamp"
24803
+ end:
24804
+ $ref: "#/components/schemas/Timestamp"
24805
+ required:
24806
+ - start
24807
+ - end
24753
24808
  SHA256:
24754
24809
  type: string
24755
24810
  minLength: 64
@@ -26565,6 +26620,16 @@ components:
26565
26620
  type: array
26566
26621
  items:
26567
26622
  $ref: "#/components/schemas/AIToolCall"
26623
+ timing:
26624
+ type: object
26625
+ description: The timing of the step.
26626
+ properties:
26627
+ reasoning:
26628
+ $ref: "#/components/schemas/Timerange"
26629
+ attachments:
26630
+ type: array
26631
+ items:
26632
+ $ref: "#/components/schemas/AIAttachment"
26568
26633
  required:
26569
26634
  - content
26570
26635
  AIMessage:
@@ -26730,6 +26795,8 @@ components:
26730
26795
  $ref: "#/components/schemas/UpdateSpaceGitInfo"
26731
26796
  RequestPurgeCDNCacheContext:
26732
26797
  $ref: "#/components/schemas/PurgeCDNCacheContext"
26798
+ DocumentTextBackgroundColor:
26799
+ $ref: "#/components/schemas/DocumentTextColor"
26733
26800
  SpaceVisitorAuth:
26734
26801
  $ref: "#/components/schemas/VisitorAuth"
26735
26802
  SpaceVisitorAuthCustomBackend: