@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.json CHANGED
@@ -4084,6 +4084,118 @@
4084
4084
  }
4085
4085
  }
4086
4086
  },
4087
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/task/brainstorm": {
4088
+ "post": {
4089
+ "operationId": "streamBrainstormChangeRequest",
4090
+ "summary": "Brainstorm with AI on a change request and stream the results as a Server-Sent Events.",
4091
+ "tags": [
4092
+ "spaces"
4093
+ ],
4094
+ "security": [
4095
+ {
4096
+ "user": []
4097
+ }
4098
+ ],
4099
+ "parameters": [
4100
+ {
4101
+ "$ref": "#/components/parameters/spaceId"
4102
+ },
4103
+ {
4104
+ "$ref": "#/components/parameters/changeRequestId"
4105
+ }
4106
+ ],
4107
+ "responses": {
4108
+ "200": {
4109
+ "description": "Updated session.",
4110
+ "content": {
4111
+ "text/event-stream": {
4112
+ "schema": {
4113
+ "$ref": "#/components/schemas/ChangeRequestBrainstormSession"
4114
+ }
4115
+ }
4116
+ }
4117
+ },
4118
+ "default": {
4119
+ "$ref": "#/components/responses/UnexpectedError"
4120
+ }
4121
+ },
4122
+ "requestBody": {
4123
+ "required": true,
4124
+ "content": {
4125
+ "application/json": {
4126
+ "schema": {
4127
+ "type": "object",
4128
+ "properties": {
4129
+ "session": {
4130
+ "description": "Brainstorming session",
4131
+ "$ref": "#/components/schemas/ChangeRequestBrainstormSession"
4132
+ }
4133
+ },
4134
+ "required": [
4135
+ "session"
4136
+ ]
4137
+ }
4138
+ }
4139
+ }
4140
+ }
4141
+ }
4142
+ },
4143
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/task/implement": {
4144
+ "post": {
4145
+ "operationId": "streamImplementChangeRequestTask",
4146
+ "summary": "Implement a task on a change request and stream the results as a Server-Sent Events.",
4147
+ "tags": [
4148
+ "spaces"
4149
+ ],
4150
+ "security": [
4151
+ {
4152
+ "user": []
4153
+ }
4154
+ ],
4155
+ "parameters": [
4156
+ {
4157
+ "$ref": "#/components/parameters/spaceId"
4158
+ },
4159
+ {
4160
+ "$ref": "#/components/parameters/changeRequestId"
4161
+ }
4162
+ ],
4163
+ "responses": {
4164
+ "200": {
4165
+ "description": "Task being implemented.",
4166
+ "content": {
4167
+ "text/event-stream": {
4168
+ "schema": {
4169
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlan"
4170
+ }
4171
+ }
4172
+ }
4173
+ },
4174
+ "default": {
4175
+ "$ref": "#/components/responses/UnexpectedError"
4176
+ }
4177
+ },
4178
+ "requestBody": {
4179
+ "required": true,
4180
+ "content": {
4181
+ "application/json": {
4182
+ "schema": {
4183
+ "type": "object",
4184
+ "properties": {
4185
+ "plan": {
4186
+ "description": "Plan to run.",
4187
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlan"
4188
+ }
4189
+ },
4190
+ "required": [
4191
+ "plan"
4192
+ ]
4193
+ }
4194
+ }
4195
+ }
4196
+ }
4197
+ }
4198
+ },
4087
4199
  "/spaces/{spaceId}/revisions/{revisionId}": {
4088
4200
  "get": {
4089
4201
  "operationId": "getRevisionById",
@@ -7854,6 +7966,9 @@
7854
7966
  },
7855
7967
  {
7856
7968
  "$ref": "#/components/parameters/listLimit"
7969
+ },
7970
+ {
7971
+ "$ref": "#/components/parameters/listOrder"
7857
7972
  }
7858
7973
  ],
7859
7974
  "responses": {
@@ -12471,6 +12586,14 @@
12471
12586
  "schema": {
12472
12587
  "type": "string"
12473
12588
  }
12589
+ },
12590
+ {
12591
+ "name": "claims",
12592
+ "in": "query",
12593
+ "description": "Rison encoded string of attributes/assertions about the visitor for which we want to preview the site.",
12594
+ "schema": {
12595
+ "type": "string"
12596
+ }
12474
12597
  }
12475
12598
  ],
12476
12599
  "responses": {
@@ -13591,6 +13714,40 @@
13591
13714
  }
13592
13715
  ]
13593
13716
  },
13717
+ "sidebar": {
13718
+ "description": "Various styles for the sidebar. Each can be Set to null to reset the override.",
13719
+ "type": "object",
13720
+ "properties": {
13721
+ "background": {
13722
+ "oneOf": [
13723
+ {
13724
+ "$ref": "#/components/schemas/CustomizationSidebarBackgroundStyle"
13725
+ },
13726
+ {
13727
+ "type": "string",
13728
+ "nullable": true,
13729
+ "enum": [
13730
+ null
13731
+ ]
13732
+ }
13733
+ ]
13734
+ },
13735
+ "list": {
13736
+ "oneOf": [
13737
+ {
13738
+ "$ref": "#/components/schemas/CustomizationSidebarListStyle"
13739
+ },
13740
+ {
13741
+ "type": "string",
13742
+ "nullable": true,
13743
+ "enum": [
13744
+ null
13745
+ ]
13746
+ }
13747
+ ]
13748
+ }
13749
+ }
13750
+ },
13594
13751
  "background": {
13595
13752
  "description": "The style of background to use. Set to null to reset the override.",
13596
13753
  "oneOf": [
@@ -15419,6 +15576,16 @@
15419
15576
  "schema": {
15420
15577
  "type": "string"
15421
15578
  }
15579
+ },
15580
+ {
15581
+ "name": "redirectOnError",
15582
+ "in": "query",
15583
+ "required": false,
15584
+ "description": "When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid",
15585
+ "schema": {
15586
+ "type": "boolean",
15587
+ "default": false
15588
+ }
15422
15589
  }
15423
15590
  ],
15424
15591
  "responses": {
@@ -23192,6 +23359,34 @@
23192
23359
  "user"
23193
23360
  ]
23194
23361
  },
23362
+ "ChangeRequestBrainstormStatus": {
23363
+ "type": "string",
23364
+ "description": "The status of the session.\n- pending: The session is pending for input from the user.\n- running: The session is being processed by GitBook.\n- failed: The session processing has failed.\n",
23365
+ "enum": [
23366
+ "pending",
23367
+ "failed",
23368
+ "running"
23369
+ ]
23370
+ },
23371
+ "ChangeRequestBrainstormActor": {
23372
+ "type": "string",
23373
+ "enum": [
23374
+ "user",
23375
+ "agent"
23376
+ ]
23377
+ },
23378
+ "ChangeRequestBrainstormContext": {
23379
+ "type": "object",
23380
+ "properties": {
23381
+ "page": {
23382
+ "type": "string",
23383
+ "description": "Path of the page the user is currently viewing."
23384
+ }
23385
+ },
23386
+ "required": [
23387
+ "page"
23388
+ ]
23389
+ },
23195
23390
  "RevisionPageType": {
23196
23391
  "type": "string",
23197
23392
  "enum": [
@@ -23223,6 +23418,324 @@
23223
23418
  "title"
23224
23419
  ]
23225
23420
  },
23421
+ "ChangeRequestBrainstormLog": {
23422
+ "oneOf": [
23423
+ {
23424
+ "type": "object",
23425
+ "properties": {
23426
+ "tool": {
23427
+ "type": "string",
23428
+ "enum": [
23429
+ "get-page"
23430
+ ]
23431
+ },
23432
+ "intent": {
23433
+ "type": "string"
23434
+ },
23435
+ "page": {
23436
+ "$ref": "#/components/schemas/ChangedRevisionPage"
23437
+ }
23438
+ },
23439
+ "required": [
23440
+ "tool",
23441
+ "intent",
23442
+ "page"
23443
+ ]
23444
+ },
23445
+ {
23446
+ "type": "object",
23447
+ "properties": {
23448
+ "tool": {
23449
+ "type": "string",
23450
+ "enum": [
23451
+ "search-keyword"
23452
+ ]
23453
+ },
23454
+ "intent": {
23455
+ "type": "string"
23456
+ },
23457
+ "query": {
23458
+ "type": "string"
23459
+ }
23460
+ },
23461
+ "required": [
23462
+ "tool",
23463
+ "intent",
23464
+ "query"
23465
+ ]
23466
+ },
23467
+ {
23468
+ "type": "object",
23469
+ "properties": {
23470
+ "tool": {
23471
+ "type": "string",
23472
+ "enum": [
23473
+ "search-semantic"
23474
+ ]
23475
+ },
23476
+ "intent": {
23477
+ "type": "string"
23478
+ },
23479
+ "query": {
23480
+ "type": "string"
23481
+ }
23482
+ },
23483
+ "required": [
23484
+ "tool",
23485
+ "intent",
23486
+ "query"
23487
+ ]
23488
+ },
23489
+ {
23490
+ "type": "object",
23491
+ "properties": {
23492
+ "tool": {
23493
+ "type": "string",
23494
+ "enum": [
23495
+ "create-page"
23496
+ ]
23497
+ },
23498
+ "page": {
23499
+ "$ref": "#/components/schemas/ChangedRevisionPage"
23500
+ }
23501
+ },
23502
+ "required": [
23503
+ "tool",
23504
+ "page"
23505
+ ]
23506
+ },
23507
+ {
23508
+ "type": "object",
23509
+ "properties": {
23510
+ "tool": {
23511
+ "type": "string",
23512
+ "enum": [
23513
+ "delete-page"
23514
+ ]
23515
+ },
23516
+ "page": {
23517
+ "$ref": "#/components/schemas/ChangedRevisionPage"
23518
+ }
23519
+ },
23520
+ "required": [
23521
+ "tool",
23522
+ "page"
23523
+ ]
23524
+ },
23525
+ {
23526
+ "type": "object",
23527
+ "properties": {
23528
+ "tool": {
23529
+ "type": "string",
23530
+ "enum": [
23531
+ "edit-page"
23532
+ ]
23533
+ },
23534
+ "page": {
23535
+ "$ref": "#/components/schemas/ChangedRevisionPage"
23536
+ }
23537
+ },
23538
+ "required": [
23539
+ "tool",
23540
+ "page"
23541
+ ]
23542
+ }
23543
+ ]
23544
+ },
23545
+ "ChangeRequestBrainstormPlanStatus": {
23546
+ "type": "string",
23547
+ "description": "The status of the plan.\n- pending: The task is pending for input from the user.\n- running: The task is being processed by GitBook.\n- failed: The task processing has failed.\n- completed: The task has been completed.\n",
23548
+ "enum": [
23549
+ "pending",
23550
+ "failed",
23551
+ "running",
23552
+ "completed"
23553
+ ]
23554
+ },
23555
+ "ChangeRequestBrainstormPlanStepTitle": {
23556
+ "type": "string",
23557
+ "minLength": 1,
23558
+ "maxLength": 100
23559
+ },
23560
+ "ChangeRequestBrainstormPlanStepStatus": {
23561
+ "type": "string",
23562
+ "enum": [
23563
+ "pending",
23564
+ "succeeded",
23565
+ "failed",
23566
+ "running"
23567
+ ]
23568
+ },
23569
+ "ChangeRequestBrainstormPlanStep": {
23570
+ "type": "object",
23571
+ "properties": {
23572
+ "title": {
23573
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlanStepTitle"
23574
+ },
23575
+ "status": {
23576
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlanStepStatus"
23577
+ },
23578
+ "instruction": {
23579
+ "$ref": "#/components/schemas/JSONDocument"
23580
+ },
23581
+ "implementation": {
23582
+ "description": "Logs related to the implementation phase of the step.",
23583
+ "type": "object",
23584
+ "properties": {
23585
+ "summary": {
23586
+ "description": "A summary of the execution phase.",
23587
+ "$ref": "#/components/schemas/JSONDocument"
23588
+ },
23589
+ "logs": {
23590
+ "description": "Logs related to the execution phase of the step.",
23591
+ "items": {
23592
+ "$ref": "#/components/schemas/ChangeRequestBrainstormLog"
23593
+ }
23594
+ }
23595
+ },
23596
+ "required": [
23597
+ "logs"
23598
+ ]
23599
+ }
23600
+ },
23601
+ "required": [
23602
+ "title",
23603
+ "status",
23604
+ "instruction"
23605
+ ]
23606
+ },
23607
+ "ChangeRequestBrainstormPlan": {
23608
+ "type": "object",
23609
+ "properties": {
23610
+ "status": {
23611
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlanStatus"
23612
+ },
23613
+ "title": {
23614
+ "type": "string",
23615
+ "description": "The title of the plan."
23616
+ },
23617
+ "steps": {
23618
+ "description": "The steps of the plan to execute the plan.",
23619
+ "type": "array",
23620
+ "items": {
23621
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlanStep"
23622
+ }
23623
+ },
23624
+ "context": {
23625
+ "$ref": "#/components/schemas/ChangeRequestBrainstormContext"
23626
+ }
23627
+ },
23628
+ "required": [
23629
+ "status",
23630
+ "title",
23631
+ "steps"
23632
+ ]
23633
+ },
23634
+ "ChangeRequestBrainstormAttachmentPlan": {
23635
+ "type": "object",
23636
+ "properties": {
23637
+ "type": {
23638
+ "type": "string",
23639
+ "enum": [
23640
+ "plan"
23641
+ ]
23642
+ },
23643
+ "plan": {
23644
+ "$ref": "#/components/schemas/ChangeRequestBrainstormPlan"
23645
+ }
23646
+ },
23647
+ "required": [
23648
+ "type",
23649
+ "plan"
23650
+ ]
23651
+ },
23652
+ "ChangeRequestBrainstormAttachmentMessage": {
23653
+ "type": "object",
23654
+ "properties": {
23655
+ "type": {
23656
+ "type": "string",
23657
+ "enum": [
23658
+ "message"
23659
+ ]
23660
+ },
23661
+ "suggestions": {
23662
+ "type": "array",
23663
+ "items": {
23664
+ "type": "string"
23665
+ }
23666
+ }
23667
+ },
23668
+ "required": [
23669
+ "type",
23670
+ "suggestions"
23671
+ ]
23672
+ },
23673
+ "ChangeRequestBrainstormAttachment": {
23674
+ "oneOf": [
23675
+ {
23676
+ "$ref": "#/components/schemas/ChangeRequestBrainstormAttachmentPlan"
23677
+ },
23678
+ {
23679
+ "$ref": "#/components/schemas/ChangeRequestBrainstormAttachmentMessage"
23680
+ }
23681
+ ]
23682
+ },
23683
+ "ChangeRequestBrainstormMessage": {
23684
+ "type": "object",
23685
+ "properties": {
23686
+ "id": {
23687
+ "type": "string",
23688
+ "description": "The unique identifier of the chat message."
23689
+ },
23690
+ "actor": {
23691
+ "$ref": "#/components/schemas/ChangeRequestBrainstormActor"
23692
+ },
23693
+ "message": {
23694
+ "$ref": "#/components/schemas/JSONDocument"
23695
+ },
23696
+ "context": {
23697
+ "$ref": "#/components/schemas/ChangeRequestBrainstormContext"
23698
+ },
23699
+ "logs": {
23700
+ "description": "Logs related to the processing of the message.",
23701
+ "items": {
23702
+ "$ref": "#/components/schemas/ChangeRequestBrainstormLog"
23703
+ }
23704
+ },
23705
+ "attachment": {
23706
+ "$ref": "#/components/schemas/ChangeRequestBrainstormAttachment"
23707
+ }
23708
+ },
23709
+ "required": [
23710
+ "id",
23711
+ "actor",
23712
+ "message"
23713
+ ]
23714
+ },
23715
+ "ChangeRequestBrainstormSession": {
23716
+ "type": "object",
23717
+ "properties": {
23718
+ "id": {
23719
+ "type": "string",
23720
+ "description": "The unique identifier of the session."
23721
+ },
23722
+ "status": {
23723
+ "$ref": "#/components/schemas/ChangeRequestBrainstormStatus"
23724
+ },
23725
+ "messages": {
23726
+ "description": "Conversation messages related to the brainstorming phase of the task.",
23727
+ "type": "array",
23728
+ "items": {
23729
+ "$ref": "#/components/schemas/ChangeRequestBrainstormMessage"
23730
+ }
23731
+ }
23732
+ },
23733
+ "required": [
23734
+ "id",
23735
+ "status",
23736
+ "messages"
23737
+ ]
23738
+ },
23226
23739
  "RevisionSemanticChangePageCreated": {
23227
23740
  "type": "object",
23228
23741
  "properties": {
@@ -23894,7 +24407,9 @@
23894
24407
  "enum": [
23895
24408
  "plain",
23896
24409
  "match"
23897
- ]
24410
+ ],
24411
+ "deprecated": true,
24412
+ "description": "The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead."
23898
24413
  },
