@gitbook/api 0.178.0 → 0.180.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 +422 -11
- package/dist/constants.d.ts +5 -2
- package/dist/index.cjs +104 -3
- package/dist/index.js +98 -3
- package/package.json +1 -1
- package/spec/openapi.json +930 -21
- package/spec/openapi.yaml +597 -13
package/dist/client.d.ts
CHANGED
|
@@ -82,6 +82,16 @@ export declare enum RevisionSemanticChangeType {
|
|
|
82
82
|
export declare enum GitBookUsers {
|
|
83
83
|
GitbookAgent = "gitbook:agent"
|
|
84
84
|
}
|
|
85
|
+
/** Which side should be treated as the source of truth when Git Sync is configured. */
|
|
86
|
+
export declare enum GitSyncInstallationPriority {
|
|
87
|
+
Git = "git",
|
|
88
|
+
Gitbook = "gitbook"
|
|
89
|
+
}
|
|
90
|
+
/** The provider of the Git Sync installation. */
|
|
91
|
+
export declare enum GitSyncInstallationProvider {
|
|
92
|
+
Github = "github",
|
|
93
|
+
Gitlab = "gitlab"
|
|
94
|
+
}
|
|
85
95
|
/** The Cloudflare Hostname TLS validation method */
|
|
86
96
|
export declare enum CloudflareHostnameTLSValidationMethod {
|
|
87
97
|
Http = "http",
|
|
@@ -156,6 +166,8 @@ export declare enum SiteInsightsVisitorBot {
|
|
|
156
166
|
Facebookbot = "facebookbot",
|
|
157
167
|
Applebot = "applebot",
|
|
158
168
|
Chatgpt = "chatgpt",
|
|
169
|
+
Openai = "openai",
|
|
170
|
+
Claude = "claude",
|
|
159
171
|
Anthropic = "anthropic",
|
|
160
172
|
Gemini = "gemini",
|
|
161
173
|
Perplexity = "perplexity",
|
|
@@ -169,7 +181,9 @@ export declare enum SiteInsightsVisitorBot {
|
|
|
169
181
|
Youbot = "youbot",
|
|
170
182
|
Cursor = "cursor",
|
|
171
183
|
Vscode = "vscode",
|
|
172
|
-
ClaudeCode = "claude-code"
|
|
184
|
+
ClaudeCode = "claude-code",
|
|
185
|
+
Codex = "codex",
|
|
186
|
+
Opencode = "opencode"
|
|
173
187
|
}
|
|
174
188
|
export declare enum SiteInsightsVisitorOS {
|
|
175
189
|
Windows = "windows",
|
|
@@ -936,6 +950,7 @@ export declare enum TextAlignment {
|
|
|
936
950
|
Center = "center",
|
|
937
951
|
End = "end"
|
|
938
952
|
}
|
|
953
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
939
954
|
export declare enum DocumentTextColor {
|
|
940
955
|
Default = "default",
|
|
941
956
|
Green = "green",
|
|
@@ -944,11 +959,15 @@ export declare enum DocumentTextColor {
|
|
|
944
959
|
Orange = "orange",
|
|
945
960
|
Yellow = "yellow",
|
|
946
961
|
Purple = "purple",
|
|
962
|
+
Pink = "pink",
|
|
963
|
+
Violet = "violet",
|
|
964
|
+
Cyan = "cyan",
|
|
947
965
|
Primary = "$primary",
|
|
948
966
|
Info = "$info",
|
|
949
967
|
Success = "$success",
|
|
950
968
|
Warning = "$warning",
|
|
951
|
-
Danger = "$danger"
|
|
969
|
+
Danger = "$danger",
|
|
970
|
+
Tint = "$tint"
|
|
952
971
|
}
|
|
953
972
|
/**
|
|
954
973
|
* "The role of a member in an organization.
|
|
@@ -973,6 +992,11 @@ export declare enum GitSyncProvider {
|
|
|
973
992
|
Gitlab = "gitlab",
|
|
974
993
|
GithubLegacy = "github-legacy"
|
|
975
994
|
}
|
|
995
|
+
export declare enum GitSyncInstallationStatus {
|
|
996
|
+
Unauthenticated = "unauthenticated",
|
|
997
|
+
Active = "active",
|
|
998
|
+
Pending = "pending"
|
|
999
|
+
}
|
|
976
1000
|
export declare enum TranslationLanguage {
|
|
977
1001
|
En = "en",
|
|
978
1002
|
Fr = "fr",
|
|
@@ -984,6 +1008,7 @@ export declare enum TranslationLanguage {
|
|
|
984
1008
|
Ru = "ru",
|
|
985
1009
|
Ja = "ja",
|
|
986
1010
|
Zh = "zh",
|
|
1011
|
+
ZhTw = "zh-tw",
|
|
987
1012
|
Yue = "yue",
|
|
988
1013
|
Ko = "ko",
|
|
989
1014
|
Ar = "ar",
|
|
@@ -1042,7 +1067,7 @@ export declare enum ContentVisibility {
|
|
|
1042
1067
|
/** Data passed through a realtime channel */
|
|
1043
1068
|
export type APIChannelData = APIChannelGitSyncOperationData | APIChannelSpaceContentRefsData | APIChannelChangeRequestContentRefsData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
|
|
1044
1069
|
/** Channel to subscribe to for realtime updates. */
|
|
1045
|
-
export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
|
|
1070
|
+
export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
|
|
1046
1071
|
export type PublishedContentRedirect = {
|
|
1047
1072
|
/** Type of target for the redirect */
|
|
1048
1073
|
target: "application" | "content";
|
|
@@ -1192,10 +1217,16 @@ export type MergeRulesSpaceConfiguration = MergeRulesConfigurationInherit | Merg
|
|
|
1192
1217
|
export interface GitSyncState {
|
|
1193
1218
|
/** Repository name. */
|
|
1194
1219
|
repoName?: string;
|
|
1220
|
+
installationStatus?: GitSyncInstallationStatus;
|
|
1195
1221
|
/** The provider of the Git Sync installation. */
|
|
1196
1222
|
installationProvider?: GitSyncProvider;
|
|
1197
|
-
/**
|
|
1223
|
+
/**
|
|
1224
|
+
* The integration name providing the Git Sync.
|
|
1225
|
+
* @deprecated
|
|
1226
|
+
*/
|
|
1198
1227
|
integration?: string;
|
|
1228
|
+
/** The ID of the Git Sync installation. */
|
|
1229
|
+
installationId?: string;
|
|
1199
1230
|
/** The URL to the repository tree, used when rendering public content. */
|
|
1200
1231
|
url?: string;
|
|
1201
1232
|
/** When the Git provider details were last updated */
|
|
@@ -1586,7 +1617,9 @@ export interface DocumentMarkColor {
|
|
|
1586
1617
|
object: "mark";
|
|
1587
1618
|
type: "color";
|
|
1588
1619
|
data: {
|
|
1620
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
1589
1621
|
text: DocumentTextColor;
|
|
1622
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
1590
1623
|
background: DocumentTextColor;
|
|
1591
1624
|
};
|
|
1592
1625
|
}
|
|
@@ -1704,6 +1737,7 @@ export interface DocumentInlineIcon {
|
|
|
1704
1737
|
key?: string;
|
|
1705
1738
|
data: {
|
|
1706
1739
|
icon: string;
|
|
1740
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
1707
1741
|
color?: DocumentTextColor;
|
|
1708
1742
|
};
|
|
1709
1743
|
isVoid: true;
|
|
@@ -2672,6 +2706,7 @@ export type RevisionTag = {
|
|
|
2672
2706
|
slug: string;
|
|
2673
2707
|
/** Display label for the tag. Can be renamed and differ from the slug. */
|
|
2674
2708
|
label: string;
|
|
2709
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
2675
2710
|
color: DocumentTextColor;
|
|
2676
2711
|
} & ({
|
|
2677
2712
|
/** Unicode codepoint or character of the emoji */
|
|
@@ -2821,6 +2856,8 @@ export type RevisionTypeUpdate = RevisionBase & {
|
|
|
2821
2856
|
export type RevisionTypeComputed = RevisionBase & {
|
|
2822
2857
|
/** Virtual revision, computed from a source revision */
|
|
2823
2858
|
type: "computed";
|
|
2859
|
+
/** ID of the non-computed revision used to compute this revision. */
|
|
2860
|
+
sourceRevision: string;
|
|
2824
2861
|
/** The change request the source revision was merged from, when the computed revision is derived from a merge revision. */
|
|
2825
2862
|
mergedFrom?: ChangeRequest;
|
|
2826
2863
|
};
|
|
@@ -5664,6 +5701,8 @@ export interface ContentImportRun {
|
|
|
5664
5701
|
completedAt?: Timestamp;
|
|
5665
5702
|
/** Status of the import */
|
|
5666
5703
|
status: "pending" | "in-progress" | "completed" | "failed" | "cancelled";
|
|
5704
|
+
/** Reason for the import failure when `status` is `failed`. */
|
|
5705
|
+
reason?: string;
|
|
5667
5706
|
/** Pages included in the import */
|
|
5668
5707
|
pages?: {
|
|
5669
5708
|
/** ID of page */
|
|
@@ -6135,6 +6174,13 @@ export interface SearchRecordResult {
|
|
|
6135
6174
|
*/
|
|
6136
6175
|
url: string;
|
|
6137
6176
|
}
|
|
6177
|
+
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
6178
|
+
export interface SiteInsightsSession {
|
|
6179
|
+
/** GitBook's unique identifier of the visitor. */
|
|
6180
|
+
visitorId: string;
|
|
6181
|
+
/** GitBook's unique identifier of the visitor's session. */
|
|
6182
|
+
sessionId: string;
|
|
6183
|
+
}
|
|
6138
6184
|
/** Integration source */
|
|
6139
6185
|
export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom";
|
|
6140
6186
|
/**
|
|
@@ -6541,13 +6587,6 @@ export type SiteQuestionAnswerSourceRecord = SiteQuestionAnswerSourceBase & {
|
|
|
6541
6587
|
/** Integration source */
|
|
6542
6588
|
connector?: ContextConnector;
|
|
6543
6589
|
};
|
|
6544
|
-
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
6545
|
-
export interface SiteInsightsSession {
|
|
6546
|
-
/** GitBook's unique identifier of the visitor. */
|
|
6547
|
-
visitorId: string;
|
|
6548
|
-
/** GitBook's unique identifier of the visitor's session. */
|
|
6549
|
-
sessionId: string;
|
|
6550
|
-
}
|
|
6551
6590
|
export interface SiteQuestionAnswer {
|
|
6552
6591
|
object: "site-question-answer";
|
|
6553
6592
|
/** The ID of the site question answer. */
|
|
@@ -6693,24 +6732,32 @@ export interface AIToolCallEditPage {
|
|
|
6693
6732
|
tool: "editPage";
|
|
6694
6733
|
/** The ID of the space being edited. */
|
|
6695
6734
|
spaceId: string;
|
|
6735
|
+
/** The base revision ID used to compare the page change in the current conversation. */
|
|
6736
|
+
baseRevisionId: string;
|
|
6696
6737
|
page: ChangedRevisionPage;
|
|
6697
6738
|
}
|
|
6698
6739
|
export interface AIToolCallCreatePage {
|
|
6699
6740
|
tool: "createPage";
|
|
6700
6741
|
/** The ID of the space being edited. */
|
|
6701
6742
|
spaceId: string;
|
|
6743
|
+
/** The base revision ID used to compare the page change in the current conversation. */
|
|
6744
|
+
baseRevisionId: string;
|
|
6702
6745
|
page: ChangedRevisionPage;
|
|
6703
6746
|
}
|
|
6704
6747
|
export interface AIToolCallDeletePage {
|
|
6705
6748
|
tool: "deletePage";
|
|
6706
6749
|
/** The ID of the space being edited. */
|
|
6707
6750
|
spaceId: string;
|
|
6751
|
+
/** The base revision ID used to compare the page deletion in the current conversation. */
|
|
6752
|
+
baseRevisionId: string;
|
|
6708
6753
|
page: ChangedRevisionPage;
|
|
6709
6754
|
}
|
|
6710
6755
|
export interface AIToolCallRenamePage {
|
|
6711
6756
|
tool: "renamePage";
|
|
6712
6757
|
/** The ID of the space being edited. */
|
|
6713
6758
|
spaceId: string;
|
|
6759
|
+
/** The base revision ID used to compare the page rename in the current conversation. */
|
|
6760
|
+
baseRevisionId: string;
|
|
6714
6761
|
page: ChangedRevisionPage;
|
|
6715
6762
|
/** The new title of the page. */
|
|
6716
6763
|
title: string;
|
|
@@ -6719,6 +6766,8 @@ export interface AIToolCallMovePage {
|
|
|
6719
6766
|
tool: "movePage";
|
|
6720
6767
|
/** The ID of the space being edited. */
|
|
6721
6768
|
spaceId: string;
|
|
6769
|
+
/** The base revision ID used to compare the page move in the current conversation. */
|
|
6770
|
+
baseRevisionId: string;
|
|
6722
6771
|
page: ChangedRevisionPage;
|
|
6723
6772
|
to?: ChangedRevisionPage;
|
|
6724
6773
|
/**
|
|
@@ -6744,12 +6793,16 @@ export interface AIToolCallCreateReusableContent {
|
|
|
6744
6793
|
tool: "createReusableContent";
|
|
6745
6794
|
/** The ID of the space being edited. */
|
|
6746
6795
|
spaceId: string;
|
|
6796
|
+
/** The base revision ID used to compare the reusable content change in the current conversation. */
|
|
6797
|
+
baseRevisionId: string;
|
|
6747
6798
|
reusableContent: ChangedRevisionReusableContent;
|
|
6748
6799
|
}
|
|
6749
6800
|
export interface AIToolCallEditReusableContent {
|
|
6750
6801
|
tool: "editReusableContent";
|
|
6751
6802
|
/** The ID of the space being edited. */
|
|
6752
6803
|
spaceId: string;
|
|
6804
|
+
/** The base revision ID used to compare the reusable content change in the current conversation. */
|
|
6805
|
+
baseRevisionId: string;
|
|
6753
6806
|
reusableContent: ChangedRevisionReusableContent;
|
|
6754
6807
|
}
|
|
6755
6808
|
export interface AIToolCallGetReusableContent {
|
|
@@ -6992,6 +7045,13 @@ export interface AIMessageContext {
|
|
|
6992
7045
|
/** ID of the current page. */
|
|
6993
7046
|
pageId: string;
|
|
6994
7047
|
};
|
|
7048
|
+
/** Range of the current selection in a document. */
|
|
7049
|
+
selection?: {
|
|
7050
|
+
anchorKey: string | null;
|
|
7051
|
+
anchorOffset: number;
|
|
7052
|
+
focusKey: string | null;
|
|
7053
|
+
focusOffset: number;
|
|
7054
|
+
};
|
|
6995
7055
|
}
|
|
6996
7056
|
/** Input version of an AI message. */
|
|
6997
7057
|
export interface AIMessageInput {
|
|
@@ -7785,6 +7845,14 @@ export interface UnsplashImage {
|
|
|
7785
7845
|
export interface HiveAccessToken {
|
|
7786
7846
|
contents: Record<string, string>;
|
|
7787
7847
|
}
|
|
7848
|
+
export interface SignedURL {
|
|
7849
|
+
/** The kind of signed URL */
|
|
7850
|
+
object: "signed-url";
|
|
7851
|
+
/** Signed URL that can be opened by the browser */
|
|
7852
|
+
url: URL;
|
|
7853
|
+
/** Expiration time of the signed URL */
|
|
7854
|
+
expiresAt: Timestamp;
|
|
7855
|
+
}
|
|
7788
7856
|
/** The context to send when purging the CDN Cache */
|
|
7789
7857
|
export interface PurgeCDNCacheContext {
|
|
7790
7858
|
/** The list of tags to purge */
|
|
@@ -7937,6 +8005,100 @@ export interface SiteVisitorPayload {
|
|
|
7937
8005
|
jwtToken?: string;
|
|
7938
8006
|
unsignedClaims?: PlainObject;
|
|
7939
8007
|
}
|
|
8008
|
+
/** Resource targeted by a Git Sync installation. Currently only spaces are supported. */
|
|
8009
|
+
export interface GitSyncInstallationTarget {
|
|
8010
|
+
/** Unique identifier of the space targeted by the Git Sync installation. */
|
|
8011
|
+
spaceId: string;
|
|
8012
|
+
}
|
|
8013
|
+
/** Common setup fields for a Git Sync installation. */
|
|
8014
|
+
export interface GitSyncInstallationSetupCommon {
|
|
8015
|
+
/** Optional directory used when syncing a monorepo subdirectory. */
|
|
8016
|
+
projectDirectory?: string;
|
|
8017
|
+
/** Optional template used when generating commit messages. */
|
|
8018
|
+
commitMessageTemplate?: string;
|
|
8019
|
+
/**
|
|
8020
|
+
* Whether previews should be generated from branches outside the configured branch.
|
|
8021
|
+
* @default false
|
|
8022
|
+
*/
|
|
8023
|
+
previewExternalBranches?: boolean;
|
|
8024
|
+
/** Which side should be treated as the source of truth when Git Sync is configured. */
|
|
8025
|
+
priority?: GitSyncInstallationPriority;
|
|
8026
|
+
}
|
|
8027
|
+
/** GitHub provider configuration for a Git Sync installation. */
|
|
8028
|
+
export interface GitSyncInstallationSetupGitHub {
|
|
8029
|
+
provider: "github";
|
|
8030
|
+
/** GitHub specific configuration for the Git Sync installation. */
|
|
8031
|
+
providerConfiguration: {
|
|
8032
|
+
/** GitHub repository identifier. */
|
|
8033
|
+
repositoryId?: number;
|
|
8034
|
+
/**
|
|
8035
|
+
* GitHub repository branch ref.
|
|
8036
|
+
* @pattern ^refs/heads/.+$
|
|
8037
|
+
*/
|
|
8038
|
+
branch?: string;
|
|
8039
|
+
};
|
|
8040
|
+
}
|
|
8041
|
+
/** GitLab provider configuration for a Git Sync installation. */
|
|
8042
|
+
export interface GitSyncInstallationSetupGitLab {
|
|
8043
|
+
provider: "gitlab";
|
|
8044
|
+
/** GitLab specific configuration for the Git Sync installation. */
|
|
8045
|
+
providerConfiguration: {
|
|
8046
|
+
/** GitLab project identifier. */
|
|
8047
|
+
projectId?: number;
|
|
8048
|
+
/** GitLab access token with appropriate scopes for repository access. */
|
|
8049
|
+
accessToken?: string;
|
|
8050
|
+
/** Custom GitLab instance URL, if using a self-hosted GitLab. Use null to clear a self-hosted URL. */
|
|
8051
|
+
customInstanceURL?: string | null;
|
|
8052
|
+
/**
|
|
8053
|
+
* GitLab repository branch ref.
|
|
8054
|
+
* @pattern ^refs/heads/.+$
|
|
8055
|
+
*/
|
|
8056
|
+
branch?: string;
|
|
8057
|
+
};
|
|
8058
|
+
}
|
|
8059
|
+
/** Provider-specific setup payload for a Git Sync installation. */
|
|
8060
|
+
export type GitSyncInstallationSetup = GitSyncInstallationSetupCommon & (GitSyncInstallationSetupGitHub | GitSyncInstallationSetupGitLab);
|
|
8061
|
+
export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
8062
|
+
object: "git-sync-installation";
|
|
8063
|
+
/** Unique identifier of the Git Sync installation. */
|
|
8064
|
+
id: string;
|
|
8065
|
+
/** Resource targeted by a Git Sync installation. Currently only spaces are supported. */
|
|
8066
|
+
target: GitSyncInstallationTarget;
|
|
8067
|
+
status: GitSyncInstallationStatus;
|
|
8068
|
+
createdAt: Timestamp;
|
|
8069
|
+
/** Identifier of the user who created the installation. */
|
|
8070
|
+
createdBy: string;
|
|
8071
|
+
updatedAt: Timestamp;
|
|
8072
|
+
/** URLs associated with the installation */
|
|
8073
|
+
urls: {
|
|
8074
|
+
/**
|
|
8075
|
+
* URL of the installation endpoint in the API
|
|
8076
|
+
* @format uri
|
|
8077
|
+
*/
|
|
8078
|
+
location: string;
|
|
8079
|
+
};
|
|
8080
|
+
};
|
|
8081
|
+
/** GitHub repository that can be selected for Git Sync. */
|
|
8082
|
+
export interface GitSyncGitHubRepository {
|
|
8083
|
+
id: number;
|
|
8084
|
+
accountName: string;
|
|
8085
|
+
repositoryName: string;
|
|
8086
|
+
fullName: string;
|
|
8087
|
+
defaultBranch: string | null;
|
|
8088
|
+
}
|
|
8089
|
+
/** Branch that can be used for Git Sync. */
|
|
8090
|
+
export interface GitSyncBranch {
|
|
8091
|
+
name: string;
|
|
8092
|
+
ref: string;
|
|
8093
|
+
}
|
|
8094
|
+
/** GitLab project that can be selected for Git Sync. */
|
|
8095
|
+
export interface GitSyncGitLabProject {
|
|
8096
|
+
id: number;
|
|
8097
|
+
accountName: string;
|
|
8098
|
+
repositoryName: string;
|
|
8099
|
+
fullName: string;
|
|
8100
|
+
defaultBranch: string | null;
|
|
8101
|
+
}
|
|
7940
8102
|
/**
|
|
7941
8103
|
* @minLength 64
|
|
7942
8104
|
* @maxLength 64
|
|
@@ -8541,6 +8703,10 @@ export interface APIChannelCustomHostname {
|
|
|
8541
8703
|
channel: "custom-hostname";
|
|
8542
8704
|
customHostname: string;
|
|
8543
8705
|
}
|
|
8706
|
+
export interface APIChannelGitSyncInstallation {
|
|
8707
|
+
channel: "git-sync-installation";
|
|
8708
|
+
installation: string;
|
|
8709
|
+
}
|
|
8544
8710
|
export interface APIChannelGitSyncOperation {
|
|
8545
8711
|
channel: "space-gitsync-operation";
|
|
8546
8712
|
space: string;
|
|
@@ -9317,6 +9483,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9317
9483
|
getPageById: (spaceId: EntityId, pageId: EntityId, query?: {
|
|
9318
9484
|
/** Output format for the content. */
|
|
9319
9485
|
format?: "document" | "markdown";
|
|
9486
|
+
/**
|
|
9487
|
+
* Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
|
|
9488
|
+
*
|
|
9489
|
+
* - `relative`: Format page references as relative links from the current page. Other references might not be handled.
|
|
9490
|
+
* - `stable`: Format content references as stable idempotent refs containing their identifiers.
|
|
9491
|
+
* @default "relative"
|
|
9492
|
+
*/
|
|
9493
|
+
"format.markdown.refs"?: "relative" | "stable";
|
|
9320
9494
|
/**
|
|
9321
9495
|
* Controls whether the document should be evaluated.
|
|
9322
9496
|
* - When set to `true`, the entire document will be evaluated.
|
|
@@ -9415,6 +9589,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9415
9589
|
getPageByPath: (spaceId: EntityId, pagePath: string, query?: {
|
|
9416
9590
|
/** Output format for the content. */
|
|
9417
9591
|
format?: "document" | "markdown";
|
|
9592
|
+
/**
|
|
9593
|
+
* Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
|
|
9594
|
+
*
|
|
9595
|
+
* - `relative`: Format page references as relative links from the current page. Other references might not be handled.
|
|
9596
|
+
* - `stable`: Format content references as stable idempotent refs containing their identifiers.
|
|
9597
|
+
* @default "relative"
|
|
9598
|
+
*/
|
|
9599
|
+
"format.markdown.refs"?: "relative" | "stable";
|
|
9418
9600
|
/**
|
|
9419
9601
|
* Controls whether the document should be evaluated.
|
|
9420
9602
|
* - When set to `true`, the entire document will be evaluated.
|
|
@@ -10071,6 +10253,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10071
10253
|
getPageInChangeRequestById: (spaceId: EntityId, changeRequestId: EntityId, pageId: EntityId, query?: {
|
|
10072
10254
|
/** Output format for the content. */
|
|
10073
10255
|
format?: "document" | "markdown";
|
|
10256
|
+
/**
|
|
10257
|
+
* Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
|
|
10258
|
+
*
|
|
10259
|
+
* - `relative`: Format page references as relative links from the current page. Other references might not be handled.
|
|
10260
|
+
* - `stable`: Format content references as stable idempotent refs containing their identifiers.
|
|
10261
|
+
* @default "relative"
|
|
10262
|
+
*/
|
|
10263
|
+
"format.markdown.refs"?: "relative" | "stable";
|
|
10074
10264
|
/**
|
|
10075
10265
|
* Controls whether the document should be evaluated.
|
|
10076
10266
|
* - When set to `true`, the entire document will be evaluated.
|
|
@@ -10345,6 +10535,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10345
10535
|
getPageInRevisionById: (spaceId: EntityId, revisionId: EntityId, pageId: EntityId, query?: {
|
|
10346
10536
|
/** Output format for the content. */
|
|
10347
10537
|
format?: "document" | "markdown";
|
|
10538
|
+
/**
|
|
10539
|
+
* Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
|
|
10540
|
+
*
|
|
10541
|
+
* - `relative`: Format page references as relative links from the current page. Other references might not be handled.
|
|
10542
|
+
* - `stable`: Format content references as stable idempotent refs containing their identifiers.
|
|
10543
|
+
* @default "relative"
|
|
10544
|
+
*/
|
|
10545
|
+
"format.markdown.refs"?: "relative" | "stable";
|
|
10348
10546
|
/**
|
|
10349
10547
|
* Controls whether the document should be evaluated.
|
|
10350
10548
|
* - When set to `true`, the entire document will be evaluated.
|
|
@@ -10409,6 +10607,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10409
10607
|
getPageInRevisionByPath: (spaceId: EntityId, revisionId: EntityId, pagePath: string, query?: {
|
|
10410
10608
|
/** Output format for the content. */
|
|
10411
10609
|
format?: "document" | "markdown";
|
|
10610
|
+
/**
|
|
10611
|
+
* Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
|
|
10612
|
+
*
|
|
10613
|
+
* - `relative`: Format page references as relative links from the current page. Other references might not be handled.
|
|
10614
|
+
* - `stable`: Format content references as stable idempotent refs containing their identifiers.
|
|
10615
|
+
* @default "relative"
|
|
10616
|
+
*/
|
|
10617
|
+
"format.markdown.refs"?: "relative" | "stable";
|
|
10412
10618
|
/**
|
|
10413
10619
|
* Controls whether the document should be evaluated.
|
|
10414
10620
|
* - When set to `true`, the entire document will be evaluated.
|
|
@@ -10457,6 +10663,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10457
10663
|
getPageInChangeRequestByPath: (spaceId: EntityId, changeRequestId: EntityId, pagePath: string, query?: {
|
|
10458
10664
|
/** Output format for the content. */
|
|
10459
10665
|
format?: "document" | "markdown";
|
|
10666
|
+
/**
|
|
10667
|
+
* Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
|
|
10668
|
+
*
|
|
10669
|
+
* - `relative`: Format page references as relative links from the current page. Other references might not be handled.
|
|
10670
|
+
* - `stable`: Format content references as stable idempotent refs containing their identifiers.
|
|
10671
|
+
* @default "relative"
|
|
10672
|
+
*/
|
|
10673
|
+
"format.markdown.refs"?: "relative" | "stable";
|
|
10460
10674
|
/**
|
|
10461
10675
|
* Controls whether the document should be evaluated.
|
|
10462
10676
|
* - When set to `true`, the entire document will be evaluated.
|
|
@@ -12176,6 +12390,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12176
12390
|
contributor?: string;
|
|
12177
12391
|
/** If defined, only change requests with a requested reviewer for this user will be returned. */
|
|
12178
12392
|
requestedReviewer?: string;
|
|
12393
|
+
/** If defined, only change requests linked to this site will be returned. */
|
|
12394
|
+
site?: string;
|
|
12395
|
+
/** If defined, only change requests from this space will be returned. */
|
|
12396
|
+
space?: string;
|
|
12179
12397
|
/** If defined, only change requests linked to this site topic will be returned. */
|
|
12180
12398
|
topic?: string;
|
|
12181
12399
|
/** The field to sort change requests by. Defaults to 'updatedAt'. */
|
|
@@ -13755,6 +13973,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13755
13973
|
siteSpaceId?: string;
|
|
13756
13974
|
};
|
|
13757
13975
|
scope: SiteSearchScope;
|
|
13976
|
+
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
13977
|
+
session?: SiteInsightsSession;
|
|
13758
13978
|
}, query?: {
|
|
13759
13979
|
/** Output format for the content. */
|
|
13760
13980
|
format?: "document" | "markdown";
|
|
@@ -15500,5 +15720,196 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15500
15720
|
};
|
|
15501
15721
|
}>>;
|
|
15502
15722
|
};
|
|
15723
|
+
git: {
|
|
15724
|
+
/**
|
|
15725
|
+
* No description
|
|
15726
|
+
*
|
|
15727
|
+
* @tags git
|
|
15728
|
+
* @name InstallGitSyncProviderOnTarget
|
|
15729
|
+
* @summary Install a Git Sync provider on a target
|
|
15730
|
+
* @request POST:/git/installations
|
|
15731
|
+
* @secure
|
|
15732
|
+
*/
|
|
15733
|
+
installGitSyncProviderOnTarget: (data: {
|
|
15734
|
+
/** The provider of the Git Sync installation. */
|
|
15735
|
+
provider: GitSyncInstallationProvider;
|
|
15736
|
+
/** Resource targeted by a Git Sync installation. Currently only spaces are supported. */
|
|
15737
|
+
target: GitSyncInstallationTarget;
|
|
15738
|
+
}, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
15739
|
+
error: {
|
|
15740
|
+
/** @format int32 */
|
|
15741
|
+
code: 404;
|
|
15742
|
+
message: string;
|
|
15743
|
+
};
|
|
15744
|
+
} | {
|
|
15745
|
+
error: {
|
|
15746
|
+
/** @format int32 */
|
|
15747
|
+
code: 409;
|
|
15748
|
+
message: string;
|
|
15749
|
+
};
|
|
15750
|
+
}>>;
|
|
15751
|
+
/**
|
|
15752
|
+
* No description
|
|
15753
|
+
*
|
|
15754
|
+
* @tags git
|
|
15755
|
+
* @name GetGitSyncInstallationById
|
|
15756
|
+
* @summary Get a Git Sync installation
|
|
15757
|
+
* @request GET:/git/installations/{installationId}
|
|
15758
|
+
* @secure
|
|
15759
|
+
*/
|
|
15760
|
+
getGitSyncInstallationById: (installationId: string, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
15761
|
+
error: {
|
|
15762
|
+
/** @format int32 */
|
|
15763
|
+
code: 401;
|
|
15764
|
+
message: string;
|
|
15765
|
+
};
|
|
15766
|
+
} | {
|
|
15767
|
+
error: {
|
|
15768
|
+
/** @format int32 */
|
|
15769
|
+
code: 404;
|
|
15770
|
+
message: string;
|
|
15771
|
+
};
|
|
15772
|
+
}>>;
|
|
15773
|
+
/**
|
|
15774
|
+
* No description
|
|
15775
|
+
*
|
|
15776
|
+
* @tags git
|
|
15777
|
+
* @name UpdateGitSyncInstallationById
|
|
15778
|
+
* @summary Update a Git Sync installation configuration
|
|
15779
|
+
* @request PATCH:/git/installations/{installationId}
|
|
15780
|
+
* @secure
|
|
15781
|
+
*/
|
|
15782
|
+
updateGitSyncInstallationById: (installationId: string, data: GitSyncInstallationSetup, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
15783
|
+
error: {
|
|
15784
|
+
/** @format int32 */
|
|
15785
|
+
code: 401;
|
|
15786
|
+
message: string;
|
|
15787
|
+
};
|
|
15788
|
+
} | {
|
|
15789
|
+
error: {
|
|
15790
|
+
/** @format int32 */
|
|
15791
|
+
code: 404;
|
|
15792
|
+
message: string;
|
|
15793
|
+
};
|
|
15794
|
+
} | {
|
|
15795
|
+
error: {
|
|
15796
|
+
/** @format int32 */
|
|
15797
|
+
code: 409;
|
|
15798
|
+
message: string;
|
|
15799
|
+
};
|
|
15800
|
+
}>>;
|
|
15801
|
+
/**
|
|
15802
|
+
* No description
|
|
15803
|
+
*
|
|
15804
|
+
* @tags git
|
|
15805
|
+
* @name UninstallGitSyncInstallation
|
|
15806
|
+
* @summary Uninstall a Git Sync installation
|
|
15807
|
+
* @request DELETE:/git/installations/{installationId}
|
|
15808
|
+
* @secure
|
|
15809
|
+
*/
|
|
15810
|
+
uninstallGitSyncInstallation: (installationId: string, params?: RequestParams) => Promise<HttpResponse<void, {
|
|
15811
|
+
error: {
|
|
15812
|
+
/** @format int32 */
|
|
15813
|
+
code: 404;
|
|
15814
|
+
message: string;
|
|
15815
|
+
};
|
|
15816
|
+
}>>;
|
|
15817
|
+
/**
|
|
15818
|
+
* No description
|
|
15819
|
+
*
|
|
15820
|
+
* @tags git
|
|
15821
|
+
* @name ListGitHubRepositoriesForGitSyncInstallation
|
|
15822
|
+
* @summary List GitHub repositories available for a Git Sync installation
|
|
15823
|
+
* @request GET:/git/installations/{installationId}/github/repos
|
|
15824
|
+
* @secure
|
|
15825
|
+
*/
|
|
15826
|
+
listGitHubRepositoriesForGitSyncInstallation: (installationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
15827
|
+
items: GitSyncGitHubRepository[];
|
|
15828
|
+
}, {
|
|
15829
|
+
error: {
|
|
15830
|
+
/** @format int32 */
|
|
15831
|
+
code: 401;
|
|
15832
|
+
message: string;
|
|
15833
|
+
};
|
|
15834
|
+
} | {
|
|
15835
|
+
error: {
|
|
15836
|
+
/** @format int32 */
|
|
15837
|
+
code: 404;
|
|
15838
|
+
message: string;
|
|
15839
|
+
};
|
|
15840
|
+
}>>;
|
|
15841
|
+
/**
|
|
15842
|
+
* No description
|
|
15843
|
+
*
|
|
15844
|
+
* @tags git
|
|
15845
|
+
* @name ListGitHubRepoBranchesForGitSyncInstallation
|
|
15846
|
+
* @summary List GitHub repository branches available for a Git Sync installation
|
|
15847
|
+
* @request GET:/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/branches
|
|
15848
|
+
* @secure
|
|
15849
|
+
*/
|
|
15850
|
+
listGitHubRepoBranchesForGitSyncInstallation: (installationId: string, accountName: string, repositoryName: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
15851
|
+
items: GitSyncBranch[];
|
|
15852
|
+
}, {
|
|
15853
|
+
error: {
|
|
15854
|
+
/** @format int32 */
|
|
15855
|
+
code: 401;
|
|
15856
|
+
message: string;
|
|
15857
|
+
};
|
|
15858
|
+
} | {
|
|
15859
|
+
error: {
|
|
15860
|
+
/** @format int32 */
|
|
15861
|
+
code: 404;
|
|
15862
|
+
message: string;
|
|
15863
|
+
};
|
|
15864
|
+
}>>;
|
|
15865
|
+
/**
|
|
15866
|
+
* No description
|
|
15867
|
+
*
|
|
15868
|
+
* @tags git
|
|
15869
|
+
* @name ListGitLabProjectsForGitSyncInstallation
|
|
15870
|
+
* @summary List GitLab projects available for a Git Sync installation
|
|
15871
|
+
* @request GET:/git/installations/{installationId}/gitlab/projects
|
|
15872
|
+
* @secure
|
|
15873
|
+
*/
|
|
15874
|
+
listGitLabProjectsForGitSyncInstallation: (installationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
15875
|
+
items: GitSyncGitLabProject[];
|
|
15876
|
+
}, {
|
|
15877
|
+
error: {
|
|
15878
|
+
/** @format int32 */
|
|
15879
|
+
code: 401;
|
|
15880
|
+
message: string;
|
|
15881
|
+
};
|
|
15882
|
+
} | {
|
|
15883
|
+
error: {
|
|
15884
|
+
/** @format int32 */
|
|
15885
|
+
code: 404;
|
|
15886
|
+
message: string;
|
|
15887
|
+
};
|
|
15888
|
+
}>>;
|
|
15889
|
+
/**
|
|
15890
|
+
* No description
|
|
15891
|
+
*
|
|
15892
|
+
* @tags git
|
|
15893
|
+
* @name ListGitLabProjectBranchesForGitSyncInstallation
|
|
15894
|
+
* @summary List GitLab project branches available for a Git Sync installation
|
|
15895
|
+
* @request GET:/git/installations/{installationId}/gitlab/projects/{projectId}/branches
|
|
15896
|
+
* @secure
|
|
15897
|
+
*/
|
|
15898
|
+
listGitLabProjectBranchesForGitSyncInstallation: (installationId: string, projectId: number, params?: RequestParams) => Promise<HttpResponse<{
|
|
15899
|
+
items: GitSyncBranch[];
|
|
15900
|
+
}, {
|
|
15901
|
+
error: {
|
|
15902
|
+
/** @format int32 */
|
|
15903
|
+
code: 401;
|
|
15904
|
+
message: string;
|
|
15905
|
+
};
|
|
15906
|
+
} | {
|
|
15907
|
+
error: {
|
|
15908
|
+
/** @format int32 */
|
|
15909
|
+
code: 404;
|
|
15910
|
+
message: string;
|
|
15911
|
+
};
|
|
15912
|
+
}>>;
|
|
15913
|
+
};
|
|
15503
15914
|
}
|
|
15504
15915
|
export {};
|