@gitbook/api 0.161.0 → 0.162.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/spec/openapi.json CHANGED
@@ -189,6 +189,13 @@
189
189
  "x-parent": "sites",
190
190
  "description": "Manage the contextual records and topics used by your site to power AI experiences and insights.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"ContextRecord,ContextConnection,ContextTopic\" grouped=\"false\" %}\n The Site Context objects\n{% endopenapi-schemas %}\n"
191
191
  },
192
+ {
193
+ "name": "site-questions",
194
+ "x-page-title": "Site questions",
195
+ "x-page-description": "Review questions, answers, and sources generated for a docs site.",
196
+ "x-parent": "sites",
197
+ "description": "Inspect the canonical questions asked on your site, the generated answers linked to each question, and the sources used for each answer.\n\n{% openapi-schemas spec=\"gitbook\" schemas=\"SiteQuestion,SiteQuestionAnswer,SiteQuestionAnswerWithResponse,SiteQuestionAnswerSource\" grouped=\"false\" %}\n The Site Questions objects\n{% endopenapi-schemas %}\n"
198
+ },
192
199
  {
193
200
  "name": "collections",
194
201
  "x-page-icon": "folder",
@@ -14938,6 +14945,305 @@
14938
14945
  }
14939
14946
  }
14940
14947
  },
14948
+ "/orgs/{organizationId}/sites/{siteId}/questions": {
14949
+ "get": {
14950
+ "operationId": "listSiteQuestions",
14951
+ "summary": "List all questions in a site",
14952
+ "tags": [
14953
+ "site-questions"
14954
+ ],
14955
+ "security": [
14956
+ {
14957
+ "user": []
14958
+ }
14959
+ ],
14960
+ "parameters": [
14961
+ {
14962
+ "$ref": "#/components/parameters/organizationId"
14963
+ },
14964
+ {
14965
+ "$ref": "#/components/parameters/siteId"
14966
+ },
14967
+ {
14968
+ "$ref": "#/components/parameters/listPage"
14969
+ },
14970
+ {
14971
+ "$ref": "#/components/parameters/listLimit"
14972
+ }
14973
+ ],
14974
+ "responses": {
14975
+ "200": {
14976
+ "description": "OK",
14977
+ "content": {
14978
+ "application/json": {
14979
+ "schema": {
14980
+ "allOf": [
14981
+ {
14982
+ "$ref": "#/components/schemas/List"
14983
+ },
14984
+ {
14985
+ "type": "object",
14986
+ "required": [
14987
+ "items"
14988
+ ],
14989
+ "properties": {
14990
+ "items": {
14991
+ "type": "array",
14992
+ "items": {
14993
+ "$ref": "#/components/schemas/SiteQuestion"
14994
+ }
14995
+ }
14996
+ }
14997
+ }
14998
+ ]
14999
+ }
15000
+ }
15001
+ }
15002
+ }
15003
+ }
15004
+ }
15005
+ },
15006
+ "/orgs/{organizationId}/sites/{siteId}/questions/{siteQuestionId}": {
15007
+ "get": {
15008
+ "operationId": "getSiteQuestionById",
15009
+ "summary": "Get a site question by ID",
15010
+ "tags": [
15011
+ "site-questions"
15012
+ ],
15013
+ "security": [
15014
+ {
15015
+ "user": []
15016
+ }
15017
+ ],
15018
+ "parameters": [
15019
+ {
15020
+ "$ref": "#/components/parameters/organizationId"
15021
+ },
15022
+ {
15023
+ "$ref": "#/components/parameters/siteId"
15024
+ },
15025
+ {
15026
+ "$ref": "#/components/parameters/siteQuestionId"
15027
+ }
15028
+ ],
15029
+ "responses": {
15030
+ "200": {
15031
+ "description": "OK",
15032
+ "content": {
15033
+ "application/json": {
15034
+ "schema": {
15035
+ "$ref": "#/components/schemas/SiteQuestion"
15036
+ }
15037
+ }
15038
+ }
15039
+ }
15040
+ }
15041
+ }
15042
+ },
15043
+ "/orgs/{organizationId}/sites/{siteId}/answers": {
15044
+ "get": {
15045
+ "operationId": "listSiteQuestionAnswers",
15046
+ "summary": "List all answers for a site",
15047
+ "tags": [
15048
+ "site-questions"
15049
+ ],
15050
+ "security": [
15051
+ {
15052
+ "user": []
15053
+ }
15054
+ ],
15055
+ "parameters": [
15056
+ {
15057
+ "$ref": "#/components/parameters/organizationId"
15058
+ },
15059
+ {
15060
+ "$ref": "#/components/parameters/siteId"
15061
+ },
15062
+ {
15063
+ "name": "question",
15064
+ "in": "query",
15065
+ "description": "Filter answers to a specific site question ID.",
15066
+ "schema": {
15067
+ "type": "string"
15068
+ }
15069
+ },
15070
+ {
15071
+ "name": "language",
15072
+ "in": "query",
15073
+ "description": "Filter answers by ISO language code.",
15074
+ "schema": {
15075
+ "type": "string"
15076
+ }
15077
+ },
15078
+ {
15079
+ "name": "answered",
15080
+ "in": "query",
15081
+ "description": "Filter answers by answered resolution.",
15082
+ "schema": {
15083
+ "$ref": "#/components/schemas/SiteQuestionAnswerResolution"
15084
+ }
15085
+ },
15086
+ {
15087
+ "name": "confidence",
15088
+ "in": "query",
15089
+ "description": "Filter answers by answered confidence.",
15090
+ "schema": {
15091
+ "$ref": "#/components/schemas/SiteQuestionAnswerConfidence"
15092
+ }
15093
+ },
15094
+ {
15095
+ "name": "relevance",
15096
+ "in": "query",
15097
+ "description": "Filter answers by question relevance.",
15098
+ "schema": {
15099
+ "$ref": "#/components/schemas/SiteQuestionAnswerRelevance"
15100
+ }
15101
+ },
15102
+ {
15103
+ "name": "thread",
15104
+ "in": "query",
15105
+ "description": "Filter answers by thread root answer ID. Includes the root answer itself.",
15106
+ "schema": {
15107
+ "type": "string"
15108
+ }
15109
+ },
15110
+ {
15111
+ "$ref": "#/components/parameters/listPage"
15112
+ },
15113
+ {
15114
+ "$ref": "#/components/parameters/listLimit"
15115
+ }
15116
+ ],
15117
+ "responses": {
15118
+ "200": {
15119
+ "description": "OK",
15120
+ "content": {
15121
+ "application/json": {
15122
+ "schema": {
15123
+ "allOf": [
15124
+ {
15125
+ "$ref": "#/components/schemas/List"
15126
+ },
15127
+ {
15128
+ "type": "object",
15129
+ "required": [
15130
+ "items"
15131
+ ],
15132
+ "properties": {
15133
+ "items": {
15134
+ "type": "array",
15135
+ "items": {
15136
+ "$ref": "#/components/schemas/SiteQuestionAnswer"
15137
+ }
15138
+ }
15139
+ }
15140
+ }
15141
+ ]
15142
+ }
15143
+ }
15144
+ }
15145
+ }
15146
+ }
15147
+ }
15148
+ },
15149
+ "/orgs/{organizationId}/sites/{siteId}/answers/{siteQuestionAnswerId}": {
15150
+ "get": {
15151
+ "operationId": "getSiteQuestionAnswerById",
15152
+ "summary": "Get a site answer by ID",
15153
+ "tags": [
15154
+ "site-questions"
15155
+ ],
15156
+ "security": [
15157
+ {
15158
+ "user": []
15159
+ }
15160
+ ],
15161
+ "parameters": [
15162
+ {
15163
+ "$ref": "#/components/parameters/organizationId"
15164
+ },
15165
+ {
15166
+ "$ref": "#/components/parameters/siteId"
15167
+ },
15168
+ {
15169
+ "$ref": "#/components/parameters/siteQuestionAnswerId"
15170
+ }
15171
+ ],
15172
+ "responses": {
15173
+ "200": {
15174
+ "description": "OK",
15175
+ "content": {
15176
+ "application/json": {
15177
+ "schema": {
15178
+ "$ref": "#/components/schemas/SiteQuestionAnswerWithResponse"
15179
+ }
15180
+ }
15181
+ }
15182
+ }
15183
+ }
15184
+ }
15185
+ },
15186
+ "/orgs/{organizationId}/sites/{siteId}/answers/{siteQuestionAnswerId}/sources": {
15187
+ "get": {
15188
+ "operationId": "listSiteQuestionAnswerSources",
15189
+ "summary": "List the sources for an answer",
15190
+ "tags": [
15191
+ "site-questions"
15192
+ ],
15193
+ "security": [
15194
+ {
15195
+ "user": []
15196
+ }
15197
+ ],
15198
+ "parameters": [
15199
+ {
15200
+ "$ref": "#/components/parameters/organizationId"
15201
+ },
15202
+ {
15203
+ "$ref": "#/components/parameters/siteId"
15204
+ },
15205
+ {
15206
+ "$ref": "#/components/parameters/siteQuestionAnswerId"
15207
+ },
15208
+ {
15209
+ "$ref": "#/components/parameters/listPage"
15210
+ },
15211
+ {
15212
+ "$ref": "#/components/parameters/listLimit"
15213
+ }
15214
+ ],
15215
+ "responses": {
15216
+ "200": {
15217
+ "description": "OK",
15218
+ "content": {
15219
+ "application/json": {
15220
+ "schema": {
15221
+ "allOf": [
15222
+ {
15223
+ "$ref": "#/components/schemas/List"
15224
+ },
15225
+ {
15226
+ "type": "object",
15227
+ "required": [
15228
+ "items"
15229
+ ],
15230
+ "properties": {
15231
+ "items": {
15232
+ "type": "array",
15233
+ "items": {
15234
+ "$ref": "#/components/schemas/SiteQuestionAnswerSource"
15235
+ }
15236
+ }
15237
+ }
15238
+ }
15239
+ ]
15240
+ }
15241
+ }
15242
+ }
15243
+ }
15244
+ }
15245
+ }
15246
+ },
14941
15247
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}": {
14942
15248
  "patch": {
14943
15249
  "operationId": "updateSiteSpaceById",
@@ -16392,6 +16698,9 @@
16392
16698
  },
16393
16699
  "toolCall": {
16394
16700
  "$ref": "#/components/schemas/AIToolCallResult"
16701
+ },
16702
+ "session": {
16703
+ "$ref": "#/components/schemas/SiteInsightsSession"
16395
16704
  }
16396
16705
  }
16397
16706
  }
@@ -18313,6 +18622,24 @@
18313
18622
  "type": "string"
18314
18623
  }
18315
18624
  },
18625
+ "siteQuestionId": {
18626
+ "name": "siteQuestionId",
18627
+ "in": "path",
18628
+ "required": true,
18629
+ "description": "The unique id of the site question",
18630
+ "schema": {
18631
+ "type": "string"
18632
+ }
18633
+ },
18634
+ "siteQuestionAnswerId": {
18635
+ "name": "siteQuestionAnswerId",
18636
+ "in": "path",
18637
+ "required": true,
18638
+ "description": "The unique id of the site question answer",
18639
+ "schema": {
18640
+ "type": "string"
18641
+ }
18642
+ },
18316
18643
  "siteSpaceId": {
18317
18644
  "name": "siteSpaceId",
18318
18645
  "in": "path",
@@ -25106,21 +25433,48 @@
25106
25433
  ]
25107
25434
  },
