@gitbook/api 0.195.0 → 0.196.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 +674 -73
- package/dist/constants.d.ts +4 -1
- package/dist/index.cjs +98 -2
- package/dist/index.js +92 -2
- package/package.json +1 -1
- package/spec/openapi.json +1494 -171
- package/spec/openapi.yaml +1080 -127
package/dist/client.d.ts
CHANGED
|
@@ -142,6 +142,10 @@ export declare enum SiteInsightsQueryOperator {
|
|
|
142
142
|
LessThan = "lessThan",
|
|
143
143
|
LessThanOrEqual = "lessThanOrEqual"
|
|
144
144
|
}
|
|
145
|
+
/** Why a site URL returned a 404. `conditional` means the URL targets content gated by an adaptive-content condition, so the visitor lacked access to a page that exists. Computed by GitBook when the event is ingested; 404s recorded before this existed, and those on genuinely missing pages, carry no value. */
|
|
146
|
+
export declare enum SiteInsightsPageNotFoundType {
|
|
147
|
+
Conditional = "conditional"
|
|
148
|
+
}
|
|
145
149
|
export declare enum SiteInsightsVisitorBot {
|
|
146
150
|
Unknown = "unknown",
|
|
147
151
|
Googlebot = "googlebot",
|
|
@@ -309,6 +313,14 @@ export declare enum ContextSearchBoost {
|
|
|
309
313
|
X10 = "x1.0",
|
|
310
314
|
X12 = "x1.2"
|
|
311
315
|
}
|
|
316
|
+
/** Why a synchronization failed, indicating who can resolve it. `authentication` and `misconfigured` need the connection to be reconfigured; `rate_limited` and `upstream_unavailable` are the source's own limits or downtime and are retried; `unknown` could not be attributed to the source's response. */
|
|
317
|
+
export declare enum ContextConnectionFailureReason {
|
|
318
|
+
Authentication = "authentication",
|
|
319
|
+
Misconfigured = "misconfigured",
|
|
320
|
+
RateLimited = "rate_limited",
|
|
321
|
+
UpstreamUnavailable = "upstream_unavailable",
|
|
322
|
+
Unknown = "unknown"
|
|
323
|
+
}
|
|
312
324
|
export declare enum ContextConnectionStatus {
|
|
313
325
|
Pending = "pending",
|
|
314
326
|
Syncing = "syncing",
|
|
@@ -381,6 +393,11 @@ export declare enum ContextRecordType {
|
|
|
381
393
|
Ticket = "ticket",
|
|
382
394
|
Document = "document"
|
|
383
395
|
}
|
|
396
|
+
/** The surface the agent was running on when it submitted the feedback: the MCP server exposed by the site, or the site assistant. */
|
|
397
|
+
export declare enum AgentFeedbackSource {
|
|
398
|
+
Mcp = "mcp",
|
|
399
|
+
Assistant = "assistant"
|
|
400
|
+
}
|
|
384
401
|
/** The platform of the social handle. */
|
|
385
402
|
export declare enum SiteSocialAccountPlatform {
|
|
386
403
|
Twitter = "twitter",
|
|
@@ -636,7 +653,8 @@ export declare enum GitSyncInstallationPriority {
|
|
|
636
653
|
}
|
|
637
654
|
export declare enum StorageUploadKind {
|
|
638
655
|
CustomizationFont = "customization_font",
|
|
639
|
-
ImportFile = "import_file"
|
|
656
|
+
ImportFile = "import_file",
|
|
657
|
+
OrganizationFile = "organization_file"
|
|
640
658
|
}
|
|
641
659
|
export declare enum TranslationStatus {
|
|
642
660
|
Pending = "pending",
|
|
@@ -1354,6 +1372,70 @@ export interface GitSyncState {
|
|
|
1354
1372
|
/** When the Git provider details were last updated */
|
|
1355
1373
|
updatedAt?: Timestamp;
|
|
1356
1374
|
}
|
|
1375
|
+
export type ContentImportSource = {
|
|
1376
|
+
type: "website";
|
|
1377
|
+
url: URL;
|
|
1378
|
+
} | {
|
|
1379
|
+
type: "file";
|
|
1380
|
+
/**
|
|
1381
|
+
* Files to import
|
|
1382
|
+
* @maxItems 50
|
|
1383
|
+
*/
|
|
1384
|
+
files: string[];
|
|
1385
|
+
};
|
|
1386
|
+
export interface ContentImportTarget {
|
|
1387
|
+
/** ID of the space to import in */
|
|
1388
|
+
space: string;
|
|
1389
|
+
/** ID of the change request to import in */
|
|
1390
|
+
changeRequest?: string;
|
|
1391
|
+
/** ID of the page to import in */
|
|
1392
|
+
page?: string;
|
|
1393
|
+
}
|
|
1394
|
+
export interface ContentImportRun {
|
|
1395
|
+
/** Type of Object, always equals to "import-run" */
|
|
1396
|
+
object?: "import-run";
|
|
1397
|
+
/** Unique ID of the import */
|
|
1398
|
+
id: string;
|
|
1399
|
+
/** Date when the import has started */
|
|
1400
|
+
startedAt?: Timestamp;
|
|
1401
|
+
/** Filled when the imported is in status "completed" */
|
|
1402
|
+
completedAt?: Timestamp;
|
|
1403
|
+
/** Date when the import was requested */
|
|
1404
|
+
createdAt?: Timestamp;
|
|
1405
|
+
/** Date when the import was last updated */
|
|
1406
|
+
updatedAt?: Timestamp;
|
|
1407
|
+
/** Status of the import */
|
|
1408
|
+
status: "pending" | "in-progress" | "completed" | "failed" | "cancelled";
|
|
1409
|
+
/** Reason for the import failure when `status` is `failed`. */
|
|
1410
|
+
reason?: string;
|
|
1411
|
+
/** Where the content is imported from. */
|
|
1412
|
+
source?: ContentImportSource;
|
|
1413
|
+
/** Where the content is imported into. */
|
|
1414
|
+
target?: ContentImportTarget;
|
|
1415
|
+
/** ID of the site the target space belongs to, when it belongs to exactly one. */
|
|
1416
|
+
site?: string;
|
|
1417
|
+
/** ID of the user who started the import. */
|
|
1418
|
+
createdBy?: string;
|
|
1419
|
+
/** URLs associated with the object */
|
|
1420
|
+
urls?: {
|
|
1421
|
+
/**
|
|
1422
|
+
* URL of the import run in the API
|
|
1423
|
+
* @format uri
|
|
1424
|
+
*/
|
|
1425
|
+
location: string;
|
|
1426
|
+
};
|
|
1427
|
+
/** Pages included in the import */
|
|
1428
|
+
pages?: {
|
|
1429
|
+
/** ID of page */
|
|
1430
|
+
id: string;
|
|
1431
|
+
/** Source URL where the page has been imported from */
|
|
1432
|
+
sourceURL?: string;
|
|
1433
|
+
/** Type of page */
|
|
1434
|
+
type: "page" | "folder";
|
|
1435
|
+
/** Status of the page */
|
|
1436
|
+
status: "complete" | "pending";
|
|
1437
|
+
}[];
|
|
1438
|
+
}
|
|
1357
1439
|
/** Custom backend for authenticated access */
|
|
1358
1440
|
export interface VisitorAuthCustomBackend {
|
|
1359
1441
|
/** Custom backend for authenticated access */
|
|
@@ -1400,7 +1482,7 @@ export interface Space {
|
|
|
1400
1482
|
* * `locked`: All edits are locked for this space.
|
|
1401
1483
|
*/
|
|
1402
1484
|
editMode?: SpaceEditMode;
|
|
1403
|
-
/** Kind of space. Only set to `styleguide` for spaces holding a team's writing
|
|
1485
|
+
/** Kind of space. Only set to `styleguide` for spaces holding a team's writing style guide; omitted for regular spaces. */
|
|
1404
1486
|
type?: "styleguide";
|
|
1405
1487
|
mergeRules: MergeRulesSpaceConfiguration;
|
|
1406
1488
|
/** URLs associated with the object */
|
|
@@ -1434,6 +1516,8 @@ export interface Space {
|
|
|
1434
1516
|
parent?: string;
|
|
1435
1517
|
language?: TranslationLanguage;
|
|
1436
1518
|
gitSync?: GitSyncState;
|
|
1519
|
+
/** Import runs targeting this space, still running or ended recently, most recent first. Only returned when fetching a single space. */
|
|
1520
|
+
imports?: ContentImportRun[];
|
|
1437
1521
|
visitorAuth?: VisitorAuth;
|
|
1438
1522
|
/** ID of the active revision in the space. */
|
|
1439
1523
|
revision: string;
|
|
@@ -1562,9 +1646,16 @@ export interface SearchSectionResult {
|
|
|
1562
1646
|
export interface SearchPageResult {
|
|
1563
1647
|
id: string;
|
|
1564
1648
|
title: string;
|
|
1649
|
+
/** Description of the page, suitable for presenting a page-root search destination. */
|
|
1650
|
+
description: string;
|
|
1565
1651
|
path: string;
|
|
1566
1652
|
/** Relevance score for a search result. Higher is better and the score is unbounded. */
|
|
1567
1653
|
score: SearchResultScore;
|
|
1654
|
+
/**
|
|
1655
|
+
* One-based position in the globally ranked result set, preserved when results are paginated and grouped by space.
|
|
1656
|
+
* @min 1
|
|
1657
|
+
*/
|
|
1658
|
+
rank: number;
|
|
1568
1659
|
/** Whether the page matched on its own fields (title, description) or on the content of one of its sections. */
|
|
1569
1660
|
resultType?: "page" | "section";
|
|
1570
1661
|
sections?: SearchSectionResult[];
|
|
@@ -3000,6 +3091,8 @@ export type ChangeRequestSubject = string;
|
|
|
3000
3091
|
export type ChangeRequestLinkTitle = string;
|
|
3001
3092
|
/** External link associated with a change request. */
|
|
3002
3093
|
export interface ChangeRequestLinkInput {
|
|
3094
|
+
/** The ID of an existing link, as served on the change request. Pass it back to update that link; omit it to add a new one. Links created before links were stored individually have no ID and are matched on their URL instead. */
|
|
3095
|
+
id?: string;
|
|
3003
3096
|
ref: ContentRefURL;
|
|
3004
3097
|
/** Optional title to display for the link. */
|
|
3005
3098
|
title?: ChangeRequestLinkTitle;
|
|
@@ -3028,6 +3121,8 @@ export type ChangeRequestLinkExpanded = {
|
|
|
3028
3121
|
state: "error";
|
|
3029
3122
|
};
|
|
3030
3123
|
export type ChangeRequestLink = ChangeRequestLinkInput & {
|
|
3124
|
+
/** The ID of the link. Absent on links not yet stored relationally. */
|
|
3125
|
+
id?: string;
|
|
3031
3126
|
/** External ticket data resolved for this link by a configured connector. */
|
|
3032
3127
|
expanded?: ChangeRequestLinkExpanded;
|
|
3033
3128
|
};
|
|
@@ -3077,6 +3172,8 @@ export interface ChangeRequest {
|
|
|
3077
3172
|
};
|
|
3078
3173
|
/** If true, the change request is not up-to-date with latest changes in the main content. */
|
|
3079
3174
|
outdated: boolean;
|
|
3175
|
+
/** Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request. */
|
|
3176
|
+
imports?: ContentImportRun[];
|
|
3080
3177
|
/** External links associated with the change request. */
|
|
3081
3178
|
links?: ChangeRequestLinks;
|
|
3082
3179
|
/** URLs associated with the object */
|
|
@@ -3907,6 +4004,8 @@ export interface Organization {
|
|
|
3907
4004
|
ai?: boolean;
|
|
3908
4005
|
/** If true, invite links are enabled for this organization. */
|
|
3909
4006
|
inviteLinks: boolean;
|
|
4007
|
+
/** Whether audit logs can currently be accessed for this organization. */
|
|
4008
|
+
auditLogs?: boolean;
|
|
3910
4009
|
/** Name of the product */
|
|
3911
4010
|
plan: BillingProduct;
|
|
3912
4011
|
/** Billing details, only available for org members. */
|
|
@@ -4730,6 +4829,10 @@ export interface Site {
|
|
|
4730
4829
|
view: boolean;
|
|
4731
4830
|
/** Can the user access the site in the application. */
|
|
4732
4831
|
access: boolean;
|
|
4832
|
+
/** Can the user edit content associated with the site. */
|
|
4833
|
+
edit: boolean;
|
|
4834
|
+
/** Can the user create content in the site. */
|
|
4835
|
+
create: boolean;
|
|
4733
4836
|
/** Can the user edit the site and manage its settings. */
|
|
4734
4837
|
admin: boolean;
|
|
4735
4838
|
/** Can the user install integrations on the site. */
|
|
@@ -4754,8 +4857,8 @@ export interface Site {
|
|
|
4754
4857
|
adaptiveContent?: SiteAdaptiveContent;
|
|
4755
4858
|
ads?: SiteAds;
|
|
4756
4859
|
/**
|
|
4757
|
-
* Reference to a GitBook space holding the team's writing
|
|
4758
|
-
* When present on a site, the editing agent receives the
|
|
4860
|
+
* Reference to a GitBook space holding the team's writing style guide.
|
|
4861
|
+
* When present on a site, the editing agent receives the style guide
|
|
4759
4862
|
* table of contents in its system prompt and can fetch sections on
|
|
4760
4863
|
* demand to check edits against the rules.
|
|
4761
4864
|
*/
|
|
@@ -5308,18 +5411,81 @@ export interface OrganizationAllContent {
|
|
|
5308
5411
|
/** List of soft-deleted spaces. */
|
|
5309
5412
|
deletedSpaces: OrganizationAllSpace[];
|
|
5310
5413
|
}
|
|
5311
|
-
|
|
5414
|
+
export interface AuditEventAction {
|
|
5415
|
+
object: "audit-event-action";
|
|
5416
|
+
/** Stable action identifier stored on audit events. */
|
|
5417
|
+
id: string;
|
|
5418
|
+
/** Human-readable label for the action. */
|
|
5419
|
+
label: string;
|
|
5420
|
+
}
|
|
5421
|
+
export interface AuditEventActor {
|
|
5422
|
+
/** Kind of actor that initiated the change. */
|
|
5423
|
+
type: "user" | "integration" | "installation" | "system" | "support";
|
|
5424
|
+
/** Stable identifier of the actor. */
|
|
5425
|
+
id: string;
|
|
5426
|
+
/** Display label captured when the event was recorded. */
|
|
5427
|
+
label?: string;
|
|
5428
|
+
}
|
|
5429
|
+
export interface AuditEventTarget {
|
|
5430
|
+
/** Kind of resource affected by the change. */
|
|
5431
|
+
type: string;
|
|
5432
|
+
/** Stable identifier of the affected resource. */
|
|
5433
|
+
id: string;
|
|
5434
|
+
/** Display label captured when the event was recorded. */
|
|
5435
|
+
label?: string;
|
|
5436
|
+
}
|
|
5437
|
+
export interface AuditEvent {
|
|
5438
|
+
object: "audit-event";
|
|
5439
|
+
/**
|
|
5440
|
+
* Unique identifier of the audit event.
|
|
5441
|
+
* @format uuid
|
|
5442
|
+
*/
|
|
5443
|
+
id: string;
|
|
5444
|
+
occurredAt: Timestamp;
|
|
5445
|
+
/** Stable action name describing the recorded change. */
|
|
5446
|
+
action: string;
|
|
5447
|
+
actor: AuditEventActor;
|
|
5448
|
+
/** Entry point that initiated the change. */
|
|
5449
|
+
source: "ui" | "api" | "integration" | "webhook" | "workflow" | "script" | "support";
|
|
5450
|
+
target: AuditEventTarget;
|
|
5451
|
+
urls: {
|
|
5452
|
+
/**
|
|
5453
|
+
* URL of the audit event in the API.
|
|
5454
|
+
* @format uri
|
|
5455
|
+
*/
|
|
5456
|
+
location: string;
|
|
5457
|
+
};
|
|
5458
|
+
}
|
|
5459
|
+
export type AuditEventDetails = AuditEvent & {
|
|
5460
|
+
/** Identifier of the operation that recorded the event. */
|
|
5461
|
+
executionId?: string;
|
|
5462
|
+
/** Identifier shared by events produced by the same user action. */
|
|
5463
|
+
correlationId?: string;
|
|
5464
|
+
/**
|
|
5465
|
+
* Audit event that caused this later system effect.
|
|
5466
|
+
* @format uuid
|
|
5467
|
+
*/
|
|
5468
|
+
causedByEventId?: string;
|
|
5469
|
+
/**
|
|
5470
|
+
* Version of the action payload schema.
|
|
5471
|
+
* @min 1
|
|
5472
|
+
*/
|
|
5473
|
+
schemaVersion: number;
|
|
5474
|
+
/** Allowlisted details specific to the action. */
|
|
5475
|
+
payload: Record<string, any>;
|
|
5476
|
+
};
|
|
5477
|
+
/** A style guide space and all the sites referencing it. */
|
|
5312
5478
|
export interface OrganizationStyleguide {
|
|
5313
5479
|
space: Space;
|
|
5314
|
-
/** Sites in the organization that reference this
|
|
5480
|
+
/** Sites in the organization that reference this style guide. */
|
|
5315
5481
|
sites: Site[];
|
|
5316
5482
|
}
|
|
5317
5483
|
export interface OrganizationStyleguides {
|
|
5318
5484
|
styleguides: OrganizationStyleguide[];
|
|
5319
5485
|
}
|
|
5320
|
-
/** A built-in
|
|
5486
|
+
/** A built-in style guide starter template used to seed and preview a style guide. */
|
|
5321
5487
|
export interface StyleguideTemplate {
|
|
5322
|
-
/** Identifier of the template, passed to createSiteStyleguideById to seed a
|
|
5488
|
+
/** Identifier of the template, passed to createSiteStyleguideById to seed a style guide from it. */
|
|
5323
5489
|
id: string;
|
|
5324
5490
|
/** Human-readable name of the template. */
|
|
5325
5491
|
title: string;
|
|
@@ -6211,48 +6377,6 @@ export type CustomizationFontDefinition = CustomizationFontDefinitionInput & {
|
|
|
6211
6377
|
* @maxLength 512
|
|
6212
6378
|
*/
|
|
6213
6379
|
export type StorageFileKey = string;
|
|
6214
|
-
export type ContentImportSource = {
|
|
6215
|
-
type: "website";
|
|
6216
|
-
url: URL;
|
|
6217
|
-
} | {
|
|
6218
|
-
type: "file";
|
|
6219
|
-
/**
|
|
6220
|
-
* Files to import
|
|
6221
|
-
* @maxItems 50
|
|
6222
|
-
*/
|
|
6223
|
-
files: string[];
|
|
6224
|
-
};
|
|
6225
|
-
export interface ContentImportTarget {
|
|
6226
|
-
/** ID of the space to import in */
|
|
6227
|
-
space: string;
|
|
6228
|
-
/** ID of the change request to import in */
|
|
6229
|
-
changeRequest?: string;
|
|
6230
|
-
/** ID of the page to import in */
|
|
6231
|
-
page?: string;
|
|
6232
|
-
}
|
|
6233
|
-
export interface ContentImportRun {
|
|
6234
|
-
/** Unique ID of the import */
|
|
6235
|
-
id: string;
|
|
6236
|
-
/** Date when the import has started */
|
|
6237
|
-
startedAt?: Timestamp;
|
|
6238
|
-
/** Filled when the imported is in status "completed" */
|
|
6239
|
-
completedAt?: Timestamp;
|
|
6240
|
-
/** Status of the import */
|
|
6241
|
-
status: "pending" | "in-progress" | "completed" | "failed" | "cancelled";
|
|
6242
|
-
/** Reason for the import failure when `status` is `failed`. */
|
|
6243
|
-
reason?: string;
|
|
6244
|
-
/** Pages included in the import */
|
|
6245
|
-
pages?: {
|
|
6246
|
-
/** ID of page */
|
|
6247
|
-
id: string;
|
|
6248
|
-
/** Source URL where the page has been imported from */
|
|
6249
|
-
sourceURL?: string;
|
|
6250
|
-
/** Type of page */
|
|
6251
|
-
type: "page" | "folder";
|
|
6252
|
-
/** Status of the page */
|
|
6253
|
-
status: "complete" | "pending";
|
|
6254
|
-
}[];
|
|
6255
|
-
}
|
|
6256
6380
|
/** A response to a request to preview the publishing of a site. It indicates whether the operation can proceed immediately, requires checkout, if a trial is available or if a trial extension is available. */
|
|
6257
6381
|
export type SitePublishOperationPreviewResponse = {
|
|
6258
6382
|
/** User can go ahead with the operation without any additional steps. Their subscription will be updated to reflect the new changes. */
|
|
@@ -6460,6 +6584,8 @@ export interface CustomizationTint {
|
|
|
6460
6584
|
color: CustomizationThemedColor;
|
|
6461
6585
|
}
|
|
6462
6586
|
export type CustomizationFont = CustomizationDefaultFont | CustomizationFontDefinitionInput;
|
|
6587
|
+
/** Font used for headings. `null` means headings use the main font (`styling.font`). */
|
|
6588
|
+
export type CustomizationHeadingFont = CustomizationDefaultFont | CustomizationFontDefinitionInput | null;
|
|
6463
6589
|
export type CustomizationMonospaceFont = CustomizationDefaultMonospaceFont | CustomizationFontDefinitionInput;
|
|
6464
6590
|
export interface CustomizationThemedCodeTheme {
|
|
6465
6591
|
light: CustomizationCodeTheme;
|
|
@@ -6589,6 +6715,8 @@ export interface SiteCustomizationSettingsBase {
|
|
|
6589
6715
|
*/
|
|
6590
6716
|
links: CustomizationLinksStyle;
|
|
6591
6717
|
font: CustomizationFont;
|
|
6718
|
+
/** Font used for headings. `null` means headings use the main font (`styling.font`). */
|
|
6719
|
+
headingFont?: CustomizationHeadingFont;
|
|
6592
6720
|
monospaceFont: CustomizationMonospaceFont;
|
|
6593
6721
|
/**
|
|
6594
6722
|
* The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead.
|
|
@@ -7394,6 +7522,8 @@ export type ContextConnection = {
|
|
|
7394
7522
|
records: number;
|
|
7395
7523
|
/** Failure message when synchronization fails */
|
|
7396
7524
|
failureMessage?: string;
|
|
7525
|
+
/** Why a synchronization failed, indicating who can resolve it. `authentication` and `misconfigured` need the connection to be reconfigured; `rate_limited` and `upstream_unavailable` are the source's own limits or downtime and are retried; `unknown` could not be attributed to the source's response. */
|
|
7526
|
+
failureReason?: ContextConnectionFailureReason;
|
|
7397
7527
|
/** Parameters associated with the connection when it is an email connection */
|
|
7398
7528
|
email?: {
|
|
7399
7529
|
/**
|
|
@@ -7834,6 +7964,30 @@ export interface AIToolCallSubmitChangeRequestReview {
|
|
|
7834
7964
|
/** Identifier of the comment that was created as part of the review. */
|
|
7835
7965
|
commentId: string;
|
|
7836
7966
|
}
|
|
7967
|
+
export interface AIToolCallStartContentImport {
|
|
7968
|
+
tool: "startContentImport";
|
|
7969
|
+
/** The ID of the space the content is imported into. */
|
|
7970
|
+
spaceId: string;
|
|
7971
|
+
/** The ID of the change request the content is imported into. */
|
|
7972
|
+
changeRequestId: string;
|
|
7973
|
+
/** The ID of the import run. */
|
|
7974
|
+
runId: string;
|
|
7975
|
+
/** The URL the content is imported from, when importing a website. */
|
|
7976
|
+
url?: string;
|
|
7977
|
+
/** Names of the attached files the content is imported from, when importing files. */
|
|
7978
|
+
files?: string[];
|
|
7979
|
+
}
|
|
7980
|
+
export interface AIToolCallCheckContentImport {
|
|
7981
|
+
tool: "checkContentImport";
|
|
7982
|
+
/** The ID of the import run. */
|
|
7983
|
+
runId: string;
|
|
7984
|
+
/** Status of the import when it was checked. */
|
|
7985
|
+
status: "pending" | "in-progress" | "completed" | "failed" | "cancelled";
|
|
7986
|
+
/** Number of pages imported when the import was checked. */
|
|
7987
|
+
importedPages: number;
|
|
7988
|
+
/** Number of pages the import has discovered so far. */
|
|
7989
|
+
totalPages: number;
|
|
7990
|
+
}
|
|
7837
7991
|
/** Tool called from an MCP server */
|
|
7838
7992
|
export interface AIToolCallMCP {
|
|
7839
7993
|
tool: "mcp";
|
|
@@ -7857,7 +8011,7 @@ export interface AIToolCallOther {
|
|
|
7857
8011
|
/** Summary of a generic tool call. */
|
|
7858
8012
|
summary: AIToolCallOtherSummary;
|
|
7859
8013
|
}
|
|
7860
|
-
export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
|
|
8014
|
+
export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallMCP | AIToolCallOther;
|
|
7861
8015
|
export interface Timerange {
|
|
7862
8016
|
start: Timestamp;
|
|
7863
8017
|
end: Timestamp;
|
|
@@ -7876,7 +8030,16 @@ export interface AIAttachmentFile {
|
|
|
7876
8030
|
/** MIME type of the file. Must be a file type supported by the underlying model (see the OpenAI file-inputs documentation). */
|
|
7877
8031
|
contentType: string;
|
|
7878
8032
|
}
|
|
7879
|
-
|
|
8033
|
+
/** A file attached for the sole purpose of being imported. Its content is never given to the model — the type is one the importer accepts but the model cannot read, such as a ZIP archive — so the model only learns that the file is attached and can import it. */
|
|
8034
|
+
export interface AIAttachmentImportFile {
|
|
8035
|
+
type: "import-file";
|
|
8036
|
+
url: URL;
|
|
8037
|
+
/** Name of the file. */
|
|
8038
|
+
filename: string;
|
|
8039
|
+
/** MIME type of the file. Must be a file type supported by the content import. */
|
|
8040
|
+
contentType: string;
|
|
8041
|
+
}
|
|
8042
|
+
export type AIAttachment = AIAttachmentImage | AIAttachmentFile | AIAttachmentImportFile;
|
|
7880
8043
|
/** Context about the current user sending a message. */
|
|
7881
8044
|
export interface AIMessageContext {
|
|
7882
8045
|
location?: {
|
|
@@ -8449,6 +8612,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
8449
8612
|
column: "eventAPIOperationMethod";
|
|
8450
8613
|
} | {
|
|
8451
8614
|
column: "eventLLMSVariant";
|
|
8615
|
+
} | {
|
|
8616
|
+
column: "eventPageNotFoundType";
|
|
8452
8617
|
} | {
|
|
8453
8618
|
column: "eventSearchQuery";
|
|
8454
8619
|
} | {
|
|
@@ -8477,6 +8642,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
8477
8642
|
column: "utmTerm";
|
|
8478
8643
|
} | {
|
|
8479
8644
|
column: "utmContent";
|
|
8645
|
+
} | {
|
|
8646
|
+
column: "visitorAuthenticated";
|
|
8480
8647
|
} | {
|
|
8481
8648
|
column: "visitorClaimProperty";
|
|
8482
8649
|
} | {
|
|
@@ -8520,6 +8687,9 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
8520
8687
|
column: "visitorClaim";
|
|
8521
8688
|
claim: string;
|
|
8522
8689
|
values: string[];
|
|
8690
|
+
} | {
|
|
8691
|
+
column: "visitorAuthenticated";
|
|
8692
|
+
values: (boolean | null)[];
|
|
8523
8693
|
} | {
|
|
8524
8694
|
column: "visitorClaimProperty";
|
|
8525
8695
|
values: string[];
|
|
@@ -8550,6 +8720,9 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
8550
8720
|
} | {
|
|
8551
8721
|
column: "eventLLMSVariant";
|
|
8552
8722
|
values: (null | SiteInsightsLLMSVariant)[];
|
|
8723
|
+
} | {
|
|
8724
|
+
column: "eventPageNotFoundType";
|
|
8725
|
+
values: (null | SiteInsightsPageNotFoundType)[];
|
|
8553
8726
|
} | {
|
|
8554
8727
|
column: "siteSpace";
|
|
8555
8728
|
values: (string | null)[];
|
|
@@ -9054,6 +9227,13 @@ export interface GitSyncBranch {
|
|
|
9054
9227
|
name: string;
|
|
9055
9228
|
ref: string;
|
|
9056
9229
|
}
|
|
9230
|
+
/** A file found in a Git Sync repository at a specific ref. */
|
|
9231
|
+
export interface GitSyncRepositoryFile {
|
|
9232
|
+
name: string;
|
|
9233
|
+
path: string;
|
|
9234
|
+
sha: string;
|
|
9235
|
+
size: number;
|
|
9236
|
+
}
|
|
9057
9237
|
/** GitLab project that can be selected for Git Sync. */
|
|
9058
9238
|
export interface GitSyncGitLabProject {
|
|
9059
9239
|
id: number;
|
|
@@ -9373,6 +9553,7 @@ export interface GitSyncSiteStructureSectionGroup {
|
|
|
9373
9553
|
* Stable identifier for this section group, used as the Git Sync key.
|
|
9374
9554
|
* Must be unique amongst all other section groups of the site. For
|
|
9375
9555
|
* example: `section-group-product` or `section-group-1`.
|
|
9556
|
+
* You can nest section groups only one level deep. For example, `section-group-1` can have a child section group `section-group-1-1`, but `section-group-1-1` cannot have a child section group.
|
|
9376
9557
|
* @minLength 1
|
|
9377
9558
|
*/
|
|
9378
9559
|
key: string;
|
|
@@ -9396,6 +9577,9 @@ export interface GitSyncSiteStructureSectionGroup {
|
|
|
9396
9577
|
* when `content.directory` is `null`. Hierarchy comes from where the space
|
|
9397
9578
|
* appears in the YAML (under a section, a section group, or at the root), not
|
|
9398
9579
|
* from an explicit parent reference.
|
|
9580
|
+
*
|
|
9581
|
+
* The directory is read as one book — the Markdown files it holds become the
|
|
9582
|
+
* pages of the space.
|
|
9399
9583
|
*/
|
|
9400
9584
|
export interface GitSyncSiteStructureSpace {
|
|
9401
9585
|
/** Discriminator for a space node. */
|
|
@@ -9413,7 +9597,11 @@ export interface GitSyncSiteStructureSpace {
|
|
|
9413
9597
|
localizedTitle?: LocalizedString128;
|
|
9414
9598
|
/** Path to the space on the site */
|
|
9415
9599
|
path: SiteSpacePath;
|
|
9416
|
-
/**
|
|
9600
|
+
/**
|
|
9601
|
+
* Whether this is the default space of its parent — the one opened when the
|
|
9602
|
+
* site or the section is visited without a space path. Exactly one space
|
|
9603
|
+
* among each set of siblings carries it.
|
|
9604
|
+
*/
|
|
9417
9605
|
default?: boolean;
|
|
9418
9606
|
/** Whether the space is hidden from the site's navigation. */
|
|
9419
9607
|
hidden?: boolean;
|
|
@@ -9423,7 +9611,13 @@ export interface GitSyncSiteStructureSpace {
|
|
|
9423
9611
|
condition?: Expression;
|
|
9424
9612
|
/** Where the space's content is managed. */
|
|
9425
9613
|
content: {
|
|
9426
|
-
/**
|
|
9614
|
+
/**
|
|
9615
|
+
* Directory holding this space's content, resolved from the site's
|
|
9616
|
+
* project directory — `./guides` under a site rooted at `docs/`
|
|
9617
|
+
* reads `docs/guides`. A leading slash escapes to the repository
|
|
9618
|
+
* root instead, so `/guides` always reads `guides`. Parent-directory
|
|
9619
|
+
* segments (`..`) are rejected.
|
|
9620
|
+
*/
|
|
9427
9621
|
directory: string | null;
|
|
9428
9622
|
language?: TranslationLanguage;
|
|
9429
9623
|
};
|
|
@@ -9432,8 +9626,10 @@ export interface GitSyncSiteStructureSpace {
|
|
|
9432
9626
|
* A section — a group of spaces sharing a top-level navigation entry.
|
|
9433
9627
|
* Discriminated by `type: section`.
|
|
9434
9628
|
*
|
|
9435
|
-
* Spaces inside a section are listed inline under `children
|
|
9436
|
-
*
|
|
9629
|
+
* Spaces inside a section are listed inline under `children`; a section holds
|
|
9630
|
+
* nothing else — nest sections under a section group instead. A site with
|
|
9631
|
+
* sections must mark exactly one section with `default: true`, and cannot also
|
|
9632
|
+
* list spaces at the top level of its structure.
|
|
9437
9633
|
*/
|
|
9438
9634
|
export interface GitSyncSiteStructureSection {
|
|
9439
9635
|
/** Discriminator for a section node. */
|
|
@@ -9472,13 +9668,94 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
|
|
|
9472
9668
|
/**
|
|
9473
9669
|
* Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
|
|
9474
9670
|
* three node types: a section group, a section, or a space.
|
|
9671
|
+
*
|
|
9672
|
+
* A **space** is a leaf holding content, pointed at a repository directory. A
|
|
9673
|
+
* **section** gathers spaces behind one top-level navigation entry. A
|
|
9674
|
+
* **section group** gathers sections. A site either uses sections or lists its
|
|
9675
|
+
* spaces at the top level, never both.
|
|
9676
|
+
*
|
|
9677
|
+
* ```yaml
|
|
9678
|
+
* structure:
|
|
9679
|
+
* - type: space
|
|
9680
|
+
* key: space-guides
|
|
9681
|
+
* title: Guides
|
|
9682
|
+
* path: guides
|
|
9683
|
+
* default: true
|
|
9684
|
+
* content:
|
|
9685
|
+
* directory: ./guides
|
|
9686
|
+
* - type: space
|
|
9687
|
+
* key: space-api
|
|
9688
|
+
* title: API reference
|
|
9689
|
+
* path: api
|
|
9690
|
+
* content:
|
|
9691
|
+
* directory: ./api
|
|
9692
|
+
* ```
|
|
9693
|
+
*
|
|
9694
|
+
* The same two spaces behind top-level navigation entries:
|
|
9695
|
+
*
|
|
9696
|
+
* ```yaml
|
|
9697
|
+
* structure:
|
|
9698
|
+
* - type: section
|
|
9699
|
+
* key: section-product
|
|
9700
|
+
* title: Product
|
|
9701
|
+
* path: product
|
|
9702
|
+
* default: true
|
|
9703
|
+
* children:
|
|
9704
|
+
* - type: space
|
|
9705
|
+
* key: space-guides
|
|
9706
|
+
* title: Guides
|
|
9707
|
+
* path: guides
|
|
9708
|
+
* default: true
|
|
9709
|
+
* content:
|
|
9710
|
+
* directory: ./guides
|
|
9711
|
+
* - type: section
|
|
9712
|
+
* key: section-reference
|
|
9713
|
+
* title: Reference
|
|
9714
|
+
* path: reference
|
|
9715
|
+
* children:
|
|
9716
|
+
* - type: space
|
|
9717
|
+
* key: space-api
|
|
9718
|
+
* title: API reference
|
|
9719
|
+
* path: api
|
|
9720
|
+
* default: true
|
|
9721
|
+
* content:
|
|
9722
|
+
* directory: ./api
|
|
9723
|
+
* ```
|
|
9724
|
+
*
|
|
9725
|
+
* Rules checked on import — a violation fails the sync, naming the offending
|
|
9726
|
+
* node:
|
|
9727
|
+
*
|
|
9728
|
+
* - Every `key` is unique across the file, whatever the node type. Git Sync
|
|
9729
|
+
* recognises a node from one sync to the next by its key, so a reused key
|
|
9730
|
+
* leaves two nodes indistinguishable.
|
|
9731
|
+
* - Each section marks exactly one of its spaces `default: true`, and a site
|
|
9732
|
+
* without sections marks one among its top-level spaces. The default is the
|
|
9733
|
+
* space that opens when the site or the section is visited without a space
|
|
9734
|
+
* path of its own.
|
|
9735
|
+
* - A site declaring any section marks exactly one of those sections
|
|
9736
|
+
* `default: true`, and lists no space at the top level: once a section
|
|
9737
|
+
* exists, every space belongs inside one.
|
|
9738
|
+
* - Sections hold only spaces. Section groups hold only sections, or one
|
|
9739
|
+
* further level of section groups — nothing nests deeper than that.
|
|
9740
|
+
* - Spaces pointed at the same `content.directory` declare the same
|
|
9741
|
+
* `content.language`. One directory is read once, so it cannot produce two
|
|
9742
|
+
* languages at the same time.
|
|
9475
9743
|
*/
|
|
9476
9744
|
export type GitSyncSiteStructure = GitSyncSiteStructureNode[];
|
|
9477
9745
|
/**
|
|
9478
9746
|
* Schema for a site `docs.yaml` file — the canonical contract for what
|
|
9479
|
-
* can be authored in Git Sync to drive a site's
|
|
9747
|
+
* can be authored in Git Sync to drive a site's structure.
|
|
9748
|
+
*
|
|
9749
|
+
* The file lives at the root of the site's project directory in the synced
|
|
9750
|
+
* repository. It names the site and maps the repository's content directories
|
|
9751
|
+
* onto the site's navigation.
|
|
9480
9752
|
*/
|
|
9481
9753
|
export interface GitSyncSiteConfig {
|
|
9754
|
+
/**
|
|
9755
|
+
* URL of the schema used by editors to validate the site configuration.
|
|
9756
|
+
* @format uri
|
|
9757
|
+
*/
|
|
9758
|
+
$schema?: string;
|
|
9482
9759
|
/**
|
|
9483
9760
|
* Reserved for future use. When a breaking schema change ships, this
|
|
9484
9761
|
* field lets the parser branch on the version; absence means v1.
|
|
@@ -9494,6 +9771,78 @@ export interface GitSyncSiteConfig {
|
|
|
9494
9771
|
/**
|
|
9495
9772
|
* Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
|
|
9496
9773
|
* three node types: a section group, a section, or a space.
|
|
9774
|
+
*
|
|
9775
|
+
* A **space** is a leaf holding content, pointed at a repository directory. A
|
|
9776
|
+
* **section** gathers spaces behind one top-level navigation entry. A
|
|
9777
|
+
* **section group** gathers sections. A site either uses sections or lists its
|
|
9778
|
+
* spaces at the top level, never both.
|
|
9779
|
+
*
|
|
9780
|
+
* ```yaml
|
|
9781
|
+
* structure:
|
|
9782
|
+
* - type: space
|
|
9783
|
+
* key: space-guides
|
|
9784
|
+
* title: Guides
|
|
9785
|
+
* path: guides
|
|
9786
|
+
* default: true
|
|
9787
|
+
* content:
|
|
9788
|
+
* directory: ./guides
|
|
9789
|
+
* - type: space
|
|
9790
|
+
* key: space-api
|
|
9791
|
+
* title: API reference
|
|
9792
|
+
* path: api
|
|
9793
|
+
* content:
|
|
9794
|
+
* directory: ./api
|
|
9795
|
+
* ```
|
|
9796
|
+
*
|
|
9797
|
+
* The same two spaces behind top-level navigation entries:
|
|
9798
|
+
*
|
|
9799
|
+
* ```yaml
|
|
9800
|
+
* structure:
|
|
9801
|
+
* - type: section
|
|
9802
|
+
* key: section-product
|
|
9803
|
+
* title: Product
|
|
9804
|
+
* path: product
|
|
9805
|
+
* default: true
|
|
9806
|
+
* children:
|
|
9807
|
+
* - type: space
|
|
9808
|
+
* key: space-guides
|
|
9809
|
+
* title: Guides
|
|
9810
|
+
* path: guides
|
|
9811
|
+
* default: true
|
|
9812
|
+
* content:
|
|
9813
|
+
* directory: ./guides
|
|
9814
|
+
* - type: section
|
|
9815
|
+
* key: section-reference
|
|
9816
|
+
* title: Reference
|
|
9817
|
+
* path: reference
|
|
9818
|
+
* children:
|
|
9819
|
+
* - type: space
|
|
9820
|
+
* key: space-api
|
|
9821
|
+
* title: API reference
|
|
9822
|
+
* path: api
|
|
9823
|
+
* default: true
|
|
9824
|
+
* content:
|
|
9825
|
+
* directory: ./api
|
|
9826
|
+
* ```
|
|
9827
|
+
*
|
|
9828
|
+
* Rules checked on import — a violation fails the sync, naming the offending
|
|
9829
|
+
* node:
|
|
9830
|
+
*
|
|
9831
|
+
* - Every `key` is unique across the file, whatever the node type. Git Sync
|
|
9832
|
+
* recognises a node from one sync to the next by its key, so a reused key
|
|
9833
|
+
* leaves two nodes indistinguishable.
|
|
9834
|
+
* - Each section marks exactly one of its spaces `default: true`, and a site
|
|
9835
|
+
* without sections marks one among its top-level spaces. The default is the
|
|
9836
|
+
* space that opens when the site or the section is visited without a space
|
|
9837
|
+
* path of its own.
|
|
9838
|
+
* - A site declaring any section marks exactly one of those sections
|
|
9839
|
+
* `default: true`, and lists no space at the top level: once a section
|
|
9840
|
+
* exists, every space belongs inside one.
|
|
9841
|
+
* - Sections hold only spaces. Section groups hold only sections, or one
|
|
9842
|
+
* further level of section groups — nothing nests deeper than that.
|
|
9843
|
+
* - Spaces pointed at the same `content.directory` declare the same
|
|
9844
|
+
* `content.language`. One directory is read once, so it cannot produce two
|
|
9845
|
+
* languages at the same time.
|
|
9497
9846
|
*/
|
|
9498
9847
|
structure: GitSyncSiteStructure;
|
|
9499
9848
|
};
|
|
@@ -12970,6 +13319,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12970
13319
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
12971
13320
|
items: Organization[];
|
|
12972
13321
|
}, any>>;
|
|
13322
|
+
/**
|
|
13323
|
+
* No description
|
|
13324
|
+
*
|
|
13325
|
+
* @tags organizations
|
|
13326
|
+
* @name CreateOrganization
|
|
13327
|
+
* @summary Create an organization
|
|
13328
|
+
* @request POST:/orgs
|
|
13329
|
+
* @secure
|
|
13330
|
+
*/
|
|
13331
|
+
createOrganization: (data: CreateOrganization, query?: {
|
|
13332
|
+
/** If true, also creates a default documentation site for the organization. */
|
|
13333
|
+
withDefaultSite?: boolean;
|
|
13334
|
+
/** URL of an OpenAPI/Swagger specification to import and attach to the default site as a reference. Only used when `withDefaultSite` is true. */
|
|
13335
|
+
openapiUrl?: string;
|
|
13336
|
+
}, params?: RequestParams) => Promise<HttpResponse<Organization, any>>;
|
|
12973
13337
|
/**
|
|
12974
13338
|
* No description
|
|
12975
13339
|
*
|
|
@@ -13017,21 +13381,141 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13017
13381
|
};
|
|
13018
13382
|
}>>;
|
|
13019
13383
|
/**
|
|
13020
|
-
* @description Lists
|
|
13384
|
+
* @description Lists the supported audit event action identifiers and their display labels. Access is restricted to organization administrators and GitBook staff. The organization must be activated and on an active Enterprise plan, except for GitBook's own organization.
|
|
13385
|
+
*
|
|
13386
|
+
* @tags organizations
|
|
13387
|
+
* @name ListOrganizationAuditEventActions
|
|
13388
|
+
* @summary List organization audit event actions
|
|
13389
|
+
* @request GET:/orgs/{organizationId}/audit-event-actions
|
|
13390
|
+
* @secure
|
|
13391
|
+
*/
|
|
13392
|
+
listOrganizationAuditEventActions: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<{
|
|
13393
|
+
items: AuditEventAction[];
|
|
13394
|
+
}, {
|
|
13395
|
+
error: {
|
|
13396
|
+
/** @format int32 */
|
|
13397
|
+
code: 401;
|
|
13398
|
+
message: string;
|
|
13399
|
+
};
|
|
13400
|
+
} | {
|
|
13401
|
+
error: {
|
|
13402
|
+
/** @format int32 */
|
|
13403
|
+
code: 403;
|
|
13404
|
+
message: string;
|
|
13405
|
+
};
|
|
13406
|
+
} | {
|
|
13407
|
+
error: {
|
|
13408
|
+
/** @format int32 */
|
|
13409
|
+
code: 404;
|
|
13410
|
+
message: string;
|
|
13411
|
+
};
|
|
13412
|
+
}>>;
|
|
13413
|
+
/**
|
|
13414
|
+
* @description Lists recorded changes for an activated organization. Access is restricted to organization administrators and GitBook staff, and results are ordered by occurrence time, newest first. An active Enterprise plan is required except for GitBook's own organization.
|
|
13415
|
+
*
|
|
13416
|
+
* @tags organizations
|
|
13417
|
+
* @name ListOrganizationAuditEvents
|
|
13418
|
+
* @summary List organization audit events
|
|
13419
|
+
* @request GET:/orgs/{organizationId}/audit-events
|
|
13420
|
+
* @secure
|
|
13421
|
+
*/
|
|
13422
|
+
listOrganizationAuditEvents: (organizationId: EntityId, query?: {
|
|
13423
|
+
/** Identifier of the page results to fetch. */
|
|
13424
|
+
page?: string;
|
|
13425
|
+
/**
|
|
13426
|
+
* Number of events to return, up to 100.
|
|
13427
|
+
* @min 1
|
|
13428
|
+
* @max 100
|
|
13429
|
+
* @default 20
|
|
13430
|
+
*/
|
|
13431
|
+
limit?: number;
|
|
13432
|
+
/**
|
|
13433
|
+
* Include events occurring at or after this time.
|
|
13434
|
+
* @format date-time
|
|
13435
|
+
*/
|
|
13436
|
+
from?: string;
|
|
13437
|
+
/**
|
|
13438
|
+
* Include events occurring at or before this time.
|
|
13439
|
+
* @format date-time
|
|
13440
|
+
*/
|
|
13441
|
+
to?: string;
|
|
13442
|
+
/** Filter by an exact audit action name. */
|
|
13443
|
+
action?: string;
|
|
13444
|
+
/** Filter by an exact stable actor identifier. */
|
|
13445
|
+
actor?: string;
|
|
13446
|
+
/** Filter by an exact stable target identifier. */
|
|
13447
|
+
target?: string;
|
|
13448
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
13449
|
+
items: AuditEvent[];
|
|
13450
|
+
}, {
|
|
13451
|
+
error: {
|
|
13452
|
+
/** @format int32 */
|
|
13453
|
+
code: 400;
|
|
13454
|
+
message: string;
|
|
13455
|
+
};
|
|
13456
|
+
} | {
|
|
13457
|
+
error: {
|
|
13458
|
+
/** @format int32 */
|
|
13459
|
+
code: 401;
|
|
13460
|
+
message: string;
|
|
13461
|
+
};
|
|
13462
|
+
} | {
|
|
13463
|
+
error: {
|
|
13464
|
+
/** @format int32 */
|
|
13465
|
+
code: 403;
|
|
13466
|
+
message: string;
|
|
13467
|
+
};
|
|
13468
|
+
} | {
|
|
13469
|
+
error: {
|
|
13470
|
+
/** @format int32 */
|
|
13471
|
+
code: 404;
|
|
13472
|
+
message: string;
|
|
13473
|
+
};
|
|
13474
|
+
}>>;
|
|
13475
|
+
/**
|
|
13476
|
+
* @description Returns the full allowlisted payload for one recorded organization change. Access is restricted to organization administrators and GitBook staff. The organization must be activated and on an active Enterprise plan, except for GitBook's own organization.
|
|
13477
|
+
*
|
|
13478
|
+
* @tags organizations
|
|
13479
|
+
* @name GetOrganizationAuditEvent
|
|
13480
|
+
* @summary Get an organization audit event
|
|
13481
|
+
* @request GET:/orgs/{organizationId}/audit-events/{auditEventId}
|
|
13482
|
+
* @secure
|
|
13483
|
+
*/
|
|
13484
|
+
getOrganizationAuditEvent: (organizationId: EntityId, auditEventId: string, params?: RequestParams) => Promise<HttpResponse<AuditEventDetails, {
|
|
13485
|
+
error: {
|
|
13486
|
+
/** @format int32 */
|
|
13487
|
+
code: 401;
|
|
13488
|
+
message: string;
|
|
13489
|
+
};
|
|
13490
|
+
} | {
|
|
13491
|
+
error: {
|
|
13492
|
+
/** @format int32 */
|
|
13493
|
+
code: 403;
|
|
13494
|
+
message: string;
|
|
13495
|
+
};
|
|
13496
|
+
} | {
|
|
13497
|
+
error: {
|
|
13498
|
+
/** @format int32 */
|
|
13499
|
+
code: 404;
|
|
13500
|
+
message: string;
|
|
13501
|
+
};
|
|
13502
|
+
}>>;
|
|
13503
|
+
/**
|
|
13504
|
+
* @description Lists every style guide (a space holding a team's writing style guide) in the organization, along with every site that references each one. Style guides that are not referenced by any site are still returned with an empty `sites` list.
|
|
13021
13505
|
*
|
|
13022
13506
|
* @tags organizations
|
|
13023
13507
|
* @name ListOrganizationStyleguides
|
|
13024
|
-
* @summary List all
|
|
13508
|
+
* @summary List all style guides in an organization
|
|
13025
13509
|
* @request GET:/orgs/{organizationId}/styleguides
|
|
13026
13510
|
* @secure
|
|
13027
13511
|
*/
|
|
13028
13512
|
listOrganizationStyleguides: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<OrganizationStyleguides, any>>;
|
|
13029
13513
|
/**
|
|
13030
|
-
* @description Lists the built-in
|
|
13514
|
+
* @description Lists the built-in style guide starter templates that can seed a new styleguide, including the markdown content used to render each template's preview.
|
|
13031
13515
|
*
|
|
13032
13516
|
* @tags organizations
|
|
13033
13517
|
* @name ListStyleguideTemplates
|
|
13034
|
-
* @summary List all built-in
|
|
13518
|
+
* @summary List all built-in style guide templates
|
|
13035
13519
|
* @request GET:/orgs/{organizationId}/styleguide-templates
|
|
13036
13520
|
* @secure
|
|
13037
13521
|
*/
|
|
@@ -14474,7 +14958,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14474
14958
|
* Use `null` to remove the proxy.
|
|
14475
14959
|
*/
|
|
14476
14960
|
proxy?: SiteProxyOrigin | null;
|
|
14477
|
-
/** Attach an existing
|
|
14961
|
+
/** Attach an existing style guide to the site by the ID of the style guide space, or `null` to detach the current one. The space must be a style guide owned by the same organization. */
|
|
14478
14962
|
styleguide?: string | null;
|
|
14479
14963
|
}, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
|
|
14480
14964
|
/**
|
|
@@ -14882,6 +15366,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14882
15366
|
draft?: boolean;
|
|
14883
15367
|
/** Custom home page within the space, rendered at the site space's path root instead of the space's default landing page. */
|
|
14884
15368
|
pageId?: string | null;
|
|
15369
|
+
/** Title of the site */
|
|
15370
|
+
title?: SiteTitle;
|
|
14885
15371
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
14886
15372
|
/**
|
|
14887
15373
|
* @description Returns a paginated list of site spaces — the links between a site and its content source spaces. Each site space can be a language variant or content version within a section. Use the default filter to retrieve only the primary site space, or omit it to get all linked spaces including drafts.
|
|
@@ -14993,6 +15479,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14993
15479
|
icon?: Icon | null;
|
|
14994
15480
|
/** Whether the section should be created in draft mode. */
|
|
14995
15481
|
draft?: boolean;
|
|
15482
|
+
/** Custom home page within the space, rendered at the section's path root instead of the space's default landing page. */
|
|
15483
|
+
pageId?: string;
|
|
14996
15484
|
/** ID of the section group to create the section in */
|
|
14997
15485
|
siteSectionGroupId?: string;
|
|
14998
15486
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSection, any>>;
|
|
@@ -15130,6 +15618,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15130
15618
|
spaceId: string;
|
|
15131
15619
|
/** ID of the page the feedback is about. */
|
|
15132
15620
|
pageId: string;
|
|
15621
|
+
/** Surface the feedback was submitted from. When omitted, the feedback is recorded with an unknown source. */
|
|
15622
|
+
source?: AgentFeedbackSource;
|
|
15133
15623
|
}, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15134
15624
|
/**
|
|
15135
15625
|
* @description The response is streamed.
|
|
@@ -15278,6 +15768,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15278
15768
|
limit?: number;
|
|
15279
15769
|
/** Filter findings by associated site topic ID. */
|
|
15280
15770
|
topic?: string;
|
|
15771
|
+
/** Filter findings that reference the given site question ID as evidence. */
|
|
15772
|
+
question?: string;
|
|
15281
15773
|
/** Filter findings by status. */
|
|
15282
15774
|
status?: SiteFindingStatus;
|
|
15283
15775
|
/** Filter findings by type. When multiple types are given, findings matching any of them are returned. */
|
|
@@ -16334,16 +16826,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16334
16826
|
};
|
|
16335
16827
|
}>>;
|
|
16336
16828
|
/**
|
|
16337
|
-
* @description Ensures the site has a dedicated
|
|
16829
|
+
* @description Ensures the site has a dedicated style guide space and returns it. The style guide defines writing style and tone guidelines that the AI editor agent references when generating or refining content for the site. If a style guide already exists, this is idempotent and returns the existing space.
|
|
16338
16830
|
*
|
|
16339
16831
|
* @tags sites
|
|
16340
16832
|
* @name CreateSiteStyleguideById
|
|
16341
|
-
* @summary Create or retrieve the
|
|
16833
|
+
* @summary Create or retrieve the style guide space for a site
|
|
16342
16834
|
* @request POST:/orgs/{organizationId}/sites/{siteId}/styleguide
|
|
16343
16835
|
* @secure
|
|
16344
16836
|
*/
|
|
16345
16837
|
createSiteStyleguideById: (organizationId: EntityId, siteId: string, data?: {
|
|
16346
|
-
/** Built-in template id to seed the
|
|
16838
|
+
/** Built-in template id to seed the style guide content with. Omit (or send no body) to create a blank style guide. */
|
|
16347
16839
|
template?: string;
|
|
16348
16840
|
}, params?: RequestParams) => Promise<HttpResponse<Space, {
|
|
16349
16841
|
error: {
|
|
@@ -16740,6 +17232,41 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16740
17232
|
deleteSiteChannelById: (organizationId: EntityId, siteId: string, siteChannelId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
16741
17233
|
};
|
|
16742
17234
|
org: {
|
|
17235
|
+
/**
|
|
17236
|
+
* @description Returns the import runs of the organization, most recent first. Runs left behind by an import that never reported back are returned as failed.
|
|
17237
|
+
*
|
|
17238
|
+
* @tags imports
|
|
17239
|
+
* @name ListImportRuns
|
|
17240
|
+
* @summary List the import runs of an organization
|
|
17241
|
+
* @request GET:/org/{organizationId}/imports
|
|
17242
|
+
* @secure
|
|
17243
|
+
*/
|
|
17244
|
+
listImportRuns: (organizationId: EntityId, query?: {
|
|
17245
|
+
/** Only return the import runs targeting this space. */
|
|
17246
|
+
space?: string;
|
|
17247
|
+
/** Only return the import runs targeting this change request. */
|
|
17248
|
+
changeRequest?: string;
|
|
17249
|
+
/** Only return the import runs targeting a space of this site. */
|
|
17250
|
+
site?: string;
|
|
17251
|
+
/** Only return the import runs in this status. `active` covers both `pending` and `in-progress`. */
|
|
17252
|
+
status?: "active" | "pending" | "in-progress" | "completed" | "failed" | "cancelled";
|
|
17253
|
+
/** Identifier of the page results to fetch. */
|
|
17254
|
+
page?: string;
|
|
17255
|
+
/**
|
|
17256
|
+
* The number of results per page
|
|
17257
|
+
* @min 0
|
|
17258
|
+
* @max 1000
|
|
17259
|
+
*/
|
|
17260
|
+
limit?: number;
|
|
17261
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
17262
|
+
items: ContentImportRun[];
|
|
17263
|
+
}, {
|
|
17264
|
+
error: {
|
|
17265
|
+
/** @format int32 */
|
|
17266
|
+
code: 404;
|
|
17267
|
+
message: string;
|
|
17268
|
+
};
|
|
17269
|
+
}>>;
|
|
16743
17270
|
/**
|
|
16744
17271
|
* No description
|
|
16745
17272
|
*
|
|
@@ -16752,6 +17279,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16752
17279
|
startImportRun: (organizationId: EntityId, data: {
|
|
16753
17280
|
source: ContentImportSource;
|
|
16754
17281
|
target: ContentImportTarget;
|
|
17282
|
+
/** ID of the site the import is for, to list it among that site's imports. Only needed when the target space does not belong to the site yet — a site being set up, whose space is attached once the import has started. Otherwise the site is resolved from the space. */
|
|
17283
|
+
site?: string;
|
|
16755
17284
|
/**
|
|
16756
17285
|
* Enhance the imported content with AI
|
|
16757
17286
|
* @default true
|
|
@@ -16770,6 +17299,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16770
17299
|
message: string;
|
|
16771
17300
|
};
|
|
16772
17301
|
}>>;
|
|
17302
|
+
/**
|
|
17303
|
+
* @description Returns the import run. A run left behind by an import that never reported back is returned as failed.
|
|
17304
|
+
*
|
|
17305
|
+
* @tags imports
|
|
17306
|
+
* @name GetImportRun
|
|
17307
|
+
* @summary Get an import run
|
|
17308
|
+
* @request GET:/org/{organizationId}/imports/{importRunId}
|
|
17309
|
+
* @secure
|
|
17310
|
+
*/
|
|
17311
|
+
getImportRun: (organizationId: EntityId, importRunId: string, params?: RequestParams) => Promise<HttpResponse<ContentImportRun, {
|
|
17312
|
+
error: {
|
|
17313
|
+
/** @format int32 */
|
|
17314
|
+
code: 404;
|
|
17315
|
+
message: string;
|
|
17316
|
+
};
|
|
17317
|
+
}>>;
|
|
16773
17318
|
/**
|
|
16774
17319
|
* No description
|
|
16775
17320
|
*
|
|
@@ -17064,7 +17609,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17064
17609
|
};
|
|
17065
17610
|
}>>;
|
|
17066
17611
|
/**
|
|
17067
|
-
*
|
|
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.
|
|
17068
17613
|
*
|
|
17069
17614
|
* @tags git
|
|
17070
17615
|
* @name UpdateGitSyncInstallationById
|
|
@@ -17075,22 +17620,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17075
17620
|
updateGitSyncInstallationById: (installationId: string, data: GitSyncInstallationSetup & {
|
|
17076
17621
|
/** Project directories keyed by child installation ID for a site installation. */
|
|
17077
17622
|
childInstallationProjectDirectories?: Record<string, string>;
|
|
17078
|
-
}, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
17623
|
+
}, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, (Error & {
|
|
17079
17624
|
error: {
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17625
|
+
type: "missing_site_git_sync_config";
|
|
17626
|
+
details: {
|
|
17627
|
+
/** Repository-relative path where `docs.yaml` is required. */
|
|
17628
|
+
path: string;
|
|
17629
|
+
/** Repository branch where `docs.yaml` is required. */
|
|
17630
|
+
branch: string;
|
|
17631
|
+
/** Prompt for a coding agent to create and commit the missing file. */
|
|
17632
|
+
prompt: string;
|
|
17633
|
+
};
|
|
17083
17634
|
};
|
|
17084
|
-
} | {
|
|
17635
|
+
}) | {
|
|
17085
17636
|
error: {
|
|
17086
17637
|
/** @format int32 */
|
|
17087
|
-
code:
|
|
17638
|
+
code: 401;
|
|
17088
17639
|
message: string;
|
|
17089
17640
|
};
|
|
17090
17641
|
} | {
|
|
17091
17642
|
error: {
|
|
17092
17643
|
/** @format int32 */
|
|
17093
|
-
code:
|
|
17644
|
+
code: 404;
|
|
17094
17645
|
message: string;
|
|
17095
17646
|
};
|
|
17096
17647
|
}>>;
|
|
@@ -17158,6 +17709,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17158
17709
|
message: string;
|
|
17159
17710
|
};
|
|
17160
17711
|
}>>;
|
|
17712
|
+
/**
|
|
17713
|
+
* No description
|
|
17714
|
+
*
|
|
17715
|
+
* @tags git
|
|
17716
|
+
* @name GetGitHubRepoFileForGitSyncInstallation
|
|
17717
|
+
* @summary Get a file from a GitHub repository for a Git Sync installation
|
|
17718
|
+
* @request GET:/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/file
|
|
17719
|
+
* @secure
|
|
17720
|
+
*/
|
|
17721
|
+
getGitHubRepoFileForGitSyncInstallation: (installationId: string, accountName: string, repositoryName: string, query: {
|
|
17722
|
+
path: string;
|
|
17723
|
+
ref: string;
|
|
17724
|
+
}, params?: RequestParams) => Promise<HttpResponse<GitSyncRepositoryFile, {
|
|
17725
|
+
error: {
|
|
17726
|
+
/** @format int32 */
|
|
17727
|
+
code: 401;
|
|
17728
|
+
message: string;
|
|
17729
|
+
};
|
|
17730
|
+
} | {
|
|
17731
|
+
error: {
|
|
17732
|
+
/** @format int32 */
|
|
17733
|
+
code: 404;
|
|
17734
|
+
message: string;
|
|
17735
|
+
};
|
|
17736
|
+
}>>;
|
|
17161
17737
|
/**
|
|
17162
17738
|
* No description
|
|
17163
17739
|
*
|
|
@@ -17206,6 +17782,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17206
17782
|
message: string;
|
|
17207
17783
|
};
|
|
17208
17784
|
}>>;
|
|
17785
|
+
/**
|
|
17786
|
+
* No description
|
|
17787
|
+
*
|
|
17788
|
+
* @tags git
|
|
17789
|
+
* @name GetGitLabProjectFileForGitSyncInstallation
|
|
17790
|
+
* @summary Get a file from a GitLab project for a Git Sync installation
|
|
17791
|
+
* @request GET:/git/installations/{installationId}/gitlab/projects/{projectId}/file
|
|
17792
|
+
* @secure
|
|
17793
|
+
*/
|
|
17794
|
+
getGitLabProjectFileForGitSyncInstallation: (installationId: string, projectId: number, query: {
|
|
17795
|
+
path: string;
|
|
17796
|
+
ref: string;
|
|
17797
|
+
}, params?: RequestParams) => Promise<HttpResponse<GitSyncRepositoryFile, {
|
|
17798
|
+
error: {
|
|
17799
|
+
/** @format int32 */
|
|
17800
|
+
code: 401;
|
|
17801
|
+
message: string;
|
|
17802
|
+
};
|
|
17803
|
+
} | {
|
|
17804
|
+
error: {
|
|
17805
|
+
/** @format int32 */
|
|
17806
|
+
code: 404;
|
|
17807
|
+
message: string;
|
|
17808
|
+
};
|
|
17809
|
+
}>>;
|
|
17209
17810
|
};
|
|
17210
17811
|
}
|
|
17211
17812
|
export {};
|