@gitbook/api 0.162.0 → 0.163.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
@@ -192,7 +192,7 @@ tags:
192
192
  description: |
193
193
  Manage the contextual records and topics used by your site to power AI experiences and insights.
194
194
 
195
- {% openapi-schemas spec="gitbook" schemas="ContextRecord,ContextConnection,ContextTopic" grouped="false" %}
195
+ {% openapi-schemas spec="gitbook" schemas="ContextRecord,ContextConnection,SiteTopic" grouped="false" %}
196
196
  The Site Context objects
197
197
  {% endopenapi-schemas %}
198
198
  - name: site-questions
@@ -8088,7 +8088,11 @@ paths:
8088
8088
  items:
8089
8089
  type: array
8090
8090
  items:
8091
- $ref: "#/components/schemas/SearchSpaceResult"
8091
+ oneOf:
8092
+ - $ref: "#/components/schemas/SearchSpaceResult"
8093
+ - $ref: "#/components/schemas/SearchRecordResult"
8094
+ discriminator:
8095
+ propertyName: type
8092
8096
  "/orgs/{organizationId}/sites/{siteId}/ask":
8093
8097
  post:
8094
8098
  operationId: streamAskInSite
@@ -8189,6 +8193,11 @@ paths:
8189
8193
  description: Filter context records by connection id.
8190
8194
  schema:
8191
8195
  type: string
8196
+ - name: topic
8197
+ in: query
8198
+ description: Filter context records by associated site topic ID.
8199
+ schema:
8200
+ type: string
8192
8201
  responses:
8193
8202
  "200":
8194
8203
  description: OK
@@ -8367,10 +8376,10 @@ paths:
8367
8376
  "400":
8368
8377
  description: Connection was synced less than an hour ago or invalid connector
8369
8378
  $ref: "#/components/responses/BadRequestError"
8370
- "/orgs/{organizationId}/sites/{siteId}/context-topics":
8379
+ "/orgs/{organizationId}/sites/{siteId}/topics":
8371
8380
  get:
8372
- operationId: listSiteContextTopics
8373
- summary: List all context topics
8381
+ operationId: listSiteTopics
8382
+ summary: List all topics
8374
8383
  tags:
8375
8384
  - site-context
8376
8385
  security:
@@ -8378,28 +8387,24 @@ paths:
8378
8387
  parameters:
8379
8388
  - $ref: "#/components/parameters/organizationId"
8380
8389
  - $ref: "#/components/parameters/siteId"
8381
- - $ref: "#/components/parameters/listPage"
8382
- - $ref: "#/components/parameters/listLimit"
8383
8390
  responses:
8384
8391
  "200":
8385
8392
  description: OK
8386
8393
  content:
8387
8394
  application/json:
8388
8395
  schema:
8389
- allOf:
8390
- - $ref: "#/components/schemas/List"
8391
- - type: object
8392
- required:
8393
- - items
8394
- properties:
8395
- items:
8396
- type: array
8397
- items:
8398
- $ref: "#/components/schemas/ContextTopic"
8399
- "/orgs/{organizationId}/sites/{siteId}/context-topics/{siteContextTopicId}":
8396
+ type: object
8397
+ required:
8398
+ - items
8399
+ properties:
8400
+ items:
8401
+ type: array
8402
+ items:
8403
+ $ref: "#/components/schemas/SiteTopic"
8404
+ "/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}":
8400
8405
  get:
8401
- operationId: getSiteContextTopicById
8402
- summary: Get a context topic
8406
+ operationId: getSiteTopicById
8407
+ summary: Get a topic
8403
8408
  tags:
8404
8409
  - site-context
8405
8410
  security:
@@ -8407,17 +8412,17 @@ paths:
8407
8412
  parameters:
8408
8413
  - $ref: "#/components/parameters/organizationId"
8409
8414
  - $ref: "#/components/parameters/siteId"
8410
- - $ref: "#/components/parameters/siteContextTopicId"
8415
+ - $ref: "#/components/parameters/siteTopicId"
8411
8416
  responses:
8412
8417
  "200":
8413
8418
  description: OK
8414
8419
  content:
8415
8420
  application/json:
8416
8421
  schema:
8417
- $ref: "#/components/schemas/ContextTopic"
8422
+ $ref: "#/components/schemas/SiteTopic"
8418
8423
  patch:
8419
- operationId: updateSiteContextTopicById
8420
- summary: Update a context topic
8424
+ operationId: updateSiteTopicById
8425
+ summary: Update a topic
8421
8426
  tags:
8422
8427
  - site-context
8423
8428
  security:
@@ -8425,7 +8430,7 @@ paths:
8425
8430
  parameters:
8426
8431
  - $ref: "#/components/parameters/organizationId"
8427
8432
  - $ref: "#/components/parameters/siteId"
8428
- - $ref: "#/components/parameters/siteContextTopicId"
8433
+ - $ref: "#/components/parameters/siteTopicId"
8429
8434
  requestBody:
8430
8435
  required: true
8431
8436
  content:
@@ -8443,7 +8448,7 @@ paths:
8443
8448
  content:
8444
8449
  application/json:
8445
8450
  schema:
8446
- $ref: "#/components/schemas/ContextTopic"
8451
+ $ref: "#/components/schemas/SiteTopic"
8447
8452
  "/orgs/{organizationId}/sites/{siteId}/questions":
8448
8453
  get:
8449
8454
  operationId: listSiteQuestions
@@ -8455,6 +8460,11 @@ paths:
8455
8460
  parameters:
8456
8461
  - $ref: "#/components/parameters/organizationId"
8457
8462
  - $ref: "#/components/parameters/siteId"
8463
+ - name: type
8464
+ in: query
8465
+ description: Filter questions by question type.
8466
+ schema:
8467
+ $ref: "#/components/schemas/SiteQuestionType"
8458
8468
  - $ref: "#/components/parameters/listPage"
8459
8469
  - $ref: "#/components/parameters/listLimit"
8460
8470
  responses:
@@ -8528,6 +8538,16 @@ paths:
8528
8538
  description: Filter answers by question relevance.
8529
8539
  schema:
8530
8540
  $ref: "#/components/schemas/SiteQuestionAnswerRelevance"
8541
+ - name: question.type
8542
+ in: query
8543
+ description: Filter answers by question type.
8544
+ schema:
8545
+ $ref: "#/components/schemas/SiteQuestionType"
8546
+ - name: topic
8547
+ in: query
8548
+ description: Filter answers by associated site topic ID.
8549
+ schema:
8550
+ type: string
8531
8551
  - name: thread
8532
8552
  in: query
8533
8553
  description: Filter answers by thread root answer ID. Includes the root answer itself.
@@ -9545,7 +9565,7 @@ paths:
9545
9565
  source:
9546
9566
  $ref: "#/components/schemas/SiteRedirectSourcePath"
9547
9567
  destination:
9548
- $ref: "#/components/schemas/SiteRedirectDestination"
9568
+ $ref: "#/components/schemas/SiteRedirectInputDestination"
9549
9569
  required:
9550
9570
  - source
9551
9571
  - destination
@@ -9556,6 +9576,101 @@ paths:
9556
9576
  application/json:
9557
9577
  schema:
9558
9578
  $ref: "#/components/schemas/SiteRedirect"
9579
+ put:
9580
+ operationId: bulkUpsertSiteRedirects
9581
+ summary: Create or update site redirects in bulk
9582
+ tags:
9583
+ - site-redirects
9584
+ security:
9585
+ - user: []
9586
+ parameters:
9587
+ - $ref: "#/components/parameters/organizationId"
9588
+ - $ref: "#/components/parameters/siteId"
9589
+ requestBody:
9590
+ required: true
9591
+ content:
9592
+ application/json:
9593
+ schema:
9594
+ type: object
9595
+ properties:
9596
+ redirects:
9597
+ type: array
9598
+ minItems: 1
9599
+ maxItems: 500
9600
+ items:
9601
+ type: object
9602
+ properties:
9603
+ source:
9604
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9605
+ destination:
9606
+ $ref: "#/components/schemas/SiteRedirectInputDestination"
9607
+ required:
9608
+ - source
9609
+ - destination
9610
+ required:
9611
+ - redirects
9612
+ responses:
9613
+ "200":
9614
+ description: List of results for each redirect processed.
9615
+ content:
9616
+ application/json:
9617
+ schema:
9618
+ type: object
9619
+ properties:
9620
+ results:
9621
+ type: array
9622
+ items:
9623
+ oneOf:
9624
+ - type: object
9625
+ properties:
9626
+ status:
9627
+ type: string
9628
+ enum:
9629
+ - created
9630
+ description: The redirect was created.
9631
+ source:
9632
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9633
+ id:
9634
+ type: string
9635
+ description: The ID of the created redirect.
9636
+ required:
9637
+ - status
9638
+ - source
9639
+ - id
9640
+ - type: object
9641
+ properties:
9642
+ status:
9643
+ type: string
9644
+ enum:
9645
+ - updated
9646
+ description: The redirect was updated.
9647
+ source:
9648
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9649
+ id:
9650
+ type: string
9651
+ description: The ID of the updated redirect.
9652
+ required:
9653
+ - status
9654
+ - source
9655
+ - id
9656
+ - type: object
9657
+ properties:
9658
+ status:
9659
+ type: string
9660
+ enum:
9661
+ - error
9662
+ description: There was an error processing the redirect.
9663
+ source:
9664
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
9665
+ error:
9666
+ type: string
9667
+ description: The error message.
9668
+ required:
9669
+ - status
9670
+ - source
9671
+ - error
9672
+ required:
9673
+ - results
9559
9674
  get:
9560
9675
  operationId: listSiteRedirects
9561
9676
  summary: List all site redirects
@@ -10620,11 +10735,11 @@ components:
10620
10735
  description: The unique id of the context connection
10621
10736
  schema:
10622
10737
  type: string
10623
- siteContextTopicId:
10624
- name: siteContextTopicId
10738
+ siteTopicId:
10739
+ name: siteTopicId
10625
10740
  in: path
10626
10741
  required: true
10627
- description: The unique id of the context topic
10742
+ description: The unique id of the topic
10628
10743
  schema:
10629
10744
  type: string
10630
10745
  siteQuestionId:
@@ -20329,6 +20444,10 @@ components:
20329
20444
  type: object
20330
20445
  description: Search result representing a space.
20331
20446
  properties:
20447
+ type:
20448
+ type: string
20449
+ enum:
20450
+ - space
20332
20451
  id:
20333
20452
  type: string
20334
20453
  title:
@@ -20338,6 +20457,7 @@ components:
20338
20457
  items:
20339
20458
  $ref: "#/components/schemas/SearchPageResult"
20340
20459
  required:
20460
+ - type
20341
20461
  - id
20342
20462
  - title
20343
20463
  - pages
@@ -22685,6 +22805,32 @@ components:
22685
22805
  type: string
22686
22806
  enum:
22687
22807
  - all
22808
+ SearchRecordResult:
22809
+ type: object
22810
+ description: Search result representing a site context record.
22811
+ properties:
22812
+ type:
22813
+ type: string
22814
+ enum:
22815
+ - record
22816
+ id:
22817
+ type: string
22818
+ description: The ID of the context record.
22819
+ title:
22820
+ type: string
22821
+ description: The title of the record.
22822
+ description:
22823
+ type: string
22824
+ description: The description of the record.
22825
+ url:
22826
+ type: string
22827
+ format: uri
22828
+ description: URL of the record in the source system.
22829
+ required:
22830
+ - type
22831
+ - id
22832
+ - title
22833
+ - url
22688
22834
  ContextRecordType:
22689
22835
  type: string
22690
22836
  enum:
@@ -22926,73 +23072,6 @@ components:
22926
23072
  - usageSettings
22927
23073
  - urls
22928
23074
  - $ref: "#/components/schemas/ContextConnectorSetup"
22929
- ContextTopic:
22930
- type: object
22931
- properties:
22932
- object:
22933
- type: string
22934
- enum:
22935
- - context-topic
22936
- id:
22937
- type: string
22938
- description: The ID of the topic
22939
- label:
22940
- type: string
22941
- description: The label of the topic
22942
- createdAt:
22943
- $ref: "#/components/schemas/Timestamp"
22944
- updatedAt:
22945
- $ref: "#/components/schemas/Timestamp"
22946
- icon:
22947
- $ref: "#/components/schemas/Icon"
22948
- summary:
22949
- $ref: "#/components/schemas/JSONDocument"
22950
- usageSettings:
22951
- $ref: "#/components/schemas/ContextUsageSettings"
22952
- weeklyPulse:
22953
- type: array
22954
- minItems: 13
22955
- maxItems: 13
22956
- description: The weekly pulse of the records for the past 3 months
22957
- items:
22958
- type: number
22959
- connectors:
22960
- type: object
22961
- additionalProperties:
22962
- type: number
22963
- description: The number of records for the connector
22964
- stats:
22965
- type: object
22966
- description: The stats of the topic
22967
- properties:
22968
- records:
22969
- type: number
22970
- description: The number of records in the topic
22971
- required:
22972
- - records
22973
- urls:
22974
- type: object
22975
- description: URLs associated with the topic
22976
- properties:
22977
- location:
22978
- type: string
22979
- description: URL of the topic in the API
22980
- format: uri
22981
- required:
22982
- - location
22983
- required:
22984
- - object
22985
- - id
22986
- - label
22987
- - summary
22988
- - icon
22989
- - usageSettings
22990
- - connectors
22991
- - stats
22992
- - weeklyPulse
22993
- - createdAt
22994
- - updatedAt
22995
- - urls
22996
23075
  SiteQuestionStatsFeedback:
22997
23076
  type: object
22998
23077
  description: Aggregated feedback for answers linked to a site question.
@@ -23042,6 +23121,90 @@ components:
23042
23121
  - answers
23043
23122
  - feedback
23044
23123
  - answered
23124
+ SiteTopic:
23125
+ type: object
23126
+ properties:
23127
+ object:
23128
+ type: string
23129
+ enum:
23130
+ - context-topic
23131
+ id:
23132
+ type: string
23133
+ description: The ID of the topic
23134
+ label:
23135
+ type: string
23136
+ description: The label of the topic
23137
+ parent:
23138
+ type: object
23139
+ description: The parent topic when this topic is nested under another one
23140
+ properties:
23141
+ id:
23142
+ type: string
23143
+ description: The ID of the parent topic
23144
+ label:
23145
+ type: string
23146
+ description: The label of the parent topic
23147
+ required:
23148
+ - id
23149
+ - label
23150
+ createdAt:
23151
+ $ref: "#/components/schemas/Timestamp"
23152
+ updatedAt:
23153
+ $ref: "#/components/schemas/Timestamp"
23154
+ icon:
23155
+ $ref: "#/components/schemas/Icon"
23156
+ summary:
23157
+ $ref: "#/components/schemas/JSONDocument"
23158
+ usageSettings:
23159
+ $ref: "#/components/schemas/ContextUsageSettings"
23160
+ weeklyPulse:
23161
+ type: array
23162
+ minItems: 13
23163
+ maxItems: 13
23164
+ description: The weekly pulse of related question answers for the past 3 months
23165
+ items:
23166
+ type: number
23167
+ pages:
23168
+ type: number
23169
+ description: The number of pages associated with the topic
23170
+ records:
23171
+ type: number
23172
+ description: The number of records in the topic
23173
+ questions:
23174
+ $ref: "#/components/schemas/SiteQuestionStats"
23175
+ urls:
23176
+ type: object
23177
+ description: URLs associated with the topic
23178
+ properties:
23179
+ location:
23180
+ type: string
23181
+ description: URL of the topic in the API
23182
+ format: uri
23183
+ required:
23184
+ - location
23185
+ required:
23186
+ - object
23187
+ - id
23188
+ - label
23189
+ - summary
23190
+ - icon
23191
+ - usageSettings
23192
+ - pages
23193
+ - records
23194
+ - questions
23195
+ - weeklyPulse
23196
+ - createdAt
23197
+ - updatedAt
23198
+ - urls
23199
+ SiteQuestionType:
23200
+ type: string
23201
+ description: Type classification of the user question.
23202
+ enum:
23203
+ - exploring
23204
+ - how-to
23205
+ - troubleshooting
23206
+ - reference
23207
+ - unknown
23045
23208
  SiteQuestion:
