@gitbook/api 0.102.0 → 0.104.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 +246 -13
- package/dist/index.cjs +57 -2
- package/dist/index.js +55 -2
- package/package.json +1 -1
- package/spec/openapi.json +811 -10
- package/spec/openapi.yaml +525 -8
package/dist/client.d.ts
CHANGED
|
@@ -105,6 +105,8 @@ export declare enum GitSyncProvider {
|
|
|
105
105
|
GithubLegacy = "github-legacy"
|
|
106
106
|
}
|
|
107
107
|
export interface GitSyncState {
|
|
108
|
+
/** Repository name. */
|
|
109
|
+
repoName?: string;
|
|
108
110
|
/** The provider of the Git Sync installation. */
|
|
109
111
|
installationProvider?: GitSyncProvider;
|
|
110
112
|
/** The integration name providing the Git Sync. */
|
|
@@ -3358,7 +3360,13 @@ export type SiteBasename = string;
|
|
|
3358
3360
|
* @maxLength 512
|
|
3359
3361
|
* @pattern ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
|
|
3360
3362
|
*/
|
|
3361
|
-
export type
|
|
3363
|
+
export type SiteProxyOrigin = string;
|
|
3364
|
+
export interface SiteProxy {
|
|
3365
|
+
/** Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc. */
|
|
3366
|
+
origin: SiteProxyOrigin;
|
|
3367
|
+
/** The target URL to which the requests at the origin URL should be proxied to. */
|
|
3368
|
+
target: string;
|
|
3369
|
+
}
|
|
3362
3370
|
/**
|
|
3363
3371
|
* The visibility setting of the site determines the audience of the site.
|
|
3364
3372
|
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
@@ -3405,7 +3413,6 @@ export declare enum SiteCustomizationFeature {
|
|
|
3405
3413
|
HeaderLogo = "header-logo",
|
|
3406
3414
|
ThemePreset = "theme-preset",
|
|
3407
3415
|
PremiumFonts = "premium-fonts",
|
|
3408
|
-
CustomFonts = "custom-fonts",
|
|
3409
3416
|
CustomIcons = "custom-icons",
|
|
3410
3417
|
FooterLogo = "footer-logo",
|
|
3411
3418
|
FooterLinks = "footer-links",
|
|
@@ -3415,7 +3422,7 @@ export declare enum SiteCustomizationFeature {
|
|
|
3415
3422
|
/** A site feature and the plan it is available on. */
|
|
3416
3423
|
export type SiteFeature = {
|
|
3417
3424
|
/** The feature identifier, matching the feature table keys in the pricing definition */
|
|
3418
|
-
id: 'sites-sections' | 'sites-visitor-authentication' | 'sites-adaptive-content' | 'sites-redirects' | 'sites-custom-domain' | 'sites-ai-search' | 'sites-pdf-export' | 'sites-page-feedback' | 'sites-unlisted-visibility' | 'sites-share-links';
|
|
3425
|
+
id: 'sites-sections' | 'sites-visitor-authentication' | 'sites-adaptive-content' | 'sites-redirects' | 'sites-custom-domain' | 'sites-ai-search' | 'sites-pdf-export' | 'sites-page-feedback' | 'sites-unlisted-visibility' | 'sites-share-links' | 'sites-custom-fonts';
|
|
3419
3426
|
/** The type of the site */
|
|
3420
3427
|
plan: SiteType;
|
|
3421
3428
|
/** A frozen feature is still enabled but cannot be changed or modified. */
|
|
@@ -3442,7 +3449,6 @@ export interface Site {
|
|
|
3442
3449
|
hostname?: SiteHostname;
|
|
3443
3450
|
/** Basename for the site. For e.g. api */
|
|
3444
3451
|
basename?: SiteBasename;
|
|
3445
|
-
/** Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc. */
|
|
3446
3452
|
proxy?: SiteProxy;
|
|
3447
3453
|
/**
|
|
3448
3454
|
* The visibility setting of the site determines the audience of the site.
|
|
@@ -4125,6 +4131,8 @@ export interface FontFace {
|
|
|
4125
4131
|
export interface CustomizationFontDefinition {
|
|
4126
4132
|
/** A globally unique identifier for the font definition. */
|
|
4127
4133
|
id: string;
|
|
4134
|
+
/** Whether the font is a custom font. If false, this font is provided by GitBook. */
|
|
4135
|
+
custom: boolean;
|
|
4128
4136
|
/** The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display"). */
|
|
4129
4137
|
fontFamily: FontFamily;
|
|
4130
4138
|
/**
|
|
@@ -4282,8 +4290,10 @@ export declare enum CustomizationHeaderPreset {
|
|
|
4282
4290
|
Custom = "custom",
|
|
4283
4291
|
None = "none"
|
|
4284
4292
|
}
|
|
4293
|
+
/** @maxLength 64 */
|
|
4294
|
+
export type CustomizationContentLinkTitle = string;
|
|
4285
4295
|
export interface CustomizationContentLink {
|
|
4286
|
-
title:
|
|
4296
|
+
title: CustomizationContentLinkTitle;
|
|
4287
4297
|
/** A relative reference to content in GitBook. */
|
|
4288
4298
|
to: ContentRef;
|
|
4289
4299
|
}
|
|
@@ -4297,15 +4307,17 @@ export interface CustomizationFooterGroup {
|
|
|
4297
4307
|
title: string;
|
|
4298
4308
|
links: CustomizationContentLink[];
|
|
4299
4309
|
}
|
|
4310
|
+
/**
|
|
4311
|
+
* The text content of the announcement.
|
|
4312
|
+
* @minLength 2
|
|
4313
|
+
* @maxLength 128
|
|
4314
|
+
*/
|
|
4315
|
+
export type CustomizationAnnouncementMessage = string;
|
|
4300
4316
|
export interface CustomizationAnnouncement {
|
|
4301
4317
|
/** Whether to show the site's announcement. */
|
|
4302
4318
|
enabled: boolean;
|
|
4303
|
-
/**
|
|
4304
|
-
|
|
4305
|
-
* @minLength 2
|
|
4306
|
-
* @maxLength 128
|
|
4307
|
-
*/
|
|
4308
|
-
message: string;
|
|
4319
|
+
/** The text content of the announcement. */
|
|
4320
|
+
message: CustomizationAnnouncementMessage;
|
|
4309
4321
|
/** The content or URL the announcement links to when clicked. */
|
|
4310
4322
|
link?: CustomizationContentLink;
|
|
4311
4323
|
/** The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner. */
|
|
@@ -4566,6 +4578,122 @@ export interface UserSitePermission {
|
|
|
4566
4578
|
/** The content or organization that enforced this permission level. */
|
|
4567
4579
|
origin: SpacePointer | OrganizationPointer;
|
|
4568
4580
|
}
|
|
4581
|
+
export declare enum AIMessageRole {
|
|
4582
|
+
User = "user",
|
|
4583
|
+
Developer = "developer"
|
|
4584
|
+
}
|
|
4585
|
+
/** Attachment to attach search results to a message. */
|
|
4586
|
+
export interface AIMessageAttachmentSearch {
|
|
4587
|
+
type: 'search';
|
|
4588
|
+
/** The query to use to extract the knowledge. */
|
|
4589
|
+
query: string;
|
|
4590
|
+
}
|
|
4591
|
+
/** Attachment representing the profile of the visitor */
|
|
4592
|
+
export interface AIMessageAttachmentVisitorProfile {
|
|
4593
|
+
type: 'visitor_profile';
|
|
4594
|
+
}
|
|
4595
|
+
/** Attachment to extract and pass the content of a page to the AI. */
|
|
4596
|
+
export interface AIMessageAttachmentPage {
|
|
4597
|
+
type: 'page';
|
|
4598
|
+
/** The ID of the space to extract the content from. */
|
|
4599
|
+
spaceId: string;
|
|
4600
|
+
/** The ID of the page to extract the content from. */
|
|
4601
|
+
pageId: string;
|
|
4602
|
+
}
|
|
4603
|
+
/** Attachment to pass the tree of pages to the AI */
|
|
4604
|
+
export interface AIMessageAttachmentPages {
|
|
4605
|
+
type: 'pages';
|
|
4606
|
+
/** The ID of the space to extract the content from. */
|
|
4607
|
+
spaceId: string;
|
|
4608
|
+
}
|
|
4609
|
+
export type AIMessageAttachment = AIMessageAttachmentSearch | AIMessageAttachmentVisitorProfile | AIMessageAttachmentPage | AIMessageAttachmentPages;
|
|
4610
|
+
export interface AIMessageInput {
|
|
4611
|
+
role: AIMessageRole;
|
|
4612
|
+
content: string | JSONDocument;
|
|
4613
|
+
attachments?: AIMessageAttachment[];
|
|
4614
|
+
}
|
|
4615
|
+
/** Indicate that the AI should response with a JSON object corresponding to the provided schema. */
|
|
4616
|
+
export interface AIOutputObject {
|
|
4617
|
+
type: 'object';
|
|
4618
|
+
/** The JSON schema to use for the object. */
|
|
4619
|
+
schema: object;
|
|
4620
|
+
}
|
|
4621
|
+
/** Indicate that the AI should respond with a rich text document. */
|
|
4622
|
+
export interface AIOutputDocument {
|
|
4623
|
+
type: 'document';
|
|
4624
|
+
}
|
|
4625
|
+
export type AIOutputFormat = AIOutputObject | AIOutputDocument;
|
|
4626
|
+
export declare enum AIModel {
|
|
4627
|
+
Fast = "fast",
|
|
4628
|
+
ReasoningLow = "reasoning-low",
|
|
4629
|
+
ReasoningMedium = "reasoning-medium",
|
|
4630
|
+
ReasoningHigh = "reasoning-high"
|
|
4631
|
+
}
|
|
4632
|
+
/** Tools provided to the AI */
|
|
4633
|
+
export interface AIToolCapabilities {
|
|
4634
|
+
/** Whether the AI can read the content of a page */
|
|
4635
|
+
getPageContent?: boolean;
|
|
4636
|
+
/** Whether the AI can read the table of contents of a space */
|
|
4637
|
+
getPages?: boolean;
|
|
4638
|
+
/** Whether the AI can search for content */
|
|
4639
|
+
search?: boolean;
|
|
4640
|
+
}
|
|
4641
|
+
/** 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. */
|
|
4642
|
+
export interface AIStreamResponseFinish {
|
|
4643
|
+
type: 'response_finish';
|
|
4644
|
+
/** The ID of the response */
|
|
4645
|
+
responseId: string;
|
|
4646
|
+
}
|
|
4647
|
+
/** Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block. */
|
|
4648
|
+
export interface AIStreamResponseDocument {
|
|
4649
|
+
type: 'response_document';
|
|
4650
|
+
operation: 'insert' | 'update';
|
|
4651
|
+
blocks: DocumentBlock[];
|
|
4652
|
+
}
|
|
4653
|
+
/** Message emitted by the server to indicate a chunk of the JSON object response. */
|
|
4654
|
+
export interface AIStreamResponseObject {
|
|
4655
|
+
type: 'response_object';
|
|
4656
|
+
/** The chunk of the JSON object response */
|
|
4657
|
+
jsonChunk: string;
|
|
4658
|
+
}
|
|
4659
|
+
export interface AIToolCallGetPageContent {
|
|
4660
|
+
tool: 'getPageContent';
|
|
4661
|
+
/** The ID of the space being accessed. */
|
|
4662
|
+
spaceId: string;
|
|
4663
|
+
page: ChangedRevisionPage;
|
|
4664
|
+
}
|
|
4665
|
+
export interface AIToolCallGetPages {
|
|
4666
|
+
tool: 'getPages';
|
|
4667
|
+
/** The ID of the space being accessed. */
|
|
4668
|
+
spaceId: string;
|
|
4669
|
+
}
|
|
4670
|
+
/** Result of a search */
|
|
4671
|
+
export interface AIToolCallSearchResult {
|
|
4672
|
+
/** The ID of the space */
|
|
4673
|
+
spaceId: string;
|
|
4674
|
+
/** The ID of the page */
|
|
4675
|
+
pageId: string;
|
|
4676
|
+
/** The anchor of the result */
|
|
4677
|
+
anchor?: string;
|
|
4678
|
+
/** The title of the result */
|
|
4679
|
+
title: string;
|
|
4680
|
+
/** The description of the result */
|
|
4681
|
+
description?: string;
|
|
4682
|
+
}
|
|
4683
|
+
/** Tool to search for content */
|
|
4684
|
+
export interface AIToolCallSearch {
|
|
4685
|
+
tool: 'search';
|
|
4686
|
+
/** The query that has been searched for. */
|
|
4687
|
+
query: string;
|
|
4688
|
+
results: AIToolCallSearchResult[];
|
|
4689
|
+
}
|
|
4690
|
+
export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch;
|
|
4691
|
+
/** Message emitted by the server to indicate that the AI has called a tool. */
|
|
4692
|
+
export interface AIStreamResponseToolCall {
|
|
4693
|
+
type: 'response_tool_call';
|
|
4694
|
+
toolCall: AIToolCall;
|
|
4695
|
+
}
|
|
4696
|
+
export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall;
|
|
4569
4697
|
/** Analytics info on the GitBook's site session. */
|
|
4570
4698
|
export interface SiteInsightsEventSession {
|
|
4571
4699
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -5078,6 +5206,18 @@ export interface SiteRedirect {
|
|
|
5078
5206
|
source: SiteRedirectSourcePath;
|
|
5079
5207
|
destination: SiteRedirectDestination;
|
|
5080
5208
|
}
|
|
5209
|
+
export interface Subdomain {
|
|
5210
|
+
object: 'subdomain';
|
|
5211
|
+
/**
|
|
5212
|
+
* The GitBook subdomain, for example "my-company" in "my-company.gitbook.io"
|
|
5213
|
+
* @minLength 3
|
|
5214
|
+
* @maxLength 32
|
|
5215
|
+
* @pattern ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
|
|
5216
|
+
*/
|
|
5217
|
+
subdomain: string;
|
|
5218
|
+
target: OrganizationPointer;
|
|
5219
|
+
isActive: boolean;
|
|
5220
|
+
}
|
|
5081
5221
|
export declare enum CustomHostnameDnsStatus {
|
|
5082
5222
|
DnsPassed = "dns_passed",
|
|
5083
5223
|
DnsWrongCname = "dns_wrong_cname",
|
|
@@ -5299,6 +5439,8 @@ export interface PublishedSiteContent {
|
|
|
5299
5439
|
complete: boolean;
|
|
5300
5440
|
/** Context returned only for a visitor authentication session to track changes in the visitor session context that affect content rendering (used for cache invalidation). */
|
|
5301
5441
|
contextId?: string;
|
|
5442
|
+
/** The canonical URL of the resolution. */
|
|
5443
|
+
canonicalUrl: string;
|
|
5302
5444
|
}
|
|
5303
5445
|
export type PublishedSiteContentLookup = {
|
|
5304
5446
|
/** Type of target for the redirect */
|
|
@@ -5919,8 +6061,12 @@ export interface OpenAPISpecChannel {
|
|
|
5919
6061
|
channel: 'openapi-spec';
|
|
5920
6062
|
openAPISpec: string;
|
|
5921
6063
|
}
|
|
6064
|
+
export interface SubdomainChannel {
|
|
6065
|
+
channel: 'subdomain';
|
|
6066
|
+
subdomain: string;
|
|
6067
|
+
}
|
|
5922
6068
|
/** Channel to subscribe to for realtime updates. */
|
|
5923
|
-
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | 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 | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel;
|
|
6069
|
+
export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | 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 | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel;
|
|
5924
6070
|
export interface GitSyncOperationChannelData {
|
|
5925
6071
|
channel: 'space-gitsync-operation';
|
|
5926
6072
|
data: GitSyncOperation;
|
|
@@ -9224,6 +9370,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9224
9370
|
* @secure
|
|
9225
9371
|
*/
|
|
9226
9372
|
createOrganizationInvite: (organizationId: string, data: CreateOrganizationInvite, params?: RequestParams) => Promise<HttpResponse<OrganizationInviteLink, Error>>;
|
|
9373
|
+
/**
|
|
9374
|
+
* No description
|
|
9375
|
+
*
|
|
9376
|
+
* @tags organizations
|
|
9377
|
+
* @name GetOrganizationInviteLink
|
|
9378
|
+
* @summary Get an invite link to an organization
|
|
9379
|
+
* @request GET:/orgs/{organizationId}/link-invites/{inviteId}
|
|
9380
|
+
* @secure
|
|
9381
|
+
*/
|
|
9382
|
+
getOrganizationInviteLink: (organizationId: string, inviteId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationInviteLink, Error>>;
|
|
9227
9383
|
/**
|
|
9228
9384
|
* No description
|
|
9229
9385
|
*
|
|
@@ -9919,6 +10075,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9919
10075
|
message: string;
|
|
9920
10076
|
};
|
|
9921
10077
|
}>>;
|
|
10078
|
+
/**
|
|
10079
|
+
* No description
|
|
10080
|
+
*
|
|
10081
|
+
* @tags organizations
|
|
10082
|
+
* @name GetCustomFont
|
|
10083
|
+
* @summary Get a custom font by its id
|
|
10084
|
+
* @request GET:/orgs/{organizationId}/fonts/{fontId}
|
|
10085
|
+
* @secure
|
|
10086
|
+
*/
|
|
10087
|
+
getCustomFont: (organizationId: string, fontId: string, params?: RequestParams) => Promise<HttpResponse<CustomizationFontDefinition, Error | {
|
|
10088
|
+
error: {
|
|
10089
|
+
/** @format int32 */
|
|
10090
|
+
code: 404;
|
|
10091
|
+
message: string;
|
|
10092
|
+
};
|
|
10093
|
+
}>>;
|
|
10094
|
+
/**
|
|
10095
|
+
* No description
|
|
10096
|
+
*
|
|
10097
|
+
* @tags organizations
|
|
10098
|
+
* @name UpdateCustomFont
|
|
10099
|
+
* @summary Update a custom font
|
|
10100
|
+
* @request POST:/orgs/{organizationId}/fonts/{fontId}
|
|
10101
|
+
* @secure
|
|
10102
|
+
*/
|
|
10103
|
+
updateCustomFont: (organizationId: string, fontId: string, data: {
|
|
10104
|
+
/** The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display"). */
|
|
10105
|
+
fontFamily?: FontFamily;
|
|
10106
|
+
/** Array of font faces specifying weights and their corresponding storage keys. Passing null as the storage key will remove that weight. */
|
|
10107
|
+
fontFaces?: {
|
|
10108
|
+
/** Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black). */
|
|
10109
|
+
weight: FontWeight;
|
|
10110
|
+
storageKey: StorageFileKey | null;
|
|
10111
|
+
}[];
|
|
10112
|
+
}, params?: RequestParams) => Promise<HttpResponse<CustomizationFontDefinition, Error | {
|
|
10113
|
+
error: {
|
|
10114
|
+
/** @format int32 */
|
|
10115
|
+
code: 404;
|
|
10116
|
+
message: string;
|
|
10117
|
+
};
|
|
10118
|
+
} | {
|
|
10119
|
+
error: {
|
|
10120
|
+
/** @format int32 */
|
|
10121
|
+
code: 412;
|
|
10122
|
+
message: string;
|
|
10123
|
+
};
|
|
10124
|
+
}>>;
|
|
9922
10125
|
/**
|
|
9923
10126
|
* No description
|
|
9924
10127
|
*
|
|
@@ -10036,7 +10239,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10036
10239
|
* Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like `https://company.com/docs`.
|
|
10037
10240
|
* Use `null` to remove the proxy.
|
|
10038
10241
|
*/
|
|
10039
|
-
proxy?:
|
|
10242
|
+
proxy?: SiteProxyOrigin | null;
|
|
10040
10243
|
}, params?: RequestParams) => Promise<HttpResponse<Site, Error>>;
|
|
10041
10244
|
/**
|
|
10042
10245
|
* No description
|
|
@@ -10869,6 +11072,24 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10869
11072
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
10870
11073
|
items: UserSitePermission[];
|
|
10871
11074
|
}, Error>>;
|
|
11075
|
+
/**
|
|
11076
|
+
* @description Experimental operation to generate an AI response in a site.
|
|
11077
|
+
*
|
|
11078
|
+
* @tags sites
|
|
11079
|
+
* @name StreamAiResponseInSite
|
|
11080
|
+
* @summary Generate an AI response in a site
|
|
11081
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/ai/response
|
|
11082
|
+
* @secure
|
|
11083
|
+
*/
|
|
11084
|
+
streamAiResponseInSite: (organizationId: string, siteId: string, data: {
|
|
11085
|
+
/** The ID of the previous response to continue from */
|
|
11086
|
+
previousResponseId?: string;
|
|
11087
|
+
input: AIMessageInput[];
|
|
11088
|
+
output: AIOutputFormat;
|
|
11089
|
+
model?: AIModel;
|
|
11090
|
+
/** Tools provided to the AI */
|
|
11091
|
+
tools?: AIToolCapabilities;
|
|
11092
|
+
}, params?: RequestParams) => EventIterator<AIStreamResponse>;
|
|
10872
11093
|
/**
|
|
10873
11094
|
* @description Track events in a site.
|
|
10874
11095
|
*
|
|
@@ -11002,6 +11223,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11002
11223
|
};
|
|
11003
11224
|
}>>;
|
|
11004
11225
|
};
|
|
11226
|
+
subdomains: {
|
|
11227
|
+
/**
|
|
11228
|
+
* No description
|
|
11229
|
+
*
|
|
11230
|
+
* @tags subdomains
|
|
11231
|
+
* @name GetSubdomain
|
|
11232
|
+
* @summary Get the details about a subdomain.
|
|
11233
|
+
* @request GET:/subdomains/{subdomain}
|
|
11234
|
+
* @secure
|
|
11235
|
+
*/
|
|
11236
|
+
getSubdomain: (subdomain: string, params?: RequestParams) => Promise<HttpResponse<Subdomain, Error>>;
|
|
11237
|
+
};
|
|
11005
11238
|
customHostnames: {
|
|
11006
11239
|
/**
|
|
11007
11240
|
* No description
|
package/dist/index.cjs
CHANGED
|
@@ -179,6 +179,8 @@ var require_node = __commonJS({
|
|
|
179
179
|
// src/index.ts
|
|
180
180
|
var src_exports = {};
|
|
181
181
|
__export(src_exports, {
|
|
182
|
+
AIMessageRole: () => AIMessageRole,
|
|
183
|
+
AIModel: () => AIModel,
|
|
182
184
|
APIIntegrationScope: () => APIIntegrationScope,
|
|
183
185
|
Api: () => Api,
|
|
184
186
|
BillingInterval: () => BillingInterval,
|
|
@@ -265,7 +267,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
265
267
|
|
|
266
268
|
// package.json
|
|
267
269
|
var name = "@gitbook/api";
|
|
268
|
-
var version = "0.
|
|
270
|
+
var version = "0.104.0";
|
|
269
271
|
|
|
270
272
|
// src/client.ts
|
|
271
273
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -652,7 +654,6 @@ var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
|
|
|
652
654
|
SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
|
|
653
655
|
SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
|
|
654
656
|
SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
|
|
655
|
-
SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
|
|
656
657
|
SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
|
|
657
658
|
SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
|
|
658
659
|
SiteCustomizationFeature2["FooterLinks"] = "footer-links";
|
|
@@ -763,6 +764,18 @@ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
|
|
|
763
764
|
CustomizationThemeMode2["Dark"] = "dark";
|
|
764
765
|
return CustomizationThemeMode2;
|
|
765
766
|
})(CustomizationThemeMode || {});
|
|
767
|
+
var AIMessageRole = /* @__PURE__ */ ((AIMessageRole2) => {
|
|
768
|
+
AIMessageRole2["User"] = "user";
|
|
769
|
+
AIMessageRole2["Developer"] = "developer";
|
|
770
|
+
return AIMessageRole2;
|
|
771
|
+
})(AIMessageRole || {});
|
|
772
|
+
var AIModel = /* @__PURE__ */ ((AIModel2) => {
|
|
773
|
+
AIModel2["Fast"] = "fast";
|
|
774
|
+
AIModel2["ReasoningLow"] = "reasoning-low";
|
|
775
|
+
AIModel2["ReasoningMedium"] = "reasoning-medium";
|
|
776
|
+
AIModel2["ReasoningHigh"] = "reasoning-high";
|
|
777
|
+
return AIModel2;
|
|
778
|
+
})(AIModel || {});
|
|
766
779
|
var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
767
780
|
PageFeedbackRating2["Bad"] = "bad";
|
|
768
781
|
PageFeedbackRating2["Ok"] = "ok";
|
|
@@ -2483,6 +2496,13 @@ var Api = class extends HttpClient {
|
|
|
2483
2496
|
format: "json",
|
|
2484
2497
|
...params
|
|
2485
2498
|
}),
|
|
2499
|
+
getOrganizationInviteLink: (organizationId, inviteId, params = {}) => this.request({
|
|
2500
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2501
|
+
method: "GET",
|
|
2502
|
+
secure: true,
|
|
2503
|
+
format: "json",
|
|
2504
|
+
...params
|
|
2505
|
+
}),
|
|
2486
2506
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2487
2507
|
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2488
2508
|
method: "PATCH",
|
|
@@ -2777,6 +2797,22 @@ var Api = class extends HttpClient {
|
|
|
2777
2797
|
format: "json",
|
|
2778
2798
|
...params
|
|
2779
2799
|
}),
|
|
2800
|
+
getCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2801
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2802
|
+
method: "GET",
|
|
2803
|
+
secure: true,
|
|
2804
|
+
format: "json",
|
|
2805
|
+
...params
|
|
2806
|
+
}),
|
|
2807
|
+
updateCustomFont: (organizationId, fontId, data, params = {}) => this.request({
|
|
2808
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2809
|
+
method: "POST",
|
|
2810
|
+
body: data,
|
|
2811
|
+
secure: true,
|
|
2812
|
+
type: "application/json" /* Json */,
|
|
2813
|
+
format: "json",
|
|
2814
|
+
...params
|
|
2815
|
+
}),
|
|
2780
2816
|
deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2781
2817
|
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2782
2818
|
method: "DELETE",
|
|
@@ -3141,6 +3177,14 @@ var Api = class extends HttpClient {
|
|
|
3141
3177
|
format: "json",
|
|
3142
3178
|
...params
|
|
3143
3179
|
}),
|
|
3180
|
+
streamAiResponseInSite: (organizationId, siteId, data, params = {}) => this.streamRequest({
|
|
3181
|
+
path: `/orgs/${organizationId}/sites/${siteId}/ai/response`,
|
|
3182
|
+
method: "POST",
|
|
3183
|
+
body: data,
|
|
3184
|
+
secure: true,
|
|
3185
|
+
type: "application/json" /* Json */,
|
|
3186
|
+
...params
|
|
3187
|
+
}),
|
|
3144
3188
|
trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
|
|
3145
3189
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
|
|
3146
3190
|
method: "POST",
|
|
@@ -3214,6 +3258,15 @@ var Api = class extends HttpClient {
|
|
|
3214
3258
|
...params
|
|
3215
3259
|
})
|
|
3216
3260
|
};
|
|
3261
|
+
subdomains = {
|
|
3262
|
+
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3263
|
+
path: `/subdomains/${subdomain}`,
|
|
3264
|
+
method: "GET",
|
|
3265
|
+
secure: true,
|
|
3266
|
+
format: "json",
|
|
3267
|
+
...params
|
|
3268
|
+
})
|
|
3269
|
+
};
|
|
3217
3270
|
customHostnames = {
|
|
3218
3271
|
getCustomHostname: (hostname, params = {}) => this.request({
|
|
3219
3272
|
path: `/custom-hostnames/${hostname}`,
|
|
@@ -3365,6 +3418,8 @@ var GitBookAPI = class extends Api {
|
|
|
3365
3418
|
};
|
|
3366
3419
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3367
3420
|
0 && (module.exports = {
|
|
3421
|
+
AIMessageRole,
|
|
3422
|
+
AIModel,
|
|
3368
3423
|
APIIntegrationScope,
|
|
3369
3424
|
Api,
|
|
3370
3425
|
BillingInterval,
|
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.
|
|
175
|
+
var version = "0.104.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -559,7 +559,6 @@ var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
|
|
|
559
559
|
SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
|
|
560
560
|
SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
|
|
561
561
|
SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
|
|
562
|
-
SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
|
|
563
562
|
SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
|
|
564
563
|
SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
|
|
565
564
|
SiteCustomizationFeature2["FooterLinks"] = "footer-links";
|
|
@@ -670,6 +669,18 @@ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
|
|
|
670
669
|
CustomizationThemeMode2["Dark"] = "dark";
|
|
671
670
|
return CustomizationThemeMode2;
|
|
672
671
|
})(CustomizationThemeMode || {});
|
|
672
|
+
var AIMessageRole = /* @__PURE__ */ ((AIMessageRole2) => {
|
|
673
|
+
AIMessageRole2["User"] = "user";
|
|
674
|
+
AIMessageRole2["Developer"] = "developer";
|
|
675
|
+
return AIMessageRole2;
|
|
676
|
+
})(AIMessageRole || {});
|
|
677
|
+
var AIModel = /* @__PURE__ */ ((AIModel2) => {
|
|
678
|
+
AIModel2["Fast"] = "fast";
|
|
679
|
+
AIModel2["ReasoningLow"] = "reasoning-low";
|
|
680
|
+
AIModel2["ReasoningMedium"] = "reasoning-medium";
|
|
681
|
+
AIModel2["ReasoningHigh"] = "reasoning-high";
|
|
682
|
+
return AIModel2;
|
|
683
|
+
})(AIModel || {});
|
|
673
684
|
var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
674
685
|
PageFeedbackRating2["Bad"] = "bad";
|
|
675
686
|
PageFeedbackRating2["Ok"] = "ok";
|
|
@@ -2390,6 +2401,13 @@ var Api = class extends HttpClient {
|
|
|
2390
2401
|
format: "json",
|
|
2391
2402
|
...params
|
|
2392
2403
|
}),
|
|
2404
|
+
getOrganizationInviteLink: (organizationId, inviteId, params = {}) => this.request({
|
|
2405
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2406
|
+
method: "GET",
|
|
2407
|
+
secure: true,
|
|
2408
|
+
format: "json",
|
|
2409
|
+
...params
|
|
2410
|
+
}),
|
|
2393
2411
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2394
2412
|
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2395
2413
|
method: "PATCH",
|
|
@@ -2684,6 +2702,22 @@ var Api = class extends HttpClient {
|
|
|
2684
2702
|
format: "json",
|
|
2685
2703
|
...params
|
|
2686
2704
|
}),
|
|
2705
|
+
getCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2706
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2707
|
+
method: "GET",
|
|
2708
|
+
secure: true,
|
|
2709
|
+
format: "json",
|
|
2710
|
+
...params
|
|
2711
|
+
}),
|
|
2712
|
+
updateCustomFont: (organizationId, fontId, data, params = {}) => this.request({
|
|
2713
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2714
|
+
method: "POST",
|
|
2715
|
+
body: data,
|
|
2716
|
+
secure: true,
|
|
2717
|
+
type: "application/json" /* Json */,
|
|
2718
|
+
format: "json",
|
|
2719
|
+
...params
|
|
2720
|
+
}),
|
|
2687
2721
|
deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2688
2722
|
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2689
2723
|
method: "DELETE",
|
|
@@ -3048,6 +3082,14 @@ var Api = class extends HttpClient {
|
|
|
3048
3082
|
format: "json",
|
|
3049
3083
|
...params
|
|
3050
3084
|
}),
|
|
3085
|
+
streamAiResponseInSite: (organizationId, siteId, data, params = {}) => this.streamRequest({
|
|
3086
|
+
path: `/orgs/${organizationId}/sites/${siteId}/ai/response`,
|
|
3087
|
+
method: "POST",
|
|
3088
|
+
body: data,
|
|
3089
|
+
secure: true,
|
|
3090
|
+
type: "application/json" /* Json */,
|
|
3091
|
+
...params
|
|
3092
|
+
}),
|
|
3051
3093
|
trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
|
|
3052
3094
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
|
|
3053
3095
|
method: "POST",
|
|
@@ -3121,6 +3163,15 @@ var Api = class extends HttpClient {
|
|
|
3121
3163
|
...params
|
|
3122
3164
|
})
|
|
3123
3165
|
};
|
|
3166
|
+
subdomains = {
|
|
3167
|
+
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3168
|
+
path: `/subdomains/${subdomain}`,
|
|
3169
|
+
method: "GET",
|
|
3170
|
+
secure: true,
|
|
3171
|
+
format: "json",
|
|
3172
|
+
...params
|
|
3173
|
+
})
|
|
3174
|
+
};
|
|
3124
3175
|
customHostnames = {
|
|
3125
3176
|
getCustomHostname: (hostname, params = {}) => this.request({
|
|
3126
3177
|
path: `/custom-hostnames/${hostname}`,
|
|
@@ -3271,6 +3322,8 @@ var GitBookAPI = class extends Api {
|
|
|
3271
3322
|
}
|
|
3272
3323
|
};
|
|
3273
3324
|
export {
|
|
3325
|
+
AIMessageRole,
|
|
3326
|
+
AIModel,
|
|
3274
3327
|
APIIntegrationScope,
|
|
3275
3328
|
Api,
|
|
3276
3329
|
BillingInterval,
|