@gitbook/api 0.80.1 → 0.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -974,7 +974,7 @@ export type Embed = {
974
974
  export interface SearchAIAnswerStream {
975
975
  type: 'answer';
976
976
  /** Answer from AI for a question asked on a content. */
977
- answer?: SearchAIAnswer;
977
+ answer: SearchAIAnswer;
978
978
  }
979
979
  export interface SearchAIRecommendedQuestionStream {
980
980
  question: string;
@@ -9815,6 +9815,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9815
9815
  streamAskInSite: (organizationId: string, siteId: string, data: {
9816
9816
  /** @maxLength 512 */
9817
9817
  question: string;
9818
+ /** You may optionally provide additional information about the context of the question. This doesn't affect the scope of the search, but GitBook may use this information to provide a better answer. Generally speaking, you should provide as much context as possible. */
9819
+ context?: {
9820
+ siteSpaceId?: string;
9821
+ };
9818
9822
  scope: SiteSearchScope;
9819
9823
  }, query?: {
9820
9824
  /** Output format for the content. */
package/dist/index.cjs CHANGED
@@ -247,7 +247,7 @@ module.exports = __toCommonJS(src_exports);
247
247
 
248
248
  // package.json
249
249
  var name = "@gitbook/api";
250
- var version = "0.80.1";
250
+ var version = "0.81.0";
251
251
 
252
252
  // src/client.ts
253
253
  var import_event_iterator = __toESM(require_node(), 1);
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.80.1";
175
+ var version = "0.81.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.80.1",
7
+ "version": "0.81.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -13303,6 +13303,15 @@
13303
13303
  "type": "string",
13304
13304
  "maxLength": 512
13305
13305
  },
13306
+ "context": {
13307
+ "type": "object",
13308
+ "description": "You may optionally provide additional information about the context of the question. This doesn't affect the scope of the search, but GitBook may use this information to provide a better answer. Generally speaking, you should provide as much context as possible.\n",
13309
+ "properties": {
13310
+ "siteSpaceId": {
13311
+ "type": "string"
13312
+ }
13313
+ }
13314
+ },
13306
13315
  "scope": {
13307
13316
  "$ref": "#/components/schemas/SiteSearchScope"
13308
13317
  }
@@ -20012,7 +20021,8 @@
20012
20021
  }
20013
20022
  },
20014
20023
  "required": [
20015
- "type"
20024
+ "type",
20025
+ "answer"
20016
20026
  ]
20017
20027
  },
20018
20028
  "SearchAIRecommendedQuestionStream": {
package/spec/openapi.yaml CHANGED
@@ -7420,6 +7420,13 @@ paths:
7420
7420
  question:
7421
7421
  type: string
7422
7422
  maxLength: 512
7423
+ context:
7424
+ type: object
7425
+ description: |
7426
+ You may optionally provide additional information about the context of the question. This doesn't affect the scope of the search, but GitBook may use this information to provide a better answer. Generally speaking, you should provide as much context as possible.
7427
+ properties:
7428
+ siteSpaceId:
7429
+ type: string
7423
7430
  scope:
7424
7431
  $ref: "#/components/schemas/SiteSearchScope"
7425
7432
  responses:
@@ -11636,6 +11643,7 @@ components:
11636
11643
  $ref: "#/components/schemas/SearchAIAnswer"
11637
11644
  required:
11638
11645
  - type
11646
+ - answer
11639
11647
  SearchAIRecommendedQuestionStream:
11640
11648
  type: object
11641
11649
  properties: