@gitbook/api 0.90.0 → 0.91.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 +12 -22
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/spec/openapi.json +36 -113
- package/spec/openapi.yaml +31 -78
package/dist/client.d.ts
CHANGED
|
@@ -660,39 +660,29 @@ export interface JSONDocument {
|
|
|
660
660
|
export type Document = MarkdownDocument | {
|
|
661
661
|
document: JSONDocument;
|
|
662
662
|
} | object;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
663
|
+
/**
|
|
664
|
+
* Page source
|
|
665
|
+
* The source points to a page in a space.
|
|
666
|
+
*/
|
|
667
|
+
export interface SearchAIAnswerSource {
|
|
666
668
|
type: 'page';
|
|
669
|
+
/** Short explanation of how the source was used to answer. */
|
|
670
|
+
reason?: string;
|
|
671
|
+
/** The page ID of the source. */
|
|
667
672
|
page: string;
|
|
673
|
+
/** The revision ID where the page was extracted from. */
|
|
668
674
|
revision: string;
|
|
675
|
+
/** The space ID owning the page. */
|
|
669
676
|
space: string;
|
|
677
|
+
/** The IDs of the sections of the page that were used to answer the question. */
|
|
670
678
|
sections: string[];
|
|
671
|
-
}
|
|
672
|
-
type: 'capture';
|
|
673
|
-
/** ID of the capture */
|
|
674
|
-
captureId: string;
|
|
675
|
-
/** Source of the capture */
|
|
676
|
-
source: string;
|
|
677
|
-
});
|
|
679
|
+
}
|
|
678
680
|
/** Answer from AI for a question asked on a content. */
|
|
679
681
|
export interface SearchAIAnswer {
|
|
680
|
-
/** @deprecated */
|
|
681
|
-
text?: string;
|
|
682
682
|
answer?: Document;
|
|
683
683
|
followupQuestions: string[];
|
|
684
684
|
/** The sources used to generate the answer. */
|
|
685
685
|
sources: SearchAIAnswerSource[];
|
|
686
|
-
/**
|
|
687
|
-
* The pages used to generate the answer. Deprecated - use sources instead.
|
|
688
|
-
* @deprecated
|
|
689
|
-
*/
|
|
690
|
-
pages: {
|
|
691
|
-
page: string;
|
|
692
|
-
revision: string;
|
|
693
|
-
space: string;
|
|
694
|
-
sections: string[];
|
|
695
|
-
}[];
|
|
696
686
|
}
|
|
697
687
|
export interface SearchAIQuery {
|
|
698
688
|
query: string;
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -20694,98 +20694,52 @@
|
|
|
20694
20694
|
]
|
|
20695
20695
|
},
|
|
20696
20696
|
"SearchAIAnswerSource": {
|
|
20697
|
-
"
|
|
20698
|
-
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
"capture"
|
|
20706
|
-
]
|
|
20707
|
-
}
|
|
20708
|
-
},
|
|
20709
|
-
"required": [
|
|
20710
|
-
"type"
|
|
20697
|
+
"type": "object",
|
|
20698
|
+
"title": "Page source",
|
|
20699
|
+
"description": "The source points to a page in a space.",
|
|
20700
|
+
"properties": {
|
|
20701
|
+
"type": {
|
|
20702
|
+
"type": "string",
|
|
20703
|
+
"enum": [
|
|
20704
|
+
"page"
|
|
20711
20705
|
]
|
|
20712
20706
|
},
|
|
20713
|
-
{
|
|
20714
|
-
"
|
|
20715
|
-
|
|
20707
|
+
"reason": {
|
|
20708
|
+
"type": "string",
|
|
20709
|
+
"description": "Short explanation of how the source was used to answer."
|
|
20710
|
+
},
|
|
20711
|
+
"page": {
|
|
20712
|
+
"type": "string",
|
|
20713
|
+
"description": "The page ID of the source."
|
|
20714
|
+
},
|
|
20715
|
+
"revision": {
|
|
20716
|
+
"type": "string",
|
|
20717
|
+
"description": "The revision ID where the page was extracted from."
|
|
20718
|
+
},
|
|
20719
|
+
"space": {
|
|
20720
|
+
"type": "string",
|
|
20721
|
+
"description": "The space ID owning the page."
|
|
20722
|
+
},
|
|
20723
|
+
"sections": {
|
|
20724
|
+
"type": "array",
|
|
20725
|
+
"items": {
|
|
20726
|
+
"type": "string"
|
|
20716
20727
|
},
|
|
20717
|
-
"
|
|
20718
|
-
{
|
|
20719
|
-
"type": "object",
|
|
20720
|
-
"title": "Page",
|
|
20721
|
-
"properties": {
|
|
20722
|
-
"type": {
|
|
20723
|
-
"type": "string",
|
|
20724
|
-
"enum": [
|
|
20725
|
-
"page"
|
|
20726
|
-
]
|
|
20727
|
-
},
|
|
20728
|
-
"page": {
|
|
20729
|
-
"type": "string"
|
|
20730
|
-
},
|
|
20731
|
-
"revision": {
|
|
20732
|
-
"type": "string"
|
|
20733
|
-
},
|
|
20734
|
-
"space": {
|
|
20735
|
-
"type": "string"
|
|
20736
|
-
},
|
|
20737
|
-
"sections": {
|
|
20738
|
-
"type": "array",
|
|
20739
|
-
"items": {
|
|
20740
|
-
"type": "string"
|
|
20741
|
-
}
|
|
20742
|
-
}
|
|
20743
|
-
},
|
|
20744
|
-
"required": [
|
|
20745
|
-
"type",
|
|
20746
|
-
"page",
|
|
20747
|
-
"revision",
|
|
20748
|
-
"space",
|
|
20749
|
-
"sections"
|
|
20750
|
-
]
|
|
20751
|
-
},
|
|
20752
|
-
{
|
|
20753
|
-
"type": "object",
|
|
20754
|
-
"title": "Snippet",
|
|
20755
|
-
"properties": {
|
|
20756
|
-
"type": {
|
|
20757
|
-
"type": "string",
|
|
20758
|
-
"enum": [
|
|
20759
|
-
"capture"
|
|
20760
|
-
]
|
|
20761
|
-
},
|
|
20762
|
-
"captureId": {
|
|
20763
|
-
"type": "string",
|
|
20764
|
-
"description": "ID of the capture"
|
|
20765
|
-
},
|
|
20766
|
-
"source": {
|
|
20767
|
-
"type": "string",
|
|
20768
|
-
"description": "Source of the capture"
|
|
20769
|
-
}
|
|
20770
|
-
},
|
|
20771
|
-
"required": [
|
|
20772
|
-
"type",
|
|
20773
|
-
"captureId",
|
|
20774
|
-
"source"
|
|
20775
|
-
]
|
|
20776
|
-
}
|
|
20777
|
-
]
|
|
20728
|
+
"description": "The IDs of the sections of the page that were used to answer the question."
|
|
20778
20729
|
}
|
|
20730
|
+
},
|
|
20731
|
+
"required": [
|
|
20732
|
+
"type",
|
|
20733
|
+
"page",
|
|
20734
|
+
"revision",
|
|
20735
|
+
"space",
|
|
20736
|
+
"sections"
|
|
20779
20737
|
]
|
|
20780
20738
|
},
|
|
20781
20739
|
"SearchAIAnswer": {
|
|
20782
20740
|
"type": "object",
|
|
20783
20741
|
"description": "Answer from AI for a question asked on a content.",
|
|
20784
20742
|
"properties": {
|
|
20785
|
-
"text": {
|
|
20786
|
-
"deprecated": true,
|
|
20787
|
-
"type": "string"
|
|
20788
|
-
},
|
|
20789
20743
|
"answer": {
|
|
20790
20744
|
"$ref": "#/components/schemas/Document"
|
|
20791
20745
|
},
|
|
@@ -20801,37 +20755,6 @@
|
|
|
20801
20755
|
"items": {
|
|
20802
20756
|
"$ref": "#/components/schemas/SearchAIAnswerSource"
|
|
20803
20757
|
}
|
|
20804
|
-
},
|
|
20805
|
-
"pages": {
|
|
20806
|
-
"type": "array",
|
|
20807
|
-
"deprecated": true,
|
|
20808
|
-
"description": "The pages used to generate the answer. Deprecated - use sources instead.",
|
|
20809
|
-
"items": {
|
|
20810
|
-
"type": "object",
|
|
20811
|
-
"properties": {
|
|
20812
|
-
"page": {
|
|
20813
|
-
"type": "string"
|
|
20814
|
-
},
|
|
20815
|
-
"revision": {
|
|
20816
|
-
"type": "string"
|
|
20817
|
-
},
|
|
20818
|
-
"space": {
|
|
20819
|
-
"type": "string"
|
|
20820
|
-
},
|
|
20821
|
-
"sections": {
|
|
20822
|
-
"type": "array",
|
|
20823
|
-
"items": {
|
|
20824
|
-
"type": "string"
|
|
20825
|
-
}
|
|
20826
|
-
}
|
|
20827
|
-
},
|
|
20828
|
-
"required": [
|
|
20829
|
-
"page",
|
|
20830
|
-
"revision",
|
|
20831
|
-
"space",
|
|
20832
|
-
"sections"
|
|
20833
|
-
]
|
|
20834
|
-
}
|
|
20835
20758
|
}
|
|
20836
20759
|
},
|
|
20837
20760
|
"required": [
|
package/spec/openapi.yaml
CHANGED
|
@@ -11928,66 +11928,41 @@ components:
|
|
|
11928
11928
|
properties: {}
|
|
11929
11929
|
additionalProperties: false
|
|
11930
11930
|
SearchAIAnswerSource:
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
- type
|
|
11963
|
-
- page
|
|
11964
|
-
- revision
|
|
11965
|
-
- space
|
|
11966
|
-
- sections
|
|
11967
|
-
- type: object
|
|
11968
|
-
title: Snippet
|
|
11969
|
-
properties:
|
|
11970
|
-
type:
|
|
11971
|
-
type: string
|
|
11972
|
-
enum:
|
|
11973
|
-
- capture
|
|
11974
|
-
captureId:
|
|
11975
|
-
type: string
|
|
11976
|
-
description: ID of the capture
|
|
11977
|
-
source:
|
|
11978
|
-
type: string
|
|
11979
|
-
description: Source of the capture
|
|
11980
|
-
required:
|
|
11981
|
-
- type
|
|
11982
|
-
- captureId
|
|
11983
|
-
- source
|
|
11931
|
+
type: object
|
|
11932
|
+
title: Page source
|
|
11933
|
+
description: The source points to a page in a space.
|
|
11934
|
+
properties:
|
|
11935
|
+
type:
|
|
11936
|
+
type: string
|
|
11937
|
+
enum:
|
|
11938
|
+
- page
|
|
11939
|
+
reason:
|
|
11940
|
+
type: string
|
|
11941
|
+
description: Short explanation of how the source was used to answer.
|
|
11942
|
+
page:
|
|
11943
|
+
type: string
|
|
11944
|
+
description: The page ID of the source.
|
|
11945
|
+
revision:
|
|
11946
|
+
type: string
|
|
11947
|
+
description: The revision ID where the page was extracted from.
|
|
11948
|
+
space:
|
|
11949
|
+
type: string
|
|
11950
|
+
description: The space ID owning the page.
|
|
11951
|
+
sections:
|
|
11952
|
+
type: array
|
|
11953
|
+
items:
|
|
11954
|
+
type: string
|
|
11955
|
+
description: The IDs of the sections of the page that were used to answer the question.
|
|
11956
|
+
required:
|
|
11957
|
+
- type
|
|
11958
|
+
- page
|
|
11959
|
+
- revision
|
|
11960
|
+
- space
|
|
11961
|
+
- sections
|
|
11984
11962
|
SearchAIAnswer:
|
|
11985
11963
|
type: object
|
|
11986
11964
|
description: Answer from AI for a question asked on a content.
|
|
11987
11965
|
properties:
|
|
11988
|
-
text:
|
|
11989
|
-
deprecated: true
|
|
11990
|
-
type: string
|
|
11991
11966
|
answer:
|
|
11992
11967
|
$ref: "#/components/schemas/Document"
|
|
11993
11968
|
followupQuestions:
|
|
@@ -11999,28 +11974,6 @@ components:
|
|
|
11999
11974
|
description: The sources used to generate the answer.
|
|
12000
11975
|
items:
|
|
12001
11976
|
$ref: "#/components/schemas/SearchAIAnswerSource"
|
|
12002
|
-
pages:
|
|
12003
|
-
type: array
|
|
12004
|
-
deprecated: true
|
|
12005
|
-
description: The pages used to generate the answer. Deprecated - use sources instead.
|
|
12006
|
-
items:
|
|
12007
|
-
type: object
|
|
12008
|
-
properties:
|
|
12009
|
-
page:
|
|
12010
|
-
type: string
|
|
12011
|
-
revision:
|
|
12012
|
-
type: string
|
|
12013
|
-
space:
|
|
12014
|
-
type: string
|
|
12015
|
-
sections:
|
|
12016
|
-
type: array
|
|
12017
|
-
items:
|
|
12018
|
-
type: string
|
|
12019
|
-
required:
|
|
12020
|
-
- page
|
|
12021
|
-
- revision
|
|
12022
|
-
- space
|
|
12023
|
-
- sections
|
|
12024
11977
|
required:
|
|
12025
11978
|
- pages
|
|
12026
11979
|
- sources
|