@gitbook/api 0.81.0 → 0.83.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.yaml CHANGED
@@ -2238,6 +2238,70 @@ paths:
2238
2238
  - url
2239
2239
  default:
2240
2240
  $ref: "#/components/responses/UnexpectedError"
2241
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/task/brainstorm":
2242
+ post:
2243
+ operationId: streamBrainstormChangeRequest
2244
+ summary: Brainstorm with AI on a change request and stream the results as a Server-Sent Events.
2245
+ tags:
2246
+ - spaces
2247
+ security:
2248
+ - user: []
2249
+ parameters:
2250
+ - $ref: "#/components/parameters/spaceId"
2251
+ - $ref: "#/components/parameters/changeRequestId"
2252
+ responses:
2253
+ "200":
2254
+ description: Updated session.
2255
+ content:
2256
+ text/event-stream:
2257
+ schema:
2258
+ $ref: "#/components/schemas/ChangeRequestBrainstormSession"
2259
+ default:
2260
+ $ref: "#/components/responses/UnexpectedError"
2261
+ requestBody:
2262
+ required: true
2263
+ content:
2264
+ application/json:
2265
+ schema:
2266
+ type: object
2267
+ properties:
2268
+ session:
2269
+ description: Brainstorming session
2270
+ $ref: "#/components/schemas/ChangeRequestBrainstormSession"
2271
+ required:
2272
+ - session
2273
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/task/implement":
2274
+ post:
2275
+ operationId: streamImplementChangeRequestTask
2276
+ summary: Implement a task on a change request and stream the results as a Server-Sent Events.
2277
+ tags:
2278
+ - spaces
2279
+ security:
2280
+ - user: []
2281
+ parameters:
2282
+ - $ref: "#/components/parameters/spaceId"
2283
+ - $ref: "#/components/parameters/changeRequestId"
2284
+ responses:
2285
+ "200":
2286
+ description: Task being implemented.
2287
+ content:
2288
+ text/event-stream:
2289
+ schema:
2290
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlan"
2291
+ default:
2292
+ $ref: "#/components/responses/UnexpectedError"
2293
+ requestBody:
2294
+ required: true
2295
+ content:
2296
+ application/json:
2297
+ schema:
2298
+ type: object
2299
+ properties:
2300
+ plan:
2301
+ description: Plan to run.
2302
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlan"
2303
+ required:
2304
+ - plan
2241
2305
  "/spaces/{spaceId}/revisions/{revisionId}":
2242
2306
  get:
2243
2307
  operationId: getRevisionById
@@ -4341,6 +4405,7 @@ paths:
4341
4405
  - $ref: "#/components/parameters/userId"
4342
4406
  - $ref: "#/components/parameters/listPage"
4343
4407
  - $ref: "#/components/parameters/listLimit"
4408
+ - $ref: "#/components/parameters/listOrder"
4344
4409
  responses:
4345
4410
  "200":
4346
4411
  description: Listing of spaces that can be accessed by the user in the organization.
@@ -6958,6 +7023,11 @@ paths:
6958
7023
  description: ID of the site-space to preview. If not provided, the default site-space will be used.
6959
7024
  schema:
6960
7025
  type: string
7026
+ - name: claims
7027
+ in: query
7028
+ description: Rison encoded string of attributes/assertions about the visitor for which we want to preview the site.
7029
+ schema:
7030
+ type: string
6961
7031
  responses:
6962
7032
  "200":
6963
7033
  description: OK
@@ -7578,6 +7648,24 @@ paths:
7578
7648
  nullable: true
7579
7649
  enum:
7580
7650
  - null
7651
+ sidebar:
7652
+ description: Various styles for the sidebar. Each can be Set to null to reset the override.
7653
+ type: object
7654
+ properties:
7655
+ background:
7656
+ oneOf:
7657
+ - $ref: "#/components/schemas/CustomizationSidebarBackgroundStyle"
7658
+ - type: string
7659
+ nullable: true
7660
+ enum:
7661
+ - null
7662
+ list:
7663
+ oneOf:
7664
+ - $ref: "#/components/schemas/CustomizationSidebarListStyle"
7665
+ - type: string
7666
+ nullable: true
7667
+ enum:
7668
+ - null
7581
7669
  background:
7582
7670
  description: The style of background to use. Set to null to reset the override.
7583
7671
  oneOf:
@@ -8633,6 +8721,13 @@ paths:
8633
8721
  description: JWT token generated for a visitor auth session
8634
8722
  schema:
8635
8723
  type: string
8724
+ - name: redirectOnError
8725
+ in: query
8726
+ required: false
8727
+ description: When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
8728
+ schema:
8729
+ type: boolean
8730
+ default: false
8636
8731
  responses:
8637
8732
  "200":
8638
8733
  description: OK
@@ -13839,6 +13934,30 @@ components:
13839
13934
  - updatedAt
13840
13935
  - count
13841
13936
  - user
13937
+ ChangeRequestBrainstormStatus:
13938
+ type: string
13939
+ description: |
13940
+ The status of the session.
13941
+ - pending: The session is pending for input from the user.
13942
+ - running: The session is being processed by GitBook.
13943
+ - failed: The session processing has failed.
13944
+ enum:
13945
+ - pending
13946
+ - failed
13947
+ - running
13948
+ ChangeRequestBrainstormActor:
13949
+ type: string
13950
+ enum:
13951
+ - user
13952
+ - agent
13953
+ ChangeRequestBrainstormContext:
13954
+ type: object
13955
+ properties:
13956
+ page:
13957
+ type: string
13958
+ description: Path of the page the user is currently viewing.
13959
+ required:
13960
+ - page
13842
13961
  RevisionPageType:
13843
13962
  type: string
13844
13963
  enum:
@@ -13861,6 +13980,221 @@ components:
13861
13980
  - id
13862
13981
  - type
13863
13982
  - title
13983
+ ChangeRequestBrainstormLog:
13984
+ oneOf:
13985
+ - type: object
13986
+ properties:
13987
+ tool:
13988
+ type: string
13989
+ enum:
13990
+ - get-page
13991
+ intent:
13992
+ type: string
13993
+ page:
13994
+ $ref: "#/components/schemas/ChangedRevisionPage"
13995
+ required:
13996
+ - tool
13997
+ - intent
13998
+ - page
13999
+ - type: object
14000
+ properties:
14001
+ tool:
14002
+ type: string
14003
+ enum:
14004
+ - search-keyword
14005
+ intent:
14006
+ type: string
14007
+ query:
14008
+ type: string
14009
+ required:
14010
+ - tool
14011
+ - intent
14012
+ - query
14013
+ - type: object
14014
+ properties:
14015
+ tool:
14016
+ type: string
14017
+ enum:
14018
+ - search-semantic
14019
+ intent:
14020
+ type: string
14021
+ query:
14022
+ type: string
14023
+ required:
14024
+ - tool
14025
+ - intent
14026
+ - query
14027
+ - type: object
14028
+ properties:
14029
+ tool:
14030
+ type: string
14031
+ enum:
14032
+ - create-page
14033
+ page:
14034
+ $ref: "#/components/schemas/ChangedRevisionPage"
14035
+ required:
14036
+ - tool
14037
+ - page
14038
+ - type: object
14039
+ properties:
14040
+ tool:
14041
+ type: string
14042
+ enum:
14043
+ - delete-page
14044
+ page:
14045
+ $ref: "#/components/schemas/ChangedRevisionPage"
14046
+ required:
14047
+ - tool
14048
+ - page
14049
+ - type: object
14050
+ properties:
14051
+ tool:
14052
+ type: string
14053
+ enum:
14054
+ - edit-page
14055
+ page:
14056
+ $ref: "#/components/schemas/ChangedRevisionPage"
14057
+ required:
14058
+ - tool
14059
+ - page
14060
+ ChangeRequestBrainstormPlanStatus:
14061
+ type: string
14062
+ description: |
14063
+ The status of the plan.
14064
+ - pending: The task is pending for input from the user.
14065
+ - running: The task is being processed by GitBook.
14066
+ - failed: The task processing has failed.
14067
+ - completed: The task has been completed.
14068
+ enum:
14069
+ - pending
14070
+ - failed
14071
+ - running
14072
+ - completed
14073
+ ChangeRequestBrainstormPlanStepTitle:
14074
+ type: string
14075
+ minLength: 1
14076
+ maxLength: 100
14077
+ ChangeRequestBrainstormPlanStepStatus:
14078
+ type: string
14079
+ enum:
14080
+ - pending
14081
+ - succeeded
14082
+ - failed
14083
+ - running
14084
+ ChangeRequestBrainstormPlanStep:
14085
+ type: object
14086
+ properties:
14087
+ title:
14088
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlanStepTitle"
14089
+ status:
14090
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlanStepStatus"
14091
+ instruction:
14092
+ $ref: "#/components/schemas/JSONDocument"
14093
+ implementation:
14094
+ description: Logs related to the implementation phase of the step.
14095
+ type: object
14096
+ properties:
14097
+ summary:
14098
+ description: A summary of the execution phase.
14099
+ $ref: "#/components/schemas/JSONDocument"
14100
+ logs:
14101
+ description: Logs related to the execution phase of the step.
14102
+ items:
14103
+ $ref: "#/components/schemas/ChangeRequestBrainstormLog"
14104
+ required:
14105
+ - logs
14106
+ required:
14107
+ - title
14108
+ - status
14109
+ - instruction
14110
+ ChangeRequestBrainstormPlan:
14111
+ type: object
14112
+ properties:
14113
+ status:
14114
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlanStatus"
14115
+ title:
14116
+ type: string
14117
+ description: The title of the plan.
14118
+ steps:
14119
+ description: The steps of the plan to execute the plan.
14120
+ type: array
14121
+ items:
14122
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlanStep"
14123
+ context:
14124
+ $ref: "#/components/schemas/ChangeRequestBrainstormContext"
14125
+ required:
14126
+ - status
14127
+ - title
14128
+ - steps
14129
+ ChangeRequestBrainstormAttachmentPlan:
14130
+ type: object
14131
+ properties:
14132
+ type:
14133
+ type: string
14134
+ enum:
14135
+ - plan
14136
+ plan:
14137
+ $ref: "#/components/schemas/ChangeRequestBrainstormPlan"
14138
+ required:
14139
+ - type
14140
+ - plan
14141
+ ChangeRequestBrainstormAttachmentMessage:
14142
+ type: object
14143
+ properties:
14144
+ type:
14145
+ type: string
14146
+ enum:
14147
+ - message
14148
+ suggestions:
14149
+ type: array
14150
+ items:
14151
+ type: string
14152
+ required:
14153
+ - type
14154
+ - suggestions
14155
+ ChangeRequestBrainstormAttachment:
14156
+ oneOf:
14157
+ - $ref: "#/components/schemas/ChangeRequestBrainstormAttachmentPlan"
14158
+ - $ref: "#/components/schemas/ChangeRequestBrainstormAttachmentMessage"
14159
+ ChangeRequestBrainstormMessage:
14160
+ type: object
14161
+ properties:
14162
+ id:
14163
+ type: string
14164
+ description: The unique identifier of the chat message.
14165
+ actor:
14166
+ $ref: "#/components/schemas/ChangeRequestBrainstormActor"
14167
+ message:
14168
+ $ref: "#/components/schemas/JSONDocument"
14169
+ context:
14170
+ $ref: "#/components/schemas/ChangeRequestBrainstormContext"
14171
+ logs:
14172
+ description: Logs related to the processing of the message.
14173
+ items:
14174
+ $ref: "#/components/schemas/ChangeRequestBrainstormLog"
14175
+ attachment:
14176
+ $ref: "#/components/schemas/ChangeRequestBrainstormAttachment"
14177
+ required:
14178
+ - id
14179
+ - actor
14180
+ - message
14181
+ ChangeRequestBrainstormSession:
14182
+ type: object
14183
+ properties:
14184
+ id:
14185
+ type: string
14186
+ description: The unique identifier of the session.
14187
+ status:
14188
+ $ref: "#/components/schemas/ChangeRequestBrainstormStatus"
14189
+ messages:
14190
+ description: Conversation messages related to the brainstorming phase of the task.
14191
+ type: array
14192
+ items:
14193
+ $ref: "#/components/schemas/ChangeRequestBrainstormMessage"
14194
+ required:
14195
+ - id
14196
+ - status
14197
+ - messages
13864
14198
  RevisionSemanticChangePageCreated:
