@gitbook/api 0.103.0 → 0.105.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 +175 -36
- package/dist/index.cjs +34 -2
- package/dist/index.js +34 -2
- package/package.json +1 -1
- package/spec/openapi.json +495 -51
- package/spec/openapi.yaml +320 -40
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. */
|
|
@@ -4570,9 +4582,9 @@ export declare enum AIMessageRole {
|
|
|
4570
4582
|
User = "user",
|
|
4571
4583
|
Developer = "developer"
|
|
4572
4584
|
}
|
|
4573
|
-
/** Attachment to
|
|
4574
|
-
export interface
|
|
4575
|
-
type: '
|
|
4585
|
+
/** Attachment to attach search results to a message. */
|
|
4586
|
+
export interface AIMessageAttachmentSearch {
|
|
4587
|
+
type: 'search';
|
|
4576
4588
|
/** The query to use to extract the knowledge. */
|
|
4577
4589
|
query: string;
|
|
4578
4590
|
}
|
|
@@ -4580,52 +4592,52 @@ export interface AIMessageAttachmentKnowledge {
|
|
|
4580
4592
|
export interface AIMessageAttachmentVisitorProfile {
|
|
4581
4593
|
type: 'visitor_profile';
|
|
4582
4594
|
}
|
|
4583
|
-
/** Attachment to extract and pass the content of a page to the AI */
|
|
4595
|
+
/** Attachment to extract and pass the content of a page to the AI. */
|
|
4584
4596
|
export interface AIMessageAttachmentPage {
|
|
4585
4597
|
type: 'page';
|
|
4586
|
-
/** The ID of the space to extract the content from */
|
|
4598
|
+
/** The ID of the space to extract the content from. */
|
|
4587
4599
|
spaceId: string;
|
|
4588
|
-
/** The ID of the
|
|
4589
|
-
revisionId: string;
|
|
4590
|
-
/** The ID of the page to extract the content from */
|
|
4600
|
+
/** The ID of the page to extract the content from. */
|
|
4591
4601
|
pageId: string;
|
|
4592
4602
|
}
|
|
4593
4603
|
/** Attachment to pass the tree of pages to the AI */
|
|
4594
4604
|
export interface AIMessageAttachmentPages {
|
|
4595
4605
|
type: 'pages';
|
|
4596
|
-
/** The ID of the space to extract the content from */
|
|
4606
|
+
/** The ID of the space to extract the content from. */
|
|
4597
4607
|
spaceId: string;
|
|
4598
|
-
/** The ID of the revision to extract the content from */
|
|
4599
|
-
revisionId: string;
|
|
4600
4608
|
}
|
|
4601
|
-
export type AIMessageAttachment =
|
|
4609
|
+
export type AIMessageAttachment = AIMessageAttachmentSearch | AIMessageAttachmentVisitorProfile | AIMessageAttachmentPage | AIMessageAttachmentPages;
|
|
4602
4610
|
export interface AIMessageInput {
|
|
4603
4611
|
role: AIMessageRole;
|
|
4604
|
-
|
|
4605
|
-
content: string;
|
|
4612
|
+
content: string | JSONDocument;
|
|
4606
4613
|
attachments?: AIMessageAttachment[];
|
|
4607
4614
|
}
|
|
4608
4615
|
/** Indicate that the AI should response with a JSON object corresponding to the provided schema. */
|
|
4609
|
-
export interface
|
|
4616
|
+
export interface AIOutputObject {
|
|
4610
4617
|
type: 'object';
|
|
4611
4618
|
/** The JSON schema to use for the object. */
|
|
4612
|
-
schema:
|
|
4613
|
-
type?: 'object';
|
|
4614
|
-
properties?: any;
|
|
4615
|
-
required?: string[];
|
|
4616
|
-
};
|
|
4619
|
+
schema: object;
|
|
4617
4620
|
}
|
|
4618
4621
|
/** Indicate that the AI should respond with a rich text document. */
|
|
4619
|
-
export interface
|
|
4622
|
+
export interface AIOutputDocument {
|
|
4620
4623
|
type: 'document';
|
|
4621
4624
|
}
|
|
4622
|
-
export type AIOutputFormat =
|
|
4625
|
+
export type AIOutputFormat = AIOutputObject | AIOutputDocument;
|
|
4623
4626
|
export declare enum AIModel {
|
|
4624
4627
|
Fast = "fast",
|
|
4625
4628
|
ReasoningLow = "reasoning-low",
|
|
4626
4629
|
ReasoningMedium = "reasoning-medium",
|
|
4627
4630
|
ReasoningHigh = "reasoning-high"
|
|
4628
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
|
+
}
|
|
4629
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. */
|
|
4630
4642
|
export interface AIStreamResponseFinish {
|
|
4631
4643
|
type: 'response_finish';
|
|
@@ -4644,7 +4656,44 @@ export interface AIStreamResponseObject {
|
|
|
4644
4656
|
/** The chunk of the JSON object response */
|
|
4645
4657
|
jsonChunk: string;
|
|
4646
4658
|
}
|
|
4647
|
-
export
|
|
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;
|
|
4648
4697
|
/** Analytics info on the GitBook's site session. */
|
|
4649
4698
|
export interface SiteInsightsEventSession {
|
|
4650
4699
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -4756,6 +4805,7 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
|
|
|
4756
4805
|
query: string;
|
|
4757
4806
|
};
|
|
4758
4807
|
export declare enum SiteInsightsLinkPosition {
|
|
4808
|
+
Announcement = "announcement",
|
|
4759
4809
|
Header = "header",
|
|
4760
4810
|
Footer = "footer",
|
|
4761
4811
|
Sidebar = "sidebar",
|
|
@@ -5157,6 +5207,18 @@ export interface SiteRedirect {
|
|
|
5157
5207
|
source: SiteRedirectSourcePath;
|
|
5158
5208
|
destination: SiteRedirectDestination;
|
|
5159
5209
|
}
|
|
5210
|
+
export interface Subdomain {
|
|
5211
|
+
object: 'subdomain';
|
|
5212
|
+
/**
|
|
5213
|
+
* The GitBook subdomain, for example "my-company" in "my-company.gitbook.io"
|
|
5214
|
+
* @minLength 3
|
|
5215
|
+
* @maxLength 32
|
|
5216
|
+
* @pattern ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
|
|
5217
|
+
*/
|
|
5218
|
+
subdomain: string;
|
|
5219
|
+
target: OrganizationPointer;
|
|
5220
|
+
isActive: boolean;
|
|
5221
|
+
}
|
|
5160
5222
|
export declare enum CustomHostnameDnsStatus {
|
|
5161
5223
|
DnsPassed = "dns_passed",
|
|
5162
5224
|
DnsWrongCname = "dns_wrong_cname",
|
|
@@ -5378,6 +5440,8 @@ export interface PublishedSiteContent {
|
|
|
5378
5440
|
complete: boolean;
|
|
5379
5441
|
/** Context returned only for a visitor authentication session to track changes in the visitor session context that affect content rendering (used for cache invalidation). */
|
|
5380
5442
|
contextId?: string;
|
|
5443
|
+
/** The canonical URL of the resolution. */
|
|
5444
|
+
canonicalUrl: string;
|
|
5381
5445
|
}
|
|
5382
5446
|
export type PublishedSiteContentLookup = {
|
|
5383
5447
|
/** Type of target for the redirect */
|
|
@@ -5998,8 +6062,12 @@ export interface OpenAPISpecChannel {
|
|
|
5998
6062
|
channel: 'openapi-spec';
|
|
5999
6063
|
openAPISpec: string;
|
|
6000
6064
|
}
|
|
6065
|
+
export interface SubdomainChannel {
|
|
6066
|
+
channel: 'subdomain';
|
|
6067
|
+
subdomain: string;
|
|
6068
|
+
}
|
|
6001
6069
|
/** Channel to subscribe to for realtime updates. */
|
|
6002
|
-
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;
|
|
6070
|
+
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;
|
|
6003
6071
|
export interface GitSyncOperationChannelData {
|
|
6004
6072
|
channel: 'space-gitsync-operation';
|
|
6005
6073
|
data: GitSyncOperation;
|
|
@@ -9303,6 +9371,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9303
9371
|
* @secure
|
|
9304
9372
|
*/
|
|
9305
9373
|
createOrganizationInvite: (organizationId: string, data: CreateOrganizationInvite, params?: RequestParams) => Promise<HttpResponse<OrganizationInviteLink, Error>>;
|
|
9374
|
+
/**
|
|
9375
|
+
* No description
|
|
9376
|
+
*
|
|
9377
|
+
* @tags organizations
|
|
9378
|
+
* @name GetOrganizationInviteLink
|
|
9379
|
+
* @summary Get an invite link to an organization
|
|
9380
|
+
* @request GET:/orgs/{organizationId}/link-invites/{inviteId}
|
|
9381
|
+
* @secure
|
|
9382
|
+
*/
|
|
9383
|
+
getOrganizationInviteLink: (organizationId: string, inviteId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationInviteLink, Error>>;
|
|
9306
9384
|
/**
|
|
9307
9385
|
* No description
|
|
9308
9386
|
*
|
|
@@ -9998,6 +10076,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9998
10076
|
message: string;
|
|
9999
10077
|
};
|
|
10000
10078
|
}>>;
|
|
10079
|
+
/**
|
|
10080
|
+
* No description
|
|
10081
|
+
*
|
|
10082
|
+
* @tags organizations
|
|
10083
|
+
* @name GetCustomFont
|
|
10084
|
+
* @summary Get a custom font by its id
|
|
10085
|
+
* @request GET:/orgs/{organizationId}/fonts/{fontId}
|
|
10086
|
+
* @secure
|
|
10087
|
+
*/
|
|
10088
|
+
getCustomFont: (organizationId: string, fontId: string, params?: RequestParams) => Promise<HttpResponse<CustomizationFontDefinition, Error | {
|
|
10089
|
+
error: {
|
|
10090
|
+
/** @format int32 */
|
|
10091
|
+
code: 404;
|
|
10092
|
+
message: string;
|
|
10093
|
+
};
|
|
10094
|
+
}>>;
|
|
10095
|
+
/**
|
|
10096
|
+
* No description
|
|
10097
|
+
*
|
|
10098
|
+
* @tags organizations
|
|
10099
|
+
* @name UpdateCustomFont
|
|
10100
|
+
* @summary Update a custom font
|
|
10101
|
+
* @request POST:/orgs/{organizationId}/fonts/{fontId}
|
|
10102
|
+
* @secure
|
|
10103
|
+
*/
|
|
10104
|
+
updateCustomFont: (organizationId: string, fontId: string, data: {
|
|
10105
|
+
/** The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display"). */
|
|
10106
|
+
fontFamily?: FontFamily;
|
|
10107
|
+
/** Array of font faces specifying weights and their corresponding storage keys. Passing null as the storage key will remove that weight. */
|
|
10108
|
+
fontFaces?: {
|
|
10109
|
+
/** Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black). */
|
|
10110
|
+
weight: FontWeight;
|
|
10111
|
+
storageKey: StorageFileKey | null;
|
|
10112
|
+
}[];
|
|
10113
|
+
}, params?: RequestParams) => Promise<HttpResponse<CustomizationFontDefinition, Error | {
|
|
10114
|
+
error: {
|
|
10115
|
+
/** @format int32 */
|
|
10116
|
+
code: 404;
|
|
10117
|
+
message: string;
|
|
10118
|
+
};
|
|
10119
|
+
} | {
|
|
10120
|
+
error: {
|
|
10121
|
+
/** @format int32 */
|
|
10122
|
+
code: 412;
|
|
10123
|
+
message: string;
|
|
10124
|
+
};
|
|
10125
|
+
}>>;
|
|
10001
10126
|
/**
|
|
10002
10127
|
* No description
|
|
10003
10128
|
*
|
|
@@ -10115,7 +10240,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10115
10240
|
* 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`.
|
|
10116
10241
|
* Use `null` to remove the proxy.
|
|
10117
10242
|
*/
|
|
10118
|
-
proxy?:
|
|
10243
|
+
proxy?: SiteProxyOrigin | null;
|
|
10119
10244
|
}, params?: RequestParams) => Promise<HttpResponse<Site, Error>>;
|
|
10120
10245
|
/**
|
|
10121
10246
|
* No description
|
|
@@ -10963,6 +11088,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10963
11088
|
input: AIMessageInput[];
|
|
10964
11089
|
output: AIOutputFormat;
|
|
10965
11090
|
model?: AIModel;
|
|
11091
|
+
/** Tools provided to the AI */
|
|
11092
|
+
tools?: AIToolCapabilities;
|
|
10966
11093
|
}, params?: RequestParams) => EventIterator<AIStreamResponse>;
|
|
10967
11094
|
/**
|
|
10968
11095
|
* @description Track events in a site.
|
|
@@ -11097,6 +11224,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11097
11224
|
};
|
|
11098
11225
|
}>>;
|
|
11099
11226
|
};
|
|
11227
|
+
subdomains: {
|
|
11228
|
+
/**
|
|
11229
|
+
* No description
|
|
11230
|
+
*
|
|
11231
|
+
* @tags subdomains
|
|
11232
|
+
* @name GetSubdomain
|
|
11233
|
+
* @summary Get the details about a subdomain.
|
|
11234
|
+
* @request GET:/subdomains/{subdomain}
|
|
11235
|
+
* @secure
|
|
11236
|
+
*/
|
|
11237
|
+
getSubdomain: (subdomain: string, params?: RequestParams) => Promise<HttpResponse<Subdomain, Error>>;
|
|
11238
|
+
};
|
|
11100
11239
|
customHostnames: {
|
|
11101
11240
|
/**
|
|
11102
11241
|
* No description
|
package/dist/index.cjs
CHANGED
|
@@ -267,7 +267,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
267
267
|
|
|
268
268
|
// package.json
|
|
269
269
|
var name = "@gitbook/api";
|
|
270
|
-
var version = "0.
|
|
270
|
+
var version = "0.105.0";
|
|
271
271
|
|
|
272
272
|
// src/client.ts
|
|
273
273
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -654,7 +654,6 @@ var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
|
|
|
654
654
|
SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
|
|
655
655
|
SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
|
|
656
656
|
SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
|
|
657
|
-
SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
|
|
658
657
|
SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
|
|
659
658
|
SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
|
|
660
659
|
SiteCustomizationFeature2["FooterLinks"] = "footer-links";
|
|
@@ -784,6 +783,7 @@ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
|
784
783
|
return PageFeedbackRating2;
|
|
785
784
|
})(PageFeedbackRating || {});
|
|
786
785
|
var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
|
|
786
|
+
SiteInsightsLinkPosition2["Announcement"] = "announcement";
|
|
787
787
|
SiteInsightsLinkPosition2["Header"] = "header";
|
|
788
788
|
SiteInsightsLinkPosition2["Footer"] = "footer";
|
|
789
789
|
SiteInsightsLinkPosition2["Sidebar"] = "sidebar";
|
|
@@ -2497,6 +2497,13 @@ var Api = class extends HttpClient {
|
|
|
2497
2497
|
format: "json",
|
|
2498
2498
|
...params
|
|
2499
2499
|
}),
|
|
2500
|
+
getOrganizationInviteLink: (organizationId, inviteId, params = {}) => this.request({
|
|
2501
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2502
|
+
method: "GET",
|
|
2503
|
+
secure: true,
|
|
2504
|
+
format: "json",
|
|
2505
|
+
...params
|
|
2506
|
+
}),
|
|
2500
2507
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2501
2508
|
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2502
2509
|
method: "PATCH",
|
|
@@ -2791,6 +2798,22 @@ var Api = class extends HttpClient {
|
|
|
2791
2798
|
format: "json",
|
|
2792
2799
|
...params
|
|
2793
2800
|
}),
|
|
2801
|
+
getCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2802
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2803
|
+
method: "GET",
|
|
2804
|
+
secure: true,
|
|
2805
|
+
format: "json",
|
|
2806
|
+
...params
|
|
2807
|
+
}),
|
|
2808
|
+
updateCustomFont: (organizationId, fontId, data, params = {}) => this.request({
|
|
2809
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2810
|
+
method: "POST",
|
|
2811
|
+
body: data,
|
|
2812
|
+
secure: true,
|
|
2813
|
+
type: "application/json" /* Json */,
|
|
2814
|
+
format: "json",
|
|
2815
|
+
...params
|
|
2816
|
+
}),
|
|
2794
2817
|
deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2795
2818
|
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2796
2819
|
method: "DELETE",
|
|
@@ -3236,6 +3259,15 @@ var Api = class extends HttpClient {
|
|
|
3236
3259
|
...params
|
|
3237
3260
|
})
|
|
3238
3261
|
};
|
|
3262
|
+
subdomains = {
|
|
3263
|
+
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3264
|
+
path: `/subdomains/${subdomain}`,
|
|
3265
|
+
method: "GET",
|
|
3266
|
+
secure: true,
|
|
3267
|
+
format: "json",
|
|
3268
|
+
...params
|
|
3269
|
+
})
|
|
3270
|
+
};
|
|
3239
3271
|
customHostnames = {
|
|
3240
3272
|
getCustomHostname: (hostname, params = {}) => this.request({
|
|
3241
3273
|
path: `/custom-hostnames/${hostname}`,
|
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.105.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";
|
|
@@ -689,6 +688,7 @@ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
|
689
688
|
return PageFeedbackRating2;
|
|
690
689
|
})(PageFeedbackRating || {});
|
|
691
690
|
var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
|
|
691
|
+
SiteInsightsLinkPosition2["Announcement"] = "announcement";
|
|
692
692
|
SiteInsightsLinkPosition2["Header"] = "header";
|
|
693
693
|
SiteInsightsLinkPosition2["Footer"] = "footer";
|
|
694
694
|
SiteInsightsLinkPosition2["Sidebar"] = "sidebar";
|
|
@@ -2402,6 +2402,13 @@ var Api = class extends HttpClient {
|
|
|
2402
2402
|
format: "json",
|
|
2403
2403
|
...params
|
|
2404
2404
|
}),
|
|
2405
|
+
getOrganizationInviteLink: (organizationId, inviteId, params = {}) => this.request({
|
|
2406
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2407
|
+
method: "GET",
|
|
2408
|
+
secure: true,
|
|
2409
|
+
format: "json",
|
|
2410
|
+
...params
|
|
2411
|
+
}),
|
|
2405
2412
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2406
2413
|
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2407
2414
|
method: "PATCH",
|
|
@@ -2696,6 +2703,22 @@ var Api = class extends HttpClient {
|
|
|
2696
2703
|
format: "json",
|
|
2697
2704
|
...params
|
|
2698
2705
|
}),
|
|
2706
|
+
getCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2707
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2708
|
+
method: "GET",
|
|
2709
|
+
secure: true,
|
|
2710
|
+
format: "json",
|
|
2711
|
+
...params
|
|
2712
|
+
}),
|
|
2713
|
+
updateCustomFont: (organizationId, fontId, data, params = {}) => this.request({
|
|
2714
|
+
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2715
|
+
method: "POST",
|
|
2716
|
+
body: data,
|
|
2717
|
+
secure: true,
|
|
2718
|
+
type: "application/json" /* Json */,
|
|
2719
|
+
format: "json",
|
|
2720
|
+
...params
|
|
2721
|
+
}),
|
|
2699
2722
|
deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2700
2723
|
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2701
2724
|
method: "DELETE",
|
|
@@ -3141,6 +3164,15 @@ var Api = class extends HttpClient {
|
|
|
3141
3164
|
...params
|
|
3142
3165
|
})
|
|
3143
3166
|
};
|
|
3167
|
+
subdomains = {
|
|
3168
|
+
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3169
|
+
path: `/subdomains/${subdomain}`,
|
|
3170
|
+
method: "GET",
|
|
3171
|
+
secure: true,
|
|
3172
|
+
format: "json",
|
|
3173
|
+
...params
|
|
3174
|
+
})
|
|
3175
|
+
};
|
|
3144
3176
|
customHostnames = {
|
|
3145
3177
|
getCustomHostname: (hostname, params = {}) => this.request({
|
|
3146
3178
|
path: `/custom-hostnames/${hostname}`,
|