23046
23209
  type: object
23047
23210
  properties:
@@ -23055,6 +23218,8 @@ components:
23055
23218
  question:
23056
23219
  type: string
23057
23220
  description: Canonical text for the unique site question.
23221
+ type:
23222
+ $ref: "#/components/schemas/SiteQuestionType"
23058
23223
  createdAt:
23059
23224
  $ref: "#/components/schemas/Timestamp"
23060
23225
  stats:
@@ -23073,6 +23238,7 @@ components:
23073
23238
  - object
23074
23239
  - id
23075
23240
  - question
23241
+ - type
23076
23242
  - createdAt
23077
23243
  - stats
23078
23244
  - urls
@@ -23122,8 +23288,21 @@ components:
23122
23288
  type: string
23123
23289
  description: The ID of the site question answer.
23124
23290
  question:
23125
- type: string
23126
- description: The ID of the parent site question.
23291
+ type: object
23292
+ properties:
23293
+ id:
23294
+ type: string
23295
+ description: The ID of the parent site question.
23296
+ type:
23297
+ $ref: "#/components/schemas/SiteQuestionType"
23298
+ required:
23299
+ - id
23300
+ - type
23301
+ topics:
23302
+ type: array
23303
+ description: The IDs of the associated site topics.
23304
+ items:
23305
+ type: string
23127
23306
  input:
23128
23307
  type: object
23129
23308
  properties:
@@ -23188,6 +23367,7 @@ components:
23188
23367
  - object
23189
23368
  - id
23190
23369
  - question
23370
+ - topics
23191
23371
  - input
23192
23372
  - responseId
23193
23373
  - language
@@ -26062,6 +26242,27 @@ components:
26062
26242
  - id
26063
26243
  - source
26064
26244
  - destination
26245
+ SiteRedirectInputDestinationPath:
26246
+ type: object
26247
+ properties:
26248
+ kind:
26249
+ type: string
26250
+ enum:
26251
+ - path
26252
+ spaceId:
26253
+ type: string
26254
+ description: Unique identifier for the space containing the page referenced by the path.
26255
+ path:
26256
+ type: string
26257
+ description: Path to the page within the space revision to resolve.
26258
+ required:
26259
+ - kind
26260
+ - spaceId
26261
+ - path
26262
+ SiteRedirectInputDestination:
26263
+ oneOf:
26264
+ - $ref: "#/components/schemas/SiteRedirectDestination"
26265
+ - $ref: "#/components/schemas/SiteRedirectInputDestinationPath"
26065
26266
  SiteMcpServerName:
26066
26267
  type: string
26067
26268
  description: Name of the MCP server