13865
14199
  type: object
13866
14200
  properties:
@@ -14294,6 +14628,8 @@ components:
14294
14628
  enum:
14295
14629
  - plain
14296
14630
  - match
14631
+ deprecated: true
14632
+ description: The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead.
14297
14633
  CustomizationLocale:
14298
14634
  type: string
14299
14635
  description: Language for the UI element
@@ -17841,6 +18177,24 @@ components:
17841
18177
  - duotone
17842
18178
  - light
17843
18179
  - thin
18180
+ CustomizationSidebarBackgroundStyle:
18181
+ type: string
18182
+ description: |
18183
+ - `default`: No background, content sits directly against sidebar edge.
18184
+ - `filled`: Muted background color that extends to sidebar edges.
18185
+ enum:
18186
+ - default
18187
+ - filled
18188
+ CustomizationSidebarListStyle:
18189
+ type: string
18190
+ description: |
18191
+ - `default`: Simple list items without special styling, groups are inset with a line.
18192
+ - `pill`: Rounded capsule shape around selected/active items.
18193
+ - `line`: Continuous line next to all items, with coloured line part for selected/active items.
18194
+ enum:
18195
+ - default
18196
+ - pill
18197
+ - line
17844
18198
  SiteCustomizationSettings:
17845
18199
  type: object
17846
18200
  properties:
@@ -17859,15 +18213,27 @@ components:
17859
18213
  font:
17860
18214
  $ref: "#/components/schemas/CustomizationFont"
17861
18215
  background:
18216
+ deprecated: true
17862
18217
  $ref: "#/components/schemas/CustomizationBackground"
17863
18218
  icons:
17864
18219
  $ref: "#/components/schemas/CustomizationIconsStyle"
18220
+ sidebar:
18221
+ type: object
18222
+ properties:
18223
+ background:
18224
+ $ref: "#/components/schemas/CustomizationSidebarBackgroundStyle"
18225
+ list:
18226
+ $ref: "#/components/schemas/CustomizationSidebarListStyle"
18227
+ required:
18228
+ - background
18229
+ - list
17865
18230
  required:
17866
18231
  - primaryColor
17867
18232
  - corners
17868
18233
  - font
17869
18234
  - background
17870
18235
  - icons
18236
+ - sidebar
17871
18237
  internationalization:
17872
18238
  type: object
17873
18239
  properties: