@gitbook/api 0.103.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 +174 -36
- package/dist/index.cjs +33 -2
- package/dist/index.js +33 -2
- package/package.json +1 -1
- package/spec/openapi.json +494 -51
- package/spec/openapi.yaml +319 -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. */
|
|
@@ -5157,6 +5206,18 @@ export interface SiteRedirect {
|
|
|
5157
5206
|
source: SiteRedirectSourcePath;
|
|
5158
5207
|
destination: SiteRedirectDestination;
|
|
5159
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
|
+
}
|
|
5160
5221
|
export declare enum CustomHostnameDnsStatus {
|
|
5161
5222
|
DnsPassed = "dns_passed",
|
|
5162
5223
|
DnsWrongCname = "dns_wrong_cname",
|
|
@@ -5378,6 +5439,8 @@ export interface PublishedSiteContent {
|
|
|
5378
5439
|
complete: boolean;
|
|
5379
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). */
|
|
5380
5441
|
contextId?: string;
|
|
5442
|
+
/** The canonical URL of the resolution. */
|
|
5443
|
+
canonicalUrl: string;
|
|
5381
5444
|
}
|
|
5382
5445
|
export type PublishedSiteContentLookup = {
|
|
5383
5446
|
/** Type of target for the redirect */
|
|
@@ -5998,8 +6061,12 @@ export interface OpenAPISpecChannel {
|
|
|
5998
6061
|
channel: 'openapi-spec';
|
|
5999
6062
|
openAPISpec: string;
|
|
6000
6063
|
}
|
|
6064
|
+
export interface SubdomainChannel {
|
|
6065
|
+
channel: 'subdomain';
|
|
6066
|
+
subdomain: string;
|
|
6067
|
+
}
|
|
6001
6068
|
/** 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;
|
|
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;
|
|
6003
6070
|
export interface GitSyncOperationChannelData {
|
|
6004
6071
|
channel: 'space-gitsync-operation';
|
|
6005
6072
|
data: GitSyncOperation;
|
|
@@ -9303,6 +9370,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9303
9370
|
* @secure
|
|
9304
9371
|
*/
|
|
9305
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>>;
|
|
9306
9383
|
/**
|
|
9307
9384
|
* No description
|
|
9308
9385
|
*
|
|
@@ -9998,6 +10075,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9998
10075
|
message: string;
|
|
9999
10076
|
};
|
|
10000
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
|
+
}>>;
|
|
10001
10125
|
/**
|
|
10002
10126
|
* No description
|
|
10003
10127
|
*
|
|
@@ -10115,7 +10239,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10115
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`.
|
|
10116
10240
|
* Use `null` to remove the proxy.
|
|
10117
10241
|
*/
|
|
10118
|
-
proxy?:
|
|
10242
|
+
proxy?: SiteProxyOrigin | null;
|
|
10119
10243
|
}, params?: RequestParams) => Promise<HttpResponse<Site, Error>>;
|
|
10120
10244
|
/**
|
|
10121
10245
|
* No description
|
|
@@ -10963,6 +11087,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10963
11087
|
input: AIMessageInput[];
|
|
10964
11088
|
output: AIOutputFormat;
|
|
10965
11089
|
model?: AIModel;
|
|
11090
|
+
/** Tools provided to the AI */
|
|
11091
|
+
tools?: AIToolCapabilities;
|
|
10966
11092
|
}, params?: RequestParams) => EventIterator<AIStreamResponse>;
|
|
10967
11093
|
/**
|
|
10968
11094
|
* @description Track events in a site.
|
|
@@ -11097,6 +11223,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11097
11223
|
};
|
|
11098
11224
|
}>>;
|
|
11099
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
|
+
};
|
|
11100
11238
|
customHostnames: {
|
|
11101
11239
|
/**
|
|
11102
11240
|
* 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.104.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";
|
|
@@ -2497,6 +2496,13 @@ var Api = class extends HttpClient {
|
|
|
2497
2496
|
format: "json",
|
|
2498
2497
|
...params
|
|
2499
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
|
+
}),
|
|
2500
2506
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2501
2507
|
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2502
2508
|
method: "PATCH",
|
|
@@ -2791,6 +2797,22 @@ var Api = class extends HttpClient {
|
|
|
2791
2797
|
format: "json",
|
|
2792
2798
|
...params
|
|
2793
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
|
+
}),
|
|
2794
2816
|
deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2795
2817
|
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2796
2818
|
method: "DELETE",
|
|
@@ -3236,6 +3258,15 @@ var Api = class extends HttpClient {
|
|
|
3236
3258
|
...params
|
|
3237
3259
|
})
|
|
3238
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
|
+
};
|
|
3239
3270
|
customHostnames = {
|
|
3240
3271
|
getCustomHostname: (hostname, params = {}) => this.request({
|
|
3241
3272
|
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.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";
|
|
@@ -2402,6 +2401,13 @@ var Api = class extends HttpClient {
|
|
|
2402
2401
|
format: "json",
|
|
2403
2402
|
...params
|
|
2404
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
|
+
}),
|
|
2405
2411
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2406
2412
|
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2407
2413
|
method: "PATCH",
|
|
@@ -2696,6 +2702,22 @@ var Api = class extends HttpClient {
|
|
|
2696
2702
|
format: "json",
|
|
2697
2703
|
...params
|
|
2698
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
|
+
}),
|
|
2699
2721
|
deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
|
|
2700
2722
|
path: `/orgs/${organizationId}/fonts/${fontId}`,
|
|
2701
2723
|
method: "DELETE",
|
|
@@ -3141,6 +3163,15 @@ var Api = class extends HttpClient {
|
|
|
3141
3163
|
...params
|
|
3142
3164
|
})
|
|
3143
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
|
+
};
|
|
3144
3175
|
customHostnames = {
|
|
3145
3176
|
getCustomHostname: (hostname, params = {}) => this.request({
|
|
3146
3177
|
path: `/custom-hostnames/${hostname}`,
|