@gitbook/api 0.204.0 → 0.206.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 +487 -245
- package/dist/constants.d.ts +9 -1
- package/dist/index.cjs +47 -2
- package/dist/index.js +37 -2
- package/package.json +1 -1
- package/spec/openapi.json +1631 -847
- package/spec/openapi.yaml +1055 -545
package/dist/client.d.ts
CHANGED
|
@@ -335,6 +335,18 @@ export declare enum SiteSettingsScanTopics {
|
|
|
335
335
|
Auto = "auto",
|
|
336
336
|
Never = "never"
|
|
337
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* How much GitBook may do on its own when it resolves broken links automatically. GitBook never
|
|
340
|
+
* applies a fix it isn't sure about, at any level.
|
|
341
|
+
* - `suggest-fixes` drafts fixes for approval and applies none.
|
|
342
|
+
* - `fix-clear-matches` applies the clearest fixes and drafts the less certain ones for approval.
|
|
343
|
+
* - `fix-close-matches` applies the clear and the close fixes.
|
|
344
|
+
*/
|
|
345
|
+
export declare enum SiteSettingsBrokenLinksAutonomyLevel {
|
|
346
|
+
SuggestFixes = "suggest-fixes",
|
|
347
|
+
FixClearMatches = "fix-clear-matches",
|
|
348
|
+
FixCloseMatches = "fix-close-matches"
|
|
349
|
+
}
|
|
338
350
|
export declare enum AIModel {
|
|
339
351
|
Fast = "fast",
|
|
340
352
|
ReasoningLow = "reasoning-low",
|
|
@@ -820,6 +832,14 @@ export declare enum BillingSwitchAction {
|
|
|
820
832
|
Downgrade = "downgrade",
|
|
821
833
|
SwitchInterval = "switch_interval"
|
|
822
834
|
}
|
|
835
|
+
/** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
|
|
836
|
+
export declare enum AICreditGrantType {
|
|
837
|
+
Paid = "paid",
|
|
838
|
+
Bonus = "bonus",
|
|
839
|
+
Site = "site",
|
|
840
|
+
Rollover = "rollover",
|
|
841
|
+
Custom = "custom"
|
|
842
|
+
}
|
|
823
843
|
/** Identifier of a billing meter */
|
|
824
844
|
export declare enum BillingMeter {
|
|
825
845
|
AiResponses = "ai_responses",
|
|
@@ -1248,7 +1268,10 @@ export declare enum TranslationLanguage {
|
|
|
1248
1268
|
Lt = "lt",
|
|
1249
1269
|
Lv = "lv",
|
|
1250
1270
|
Et = "et",
|
|
1251
|
-
Sl = "sl"
|
|
1271
|
+
Sl = "sl",
|
|
1272
|
+
FrCa = "fr-ca",
|
|
1273
|
+
EsMx = "es-mx",
|
|
1274
|
+
Es419 = "es-419"
|
|
1252
1275
|
}
|
|
1253
1276
|
/**
|
|
1254
1277
|
* Determines how a Space can be edited.
|
|
@@ -1280,6 +1303,30 @@ export declare enum ContentVisibility {
|
|
|
1280
1303
|
export type APIChannelData = APIChannelGitSyncOperationData | APIChannelGitSyncSiteOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
|
|
1281
1304
|
/** Channel to subscribe to for realtime updates. */
|
|
1282
1305
|
export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelGitSyncSiteOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
|
|
1306
|
+
/** The plan upgrade that would make a feature available. */
|
|
1307
|
+
export type FeatureUpgradeRequirement = {
|
|
1308
|
+
type: "organization";
|
|
1309
|
+
/** An organization feature used for plan access and upgrade prompts. */
|
|
1310
|
+
feature: OrganizationFeature;
|
|
1311
|
+
/** The minimum organization plan that includes the feature. */
|
|
1312
|
+
requiredPlan: BillingProduct;
|
|
1313
|
+
/**
|
|
1314
|
+
* Where an admin may upgrade the organization's plan.
|
|
1315
|
+
* @format uri
|
|
1316
|
+
*/
|
|
1317
|
+
url: string;
|
|
1318
|
+
} | {
|
|
1319
|
+
type: "site";
|
|
1320
|
+
/** The site feature identifier */
|
|
1321
|
+
feature: SiteFeatureKey;
|
|
1322
|
+
/** The minimum site plan that includes the feature. */
|
|
1323
|
+
requiredPlan: SiteType;
|
|
1324
|
+
/**
|
|
1325
|
+
* Where an admin may upgrade the site's plan.
|
|
1326
|
+
* @format uri
|
|
1327
|
+
*/
|
|
1328
|
+
url: string;
|
|
1329
|
+
};
|
|
1283
1330
|
/** An absolute reference to content in GitBook. */
|
|
1284
1331
|
export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent | ContentLocationOpenAPI;
|
|
1285
1332
|
export type PublishedContentRedirect = {
|
|
@@ -1339,7 +1386,9 @@ export type ChangeRequestContentChange = ({
|
|
|
1339
1386
|
operation: "revert_page";
|
|
1340
1387
|
} & ChangeRequestContentChangeRevertPage) | ({
|
|
1341
1388
|
operation: "insert_files";
|
|
1342
|
-
} & ChangeRequestContentChangeInsertFiles)
|
|
1389
|
+
} & ChangeRequestContentChangeInsertFiles) | ({
|
|
1390
|
+
operation: "insert_computed_page";
|
|
1391
|
+
} & ChangeRequestContentChangeInsertComputedPage);
|
|
1343
1392
|
export type Revision = RevisionTypeEdits | RevisionTypeMerge | RevisionTypeRollback | RevisionTypeUpdate | RevisionTypeComputed;
|
|
1344
1393
|
export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink | RevisionPageComputed;
|
|
1345
1394
|
export interface ApiInformation {
|
|
@@ -2067,6 +2116,24 @@ export interface DocumentInlineImage {
|
|
|
2067
2116
|
};
|
|
2068
2117
|
isVoid: true;
|
|
2069
2118
|
}
|
|
2119
|
+
export interface DocumentInlineMath {
|
|
2120
|
+
object: "inline";
|
|
2121
|
+
type: "inline-math";
|
|
2122
|
+
key?: string;
|
|
2123
|
+
data: {
|
|
2124
|
+
formula: string;
|
|
2125
|
+
};
|
|
2126
|
+
isVoid: true;
|
|
2127
|
+
}
|
|
2128
|
+
export interface DocumentInlineExpression {
|
|
2129
|
+
object: "inline";
|
|
2130
|
+
type: "expression";
|
|
2131
|
+
key?: string;
|
|
2132
|
+
data: {
|
|
2133
|
+
expression: string;
|
|
2134
|
+
};
|
|
2135
|
+
isVoid: true;
|
|
2136
|
+
}
|
|
2070
2137
|
export interface ContentRefPage {
|
|
2071
2138
|
kind: "page";
|
|
2072
2139
|
page: string;
|
|
@@ -2113,11 +2180,21 @@ export interface ContentRefOpenAPI {
|
|
|
2113
2180
|
}
|
|
2114
2181
|
/** A relative reference to content in GitBook. */
|
|
2115
2182
|
export type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace | ContentRefReusableContent | ContentRefTag | ContentRefOpenAPI;
|
|
2183
|
+
export interface DocumentInlineMention {
|
|
2184
|
+
object: "inline";
|
|
2185
|
+
type: "mention";
|
|
2186
|
+
key?: string;
|
|
2187
|
+
data: {
|
|
2188
|
+
/** A relative reference to content in GitBook. */
|
|
2189
|
+
ref: ContentRef;
|
|
2190
|
+
};
|
|
2191
|
+
isVoid: true;
|
|
2192
|
+
}
|
|
2116
2193
|
export interface DocumentInlineLink {
|
|
2117
2194
|
object: "inline";
|
|
2118
2195
|
type: "link";
|
|
2119
2196
|
key?: string;
|
|
2120
|
-
nodes: (DocumentText | DocumentInlineImage)[];
|
|
2197
|
+
nodes: (DocumentText | DocumentInlineImage | DocumentInlineMath | DocumentInlineExpression | DocumentInlineMention)[];
|
|
2121
2198
|
data: {
|
|
2122
2199
|
/** A relative reference to content in GitBook. */
|
|
2123
2200
|
ref: ContentRef;
|
|
@@ -2144,24 +2221,6 @@ export interface DocumentInlineIcon {
|
|
|
2144
2221
|
};
|
|
2145
2222
|
isVoid: true;
|
|
2146
2223
|
}
|
|
2147
|
-
export interface DocumentInlineExpression {
|
|
2148
|
-
object: "inline";
|
|
2149
|
-
type: "expression";
|
|
2150
|
-
key?: string;
|
|
2151
|
-
data: {
|
|
2152
|
-
expression: string;
|
|
2153
|
-
};
|
|
2154
|
-
isVoid: true;
|
|
2155
|
-
}
|
|
2156
|
-
export interface DocumentInlineMath {
|
|
2157
|
-
object: "inline";
|
|
2158
|
-
type: "inline-math";
|
|
2159
|
-
key?: string;
|
|
2160
|
-
data: {
|
|
2161
|
-
formula: string;
|
|
2162
|
-
};
|
|
2163
|
-
isVoid: true;
|
|
2164
|
-
}
|
|
2165
2224
|
export interface DocumentBlockParagraph {
|
|
2166
2225
|
object: "block";
|
|
2167
2226
|
type: "paragraph";
|
|
@@ -2235,6 +2294,13 @@ export interface DocumentBlockCode {
|
|
|
2235
2294
|
nodes: DocumentBlockCodeLine[];
|
|
2236
2295
|
isVoid?: false;
|
|
2237
2296
|
}
|
|
2297
|
+
export interface DocumentFragment {
|
|
2298
|
+
object: "fragment";
|
|
2299
|
+
key?: string;
|
|
2300
|
+
fragment?: string;
|
|
2301
|
+
type?: string;
|
|
2302
|
+
nodes: DocumentBlock[];
|
|
2303
|
+
}
|
|
2238
2304
|
export interface DocumentBlockEmbed {
|
|
2239
2305
|
object: "block";
|
|
2240
2306
|
type: "embed";
|
|
@@ -2243,6 +2309,10 @@ export interface DocumentBlockEmbed {
|
|
|
2243
2309
|
url: string;
|
|
2244
2310
|
fullWidth?: boolean;
|
|
2245
2311
|
};
|
|
2312
|
+
fragments?: (DocumentFragment & {
|
|
2313
|
+
fragment: "caption";
|
|
2314
|
+
nodes: DocumentBlockParagraph[];
|
|
2315
|
+
})[];
|
|
2246
2316
|
isVoid: true;
|
|
2247
2317
|
}
|
|
2248
2318
|
export type PlainObject = any;
|
|
@@ -2418,13 +2488,6 @@ export interface DocumentTableCellMerge {
|
|
|
2418
2488
|
/** Number of rows or columns covered by a table cell merge */
|
|
2419
2489
|
colSpan: DocumentTableCellSpan;
|
|
2420
2490
|
}
|
|
2421
|
-
export interface DocumentFragment {
|
|
2422
|
-
object: "fragment";
|
|
2423
|
-
key?: string;
|
|
2424
|
-
fragment?: string;
|
|
2425
|
-
type?: string;
|
|
2426
|
-
nodes: DocumentBlock[];
|
|
2427
|
-
}
|
|
2428
2491
|
export interface DocumentBlockTable {
|
|
2429
2492
|
object: "block";
|
|
2430
2493
|
type: "table";
|
|
@@ -2443,78 +2506,84 @@ export interface DocumentBlockTable {
|
|
|
2443
2506
|
};
|
|
2444
2507
|
fragments: DocumentFragment[];
|
|
2445
2508
|
}
|
|
2446
|
-
export interface DocumentBlockHint {
|
|
2447
|
-
object: "block";
|
|
2448
|
-
type: "hint";
|
|
2449
|
-
key?: string;
|
|
2450
|
-
data: {
|
|
2451
|
-
style: "info" | "warning" | "danger" | "success";
|
|
2452
|
-
/** Name of the icon */
|
|
2453
|
-
icon?: Icon;
|
|
2454
|
-
};
|
|
2455
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable)[];
|
|
2456
|
-
isVoid?: false;
|
|
2457
|
-
}
|
|
2458
2509
|
export interface DocumentBlockQuote {
|
|
2459
2510
|
object: "block";
|
|
2460
2511
|
type: "blockquote";
|
|
2461
2512
|
key?: string;
|
|
2462
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
|
|
2513
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockCode | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockExpandable | DocumentBlockFile | DocumentBlockHint | DocumentBlockIf | DocumentBlockMath | DocumentBlockPrompt | DocumentBlockStepper | DocumentBlockTabs)[];
|
|
2463
2514
|
isVoid?: false;
|
|
2464
2515
|
data?: object;
|
|
2465
2516
|
}
|
|
2466
|
-
export interface
|
|
2517
|
+
export interface DocumentBlockDrawing {
|
|
2467
2518
|
object: "block";
|
|
2468
|
-
type: "
|
|
2519
|
+
type: "drawing";
|
|
2469
2520
|
key?: string;
|
|
2470
2521
|
data: {
|
|
2471
|
-
|
|
2522
|
+
ref?: ContentRefFile;
|
|
2472
2523
|
};
|
|
2524
|
+
fragments?: (DocumentFragment & {
|
|
2525
|
+
fragment: "caption";
|
|
2526
|
+
nodes: DocumentBlockParagraph[];
|
|
2527
|
+
})[];
|
|
2473
2528
|
isVoid: true;
|
|
2474
2529
|
}
|
|
2475
|
-
export interface
|
|
2530
|
+
export interface DocumentBlockFile {
|
|
2476
2531
|
object: "block";
|
|
2477
|
-
type: "
|
|
2532
|
+
type: "file";
|
|
2478
2533
|
key?: string;
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
data?: {
|
|
2482
|
-
checked?: boolean;
|
|
2534
|
+
data: {
|
|
2535
|
+
ref: ContentRefFile;
|
|
2483
2536
|
};
|
|
2537
|
+
fragments?: (DocumentFragment & {
|
|
2538
|
+
fragment: "caption";
|
|
2539
|
+
nodes: DocumentBlockParagraph[];
|
|
2540
|
+
})[];
|
|
2541
|
+
isVoid: true;
|
|
2484
2542
|
}
|
|
2485
|
-
export
|
|
2543
|
+
export type Length = number | {
|
|
2544
|
+
unit: string;
|
|
2545
|
+
value: number;
|
|
2546
|
+
};
|
|
2547
|
+
export interface DocumentBlockImage {
|
|
2486
2548
|
object: "block";
|
|
2487
|
-
type: "
|
|
2549
|
+
type: "image";
|
|
2488
2550
|
key?: string;
|
|
2489
2551
|
data: {
|
|
2490
|
-
|
|
2491
|
-
|
|
2552
|
+
ref: ContentRefURL | ContentRefFile;
|
|
2553
|
+
refDark?: ContentRefURL | ContentRefFile;
|
|
2554
|
+
width?: Length;
|
|
2555
|
+
height?: Length;
|
|
2556
|
+
alt?: string;
|
|
2492
2557
|
};
|
|
2493
|
-
|
|
2494
|
-
|
|
2558
|
+
fragments: (DocumentFragment & {
|
|
2559
|
+
fragment: "caption";
|
|
2560
|
+
nodes: DocumentBlockParagraph[];
|
|
2561
|
+
})[];
|
|
2562
|
+
isVoid: true;
|
|
2495
2563
|
}
|
|
2496
|
-
export interface
|
|
2564
|
+
export interface DocumentBlockImages {
|
|
2497
2565
|
object: "block";
|
|
2498
|
-
type: "
|
|
2566
|
+
type: "images";
|
|
2499
2567
|
key?: string;
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2568
|
+
data: {
|
|
2569
|
+
align?: "center" | "left" | "right";
|
|
2570
|
+
fullWidth?: boolean;
|
|
2571
|
+
withFrame?: boolean;
|
|
2572
|
+
};
|
|
2573
|
+
nodes: DocumentBlockImage[];
|
|
2574
|
+
isVoid: false;
|
|
2503
2575
|
}
|
|
2504
|
-
export interface
|
|
2576
|
+
export interface DocumentBlockHint {
|
|
2505
2577
|
object: "block";
|
|
2506
|
-
type: "
|
|
2578
|
+
type: "hint";
|
|
2507
2579
|
key?: string;
|
|
2508
|
-
|
|
2580
|
+
data: {
|
|
2581
|
+
style: "info" | "warning" | "danger" | "success";
|
|
2582
|
+
/** Name of the icon */
|
|
2583
|
+
icon?: Icon;
|
|
2584
|
+
};
|
|
2585
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockQuote | DocumentBlockCode | DocumentBlockDrawing | DocumentBlockExpandable | DocumentBlockFile | DocumentBlockHint | DocumentBlockIf | DocumentBlockMath | DocumentBlockPrompt | DocumentBlockStepper | DocumentBlockTabs)[];
|
|
2509
2586
|
isVoid?: false;
|
|
2510
|
-
data?: object;
|
|
2511
|
-
}
|
|
2512
|
-
export interface DocumentBlockDivider {
|
|
2513
|
-
object: "block";
|
|
2514
|
-
type: "divider";
|
|
2515
|
-
key?: string;
|
|
2516
|
-
isVoid: true;
|
|
2517
|
-
data: object;
|
|
2518
2587
|
}
|
|
2519
2588
|
export interface DocumentBlockPrompt {
|
|
2520
2589
|
object: "block";
|
|
@@ -2549,69 +2618,37 @@ export interface DocumentBlockIf {
|
|
|
2549
2618
|
expression: string;
|
|
2550
2619
|
};
|
|
2551
2620
|
}
|
|
2552
|
-
export
|
|
2553
|
-
unit: string;
|
|
2554
|
-
value: number;
|
|
2555
|
-
};
|
|
2556
|
-
export interface DocumentBlockImage {
|
|
2621
|
+
export interface DocumentBlockReusableContent {
|
|
2557
2622
|
object: "block";
|
|
2558
|
-
type: "
|
|
2623
|
+
type: "reusable-content";
|
|
2559
2624
|
key?: string;
|
|
2560
2625
|
data: {
|
|
2561
|
-
ref:
|
|
2562
|
-
refDark?: ContentRefURL | ContentRefFile;
|
|
2563
|
-
width?: Length;
|
|
2564
|
-
height?: Length;
|
|
2565
|
-
alt?: string;
|
|
2626
|
+
ref: ContentRefReusableContent;
|
|
2566
2627
|
};
|
|
2567
|
-
fragments: (DocumentFragment & {
|
|
2568
|
-
fragment: "caption";
|
|
2569
|
-
nodes: DocumentBlockParagraph[];
|
|
2570
|
-
})[];
|
|
2571
2628
|
isVoid: true;
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
type: "images";
|
|
2576
|
-
key?: string;
|
|
2577
|
-
data: {
|
|
2578
|
-
align?: "center" | "left" | "right";
|
|
2579
|
-
fullWidth?: boolean;
|
|
2580
|
-
withFrame?: boolean;
|
|
2581
|
-
};
|
|
2582
|
-
nodes: DocumentBlockImage[];
|
|
2583
|
-
isVoid: false;
|
|
2584
|
-
}
|
|
2585
|
-
export interface DocumentBlockFile {
|
|
2586
|
-
object: "block";
|
|
2587
|
-
type: "file";
|
|
2588
|
-
key?: string;
|
|
2589
|
-
data: {
|
|
2590
|
-
ref: ContentRefFile;
|
|
2629
|
+
meta?: {
|
|
2630
|
+
/** A content token that can be used to fetch the reusable content from the API. */
|
|
2631
|
+
token?: string;
|
|
2591
2632
|
};
|
|
2592
|
-
isVoid: true;
|
|
2593
2633
|
}
|
|
2594
|
-
export interface
|
|
2634
|
+
export interface DocumentBlockContentRef {
|
|
2595
2635
|
object: "block";
|
|
2596
|
-
type: "
|
|
2636
|
+
type: "content-ref";
|
|
2597
2637
|
key?: string;
|
|
2598
2638
|
data: {
|
|
2599
|
-
|
|
2639
|
+
/** A relative reference to content in GitBook. */
|
|
2640
|
+
ref: ContentRef;
|
|
2600
2641
|
};
|
|
2601
2642
|
isVoid: true;
|
|
2602
2643
|
}
|
|
2603
|
-
export interface
|
|
2644
|
+
export interface DocumentBlockMath {
|
|
2604
2645
|
object: "block";
|
|
2605
|
-
type: "
|
|
2646
|
+
type: "math";
|
|
2606
2647
|
key?: string;
|
|
2607
2648
|
data: {
|
|
2608
|
-
|
|
2649
|
+
formula: string;
|
|
2609
2650
|
};
|
|
2610
2651
|
isVoid: true;
|
|
2611
|
-
meta?: {
|
|
2612
|
-
/** A content token that can be used to fetch the reusable content from the API. */
|
|
2613
|
-
token?: string;
|
|
2614
|
-
};
|
|
2615
2652
|
}
|
|
2616
2653
|
export interface DocumentBlockExpandable {
|
|
2617
2654
|
object: "block";
|
|
@@ -2633,28 +2670,36 @@ export interface DocumentBlockExpandable {
|
|
|
2633
2670
|
fragment: "expandable-body";
|
|
2634
2671
|
type: "expandable-body";
|
|
2635
2672
|
/** @minItems 1 */
|
|
2636
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockReusableContent | DocumentBlockIntegration)[];
|
|
2673
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper)[];
|
|
2637
2674
|
}))[];
|
|
2638
2675
|
meta?: {
|
|
2639
2676
|
/** Unique ID to be used in an URL for the block. */
|
|
2640
2677
|
id: string;
|
|
2641
2678
|
};
|
|
2642
2679
|
}
|
|
2643
|
-
export interface
|
|
2680
|
+
export interface DocumentBlockStepper {
|
|
2644
2681
|
object: "block";
|
|
2645
|
-
type: "
|
|
2682
|
+
type: "stepper";
|
|
2646
2683
|
key?: string;
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2684
|
+
nodes: DocumentBlockStepperStep[];
|
|
2685
|
+
isVoid?: false;
|
|
2686
|
+
data?: object;
|
|
2687
|
+
}
|
|
2688
|
+
export interface DocumentBlockTabs {
|
|
2689
|
+
object: "block";
|
|
2690
|
+
type: "tabs";
|
|
2691
|
+
key?: string;
|
|
2692
|
+
nodes: DocumentBlockTabsItem[];
|
|
2693
|
+
isVoid?: false;
|
|
2694
|
+
data?: {
|
|
2695
|
+
fullWidth?: boolean;
|
|
2650
2696
|
};
|
|
2651
|
-
isVoid: true;
|
|
2652
2697
|
}
|
|
2653
2698
|
export interface DocumentBlockTabsItem {
|
|
2654
2699
|
object: "block";
|
|
2655
2700
|
type: "tabs-item";
|
|
2656
2701
|
key?: string;
|
|
2657
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration)[];
|
|
2702
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockTabs)[];
|
|
2658
2703
|
data: {
|
|
2659
2704
|
title?: string;
|
|
2660
2705
|
/** Name of the icon */
|
|
@@ -2668,15 +2713,59 @@ export interface DocumentBlockTabsItem {
|
|
|
2668
2713
|
};
|
|
2669
2714
|
isVoid?: false;
|
|
2670
2715
|
}
|
|
2671
|
-
export interface
|
|
2716
|
+
export interface DocumentBlockStepperStep {
|
|
2672
2717
|
object: "block";
|
|
2673
|
-
type: "
|
|
2718
|
+
type: "stepper-step";
|
|
2674
2719
|
key?: string;
|
|
2675
|
-
nodes:
|
|
2720
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockTabs | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockStepper)[];
|
|
2721
|
+
data: {
|
|
2722
|
+
icon?: string;
|
|
2723
|
+
};
|
|
2724
|
+
isVoid?: false;
|
|
2725
|
+
}
|
|
2726
|
+
export interface DocumentBlockListItem {
|
|
2727
|
+
object: "block";
|
|
2728
|
+
type: "list-item";
|
|
2729
|
+
key?: string;
|
|
2730
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockCode | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockTable | DocumentBlockImages)[];
|
|
2676
2731
|
isVoid?: false;
|
|
2677
2732
|
data?: {
|
|
2678
|
-
|
|
2733
|
+
checked?: boolean;
|
|
2734
|
+
};
|
|
2735
|
+
}
|
|
2736
|
+
export interface DocumentBlockListOrdered {
|
|
2737
|
+
object: "block";
|
|
2738
|
+
type: "list-ordered";
|
|
2739
|
+
key?: string;
|
|
2740
|
+
data: {
|
|
2741
|
+
/** An integer to start counting from for the list items. */
|
|
2742
|
+
start?: number;
|
|
2679
2743
|
};
|
|
2744
|
+
nodes: DocumentBlockListItem[];
|
|
2745
|
+
isVoid?: false;
|
|
2746
|
+
}
|
|
2747
|
+
export interface DocumentBlockListUnordered {
|
|
2748
|
+
object: "block";
|
|
2749
|
+
type: "list-unordered";
|
|
2750
|
+
key?: string;
|
|
2751
|
+
nodes: DocumentBlockListItem[];
|
|
2752
|
+
data?: object;
|
|
2753
|
+
isVoid?: false;
|
|
2754
|
+
}
|
|
2755
|
+
export interface DocumentBlockListTasks {
|
|
2756
|
+
object: "block";
|
|
2757
|
+
type: "list-tasks";
|
|
2758
|
+
key?: string;
|
|
2759
|
+
nodes: DocumentBlockListItem[];
|
|
2760
|
+
isVoid?: false;
|
|
2761
|
+
data?: object;
|
|
2762
|
+
}
|
|
2763
|
+
export interface DocumentBlockDivider {
|
|
2764
|
+
object: "block";
|
|
2765
|
+
type: "divider";
|
|
2766
|
+
key?: string;
|
|
2767
|
+
isVoid: true;
|
|
2768
|
+
data: object;
|
|
2680
2769
|
}
|
|
2681
2770
|
/** Pointer to an operation in the OpenAPI spec. */
|
|
2682
2771
|
export interface OpenAPIOperationPointer {
|
|
@@ -2763,29 +2852,11 @@ export interface DocumentBlockOpenAPIWebhook {
|
|
|
2763
2852
|
id: string;
|
|
2764
2853
|
};
|
|
2765
2854
|
}
|
|
2766
|
-
export interface DocumentBlockStepperStep {
|
|
2767
|
-
object: "block";
|
|
2768
|
-
type: "stepper-step";
|
|
2769
|
-
key?: string;
|
|
2770
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockExpandable)[];
|
|
2771
|
-
data: {
|
|
2772
|
-
icon?: string;
|
|
2773
|
-
};
|
|
2774
|
-
isVoid?: false;
|
|
2775
|
-
}
|
|
2776
|
-
export interface DocumentBlockStepper {
|
|
2777
|
-
object: "block";
|
|
2778
|
-
type: "stepper";
|
|
2779
|
-
key?: string;
|
|
2780
|
-
nodes: DocumentBlockStepperStep[];
|
|
2781
|
-
isVoid?: false;
|
|
2782
|
-
data?: object;
|
|
2783
|
-
}
|
|
2784
2855
|
export interface DocumentBlockColumn {
|
|
2785
2856
|
object: "block";
|
|
2786
2857
|
type: "column";
|
|
2787
2858
|
key?: string;
|
|
2788
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper)[];
|
|
2859
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockImages | DocumentBlockCode | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockContentRef | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockIntegration | DocumentBlockMath | DocumentBlockQuote | DocumentBlockTable | DocumentBlockExpandable | DocumentBlockStepper | DocumentBlockIf)[];
|
|
2789
2860
|
isVoid?: false;
|
|
2790
2861
|
data: {
|
|
2791
2862
|
width?: Length;
|
|
@@ -2806,9 +2877,10 @@ export interface DocumentBlockUpdate {
|
|
|
2806
2877
|
object: "block";
|
|
2807
2878
|
type: "update";
|
|
2808
2879
|
key?: string;
|
|
2809
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable)[];
|
|
2880
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration | DocumentBlockTabs | DocumentBlockExpandable | DocumentBlockTable | DocumentBlockIf | DocumentBlockStepper)[];
|
|
2810
2881
|
data: {
|
|
2811
|
-
date
|
|
2882
|
+
/** Date of the update. Accepts a YYYY-MM-DD date or a timestamp. Timestamps are normalized to their UTC calendar date; responses use YYYY-MM-DD. */
|
|
2883
|
+
date: string | Timestamp;
|
|
2812
2884
|
/** Array of tags. Each tag is id'ed by its slug. */
|
|
2813
2885
|
tags?: ContentRefTag[];
|
|
2814
2886
|
};
|
|
@@ -2826,21 +2898,13 @@ export interface DocumentBlockUpdates {
|
|
|
2826
2898
|
};
|
|
2827
2899
|
}
|
|
2828
2900
|
export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockIf | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep | DocumentBlockColumns | DocumentBlockColumn | DocumentBlockUpdates | DocumentBlockUpdate;
|
|
2829
|
-
export interface DocumentInlineMention {
|
|
2830
|
-
object: "inline";
|
|
2831
|
-
type: "mention";
|
|
2832
|
-
key?: string;
|
|
2833
|
-
data: {
|
|
2834
|
-
/** A relative reference to content in GitBook. */
|
|
2835
|
-
ref: ContentRef;
|
|
2836
|
-
};
|
|
2837
|
-
isVoid: true;
|
|
2838
|
-
}
|
|
2839
2901
|
/** Action to perform when an inline button is clicked. */
|
|
2840
2902
|
export type DocumentAction = {
|
|
2841
2903
|
action: "search";
|
|
2842
2904
|
/** The search query to prefill. */
|
|
2843
2905
|
query?: string;
|
|
2906
|
+
/** Where to search. `site` searches the whole site; `space` limits the search to the space the visitor is reading. */
|
|
2907
|
+
scope?: "site" | "space";
|
|
2844
2908
|
} | {
|
|
2845
2909
|
action: "ask";
|
|
2846
2910
|
/** The question to prefill. */
|
|
@@ -3279,6 +3343,26 @@ export type RevisionTypeEdits = RevisionBase & {
|
|
|
3279
3343
|
* @maxLength 100
|
|
3280
3344
|
*/
|
|
3281
3345
|
export type ChangeRequestSubject = string;
|
|
3346
|
+
/** Counts of entities grouped by how they changed relative to the change request base. */
|
|
3347
|
+
export interface ChangeRequestChangeCountsByType {
|
|
3348
|
+
/** @min 0 */
|
|
3349
|
+
added: number;
|
|
3350
|
+
/** @min 0 */
|
|
3351
|
+
modified: number;
|
|
3352
|
+
/** @min 0 */
|
|
3353
|
+
deleted: number;
|
|
3354
|
+
}
|
|
3355
|
+
/** Exact semantic entity and page-document block counts for a change request at its current head and base revisions. */
|
|
3356
|
+
export interface ChangeRequestChangeCounts {
|
|
3357
|
+
/** Counts of entities grouped by how they changed relative to the change request base. */
|
|
3358
|
+
pages: ChangeRequestChangeCountsByType;
|
|
3359
|
+
/** Counts of entities grouped by how they changed relative to the change request base. */
|
|
3360
|
+
library: ChangeRequestChangeCountsByType;
|
|
3361
|
+
/** Nested user-visible page-document block counts. Absent when `blocksOmittedReason` is set. */
|
|
3362
|
+
blocks?: ChangeRequestChangeCountsByType;
|
|
3363
|
+
/** Why `blocks` is absent: too many pages changed (`too-many-pages`), the changed pages hold too many blocks to compare within the counting budget (`too-many-blocks`; this is not a count of changed blocks), or counting ran out of time (`timeout`). Page and library counts are still exact. */
|
|
3364
|
+
blocksOmittedReason?: "too-many-pages" | "too-many-blocks" | "timeout";
|
|
3365
|
+
}
|
|
3282
3366
|
/**
|
|
3283
3367
|
* Optional title to display for the link.
|
|
3284
3368
|
* @maxLength 128
|
|
@@ -3358,6 +3442,8 @@ export interface ChangeRequest {
|
|
|
3358
3442
|
revisionMerged?: string;
|
|
3359
3443
|
/** Count of opened comments on the change request. */
|
|
3360
3444
|
comments: number;
|
|
3445
|
+
/** Change counts computed when the change request gets a new revision, for its current head and base revisions. Merged change requests keep their last computed counts. Absent until computed. */
|
|
3446
|
+
changeCounts?: ChangeRequestChangeCounts;
|
|
3361
3447
|
/** Site topic the change request was created from, when it came from one. */
|
|
3362
3448
|
siteTopic?: {
|
|
3363
3449
|
/** ID of the site associated with the change request. */
|
|
@@ -3365,18 +3451,28 @@ export interface ChangeRequest {
|
|
|
3365
3451
|
/** ID of the site topic associated with the change request. */
|
|
3366
3452
|
topic: string;
|
|
3367
3453
|
/**
|
|
3368
|
-
* ID of the site finding the change request fixes. Use `
|
|
3454
|
+
* ID of the site finding the change request fixes. Use `siteFindings` instead: a change request can fix a finding without belonging to a topic, and this field is absent in that case.
|
|
3369
3455
|
* @deprecated
|
|
3370
3456
|
*/
|
|
3371
3457
|
finding?: string;
|
|
3372
3458
|
};
|
|
3373
|
-
/**
|
|
3459
|
+
/**
|
|
3460
|
+
* First linked site finding. Use `siteFindings` to read all linked findings.
|
|
3461
|
+
* @deprecated
|
|
3462
|
+
*/
|
|
3374
3463
|
siteFinding?: {
|
|
3375
3464
|
/** ID of the site the finding belongs to. */
|
|
3376
3465
|
site: string;
|
|
3377
3466
|
/** ID of the site finding the change request fixes. */
|
|
3378
3467
|
finding: string;
|
|
3379
3468
|
};
|
|
3469
|
+
/** Site findings linked to the change request, in link order. Absent when none are linked. Merging resolves findings once every linked change request is merged, except outbound broken links, which are resolved by the outbound checker. */
|
|
3470
|
+
siteFindings?: {
|
|
3471
|
+
/** ID of the site the finding belongs to. */
|
|
3472
|
+
site: string;
|
|
3473
|
+
/** ID of the site finding the change request fixes. */
|
|
3474
|
+
finding: string;
|
|
3475
|
+
}[];
|
|
3380
3476
|
/** Style guide check that opened the change request, when it came from one. A check can be run again on the change request already open on a space, rather than opening a second one, so several checks can share a change request. */
|
|
3381
3477
|
styleguide?: {
|
|
3382
3478
|
/** ID of the site the style guide belongs to. */
|
|
@@ -3783,13 +3879,34 @@ export interface ChangeRequestContentChangeInsertFiles {
|
|
|
3783
3879
|
contentType?: string;
|
|
3784
3880
|
})[];
|
|
3785
3881
|
}
|
|
3882
|
+
/**
|
|
3883
|
+
* Insert a page whose content GitBook generates from a source instead of a document: an OpenAPI spec of the organization, rendered as an API reference. GitBook replaces the page, at its position, with the pages it generates and regenerates them whenever the source changes.
|
|
3884
|
+
* @example {"operation":"insert_computed_page","title":"API reference","computed":{"type":"builtin:openapi","props":{"models":true},"dependencies":{"spec":{"ref":{"kind":"openapi","spec":"my-api"}}}}}
|
|
3885
|
+
*/
|
|
3886
|
+
export interface ChangeRequestContentChangeInsertComputedPage {
|
|
3887
|
+
operation: "insert_computed_page";
|
|
3888
|
+
/** Parameters for an OpenAPI computed revision */
|
|
3889
|
+
computed: ComputedContentSourceRevisionOpenAPI;
|
|
3890
|
+
/**
|
|
3891
|
+
* Title of the page, only shown in the editor since the generated pages take its place. Defaults to "OpenAPI".
|
|
3892
|
+
* @minLength 1
|
|
3893
|
+
*/
|
|
3894
|
+
title?: string;
|
|
3895
|
+
/** ID of the parent page to insert the page into, so the generated pages are nested under it. If omitted, the page is inserted at the root. */
|
|
3896
|
+
into?: string;
|
|
3897
|
+
/**
|
|
3898
|
+
* Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
|
|
3899
|
+
* @min 0
|
|
3900
|
+
*/
|
|
3901
|
+
at?: number;
|
|
3902
|
+
}
|
|
3786
3903
|
export interface ChangeRequestContentUpdatePageRef {
|
|
3787
3904
|
/** Type of Object, always equals to "page". */
|
|
3788
3905
|
object: "page";
|
|
3789
3906
|
/** Unique identifier of the page. */
|
|
3790
3907
|
id: string;
|
|
3791
3908
|
urls: {
|
|
3792
|
-
/** API URL to fetch the page's full, normalized content. */
|
|
3909
|
+
/** API URL to fetch the page's full, normalized content. For a computed page, it reads the page as stored (`computed=false`), since the computed content replaces the page with the pages it generates. */
|
|
3793
3910
|
location: URL;
|
|
3794
3911
|
};
|
|
3795
3912
|
}
|
|
@@ -4138,10 +4255,8 @@ export interface SitePointer {
|
|
|
4138
4255
|
export type OrganizationDefaultContent = SitePointer;
|
|
4139
4256
|
/** An AI credit threshold from 5% to 50%, or null when disabled. */
|
|
4140
4257
|
export type AICreditThreshold = number | null;
|
|
4141
|
-
/** AI preferences
|
|
4258
|
+
/** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4142
4259
|
export interface OrganizationAISettings {
|
|
4143
|
-
/** Whether AI features are automatically paused because credits are low. */
|
|
4144
|
-
aiPaused?: boolean;
|
|
4145
4260
|
"ai-agent"?: false;
|
|
4146
4261
|
"ai-assistant"?: false;
|
|
4147
4262
|
"ai-broken-links"?: false;
|
|
@@ -4295,8 +4410,10 @@ export interface Organization {
|
|
|
4295
4410
|
sso?: boolean;
|
|
4296
4411
|
/** If true, the organization is configured to use all our AI features. */
|
|
4297
4412
|
ai?: boolean;
|
|
4298
|
-
/** AI preferences
|
|
4413
|
+
/** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4299
4414
|
aiSettings?: OrganizationAISettings;
|
|
4415
|
+
/** Whether AI features have been paused automatically due to lack of AI credits. */
|
|
4416
|
+
aiPaused?: boolean;
|
|
4300
4417
|
/** If true, invite links are enabled for this organization. */
|
|
4301
4418
|
inviteLinks: boolean;
|
|
4302
4419
|
/** Whether audit logs can currently be accessed for this organization. */
|
|
@@ -6171,8 +6288,8 @@ export interface BillingInvoicePreview {
|
|
|
6171
6288
|
adjustments: BillingInvoiceAdjustment[];
|
|
6172
6289
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6173
6290
|
creditGrants: {
|
|
6174
|
-
/** Where
|
|
6175
|
-
type:
|
|
6291
|
+
/** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
|
|
6292
|
+
type: AICreditGrantType;
|
|
6176
6293
|
/** Stripe spending priority. Lower values are consumed first. */
|
|
6177
6294
|
priority?: number;
|
|
6178
6295
|
/** Credits available from this grant before the current invoice usage. */
|
|
@@ -6258,8 +6375,8 @@ export interface Credits {
|
|
|
6258
6375
|
}
|
|
6259
6376
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6260
6377
|
export type CreditGrants = {
|
|
6261
|
-
/** Where
|
|
6262
|
-
type:
|
|
6378
|
+
/** Where AI credits come from: - `paid`: credits included in the monthly bundle - `bonus`: free credits included with the monthly bundle - `site`: credits from published paid sites - `rollover`: unused paid credits carried over from the previous period - `custom`: credits granted manually by Sales or Support */
|
|
6379
|
+
type: AICreditGrantType;
|
|
6263
6380
|
/** Stripe spending priority. Lower values are consumed first. */
|
|
6264
6381
|
priority?: number;
|
|
6265
6382
|
/** Credits available from this grant before the current invoice usage. */
|
|
@@ -8132,6 +8249,36 @@ export type YoutubeChannelId = string;
|
|
|
8132
8249
|
export type YoutubeChannelName = string;
|
|
8133
8250
|
/** A YouTube channel identifier, either a channel ID or a channel handle. */
|
|
8134
8251
|
export type YoutubeChannelPattern = YoutubeChannelId | YoutubeChannelName;
|
|
8252
|
+
export interface JiraConnectorSetupSettings {
|
|
8253
|
+
/**
|
|
8254
|
+
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
8255
|
+
* @format uri
|
|
8256
|
+
* @minLength 1
|
|
8257
|
+
* @maxLength 2048
|
|
8258
|
+
*/
|
|
8259
|
+
baseUrl: string;
|
|
8260
|
+
/**
|
|
8261
|
+
* Email of the Atlassian account whose API token is used.
|
|
8262
|
+
* @format email
|
|
8263
|
+
* @minLength 1
|
|
8264
|
+
* @maxLength 254
|
|
8265
|
+
*/
|
|
8266
|
+
apiEmail: string;
|
|
8267
|
+
/**
|
|
8268
|
+
* Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes.
|
|
8269
|
+
* @minLength 1
|
|
8270
|
+
* @maxLength 1024
|
|
8271
|
+
*/
|
|
8272
|
+
apiToken: string;
|
|
8273
|
+
/**
|
|
8274
|
+
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8275
|
+
* @maxItems 100
|
|
8276
|
+
* @uniqueItems true
|
|
8277
|
+
*/
|
|
8278
|
+
projectKeys?: string[];
|
|
8279
|
+
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
8280
|
+
statusMapping?: Record<ChangeRequestStatus, string>;
|
|
8281
|
+
}
|
|
8135
8282
|
export type ContextConnectorSetup = {
|
|
8136
8283
|
connector: "builtin:email";
|
|
8137
8284
|
} | {
|
|
@@ -8243,36 +8390,7 @@ export type ContextConnectorSetup = {
|
|
|
8243
8390
|
};
|
|
8244
8391
|
} | {
|
|
8245
8392
|
connector: "builtin:jira";
|
|
8246
|
-
setupSettings:
|
|
8247
|
-
/**
|
|
8248
|
-
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
8249
|
-
* @format uri
|
|
8250
|
-
* @minLength 1
|
|
8251
|
-
* @maxLength 2048
|
|
8252
|
-
*/
|
|
8253
|
-
baseUrl: string;
|
|
8254
|
-
/**
|
|
8255
|
-
* Email of the Atlassian account whose API token is used.
|
|
8256
|
-
* @format email
|
|
8257
|
-
* @minLength 1
|
|
8258
|
-
* @maxLength 254
|
|
8259
|
-
*/
|
|
8260
|
-
apiEmail: string;
|
|
8261
|
-
/**
|
|
8262
|
-
* Atlassian API token used for outbound writes. Redacted when read back.
|
|
8263
|
-
* @minLength 1
|
|
8264
|
-
* @maxLength 1024
|
|
8265
|
-
*/
|
|
8266
|
-
apiToken: string;
|
|
8267
|
-
/**
|
|
8268
|
-
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8269
|
-
* @maxItems 100
|
|
8270
|
-
* @uniqueItems true
|
|
8271
|
-
*/
|
|
8272
|
-
projectKeys?: string[];
|
|
8273
|
-
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
8274
|
-
statusMapping?: Record<ChangeRequestStatus, string>;
|
|
8275
|
-
};
|
|
8393
|
+
setupSettings: JiraConnectorSetupSettings;
|
|
8276
8394
|
};
|
|
8277
8395
|
export type ContextConnection = {
|
|
8278
8396
|
object: "context-connection";
|
|
@@ -8322,6 +8440,34 @@ export type ContextConnection = {
|
|
|
8322
8440
|
location: string;
|
|
8323
8441
|
};
|
|
8324
8442
|
} & ContextConnectorSetup;
|
|
8443
|
+
/**
|
|
8444
|
+
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
8445
|
+
* @format uri
|
|
8446
|
+
* @minLength 1
|
|
8447
|
+
* @maxLength 2048
|
|
8448
|
+
*/
|
|
8449
|
+
export type BaseUrl = string;
|
|
8450
|
+
/**
|
|
8451
|
+
* Email of the Atlassian account whose API token is used.
|
|
8452
|
+
* @format email
|
|
8453
|
+
* @minLength 1
|
|
8454
|
+
* @maxLength 254
|
|
8455
|
+
*/
|
|
8456
|
+
export type ApiEmail = string;
|
|
8457
|
+
/**
|
|
8458
|
+
* Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes.
|
|
8459
|
+
* @minLength 1
|
|
8460
|
+
* @maxLength 1024
|
|
8461
|
+
*/
|
|
8462
|
+
export type ApiToken = string;
|
|
8463
|
+
/**
|
|
8464
|
+
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8465
|
+
* @maxItems 100
|
|
8466
|
+
* @uniqueItems true
|
|
8467
|
+
*/
|
|
8468
|
+
export type ProjectKeys = string[];
|
|
8469
|
+
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
8470
|
+
export type StatusMapping = Record<ChangeRequestStatus, string>;
|
|
8325
8471
|
export interface ContextConnectionTestResult {
|
|
8326
8472
|
object: "context-connection-test-result";
|
|
8327
8473
|
/** Whether the stored credentials authenticated successfully. */
|
|
@@ -8329,6 +8475,7 @@ export interface ContextConnectionTestResult {
|
|
|
8329
8475
|
/** A human-readable reason for the failure, when the test failed. */
|
|
8330
8476
|
error?: string;
|
|
8331
8477
|
}
|
|
8478
|
+
export type SiteChannelType = SiteCoreChannelType | SiteConfigurableChannelType;
|
|
8332
8479
|
export interface SiteTopicUsageSettings {
|
|
8333
8480
|
/** Whether to use context to propose change requests */
|
|
8334
8481
|
changeRequests: boolean;
|
|
@@ -8374,7 +8521,6 @@ export interface SiteTopic {
|
|
|
8374
8521
|
location: string;
|
|
8375
8522
|
};
|
|
8376
8523
|
}
|
|
8377
|
-
export type SiteChannelType = SiteCoreChannelType | SiteConfigurableChannelType;
|
|
8378
8524
|
export interface SiteQuestionAnswerSourceBase {
|
|
8379
8525
|
object: "site-question-answer-source";
|
|
8380
8526
|
/** The ID of the source. */
|
|
@@ -9161,6 +9307,19 @@ export interface AIStreamResponseCompaction {
|
|
|
9161
9307
|
stepIndex: number;
|
|
9162
9308
|
}
|
|
9163
9309
|
export type AIStreamResponse = AIStreamResponseStart | AIStreamResponseStepStart | AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall | AIStreamResponseToolCallPending | AIStreamResponseFollowupSuggestion | AIStreamResponseAttachment | AIStreamResponseCompaction;
|
|
9310
|
+
/** Settings for how GitBook resolves the broken links it finds on a site. */
|
|
9311
|
+
export interface SiteSettingsBrokenLinks {
|
|
9312
|
+
/** Whether GitBook resolves broken links automatically. */
|
|
9313
|
+
autoResolve: boolean;
|
|
9314
|
+
/**
|
|
9315
|
+
* How much GitBook may do on its own when it resolves broken links automatically. GitBook never
|
|
9316
|
+
* applies a fix it isn't sure about, at any level.
|
|
9317
|
+
* - `suggest-fixes` drafts fixes for approval and applies none.
|
|
9318
|
+
* - `fix-clear-matches` applies the clearest fixes and drafts the less certain ones for approval.
|
|
9319
|
+
* - `fix-close-matches` applies the clear and the close fixes.
|
|
9320
|
+
*/
|
|
9321
|
+
autonomyLevel: SiteSettingsBrokenLinksAutonomyLevel;
|
|
9322
|
+
}
|
|
9164
9323
|
export interface SiteAgentSettingsInput {
|
|
9165
9324
|
/** Settings related to scanning for a site. */
|
|
9166
9325
|
scans: {
|
|
@@ -9176,9 +9335,13 @@ export interface SiteAgentSettingsInput {
|
|
|
9176
9335
|
editing: {
|
|
9177
9336
|
customInstructions: JSONDocument;
|
|
9178
9337
|
};
|
|
9338
|
+
/** Settings for how GitBook resolves the broken links it finds on a site. */
|
|
9339
|
+
brokenLinks?: SiteSettingsBrokenLinks;
|
|
9179
9340
|
}
|
|
9180
9341
|
export type SiteAgentSettings = {
|
|
9181
9342
|
object: "site-agent-settings";
|
|
9343
|
+
/** Settings for how GitBook resolves the broken links it finds on a site. */
|
|
9344
|
+
brokenLinks: SiteSettingsBrokenLinks;
|
|
9182
9345
|
updatedAt?: Timestamp;
|
|
9183
9346
|
/** Identifier of the member who last updated the settings. */
|
|
9184
9347
|
updatedBy?: string;
|
|
@@ -9437,6 +9600,10 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
9437
9600
|
column: "visitorBot";
|
|
9438
9601
|
} | {
|
|
9439
9602
|
column: "visitorLanguage";
|
|
9603
|
+
} | {
|
|
9604
|
+
column: "visitorUserAgent";
|
|
9605
|
+
} | {
|
|
9606
|
+
column: "visitorId";
|
|
9440
9607
|
} | {
|
|
9441
9608
|
column: "eventLinkTargetValue";
|
|
9442
9609
|
} | {
|
|
@@ -9602,6 +9769,12 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
9602
9769
|
} | {
|
|
9603
9770
|
column: "visitorLanguage";
|
|
9604
9771
|
values: (string | null)[];
|
|
9772
|
+
} | {
|
|
9773
|
+
column: "visitorUserAgent";
|
|
9774
|
+
values: string[];
|
|
9775
|
+
} | {
|
|
9776
|
+
column: "visitorId";
|
|
9777
|
+
values: string[];
|
|
9605
9778
|
} | {
|
|
9606
9779
|
column: "eventLinkTargetDomain";
|
|
9607
9780
|
values: (string | null)[];
|
|
@@ -10895,6 +11068,8 @@ export interface ContentAPIBaseToken {
|
|
|
10895
11068
|
spaces: string[];
|
|
10896
11069
|
/** Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted. */
|
|
10897
11070
|
visitorType?: "human" | "agent";
|
|
11071
|
+
/** Whether the visitor is authenticated. Only set for sites with adaptive content enabled when token verification succeeded. */
|
|
11072
|
+
visitorIsAuthenticated?: boolean;
|
|
10898
11073
|
/** The region containing the country of the visitor for whom the token was generated. Omitted if the country isn't in any region. */
|
|
10899
11074
|
visitorRegion?: string;
|
|
10900
11075
|
/** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
|
|
@@ -12082,10 +12257,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12082
12257
|
*/
|
|
12083
12258
|
evaluated?: boolean | "deterministic-only";
|
|
12084
12259
|
/**
|
|
12085
|
-
* Controls whether
|
|
12086
|
-
* - When set to `
|
|
12087
|
-
* - When set to `
|
|
12088
|
-
*
|
|
12260
|
+
* Controls whether references to other content are resolved and expanded.
|
|
12261
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
12262
|
+
* - When set to `true`, all supported content references are expanded.
|
|
12263
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
12264
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
12089
12265
|
*/
|
|
12090
12266
|
dereferenced?: boolean | "reusable-contents";
|
|
12091
12267
|
/**
|
|
@@ -12138,10 +12314,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12138
12314
|
*/
|
|
12139
12315
|
evaluated?: boolean | "deterministic-only";
|
|
12140
12316
|
/**
|
|
12141
|
-
* Controls whether
|
|
12142
|
-
* - When set to `
|
|
12143
|
-
* - When set to `
|
|
12144
|
-
*
|
|
12317
|
+
* Controls whether references to other content are resolved and expanded.
|
|
12318
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
12319
|
+
* - When set to `true`, all supported content references are expanded.
|
|
12320
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
12321
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
12145
12322
|
*/
|
|
12146
12323
|
dereferenced?: boolean | "reusable-contents";
|
|
12147
12324
|
/**
|
|
@@ -12230,7 +12407,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12230
12407
|
schema?: "current" | "next";
|
|
12231
12408
|
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
12232
12409
|
/**
|
|
12233
|
-
* @description Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready.
|
|
12410
|
+
* @description Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready. Pass `siteFindingIds` to link the documentation findings this change request fixes. Outbound broken links are resolved by the outbound checker, rather than by merging.
|
|
12234
12411
|
*
|
|
12235
12412
|
* @tags change-requests
|
|
12236
12413
|
* @name CreateChangeRequest
|
|
@@ -12245,8 +12422,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12245
12422
|
template?: ApplySpaceTemplate;
|
|
12246
12423
|
/** Description of the change request, explaining what it changes and why, for whoever reviews it. Only paragraphs and lists are kept; other blocks are stripped along with their text. */
|
|
12247
12424
|
description?: JSONDocument;
|
|
12248
|
-
/**
|
|
12425
|
+
/**
|
|
12426
|
+
* The site finding this change request fixes. Use `siteFindingIds` instead. The finding's site must contain this space.
|
|
12427
|
+
* @deprecated
|
|
12428
|
+
*/
|
|
12249
12429
|
siteFindingId?: string;
|
|
12430
|
+
/**
|
|
12431
|
+
* Site findings this change request fixes. Each finding's site must contain this space, and the caller must have edit permission on each site. Takes precedence over `siteFindingId` when both are supplied.
|
|
12432
|
+
* @maxItems 25
|
|
12433
|
+
*/
|
|
12434
|
+
siteFindingIds?: string[];
|
|
12250
12435
|
[key: string]: any;
|
|
12251
12436
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
12252
12437
|
/**
|
|
@@ -12302,7 +12487,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12302
12487
|
};
|
|
12303
12488
|
}>>;
|
|
12304
12489
|
/**
|
|
12305
|
-
* @description Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead. Set `
|
|
12490
|
+
* @description Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead. Set `siteFindingIds` to replace the documentation findings linked to the change request. Outbound broken links are resolved by the outbound checker, rather than by merging.
|
|
12306
12491
|
*
|
|
12307
12492
|
* @tags change-requests
|
|
12308
12493
|
* @name UpdateChangeRequestById
|
|
@@ -12320,8 +12505,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12320
12505
|
*/
|
|
12321
12506
|
links?: ChangeRequestLinkInput[];
|
|
12322
12507
|
status?: "draft" | "open" | "archived";
|
|
12323
|
-
/**
|
|
12508
|
+
/**
|
|
12509
|
+
* The site finding this change request fixes. Use `siteFindingIds` instead. The finding's site must contain this space. Replaces the whole set of linked findings with this finding. Pass null to unlink all findings.
|
|
12510
|
+
* @deprecated
|
|
12511
|
+
*/
|
|
12324
12512
|
siteFindingId?: string | null;
|
|
12513
|
+
/**
|
|
12514
|
+
* Replaces the linked site findings. Each finding's site must contain this space, and the caller must have edit permission on each site. Pass null or an empty list to unlink all findings. Omit to keep the current links. Takes precedence over `siteFindingId` when both are supplied.
|
|
12515
|
+
* @maxItems 25
|
|
12516
|
+
*/
|
|
12517
|
+
siteFindingIds?: any[] | null;
|
|
12325
12518
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
12326
12519
|
/**
|
|
12327
12520
|
* @description Merges the change request's draft content into the space's primary (published) content, making all changes live. If the result is "conflicts", the merge was still applied but the space may need manual conflict resolution. Consider running updateChangeRequest first to sync with the latest live content and reduce conflicts.
|
|
@@ -12719,7 +12912,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12719
12912
|
computed?: boolean;
|
|
12720
12913
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
|
|
12721
12914
|
/**
|
|
12722
|
-
* @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.
|
|
12915
|
+
* @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. **Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "<spec slug>" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `"grouping": "by-operation"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name. 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.
|
|
12723
12916
|
*
|
|
12724
12917
|
* @tags change-request-content
|
|
12725
12918
|
* @name UpdateChangeRequestContent
|
|
@@ -12850,10 +13043,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12850
13043
|
*/
|
|
12851
13044
|
evaluated?: boolean | "deterministic-only";
|
|
12852
13045
|
/**
|
|
12853
|
-
* Controls whether
|
|
12854
|
-
* - When set to `
|
|
12855
|
-
* - When set to `
|
|
12856
|
-
*
|
|
13046
|
+
* Controls whether references to other content are resolved and expanded.
|
|
13047
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
13048
|
+
* - When set to `true`, all supported content references are expanded.
|
|
13049
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
13050
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
12857
13051
|
*/
|
|
12858
13052
|
dereferenced?: boolean | "reusable-contents";
|
|
12859
13053
|
/**
|
|
@@ -13089,10 +13283,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13089
13283
|
*/
|
|
13090
13284
|
evaluated?: boolean | "deterministic-only";
|
|
13091
13285
|
/**
|
|
13092
|
-
* Controls whether
|
|
13093
|
-
* - When set to `
|
|
13094
|
-
* - When set to `
|
|
13095
|
-
*
|
|
13286
|
+
* Controls whether references to other content are resolved and expanded.
|
|
13287
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
13288
|
+
* - When set to `true`, all supported content references are expanded.
|
|
13289
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
13290
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
13096
13291
|
*/
|
|
13097
13292
|
dereferenced?: boolean | "reusable-contents";
|
|
13098
13293
|
/**
|
|
@@ -13125,10 +13320,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13125
13320
|
*/
|
|
13126
13321
|
evaluated?: boolean | "deterministic-only";
|
|
13127
13322
|
/**
|
|
13128
|
-
* Controls whether
|
|
13129
|
-
* - When set to `
|
|
13130
|
-
* - When set to `
|
|
13131
|
-
*
|
|
13323
|
+
* Controls whether references to other content are resolved and expanded.
|
|
13324
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
13325
|
+
* - When set to `true`, all supported content references are expanded.
|
|
13326
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
13327
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
13132
13328
|
*/
|
|
13133
13329
|
dereferenced?: boolean | "reusable-contents";
|
|
13134
13330
|
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
@@ -13161,10 +13357,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13161
13357
|
*/
|
|
13162
13358
|
evaluated?: boolean | "deterministic-only";
|
|
13163
13359
|
/**
|
|
13164
|
-
* Controls whether
|
|
13165
|
-
* - When set to `
|
|
13166
|
-
* - When set to `
|
|
13167
|
-
*
|
|
13360
|
+
* Controls whether references to other content are resolved and expanded.
|
|
13361
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
13362
|
+
* - When set to `true`, all supported content references are expanded.
|
|
13363
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
13364
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
13168
13365
|
*/
|
|
13169
13366
|
dereferenced?: boolean | "reusable-contents";
|
|
13170
13367
|
/**
|
|
@@ -13222,10 +13419,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13222
13419
|
*/
|
|
13223
13420
|
evaluated?: boolean | "deterministic-only";
|
|
13224
13421
|
/**
|
|
13225
|
-
* Controls whether
|
|
13226
|
-
* - When set to `
|
|
13227
|
-
* - When set to `
|
|
13228
|
-
*
|
|
13422
|
+
* Controls whether references to other content are resolved and expanded.
|
|
13423
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
13424
|
+
* - When set to `true`, all supported content references are expanded.
|
|
13425
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
13426
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
13229
13427
|
*/
|
|
13230
13428
|
dereferenced?: boolean | "reusable-contents";
|
|
13231
13429
|
/**
|
|
@@ -13284,10 +13482,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13284
13482
|
*/
|
|
13285
13483
|
evaluated?: boolean | "deterministic-only";
|
|
13286
13484
|
/**
|
|
13287
|
-
* Controls whether
|
|
13288
|
-
* - When set to `
|
|
13289
|
-
* - When set to `
|
|
13290
|
-
*
|
|
13485
|
+
* Controls whether references to other content are resolved and expanded.
|
|
13486
|
+
* - When set to `false`, references are preserved, including reusable content includes in Markdown.
|
|
13487
|
+
* - When set to `true`, all supported content references are expanded.
|
|
13488
|
+
* - When set to `reusable-contents`, only reusable content references are expanded.
|
|
13489
|
+
* When omitted, Markdown responses expand all supported content references, while document responses preserve them.
|
|
13291
13490
|
*/
|
|
13292
13491
|
dereferenced?: boolean | "reusable-contents";
|
|
13293
13492
|
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
@@ -15476,7 +15675,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15476
15675
|
items: OpenAPISpec[];
|
|
15477
15676
|
}, any>>;
|
|
15478
15677
|
/**
|
|
15479
|
-
*
|
|
15678
|
+
* @description Adds an OpenAPI spec to the organization, from a URL or from its text. The spec is processed asynchronously and no page is created: to publish its API reference in a space, insert a page that renders it with an `insert_computed_page` change, through the `updateChangeRequestContent` operation. That reference fills in once processing completes and is regenerated each time the spec is updated.
|
|
15480
15679
|
*
|
|
15481
15680
|
* @tags openapi
|
|
15482
15681
|
* @name CreateOpenApiSpec
|
|
@@ -15513,7 +15712,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15513
15712
|
};
|
|
15514
15713
|
}>>;
|
|
15515
15714
|
/**
|
|
15516
|
-
*
|
|
15715
|
+
* @description Creates the organization's OpenAPI spec with this slug, or replaces its source with a new version. The spec is processed asynchronously, and pages that already render it are regenerated once it is. Creating a spec adds no page: to publish its API reference in a space, insert a page that renders it with an `insert_computed_page` change, through the `updateChangeRequestContent` operation.
|
|
15517
15716
|
*
|
|
15518
15717
|
* @tags openapi
|
|
15519
15718
|
* @name CreateOrUpdateOpenApiSpecBySlug
|
|
@@ -16574,6 +16773,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16574
16773
|
claims?: string;
|
|
16575
16774
|
/** ISO 3166-1 alpha-2 code of the country of the visitor for which we want to preview the site. It is matched against the `regions` of the site adaptive schema to resolve `visitor.region`. */
|
|
16576
16775
|
country?: string;
|
|
16776
|
+
/** Whether the visitor for which we want to preview the site is signed in, as `visitor.isAuthenticated` reports it. Claims outside `unsigned` already imply a signed-in visitor; set this to preview one that is signed in while carrying no claim. */
|
|
16777
|
+
visitorAuthenticated?: boolean;
|
|
16577
16778
|
/**
|
|
16578
16779
|
* Whether to include draft content in the preview. Defaults to true
|
|
16579
16780
|
* @default true
|
|
@@ -16667,7 +16868,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16667
16868
|
items: Integration[];
|
|
16668
16869
|
}, any>>;
|
|
16669
16870
|
/**
|
|
16670
|
-
* @description Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces
|
|
16871
|
+
* @description Pass an existing space ID to link it, or pass `null` to create and link a new space. New spaces start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).
|
|
16671
16872
|
*
|
|
16672
16873
|
* @tags site-spaces
|
|
16673
16874
|
* @name AddSpaceToSite
|
|
@@ -16689,6 +16890,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16689
16890
|
draft?: boolean;
|
|
16690
16891
|
/** 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. */
|
|
16691
16892
|
pageId?: string | null;
|
|
16893
|
+
/**
|
|
16894
|
+
* Create the new space without any content, not even a blank page. Useful when the content is about to be populated, for example by an import. Only valid when `spaceId` is `null` and no template is provided.
|
|
16895
|
+
* @default false
|
|
16896
|
+
*/
|
|
16897
|
+
empty?: boolean;
|
|
16692
16898
|
/** Site-specific title override for the variant. Also used as the space title when `spaceId` is `null` and no template is provided. */
|
|
16693
16899
|
title?: SiteTitle;
|
|
16694
16900
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
@@ -16792,7 +16998,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16792
16998
|
*/
|
|
16793
16999
|
deleteSiteSectionGroupById: (organizationId: EntityId, siteId: string, siteSectionGroupId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
16794
17000
|
/**
|
|
16795
|
-
* @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
|
|
17001
|
+
* @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 start with a blank page unless a template is provided or `empty` is `true`, which creates the space with no page at all (use it when you are about to add the pages yourself).
|
|
16796
17002
|
*
|
|
16797
17003
|
* @tags site-sections
|
|
16798
17004
|
* @name AddSectionToSite
|
|
@@ -16805,6 +17011,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16805
17011
|
spaceId: string | null;
|
|
16806
17012
|
/** 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. */
|
|
16807
17013
|
template?: ApplySpaceTemplate;
|
|
17014
|
+
/**
|
|
17015
|
+
* Create the new space without any content, not even a blank page. Useful when the content is about to be populated, for example by an import. Only valid when `spaceId` is `null` and no template is provided.
|
|
17016
|
+
* @default false
|
|
17017
|
+
*/
|
|
17018
|
+
empty?: boolean;
|
|
16808
17019
|
/** Section title. Also used as the space title when `spaceId` is `null` and no template is provided. */
|
|
16809
17020
|
title?: SiteSectionTitle | null;
|
|
16810
17021
|
icon?: Icon | null;
|
|
@@ -17458,6 +17669,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17458
17669
|
* @secure
|
|
17459
17670
|
*/
|
|
17460
17671
|
updateSiteContextConnectionById: (organizationId: EntityId, siteId: string, siteContextConnectionId: string, data: ContextConnectorSetup | {
|
|
17672
|
+
connector: "builtin:jira";
|
|
17673
|
+
/** Optional label for the connection */
|
|
17674
|
+
label?: ContextConnectionLabel;
|
|
17675
|
+
setupSettings: {
|
|
17676
|
+
/** Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net. */
|
|
17677
|
+
baseUrl: BaseUrl;
|
|
17678
|
+
/** Email of the Atlassian account whose API token is used. */
|
|
17679
|
+
apiEmail: ApiEmail;
|
|
17680
|
+
/** Atlassian API token used for outbound writes. Redacted when read back. Omit it when updating a connection to keep the stored token; required when the site URL or account email changes. */
|
|
17681
|
+
apiToken?: ApiToken;
|
|
17682
|
+
/** Projects where GitBook handles issues. Empty means all accessible projects. */
|
|
17683
|
+
projectKeys?: ProjectKeys;
|
|
17684
|
+
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
17685
|
+
statusMapping?: StatusMapping;
|
|
17686
|
+
};
|
|
17687
|
+
} | {
|
|
17461
17688
|
usageSettings?: ContextUsageSettings;
|
|
17462
17689
|
/** Optional label for the connection */
|
|
17463
17690
|
label?: ContextConnectionLabel;
|
|
@@ -17514,6 +17741,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17514
17741
|
from?: Timestamp;
|
|
17515
17742
|
/** Filter stats to answers created at or before this timestamp. */
|
|
17516
17743
|
to?: Timestamp;
|
|
17744
|
+
/** Filter stats by question relevance. */
|
|
17745
|
+
relevance?: SiteQuestionAnswerRelevance[];
|
|
17746
|
+
/** Filter stats by answer channel type. */
|
|
17747
|
+
channelType?: SiteChannelType[];
|
|
17748
|
+
/** Filter stats by answer resolution. */
|
|
17749
|
+
answered?: SiteQuestionAnswerResolution[];
|
|
17517
17750
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
17518
17751
|
items: SiteTopic[];
|
|
17519
17752
|
}, any>>;
|
|
@@ -18089,6 +18322,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18089
18322
|
/** Team identifier. Filter the list to members of a specific team. */
|
|
18090
18323
|
team?: string;
|
|
18091
18324
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
18325
|
+
/**
|
|
18326
|
+
* Number of users with a role in the site, guests excluded. It ignores the filters and the pagination of the request.
|
|
18327
|
+
* @min 0
|
|
18328
|
+
*/
|
|
18329
|
+
membersCount: number;
|
|
18092
18330
|
items: UserSitePermission[];
|
|
18093
18331
|
}, any>>;
|
|
18094
18332
|
/**
|
|
@@ -18272,7 +18510,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18272
18510
|
};
|
|
18273
18511
|
}>>;
|
|
18274
18512
|
/**
|
|
18275
|
-
* @description Replaces the configuration for the AI built into the GitBook editor that helps authors draft, review, and refine content changes. Use this to customize how the AI behaves when assisting authors working on content for this site.
|
|
18513
|
+
* @description Replaces the configuration for the AI built into the GitBook editor that helps authors draft, review, and refine content changes. Use this to customize how the AI behaves when assisting authors working on content for this site. When `brokenLinks` is omitted, the current broken links settings are kept.
|
|
18276
18514
|
*
|
|
18277
18515
|
* @tags site-agent-settings
|
|
18278
18516
|
* @name UpdateSiteAgentSettingsById
|
|
@@ -18723,7 +18961,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18723
18961
|
role?: SiteChannelRole;
|
|
18724
18962
|
}, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
|
|
18725
18963
|
/**
|
|
18726
|
-
* @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira credentials
|
|
18964
|
+
* @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira uses either the credentials supplied, verified without saving a connection, or those stored on an existing Jira context connection of this site. Slack includes public channels and accessible private channels, excluding archived channels. To fetch another page, pass the opaque token from `next.page` as the `page` query parameter with the same request body. An absent `next` means there are no more pages; an empty `items` array alone does not indicate the end of the list.
|
|
18727
18965
|
*
|
|
18728
18966
|
* @tags site-channels
|
|
18729
18967
|
* @name ListSiteChannelScopes
|
|
@@ -18743,6 +18981,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18743
18981
|
provider: "slack";
|
|
18744
18982
|
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18745
18983
|
siteChannelId: string;
|
|
18984
|
+
} | {
|
|
18985
|
+
provider: "jira";
|
|
18986
|
+
/** ID of a Jira context connection belonging to this site, whose stored credentials are used. */
|
|
18987
|
+
siteContextConnectionId: string;
|
|
18746
18988
|
} | {
|
|
18747
18989
|
provider: "jira";
|
|
18748
18990
|
credentials: {
|