@gitbook/api 0.198.0 → 0.199.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 +157 -3
- package/dist/constants.d.ts +4 -0
- package/dist/index.cjs +77 -1
- package/dist/index.js +69 -1
- package/package.json +1 -1
- package/spec/openapi.json +404 -4
- package/spec/openapi.yaml +271 -3
package/spec/openapi.yaml
CHANGED
|
@@ -6848,6 +6848,104 @@ paths:
|
|
|
6848
6848
|
application/json:
|
|
6849
6849
|
schema:
|
|
6850
6850
|
$ref: "#/components/schemas/OrganizationAgentInstructions"
|
|
6851
|
+
/orgs/{organizationId}/agent/conversations:
|
|
6852
|
+
get:
|
|
6853
|
+
operationId: listOrganizationAgentConversations
|
|
6854
|
+
summary: List AI agent conversations in an organization
|
|
6855
|
+
description: "Returns a paginated list of the calling user's AI agent conversations with the organization agent. Unlike change request conversations, these are not tied to a single change request: the agent works across the organization and only attaches a change request when it needs to edit content. A conversation belongs to the user who started it and is never visible to anyone else."
|
|
6856
|
+
x-gitbook-mcp: true
|
|
6857
|
+
tags:
|
|
6858
|
+
- organizations
|
|
6859
|
+
- agents
|
|
6860
|
+
security:
|
|
6861
|
+
- user: []
|
|
6862
|
+
- oauth:
|
|
6863
|
+
- organization:read
|
|
6864
|
+
parameters:
|
|
6865
|
+
- $ref: "#/components/parameters/organizationId"
|
|
6866
|
+
- $ref: "#/components/parameters/listPage"
|
|
6867
|
+
- $ref: "#/components/parameters/listLimit"
|
|
6868
|
+
responses:
|
|
6869
|
+
"200":
|
|
6870
|
+
description: A list of agent conversations
|
|
6871
|
+
content:
|
|
6872
|
+
application/json:
|
|
6873
|
+
schema:
|
|
6874
|
+
allOf:
|
|
6875
|
+
- $ref: "#/components/schemas/List"
|
|
6876
|
+
- type: object
|
|
6877
|
+
required:
|
|
6878
|
+
- items
|
|
6879
|
+
properties:
|
|
6880
|
+
items:
|
|
6881
|
+
type: array
|
|
6882
|
+
items:
|
|
6883
|
+
$ref: "#/components/schemas/AgentConversation"
|
|
6884
|
+
/orgs/{organizationId}/agent/conversations/{conversationId}:
|
|
6885
|
+
put:
|
|
6886
|
+
operationId: provisionOrganizationAgentConversation
|
|
6887
|
+
summary: Provision an AI agent conversation in an organization
|
|
6888
|
+
description: Prepares a conversation so the client can connect to it, giving the agent the credentials it acts with. Call this before opening a conversation; connecting to one that was never provisioned yields an agent whose tools all fail. The conversation itself is only recorded once the user sends a first message, so opening the agent and closing it again leaves nothing behind. Safe to call again to refresh an expiring session.
|
|
6889
|
+
tags:
|
|
6890
|
+
- organizations
|
|
6891
|
+
- agents
|
|
6892
|
+
security:
|
|
6893
|
+
- user: []
|
|
6894
|
+
parameters:
|
|
6895
|
+
- $ref: "#/components/parameters/organizationId"
|
|
6896
|
+
- $ref: "#/components/parameters/conversationId"
|
|
6897
|
+
responses:
|
|
6898
|
+
"204":
|
|
6899
|
+
description: The conversation is ready to be connected to.
|
|
6900
|
+
patch:
|
|
6901
|
+
operationId: updateOrganizationAgentConversation
|
|
6902
|
+
summary: Update an AI agent conversation in an organization
|
|
6903
|
+
description: Updates one of the calling user's conversations with the organization agent. Use this to rename it.
|
|
6904
|
+
x-gitbook-mcp: true
|
|
6905
|
+
tags:
|
|
6906
|
+
- organizations
|
|
6907
|
+
- agents
|
|
6908
|
+
security:
|
|
6909
|
+
- user: []
|
|
6910
|
+
- oauth:
|
|
6911
|
+
- organization:write
|
|
6912
|
+
parameters:
|
|
6913
|
+
- $ref: "#/components/parameters/organizationId"
|
|
6914
|
+
- $ref: "#/components/parameters/conversationId"
|
|
6915
|
+
requestBody:
|
|
6916
|
+
required: true
|
|
6917
|
+
content:
|
|
6918
|
+
application/json:
|
|
6919
|
+
schema:
|
|
6920
|
+
type: object
|
|
6921
|
+
required:
|
|
6922
|
+
- title
|
|
6923
|
+
properties:
|
|
6924
|
+
title:
|
|
6925
|
+
type: string
|
|
6926
|
+
description: The new title of the conversation.
|
|
6927
|
+
responses:
|
|
6928
|
+
"200":
|
|
6929
|
+
description: The updated conversation.
|
|
6930
|
+
content:
|
|
6931
|
+
application/json:
|
|
6932
|
+
schema:
|
|
6933
|
+
$ref: "#/components/schemas/AgentConversation"
|
|
6934
|
+
delete:
|
|
6935
|
+
operationId: deleteOrganizationAgentConversation
|
|
6936
|
+
summary: Delete an agent conversation in an organization
|
|
6937
|
+
description: Deletes one of the calling user's conversations with the organization agent, destroying the messages it holds. This cannot be undone.
|
|
6938
|
+
tags:
|
|
6939
|
+
- organizations
|
|
6940
|
+
- agents
|
|
6941
|
+
security:
|
|
6942
|
+
- user: []
|
|
6943
|
+
parameters:
|
|
6944
|
+
- $ref: "#/components/parameters/organizationId"
|
|
6945
|
+
- $ref: "#/components/parameters/conversationId"
|
|
6946
|
+
responses:
|
|
6947
|
+
"205":
|
|
6948
|
+
description: The conversation has been deleted.
|
|
6851
6949
|
/orgs/{organizationId}/translations:
|
|
6852
6950
|
get:
|
|
6853
6951
|
operationId: listTranslations
|
|
@@ -16116,6 +16214,36 @@ components:
|
|
|
16116
16214
|
- $ref: "#/components/schemas/DocumentTableDefinitionSelect"
|
|
16117
16215
|
- $ref: "#/components/schemas/DocumentTableDefinitionContentRef"
|
|
16118
16216
|
- $ref: "#/components/schemas/DocumentTableDefinitionImage"
|
|
16217
|
+
DocumentTableCellSpan:
|
|
16218
|
+
description: Number of rows or columns covered by a table cell merge
|
|
16219
|
+
type: integer
|
|
16220
|
+
minimum: 1
|
|
16221
|
+
maximum: 50
|
|
16222
|
+
DocumentTableCellMerge:
|
|
16223
|
+
description: Positional table cell merge range. The anchor and spans are resolved against the current sorted record order and visible column order. The current document model applies only non-overlapping horizontal or vertical merges of adjacent Text or Number body cells; unsupported ranges are removed during normalization.
|
|
16224
|
+
type: object
|
|
16225
|
+
properties:
|
|
16226
|
+
anchor:
|
|
16227
|
+
type: object
|
|
16228
|
+
description: Cell at the top-left of the merged range
|
|
16229
|
+
properties:
|
|
16230
|
+
record:
|
|
16231
|
+
type: string
|
|
16232
|
+
description: ID of the anchor record
|
|
16233
|
+
column:
|
|
16234
|
+
type: string
|
|
16235
|
+
description: ID of the anchor column
|
|
16236
|
+
required:
|
|
16237
|
+
- record
|
|
16238
|
+
- column
|
|
16239
|
+
rowSpan:
|
|
16240
|
+
$ref: "#/components/schemas/DocumentTableCellSpan"
|
|
16241
|
+
colSpan:
|
|
16242
|
+
$ref: "#/components/schemas/DocumentTableCellSpan"
|
|
16243
|
+
required:
|
|
16244
|
+
- anchor
|
|
16245
|
+
- rowSpan
|
|
16246
|
+
- colSpan
|
|
16119
16247
|
DocumentFragment:
|
|
16120
16248
|
type: object
|
|
16121
16249
|
properties:
|
|
@@ -16168,6 +16296,11 @@ components:
|
|
|
16168
16296
|
type: object
|
|
16169
16297
|
additionalProperties:
|
|
16170
16298
|
$ref: "#/components/schemas/DocumentTableDefinition"
|
|
16299
|
+
cellMerges:
|
|
16300
|
+
type: array
|
|
16301
|
+
description: Positional table cell merge ranges. The current document model retains only non-overlapping horizontal or vertical merges between adjacent Text or Number body cells. Anchors and spans are resolved against the table's current sorted record order and visible column order.
|
|
16302
|
+
items:
|
|
16303
|
+
$ref: "#/components/schemas/DocumentTableCellMerge"
|
|
16171
16304
|
fullWidth:
|
|
16172
16305
|
type: boolean
|
|
16173
16306
|
description: Whether to render the block as a full width one
|
|
@@ -19076,7 +19209,10 @@ components:
|
|
|
19076
19209
|
description: The title of the conversation, generated from the first message. Absent until generated.
|
|
19077
19210
|
shared:
|
|
19078
19211
|
type: boolean
|
|
19079
|
-
description: Whether the conversation is shared with everyone who has access to
|
|
19212
|
+
description: Whether the conversation is shared with everyone who has access to its context, rather than only its creator. Conversations are shared by default; a private conversation is only ever visible to its creator and stays private for good.
|
|
19213
|
+
changeRequest:
|
|
19214
|
+
type: string
|
|
19215
|
+
description: The change request the conversation is currently editing in. Only set for organization agent conversations, which start without one and attach a change request the first time the agent needs to change content. Absent for change request conversations, whose change request is the conversation's context.
|
|
19080
19216
|
createdAt:
|
|
19081
19217
|
$ref: "#/components/schemas/Timestamp"
|
|
19082
19218
|
updatedAt:
|
|
@@ -21515,6 +21651,11 @@ components:
|
|
|
21515
21651
|
additionalProperties:
|
|
21516
21652
|
type: string
|
|
21517
21653
|
description: Whitelisted search parameters from the visitor authentication request.
|
|
21654
|
+
cookies:
|
|
21655
|
+
type: object
|
|
21656
|
+
additionalProperties:
|
|
21657
|
+
type: string
|
|
21658
|
+
description: Whitelisted cookies from the visitor authentication request.
|
|
21518
21659
|
action:
|
|
21519
21660
|
type: string
|
|
21520
21661
|
enum:
|
|
@@ -28947,6 +29088,10 @@ components:
|
|
|
28947
29088
|
description: The base revision ID used to compare the page change in the current conversation.
|
|
28948
29089
|
page:
|
|
28949
29090
|
$ref: "#/components/schemas/ChangedRevisionPage"
|
|
29091
|
+
changeRequestId:
|
|
29092
|
+
type: string
|
|
29093
|
+
description: |
|
|
29094
|
+
The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
|
|
28950
29095
|
required:
|
|
28951
29096
|
- tool
|
|
28952
29097
|
- spaceId
|
|
@@ -28967,6 +29112,10 @@ components:
|
|
|
28967
29112
|
description: The base revision ID used to compare the page change in the current conversation.
|
|
28968
29113
|
page:
|
|
28969
29114
|
$ref: "#/components/schemas/ChangedRevisionPage"
|
|
29115
|
+
changeRequestId:
|
|
29116
|
+
type: string
|
|
29117
|
+
description: |
|
|
29118
|
+
The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
|
|
28970
29119
|
required:
|
|
28971
29120
|
- tool
|
|
28972
29121
|
- spaceId
|
|
@@ -28987,6 +29136,10 @@ components:
|
|
|
28987
29136
|
description: The base revision ID used to compare the page deletion in the current conversation.
|
|
28988
29137
|
page:
|
|
28989
29138
|
$ref: "#/components/schemas/ChangedRevisionPage"
|
|
29139
|
+
changeRequestId:
|
|
29140
|
+
type: string
|
|
29141
|
+
description: |
|
|
29142
|
+
The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
|
|
28990
29143
|
required:
|
|
28991
29144
|
- tool
|
|
28992
29145
|
- spaceId
|
|
@@ -29007,6 +29160,10 @@ components:
|
|
|
29007
29160
|
description: The base revision ID used to compare the page rename in the current conversation.
|
|
29008
29161
|
page:
|
|
29009
29162
|
$ref: "#/components/schemas/ChangedRevisionPage"
|
|
29163
|
+
changeRequestId:
|
|
29164
|
+
type: string
|
|
29165
|
+
description: |
|
|
29166
|
+
The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
|
|
29010
29167
|
title:
|
|
29011
29168
|
type: string
|
|
29012
29169
|
description: The new title of the page.
|
|
@@ -29031,6 +29188,10 @@ components:
|
|
|
29031
29188
|
description: The base revision ID used to compare the page move in the current conversation.
|
|
29032
29189
|
page:
|
|
29033
29190
|
$ref: "#/components/schemas/ChangedRevisionPage"
|
|
29191
|
+
changeRequestId:
|
|
29192
|
+
type: string
|
|
29193
|
+
description: |
|
|
29194
|
+
The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits.
|
|
29034
29195
|
to:
|
|
29035
29196
|
$ref: "#/components/schemas/ChangedRevisionPage"
|
|
29036
29197
|
moveType:
|
|
@@ -29777,6 +29938,11 @@ components:
|
|
|
29777
29938
|
$ref: "#/components/schemas/AIMessageTask"
|
|
29778
29939
|
response:
|
|
29779
29940
|
$ref: "#/components/schemas/AIMessageResponseMetadata"
|
|
29941
|
+
createdAt:
|
|
29942
|
+
type: string
|
|
29943
|
+
format: date-time
|
|
29944
|
+
description: |
|
|
29945
|
+
When the message was added to the conversation. Absent on messages recorded before this field existed.
|
|
29780
29946
|
required:
|
|
29781
29947
|
- id
|
|
29782
29948
|
- role
|
|
@@ -30533,6 +30699,11 @@ components:
|
|
|
30533
30699
|
- page_view
|
|
30534
30700
|
required:
|
|
30535
30701
|
- type
|
|
30702
|
+
SiteInsightsMarkdownSource:
|
|
30703
|
+
description: How a page's markdown was requested. `page-action` means a reader used the site's page-actions menu — its copy or view-as-markdown action — rather than a client fetching the URL directly.
|
|
30704
|
+
type: string
|
|
30705
|
+
enum:
|
|
30706
|
+
- page-action
|
|
30536
30707
|
SiteInsightsEventPageMarkdownRequest:
|
|
30537
30708
|
allOf:
|
|
30538
30709
|
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
@@ -30542,6 +30713,8 @@ components:
|
|
|
30542
30713
|
type: string
|
|
30543
30714
|
enum:
|
|
30544
30715
|
- page_markdown_request
|
|
30716
|
+
markdownSource:
|
|
30717
|
+
$ref: "#/components/schemas/SiteInsightsMarkdownSource"
|
|
30545
30718
|
required:
|
|
30546
30719
|
- type
|
|
30547
30720
|
SiteInsightsEventSearchOpen:
|
|
@@ -31153,6 +31326,14 @@ components:
|
|
|
31153
31326
|
type: string
|
|
31154
31327
|
enum:
|
|
31155
31328
|
- eventPageNotFoundType
|
|
31329
|
+
- type: object
|
|
31330
|
+
required:
|
|
31331
|
+
- column
|
|
31332
|
+
properties:
|
|
31333
|
+
column:
|
|
31334
|
+
type: string
|
|
31335
|
+
enum:
|
|
31336
|
+
- eventMarkdownSource
|
|
31156
31337
|
- type: object
|
|
31157
31338
|
required:
|
|
31158
31339
|
- column
|
|
@@ -31728,6 +31909,21 @@ components:
|
|
|
31728
31909
|
oneOf:
|
|
31729
31910
|
- type: "null"
|
|
31730
31911
|
- $ref: "#/components/schemas/SiteInsightsPageNotFoundType"
|
|
31912
|
+
- type: object
|
|
31913
|
+
required:
|
|
31914
|
+
- column
|
|
31915
|
+
- values
|
|
31916
|
+
properties:
|
|
31917
|
+
column:
|
|
31918
|
+
type: string
|
|
31919
|
+
enum:
|
|
31920
|
+
- eventMarkdownSource
|
|
31921
|
+
values:
|
|
31922
|
+
type: array
|
|
31923
|
+
items:
|
|
31924
|
+
oneOf:
|
|
31925
|
+
- type: "null"
|
|
31926
|
+
- $ref: "#/components/schemas/SiteInsightsMarkdownSource"
|
|
31731
31927
|
- type: object
|
|
31732
31928
|
required:
|
|
31733
31929
|
- column
|
|
@@ -33863,7 +34059,32 @@ components:
|
|
|
33863
34059
|
- stage
|
|
33864
34060
|
- startedAt
|
|
33865
34061
|
- updatedAt
|
|
33866
|
-
|
|
34062
|
+
GitSyncRunOperation:
|
|
34063
|
+
type: string
|
|
34064
|
+
description: Operation performed by a durable Git Sync run.
|
|
34065
|
+
enum:
|
|
34066
|
+
- import
|
|
34067
|
+
- export
|
|
34068
|
+
- check
|
|
34069
|
+
- merge
|
|
34070
|
+
- recovery
|
|
34071
|
+
GitSyncRunState:
|
|
34072
|
+
type: string
|
|
34073
|
+
description: Lifecycle state of a durable Git Sync run.
|
|
34074
|
+
enum:
|
|
34075
|
+
- queued
|
|
34076
|
+
- running
|
|
34077
|
+
- success
|
|
34078
|
+
- failure
|
|
34079
|
+
- timeout
|
|
34080
|
+
- cancelled
|
|
34081
|
+
GitProviderChangeState:
|
|
34082
|
+
type: string
|
|
34083
|
+
description: Lifecycle state of a pull or merge request on the Git provider.
|
|
34084
|
+
enum:
|
|
34085
|
+
- open
|
|
34086
|
+
- closed
|
|
34087
|
+
- merged
|
|
33867
34088
|
GitSyncSiteStructureSectionGroup:
|
|
33868
34089
|
type: object
|
|
33869
34090
|
additionalProperties: false
|
|
@@ -35611,6 +35832,24 @@ components:
|
|
|
35611
35832
|
- idle
|
|
35612
35833
|
- processing
|
|
35613
35834
|
- errored
|
|
35835
|
+
AgentQueuedMessage:
|
|
35836
|
+
type: object
|
|
35837
|
+
description: |
|
|
35838
|
+
A message waiting for the agent's current response to finish, held in the order it will be processed. The identifier addresses the entry to remove it from the queue or run it immediately.
|
|
35839
|
+
properties:
|
|
35840
|
+
id:
|
|
35841
|
+
type: string
|
|
35842
|
+
description: Identifier of the queue entry, unique within the conversation.
|
|
35843
|
+
message:
|
|
35844
|
+
$ref: "#/components/schemas/AIMessageInput"
|
|
35845
|
+
queuedAt:
|
|
35846
|
+
type: string
|
|
35847
|
+
format: date-time
|
|
35848
|
+
description: When the message entered the queue.
|
|
35849
|
+
required:
|
|
35850
|
+
- id
|
|
35851
|
+
- message
|
|
35852
|
+
- queuedAt
|
|
35614
35853
|
AgentActivity:
|
|
35615
35854
|
type: object
|
|
35616
35855
|
description: |
|
|
@@ -35628,6 +35867,10 @@ components:
|
|
|
35628
35867
|
type: string
|
|
35629
35868
|
description: |
|
|
35630
35869
|
When `type` is `tool`, the name of the tool being called (matches `AIToolCall.tool`).
|
|
35870
|
+
label:
|
|
35871
|
+
type: string
|
|
35872
|
+
description: |
|
|
35873
|
+
What to show the user instead of a label derived from `tool`, for a tool whose name means nothing to them — an MCP server's, say, where it reads "Searching documentation".
|
|
35631
35874
|
required:
|
|
35632
35875
|
- type
|
|
35633
35876
|
AgentQuestionOption:
|
|
@@ -35662,6 +35905,20 @@ components:
|
|
|
35662
35905
|
- toolCallId
|
|
35663
35906
|
- question
|
|
35664
35907
|
- options
|
|
35908
|
+
AgentEditTarget:
|
|
35909
|
+
type: object
|
|
35910
|
+
description: |
|
|
35911
|
+
Where the agent's content edits land. Usually a change request, which is how published content is changed; a space whose live edits are unlocked is the exception, and is edited in place. Carries identifiers only: the client resolves the change request's number and subject, or the space's title, through the API.
|
|
35912
|
+
properties:
|
|
35913
|
+
spaceId:
|
|
35914
|
+
type: string
|
|
35915
|
+
description: The ID of the space the edits are made in.
|
|
35916
|
+
changeRequestId:
|
|
35917
|
+
type: string
|
|
35918
|
+
description: |
|
|
35919
|
+
The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits.
|
|
35920
|
+
required:
|
|
35921
|
+
- spaceId
|
|
35665
35922
|
AgentState:
|
|
35666
35923
|
type: object
|
|
35667
35924
|
properties:
|
|
@@ -35674,9 +35931,16 @@ components:
|
|
|
35674
35931
|
type: string
|
|
35675
35932
|
queuedMessages:
|
|
35676
35933
|
type: array
|
|
35677
|
-
description:
|
|
35934
|
+
description: |
|
|
35935
|
+
List of messages sent by the users queued to processed. Superseded by `queue`, which carries the same messages with the identifiers needed to act on them; kept for compatibility with clients that predate it.
|
|
35678
35936
|
items:
|
|
35679
35937
|
$ref: "#/components/schemas/AIMessageInput"
|
|
35938
|
+
queue:
|
|
35939
|
+
type: array
|
|
35940
|
+
description: |
|
|
35941
|
+
Messages waiting for the current response to finish, in the order they will be processed.
|
|
35942
|
+
items:
|
|
35943
|
+
$ref: "#/components/schemas/AgentQueuedMessage"
|
|
35680
35944
|
activity:
|
|
35681
35945
|
$ref: "#/components/schemas/AgentActivity"
|
|
35682
35946
|
description: |
|
|
@@ -35685,6 +35949,10 @@ components:
|
|
|
35685
35949
|
$ref: "#/components/schemas/AgentPendingQuestion"
|
|
35686
35950
|
description: |
|
|
35687
35951
|
A question the agent is waiting for the user to answer. While set, the client replaces the prompt with a choice control.
|
|
35952
|
+
editTarget:
|
|
35953
|
+
$ref: "#/components/schemas/AgentEditTarget"
|
|
35954
|
+
description: |
|
|
35955
|
+
Where the agent currently edits content. Absent until something is attached: the organization agent starts read-only, while a change request agent always edits the change request it belongs to.
|
|
35688
35956
|
required:
|
|
35689
35957
|
- status
|
|
35690
35958
|
- suggestions
|