@gitbook/api 0.196.0 → 0.197.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 +279 -76
- package/dist/constants.d.ts +5 -1
- package/dist/index.cjs +82 -2
- package/dist/index.js +74 -2
- package/package.json +1 -1
- package/spec/openapi.json +1340 -494
- package/spec/openapi.yaml +591 -98
package/dist/client.d.ts
CHANGED
|
@@ -127,6 +127,15 @@ export declare enum SiteMcpServerTransport {
|
|
|
127
127
|
Sse = "sse",
|
|
128
128
|
Http = "http"
|
|
129
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* The field to sort site redirects by. `createdAt` returns the most recently created redirects first. `updatedAt` returns the most recently updated redirects first (falling back to the creation date for redirects never updated). `source` returns redirects sorted alphabetically by source path. Defaults to 'createdAt'.
|
|
132
|
+
* @default "createdAt"
|
|
133
|
+
*/
|
|
134
|
+
export declare enum SiteRedirectOrderBy {
|
|
135
|
+
CreatedAt = "createdAt",
|
|
136
|
+
UpdatedAt = "updatedAt",
|
|
137
|
+
Source = "source"
|
|
138
|
+
}
|
|
130
139
|
export declare enum SiteInsightsQueryRangePreset {
|
|
131
140
|
LastYear = "lastYear",
|
|
132
141
|
Last3Months = "last3Months",
|
|
@@ -171,7 +180,17 @@ export declare enum SiteInsightsVisitorBot {
|
|
|
171
180
|
Vscode = "vscode",
|
|
172
181
|
ClaudeCode = "claude-code",
|
|
173
182
|
Codex = "codex",
|
|
174
|
-
Opencode = "opencode"
|
|
183
|
+
Opencode = "opencode",
|
|
184
|
+
Gptbot = "gptbot",
|
|
185
|
+
Claudebot = "claudebot",
|
|
186
|
+
MetaFetcher = "meta-fetcher",
|
|
187
|
+
Grok = "grok",
|
|
188
|
+
GithubCopilot = "github-copilot",
|
|
189
|
+
MetaWebindexer = "meta-webindexer",
|
|
190
|
+
MetaAds = "meta-ads",
|
|
191
|
+
Duckassist = "duckassist",
|
|
192
|
+
AmznSearchbot = "amzn-searchbot",
|
|
193
|
+
AmznUser = "amzn-user"
|
|
175
194
|
}
|
|
176
195
|
export declare enum SiteInsightsVisitorOS {
|
|
177
196
|
Windows = "windows",
|
|
@@ -360,6 +379,7 @@ export declare enum SiteFindingSeverity {
|
|
|
360
379
|
* - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
|
|
361
380
|
* - Content gap: The content is missing important information that should be present to answer user questions effectively.
|
|
362
381
|
* - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.
|
|
382
|
+
* - Outbound link error: An external URL used by the site's content fails to resolve, and can be fixed by replacing or removing the link.
|
|
363
383
|
* - Other: Any other type of finding not covered by the above categories.
|
|
364
384
|
*/
|
|
365
385
|
export declare enum SiteFindingType {
|
|
@@ -367,6 +387,7 @@ export declare enum SiteFindingType {
|
|
|
367
387
|
ContentIncorrect = "content-incorrect",
|
|
368
388
|
ContentGap = "content-gap",
|
|
369
389
|
BrokenLink = "broken-link",
|
|
390
|
+
OutboundLinkError = "outbound-link-error",
|
|
370
391
|
Other = "other"
|
|
371
392
|
}
|
|
372
393
|
/**
|
|
@@ -704,6 +725,25 @@ export declare enum TeamMemberRole {
|
|
|
704
725
|
Owner = "owner",
|
|
705
726
|
Member = "member"
|
|
706
727
|
}
|
|
728
|
+
/** Something the user is interested in doing with the site. */
|
|
729
|
+
export declare enum SiteOnboardingInterest {
|
|
730
|
+
AdaptiveContent = "adaptive-content",
|
|
731
|
+
ApiDocs = "api-docs",
|
|
732
|
+
ProactiveAgent = "proactive-agent"
|
|
733
|
+
}
|
|
734
|
+
/** Who the user wants to be able to access their site. */
|
|
735
|
+
export declare enum SiteOnboardingAudience {
|
|
736
|
+
Public = "public",
|
|
737
|
+
Mixed = "mixed",
|
|
738
|
+
Protected = "protected",
|
|
739
|
+
Internal = "internal"
|
|
740
|
+
}
|
|
741
|
+
/** Where the user's docs are coming from today. */
|
|
742
|
+
export declare enum SiteOnboardingSource {
|
|
743
|
+
MarkdownInGit = "markdown-in-git",
|
|
744
|
+
Import = "import",
|
|
745
|
+
Template = "template"
|
|
746
|
+
}
|
|
707
747
|
export declare enum ContentKitIcon {
|
|
708
748
|
Close = "close",
|
|
709
749
|
Edit = "edit",
|
|
@@ -1369,6 +1409,8 @@ export interface GitSyncState {
|
|
|
1369
1409
|
/** An action the user can take to resolve a failed Git Sync operation. */
|
|
1370
1410
|
errorAction?: GitSyncOperationErrorAction;
|
|
1371
1411
|
};
|
|
1412
|
+
/** How long an operation is allowed to run before it is terminated (in milliseconds). */
|
|
1413
|
+
operationTimeout?: number;
|
|
1372
1414
|
/** When the Git provider details were last updated */
|
|
1373
1415
|
updatedAt?: Timestamp;
|
|
1374
1416
|
}
|
|
@@ -3461,7 +3503,7 @@ export interface RevisionPageUpdate {
|
|
|
3461
3503
|
condition?: string;
|
|
3462
3504
|
}
|
|
3463
3505
|
/**
|
|
3464
|
-
* Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed
|
|
3506
|
+
* Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed, and it can be moved to a new parent and/or position with `into`/`at`.
|
|
3465
3507
|
* @example {"operation":"update_page","page":"page_id","document":{"markdown":"# Hello World\n\nThis is a markdown document linking to [another page](/pages/page_id).\n"}}
|
|
3466
3508
|
*/
|
|
3467
3509
|
export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
|
|
@@ -3470,6 +3512,13 @@ export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
|
|
|
3470
3512
|
page: string;
|
|
3471
3513
|
/** New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields. */
|
|
3472
3514
|
document?: Document;
|
|
3515
|
+
/** Move the page to be a child of this page ID. Set to `null` to move it to the root of the page tree. Omit to leave the page's parent unchanged. The target cannot be the page itself or one of its own descendants. */
|
|
3516
|
+
into?: string | null;
|
|
3517
|
+
/**
|
|
3518
|
+
* Zero-based index to move the page to among its new siblings (those of `into`, or the root pages when `into` is omitted or `null`). Omit to leave the page's position unchanged when its parent isn't changing, or to append it at the end when its parent is changing.
|
|
3519
|
+
* @min 0
|
|
3520
|
+
*/
|
|
3521
|
+
at?: number;
|
|
3473
3522
|
};
|
|
3474
3523
|
/**
|
|
3475
3524
|
* Insert a new page into the change request. The title is taken from `title`, or, when the document is markdown, from the document's frontmatter or leading heading (which take precedence, matching Git Sync). When no title can be resolved, the page falls back to a default title.
|
|
@@ -4829,11 +4878,11 @@ export interface Site {
|
|
|
4829
4878
|
view: boolean;
|
|
4830
4879
|
/** Can the user access the site in the application. */
|
|
4831
4880
|
access: boolean;
|
|
4832
|
-
/** Can the user edit content
|
|
4881
|
+
/** Can the user edit content and create draft content in the site. */
|
|
4833
4882
|
edit: boolean;
|
|
4834
|
-
/** Can the user create content
|
|
4883
|
+
/** Can the user create draft content, publish content, and manage the site's content structure. */
|
|
4835
4884
|
create: boolean;
|
|
4836
|
-
/** Can the user
|
|
4885
|
+
/** Can the user manage the site content, settings and publish the site. */
|
|
4837
4886
|
admin: boolean;
|
|
4838
4887
|
/** Can the user install integrations on the site. */
|
|
4839
4888
|
installIntegration: boolean;
|
|
@@ -5254,12 +5303,18 @@ export interface UpdateIntegrationSiteInstallation {
|
|
|
5254
5303
|
/** Configuration of the integration at the account level */
|
|
5255
5304
|
configuration?: IntegrationInstallationConfiguration;
|
|
5256
5305
|
}
|
|
5306
|
+
/** Preferences collected from the user during site onboarding, used to tailor recommendations and to apply their initial setup choices. */
|
|
5307
|
+
export interface SiteOnboardingPreferences {
|
|
5308
|
+
source: SiteOnboardingSource | null;
|
|
5309
|
+
audience: SiteOnboardingAudience | null;
|
|
5310
|
+
interests: SiteOnboardingInterest[];
|
|
5311
|
+
}
|
|
5257
5312
|
export interface CreateOrganization {
|
|
5258
5313
|
/** Name of the organization */
|
|
5259
5314
|
title: OrganizationTitle;
|
|
5260
5315
|
emailDomains?: OrganizationEmailDomains;
|
|
5261
|
-
|
|
5262
|
-
|
|
5316
|
+
/** Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true. */
|
|
5317
|
+
onboardingPreferences?: SiteOnboardingPreferences;
|
|
5263
5318
|
}
|
|
5264
5319
|
/**
|
|
5265
5320
|
* Title of the site section
|
|
@@ -5382,14 +5437,38 @@ export interface SiteSectionGroup {
|
|
|
5382
5437
|
sectionGroup?: string;
|
|
5383
5438
|
/** Whether the site section group is draft and not live. */
|
|
5384
5439
|
draft: boolean;
|
|
5385
|
-
/** List of all child sections and
|
|
5386
|
-
children: (SiteSection | SiteSectionGroup)[];
|
|
5440
|
+
/** List of all child sections, groups, and external links nested under this group */
|
|
5441
|
+
children: (SiteSection | SiteSectionGroup | SiteExternalLink)[];
|
|
5442
|
+
/** Name of the icon */
|
|
5443
|
+
icon?: Icon;
|
|
5444
|
+
}
|
|
5445
|
+
export interface SiteExternalLink {
|
|
5446
|
+
/** The object type, which is always "site-external-link" */
|
|
5447
|
+
object: "site-external-link";
|
|
5448
|
+
/** Unique identifier of the external link */
|
|
5449
|
+
id: string;
|
|
5450
|
+
/** Title of the site section */
|
|
5451
|
+
title: SiteSectionTitle;
|
|
5452
|
+
/** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
5453
|
+
localizedTitle?: LocalizedString128;
|
|
5454
|
+
/** Description of the site section */
|
|
5455
|
+
description?: SiteSectionDescription;
|
|
5456
|
+
/** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
5457
|
+
localizedDescription?: LocalizedString256;
|
|
5387
5458
|
/** Name of the icon */
|
|
5388
5459
|
icon?: Icon;
|
|
5460
|
+
/** Absolute HTTP or HTTPS URL opened by the external link */
|
|
5461
|
+
url: URL;
|
|
5462
|
+
/** ID of the section group the external link belongs to. Omitted for a root link. */
|
|
5463
|
+
sectionGroup?: string;
|
|
5464
|
+
/** Whether the external link is draft and not live */
|
|
5465
|
+
draft: boolean;
|
|
5466
|
+
/** Conditional expression used to evaluate whether the external link should be shown to the site's visitor */
|
|
5467
|
+
condition?: Expression;
|
|
5389
5468
|
}
|
|
5390
5469
|
export type SiteStructure = {
|
|
5391
5470
|
type: "sections";
|
|
5392
|
-
structure: (SiteSection | SiteSectionGroup)[];
|
|
5471
|
+
structure: (SiteSection | SiteSectionGroup | SiteExternalLink)[];
|
|
5393
5472
|
} | {
|
|
5394
5473
|
type: "siteSpaces";
|
|
5395
5474
|
structure: SiteSpace[];
|
|
@@ -6896,21 +6975,21 @@ export interface ShareLink {
|
|
|
6896
6975
|
};
|
|
6897
6976
|
}
|
|
6898
6977
|
export interface SiteStructureItemPointer {
|
|
6899
|
-
type: "site-space" | "site-section" | "site-section-group";
|
|
6900
|
-
/** Unique identifier for the site structure item (site space, site section
|
|
6978
|
+
type: "site-space" | "site-section" | "site-section-group" | "site-external-link";
|
|
6979
|
+
/** Unique identifier for the site structure item (site space, site section, site section group, or external link). */
|
|
6901
6980
|
id: string;
|
|
6902
6981
|
}
|
|
6903
|
-
/** Position at which to move the site structure item
|
|
6982
|
+
/** Position at which to move the site structure item relative to any sibling of the same structure level. */
|
|
6904
6983
|
export interface SiteStructureItemMovePosition {
|
|
6905
6984
|
before?: SiteStructureItemPointer;
|
|
6906
6985
|
after?: SiteStructureItemPointer;
|
|
6907
6986
|
}
|
|
6908
6987
|
/**
|
|
6909
6988
|
* Site Structure Item
|
|
6910
|
-
* A site structure item can be a site space, a site section
|
|
6989
|
+
* A site structure item can be a site space, a site section, a site section group, or an external link.
|
|
6911
6990
|
* It is used to represent the structure of a site.
|
|
6912
6991
|
*/
|
|
6913
|
-
export type SiteStructureItem = SiteSpace | SiteSection | SiteSectionGroup;
|
|
6992
|
+
export type SiteStructureItem = SiteSpace | SiteSection | SiteSectionGroup | SiteExternalLink;
|
|
6914
6993
|
/** A response to a request to preview a paid operation or action. A user might preview an operation before executing it to see which billing steps would be required (if any). This schema defines the response of that preview request. */
|
|
6915
6994
|
export type BillingOperationPreviewResponse = {
|
|
6916
6995
|
/** User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes. */
|
|
@@ -7126,28 +7205,6 @@ export type SiteFindingTitle = string;
|
|
|
7126
7205
|
* @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
|
|
7127
7206
|
*/
|
|
7128
7207
|
export type SiteRedirectSourcePath = string;
|
|
7129
|
-
export interface SiteRedirectDestinationSiteSection {
|
|
7130
|
-
kind: "site-section";
|
|
7131
|
-
/** Unique identifier for the site section to redirect to */
|
|
7132
|
-
siteSectionId: string;
|
|
7133
|
-
}
|
|
7134
|
-
export interface SiteRedirectDestinationSiteSpace {
|
|
7135
|
-
kind: "site-space";
|
|
7136
|
-
/** Unique identifier for the site space to redirect to */
|
|
7137
|
-
siteSpaceId: string;
|
|
7138
|
-
}
|
|
7139
|
-
export interface SiteRedirectDestinationPage {
|
|
7140
|
-
kind: "site-page";
|
|
7141
|
-
/** Unique identifier for the site space of the page */
|
|
7142
|
-
siteSpaceId: string;
|
|
7143
|
-
/** Unique identifier for the page within the site space to redirect to */
|
|
7144
|
-
pageId: string;
|
|
7145
|
-
}
|
|
7146
|
-
export interface SiteRedirectDestinationExternal {
|
|
7147
|
-
kind: "external";
|
|
7148
|
-
url: URL;
|
|
7149
|
-
}
|
|
7150
|
-
export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage | SiteRedirectDestinationExternal;
|
|
7151
7208
|
export interface SiteRedirectInputDestinationPath {
|
|
7152
7209
|
kind: "path";
|
|
7153
7210
|
/** Unique identifier for the space containing the page referenced by the path. */
|
|
@@ -7155,14 +7212,29 @@ export interface SiteRedirectInputDestinationPath {
|
|
|
7155
7212
|
/** Path to the page within the space revision to resolve. */
|
|
7156
7213
|
path: string;
|
|
7157
7214
|
}
|
|
7158
|
-
export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
|
|
7159
7215
|
/** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
|
|
7160
7216
|
export interface SiteFindingBrokenLinkAction {
|
|
7161
7217
|
/** The source path to redirect from. */
|
|
7162
7218
|
source: SiteRedirectSourcePath;
|
|
7163
7219
|
/** Whether the redirect appends the wildcard-matched suffix of the source path to the destination. */
|
|
7164
7220
|
captureWildcard?: boolean;
|
|
7165
|
-
destination:
|
|
7221
|
+
destination: SiteRedirectInputDestinationPath;
|
|
7222
|
+
}
|
|
7223
|
+
/** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
|
|
7224
|
+
export interface SiteFindingOutboundLink {
|
|
7225
|
+
/**
|
|
7226
|
+
* The external URL that fails to resolve.
|
|
7227
|
+
* @format uri
|
|
7228
|
+
*/
|
|
7229
|
+
url: string;
|
|
7230
|
+
/** Current health status of the URL for this site. */
|
|
7231
|
+
status: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
|
|
7232
|
+
/** Classification of the confirmed failure. */
|
|
7233
|
+
failureKind?: "client-error" | "server-error" | "redirect" | "dns" | "tls" | "connection" | "timeout";
|
|
7234
|
+
/** HTTP status code of the last observation, when one was received. */
|
|
7235
|
+
httpStatus?: number;
|
|
7236
|
+
/** When the URL was last observed over HTTP. */
|
|
7237
|
+
checkedAt?: Timestamp;
|
|
7166
7238
|
}
|
|
7167
7239
|
export interface SiteFinding {
|
|
7168
7240
|
object: "site-finding";
|
|
@@ -7196,6 +7268,7 @@ export interface SiteFinding {
|
|
|
7196
7268
|
* - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
|
|
7197
7269
|
* - Content gap: The content is missing important information that should be present to answer user questions effectively.
|
|
7198
7270
|
* - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.
|
|
7271
|
+
* - Outbound link error: An external URL used by the site's content fails to resolve, and can be fixed by replacing or removing the link.
|
|
7199
7272
|
* - Other: Any other type of finding not covered by the above categories.
|
|
7200
7273
|
*/
|
|
7201
7274
|
type: SiteFindingType;
|
|
@@ -7206,6 +7279,8 @@ export interface SiteFinding {
|
|
|
7206
7279
|
autoFixable: boolean;
|
|
7207
7280
|
/** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
|
|
7208
7281
|
brokenLinkAction?: SiteFindingBrokenLinkAction;
|
|
7282
|
+
/** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
|
|
7283
|
+
outboundLink?: SiteFindingOutboundLink;
|
|
7209
7284
|
createdAt: Timestamp;
|
|
7210
7285
|
updatedAt: Timestamp;
|
|
7211
7286
|
/** URLs associated with the finding */
|
|
@@ -8864,6 +8939,28 @@ export interface SiteAdsStats {
|
|
|
8864
8939
|
clicks: number;
|
|
8865
8940
|
revenue: string;
|
|
8866
8941
|
}
|
|
8942
|
+
export interface SiteRedirectDestinationSiteSection {
|
|
8943
|
+
kind: "site-section";
|
|
8944
|
+
/** Unique identifier for the site section to redirect to */
|
|
8945
|
+
siteSectionId: string;
|
|
8946
|
+
}
|
|
8947
|
+
export interface SiteRedirectDestinationSiteSpace {
|
|
8948
|
+
kind: "site-space";
|
|
8949
|
+
/** Unique identifier for the site space to redirect to */
|
|
8950
|
+
siteSpaceId: string;
|
|
8951
|
+
}
|
|
8952
|
+
export interface SiteRedirectDestinationPage {
|
|
8953
|
+
kind: "site-page";
|
|
8954
|
+
/** Unique identifier for the site space of the page */
|
|
8955
|
+
siteSpaceId: string;
|
|
8956
|
+
/** Unique identifier for the page within the site space to redirect to */
|
|
8957
|
+
pageId: string;
|
|
8958
|
+
}
|
|
8959
|
+
export interface SiteRedirectDestinationExternal {
|
|
8960
|
+
kind: "external";
|
|
8961
|
+
url: URL;
|
|
8962
|
+
}
|
|
8963
|
+
export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage | SiteRedirectDestinationExternal;
|
|
8867
8964
|
export interface SiteRedirect {
|
|
8868
8965
|
object: "site-redirect";
|
|
8869
8966
|
/** The unique identifier for the redirect. */
|
|
@@ -8875,7 +8972,18 @@ export interface SiteRedirect {
|
|
|
8875
8972
|
/** Capture and append the wildcard-matched suffix to the destination URL. */
|
|
8876
8973
|
captureWildcard: boolean;
|
|
8877
8974
|
destination: SiteRedirectDestination;
|
|
8975
|
+
/**
|
|
8976
|
+
* When the redirect was created.
|
|
8977
|
+
* @format date-time
|
|
8978
|
+
*/
|
|
8979
|
+
createdAt: string;
|
|
8980
|
+
/**
|
|
8981
|
+
* When the redirect was last updated. Absent if never updated since creation.
|
|
8982
|
+
* @format date-time
|
|
8983
|
+
*/
|
|
8984
|
+
updatedAt?: string;
|
|
8878
8985
|
}
|
|
8986
|
+
export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
|
|
8879
8987
|
/**
|
|
8880
8988
|
* Name of the MCP server
|
|
8881
8989
|
* @minLength 1
|
|
@@ -9743,7 +9851,7 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
|
|
|
9743
9851
|
*/
|
|
9744
9852
|
export type GitSyncSiteStructure = GitSyncSiteStructureNode[];
|
|
9745
9853
|
/**
|
|
9746
|
-
* Schema for a site `docs.yaml` file — the canonical contract for what
|
|
9854
|
+
* Schema for a site `gitbook-docs.yaml` file — the canonical contract for what
|
|
9747
9855
|
* can be authored in Git Sync to drive a site's structure.
|
|
9748
9856
|
*
|
|
9749
9857
|
* The file lives at the root of the site's project directory in the synced
|
|
@@ -11638,7 +11746,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11638
11746
|
computed?: boolean;
|
|
11639
11747
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
|
|
11640
11748
|
/**
|
|
11641
|
-
* @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
|
|
11749
|
+
* @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
|
|
11642
11750
|
*
|
|
11643
11751
|
* @tags change-request-content
|
|
11644
11752
|
* @name UpdateChangeRequestContent
|
|
@@ -12744,7 +12852,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12744
12852
|
};
|
|
12745
12853
|
integrations: {
|
|
12746
12854
|
/**
|
|
12747
|
-
*
|
|
12855
|
+
* @description Returns a paginated list of the integrations published in the GitBook marketplace. Use this to discover an integration by name, category, or the blocks and content sources it provides, before installing it on an organization, space or site.
|
|
12748
12856
|
*
|
|
12749
12857
|
* @tags integrations
|
|
12750
12858
|
* @name ListIntegrations
|
|
@@ -12785,7 +12893,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12785
12893
|
items: Integration[];
|
|
12786
12894
|
}, any>>;
|
|
12787
12895
|
/**
|
|
12788
|
-
*
|
|
12896
|
+
* @description Returns a single integration by its unique name, including the configuration it expects, the targets it can be installed on, and the permissions it requests. Private integrations are only readable by the organization that owns them.
|
|
12789
12897
|
*
|
|
12790
12898
|
* @tags integrations
|
|
12791
12899
|
* @name GetIntegrationByName
|
|
@@ -12850,7 +12958,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12850
12958
|
items: IntegrationInstallation[];
|
|
12851
12959
|
}, any>>;
|
|
12852
12960
|
/**
|
|
12853
|
-
*
|
|
12961
|
+
* @description Installs an integration on an organization, creating the account-level installation that space and site installations hang off. Configure it with the update operation, then enable it on individual spaces or sites.
|
|
12854
12962
|
*
|
|
12855
12963
|
* @tags integrations
|
|
12856
12964
|
* @name InstallIntegration
|
|
@@ -13048,7 +13156,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13048
13156
|
};
|
|
13049
13157
|
}>>;
|
|
13050
13158
|
/**
|
|
13051
|
-
*
|
|
13159
|
+
* @description Returns the organization-level installation of an integration, including its account configuration and how many spaces it manages. The configuration can contain credentials the integration stored for third-party services.
|
|
13052
13160
|
*
|
|
13053
13161
|
* @tags integrations
|
|
13054
13162
|
* @name GetIntegrationInstallationById
|
|
@@ -13064,7 +13172,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13064
13172
|
};
|
|
13065
13173
|
}>>;
|
|
13066
13174
|
/**
|
|
13067
|
-
*
|
|
13175
|
+
* @description Updates the account-level configuration of an installation, and which spaces or sites it applies to.
|
|
13068
13176
|
*
|
|
13069
13177
|
* @tags integrations
|
|
13070
13178
|
* @name UpdateIntegrationInstallation
|
|
@@ -13100,7 +13208,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13100
13208
|
};
|
|
13101
13209
|
}>>;
|
|
13102
13210
|
/**
|
|
13103
|
-
*
|
|
13211
|
+
* @description Returns a paginated list of the spaces an installation is enabled on, with the configuration of the integration for each of them. Pass extended to get the full space object instead of its ID.
|
|
13104
13212
|
*
|
|
13105
13213
|
* @tags integrations
|
|
13106
13214
|
* @name ListIntegrationInstallationSpaces
|
|
@@ -13126,7 +13234,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13126
13234
|
items: IntegrationSpaceInstallation[];
|
|
13127
13235
|
}, any>>;
|
|
13128
13236
|
/**
|
|
13129
|
-
*
|
|
13237
|
+
* @description Enables an existing organization-level installation on one space. The organization must already have the integration installed.
|
|
13130
13238
|
*
|
|
13131
13239
|
* @name InstallIntegrationOnSpace
|
|
13132
13240
|
* @summary Install an integration on a space
|
|
@@ -13150,7 +13258,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13150
13258
|
};
|
|
13151
13259
|
}>>;
|
|
13152
13260
|
/**
|
|
13153
|
-
*
|
|
13261
|
+
* @description Returns the installation of an integration on one space, including the configuration of the integration for that space.
|
|
13154
13262
|
*
|
|
13155
13263
|
* @tags integrations
|
|
13156
13264
|
* @name GetIntegrationSpaceInstallation
|
|
@@ -13172,7 +13280,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13172
13280
|
};
|
|
13173
13281
|
}>>;
|
|
13174
13282
|
/**
|
|
13175
|
-
*
|
|
13283
|
+
* @description Updates the configuration of an integration for one space.
|
|
13176
13284
|
*
|
|
13177
13285
|
* @tags integrations
|
|
13178
13286
|
* @name UpdateIntegrationSpaceInstallation
|
|
@@ -13198,7 +13306,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13198
13306
|
*/
|
|
13199
13307
|
uninstallIntegrationFromSpace: (integrationName: string, installationId: string, spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
13200
13308
|
/**
|
|
13201
|
-
*
|
|
13309
|
+
* @description Returns a paginated list of the sites an installation is enabled on, with the configuration of the integration for each of them. Pass extended to get the full site object instead of its ID.
|
|
13202
13310
|
*
|
|
13203
13311
|
* @tags integrations
|
|
13204
13312
|
* @name ListIntegrationInstallationSites
|
|
@@ -13224,7 +13332,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13224
13332
|
items: IntegrationSiteInstallation[];
|
|
13225
13333
|
}, any>>;
|
|
13226
13334
|
/**
|
|
13227
|
-
*
|
|
13335
|
+
* @description Enables an existing organization-level installation on one site. The organization must already have the integration installed.
|
|
13228
13336
|
*
|
|
13229
13337
|
* @tags integrations
|
|
13230
13338
|
* @name InstallIntegrationOnSite
|
|
@@ -13249,7 +13357,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13249
13357
|
};
|
|
13250
13358
|
}>>;
|
|
13251
13359
|
/**
|
|
13252
|
-
*
|
|
13360
|
+
* @description Returns the installation of an integration on one site, including the configuration of the integration for that site.
|
|
13253
13361
|
*
|
|
13254
13362
|
* @tags integrations
|
|
13255
13363
|
* @name GetIntegrationSiteInstallation
|
|
@@ -13271,7 +13379,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13271
13379
|
};
|
|
13272
13380
|
}>>;
|
|
13273
13381
|
/**
|
|
13274
|
-
*
|
|
13382
|
+
* @description Updates the configuration of an integration for one site.
|
|
13275
13383
|
*
|
|
13276
13384
|
* @tags integrations
|
|
13277
13385
|
* @name UpdateIntegrationSiteInstallation
|
|
@@ -14052,7 +14160,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14052
14160
|
parent?: string;
|
|
14053
14161
|
}, params?: RequestParams) => Promise<HttpResponse<Collection, any>>;
|
|
14054
14162
|
/**
|
|
14055
|
-
*
|
|
14163
|
+
* @description Returns a paginated list of the integrations available to the organization: every publicly published integration plus the private ones the organization owns or is trusted with. Prefer this over the public listing when acting inside an organization.
|
|
14056
14164
|
*
|
|
14057
14165
|
* @tags integrations
|
|
14058
14166
|
* @name ListOrganizationIntegrations
|
|
@@ -14093,7 +14201,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14093
14201
|
items: Integration[];
|
|
14094
14202
|
}, any>>;
|
|
14095
14203
|
/**
|
|
14096
|
-
*
|
|
14204
|
+
* @description Returns whether an integration is installed for the organization and the status of that installation. Use this for a single integration instead of listing every status.
|
|
14097
14205
|
*
|
|
14098
14206
|
* @tags integrations
|
|
14099
14207
|
* @name GetOrganizationIntegrationStatus
|
|
@@ -14138,7 +14246,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14138
14246
|
}[];
|
|
14139
14247
|
}, any>>;
|
|
14140
14248
|
/**
|
|
14141
|
-
* @description Returns integration installations in the organization. Use site or space with the matching target to efficiently scope the result to one resource.
|
|
14249
|
+
* @description Returns integration installations in the organization. Use site or space with the matching target to efficiently scope the result to one resource. The target of each installation says whether it is installed on the organization, a space or a site.
|
|
14142
14250
|
*
|
|
14143
14251
|
* @tags integrations, critical
|
|
14144
14252
|
* @name ListOrganizationIntegrationsStatus
|
|
@@ -15171,16 +15279,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15171
15279
|
};
|
|
15172
15280
|
}>>;
|
|
15173
15281
|
/**
|
|
15174
|
-
* @description Reorders
|
|
15282
|
+
* @description Reorders a site space, section, section group, or external link relative to any sibling at the same structure level. Sorting changes sibling order only; move an item between the root and a group through that item's update operation first.
|
|
15175
15283
|
*
|
|
15176
15284
|
* @tags sites
|
|
15177
15285
|
* @name SortSiteStructure
|
|
15178
|
-
* @summary Move a site
|
|
15286
|
+
* @summary Move a site structure item to a new position
|
|
15179
15287
|
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/structure/sort
|
|
15180
15288
|
* @secure
|
|
15181
15289
|
*/
|
|
15182
15290
|
sortSiteStructure: (organizationId: EntityId, siteId: string, data: {
|
|
15183
|
-
/**
|
|
15291
|
+
/** Pointer to the site space, section, section group, or external link being moved. */
|
|
15184
15292
|
item: SiteStructureItemPointer;
|
|
15185
15293
|
/** The position to move the item to. When not provided the item is moved to the end of the site structure. */
|
|
15186
15294
|
position: SiteStructureItemMovePosition;
|
|
@@ -15346,7 +15454,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15346
15454
|
items: Integration[];
|
|
15347
15455
|
}, any>>;
|
|
15348
15456
|
/**
|
|
15349
|
-
* @description
|
|
15457
|
+
* @description Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces are blank unless a template is provided.
|
|
15350
15458
|
*
|
|
15351
15459
|
* @tags site-spaces
|
|
15352
15460
|
* @name AddSpaceToSite
|
|
@@ -15355,18 +15463,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15355
15463
|
* @secure
|
|
15356
15464
|
*/
|
|
15357
15465
|
addSpaceToSite: (organizationId: EntityId, siteId: string, data: {
|
|
15358
|
-
/** ID of
|
|
15359
|
-
spaceId: string;
|
|
15466
|
+
/** Pass the ID of an existing space or `null` to create a new space. */
|
|
15467
|
+
spaceId: string | null;
|
|
15468
|
+
/** Template for the new space when `spaceId` is `null`. Templates that provision organization-level resources, such as OpenAPI specifications, are not supported by this site-scoped operation. */
|
|
15469
|
+
template?: ApplySpaceTemplate;
|
|
15360
15470
|
/** ID of the section to add the space to. If not provided, the space will be added to the default section or at the root level if the site has no sections. */
|
|
15361
15471
|
sectionId?: string;
|
|
15362
15472
|
/**
|
|
15363
|
-
* Whether the site space should be created as draft. Defaults to false.
|
|
15473
|
+
* Whether the site space should be created as draft. Defaults to false. Editors can set this to true to create draft content on a non-empty site. Creating live content and adding the first content require Creator permission.
|
|
15364
15474
|
* @default false
|
|
15365
15475
|
*/
|
|
15366
15476
|
draft?: boolean;
|
|
15367
|
-
/** Custom home page within
|
|
15477
|
+
/** Custom home page within an existing space, rendered at the site space's path root instead of the space's default landing page. Providing it when `spaceId` is `null` returns a 400 error. */
|
|
15368
15478
|
pageId?: string | null;
|
|
15369
|
-
/**
|
|
15479
|
+
/** Site-specific title override for the variant. Also used as the space title when `spaceId` is `null` and no template is provided. */
|
|
15370
15480
|
title?: SiteTitle;
|
|
15371
15481
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
15372
15482
|
/**
|
|
@@ -15464,7 +15574,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15464
15574
|
*/
|
|
15465
15575
|
deleteSiteSectionGroupById: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15466
15576
|
/**
|
|
15467
|
-
* @description Creates a new top-level navigation section in the site
|
|
15577
|
+
* @description Creates a new top-level navigation section in the site. The section appears as a tab or sidebar entry in the site navigation. Pass an existing space ID to link it as the section's primary content source, or pass `null` to create and link a new space. New spaces are blank unless a template is provided.
|
|
15468
15578
|
*
|
|
15469
15579
|
* @tags site-sections
|
|
15470
15580
|
* @name AddSectionToSite
|
|
@@ -15473,13 +15583,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15473
15583
|
* @secure
|
|
15474
15584
|
*/
|
|
15475
15585
|
addSectionToSite: (organizationId: EntityId, siteId: string, data: {
|
|
15476
|
-
/** ID of
|
|
15477
|
-
spaceId: string;
|
|
15586
|
+
/** Pass the ID of an existing space or pass `null` to create a new space. The space will be added to the section as a site space variant. */
|
|
15587
|
+
spaceId: string | null;
|
|
15588
|
+
/** Template for the new space when `spaceId` is `null`. Templates that provision organization-level resources, such as OpenAPI specifications, are not supported by this site-scoped operation. */
|
|
15589
|
+
template?: ApplySpaceTemplate;
|
|
15590
|
+
/** Section title. Also used as the space title when `spaceId` is `null` and no template is provided. */
|
|
15478
15591
|
title?: SiteSectionTitle | null;
|
|
15479
15592
|
icon?: Icon | null;
|
|
15480
|
-
/**
|
|
15593
|
+
/**
|
|
15594
|
+
* Whether the section should be created in draft mode. Defaults to false. Editors can set this to true to create draft content after sections are enabled. Creating live content requires Creator permission; enabling sections requires Admin permission.
|
|
15595
|
+
* @default false
|
|
15596
|
+
*/
|
|
15481
15597
|
draft?: boolean;
|
|
15482
|
-
/** Custom home page within
|
|
15598
|
+
/** Custom home page within an existing space, rendered at the section's path root instead of the space's default landing page. Providing it when `spaceId` is `null` returns a 400 error. */
|
|
15483
15599
|
pageId?: string;
|
|
15484
15600
|
/** ID of the section group to create the section in */
|
|
15485
15601
|
siteSectionGroupId?: string;
|
|
@@ -15546,6 +15662,91 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15546
15662
|
* @secure
|
|
15547
15663
|
*/
|
|
15548
15664
|
deleteSiteSectionById: (organizationId: EntityId, siteId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15665
|
+
/**
|
|
15666
|
+
* @description Creates an external navigation link at the site root or in a section group. External links require a section-based site structure and cannot be placed inside a section. The destination must be an absolute HTTP or HTTPS URL. Draft links and links whose adaptive condition does not match are omitted from published structure responses. Use the generic structure sort operation after creation to change sibling order.
|
|
15667
|
+
*
|
|
15668
|
+
* @tags site-external-links
|
|
15669
|
+
* @name AddExternalLinkToSite
|
|
15670
|
+
* @summary Add an external link to a site's navigation
|
|
15671
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/external-links
|
|
15672
|
+
* @secure
|
|
15673
|
+
*/
|
|
15674
|
+
addExternalLinkToSite: (organizationId: EntityId, siteId: string, data: {
|
|
15675
|
+
/** Title of the site section */
|
|
15676
|
+
title: SiteSectionTitle;
|
|
15677
|
+
/** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
15678
|
+
localizedTitle?: LocalizedString128;
|
|
15679
|
+
description?: SiteSectionDescription | null;
|
|
15680
|
+
localizedDescription?: LocalizedString256 | null;
|
|
15681
|
+
icon?: Icon | null;
|
|
15682
|
+
/** Absolute HTTP or HTTPS destination URL */
|
|
15683
|
+
url: URL;
|
|
15684
|
+
/** ID of the section group to create the link in. Omit to place it at the site root. */
|
|
15685
|
+
parent?: string;
|
|
15686
|
+
/** Whether the external link should be created in draft mode */
|
|
15687
|
+
draft?: boolean;
|
|
15688
|
+
/** Adaptive condition controlling whether visitors see the link */
|
|
15689
|
+
condition?: Expression | null;
|
|
15690
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteExternalLink, Error | {
|
|
15691
|
+
error: {
|
|
15692
|
+
/** @format int32 */
|
|
15693
|
+
code: 400;
|
|
15694
|
+
message: string;
|
|
15695
|
+
};
|
|
15696
|
+
}>>;
|
|
15697
|
+
/**
|
|
15698
|
+
* @description Updates an external navigation link. Set parent to a section group ID to move the link into that group, or null to move it to the site root; links cannot be placed inside a section. A changed destination must remain an absolute HTTP or HTTPS URL. Draft and adaptive-condition fields control visibility. Use the generic structure sort operation after changing the parent to adjust the link's sibling order.
|
|
15699
|
+
*
|
|
15700
|
+
* @tags site-external-links
|
|
15701
|
+
* @name UpdateSiteExternalLinkById
|
|
15702
|
+
* @summary Update an external link in a site's navigation
|
|
15703
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/external-links/{siteExternalLinkId}
|
|
15704
|
+
* @secure
|
|
15705
|
+
*/
|
|
15706
|
+
updateSiteExternalLinkById: (organizationId: EntityId, siteId: string, siteExternalLinkId: string, data: {
|
|
15707
|
+
/** Title of the site section */
|
|
15708
|
+
title?: SiteSectionTitle;
|
|
15709
|
+
localizedTitle?: LocalizedString128 | null;
|
|
15710
|
+
description?: SiteSectionDescription | null;
|
|
15711
|
+
localizedDescription?: LocalizedString256 | null;
|
|
15712
|
+
icon?: Icon | null;
|
|
15713
|
+
/** Absolute HTTP or HTTPS destination URL */
|
|
15714
|
+
url?: URL;
|
|
15715
|
+
/** ID of the section group to move the link into. Set to null to move it to the site root. */
|
|
15716
|
+
parent?: string | null;
|
|
15717
|
+
/** Whether the external link should be kept in draft mode */
|
|
15718
|
+
draft?: boolean;
|
|
15719
|
+
/** Adaptive condition controlling whether visitors see the link */
|
|
15720
|
+
condition?: Expression | null;
|
|
15721
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteExternalLink, Error | {
|
|
15722
|
+
error: {
|
|
15723
|
+
/** @format int32 */
|
|
15724
|
+
code: 400;
|
|
15725
|
+
message: string;
|
|
15726
|
+
};
|
|
15727
|
+
} | {
|
|
15728
|
+
error: {
|
|
15729
|
+
/** @format int32 */
|
|
15730
|
+
code: 404;
|
|
15731
|
+
message: string;
|
|
15732
|
+
};
|
|
15733
|
+
}>>;
|
|
15734
|
+
/**
|
|
15735
|
+
* @description Deletes an external link. This operation is intentionally unavailable to MCP clients.
|
|
15736
|
+
*
|
|
15737
|
+
* @tags site-external-links
|
|
15738
|
+
* @name DeleteSiteExternalLinkById
|
|
15739
|
+
* @summary Delete an external link from a site's navigation
|
|
15740
|
+
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/external-links/{siteExternalLinkId}
|
|
15741
|
+
* @secure
|
|
15742
|
+
*/
|
|
15743
|
+
deleteSiteExternalLinkById: (organizationId: EntityId, siteId: string, siteExternalLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
|
|
15744
|
+
error: {
|
|
15745
|
+
/** @format int32 */
|
|
15746
|
+
code: 404;
|
|
15747
|
+
message: string;
|
|
15748
|
+
};
|
|
15749
|
+
}>>;
|
|
15549
15750
|
/**
|
|
15550
15751
|
* @description Performs a full-text search across all published spaces in the site and returns matching pages with relevant excerpts. Use the scope parameter to restrict the search to specific site spaces or sections. Prefer this over the space-level search when you need to search across a multi-section site in one call.
|
|
15551
15752
|
*
|
|
@@ -16056,7 +16257,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16056
16257
|
items: SiteTopic[];
|
|
16057
16258
|
}, any>>;
|
|
16058
16259
|
/**
|
|
16059
|
-
*
|
|
16260
|
+
* @description Retrieves a single topic of a site by its ID, including its label, its parent topic when it is a subtopic, its summary and usage settings, and its page, record, finding and Ask AI question counts. Use this when you have a topic ID and need the topic's label or its stats.
|
|
16060
16261
|
*
|
|
16061
16262
|
* @tags site-context
|
|
16062
16263
|
* @name GetSiteTopicById
|
|
@@ -16893,7 +17094,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16893
17094
|
topic?: SiteAdsTopic;
|
|
16894
17095
|
}, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
16895
17096
|
/**
|
|
16896
|
-
* @description Creates a new redirect rule mapping a source path to a destination URL or content reference. Use the bulk upsert endpoint instead when creating many redirects at once.
|
|
17097
|
+
* @description Creates a new redirect rule mapping a source path to a destination URL or content reference. Creating a live redirect also resolves open broken-link findings for the same source path. Use the bulk upsert endpoint instead when creating many redirects at once.
|
|
16897
17098
|
*
|
|
16898
17099
|
* @tags site-redirects
|
|
16899
17100
|
* @name CreateSiteRedirect
|
|
@@ -17024,6 +17225,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17024
17225
|
* @default false
|
|
17025
17226
|
*/
|
|
17026
17227
|
draft?: boolean;
|
|
17228
|
+
/** Sort redirects by the given field. */
|
|
17229
|
+
orderBy?: SiteRedirectOrderBy;
|
|
17027
17230
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
17028
17231
|
items: SiteRedirect[];
|
|
17029
17232
|
}, any>>;
|
|
@@ -17609,7 +17812,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17609
17812
|
};
|
|
17610
17813
|
}>>;
|
|
17611
17814
|
/**
|
|
17612
|
-
* @description Updates the installation configuration, then queues a sync operation using the new settings. A `git` priority queues an import from the selected repository and branch into GitBook; a `gitbook` priority queues an export from GitBook to the repository. Site imports require a `docs.yaml` file at the configured project directory and return a conflict without saving or queuing the sync when the file is missing.
|
|
17815
|
+
* @description Updates the installation configuration, then queues a sync operation using the new settings. A `git` priority queues an import from the selected repository and branch into GitBook; a `gitbook` priority queues an export from GitBook to the repository. Site imports require a `gitbook-docs.yaml` file at the configured project directory and return a conflict without saving or queuing the sync when the file is missing.
|
|
17613
17816
|
*
|
|
17614
17817
|
* @tags git
|
|
17615
17818
|
* @name UpdateGitSyncInstallationById
|
|
@@ -17624,9 +17827,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17624
17827
|
error: {
|
|
17625
17828
|
type: "missing_site_git_sync_config";
|
|
17626
17829
|
details: {
|
|
17627
|
-
/** Repository-relative path where `docs.yaml` is required. */
|
|
17830
|
+
/** Repository-relative path where `gitbook-docs.yaml` is required. */
|
|
17628
17831
|
path: string;
|
|
17629
|
-
/** Repository branch where `docs.yaml` is required. */
|
|
17832
|
+
/** Repository branch where `gitbook-docs.yaml` is required. */
|
|
17630
17833
|
branch: string;
|
|
17631
17834
|
/** Prompt for a coding agent to create and commit the missing file. */
|
|
17632
17835
|
prompt: string;
|