23899
24414
  "CustomizationLocale": {
23900
24415
  "type": "string",
@@ -29318,6 +29833,23 @@
29318
29833
  "thin"
29319
29834
  ]
29320
29835
  },
29836
+ "CustomizationSidebarBackgroundStyle": {
29837
+ "type": "string",
29838
+ "description": "- `default`: No background, content sits directly against sidebar edge.\n- `filled`: Muted background color that extends to sidebar edges.\n",
29839
+ "enum": [
29840
+ "default",
29841
+ "filled"
29842
+ ]
29843
+ },
29844
+ "CustomizationSidebarListStyle": {
29845
+ "type": "string",
29846
+ "description": "- `default`: Simple list items without special styling, groups are inset with a line.\n- `pill`: Rounded capsule shape around selected/active items.\n- `line`: Continuous line next to all items, with coloured line part for selected/active items.\n",
29847
+ "enum": [
29848
+ "default",
29849
+ "pill",
29850
+ "line"
29851
+ ]
29852
+ },
29321
29853
  "SiteCustomizationSettings": {
29322
29854
  "type": "object",
29323
29855
  "properties": {
@@ -29341,10 +29873,26 @@
29341
29873
  "$ref": "#/components/schemas/CustomizationFont"
29342
29874
  },
29343
29875
  "background": {
29876
+ "deprecated": true,
29344
29877
  "$ref": "#/components/schemas/CustomizationBackground"
29345
29878
  },
29346
29879
  "icons": {
29347
29880
  "$ref": "#/components/schemas/CustomizationIconsStyle"
29881
+ },
29882
+ "sidebar": {
29883
+ "type": "object",
29884
+ "properties": {
29885
+ "background": {
29886
+ "$ref": "#/components/schemas/CustomizationSidebarBackgroundStyle"
29887
+ },
29888
+ "list": {
29889
+ "$ref": "#/components/schemas/CustomizationSidebarListStyle"
29890
+ }
29891
+ },
29892
+ "required": [
29893
+ "background",
29894
+ "list"
29895
+ ]
29348
29896
  }
29349
29897
  },
29350
29898
  "required": [
@@ -29352,7 +29900,8 @@
29352
29900
  "corners",
29353
29901
  "font",
29354
29902
  "background",
29355
- "icons"
29903
+ "icons",
29904
+ "sidebar"
29356
29905
  ]
29357
29906
  },
29358
29907
  "internationalization": {