@gitbook/api 0.124.0 → 0.126.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 +184 -118
- package/dist/index.cjs +61 -18
- package/dist/index.js +60 -18
- package/package.json +1 -1
- package/spec/openapi.json +687 -216
- package/spec/openapi.yaml +438 -158
package/dist/client.d.ts
CHANGED
|
@@ -1380,12 +1380,19 @@ export interface GitSyncBlob {
|
|
|
1380
1380
|
/** Path of the blob in the Git tree */
|
|
1381
1381
|
path: string;
|
|
1382
1382
|
}
|
|
1383
|
+
/** Width of the page. */
|
|
1384
|
+
export declare enum RevisionPageLayoutOptionsWidth {
|
|
1385
|
+
Default = "default",
|
|
1386
|
+
Wide = "wide"
|
|
1387
|
+
}
|
|
1383
1388
|
/** Size of the cover image. */
|
|
1384
1389
|
export declare enum RevisionPageLayoutOptionsCoverSize {
|
|
1385
1390
|
Hero = "hero",
|
|
1386
1391
|
Full = "full"
|
|
1387
1392
|
}
|
|
1388
1393
|
export interface RevisionPageLayoutOptions {
|
|
1394
|
+
/** Width of the page. */
|
|
1395
|
+
width?: RevisionPageLayoutOptionsWidth;
|
|
1389
1396
|
/** Should the cover be visible? */
|
|
1390
1397
|
cover?: boolean;
|
|
1391
1398
|
/** Size of the cover image. */
|
|
@@ -1602,9 +1609,7 @@ export declare enum ImportContentSource {
|
|
|
1602
1609
|
Zip = "zip",
|
|
1603
1610
|
Confluence = "confluence",
|
|
1604
1611
|
GithubWiki = "github-wiki",
|
|
1605
|
-
DropboxPaper = "dropbox-paper",
|
|
1606
1612
|
Notion = "notion",
|
|
1607
|
-
Quip = "quip",
|
|
1608
1613
|
GoogleDocs = "google-docs"
|
|
1609
1614
|
}
|
|
1610
1615
|
export interface ImportContent {
|
|
@@ -1672,16 +1677,7 @@ export declare enum BillingProduct {
|
|
|
1672
1677
|
Community2024 = "community_2024",
|
|
1673
1678
|
Free = "free",
|
|
1674
1679
|
Plus = "plus",
|
|
1675
|
-
Pro = "pro"
|
|
1676
|
-
Team = "team",
|
|
1677
|
-
Business = "business",
|
|
1678
|
-
Legacy = "legacy",
|
|
1679
|
-
Startup = "startup",
|
|
1680
|
-
Enterprise = "enterprise",
|
|
1681
|
-
Community = "community",
|
|
1682
|
-
TeamOct2019Free = "team_oct_2019_free",
|
|
1683
|
-
TeamDec2021 = "team_dec_2021",
|
|
1684
|
-
BusinessDec2021 = "business_dec_2021"
|
|
1680
|
+
Pro = "pro"
|
|
1685
1681
|
}
|
|
1686
1682
|
/** Interval for a billing subscription */
|
|
1687
1683
|
export declare enum BillingInterval {
|
|
@@ -5132,36 +5128,6 @@ export interface UserSitePermission {
|
|
|
5132
5128
|
/** The content or organization that enforced this permission level. */
|
|
5133
5129
|
origin: SpacePointer | OrganizationPointer;
|
|
5134
5130
|
}
|
|
5135
|
-
export declare enum AIMessageRole {
|
|
5136
|
-
User = "user",
|
|
5137
|
-
Assistant = "assistant",
|
|
5138
|
-
Developer = "developer"
|
|
5139
|
-
}
|
|
5140
|
-
/** Attachment to attach search results to a message. */
|
|
5141
|
-
export interface AIMessageAttachmentSearch {
|
|
5142
|
-
type: 'search';
|
|
5143
|
-
/** The query to use to extract the knowledge. */
|
|
5144
|
-
query: string;
|
|
5145
|
-
}
|
|
5146
|
-
/** Attachment representing the profile of the visitor */
|
|
5147
|
-
export interface AIMessageAttachmentVisitorProfile {
|
|
5148
|
-
type: 'visitor_profile';
|
|
5149
|
-
}
|
|
5150
|
-
/** Attachment to extract and pass the content of a page to the AI. */
|
|
5151
|
-
export interface AIMessageAttachmentPage {
|
|
5152
|
-
type: 'page';
|
|
5153
|
-
/** The ID of the space to extract the content from. */
|
|
5154
|
-
spaceId: string;
|
|
5155
|
-
/** The ID of the page to extract the content from. */
|
|
5156
|
-
pageId: string;
|
|
5157
|
-
}
|
|
5158
|
-
/** Attachment to pass the tree of pages to the AI */
|
|
5159
|
-
export interface AIMessageAttachmentPages {
|
|
5160
|
-
type: 'pages';
|
|
5161
|
-
/** The ID of the space to extract the content from. */
|
|
5162
|
-
spaceId: string;
|
|
5163
|
-
}
|
|
5164
|
-
export type AIMessageAttachment = AIMessageAttachmentSearch | AIMessageAttachmentVisitorProfile | AIMessageAttachmentPage | AIMessageAttachmentPages;
|
|
5165
5131
|
/** Context about the current user sending a message. */
|
|
5166
5132
|
export interface AIMessageContext {
|
|
5167
5133
|
location?: {
|
|
@@ -5173,9 +5139,8 @@ export interface AIMessageContext {
|
|
|
5173
5139
|
}
|
|
5174
5140
|
/** Input version of an AI message. */
|
|
5175
5141
|
export interface AIMessageInput {
|
|
5176
|
-
role:
|
|
5142
|
+
role: 'user';
|
|
5177
5143
|
content: string | JSONDocument;
|
|
5178
|
-
attachments?: AIMessageAttachment[];
|
|
5179
5144
|
/** Context about the current user sending a message. */
|
|
5180
5145
|
context?: AIMessageContext;
|
|
5181
5146
|
}
|
|
@@ -5196,15 +5161,6 @@ export declare enum AIModel {
|
|
|
5196
5161
|
ReasoningMedium = "reasoning-medium",
|
|
5197
5162
|
ReasoningHigh = "reasoning-high"
|
|
5198
5163
|
}
|
|
5199
|
-
/** Tools provided to the AI */
|
|
5200
|
-
export interface AIToolCapabilities {
|
|
5201
|
-
/** Whether the AI can read the content of a page */
|
|
5202
|
-
getPageContent?: boolean;
|
|
5203
|
-
/** Whether the AI can read the table of contents of a space */
|
|
5204
|
-
getPages?: boolean;
|
|
5205
|
-
/** Whether the AI can search for content */
|
|
5206
|
-
search?: boolean;
|
|
5207
|
-
}
|
|
5208
5164
|
/** Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests. */
|
|
5209
5165
|
export interface AIStreamResponseFinish {
|
|
5210
5166
|
type: 'response_finish';
|
|
@@ -5325,7 +5281,17 @@ export interface AIToolCallCreateAgentTask {
|
|
|
5325
5281
|
title: string;
|
|
5326
5282
|
};
|
|
5327
5283
|
}
|
|
5328
|
-
|
|
5284
|
+
/** Tool called from an MCP server */
|
|
5285
|
+
export interface AIToolCallMCP {
|
|
5286
|
+
tool: 'mcp';
|
|
5287
|
+
/** The ID of the MCP server that has been called. */
|
|
5288
|
+
mcpServerId: string;
|
|
5289
|
+
/** The name of the tool that has been called. */
|
|
5290
|
+
mcpToolName: string;
|
|
5291
|
+
/** The title of the tool that has been called. */
|
|
5292
|
+
mcpToolTitle?: string;
|
|
5293
|
+
}
|
|
5294
|
+
export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateAgentTask | AIToolCallMCP;
|
|
5329
5295
|
/** Message emitted by the server to indicate that the AI has called a tool. */
|
|
5330
5296
|
export interface AIStreamResponseToolCall {
|
|
5331
5297
|
type: 'response_tool_call';
|
|
@@ -5335,7 +5301,14 @@ export interface AIStreamResponseToolCall {
|
|
|
5335
5301
|
stepIndex: number;
|
|
5336
5302
|
toolCall: AIToolCall;
|
|
5337
5303
|
}
|
|
5338
|
-
|
|
5304
|
+
/** Message emitted by the server to suggest a followup message the user could respond with. */
|
|
5305
|
+
export interface AIStreamResponseFollowupSuggestion {
|
|
5306
|
+
type: 'response_followup_suggestion';
|
|
5307
|
+
/** The ID of the message that this event is composing. */
|
|
5308
|
+
messageId: string;
|
|
5309
|
+
suggestions: string[];
|
|
5310
|
+
}
|
|
5311
|
+
export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseFollowupSuggestion;
|
|
5339
5312
|
/** Analytics info on the GitBook's site session. */
|
|
5340
5313
|
export interface SiteInsightsEventSession {
|
|
5341
5314
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -5669,7 +5642,7 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
5669
5642
|
values: SiteInsightsVisitorOS[];
|
|
5670
5643
|
} | {
|
|
5671
5644
|
column: 'visitorBot';
|
|
5672
|
-
values: SiteInsightsVisitorBot[];
|
|
5645
|
+
values: (SiteInsightsVisitorBot | '')[];
|
|
5673
5646
|
} | {
|
|
5674
5647
|
column: 'eventLinkTargetValue';
|
|
5675
5648
|
values: ContentRef[];
|
|
@@ -5849,6 +5822,32 @@ export interface SiteRedirect {
|
|
|
5849
5822
|
source: SiteRedirectSourcePath;
|
|
5850
5823
|
destination: SiteRedirectDestination;
|
|
5851
5824
|
}
|
|
5825
|
+
/**
|
|
5826
|
+
* Name of the MCP server
|
|
5827
|
+
* @minLength 1
|
|
5828
|
+
* @maxLength 100
|
|
5829
|
+
*/
|
|
5830
|
+
export type SiteMcpServerName = string;
|
|
5831
|
+
/** HTTP headers sent with requests to this server */
|
|
5832
|
+
export type SiteMcpServerHeaders = Record<string, string>;
|
|
5833
|
+
export interface SiteMcpServer {
|
|
5834
|
+
object: 'site-mcp-server';
|
|
5835
|
+
/** Unique identifier for the MCP server */
|
|
5836
|
+
id: string;
|
|
5837
|
+
/** Name of the MCP server */
|
|
5838
|
+
name: SiteMcpServerName;
|
|
5839
|
+
url: URL;
|
|
5840
|
+
/** HTTP headers sent with requests to this server */
|
|
5841
|
+
headers: SiteMcpServerHeaders;
|
|
5842
|
+
/** URLs associated with the object */
|
|
5843
|
+
urls: {
|
|
5844
|
+
/**
|
|
5845
|
+
* URL of the MCP server in the API
|
|
5846
|
+
* @format uri
|
|
5847
|
+
*/
|
|
5848
|
+
location: string;
|
|
5849
|
+
};
|
|
5850
|
+
}
|
|
5852
5851
|
export interface Subdomain {
|
|
5853
5852
|
object: 'subdomain';
|
|
5854
5853
|
/**
|
|
@@ -6662,6 +6661,15 @@ export interface SiteShareLinkChannel {
|
|
|
6662
6661
|
site: string;
|
|
6663
6662
|
siteShareLink: string;
|
|
6664
6663
|
}
|
|
6664
|
+
export interface SiteMcpServersChannel {
|
|
6665
|
+
channel: 'site-mcp-servers';
|
|
6666
|
+
site: string;
|
|
6667
|
+
}
|
|
6668
|
+
export interface SiteMcpServerChannel {
|
|
6669
|
+
channel: 'site-mcp-server';
|
|
6670
|
+
site: string;
|
|
6671
|
+
siteMcpServer: string;
|
|
6672
|
+
}
|
|
6665
6673
|
export interface SiteSectionChannel {
|
|
6666
6674
|
channel: 'site-section';
|
|
6667
6675
|
site: string;
|
|
@@ -6707,7 +6715,7 @@ export interface AgentTasksChannel {
|
|
|
6707
6715
|
organization: string;
|
|
6708
6716
|
}
|
|
6709
6717
|
/** Channel to subscribe to for realtime updates. */
|
|
6710
|
-
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel | AgentTaskChannel | AgentTasksChannel;
|
|
6718
|
+
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteMcpServersChannel | SiteMcpServerChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel | AgentTaskChannel | AgentTasksChannel;
|
|
6711
6719
|
export interface GitSyncOperationChannelData {
|
|
6712
6720
|
channel: 'space-gitsync-operation';
|
|
6713
6721
|
data: GitSyncOperation;
|
|
@@ -6766,6 +6774,11 @@ export interface Seat {
|
|
|
6766
6774
|
/** @format date-time */
|
|
6767
6775
|
updatedAt: string;
|
|
6768
6776
|
}
|
|
6777
|
+
export declare enum AIMessageRole {
|
|
6778
|
+
User = "user",
|
|
6779
|
+
Assistant = "assistant",
|
|
6780
|
+
Developer = "developer"
|
|
6781
|
+
}
|
|
6769
6782
|
/** A step in a message from the AI agent. */
|
|
6770
6783
|
export interface AIMessageStep {
|
|
6771
6784
|
content: JSONDocument;
|
|
@@ -7238,12 +7251,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7238
7251
|
code: 400;
|
|
7239
7252
|
message: string;
|
|
7240
7253
|
};
|
|
7241
|
-
} | {
|
|
7242
|
-
error: {
|
|
7243
|
-
/** @format int32 */
|
|
7244
|
-
code: 404;
|
|
7245
|
-
message: string;
|
|
7246
|
-
};
|
|
7247
7254
|
}>>;
|
|
7248
7255
|
/**
|
|
7249
7256
|
* No description
|
|
@@ -7300,13 +7307,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7300
7307
|
* @request DELETE:/spaces/{spaceId}/permissions/users/{userId}
|
|
7301
7308
|
* @secure
|
|
7302
7309
|
*/
|
|
7303
|
-
removeUserFromSpace: (spaceId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void,
|
|
7304
|
-
error: {
|
|
7305
|
-
/** @format int32 */
|
|
7306
|
-
code: 404;
|
|
7307
|
-
message: string;
|
|
7308
|
-
};
|
|
7309
|
-
}>>;
|
|
7310
|
+
removeUserFromSpace: (spaceId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
7310
7311
|
/**
|
|
7311
7312
|
* No description
|
|
7312
7313
|
*
|
|
@@ -7850,13 +7851,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7850
7851
|
* @request DELETE:/spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers/{userId}
|
|
7851
7852
|
* @secure
|
|
7852
7853
|
*/
|
|
7853
|
-
removeRequestedReviewerFromChangeRequest: (spaceId: string, changeRequestId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void,
|
|
7854
|
-
error: {
|
|
7855
|
-
/** @format int32 */
|
|
7856
|
-
code: 404;
|
|
7857
|
-
message: string;
|
|
7858
|
-
};
|
|
7859
|
-
}>>;
|
|
7854
|
+
removeRequestedReviewerFromChangeRequest: (spaceId: string, changeRequestId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
7860
7855
|
/**
|
|
7861
7856
|
* No description
|
|
7862
7857
|
*
|
|
@@ -8317,6 +8312,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8317
8312
|
*/
|
|
8318
8313
|
computed?: boolean;
|
|
8319
8314
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionReusableContent, any>>;
|
|
8315
|
+
/**
|
|
8316
|
+
* @description Return the semantic changes between a change request and its base revision.
|
|
8317
|
+
*
|
|
8318
|
+
* @tags change-request-content
|
|
8319
|
+
* @name GetChangeRequestChanges
|
|
8320
|
+
* @summary Get change request semantic changes
|
|
8321
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/changes
|
|
8322
|
+
* @secure
|
|
8323
|
+
*/
|
|
8324
|
+
getChangeRequestChanges: (spaceId: string, changeRequestId: string, query?: {
|
|
8325
|
+
/**
|
|
8326
|
+
* Limit the number of changes returned
|
|
8327
|
+
* @default 10
|
|
8328
|
+
*/
|
|
8329
|
+
limit?: number;
|
|
8330
|
+
}, params?: RequestParams) => Promise<HttpResponse<RevisionSemanticChanges, {
|
|
8331
|
+
error: {
|
|
8332
|
+
/** @format int32 */
|
|
8333
|
+
code: 404;
|
|
8334
|
+
message: string;
|
|
8335
|
+
};
|
|
8336
|
+
}>>;
|
|
8320
8337
|
/**
|
|
8321
8338
|
* No description
|
|
8322
8339
|
*
|
|
@@ -9062,13 +9079,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9062
9079
|
* @request DELETE:/collections/{collectionId}/permissions/teams/{teamId}
|
|
9063
9080
|
* @secure
|
|
9064
9081
|
*/
|
|
9065
|
-
removeTeamFromCollection: (collectionId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void,
|
|
9066
|
-
error: {
|
|
9067
|
-
/** @format int32 */
|
|
9068
|
-
code: 404;
|
|
9069
|
-
message: string;
|
|
9070
|
-
};
|
|
9071
|
-
}>>;
|
|
9082
|
+
removeTeamFromCollection: (collectionId: string, teamId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
9072
9083
|
/**
|
|
9073
9084
|
* No description
|
|
9074
9085
|
*
|
|
@@ -9124,13 +9135,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9124
9135
|
* @request DELETE:/collections/{collectionId}/permissions/users/{userId}
|
|
9125
9136
|
* @secure
|
|
9126
9137
|
*/
|
|
9127
|
-
removeUserFromCollection: (collectionId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void,
|
|
9128
|
-
error: {
|
|
9129
|
-
/** @format int32 */
|
|
9130
|
-
code: 404;
|
|
9131
|
-
message: string;
|
|
9132
|
-
};
|
|
9133
|
-
}>>;
|
|
9138
|
+
removeUserFromCollection: (collectionId: string, userId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
9134
9139
|
/**
|
|
9135
9140
|
* No description
|
|
9136
9141
|
*
|
|
@@ -9495,13 +9500,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9495
9500
|
* @request DELETE:/integrations/{integrationName}/installations/{installationId}
|
|
9496
9501
|
* @secure
|
|
9497
9502
|
*/
|
|
9498
|
-
uninstallIntegration: (integrationName: string, installationId: string, params?: RequestParams) => Promise<HttpResponse<void,
|
|
9499
|
-
error: {
|
|
9500
|
-
/** @format int32 */
|
|
9501
|
-
code: 404;
|
|
9502
|
-
message: string;
|
|
9503
|
-
};
|
|
9504
|
-
}>>;
|
|
9503
|
+
uninstallIntegration: (integrationName: string, installationId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
9505
9504
|
/**
|
|
9506
9505
|
* @description Creates a temporary API token of an integration's installation that has access to the installation and it's scopes. You must be authenticated as the integration to obtain this token.
|
|
9507
9506
|
*
|
|
@@ -11007,13 +11006,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11007
11006
|
* @request DELETE:/orgs/{organizationId}/translations/{translationSettingsId}/languages/{translationLanguage}
|
|
11008
11007
|
* @secure
|
|
11009
11008
|
*/
|
|
11010
|
-
deleteTranslationLanguage: (organizationId: string, translationSettingsId: string, translationLanguage: TranslationLanguage, params?: RequestParams) => Promise<HttpResponse<void,
|
|
11011
|
-
error: {
|
|
11012
|
-
/** @format int32 */
|
|
11013
|
-
code: 404;
|
|
11014
|
-
message: string;
|
|
11015
|
-
};
|
|
11016
|
-
}>>;
|
|
11009
|
+
deleteTranslationLanguage: (organizationId: string, translationSettingsId: string, translationLanguage: TranslationLanguage, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
11017
11010
|
/**
|
|
11018
11011
|
* @description Generate a pre-signed URL that can be used to upload a file to storage
|
|
11019
11012
|
*
|
|
@@ -11143,13 +11136,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11143
11136
|
* @request DELETE:/orgs/{organizationId}/fonts/{fontId}
|
|
11144
11137
|
* @secure
|
|
11145
11138
|
*/
|
|
11146
|
-
deleteCustomFont: (organizationId: string, fontId: string, params?: RequestParams) => Promise<HttpResponse<void,
|
|
11147
|
-
error: {
|
|
11148
|
-
/** @format int32 */
|
|
11149
|
-
code: 404;
|
|
11150
|
-
message: string;
|
|
11151
|
-
};
|
|
11152
|
-
}>>;
|
|
11139
|
+
deleteCustomFont: (organizationId: string, fontId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
11153
11140
|
/**
|
|
11154
11141
|
* No description
|
|
11155
11142
|
*
|
|
@@ -12168,7 +12155,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12168
12155
|
items: UserSitePermission[];
|
|
12169
12156
|
}, any>>;
|
|
12170
12157
|
/**
|
|
12171
|
-
* @description
|
|
12158
|
+
* @description Generate an AI response in a conversation.
|
|
12172
12159
|
*
|
|
12173
12160
|
* @tags sites
|
|
12174
12161
|
* @name StreamAiResponseInSite
|
|
@@ -12179,14 +12166,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12179
12166
|
streamAiResponseInSite: (organizationId: string, siteId: string, data: {
|
|
12180
12167
|
/** The ID of the previous response to continue from */
|
|
12181
12168
|
previousResponseId?: string;
|
|
12182
|
-
/** Instructions for the AI */
|
|
12183
|
-
instructions?: string;
|
|
12184
12169
|
input: AIMessageInput[];
|
|
12185
12170
|
output: AIOutputFormat;
|
|
12186
12171
|
model?: AIModel;
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12172
|
+
} & ({
|
|
12173
|
+
mode: "custom";
|
|
12174
|
+
/** Custom instructions for the AI */
|
|
12175
|
+
instructions: string;
|
|
12176
|
+
} | {
|
|
12177
|
+
mode: "assistant";
|
|
12178
|
+
}), params?: RequestParams) => EventIterator<AIStreamResponse>;
|
|
12190
12179
|
/**
|
|
12191
12180
|
* @description Experimental operation to get an existing AI response in a site.
|
|
12192
12181
|
*
|
|
@@ -12329,6 +12318,83 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12329
12318
|
message: string;
|
|
12330
12319
|
};
|
|
12331
12320
|
}>>;
|
|
12321
|
+
/**
|
|
12322
|
+
* No description
|
|
12323
|
+
*
|
|
12324
|
+
* @tags site-mcp-servers
|
|
12325
|
+
* @name ListSiteMcpServers
|
|
12326
|
+
* @summary List all MCP servers for a site
|
|
12327
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/mcp-servers
|
|
12328
|
+
* @secure
|
|
12329
|
+
*/
|
|
12330
|
+
listSiteMcpServers: (organizationId: string, siteId: string, query?: {
|
|
12331
|
+
/** Identifier of the page results to fetch. */
|
|
12332
|
+
page?: string;
|
|
12333
|
+
/**
|
|
12334
|
+
* The number of results per page
|
|
12335
|
+
* @min 0
|
|
12336
|
+
* @max 1000
|
|
12337
|
+
*/
|
|
12338
|
+
limit?: number;
|
|
12339
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
12340
|
+
items: SiteMcpServer[];
|
|
12341
|
+
}, any>>;
|
|
12342
|
+
/**
|
|
12343
|
+
* No description
|
|
12344
|
+
*
|
|
12345
|
+
* @tags site-mcp-servers
|
|
12346
|
+
* @name CreateSiteMcpServer
|
|
12347
|
+
* @summary Create a new MCP server
|
|
12348
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/mcp-servers
|
|
12349
|
+
* @secure
|
|
12350
|
+
*/
|
|
12351
|
+
createSiteMcpServer: (organizationId: string, siteId: string, data: {
|
|
12352
|
+
/** Name of the MCP server */
|
|
12353
|
+
name: SiteMcpServerName;
|
|
12354
|
+
url: URL;
|
|
12355
|
+
/** HTTP headers sent with requests to this server */
|
|
12356
|
+
headers: SiteMcpServerHeaders;
|
|
12357
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteMcpServer, any>>;
|
|
12358
|
+
/**
|
|
12359
|
+
* No description
|
|
12360
|
+
*
|
|
12361
|
+
* @tags site-mcp-servers
|
|
12362
|
+
* @name GetSiteMcpServerById
|
|
12363
|
+
* @summary Get a site MCP server
|
|
12364
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId}
|
|
12365
|
+
* @secure
|
|
12366
|
+
*/
|
|
12367
|
+
getSiteMcpServerById: (organizationId: string, siteId: string, siteMcpServerId: string, params?: RequestParams) => Promise<HttpResponse<SiteMcpServer, any>>;
|
|
12368
|
+
/**
|
|
12369
|
+
* No description
|
|
12370
|
+
*
|
|
12371
|
+
* @tags site-mcp-servers
|
|
12372
|
+
* @name UpdateSiteMcpServerById
|
|
12373
|
+
* @summary Update a site MCP server
|
|
12374
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId}
|
|
12375
|
+
* @secure
|
|
12376
|
+
*/
|
|
12377
|
+
updateSiteMcpServerById: (organizationId: string, siteId: string, siteMcpServerId: string, data: {
|
|
12378
|
+
/** Name of the MCP server */
|
|
12379
|
+
name?: SiteMcpServerName;
|
|
12380
|
+
/**
|
|
12381
|
+
* @format uri
|
|
12382
|
+
* @maxLength 2048
|
|
12383
|
+
*/
|
|
12384
|
+
url?: string;
|
|
12385
|
+
/** HTTP headers sent with requests to this server */
|
|
12386
|
+
headers?: SiteMcpServerHeaders;
|
|
12387
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteMcpServer, any>>;
|
|
12388
|
+
/**
|
|
12389
|
+
* No description
|
|
12390
|
+
*
|
|
12391
|
+
* @tags site-mcp-servers
|
|
12392
|
+
* @name DeleteSiteMcpServerById
|
|
12393
|
+
* @summary Delete a site MCP server
|
|
12394
|
+
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/mcp-servers/{siteMcpServerId}
|
|
12395
|
+
* @secure
|
|
12396
|
+
*/
|
|
12397
|
+
deleteSiteMcpServerById: (organizationId: string, siteId: string, siteMcpServerId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
12332
12398
|
};
|
|
12333
12399
|
subdomains: {
|
|
12334
12400
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -241,6 +241,7 @@ __export(src_exports, {
|
|
|
241
241
|
OrganizationUseCase: () => OrganizationUseCase,
|
|
242
242
|
PageFeedbackRating: () => PageFeedbackRating,
|
|
243
243
|
RevisionPageLayoutOptionsCoverSize: () => RevisionPageLayoutOptionsCoverSize,
|
|
244
|
+
RevisionPageLayoutOptionsWidth: () => RevisionPageLayoutOptionsWidth,
|
|
244
245
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
245
246
|
RevisionPageType: () => RevisionPageType,
|
|
246
247
|
RevisionSemanticChangeType: () => RevisionSemanticChangeType,
|
|
@@ -273,7 +274,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
273
274
|
|
|
274
275
|
// package.json
|
|
275
276
|
var name = "@gitbook/api";
|
|
276
|
-
var version = "0.
|
|
277
|
+
var version = "0.126.0";
|
|
277
278
|
|
|
278
279
|
// src/client.ts
|
|
279
280
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -447,6 +448,11 @@ var TranslationLanguage = /* @__PURE__ */ ((TranslationLanguage2) => {
|
|
|
447
448
|
TranslationLanguage2["Sl"] = "sl";
|
|
448
449
|
return TranslationLanguage2;
|
|
449
450
|
})(TranslationLanguage || {});
|
|
451
|
+
var RevisionPageLayoutOptionsWidth = /* @__PURE__ */ ((RevisionPageLayoutOptionsWidth2) => {
|
|
452
|
+
RevisionPageLayoutOptionsWidth2["Default"] = "default";
|
|
453
|
+
RevisionPageLayoutOptionsWidth2["Wide"] = "wide";
|
|
454
|
+
return RevisionPageLayoutOptionsWidth2;
|
|
455
|
+
})(RevisionPageLayoutOptionsWidth || {});
|
|
450
456
|
var RevisionPageLayoutOptionsCoverSize = /* @__PURE__ */ ((RevisionPageLayoutOptionsCoverSize2) => {
|
|
451
457
|
RevisionPageLayoutOptionsCoverSize2["Hero"] = "hero";
|
|
452
458
|
RevisionPageLayoutOptionsCoverSize2["Full"] = "full";
|
|
@@ -467,9 +473,7 @@ var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
|
|
|
467
473
|
ImportContentSource2["Zip"] = "zip";
|
|
468
474
|
ImportContentSource2["Confluence"] = "confluence";
|
|
469
475
|
ImportContentSource2["GithubWiki"] = "github-wiki";
|
|
470
|
-
ImportContentSource2["DropboxPaper"] = "dropbox-paper";
|
|
471
476
|
ImportContentSource2["Notion"] = "notion";
|
|
472
|
-
ImportContentSource2["Quip"] = "quip";
|
|
473
477
|
ImportContentSource2["GoogleDocs"] = "google-docs";
|
|
474
478
|
return ImportContentSource2;
|
|
475
479
|
})(ImportContentSource || {});
|
|
@@ -505,15 +509,6 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
505
509
|
BillingProduct2["Free"] = "free";
|
|
506
510
|
BillingProduct2["Plus"] = "plus";
|
|
507
511
|
BillingProduct2["Pro"] = "pro";
|
|
508
|
-
BillingProduct2["Team"] = "team";
|
|
509
|
-
BillingProduct2["Business"] = "business";
|
|
510
|
-
BillingProduct2["Legacy"] = "legacy";
|
|
511
|
-
BillingProduct2["Startup"] = "startup";
|
|
512
|
-
BillingProduct2["Enterprise"] = "enterprise";
|
|
513
|
-
BillingProduct2["Community"] = "community";
|
|
514
|
-
BillingProduct2["TeamOct2019Free"] = "team_oct_2019_free";
|
|
515
|
-
BillingProduct2["TeamDec2021"] = "team_dec_2021";
|
|
516
|
-
BillingProduct2["BusinessDec2021"] = "business_dec_2021";
|
|
517
512
|
return BillingProduct2;
|
|
518
513
|
})(BillingProduct || {});
|
|
519
514
|
var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
@@ -853,12 +848,6 @@ var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
|
|
853
848
|
SiteExternalLinksTarget2["Blank"] = "blank";
|
|
854
849
|
return SiteExternalLinksTarget2;
|
|
855
850
|
})(SiteExternalLinksTarget || {});
|
|
856
|
-
var AIMessageRole = /* @__PURE__ */ ((AIMessageRole2) => {
|
|
857
|
-
AIMessageRole2["User"] = "user";
|
|
858
|
-
AIMessageRole2["Assistant"] = "assistant";
|
|
859
|
-
AIMessageRole2["Developer"] = "developer";
|
|
860
|
-
return AIMessageRole2;
|
|
861
|
-
})(AIMessageRole || {});
|
|
862
851
|
var AIModel = /* @__PURE__ */ ((AIModel2) => {
|
|
863
852
|
AIModel2["Fast"] = "fast";
|
|
864
853
|
AIModel2["ReasoningLow"] = "reasoning-low";
|
|
@@ -1055,6 +1044,12 @@ var SiteAdsStatus = /* @__PURE__ */ ((SiteAdsStatus2) => {
|
|
|
1055
1044
|
SiteAdsStatus2["Disabled"] = "disabled";
|
|
1056
1045
|
return SiteAdsStatus2;
|
|
1057
1046
|
})(SiteAdsStatus || {});
|
|
1047
|
+
var AIMessageRole = /* @__PURE__ */ ((AIMessageRole2) => {
|
|
1048
|
+
AIMessageRole2["User"] = "user";
|
|
1049
|
+
AIMessageRole2["Assistant"] = "assistant";
|
|
1050
|
+
AIMessageRole2["Developer"] = "developer";
|
|
1051
|
+
return AIMessageRole2;
|
|
1052
|
+
})(AIMessageRole || {});
|
|
1058
1053
|
var AgentStatus = /* @__PURE__ */ ((AgentStatus2) => {
|
|
1059
1054
|
AgentStatus2["Idle"] = "idle";
|
|
1060
1055
|
AgentStatus2["Processing"] = "processing";
|
|
@@ -1861,6 +1856,14 @@ var Api = class extends HttpClient {
|
|
|
1861
1856
|
format: "json",
|
|
1862
1857
|
...params
|
|
1863
1858
|
}),
|
|
1859
|
+
getChangeRequestChanges: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1860
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/changes`,
|
|
1861
|
+
method: "GET",
|
|
1862
|
+
query,
|
|
1863
|
+
secure: true,
|
|
1864
|
+
format: "json",
|
|
1865
|
+
...params
|
|
1866
|
+
}),
|
|
1864
1867
|
getChangeRequestPdf: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1865
1868
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/pdf`,
|
|
1866
1869
|
method: "GET",
|
|
@@ -3512,6 +3515,45 @@ var Api = class extends HttpClient {
|
|
|
3512
3515
|
secure: true,
|
|
3513
3516
|
format: "json",
|
|
3514
3517
|
...params
|
|
3518
|
+
}),
|
|
3519
|
+
listSiteMcpServers: (organizationId, siteId, query, params = {}) => this.request({
|
|
3520
|
+
path: `/orgs/${organizationId}/sites/${siteId}/mcp-servers`,
|
|
3521
|
+
method: "GET",
|
|
3522
|
+
query,
|
|
3523
|
+
secure: true,
|
|
3524
|
+
format: "json",
|
|
3525
|
+
...params
|
|
3526
|
+
}),
|
|
3527
|
+
createSiteMcpServer: (organizationId, siteId, data, params = {}) => this.request({
|
|
3528
|
+
path: `/orgs/${organizationId}/sites/${siteId}/mcp-servers`,
|
|
3529
|
+
method: "POST",
|
|
3530
|
+
body: data,
|
|
3531
|
+
secure: true,
|
|
3532
|
+
type: "application/json" /* Json */,
|
|
3533
|
+
format: "json",
|
|
3534
|
+
...params
|
|
3535
|
+
}),
|
|
3536
|
+
getSiteMcpServerById: (organizationId, siteId, siteMcpServerId, params = {}) => this.request({
|
|
3537
|
+
path: `/orgs/${organizationId}/sites/${siteId}/mcp-servers/${siteMcpServerId}`,
|
|
3538
|
+
method: "GET",
|
|
3539
|
+
secure: true,
|
|
3540
|
+
format: "json",
|
|
3541
|
+
...params
|
|
3542
|
+
}),
|
|
3543
|
+
updateSiteMcpServerById: (organizationId, siteId, siteMcpServerId, data, params = {}) => this.request({
|
|
3544
|
+
path: `/orgs/${organizationId}/sites/${siteId}/mcp-servers/${siteMcpServerId}`,
|
|
3545
|
+
method: "PATCH",
|
|
3546
|
+
body: data,
|
|
3547
|
+
secure: true,
|
|
3548
|
+
type: "application/json" /* Json */,
|
|
3549
|
+
format: "json",
|
|
3550
|
+
...params
|
|
3551
|
+
}),
|
|
3552
|
+
deleteSiteMcpServerById: (organizationId, siteId, siteMcpServerId, params = {}) => this.request({
|
|
3553
|
+
path: `/orgs/${organizationId}/sites/${siteId}/mcp-servers/${siteMcpServerId}`,
|
|
3554
|
+
method: "DELETE",
|
|
3555
|
+
secure: true,
|
|
3556
|
+
...params
|
|
3515
3557
|
})
|
|
3516
3558
|
};
|
|
3517
3559
|
subdomains = {
|
|
@@ -3754,6 +3796,7 @@ var GitBookAPI = class extends Api {
|
|
|
3754
3796
|
OrganizationUseCase,
|
|
3755
3797
|
PageFeedbackRating,
|
|
3756
3798
|
RevisionPageLayoutOptionsCoverSize,
|
|
3799
|
+
RevisionPageLayoutOptionsWidth,
|
|
3757
3800
|
RevisionPageLayoutPreset,
|
|
3758
3801
|
RevisionPageType,
|
|
3759
3802
|
RevisionSemanticChangeType,
|