25108
25435
  "RevisionTag": {
25109
- "type": "object",
25110
- "description": "A reusable tag that different types of content can be associated to (e.g. pages, update entries)",
25111
- "properties": {
25112
- "slug": {
25113
- "type": "string",
25114
- "description": "The slug identifier for the tag, immutable after creation."
25436
+ "allOf": [
25437
+ {
25438
+ "type": "object",
25439
+ "description": "A reusable tag that different types of content can be associated to (e.g. pages, update entries)",
25440
+ "properties": {
25441
+ "slug": {
25442
+ "type": "string",
25443
+ "description": "The slug identifier for the tag, immutable after creation."
25444
+ },
25445
+ "label": {
25446
+ "type": "string",
25447
+ "description": "Display label for the tag. Can be renamed and differ from the slug."
25448
+ }
25449
+ },
25450
+ "required": [
25451
+ "slug",
25452
+ "label"
25453
+ ]
25115
25454
  },
25116
- "label": {
25117
- "type": "string",
25118
- "description": "Display label for the tag. Can be renamed and differ from the slug."
25455
+ {
25456
+ "oneOf": [
25457
+ {
25458
+ "type": "object",
25459
+ "properties": {
25460
+ "emoji": {
25461
+ "$ref": "#/components/schemas/Emoji"
25462
+ }
25463
+ },
25464
+ "required": [
25465
+ "emoji"
25466
+ ]
25467
+ },
25468
+ {
25469
+ "type": "object",
25470
+ "properties": {
25471
+ "icon": {
25472
+ "$ref": "#/components/schemas/Icon"
25473
+ }
25474
+ }
25475
+ }
25476
+ ]
25119
25477
  }
25120
- },
25121
- "required": [
25122
- "slug",
25123
- "label"
25124
25478
  ]
25125
25479
  },
25126
25480
  "GitSyncCommit": {
@@ -25535,7 +25889,8 @@
25535
25889
  "type": "string",
25536
25890
  "description": "Name of the organization",
25537
25891
  "minLength": 2,
25538
- "maxLength": 255
25892
+ "maxLength": 255,
25893
+ "pattern": "\\S.*\\S"
25539
25894
  },
25540
25895
  "OrganizationEmailDomains": {
25541
25896
  "type": "array",
@@ -36853,704 +37208,721 @@
36853
37208
  "urls"
36854
37209
  ]
36855
37210
  },
36856
- "SiteSpaceCustomizationSettings": {
36857
- "allOf": [
36858
- {
36859
- "$ref": "#/components/schemas/SiteCustomizationSettings"
37211
+ "SiteQuestionStatsFeedback": {
37212
+ "type": "object",
37213
+ "description": "Aggregated feedback for answers linked to a site question.",
37214
+ "properties": {
37215
+ "positive": {
37216
+ "type": "number",
37217
+ "description": "Count of answers with positive feedback."
36860
37218
  },
36861
- {
36862
- "type": "object",
36863
- "properties": {
36864
- "hasOverrides": {
36865
- "type": "boolean",
36866
- "description": "Indicates whether the site customization settings have been overridden."
36867
- }
36868
- },
36869
- "required": [
36870
- "hasOverrides"
36871
- ]
37219
+ "negative": {
37220
+ "type": "number",
37221
+ "description": "Count of answers with negative feedback."
37222
+ },
37223
+ "unrated": {
37224
+ "type": "number",
37225
+ "description": "Count of answers without feedback."
36872
37226
  }
37227
+ },
37228
+ "required": [
37229
+ "positive",
37230
+ "negative",
37231
+ "unrated"
36873
37232
  ]
36874
37233
  },
36875
- "SiteSectionGroupPointer": {
37234
+ "SiteQuestionStatsAnswered": {
36876
37235
  "type": "object",
37236
+ "description": "Aggregated answered assessment for answers linked to a site question.",
36877
37237
  "properties": {
36878
- "type": {
36879
- "type": "string",
36880
- "enum": [
36881
- "site-section",
36882
- "site-section-group"
36883
- ]
37238
+ "yes": {
37239
+ "type": "number",
37240
+ "description": "Count of answers assessed as fully answered."
36884
37241
  },
36885
- "id": {
36886
- "type": "string",
36887
- "description": "Unique identifier for the site section"
37242
+ "partially": {
37243
+ "type": "number",
37244
+ "description": "Count of answers assessed as partially answered."
37245
+ },
37246
+ "no": {
37247
+ "type": "number",
37248
+ "description": "Count of answers assessed as not answered."
36888
37249
  }
36889
37250
  },
36890
37251
  "required": [
36891
- "type",
36892
- "id"
37252
+ "yes",
37253
+ "partially",
37254
+ "no"
36893
37255
  ]
36894
37256
  },
36895
- "SiteSectionGroupMovePosition": {
37257
+ "SiteQuestionStats": {
36896
37258
  "type": "object",
36897
- "description": "Position at which to move the site section group.",
37259
+ "description": "Aggregated stats for answers linked to a site question.",
36898
37260
  "properties": {
36899
- "before": {
36900
- "$ref": "#/components/schemas/SiteSectionGroupPointer"
37261
+ "answers": {
37262
+ "type": "number",
37263
+ "description": "Total count of answers linked to the question."
36901
37264
  },
36902
- "after": {
36903
- "$ref": "#/components/schemas/SiteSectionGroupPointer"
37265
+ "feedback": {
37266
+ "$ref": "#/components/schemas/SiteQuestionStatsFeedback"
37267
+ },
37268
+ "answered": {
37269
+ "$ref": "#/components/schemas/SiteQuestionStatsAnswered"
36904
37270
  }
36905
- }
37271
+ },
37272
+ "required": [
37273
+ "answers",
37274
+ "feedback",
37275
+ "answered"
37276
+ ]
36906
37277
  },
36907
- "SiteSectionPointer": {
37278
+ "SiteQuestion": {
36908
37279
  "type": "object",
36909
37280
  "properties": {
36910
- "type": {
37281
+ "object": {
36911
37282
  "type": "string",
36912
37283
  "enum": [
36913
- "site-section"
37284
+ "site-question"
36914
37285
  ]
36915
37286
  },
36916
- "siteSection": {
37287
+ "id": {
36917
37288
  "type": "string",
36918
- "description": "Unique identifier for the site section"
37289
+ "description": "The ID of the site question."
37290
+ },
37291
+ "question": {
37292
+ "type": "string",
37293
+ "description": "Canonical text for the unique site question."
37294
+ },
37295
+ "createdAt": {
37296
+ "$ref": "#/components/schemas/Timestamp"
37297
+ },
37298
+ "stats": {
37299
+ "$ref": "#/components/schemas/SiteQuestionStats"
37300
+ },
37301
+ "urls": {
37302
+ "type": "object",
37303
+ "description": "URLs associated with the site question.",
37304
+ "properties": {
37305
+ "location": {
37306
+ "type": "string",
37307
+ "format": "uri",
37308
+ "description": "URL of the site question in the API."
37309
+ }
37310
+ },
37311
+ "required": [
37312
+ "location"
37313
+ ]
36919
37314
  }
36920
37315
  },
36921
37316
  "required": [
36922
- "type",
36923
- "siteSection"
37317
+ "object",
37318
+ "id",
37319
+ "question",
37320
+ "createdAt",
37321
+ "stats",
37322
+ "urls"
36924
37323
  ]
36925
37324
  },
36926
- "SiteSectionMovePosition": {
36927
- "type": "object",
36928
- "description": "Position at which to move the site section to.",
36929
- "properties": {
36930
- "before": {
36931
- "$ref": "#/components/schemas/SiteSectionPointer"
36932
- },
36933
- "after": {
36934
- "$ref": "#/components/schemas/SiteSectionPointer"
36935
- }
36936
- }
37325
+ "SiteQuestionAnswerResolution": {
37326
+ "type": "string",
37327
+ "description": "Whether the response answered the question.",
37328
+ "enum": [
37329
+ "no",
37330
+ "partially",
37331
+ "yes"
37332
+ ]
36937
37333
  },
36938
- "SiteSpacePointer": {
37334
+ "SiteQuestionAnswerConfidence": {
37335
+ "type": "string",
37336
+ "description": "Confidence in whether the response answered the question.",
37337
+ "enum": [
37338
+ "low",
37339
+ "medium",
37340
+ "high"
37341
+ ]
37342
+ },
37343
+ "SiteQuestionAnswerRelevance": {
37344
+ "type": "string",
37345
+ "description": "Relevance classification of the user question.",
37346
+ "enum": [
37347
+ "relevant",
37348
+ "spam",
37349
+ "off-topic",
37350
+ "unclear"
37351
+ ]
37352
+ },
37353
+ "SiteInsightsSession": {
36939
37354
  "type": "object",
37355
+ "description": "Identifiers for a GitBook site session, used for analytics and adaptive content.",
36940
37356
  "properties": {
36941
- "type": {
37357
+ "visitorId": {
36942
37358
  "type": "string",
36943
- "enum": [
36944
- "site-space"
36945
- ]
37359
+ "description": "GitBook's unique identifier of the visitor."
36946
37360
  },
36947
- "siteSpace": {
37361
+ "sessionId": {
36948
37362
  "type": "string",
36949
- "description": "Unique identifier for the site space"
37363
+ "description": "GitBook's unique identifier of the visitor's session."
36950
37364
  }
36951
37365
  },
36952
37366
  "required": [
36953
- "type",
36954
- "siteSpace"
37367
+ "visitorId",
37368
+ "sessionId"
36955
37369
  ]
36956
37370
  },
36957
- "SiteSpaceMovePosition": {
37371
+ "SiteQuestionAnswer": {
36958
37372
  "type": "object",
36959
- "description": "Position at which to move the site space to.",
36960
37373
  "properties": {
36961
- "before": {
36962
- "$ref": "#/components/schemas/SiteSpacePointer"
37374
+ "object": {
37375
+ "type": "string",
37376
+ "enum": [
37377
+ "site-question-answer"
37378
+ ]
36963
37379
  },
36964
- "after": {
36965
- "$ref": "#/components/schemas/SiteSpacePointer"
36966
- }
36967
- }
36968
- },
36969
- "InviteSiteUsersAndTeams": {
36970
- "type": "object",
36971
- "properties": {
36972
- "role": {
36973
- "description": "Role to set.",
36974
- "$ref": "#/components/schemas/MemberRole"
36975
- }
36976
- },
36977
- "anyOf": [
36978
- {
37380
+ "id": {
37381
+ "type": "string",
37382
+ "description": "The ID of the site question answer."
37383
+ },
37384
+ "question": {
37385
+ "type": "string",
37386
+ "description": "The ID of the parent site question."
37387
+ },
37388
+ "input": {
36979
37389
  "type": "object",
36980
37390
  "properties": {
36981
- "teams": {
36982
- "type": "array",
36983
- "minItems": 1,
36984
- "items": {
36985
- "type": "string",
36986
- "description": "The ID of the team to be invited"
36987
- }
37391
+ "text": {
37392
+ "type": "string",
37393
+ "description": "Normalized question text for this answer."
37394
+ },
37395
+ "raw": {
37396
+ "type": "string",
37397
+ "description": "Raw question text as asked by the user."
36988
37398
  }
36989
- },
37399
+ }
37400
+ },
37401
+ "thread": {
37402
+ "type": "object",
36990
37403
  "required": [
36991
- "teams"
36992
- ]
37404
+ "id",
37405
+ "previous"
37406
+ ],
37407
+ "properties": {
37408
+ "id": {
37409
+ "type": "string",
37410
+ "description": "The ID of the thread this answer belongs to."
37411
+ },
37412
+ "previous": {
37413
+ "type": "string",
37414
+ "description": "ID of the previous answer in the same thread."
37415
+ }
37416
+ }
36993
37417
  },
36994
- {
37418
+ "session": {
37419
+ "$ref": "#/components/schemas/SiteInsightsSession"
37420
+ },
37421
+ "feedback": {
36995
37422
  "type": "object",
37423
+ "required": [
37424
+ "rating"
37425
+ ],
36996
37426
  "properties": {
36997
- "users": {
36998
- "type": "array",
36999
- "minItems": 1,
37000
- "items": {
37001
- "type": "string",
37002
- "description": "The ID of the user to be invited"
37003
- }
37427
+ "rating": {
37428
+ "type": "integer",
37429
+ "enum": [
37430
+ -1,
37431
+ 1
37432
+ ],
37433
+ "description": "Feedback rating provided by the user."
37434
+ }
37435
+ }
37436
+ },
37437
+ "responseId": {
37438
+ "type": "string",
37439
+ "description": "The response identifier for this answer."
37440
+ },
37441
+ "language": {
37442
+ "type": "string",
37443
+ "description": "ISO language code of the question."
37444
+ },
37445
+ "answered": {
37446
+ "$ref": "#/components/schemas/SiteQuestionAnswerResolution"
37447
+ },
37448
+ "confidence": {
37449
+ "$ref": "#/components/schemas/SiteQuestionAnswerConfidence"
37450
+ },
37451
+ "relevance": {
37452
+ "$ref": "#/components/schemas/SiteQuestionAnswerRelevance"
37453
+ },
37454
+ "createdAt": {
37455
+ "$ref": "#/components/schemas/Timestamp"
37456
+ },
37457
+ "updatedAt": {
37458
+ "$ref": "#/components/schemas/Timestamp"
37459
+ },
37460
+ "urls": {
37461
+ "type": "object",
37462
+ "description": "URLs associated with the site question answer.",
37463
+ "properties": {
37464
+ "location": {
37465
+ "type": "string",
37466
+ "format": "uri",
37467
+ "description": "URL of the site question answer in the API."
37004
37468
  }
37005
37469
  },
37006
37470
  "required": [
37007
- "users"
37471
+ "location"
37008
37472
  ]
37009
37473
  }
37010
- ],
37474
+ },
37011
37475
  "required": [
37012
- "role"
37476
+ "object",
37477
+ "id",
37478
+ "question",
37479
+ "input",
37480
+ "responseId",
37481
+ "language",
37482
+ "answered",
37483
+ "confidence",
37484
+ "relevance",
37485
+ "createdAt",
37486
+ "urls"
37013
37487
  ]
37014
37488
  },
37015
- "OrganizationPointer": {
37489
+ "AIMessageRole": {
37490
+ "type": "string",
37491
+ "enum": [
37492
+ "user",
37493
+ "assistant",
37494
+ "developer"
37495
+ ]
37496
+ },
37497
+ "AIToolCallGetPageContent": {
37016
37498
  "type": "object",
37017
37499
  "properties": {
37018
- "type": {
37500
+ "tool": {
37019
37501
  "type": "string",
37020
37502
  "enum": [
37021
- "organization"
37503
+ "getPageContent"
37022
37504
  ]
37023
37505
  },
37024
- "organization": {
37506
+ "spaceId": {
37025
37507
  "type": "string",
37026
- "description": "Unique identifier for the organization"
37027
- }
37028
- },
37029
- "required": [
37030
- "type",
37031
- "organization"
37032
- ]
37033
- },
37034
- "UserSitePermission": {
37035
- "type": "object",
37036
- "description": "Permission of a user in a site.",
37037
- "properties": {
37038
- "permission": {
37039
- "$ref": "#/components/schemas/MemberRoleOrGuest"
37508
+ "description": "The ID of the space being accessed."
37040
37509
  },
37041
- "user": {
37042
- "$ref": "#/components/schemas/User"
37510
+ "revisionId": {
37511
+ "type": "string",
37512
+ "description": "The ID of the revision within which the page content is being fetched."
37043
37513
  },
37044
- "origin": {
37045
- "description": "The content or organization that enforced this permission level.",
37046
- "oneOf": [
37047
- {
37048
- "$ref": "#/components/schemas/SpacePointer"
37049
- },
37050
- {
37051
- "$ref": "#/components/schemas/OrganizationPointer"
37052
- }
37053
- ]
37514
+ "page": {
37515
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37054
37516
  }
37055
37517
  },
37056
37518
  "required": [
37057
- "permission",
37058
- "user",
37059
- "origin"
37519
+ "tool",
37520
+ "spaceId",
37521
+ "page",
37522
+ "revisionId"
37060
37523
  ]
37061
37524
  },
37062
- "UserSitePermissionOverride": {
37525
+ "AIToolCallGetPages": {
37063
37526
  "type": "object",
37064
- "description": "Permission override of a user in a site.",
37065
37527
  "properties": {
37066
- "permission": {
37067
- "$ref": "#/components/schemas/MemberRole"
37528
+ "tool": {
37529
+ "type": "string",
37530
+ "enum": [
37531
+ "getPages"
37532
+ ]
37068
37533
  },
37069
- "user": {
37070
- "$ref": "#/components/schemas/User"
37534
+ "spaceId": {
37535
+ "type": "string",
37536
+ "description": "The ID of the space being accessed."
37537
+ },
37538
+ "revisionId": {
37539
+ "type": "string",
37540
+ "description": "The revision ID of the space."
37071
37541
  }
37072
37542
  },
37073
37543
  "required": [
37074
- "permission",
37075
- "user"
37544
+ "tool",
37545
+ "spaceId",
37546
+ "revisionId"
37076
37547
  ]
37077
37548
  },
37078
- "TeamSitePermissionOverride": {
37549
+ "AIToolCallGetReusableContents": {
37079
37550
  "type": "object",
37080
- "description": "Permission override of a team in a site.",
37081
37551
  "properties": {
37082
- "permission": {
37083
- "$ref": "#/components/schemas/MemberRole"
37552
+ "tool": {
37553
+ "type": "string",
37554
+ "enum": [
37555
+ "getReusableContents"
37556
+ ]
37084
37557
  },
37085
- "team": {
37086
- "$ref": "#/components/schemas/OrganizationTeam"
37558
+ "spaceId": {
37559
+ "type": "string",
37560
+ "description": "The ID of the space being accessed."
37561
+ },
37562
+ "revisionId": {
37563
+ "type": "string",
37564
+ "description": "The revision ID of the space."
37087
37565
  }
37088
37566
  },
37089
37567
  "required": [
37090
- "permission",
37091
- "team"
37568
+ "tool",
37569
+ "spaceId",
37570
+ "revisionId"
37092
37571
  ]
37093
37572
  },
37094
- "AIMessageContext": {
37095
- "type": "object",
37096
- "description": "Context about the current user sending a message.",
37097
- "properties": {
37098
- "location": {
37099
- "type": "object",
37100
- "properties": {
37101
- "spaceId": {
37102
- "type": "string",
37103
- "description": "ID of the current space."
37104
- },
37105
- "pageId": {
37106
- "type": "string",
37107
- "description": "ID of the current page."
37108
- }
37109
- },
37110
- "required": [
37111
- "spaceId",
37112
- "pageId"
37113
- ]
37114
- }
37115
- }
37116
- },
37117
- "AIAttachmentImage": {
37573
+ "AIToolCallSearchResultPage": {
37118
37574
  "type": "object",
37575
+ "title": "Page result",
37576
+ "description": "Result of a search matching a page.",
37119
37577
  "properties": {
37120
37578
  "type": {
37121
37579
  "type": "string",
37122
37580
  "enum": [
37123
- "image"
37581
+ "page"
37124
37582
  ]
37125
37583
  },
37126
- "url": {
37127
- "$ref": "#/components/schemas/URL"
37584
+ "spaceId": {
37585
+ "type": "string",
37586
+ "description": "The ID of the space"
37587
+ },
37588
+ "pageId": {
37589
+ "type": "string",
37590
+ "description": "The ID of the page"
37591
+ },
37592
+ "revisionId": {
37593
+ "type": "string",
37594
+ "description": "The revision ID of the result"
37595
+ },
37596
+ "anchor": {
37597
+ "type": "string",
37598
+ "description": "The anchor of the result"
37599
+ },
37600
+ "title": {
37601
+ "type": "string",
37602
+ "description": "The title of the result"
37603
+ },
37604
+ "description": {
37605
+ "type": "string",
37606
+ "description": "The description of the result"
37128
37607
  }
37129
37608
  },
37130
37609
  "required": [
37131
37610
  "type",
37132
- "url"
37611
+ "spaceId",
37612
+ "pageId",
37613
+ "revisionId",
37614
+ "title"
37133
37615
  ]
37134
37616
  },
37135
- "AIAttachmentFile": {
37617
+ "AIToolCallSearchResultRecord": {
37136
37618
  "type": "object",
37619
+ "title": "Site context record result",
37620
+ "description": "Result of a search matching a site context record.",
37137
37621
  "properties": {
37138
37622
  "type": {
37139
37623
  "type": "string",
37140
37624
  "enum": [
37141
- "file"
37625
+ "record"
37142
37626
  ]
37143
37627
  },
37144
- "url": {
37145
- "$ref": "#/components/schemas/URL"
37628
+ "siteId": {
37629
+ "type": "string",
37630
+ "description": "The ID of the site owning the context record"
37146
37631
  },
37147
- "filename": {
37632
+ "recordId": {
37148
37633
  "type": "string",
37149
- "description": "Name of the file."
37634
+ "description": "The ID of the context record"
37150
37635
  },
37151
- "contentType": {
37636
+ "title": {
37152
37637
  "type": "string",
37153
- "enum": [
37154
- "application/pdf"
37155
- ]
37638
+ "description": "The title of the record"
37639
+ },
37640
+ "description": {
37641
+ "type": "string",
37642
+ "description": "The description of the record"
37643
+ },
37644
+ "url": {
37645
+ "type": "string",
37646
+ "format": "uri",
37647
+ "description": "URL of the record in its original source"
37156
37648
  }
37157
37649
  },
37158
37650
  "required": [
37159
37651
  "type",
37160
- "url",
37161
- "filename",
37162
- "contentType"
37652
+ "siteId",
37653
+ "recordId",
37654
+ "title"
37163
37655
  ]
37164
37656
  },
37165
- "AIAttachment": {
37657
+ "AIToolCallSearchResult": {
37658
+ "description": "Result of a search",
37166
37659
  "oneOf": [
37167
37660
  {
37168
- "$ref": "#/components/schemas/AIAttachmentImage"
37661
+ "$ref": "#/components/schemas/AIToolCallSearchResultPage"
37169
37662
  },
37170
37663
  {
37171
- "$ref": "#/components/schemas/AIAttachmentFile"
37664
+ "$ref": "#/components/schemas/AIToolCallSearchResultRecord"
37172
37665
  }
37173
- ]
37666
+ ],
37667
+ "discriminator": {
37668
+ "propertyName": "type"
37669
+ }
37174
37670
  },
37175
- "AIMessageInput": {
37671
+ "AIToolCallSearch": {
37176
37672
  "type": "object",
37177
- "description": "Input version of an AI message.",
37673
+ "description": "Tool to search for content",
37178
37674
  "properties": {
37179
- "role": {
37675
+ "tool": {
37180
37676
  "type": "string",
37181
37677
  "enum": [
37182
- "user"
37183
- ]
37184
- },
37185
- "content": {
37186
- "oneOf": [
37187
- {
37188
- "type": "string",
37189
- "maxLength": 2048
37190
- },
37191
- {
37192
- "$ref": "#/components/schemas/JSONDocument"
37193
- }
37678
+ "search"
37194
37679
  ]
37195
37680
  },
37196
- "context": {
37197
- "$ref": "#/components/schemas/AIMessageContext"
37681
+ "query": {
37682
+ "type": "string",
37683
+ "description": "The query that has been searched for."
37198
37684
  },
37199
- "attachments": {
37685
+ "results": {
37200
37686
  "type": "array",
37201
37687
  "items": {
37202
- "$ref": "#/components/schemas/AIAttachment"
37688
+ "$ref": "#/components/schemas/AIToolCallSearchResult"
37203
37689
  }
37204
37690
  }
37205
37691
  },
37206
37692
  "required": [
37207
- "role",
37208
- "content"
37209
- ]
37210
- },
37211
- "AIModel": {
37212
- "type": "string",
37213
- "enum": [
37214
- "fast",
37215
- "reasoning-low",
37216
- "reasoning-medium",
37217
- "reasoning-high"
37693
+ "tool",
37694
+ "query",
37695
+ "results"
37218
37696
  ]
37219
37697
  },
37220
- "AIToolDefinition": {
37698
+ "AIToolCallEditPage": {
37221
37699
  "type": "object",
37222
- "description": "Description of a tool that can be called from an AI agent.",
37223
37700
  "properties": {
37224
- "name": {
37701
+ "tool": {
37225
37702
  "type": "string",
37226
- "description": "The name of the tool. It should be unique within the agent."
37703
+ "enum": [
37704
+ "editPage"
37705
+ ]
37227
37706
  },
37228
- "description": {
37707
+ "spaceId": {
37229
37708
  "type": "string",
37230
- "description": "The description of the tool, passed to the AI agent."
37709
+ "description": "The ID of the space being edited."
37231
37710
  },
37232
- "inputSchema": {
37233
- "type": "object",
37234
- "description": "JSON schema describing the input of the tool.",
37235
- "properties": {
37236
- "type": {
37237
- "type": "string",
37238
- "enum": [
37239
- "object"
37240
- ]
37241
- },
37242
- "properties": {
37243
- "type": "object",
37244
- "additionalProperties": {
37245
- "type": "object",
37246
- "properties": {
37247
- "type": {
37248
- "type": "string",
37249
- "enum": [
37250
- "string",
37251
- "number",
37252
- "boolean",
37253
- "array",
37254
- "object"
37255
- ]
37256
- },
37257
- "description": {
37258
- "type": "string",
37259
- "description": "Description of the property."
37260
- }
37261
- },
37262
- "required": [
37263
- "type",
37264
- "description"
37265
- ],
37266
- "additionalProperties": true
37267
- }
37268
- }
37269
- },
37270
- "required": [
37271
- "type",
37272
- "properties"
37273
- ]
37711
+ "page": {
37712
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37274
37713
  }
37275
37714
  },
37276
37715
  "required": [
37277
- "name",
37278
- "description"
37716
+ "tool",
37717
+ "spaceId",
37718
+ "page"
37279
37719
  ]
37280
37720
  },
37281
- "AIToolCallOtherSummary": {
37721
+ "AIToolCallCreatePage": {
37282
37722
  "type": "object",
37283
- "description": "Summary of a generic tool call.",
37284
37723
  "properties": {
37285
- "icon": {
37286
- "$ref": "#/components/schemas/Icon"
37724
+ "tool": {
37725
+ "type": "string",
37726
+ "enum": [
37727
+ "createPage"
37728
+ ]
37287
37729
  },
37288
- "text": {
37730
+ "spaceId": {
37289
37731
  "type": "string",
37290
- "description": "Text to display to the user to describe the tool call."
37732
+ "description": "The ID of the space being edited."
37733
+ },
37734
+ "page": {
37735
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37291
37736
  }
37292
37737
  },
37293
37738
  "required": [
37294
- "icon",
37295
- "text"
37739
+ "tool",
37740
+ "spaceId",
37741
+ "page"
37296
37742
  ]
37297
37743
  },
37298
- "AIToolCallResult": {
37744
+ "AIToolCallDeletePage": {
37299
37745
  "type": "object",
37300
- "description": "Result of a tool call.",
37301
- "required": [
37302
- "tool",
37303
- "toolCallId",
37304
- "output"
37305
- ],
37306
37746
  "properties": {
37307
37747
  "tool": {
37308
37748
  "type": "string",
37309
- "description": "The name of the tool that was called."
37310
- },
37311
- "toolCallId": {
37312
- "type": "string",
37313
- "description": "The ID of the tool call."
37314
- },
37315
- "output": {
37316
- "type": "object",
37317
- "description": "The output to the tool call."
37318
- },
37319
- "summary": {
37320
- "$ref": "#/components/schemas/AIToolCallOtherSummary"
37321
- }
37322
- }
37323
- },
37324
- "AIMessageTask": {
37325
- "oneOf": [
37326
- {
37327
- "type": "object",
37328
- "description": "When the agent is responding to a comment.",
37329
- "properties": {
37330
- "type": {
37331
- "type": "string",
37332
- "enum": [
37333
- "respond_to_comment"
37334
- ]
37335
- },
37336
- "spaceId": {
37337
- "type": "string",
37338
- "description": "The ID of the space to respond to the comment in."
37339
- },
37340
- "changeRequestId": {
37341
- "type": "string",
37342
- "description": "The ID of the change request to respond to the comment in."
37343
- },
37344
- "commentId": {
37345
- "type": "string",
37346
- "description": "The ID of the comment to respond to."
37347
- }
37348
- },
37349
- "required": [
37350
- "type",
37351
- "spaceId",
37352
- "commentId"
37749
+ "enum": [
37750
+ "deletePage"
37353
37751
  ]
37354
37752
  },
37355
- {
37356
- "type": "object",
37357
- "description": "When the agent is reviewing a change request.",
37358
- "properties": {
37359
- "type": {
37360
- "type": "string",
37361
- "enum": [
37362
- "review_change_request"
37363
- ]
37364
- },
37365
- "spaceId": {
37366
- "type": "string",
37367
- "description": "The ID of the space the change request is in."
37368
- },
37369
- "changeRequestId": {
37370
- "type": "string",
37371
- "description": "The ID of the change request to review."
37372
- }
37373
- },
37374
- "required": [
37375
- "type",
37376
- "spaceId",
37377
- "changeRequestId"
37378
- ]
37753
+ "spaceId": {
37754
+ "type": "string",
37755
+ "description": "The ID of the space being edited."
37379
37756
  },
37380
- {
37381
- "type": "object",
37382
- "description": "When the agent is implementing a task in a change request.",
37383
- "properties": {
37384
- "type": {
37385
- "type": "string",
37386
- "enum": [
37387
- "implement_change_request"
37388
- ]
37389
- },
37390
- "spaceId": {
37391
- "type": "string",
37392
- "description": "The ID of the space the change request is in."
37393
- },
37394
- "changeRequestId": {
37395
- "type": "string",
37396
- "description": "The ID of the change request to implement the task in."
37397
- }
37398
- },
37399
- "required": [
37400
- "type",
37401
- "spaceId",
37402
- "changeRequestId"
37403
- ]
37757
+ "page": {
37758
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37404
37759
  }
37760
+ },
37761
+ "required": [
37762
+ "tool",
37763
+ "spaceId",
37764
+ "page"
37405
37765
  ]
37406
37766
  },
37407
- "AIStreamResponseStart": {
37767
+ "AIToolCallRenamePage": {
37408
37768
  "type": "object",
37409
- "description": "Message emitted by the server to indicate the start of the AI response.\n",
37410
37769
  "properties": {
37411
- "type": {
37770
+ "tool": {
37412
37771
  "type": "string",
37413
37772
  "enum": [
37414
- "response_start"
37773
+ "renamePage"
37415
37774
  ]
37416
37775
  },
37417
- "messageId": {
37776
+ "spaceId": {
37418
37777
  "type": "string",
37419
- "description": "The ID of the message that this event is composing.\n"
37778
+ "description": "The ID of the space being edited."
37420
37779
  },
37421
- "task": {
37422
- "$ref": "#/components/schemas/AIMessageTask"
37780
+ "page": {
37781
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37782
+ },
37783
+ "title": {
37784
+ "type": "string",
37785
+ "description": "The new title of the page."
37423
37786
  }
37424
37787
  },
37425
37788
  "required": [
37426
- "type",
37427
- "messageId"
37789
+ "tool",
37790
+ "spaceId",
37791
+ "page",
37792
+ "title"
37428
37793
  ]
37429
37794
  },
37430
- "AIMessageResponseMetadata": {
37431
- "description": "The response that generated this message.",
37795
+ "AIToolCallMovePage": {
37432
37796
  "type": "object",
37433
37797
  "properties": {
37434
- "stopReason": {
37798
+ "tool": {
37435
37799
  "type": "string",
37436
- "description": "The reason the response was stopped. If not defined, the response finished normally.",
37437
37800
  "enum": [
37438
- "aborted"
37801
+ "movePage"
37439
37802
  ]
37440
37803
  },
37441
- "id": {
37804
+ "spaceId": {
37442
37805
  "type": "string",
37443
- "description": "The ID of the response that generated this message. It can be undefined if the stream was aborted."
37806
+ "description": "The ID of the space being edited."
37444
37807
  },
37445
- "previous": {
37808
+ "page": {
37809
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37810
+ },
37811
+ "to": {
37812
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37813
+ },
37814
+ "moveType": {
37446
37815
  "type": "string",
37447
- "description": "The ID of the previous response that this message is based on."
37816
+ "description": "Indicates how the page was moved relative to the \"to\" page.\n- `within`: moved as the last child of the target page (or to the root when `to` is omitted)\n- `before`: moved directly before the target page\n- `after`: moved directly after the target page\n",
37817
+ "enum": [
37818
+ "within",
37819
+ "before",
37820
+ "after"
37821
+ ]
37448
37822
  }
37449
- }
37823
+ },
37824
+ "required": [
37825
+ "tool",
37826
+ "spaceId",
37827
+ "page",
37828
+ "moveType"
37829
+ ]
37450
37830
  },
37451
- "AIStreamResponseFinish": {
37831
+ "AIToolCallListModifiedPages": {
37452
37832
  "type": "object",
37453
- "description": "Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests.\n",
37454
37833
  "properties": {
37455
- "type": {
37834
+ "tool": {
37456
37835
  "type": "string",
37457
37836
  "enum": [
37458
- "response_finish"
37837
+ "listModifiedPages"
37459
37838
  ]
37460
37839
  },
37461
- "messageId": {
37462
- "type": "string",
37463
- "description": "The ID of the message that this event is composing.\n"
37464
- },
37465
- "responseId": {
37840
+ "spaceId": {
37466
37841
  "type": "string",
37467
- "deprecated": true,
37468
- "description": "The ID of the response"
37469
- },
37470
- "response": {
37471
- "description": "The response metadata associated with the message.",
37472
- "$ref": "#/components/schemas/AIMessageResponseMetadata"
37842
+ "description": "The ID of the space being accessed."
37473
37843
  }
37474
37844
  },
37475
37845
  "required": [
37476
- "type",
37477
- "messageId",
37478
- "response"
37846
+ "tool",
37847
+ "spaceId"
37479
37848
  ]
37480
37849
  },
37481
- "AIStreamResponseDocument": {
37850
+ "AIToolCallGetPageDiff": {
37482
37851
  "type": "object",
37483
- "description": "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.\n",
37484
37852
  "properties": {
37485
- "type": {
37853
+ "tool": {
37486
37854
  "type": "string",
37487
37855
  "enum": [
37488
- "response_document",
37489
- "response_reasoning"
37856
+ "getPageDiff"
37490
37857
  ]
37491
37858
  },
37492
- "messageId": {
37859
+ "spaceId": {
37493
37860
  "type": "string",
37494
- "description": "The ID of the message that this event is composing.\n"
37495
- },
37496
- "stepIndex": {
37497
- "type": "integer",
37498
- "description": "The index of the step of the message that this event is composing.\n"
37861
+ "description": "The ID of the space being accessed."
37499
37862
  },
37500
- "operation": {
37863
+ "page": {
37864
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37865
+ }
37866
+ },
37867
+ "required": [
37868
+ "tool",
37869
+ "spaceId",
37870
+ "page"
37871
+ ]
37872
+ },
37873
+ "AIToolCallCreateReusableContent": {
37874
+ "type": "object",
37875
+ "properties": {
37876
+ "tool": {
37501
37877
  "type": "string",
37502
37878
  "enum": [
37503
- "insert",
37504
- "update"
37879
+ "createReusableContent"
37505
37880
  ]
37506
37881
  },
37507
- "blocks": {
37508
- "type": "array",
37509
- "items": {
37510
- "$ref": "#/components/schemas/DocumentBlocksTopLevels"
37511
- }
37882
+ "spaceId": {
37883
+ "type": "string",
37884
+ "description": "The ID of the space being edited."
37885
+ },
37886
+ "reusableContent": {
37887
+ "$ref": "#/components/schemas/ChangedRevisionReusableContent"
37512
37888
  }
37513
37889
  },
37514
37890
  "required": [
37515
- "type",
37516
- "messageId",
37517
- "stepIndex",
37518
- "operation",
37519
- "blocks"
37891
+ "tool",
37892
+ "spaceId",
37893
+ "reusableContent"
37520
37894
  ]
37521
37895
  },
37522
- "AIStreamResponseObject": {
37896
+ "AIToolCallEditReusableContent": {
37523
37897
  "type": "object",
37524
- "description": "Message emitted by the server to indicate a chunk of the JSON object response.\n",
37525
37898
  "properties": {
37526
- "type": {
37899
+ "tool": {
37527
37900
  "type": "string",
37528
37901
  "enum": [
37529
- "response_object"
37902
+ "editReusableContent"
37530
37903
  ]
37531
37904
  },
37532
- "messageId": {
37905
+ "spaceId": {
37533
37906
  "type": "string",
37534
- "description": "The ID of the message that this event is composing.\n"
37907
+ "description": "The ID of the space being edited."
37535
37908
  },
37536
- "jsonChunk": {
37537
- "type": "string",
37538
- "description": "The chunk of the JSON object response"
37909
+ "reusableContent": {
37910
+ "$ref": "#/components/schemas/ChangedRevisionReusableContent"
37539
37911
  }
37540
37912
  },
37541
37913
  "required": [
37542
- "type",
37543
- "messageId",
37544
- "jsonChunk"
37914
+ "tool",
37915
+ "spaceId",
37916
+ "reusableContent"
37545
37917
  ]
37546
37918
  },
37547
- "AIToolCallGetPageContent": {
37919
+ "AIToolCallGetReusableContent": {
37548
37920
  "type": "object",
37549
37921
  "properties": {
37550
37922
  "tool": {
37551
37923
  "type": "string",
37552
37924
  "enum": [
37553
- "getPageContent"
37925
+ "getReusableContent"
37554
37926
  ]
37555
37927
  },
37556
37928
  "spaceId": {
@@ -37559,701 +37931,1188 @@
37559
37931
  },
37560
37932
  "revisionId": {
37561
37933
  "type": "string",
37562
- "description": "The ID of the revision within which the page content is being fetched."
37934
+ "description": "The ID of the revision within which the reusable content is being fetched."
37563
37935
  },
37564
- "page": {
37565
- "$ref": "#/components/schemas/ChangedRevisionPage"
37936
+ "reusableContent": {
37937
+ "$ref": "#/components/schemas/ChangedRevisionReusableContent"
37566
37938
  }
37567
37939
  },
37568
37940
  "required": [
37569
37941
  "tool",
37570
37942
  "spaceId",
37571
- "page",
37943
+ "reusableContent",
37572
37944
  "revisionId"
37573
37945
  ]
37574
37946
  },
37575
- "AIToolCallGetPages": {
37947
+ "AIToolCallCreateChangeRequest": {
37576
37948
  "type": "object",
37577
37949
  "properties": {
37578
37950
  "tool": {
37579
37951
  "type": "string",
37580
37952
  "enum": [
37581
- "getPages"
37953
+ "createChangeRequest"
37582
37954
  ]
37583
37955
  },
37584
37956
  "spaceId": {
37585
37957
  "type": "string",
37586
- "description": "The ID of the space being accessed."
37958
+ "description": "The ID of the space the change request belongs to."
37587
37959
  },
37588
- "revisionId": {
37960
+ "action": {
37589
37961
  "type": "string",
37590
- "description": "The revision ID of the space."
37962
+ "enum": [
37963
+ "create",
37964
+ "update"
37965
+ ]
37966
+ },
37967
+ "changeRequest": {
37968
+ "type": "object",
37969
+ "properties": {
37970
+ "id": {
37971
+ "type": "string",
37972
+ "description": "The unique identifier of the change request."
37973
+ },
37974
+ "number": {
37975
+ "type": "number",
37976
+ "description": "Incremental identifier of the change request."
37977
+ },
37978
+ "subject": {
37979
+ "type": "string",
37980
+ "description": "A brief summary of the change request."
37981
+ }
37982
+ },
37983
+ "required": [
37984
+ "id",
37985
+ "number",
37986
+ "subject"
37987
+ ]
37591
37988
  }
37592
37989
  },
37593
37990
  "required": [
37594
37991
  "tool",
37595
37992
  "spaceId",
37596
- "revisionId"
37993
+ "action",
37994
+ "changeRequest"
37597
37995
  ]
37598
37996
  },
37599
- "AIToolCallGetReusableContents": {
37997
+ "AIToolCallComment": {
37600
37998
  "type": "object",
37601
37999
  "properties": {
37602
38000
  "tool": {
37603
38001
  "type": "string",
37604
38002
  "enum": [
37605
- "getReusableContents"
38003
+ "comment"
37606
38004
  ]
37607
38005
  },
37608
38006
  "spaceId": {
37609
38007
  "type": "string",
37610
- "description": "The ID of the space being accessed."
38008
+ "description": "The ID of the space being commented."
37611
38009
  },
37612
- "revisionId": {
38010
+ "page": {
38011
+ "description": "The page being commented.",
38012
+ "$ref": "#/components/schemas/ChangedRevisionPage"
38013
+ },
38014
+ "commentId": {
37613
38015
  "type": "string",
37614
- "description": "The revision ID of the space."
38016
+ "description": "The ID of the comment being posted."
37615
38017
  }
37616
38018
  },
37617
38019
  "required": [
37618
38020
  "tool",
37619
38021
  "spaceId",
37620
- "revisionId"
38022
+ "commentId"
37621
38023
  ]
37622
38024
  },
37623
- "AIToolCallSearchResultPage": {
38025
+ "AIToolCallReplyToComment": {
37624
38026
  "type": "object",
37625
- "title": "Page result",
37626
- "description": "Result of a search matching a page.",
37627
38027
  "properties": {
37628
- "type": {
38028
+ "tool": {
37629
38029
  "type": "string",
37630
38030
  "enum": [
37631
- "page"
38031
+ "replyToComment"
37632
38032
  ]
37633
38033
  },
37634
38034
  "spaceId": {
37635
38035
  "type": "string",
37636
- "description": "The ID of the space"
37637
- },
37638
- "pageId": {
37639
- "type": "string",
37640
- "description": "The ID of the page"
37641
- },
37642
- "revisionId": {
37643
- "type": "string",
37644
- "description": "The revision ID of the result"
38036
+ "description": "The ID of the space being commented."
37645
38037
  },
37646
- "anchor": {
37647
- "type": "string",
37648
- "description": "The anchor of the result"
38038
+ "page": {
38039
+ "description": "The page being commented.",
38040
+ "$ref": "#/components/schemas/ChangedRevisionPage"
37649
38041
  },
37650
- "title": {
38042
+ "commentId": {
37651
38043
  "type": "string",
37652
- "description": "The title of the result"
38044
+ "description": "The ID of the comment being replied to."
37653
38045
  },
37654
- "description": {
38046
+ "replyId": {
37655
38047
  "type": "string",
37656
- "description": "The description of the result"
38048
+ "description": "The ID of the reply being posted."
37657
38049
  }
37658
38050
  },
37659
38051
  "required": [
37660
- "type",
38052
+ "tool",
37661
38053
  "spaceId",
37662
- "pageId",
37663
- "revisionId",
37664
- "title"
38054
+ "commentId",
38055
+ "replyId"
37665
38056
  ]
37666
38057
  },
37667
- "AIToolCallSearchResultRecord": {
38058
+ "AIToolCallSubmitChangeRequestReview": {
37668
38059
  "type": "object",
37669
- "title": "Site context record result",
37670
- "description": "Result of a search matching a site context record.",
37671
38060
  "properties": {
37672
- "type": {
38061
+ "tool": {
37673
38062
  "type": "string",
37674
38063
  "enum": [
37675
- "record"
38064
+ "submitChangeRequestReview"
37676
38065
  ]
37677
38066
  },
37678
- "siteId": {
38067
+ "spaceId": {
37679
38068
  "type": "string",
37680
- "description": "The ID of the site owning the context record"
38069
+ "description": "The ID of the space where the review was submitted."
37681
38070
  },
37682
- "recordId": {
38071
+ "changeRequestId": {
37683
38072
  "type": "string",
37684
- "description": "The ID of the context record"
38073
+ "description": "The ID of the change request being reviewed."
37685
38074
  },
37686
- "title": {
37687
- "type": "string",
37688
- "description": "The title of the record"
38075
+ "status": {
38076
+ "$ref": "#/components/schemas/ChangeRequestReviewStatus",
38077
+ "description": "Result of the review."
37689
38078
  },
37690
- "description": {
38079
+ "reviewId": {
37691
38080
  "type": "string",
37692
- "description": "The description of the record"
38081
+ "description": "Identifier of the review that was created."
37693
38082
  },
37694
- "url": {
38083
+ "commentId": {
37695
38084
  "type": "string",
37696
- "format": "uri",
37697
- "description": "URL of the record in its original source"
38085
+ "description": "Identifier of the comment that was created as part of the review."
37698
38086
  }
37699
38087
  },
37700
38088
  "required": [
37701
- "type",
37702
- "siteId",
37703
- "recordId",
37704
- "title"
38089
+ "tool",
38090
+ "spaceId",
38091
+ "changeRequestId",
38092
+ "status",
38093
+ "reviewId",
38094
+ "commentId"
37705
38095
  ]
37706
38096
  },
37707
- "AIToolCallSearchResult": {
37708
- "description": "Result of a search",
37709
- "oneOf": [
37710
- {
37711
- "$ref": "#/components/schemas/AIToolCallSearchResultPage"
37712
- },
37713
- {
37714
- "$ref": "#/components/schemas/AIToolCallSearchResultRecord"
37715
- }
37716
- ],
37717
- "discriminator": {
37718
- "propertyName": "type"
37719
- }
37720
- },
37721
- "AIToolCallSearch": {
38097
+ "AIToolCallMCP": {
37722
38098
  "type": "object",
37723
- "description": "Tool to search for content",
38099
+ "description": "Tool called from an MCP server",
37724
38100
  "properties": {
37725
38101
  "tool": {
37726
38102
  "type": "string",
37727
38103
  "enum": [
37728
- "search"
38104
+ "mcp"
37729
38105
  ]
37730
38106
  },
37731
- "query": {
38107
+ "mcpServerId": {
37732
38108
  "type": "string",
37733
- "description": "The query that has been searched for."
38109
+ "description": "The ID of the MCP server that has been called."
37734
38110
  },
37735
- "results": {
37736
- "type": "array",
37737
- "items": {
37738
- "$ref": "#/components/schemas/AIToolCallSearchResult"
37739
- }
38111
+ "mcpToolName": {
38112
+ "type": "string",
38113
+ "description": "The name of the tool that has been called."
38114
+ },
38115
+ "mcpToolTitle": {
38116
+ "type": "string",
38117
+ "description": "The title of the tool that has been called."
37740
38118
  }
37741
38119
  },
37742
38120
  "required": [
37743
38121
  "tool",
37744
- "query",
37745
- "results"
38122
+ "mcpServerId",
38123
+ "mcpToolName"
37746
38124
  ]
37747
38125
  },
37748
- "AIToolCallEditPage": {
38126
+ "AIToolCallOtherSummary": {
37749
38127
  "type": "object",
38128
+ "description": "Summary of a generic tool call.",
38129
+ "properties": {
38130
+ "icon": {
38131
+ "$ref": "#/components/schemas/Icon"
38132
+ },
38133
+ "text": {
38134
+ "type": "string",
38135
+ "description": "Text to display to the user to describe the tool call."
38136
+ }
38137
+ },
38138
+ "required": [
38139
+ "icon",
38140
+ "text"
38141
+ ]
38142
+ },
38143
+ "AIToolCallOther": {
38144
+ "type": "object",
38145
+ "description": "Any tool call that is unknown by GitBook",
37750
38146
  "properties": {
37751
38147
  "tool": {
37752
38148
  "type": "string",
37753
38149
  "enum": [
37754
- "editPage"
38150
+ "other"
37755
38151
  ]
37756
38152
  },
37757
- "spaceId": {
37758
- "type": "string",
37759
- "description": "The ID of the space being edited."
37760
- },
37761
- "page": {
37762
- "$ref": "#/components/schemas/ChangedRevisionPage"
38153
+ "summary": {
38154
+ "$ref": "#/components/schemas/AIToolCallOtherSummary"
37763
38155
  }
37764
38156
  },
37765
38157
  "required": [
37766
38158
  "tool",
37767
- "spaceId",
37768
- "page"
38159
+ "summary"
37769
38160
  ]
37770
38161
  },
37771
- "AIToolCallCreatePage": {
38162
+ "AIToolCall": {
38163
+ "oneOf": [
38164
+ {
38165
+ "$ref": "#/components/schemas/AIToolCallGetPageContent"
38166
+ },
38167
+ {
38168
+ "$ref": "#/components/schemas/AIToolCallGetPages"
38169
+ },
38170
+ {
38171
+ "$ref": "#/components/schemas/AIToolCallGetReusableContents"
38172
+ },
38173
+ {
38174
+ "$ref": "#/components/schemas/AIToolCallSearch"
38175
+ },
38176
+ {
38177
+ "$ref": "#/components/schemas/AIToolCallEditPage"
38178
+ },
38179
+ {
38180
+ "$ref": "#/components/schemas/AIToolCallCreatePage"
38181
+ },
38182
+ {
38183
+ "$ref": "#/components/schemas/AIToolCallDeletePage"
38184
+ },
38185
+ {
38186
+ "$ref": "#/components/schemas/AIToolCallRenamePage"
38187
+ },
38188
+ {
38189
+ "$ref": "#/components/schemas/AIToolCallMovePage"
38190
+ },
38191
+ {
38192
+ "$ref": "#/components/schemas/AIToolCallListModifiedPages"
38193
+ },
38194
+ {
38195
+ "$ref": "#/components/schemas/AIToolCallGetPageDiff"
38196
+ },
38197
+ {
38198
+ "$ref": "#/components/schemas/AIToolCallCreateReusableContent"
38199
+ },
38200
+ {
38201
+ "$ref": "#/components/schemas/AIToolCallEditReusableContent"
38202
+ },
38203
+ {
38204
+ "$ref": "#/components/schemas/AIToolCallGetReusableContent"
38205
+ },
38206
+ {
38207
+ "$ref": "#/components/schemas/AIToolCallCreateChangeRequest"
38208
+ },
38209
+ {
38210
+ "$ref": "#/components/schemas/AIToolCallComment"
38211
+ },
38212
+ {
38213
+ "$ref": "#/components/schemas/AIToolCallReplyToComment"
38214
+ },
38215
+ {
38216
+ "$ref": "#/components/schemas/AIToolCallSubmitChangeRequestReview"
38217
+ },
38218
+ {
38219
+ "$ref": "#/components/schemas/AIToolCallMCP"
38220
+ },
38221
+ {
38222
+ "$ref": "#/components/schemas/AIToolCallOther"
38223
+ }
38224
+ ]
38225
+ },
38226
+ "Timerange": {
37772
38227
  "type": "object",
37773
38228
  "properties": {
37774
- "tool": {
38229
+ "start": {
38230
+ "$ref": "#/components/schemas/Timestamp"
38231
+ },
38232
+ "end": {
38233
+ "$ref": "#/components/schemas/Timestamp"
38234
+ }
38235
+ },
38236
+ "required": [
38237
+ "start",
38238
+ "end"
38239
+ ]
38240
+ },
38241
+ "AIAttachmentImage": {
38242
+ "type": "object",
38243
+ "properties": {
38244
+ "type": {
37775
38245
  "type": "string",
37776
38246
  "enum": [
37777
- "createPage"
38247
+ "image"
37778
38248
  ]
37779
38249
  },
37780
- "spaceId": {
37781
- "type": "string",
37782
- "description": "The ID of the space being edited."
37783
- },
37784
- "page": {
37785
- "$ref": "#/components/schemas/ChangedRevisionPage"
38250
+ "url": {
38251
+ "$ref": "#/components/schemas/URL"
37786
38252
  }
37787
38253
  },
37788
38254
  "required": [
37789
- "tool",
37790
- "spaceId",
37791
- "page"
38255
+ "type",
38256
+ "url"
37792
38257
  ]
37793
38258
  },
37794
- "AIToolCallDeletePage": {
38259
+ "AIAttachmentFile": {
37795
38260
  "type": "object",
37796
38261
  "properties": {
37797
- "tool": {
38262
+ "type": {
37798
38263
  "type": "string",
37799
38264
  "enum": [
37800
- "deletePage"
38265
+ "file"
37801
38266
  ]
37802
38267
  },
37803
- "spaceId": {
38268
+ "url": {
38269
+ "$ref": "#/components/schemas/URL"
38270
+ },
38271
+ "filename": {
37804
38272
  "type": "string",
37805
- "description": "The ID of the space being edited."
38273
+ "description": "Name of the file."
37806
38274
  },
37807
- "page": {
37808
- "$ref": "#/components/schemas/ChangedRevisionPage"
38275
+ "contentType": {
38276
+ "type": "string",
38277
+ "enum": [
38278
+ "application/pdf"
38279
+ ]
37809
38280
  }
37810
38281
  },
37811
38282
  "required": [
37812
- "tool",
37813
- "spaceId",
37814
- "page"
38283
+ "type",
38284
+ "url",
38285
+ "filename",
38286
+ "contentType"
37815
38287
  ]
37816
38288
  },
37817
- "AIToolCallRenamePage": {
38289
+ "AIAttachment": {
38290
+ "oneOf": [
38291
+ {
38292
+ "$ref": "#/components/schemas/AIAttachmentImage"
38293
+ },
38294
+ {
38295
+ "$ref": "#/components/schemas/AIAttachmentFile"
38296
+ }
38297
+ ]
38298
+ },
38299
+ "AIMessageStep": {
37818
38300
  "type": "object",
38301
+ "description": "A step in a message from the AI agent.",
37819
38302
  "properties": {
37820
- "tool": {
38303
+ "content": {
38304
+ "$ref": "#/components/schemas/JSONDocument"
38305
+ },
38306
+ "reasoning": {
38307
+ "$ref": "#/components/schemas/JSONDocument"
38308
+ },
38309
+ "toolCalls": {
38310
+ "type": "array",
38311
+ "items": {
38312
+ "$ref": "#/components/schemas/AIToolCall"
38313
+ }
38314
+ },
38315
+ "timing": {
38316
+ "type": "object",
38317
+ "description": "The timing of the step.",
38318
+ "properties": {
38319
+ "reasoning": {
38320
+ "$ref": "#/components/schemas/Timerange"
38321
+ }
38322
+ }
38323
+ },
38324
+ "attachments": {
38325
+ "type": "array",
38326
+ "items": {
38327
+ "$ref": "#/components/schemas/AIAttachment"
38328
+ }
38329
+ }
38330
+ },
38331
+ "required": [
38332
+ "content"
38333
+ ]
38334
+ },
38335
+ "AIMessageTask": {
38336
+ "oneOf": [
38337
+ {
38338
+ "type": "object",
38339
+ "description": "When the agent is responding to a comment.",
38340
+ "properties": {
38341
+ "type": {
38342
+ "type": "string",
38343
+ "enum": [
38344
+ "respond_to_comment"
38345
+ ]
38346
+ },
38347
+ "spaceId": {
38348
+ "type": "string",
38349
+ "description": "The ID of the space to respond to the comment in."
38350
+ },
38351
+ "changeRequestId": {
38352
+ "type": "string",
38353
+ "description": "The ID of the change request to respond to the comment in."
38354
+ },
38355
+ "commentId": {
38356
+ "type": "string",
38357
+ "description": "The ID of the comment to respond to."
38358
+ }
38359
+ },
38360
+ "required": [
38361
+ "type",
38362
+ "spaceId",
38363
+ "commentId"
38364
+ ]
38365
+ },
38366
+ {
38367
+ "type": "object",
38368
+ "description": "When the agent is reviewing a change request.",
38369
+ "properties": {
38370
+ "type": {
38371
+ "type": "string",
38372
+ "enum": [
38373
+ "review_change_request"
38374
+ ]
38375
+ },
38376
+ "spaceId": {
38377
+ "type": "string",
38378
+ "description": "The ID of the space the change request is in."
38379
+ },
38380
+ "changeRequestId": {
38381
+ "type": "string",
38382
+ "description": "The ID of the change request to review."
38383
+ }
38384
+ },
38385
+ "required": [
38386
+ "type",
38387
+ "spaceId",
38388
+ "changeRequestId"
38389
+ ]
38390
+ },
38391
+ {
38392
+ "type": "object",
38393
+ "description": "When the agent is implementing a task in a change request.",
38394
+ "properties": {
38395
+ "type": {
38396
+ "type": "string",
38397
+ "enum": [
38398
+ "implement_change_request"
38399
+ ]
38400
+ },
38401
+ "spaceId": {
38402
+ "type": "string",
38403
+ "description": "The ID of the space the change request is in."
38404
+ },
38405
+ "changeRequestId": {
38406
+ "type": "string",
38407
+ "description": "The ID of the change request to implement the task in."
38408
+ }
38409
+ },
38410
+ "required": [
38411
+ "type",
38412
+ "spaceId",
38413
+ "changeRequestId"
38414
+ ]
38415
+ }
38416
+ ]
38417
+ },
38418
+ "AIMessageResponseMetadata": {
38419
+ "description": "The response that generated this message.",
38420
+ "type": "object",
38421
+ "properties": {
38422
+ "stopReason": {
37821
38423
  "type": "string",
38424
+ "description": "The reason the response was stopped. If not defined, the response finished normally.",
37822
38425
  "enum": [
37823
- "renamePage"
38426
+ "aborted"
37824
38427
  ]
37825
38428
  },
37826
- "spaceId": {
38429
+ "id": {
37827
38430
  "type": "string",
37828
- "description": "The ID of the space being edited."
37829
- },
37830
- "page": {
37831
- "$ref": "#/components/schemas/ChangedRevisionPage"
38431
+ "description": "The ID of the response that generated this message. It can be undefined if the stream was aborted."
37832
38432
  },
37833
- "title": {
38433
+ "previous": {
37834
38434
  "type": "string",
37835
- "description": "The new title of the page."
38435
+ "description": "The ID of the previous response that this message is based on."
38436
+ }
38437
+ }
38438
+ },
38439
+ "AIMessage": {
38440
+ "type": "object",
38441
+ "properties": {
38442
+ "id": {
38443
+ "type": "string"
38444
+ },
38445
+ "role": {
38446
+ "$ref": "#/components/schemas/AIMessageRole"
38447
+ },
38448
+ "steps": {
38449
+ "type": "array",
38450
+ "items": {
38451
+ "$ref": "#/components/schemas/AIMessageStep"
38452
+ }
38453
+ },
38454
+ "task": {
38455
+ "$ref": "#/components/schemas/AIMessageTask"
38456
+ },
38457
+ "response": {
38458
+ "$ref": "#/components/schemas/AIMessageResponseMetadata"
37836
38459
  }
37837
38460
  },
37838
38461
  "required": [
37839
- "tool",
37840
- "spaceId",
37841
- "page",
37842
- "title"
38462
+ "id",
38463
+ "role",
38464
+ "steps"
37843
38465
  ]
37844
38466
  },
37845
- "AIToolCallMovePage": {
38467
+ "SiteQuestionAnswerWithResponse": {
38468
+ "allOf": [
38469
+ {
38470
+ "$ref": "#/components/schemas/SiteQuestionAnswer"
38471
+ },
38472
+ {
38473
+ "type": "object",
38474
+ "properties": {
38475
+ "response": {
38476
+ "$ref": "#/components/schemas/AIMessage"
38477
+ }
38478
+ },
38479
+ "required": [
38480
+ "response"
38481
+ ]
38482
+ }
38483
+ ]
38484
+ },
38485
+ "SiteQuestionAnswerSourceBase": {
37846
38486
  "type": "object",
37847
38487
  "properties": {
37848
- "tool": {
38488
+ "object": {
37849
38489
  "type": "string",
37850
38490
  "enum": [
37851
- "movePage"
38491
+ "site-question-answer-source"
37852
38492
  ]
37853
38493
  },
37854
- "spaceId": {
38494
+ "id": {
37855
38495
  "type": "string",
37856
- "description": "The ID of the space being edited."
37857
- },
37858
- "page": {
37859
- "$ref": "#/components/schemas/ChangedRevisionPage"
38496
+ "description": "The ID of the source."
37860
38497
  },
37861
- "to": {
37862
- "$ref": "#/components/schemas/ChangedRevisionPage"
38498
+ "weight": {
38499
+ "type": "number",
38500
+ "description": "Relative weight of this source in the generated answer."
37863
38501
  },
37864
- "moveType": {
38502
+ "title": {
37865
38503
  "type": "string",
37866
- "description": "Indicates how the page was moved relative to the \"to\" page.\n- `within`: moved as the last child of the target page (or to the root when `to` is omitted)\n- `before`: moved directly before the target page\n- `after`: moved directly after the target page\n",
37867
- "enum": [
37868
- "within",
37869
- "before",
37870
- "after"
38504
+ "description": "The title of the source."
38505
+ },
38506
+ "urls": {
38507
+ "type": "object",
38508
+ "description": "URLs associated with the site question answer.",
38509
+ "properties": {
38510
+ "location": {
38511
+ "type": "string",
38512
+ "format": "uri",
38513
+ "description": "URL of the site question answer in the API."
38514
+ }
38515
+ },
38516
+ "required": [
38517
+ "location"
37871
38518
  ]
37872
38519
  }
37873
38520
  },
37874
38521
  "required": [
37875
- "tool",
37876
- "spaceId",
37877
- "page",
37878
- "moveType"
38522
+ "object",
38523
+ "id",
38524
+ "title",
38525
+ "weight",
38526
+ "urls"
37879
38527
  ]
37880
38528
  },
37881
- "AIToolCallListModifiedPages": {
38529
+ "SiteQuestionAnswerSourcePage": {
38530
+ "allOf": [
38531
+ {
38532
+ "$ref": "#/components/schemas/SiteQuestionAnswerSourceBase"
38533
+ },
38534
+ {
38535
+ "type": "object",
38536
+ "title": "Page source",
38537
+ "description": "Source data pointing to a page used for a site question answer.",
38538
+ "properties": {
38539
+ "type": {
38540
+ "type": "string",
38541
+ "enum": [
38542
+ "page"
38543
+ ]
38544
+ },
38545
+ "space": {
38546
+ "type": "string",
38547
+ "description": "The space ID of the source page."
38548
+ },
38549
+ "revision": {
38550
+ "type": "string",
38551
+ "description": "The revision ID used for this source page."
38552
+ },
38553
+ "page": {
38554
+ "type": "string",
38555
+ "description": "The page ID of the source page."
38556
+ }
38557
+ },
38558
+ "required": [
38559
+ "type",
38560
+ "space",
38561
+ "revision",
38562
+ "page"
38563
+ ]
38564
+ }
38565
+ ]
38566
+ },
38567
+ "SiteQuestionAnswerSourceRecord": {
38568
+ "allOf": [
38569
+ {
38570
+ "$ref": "#/components/schemas/SiteQuestionAnswerSourceBase"
38571
+ },
38572
+ {
38573
+ "type": "object",
38574
+ "properties": {
38575
+ "type": {
38576
+ "type": "string",
38577
+ "enum": [
38578
+ "record"
38579
+ ]
38580
+ },
38581
+ "record": {
38582
+ "type": "string",
38583
+ "description": "The site context record ID."
38584
+ }
38585
+ },
38586
+ "required": [
38587
+ "type",
38588
+ "record"
38589
+ ]
38590
+ }
38591
+ ]
38592
+ },
38593
+ "SiteQuestionAnswerSource": {
38594
+ "oneOf": [
38595
+ {
38596
+ "$ref": "#/components/schemas/SiteQuestionAnswerSourcePage"
38597
+ },
38598
+ {
38599
+ "$ref": "#/components/schemas/SiteQuestionAnswerSourceRecord"
38600
+ }
38601
+ ],
38602
+ "discriminator": {
38603
+ "propertyName": "type"
38604
+ }
38605
+ },
38606
+ "SiteSpaceCustomizationSettings": {
38607
+ "allOf": [
38608
+ {
38609
+ "$ref": "#/components/schemas/SiteCustomizationSettings"
38610
+ },
38611
+ {
38612
+ "type": "object",
38613
+ "properties": {
38614
+ "hasOverrides": {
38615
+ "type": "boolean",
38616
+ "description": "Indicates whether the site customization settings have been overridden."
38617
+ }
38618
+ },
38619
+ "required": [
38620
+ "hasOverrides"
38621
+ ]
38622
+ }
38623
+ ]
38624
+ },
38625
+ "SiteSectionGroupPointer": {
37882
38626
  "type": "object",
37883
38627
  "properties": {
37884
- "tool": {
38628
+ "type": {
37885
38629
  "type": "string",
37886
38630
  "enum": [
37887
- "listModifiedPages"
38631
+ "site-section",
38632
+ "site-section-group"
37888
38633
  ]
37889
38634
  },
37890
- "spaceId": {
38635
+ "id": {
37891
38636
  "type": "string",
37892
- "description": "The ID of the space being accessed."
38637
+ "description": "Unique identifier for the site section"
37893
38638
  }
37894
38639
  },
37895
38640
  "required": [
37896
- "tool",
37897
- "spaceId"
38641
+ "type",
38642
+ "id"
37898
38643
  ]
37899
38644
  },
37900
- "AIToolCallGetPageDiff": {
38645
+ "SiteSectionGroupMovePosition": {
37901
38646
  "type": "object",
38647
+ "description": "Position at which to move the site section group.",
37902
38648
  "properties": {
37903
- "tool": {
38649
+ "before": {
38650
+ "$ref": "#/components/schemas/SiteSectionGroupPointer"
38651
+ },
38652
+ "after": {
38653
+ "$ref": "#/components/schemas/SiteSectionGroupPointer"
38654
+ }
38655
+ }
38656
+ },
38657
+ "SiteSectionPointer": {
38658
+ "type": "object",
38659
+ "properties": {
38660
+ "type": {
37904
38661
  "type": "string",
37905
38662
  "enum": [
37906
- "getPageDiff"
38663
+ "site-section"
37907
38664
  ]
37908
38665
  },
37909
- "spaceId": {
38666
+ "siteSection": {
37910
38667
  "type": "string",
37911
- "description": "The ID of the space being accessed."
37912
- },
37913
- "page": {
37914
- "$ref": "#/components/schemas/ChangedRevisionPage"
38668
+ "description": "Unique identifier for the site section"
37915
38669
  }
37916
38670
  },
37917
38671
  "required": [
37918
- "tool",
37919
- "spaceId",
37920
- "page"
38672
+ "type",
38673
+ "siteSection"
37921
38674
  ]
37922
38675
  },
37923
- "AIToolCallCreateReusableContent": {
38676
+ "SiteSectionMovePosition": {
37924
38677
  "type": "object",
38678
+ "description": "Position at which to move the site section to.",
37925
38679
  "properties": {
37926
- "tool": {
38680
+ "before": {
38681
+ "$ref": "#/components/schemas/SiteSectionPointer"
38682
+ },
38683
+ "after": {
38684
+ "$ref": "#/components/schemas/SiteSectionPointer"
38685
+ }
38686
+ }
38687
+ },
38688
+ "SiteSpacePointer": {
38689
+ "type": "object",
38690
+ "properties": {
38691
+ "type": {
37927
38692
  "type": "string",
37928
38693
  "enum": [
37929
- "createReusableContent"
38694
+ "site-space"
37930
38695
  ]
37931
38696
  },
37932
- "spaceId": {
38697
+ "siteSpace": {
37933
38698
  "type": "string",
37934
- "description": "The ID of the space being edited."
38699
+ "description": "Unique identifier for the site space"
38700
+ }
38701
+ },
38702
+ "required": [
38703
+ "type",
38704
+ "siteSpace"
38705
+ ]
38706
+ },
38707
+ "SiteSpaceMovePosition": {
38708
+ "type": "object",
38709
+ "description": "Position at which to move the site space to.",
38710
+ "properties": {
38711
+ "before": {
38712
+ "$ref": "#/components/schemas/SiteSpacePointer"
37935
38713
  },
37936
- "reusableContent": {
37937
- "$ref": "#/components/schemas/ChangedRevisionReusableContent"
38714
+ "after": {
38715
+ "$ref": "#/components/schemas/SiteSpacePointer"
38716
+ }
38717
+ }
38718
+ },
38719
+ "InviteSiteUsersAndTeams": {
38720
+ "type": "object",
38721
+ "properties": {
38722
+ "role": {
38723
+ "description": "Role to set.",
38724
+ "$ref": "#/components/schemas/MemberRole"
37938
38725
  }
37939
38726
  },
38727
+ "anyOf": [
38728
+ {
38729
+ "type": "object",
38730
+ "properties": {
38731
+ "teams": {
38732
+ "type": "array",
38733
+ "minItems": 1,
38734
+ "items": {
38735
+ "type": "string",
38736
+ "description": "The ID of the team to be invited"
38737
+ }
38738
+ }
38739
+ },
38740
+ "required": [
38741
+ "teams"
38742
+ ]
38743
+ },
38744
+ {
38745
+ "type": "object",
38746
+ "properties": {
38747
+ "users": {
38748
+ "type": "array",
38749
+ "minItems": 1,
38750
+ "items": {
38751
+ "type": "string",
38752
+ "description": "The ID of the user to be invited"
38753
+ }
38754
+ }
38755
+ },
38756
+ "required": [
38757
+ "users"
38758
+ ]
38759
+ }
38760
+ ],
37940
38761
  "required": [
37941
- "tool",
37942
- "spaceId",
37943
- "reusableContent"
38762
+ "role"
37944
38763
  ]
37945
38764
  },
37946
- "AIToolCallEditReusableContent": {
38765
+ "OrganizationPointer": {
37947
38766
  "type": "object",
37948
38767
  "properties": {
37949
- "tool": {
38768
+ "type": {
37950
38769
  "type": "string",
37951
38770
  "enum": [
37952
- "editReusableContent"
38771
+ "organization"
37953
38772
  ]
37954
38773
  },
37955
- "spaceId": {
38774
+ "organization": {
37956
38775
  "type": "string",
37957
- "description": "The ID of the space being edited."
38776
+ "description": "Unique identifier for the organization"
38777
+ }
38778
+ },
38779
+ "required": [
38780
+ "type",
38781
+ "organization"
38782
+ ]
38783
+ },
38784
+ "UserSitePermission": {
38785
+ "type": "object",
38786
+ "description": "Permission of a user in a site.",
38787
+ "properties": {
38788
+ "permission": {
38789
+ "$ref": "#/components/schemas/MemberRoleOrGuest"
37958
38790
  },
37959
- "reusableContent": {
37960
- "$ref": "#/components/schemas/ChangedRevisionReusableContent"
38791
+ "user": {
38792
+ "$ref": "#/components/schemas/User"
38793
+ },
38794
+ "origin": {
38795
+ "description": "The content or organization that enforced this permission level.",
38796
+ "oneOf": [
38797
+ {
38798
+ "$ref": "#/components/schemas/SpacePointer"
38799
+ },
38800
+ {
38801
+ "$ref": "#/components/schemas/OrganizationPointer"
38802
+ }
38803
+ ]
37961
38804
  }
37962
38805
  },
37963
38806
  "required": [
37964
- "tool",
37965
- "spaceId",
37966
- "reusableContent"
38807
+ "permission",
38808
+ "user",
38809
+ "origin"
37967
38810
  ]
37968
38811
  },
37969
- "AIToolCallGetReusableContent": {
38812
+ "UserSitePermissionOverride": {
37970
38813
  "type": "object",
38814
+ "description": "Permission override of a user in a site.",
37971
38815
  "properties": {
37972
- "tool": {
38816
+ "permission": {
38817
+ "$ref": "#/components/schemas/MemberRole"
38818
+ },
38819
+ "user": {
38820
+ "$ref": "#/components/schemas/User"
38821
+ }
38822
+ },
38823
+ "required": [
38824
+ "permission",
38825
+ "user"
38826
+ ]
38827
+ },
38828
+ "TeamSitePermissionOverride": {
38829
+ "type": "object",
38830
+ "description": "Permission override of a team in a site.",
38831
+ "properties": {
38832
+ "permission": {
38833
+ "$ref": "#/components/schemas/MemberRole"
38834
+ },
38835
+ "team": {
38836
+ "$ref": "#/components/schemas/OrganizationTeam"
38837
+ }
38838
+ },
38839
+ "required": [
38840
+ "permission",
38841
+ "team"
38842
+ ]
38843
+ },
38844
+ "AIMessageContext": {
38845
+ "type": "object",
38846
+ "description": "Context about the current user sending a message.",
38847
+ "properties": {
38848
+ "location": {
38849
+ "type": "object",
38850
+ "properties": {
38851
+ "spaceId": {
38852
+ "type": "string",
38853
+ "description": "ID of the current space."
38854
+ },
38855
+ "pageId": {
38856
+ "type": "string",
38857
+ "description": "ID of the current page."
38858
+ }
38859
+ },
38860
+ "required": [
38861
+ "spaceId",
38862
+ "pageId"
38863
+ ]
38864
+ }
38865
+ }
38866
+ },
38867
+ "AIMessageInput": {
38868
+ "type": "object",
38869
+ "description": "Input version of an AI message.",
38870
+ "properties": {
38871
+ "role": {
37973
38872
  "type": "string",
37974
38873
  "enum": [
37975
- "getReusableContent"
38874
+ "user"
38875
+ ]
38876
+ },
38877
+ "content": {
38878
+ "oneOf": [
38879
+ {
38880
+ "type": "string",
38881
+ "maxLength": 2048
38882
+ },
38883
+ {
38884
+ "$ref": "#/components/schemas/JSONDocument"
38885
+ }
37976
38886
  ]
37977
38887
  },
37978
- "spaceId": {
37979
- "type": "string",
37980
- "description": "The ID of the space being accessed."
37981
- },
37982
- "revisionId": {
37983
- "type": "string",
37984
- "description": "The ID of the revision within which the reusable content is being fetched."
38888
+ "context": {
38889
+ "$ref": "#/components/schemas/AIMessageContext"
37985
38890
  },
37986
- "reusableContent": {
37987
- "$ref": "#/components/schemas/ChangedRevisionReusableContent"
38891
+ "attachments": {
38892
+ "type": "array",
38893
+ "items": {
38894
+ "$ref": "#/components/schemas/AIAttachment"
38895
+ }
37988
38896
  }
37989
38897
  },
37990
38898
  "required": [
37991
- "tool",
37992
- "spaceId",
37993
- "reusableContent",
37994
- "revisionId"
38899
+ "role",
38900
+ "content"
37995
38901
  ]
37996
38902
  },
37997
- "AIToolCallCreateChangeRequest": {
38903
+ "AIModel": {
38904
+ "type": "string",
38905
+ "enum": [
38906
+ "fast",
38907
+ "reasoning-low",
38908
+ "reasoning-medium",
38909
+ "reasoning-high"
38910
+ ]
38911
+ },
38912
+ "AIToolDefinition": {
37998
38913
  "type": "object",
38914
+ "description": "Description of a tool that can be called from an AI agent.",
37999
38915
  "properties": {
38000
- "tool": {
38001
- "type": "string",
38002
- "enum": [
38003
- "createChangeRequest"
38004
- ]
38005
- },
38006
- "spaceId": {
38916
+ "name": {
38007
38917
  "type": "string",
38008
- "description": "The ID of the space the change request belongs to."
38918
+ "description": "The name of the tool. It should be unique within the agent."
38009
38919
  },
38010
- "action": {
38920
+ "description": {
38011
38921
  "type": "string",
38012
- "enum": [
38013
- "create",
38014
- "update"
38015
- ]
38922
+ "description": "The description of the tool, passed to the AI agent."
38016
38923
  },
38017
- "changeRequest": {
38924
+ "inputSchema": {
38018
38925
  "type": "object",
38926
+ "description": "JSON schema describing the input of the tool.",
38019
38927
  "properties": {
38020
- "id": {
38928
+ "type": {
38021
38929
  "type": "string",
38022
- "description": "The unique identifier of the change request."
38023
- },
38024
- "number": {
38025
- "type": "number",
38026
- "description": "Incremental identifier of the change request."
38930
+ "enum": [
38931
+ "object"
38932
+ ]
38027
38933
  },
38028
- "subject": {
38029
- "type": "string",
38030
- "description": "A brief summary of the change request."
38934
+ "properties": {
38935
+ "type": "object",
38936
+ "additionalProperties": {
38937
+ "type": "object",
38938
+ "properties": {
38939
+ "type": {
38940
+ "type": "string",
38941
+ "enum": [
38942
+ "string",
38943
+ "number",
38944
+ "boolean",
38945
+ "array",
38946
+ "object"
38947
+ ]
38948
+ },
38949
+ "description": {
38950
+ "type": "string",
38951
+ "description": "Description of the property."
38952
+ }
38953
+ },
38954
+ "required": [
38955
+ "type",
38956
+ "description"
38957
+ ],
38958
+ "additionalProperties": true
38959
+ }
38031
38960
  }
38032
38961
  },
38033
38962
  "required": [
38034
- "id",
38035
- "number",
38036
- "subject"
38963
+ "type",
38964
+ "properties"
38037
38965
  ]
38038
38966
  }
38039
38967
  },
38040
38968
  "required": [
38041
- "tool",
38042
- "spaceId",
38043
- "action",
38044
- "changeRequest"
38969
+ "name",
38970
+ "description"
38045
38971
  ]
38046
38972
  },
38047
- "AIToolCallComment": {
38973
+ "AIToolCallResult": {
38048
38974
  "type": "object",
38975
+ "description": "Result of a tool call.",
38976
+ "required": [
38977
+ "tool",
38978
+ "toolCallId",
38979
+ "output"
38980
+ ],
38049
38981
  "properties": {
38050
38982
  "tool": {
38051
38983
  "type": "string",
38052
- "enum": [
38053
- "comment"
38054
- ]
38984
+ "description": "The name of the tool that was called."
38055
38985
  },
38056
- "spaceId": {
38986
+ "toolCallId": {
38057
38987
  "type": "string",
38058
- "description": "The ID of the space being commented."
38988
+ "description": "The ID of the tool call."
38059
38989
  },
38060
- "page": {
38061
- "description": "The page being commented.",
38062
- "$ref": "#/components/schemas/ChangedRevisionPage"
38990
+ "output": {
38991
+ "type": "object",
38992
+ "description": "The output to the tool call."
38063
38993
  },
38064
- "commentId": {
38065
- "type": "string",
38066
- "description": "The ID of the comment being posted."
38994
+ "summary": {
38995
+ "$ref": "#/components/schemas/AIToolCallOtherSummary"
38067
38996
  }
38068
- },
38069
- "required": [
38070
- "tool",
38071
- "spaceId",
38072
- "commentId"
38073
- ]
38997
+ }
38074
38998
  },
38075
- "AIToolCallReplyToComment": {
38999
+ "AIStreamResponseStart": {
38076
39000
  "type": "object",
39001
+ "description": "Message emitted by the server to indicate the start of the AI response.\n",
38077
39002
  "properties": {
38078
- "tool": {
39003
+ "type": {
38079
39004
  "type": "string",
38080
39005
  "enum": [
38081
- "replyToComment"
39006
+ "response_start"
38082
39007
  ]
38083
39008
  },
38084
- "spaceId": {
38085
- "type": "string",
38086
- "description": "The ID of the space being commented."
38087
- },
38088
- "page": {
38089
- "description": "The page being commented.",
38090
- "$ref": "#/components/schemas/ChangedRevisionPage"
38091
- },
38092
- "commentId": {
39009
+ "messageId": {
38093
39010
  "type": "string",
38094
- "description": "The ID of the comment being replied to."
39011
+ "description": "The ID of the message that this event is composing.\n"
38095
39012
  },
38096
- "replyId": {
38097
- "type": "string",
38098
- "description": "The ID of the reply being posted."
39013
+ "task": {
39014
+ "$ref": "#/components/schemas/AIMessageTask"
38099
39015
  }
38100
39016
  },
38101
39017
  "required": [
38102
- "tool",
38103
- "spaceId",
38104
- "commentId",
38105
- "replyId"
39018
+ "type",
39019
+ "messageId"
38106
39020
  ]
38107
39021
  },
38108
- "AIToolCallSubmitChangeRequestReview": {
39022
+ "AIStreamResponseFinish": {
38109
39023
  "type": "object",
39024
+ "description": "Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests.\n",
38110
39025
  "properties": {
38111
- "tool": {
39026
+ "type": {
38112
39027
  "type": "string",
38113
39028
  "enum": [
38114
- "submitChangeRequestReview"
39029
+ "response_finish"
38115
39030
  ]
38116
39031
  },
38117
- "spaceId": {
38118
- "type": "string",
38119
- "description": "The ID of the space where the review was submitted."
38120
- },
38121
- "changeRequestId": {
39032
+ "messageId": {
38122
39033
  "type": "string",
38123
- "description": "The ID of the change request being reviewed."
38124
- },
38125
- "status": {
38126
- "$ref": "#/components/schemas/ChangeRequestReviewStatus",
38127
- "description": "Result of the review."
39034
+ "description": "The ID of the message that this event is composing.\n"
38128
39035
  },
38129
- "reviewId": {
39036
+ "responseId": {
38130
39037
  "type": "string",
38131
- "description": "Identifier of the review that was created."
39038
+ "deprecated": true,
39039
+ "description": "The ID of the response"
38132
39040
  },
38133
- "commentId": {
38134
- "type": "string",
38135
- "description": "Identifier of the comment that was created as part of the review."
39041
+ "response": {
39042
+ "description": "The response metadata associated with the message.",
39043
+ "$ref": "#/components/schemas/AIMessageResponseMetadata"
38136
39044
  }
38137
39045
  },
38138
39046
  "required": [
38139
- "tool",
38140
- "spaceId",
38141
- "changeRequestId",
38142
- "status",
38143
- "reviewId",
38144
- "commentId"
39047
+ "type",
39048
+ "messageId",
39049
+ "response"
38145
39050
  ]
38146
39051
  },
38147
- "AIToolCallMCP": {
39052
+ "AIStreamResponseDocument": {
38148
39053
  "type": "object",
38149
- "description": "Tool called from an MCP server",
39054
+ "description": "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.\n",
38150
39055
  "properties": {
38151
- "tool": {
39056
+ "type": {
38152
39057
  "type": "string",
38153
39058
  "enum": [
38154
- "mcp"
39059
+ "response_document",
39060
+ "response_reasoning"
38155
39061
  ]
38156
39062
  },
38157
- "mcpServerId": {
39063
+ "messageId": {
38158
39064
  "type": "string",
38159
- "description": "The ID of the MCP server that has been called."
39065
+ "description": "The ID of the message that this event is composing.\n"
38160
39066
  },
38161
- "mcpToolName": {
38162
- "type": "string",
38163
- "description": "The name of the tool that has been called."
39067
+ "stepIndex": {
39068
+ "type": "integer",
39069
+ "description": "The index of the step of the message that this event is composing.\n"
38164
39070
  },
38165
- "mcpToolTitle": {
39071
+ "operation": {
38166
39072
  "type": "string",
38167
- "description": "The title of the tool that has been called."
39073
+ "enum": [
39074
+ "insert",
39075
+ "update"
39076
+ ]
39077
+ },
39078
+ "blocks": {
39079
+ "type": "array",
39080
+ "items": {
39081
+ "$ref": "#/components/schemas/DocumentBlocksTopLevels"
39082
+ }
38168
39083
  }
38169
39084
  },
38170
39085
  "required": [
38171
- "tool",
38172
- "mcpServerId",
38173
- "mcpToolName"
39086
+ "type",
39087
+ "messageId",
39088
+ "stepIndex",
39089
+ "operation",
39090
+ "blocks"
38174
39091
  ]
38175
39092
  },
38176
- "AIToolCallOther": {
39093
+ "AIStreamResponseObject": {
38177
39094
  "type": "object",
38178
- "description": "Any tool call that is unknown by GitBook",
39095
+ "description": "Message emitted by the server to indicate a chunk of the JSON object response.\n",
38179
39096
  "properties": {
38180
- "tool": {
39097
+ "type": {
38181
39098
  "type": "string",
38182
39099
  "enum": [
38183
- "other"
39100
+ "response_object"
38184
39101
  ]
38185
39102
  },
38186
- "summary": {
38187
- "$ref": "#/components/schemas/AIToolCallOtherSummary"
39103
+ "messageId": {
39104
+ "type": "string",
39105
+ "description": "The ID of the message that this event is composing.\n"
39106
+ },
39107
+ "jsonChunk": {
39108
+ "type": "string",
39109
+ "description": "The chunk of the JSON object response"
38188
39110
  }
38189
39111
  },
38190
39112
  "required": [
38191
- "tool",
38192
- "summary"
38193
- ]
38194
- },
38195
- "AIToolCall": {
38196
- "oneOf": [
38197
- {
38198
- "$ref": "#/components/schemas/AIToolCallGetPageContent"
38199
- },
38200
- {
38201
- "$ref": "#/components/schemas/AIToolCallGetPages"
38202
- },
38203
- {
38204
- "$ref": "#/components/schemas/AIToolCallGetReusableContents"
38205
- },
38206
- {
38207
- "$ref": "#/components/schemas/AIToolCallSearch"
38208
- },
38209
- {
38210
- "$ref": "#/components/schemas/AIToolCallEditPage"
38211
- },
38212
- {
38213
- "$ref": "#/components/schemas/AIToolCallCreatePage"
38214
- },
38215
- {
38216
- "$ref": "#/components/schemas/AIToolCallDeletePage"
38217
- },
38218
- {
38219
- "$ref": "#/components/schemas/AIToolCallRenamePage"
38220
- },
38221
- {
38222
- "$ref": "#/components/schemas/AIToolCallMovePage"
38223
- },
38224
- {
38225
- "$ref": "#/components/schemas/AIToolCallListModifiedPages"
38226
- },
38227
- {
38228
- "$ref": "#/components/schemas/AIToolCallGetPageDiff"
38229
- },
38230
- {
38231
- "$ref": "#/components/schemas/AIToolCallCreateReusableContent"
38232
- },
38233
- {
38234
- "$ref": "#/components/schemas/AIToolCallEditReusableContent"
38235
- },
38236
- {
38237
- "$ref": "#/components/schemas/AIToolCallGetReusableContent"
38238
- },
38239
- {
38240
- "$ref": "#/components/schemas/AIToolCallCreateChangeRequest"
38241
- },
38242
- {
38243
- "$ref": "#/components/schemas/AIToolCallComment"
38244
- },
38245
- {
38246
- "$ref": "#/components/schemas/AIToolCallReplyToComment"
38247
- },
38248
- {
38249
- "$ref": "#/components/schemas/AIToolCallSubmitChangeRequestReview"
38250
- },
38251
- {
38252
- "$ref": "#/components/schemas/AIToolCallMCP"
38253
- },
38254
- {
38255
- "$ref": "#/components/schemas/AIToolCallOther"
38256
- }
39113
+ "type",
39114
+ "messageId",
39115
+ "jsonChunk"
38257
39116
  ]
38258
39117
  },
38259
39118
  "AIStreamResponseToolCall": {
@@ -38420,71 +39279,68 @@
38420
39279
  ]
38421
39280
  },
38422
39281
  "SiteInsightsEventSession": {
38423
- "type": "object",
38424
- "description": "Analytics info on the GitBook's site session.",
38425
- "properties": {
38426
- "visitorId": {
38427
- "type": "string",
38428
- "description": "GitBook's unique identifier of the visitor."
38429
- },
38430
- "sessionId": {
38431
- "type": "string",
38432
- "description": "GitBook's unique identifier of the visitor's session."
39282
+ "allOf": [
39283
+ {
39284
+ "$ref": "#/components/schemas/SiteInsightsSession"
38433
39285
  },
38434
- "cookies": {
39286
+ {
38435
39287
  "type": "object",
38436
- "description": "The visitors cookies.",
38437
- "additionalProperties": {
38438
- "type": "string"
38439
- }
38440
- },
38441
- "ip": {
38442
- "type": "string",
38443
- "description": "IP address of the visitor.\nIf not defined, it'll default to the IP executing the request.\n"
38444
- },
38445
- "userAgent": {
38446
- "type": "string",
38447
- "description": "User-agent of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent\n"
38448
- },
38449
- "language": {
38450
- "type": "string",
38451
- "nullable": true,
38452
- "description": "Language of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/language\n"
38453
- },
38454
- "referrer": {
38455
- "description": "Referrer of the session",
38456
- "oneOf": [
38457
- {
39288
+ "description": "Analytics info on the GitBook's site session.",
39289
+ "properties": {
39290
+ "cookies": {
39291
+ "type": "object",
39292
+ "description": "The visitors cookies.",
39293
+ "additionalProperties": {
39294
+ "type": "string"
39295
+ }
39296
+ },
39297
+ "ip": {
39298
+ "type": "string",
39299
+ "description": "IP address of the visitor.\nIf not defined, it'll default to the IP executing the request.\n"
39300
+ },
39301
+ "userAgent": {
39302
+ "type": "string",
39303
+ "description": "User-agent of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent\n"
39304
+ },
39305
+ "language": {
38458
39306
  "type": "string",
38459
39307
  "nullable": true,
38460
- "enum": [
38461
- null,
38462
- ""
39308
+ "description": "Language of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/language\n"
39309
+ },
39310
+ "referrer": {
39311
+ "description": "Referrer of the session",
39312
+ "oneOf": [
39313
+ {
39314
+ "type": "string",
39315
+ "nullable": true,
39316
+ "enum": [
39317
+ null,
39318
+ ""
39319
+ ]
39320
+ },
39321
+ {
39322
+ "$ref": "#/components/schemas/URL"
39323
+ }
38463
39324
  ]
38464
39325
  },
38465
- {
38466
- "$ref": "#/components/schemas/URL"
39326
+ "visitorAuthToken": {
39327
+ "type": "string",
39328
+ "nullable": true,
39329
+ "deprecated": true,
39330
+ "description": "Deprecated, use visitorAuthClaims instead."
39331
+ },
39332
+ "visitorAuthClaims": {
39333
+ "description": "Claims of the visitor.\nThis is used to identify the visitor with adaptive content.\n",
39334
+ "$ref": "#/components/schemas/PlainObject"
38467
39335
  }
39336
+ },
39337
+ "required": [
39338
+ "cookies",
39339
+ "userAgent",
39340
+ "language",
39341
+ "referrer"
38468
39342
  ]
38469
- },
38470
- "visitorAuthToken": {
38471
- "type": "string",
38472
- "nullable": true,
38473
- "deprecated": true,
38474
- "description": "Deprecated, use visitorAuthClaims instead."
38475
- },
38476
- "visitorAuthClaims": {
38477
- "description": "Claims of the visitor.\nThis is used to identify the visitor with adaptive content.\n",
38478
- "$ref": "#/components/schemas/PlainObject"
38479
39343
  }
38480
- },
38481
- "required": [
38482
- "visitorId",
38483
- "sessionId",
38484
- "cookies",
38485
- "userAgent",
38486
- "language",
38487
- "referrer"
38488
39344
  ]
38489
39345
  },
38490
39346
  "SiteInsightsDisplayContext": {
@@ -41840,21 +42696,6 @@
41840
42696
  }
41841
42697
  }
41842
42698
  },
41843
- "Timerange": {
41844
- "type": "object",
41845
- "properties": {
41846
- "start": {
41847
- "$ref": "#/components/schemas/Timestamp"
41848
- },
41849
- "end": {
41850
- "$ref": "#/components/schemas/Timestamp"
41851
- }
41852
- },
41853
- "required": [
41854
- "start",
41855
- "end"
41856
- ]
41857
- },
41858
42699
  "SHA256": {
41859
42700
  "type": "string",
41860
42701
  "minLength": 64,
@@ -44620,6 +45461,14 @@
44620
45461
  "disabled"
44621
45462
  ]
44622
45463
  },
45464
+ "SiteQuestionAnswerSourceType": {
45465
+ "type": "string",
45466
+ "description": "Source type used to answer a site question.",
45467
+ "enum": [
45468
+ "page",
45469
+ "record"
45470
+ ]
45471
+ },
44623
45472
  "Seat": {
44624
45473
  "type": "object",
44625
45474
  "properties": {
@@ -44654,78 +45503,6 @@
44654
45503
  "updatedAt"
44655
45504
  ]
44656
45505
  },
44657
- "AIMessageRole": {
44658
- "type": "string",
44659
- "enum": [
44660
- "user",
44661
- "assistant",
44662
- "developer"
44663
- ]
44664
- },
44665
- "AIMessageStep": {
44666
- "type": "object",
44667
- "description": "A step in a message from the AI agent.",
44668
- "properties": {
44669
- "content": {
44670
- "$ref": "#/components/schemas/JSONDocument"
44671
- },
44672
- "reasoning": {
44673
- "$ref": "#/components/schemas/JSONDocument"
44674
- },
44675
- "toolCalls": {
44676
- "type": "array",
44677
- "items": {
44678
- "$ref": "#/components/schemas/AIToolCall"
44679
- }
44680
- },
44681
- "timing": {
44682
- "type": "object",
44683
- "description": "The timing of the step.",
44684
- "properties": {
44685
- "reasoning": {
44686
- "$ref": "#/components/schemas/Timerange"
44687
- }
44688
- }
44689
- },
44690
- "attachments": {
44691
- "type": "array",
44692
- "items": {
44693
- "$ref": "#/components/schemas/AIAttachment"
44694
- }
44695
- }
44696
- },
44697
- "required": [
44698
- "content"
44699
- ]
44700
- },
44701
- "AIMessage": {
44702
- "type": "object",
44703
- "properties": {
44704
- "id": {
44705
- "type": "string"
44706
- },
44707
- "role": {
44708
- "$ref": "#/components/schemas/AIMessageRole"
44709
- },
44710
- "steps": {
44711
- "type": "array",
44712
- "items": {
44713
- "$ref": "#/components/schemas/AIMessageStep"
44714
- }
44715
- },
44716
- "task": {
44717
- "$ref": "#/components/schemas/AIMessageTask"
44718
- },
44719
- "response": {
44720
- "$ref": "#/components/schemas/AIMessageResponseMetadata"
44721
- }
44722
- },
44723
- "required": [
44724
- "id",
44725
- "role",
44726
- "steps"
44727
- ]
44728
- },
44729
45506
  "AgentStreamMessages": {
44730
45507
  "type": "object",
44731
45508
  "description": "Payload emitted by the agent to reset the messages.\n",