@gitbook/api 0.198.0 → 0.200.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 +423 -66
- package/dist/constants.d.ts +11 -0
- package/dist/index.cjs +124 -1
- package/dist/index.js +108 -1
- package/package.json +1 -1
- package/spec/openapi.json +1216 -293
- package/spec/openapi.yaml +774 -132
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Steering on how far an agent should reach when it changes content.
|
|
3
|
+
* Only `read-only` is a hard boundary: the editing tools are not given to the agent, so it cannot change content whatever it is asked. The other values are guidance the agent follows — they steer where the work belongs. Agents can still make small edits elsewhere when the change it was asked for would otherwise leave the documentation broken (e.g. an inbound link to a page it renamed).
|
|
4
|
+
* `all` sets no specific focus, which is the default. `read-only` reads, searches and comments without editing. `current-page` focuses on the page the user is on and its subpages. `modified-pages` focuses on the pages a change request has already touched.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum AgentEditScope {
|
|
7
|
+
All = "all",
|
|
8
|
+
ReadOnly = "read-only",
|
|
9
|
+
CurrentPage = "current-page",
|
|
10
|
+
ModifiedPages = "modified-pages"
|
|
11
|
+
}
|
|
1
12
|
export declare enum AgentStatus {
|
|
2
13
|
Idle = "idle",
|
|
3
14
|
Processing = "processing",
|
|
@@ -35,6 +46,29 @@ export declare enum BillingStatus {
|
|
|
35
46
|
Unpaid = "unpaid",
|
|
36
47
|
Paused = "paused"
|
|
37
48
|
}
|
|
49
|
+
/** Lifecycle state of a pull or merge request on the Git provider. */
|
|
50
|
+
export declare enum GitProviderChangeState {
|
|
51
|
+
Open = "open",
|
|
52
|
+
Closed = "closed",
|
|
53
|
+
Merged = "merged"
|
|
54
|
+
}
|
|
55
|
+
/** Lifecycle state of a durable Git Sync run. */
|
|
56
|
+
export declare enum GitSyncRunState {
|
|
57
|
+
Queued = "queued",
|
|
58
|
+
Running = "running",
|
|
59
|
+
Success = "success",
|
|
60
|
+
Failure = "failure",
|
|
61
|
+
Timeout = "timeout",
|
|
62
|
+
Cancelled = "cancelled"
|
|
63
|
+
}
|
|
64
|
+
/** Operation performed by a durable Git Sync run. */
|
|
65
|
+
export declare enum GitSyncRunOperation {
|
|
66
|
+
Import = "import",
|
|
67
|
+
Export = "export",
|
|
68
|
+
Check = "check",
|
|
69
|
+
Merge = "merge",
|
|
70
|
+
Recovery = "recovery"
|
|
71
|
+
}
|
|
38
72
|
/**
|
|
39
73
|
* Core stages of a Git Sync process. This is not exhaustive, but should cover
|
|
40
74
|
* the important ones.
|
|
@@ -258,6 +292,10 @@ export declare enum SiteInsightsLinkPosition {
|
|
|
258
292
|
Sidebar = "sidebar",
|
|
259
293
|
Content = "content"
|
|
260
294
|
}
|
|
295
|
+
/** How a page's markdown was requested. `page-action` means a reader used the site's page-actions menu — its copy or view-as-markdown action — rather than a client fetching the URL directly. */
|
|
296
|
+
export declare enum SiteInsightsMarkdownSource {
|
|
297
|
+
PageAction = "page-action"
|
|
298
|
+
}
|
|
261
299
|
/** Context in which the event was recorded. */
|
|
262
300
|
export declare enum SiteInsightsDisplayContext {
|
|
263
301
|
Site = "site",
|
|
@@ -2178,35 +2216,6 @@ export interface DocumentBlockIntegration {
|
|
|
2178
2216
|
spaceId?: string;
|
|
2179
2217
|
};
|
|
2180
2218
|
}
|
|
2181
|
-
export interface DocumentBlockHint {
|
|
2182
|
-
object: "block";
|
|
2183
|
-
type: "hint";
|
|
2184
|
-
key?: string;
|
|
2185
|
-
data: {
|
|
2186
|
-
style: "info" | "warning" | "danger" | "success";
|
|
2187
|
-
/** Name of the icon */
|
|
2188
|
-
icon?: Icon;
|
|
2189
|
-
};
|
|
2190
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration)[];
|
|
2191
|
-
isVoid?: false;
|
|
2192
|
-
}
|
|
2193
|
-
export interface DocumentBlockQuote {
|
|
2194
|
-
object: "block";
|
|
2195
|
-
type: "blockquote";
|
|
2196
|
-
key?: string;
|
|
2197
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
|
|
2198
|
-
isVoid?: false;
|
|
2199
|
-
data?: object;
|
|
2200
|
-
}
|
|
2201
|
-
export interface DocumentBlockMath {
|
|
2202
|
-
object: "block";
|
|
2203
|
-
type: "math";
|
|
2204
|
-
key?: string;
|
|
2205
|
-
data: {
|
|
2206
|
-
formula: string;
|
|
2207
|
-
};
|
|
2208
|
-
isVoid: true;
|
|
2209
|
-
}
|
|
2210
2219
|
export interface DocumentTableViewGrid {
|
|
2211
2220
|
type: "grid";
|
|
2212
2221
|
/** Ordered list of the definition IDs to display */
|
|
@@ -2307,6 +2316,26 @@ export type DocumentTableDefinitionImage = DocumentTableDefinitionBase & {
|
|
|
2307
2316
|
type: "image";
|
|
2308
2317
|
};
|
|
2309
2318
|
export type DocumentTableDefinition = DocumentTableDefinitionText | DocumentTableDefinitionNumber | DocumentTableDefinitionCheckbox | DocumentTableDefinitionFiles | DocumentTableDefinitionUsers | DocumentTableDefinitionRating | DocumentTableDefinitionSelect | DocumentTableDefinitionContentRef | DocumentTableDefinitionImage;
|
|
2319
|
+
/**
|
|
2320
|
+
* Number of rows or columns covered by a table cell merge
|
|
2321
|
+
* @min 1
|
|
2322
|
+
* @max 50
|
|
2323
|
+
*/
|
|
2324
|
+
export type DocumentTableCellSpan = number;
|
|
2325
|
+
/** Positional table cell merge range. The anchor and spans are resolved against the current sorted record order and visible column order. The current document model applies only non-overlapping horizontal or vertical merges of adjacent Text or Number body cells; unsupported ranges are removed during normalization. */
|
|
2326
|
+
export interface DocumentTableCellMerge {
|
|
2327
|
+
/** Cell at the top-left of the merged range */
|
|
2328
|
+
anchor: {
|
|
2329
|
+
/** ID of the anchor record */
|
|
2330
|
+
record: string;
|
|
2331
|
+
/** ID of the anchor column */
|
|
2332
|
+
column: string;
|
|
2333
|
+
};
|
|
2334
|
+
/** Number of rows or columns covered by a table cell merge */
|
|
2335
|
+
rowSpan: DocumentTableCellSpan;
|
|
2336
|
+
/** Number of rows or columns covered by a table cell merge */
|
|
2337
|
+
colSpan: DocumentTableCellSpan;
|
|
2338
|
+
}
|
|
2310
2339
|
export interface DocumentFragment {
|
|
2311
2340
|
object: "fragment";
|
|
2312
2341
|
key?: string;
|
|
@@ -2323,6 +2352,8 @@ export interface DocumentBlockTable {
|
|
|
2323
2352
|
view: DocumentTableViewGrid | DocumentTableViewCards;
|
|
2324
2353
|
records: Record<string, DocumentTableRecord>;
|
|
2325
2354
|
definition: Record<string, DocumentTableDefinition>;
|
|
2355
|
+
/** Positional table cell merge ranges. The current document model retains only non-overlapping horizontal or vertical merges between adjacent Text or Number body cells. Anchors and spans are resolved against the table's current sorted record order and visible column order. */
|
|
2356
|
+
cellMerges?: DocumentTableCellMerge[];
|
|
2326
2357
|
/** Whether to render the block as a full width one */
|
|
2327
2358
|
fullWidth?: boolean;
|
|
2328
2359
|
/** Whether to show the search bar on the table. When unset, search is shown automatically on grid tables once they have enough rows. */
|
|
@@ -2330,6 +2361,35 @@ export interface DocumentBlockTable {
|
|
|
2330
2361
|
};
|
|
2331
2362
|
fragments: DocumentFragment[];
|
|
2332
2363
|
}
|
|
2364
|
+
export interface DocumentBlockHint {
|
|
2365
|
+
object: "block";
|
|
2366
|
+
type: "hint";
|
|
2367
|
+
key?: string;
|
|
2368
|
+
data: {
|
|
2369
|
+
style: "info" | "warning" | "danger" | "success";
|
|
2370
|
+
/** Name of the icon */
|
|
2371
|
+
icon?: Icon;
|
|
2372
|
+
};
|
|
2373
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockIntegration | DocumentBlockTable)[];
|
|
2374
|
+
isVoid?: false;
|
|
2375
|
+
}
|
|
2376
|
+
export interface DocumentBlockQuote {
|
|
2377
|
+
object: "block";
|
|
2378
|
+
type: "blockquote";
|
|
2379
|
+
key?: string;
|
|
2380
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
|
|
2381
|
+
isVoid?: false;
|
|
2382
|
+
data?: object;
|
|
2383
|
+
}
|
|
2384
|
+
export interface DocumentBlockMath {
|
|
2385
|
+
object: "block";
|
|
2386
|
+
type: "math";
|
|
2387
|
+
key?: string;
|
|
2388
|
+
data: {
|
|
2389
|
+
formula: string;
|
|
2390
|
+
};
|
|
2391
|
+
isVoid: true;
|
|
2392
|
+
}
|
|
2333
2393
|
export interface DocumentBlockListItem {
|
|
2334
2394
|
object: "block";
|
|
2335
2395
|
type: "list-item";
|
|
@@ -3214,6 +3274,15 @@ export interface ChangeRequest {
|
|
|
3214
3274
|
/** ID of the site finding associated with the change request, when applicable. */
|
|
3215
3275
|
finding?: string;
|
|
3216
3276
|
};
|
|
3277
|
+
/** Style guide check run that opened the change request, when it came from one. */
|
|
3278
|
+
styleguide?: {
|
|
3279
|
+
/** ID of the site the style guide belongs to. */
|
|
3280
|
+
site: string;
|
|
3281
|
+
/** ID of the style guide check run that opened the change request. */
|
|
3282
|
+
run: string;
|
|
3283
|
+
/** Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed. */
|
|
3284
|
+
changedPages?: number;
|
|
3285
|
+
};
|
|
3217
3286
|
/** If true, the change request is not up-to-date with latest changes in the main content. */
|
|
3218
3287
|
outdated: boolean;
|
|
3219
3288
|
/** Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request. */
|
|
@@ -3417,8 +3486,10 @@ export interface AgentConversation {
|
|
|
3417
3486
|
id: string;
|
|
3418
3487
|
/** The title of the conversation, generated from the first message. Absent until generated. */
|
|
3419
3488
|
title?: string;
|
|
3420
|
-
/** Whether the conversation is shared with everyone who has access to
|
|
3489
|
+
/** Whether the conversation is shared with everyone who has access to its context, rather than only its creator. Conversations are shared by default; a private conversation is only ever visible to its creator and stays private for good. */
|
|
3421
3490
|
shared: boolean;
|
|
3491
|
+
/** The change request the conversation is currently editing in. Only set for organization agent conversations, which start without one and attach a change request the first time the agent needs to change content. Absent for change request conversations, whose change request is the conversation's context. */
|
|
3492
|
+
changeRequest?: string;
|
|
3422
3493
|
createdAt: Timestamp;
|
|
3423
3494
|
updatedAt: Timestamp;
|
|
3424
3495
|
}
|
|
@@ -4606,6 +4677,8 @@ export type FetchVisitorAuthenticationEvent = SiteEvent & {
|
|
|
4606
4677
|
location?: string;
|
|
4607
4678
|
/** Whitelisted search parameters from the visitor authentication request. */
|
|
4608
4679
|
searchParams?: Record<string, string>;
|
|
4680
|
+
/** Whitelisted cookies from the visitor authentication request. */
|
|
4681
|
+
cookies?: Record<string, string>;
|
|
4609
4682
|
/** The visitor authentication action to resolve. If omitted, integrations resolve to the existing login redirect. */
|
|
4610
4683
|
action?: "logout";
|
|
4611
4684
|
};
|
|
@@ -5723,6 +5796,44 @@ export interface SubscriptionChanges {
|
|
|
5723
5796
|
isPublished: boolean;
|
|
5724
5797
|
})[];
|
|
5725
5798
|
}
|
|
5799
|
+
/**
|
|
5800
|
+
* Free-text detail a user typed alongside their cancellation reason.
|
|
5801
|
+
* @minLength 1
|
|
5802
|
+
* @maxLength 500
|
|
5803
|
+
*/
|
|
5804
|
+
export type BillingCancellationComment = string;
|
|
5805
|
+
/** Why an organization is cancelling its subscription, as answered by the user in the app. Recorded for analytics only: it never changes how the cancellation is applied. */
|
|
5806
|
+
export type BillingCancellationFeedback = {
|
|
5807
|
+
reason: "not_satisfied_with_product";
|
|
5808
|
+
/** The feature that was not satisfactory */
|
|
5809
|
+
reasonDetail: "editor" | "gitsync" | "ai_features";
|
|
5810
|
+
} | {
|
|
5811
|
+
reason: "not_satisfied_with_product";
|
|
5812
|
+
/** The feature that was not satisfactory */
|
|
5813
|
+
reasonDetail: "other";
|
|
5814
|
+
/** Free-text detail a user typed alongside their cancellation reason. */
|
|
5815
|
+
reasonComment: BillingCancellationComment;
|
|
5816
|
+
} | {
|
|
5817
|
+
reason: "will_vibe_code_our_own_app";
|
|
5818
|
+
/** The tool the organization is moving to */
|
|
5819
|
+
reasonDetail: "claude" | "codex" | "replit";
|
|
5820
|
+
} | {
|
|
5821
|
+
reason: "will_vibe_code_our_own_app";
|
|
5822
|
+
/** The tool the organization is moving to */
|
|
5823
|
+
reasonDetail: "other";
|
|
5824
|
+
/** Free-text detail a user typed alongside their cancellation reason. */
|
|
5825
|
+
reasonComment: BillingCancellationComment;
|
|
5826
|
+
} | {
|
|
5827
|
+
reason: "found_better_alternative";
|
|
5828
|
+
/** Free-text detail a user typed alongside their cancellation reason. */
|
|
5829
|
+
reasonComment: BillingCancellationComment;
|
|
5830
|
+
} | {
|
|
5831
|
+
reason: "company_shutdown";
|
|
5832
|
+
} | {
|
|
5833
|
+
reason: "other_reason";
|
|
5834
|
+
/** Free-text detail a user typed alongside their cancellation reason. */
|
|
5835
|
+
reasonComment: BillingCancellationComment;
|
|
5836
|
+
};
|
|
5726
5837
|
/**
|
|
5727
5838
|
* Coupon or promotion code to apply to billing operations.
|
|
5728
5839
|
* @minLength 1
|
|
@@ -5738,6 +5849,8 @@ export interface UpgradeOrganizationBilling {
|
|
|
5738
5849
|
changes?: SubscriptionChanges;
|
|
5739
5850
|
/** Reason that triggered the billing upgrade */
|
|
5740
5851
|
reason?: string;
|
|
5852
|
+
/** Why an organization is cancelling its subscription, as answered by the user in the app. Recorded for analytics only: it never changes how the cancellation is applied. */
|
|
5853
|
+
cancellationFeedback?: BillingCancellationFeedback;
|
|
5741
5854
|
/** Coupon or promotion code to apply to the subscription */
|
|
5742
5855
|
coupon?: BillingCoupon;
|
|
5743
5856
|
/** Optional usage addons to apply when upgrading: - if set, apply provided billable addons (non-billable meters are ignored) - if omitted, keep current subscription addons (or billing addons for new subs) - if omitted during interval switch, keep addon selection and switch addon price interval - if empty, or all provided meters are ignored, remove all existing billable addons */
|
|
@@ -7981,6 +8094,8 @@ export interface AIToolCallEditPage {
|
|
|
7981
8094
|
/** The base revision ID used to compare the page change in the current conversation. */
|
|
7982
8095
|
baseRevisionId: string;
|
|
7983
8096
|
page: ChangedRevisionPage;
|
|
8097
|
+
/** The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits. */
|
|
8098
|
+
changeRequestId?: string;
|
|
7984
8099
|
}
|
|
7985
8100
|
export interface AIToolCallCreatePage {
|
|
7986
8101
|
tool: "createPage";
|
|
@@ -7989,6 +8104,8 @@ export interface AIToolCallCreatePage {
|
|
|
7989
8104
|
/** The base revision ID used to compare the page change in the current conversation. */
|
|
7990
8105
|
baseRevisionId: string;
|
|
7991
8106
|
page: ChangedRevisionPage;
|
|
8107
|
+
/** The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits. */
|
|
8108
|
+
changeRequestId?: string;
|
|
7992
8109
|
}
|
|
7993
8110
|
export interface AIToolCallDeletePage {
|
|
7994
8111
|
tool: "deletePage";
|
|
@@ -7997,6 +8114,8 @@ export interface AIToolCallDeletePage {
|
|
|
7997
8114
|
/** The base revision ID used to compare the page deletion in the current conversation. */
|
|
7998
8115
|
baseRevisionId: string;
|
|
7999
8116
|
page: ChangedRevisionPage;
|
|
8117
|
+
/** The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits. */
|
|
8118
|
+
changeRequestId?: string;
|
|
8000
8119
|
}
|
|
8001
8120
|
export interface AIToolCallRenamePage {
|
|
8002
8121
|
tool: "renamePage";
|
|
@@ -8005,6 +8124,8 @@ export interface AIToolCallRenamePage {
|
|
|
8005
8124
|
/** The base revision ID used to compare the page rename in the current conversation. */
|
|
8006
8125
|
baseRevisionId: string;
|
|
8007
8126
|
page: ChangedRevisionPage;
|
|
8127
|
+
/** The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits. */
|
|
8128
|
+
changeRequestId?: string;
|
|
8008
8129
|
/** The new title of the page. */
|
|
8009
8130
|
title: string;
|
|
8010
8131
|
}
|
|
@@ -8015,6 +8136,8 @@ export interface AIToolCallMovePage {
|
|
|
8015
8136
|
/** The base revision ID used to compare the page move in the current conversation. */
|
|
8016
8137
|
baseRevisionId: string;
|
|
8017
8138
|
page: ChangedRevisionPage;
|
|
8139
|
+
/** The ID of the change request the edit was made in. Absent when the space itself was edited, through its unlocked live edits. */
|
|
8140
|
+
changeRequestId?: string;
|
|
8018
8141
|
to?: ChangedRevisionPage;
|
|
8019
8142
|
/**
|
|
8020
8143
|
* Indicates how the page was moved relative to the "to" page.
|
|
@@ -8325,6 +8448,11 @@ export interface AIMessage {
|
|
|
8325
8448
|
task?: AIMessageTask;
|
|
8326
8449
|
/** The response that generated this message. */
|
|
8327
8450
|
response?: AIMessageResponseMetadata;
|
|
8451
|
+
/**
|
|
8452
|
+
* When the message was added to the conversation. Absent on messages recorded before this field existed.
|
|
8453
|
+
* @format date-time
|
|
8454
|
+
*/
|
|
8455
|
+
createdAt?: string;
|
|
8328
8456
|
}
|
|
8329
8457
|
export type SiteQuestionAnswerWithResponse = SiteQuestionAnswer & {
|
|
8330
8458
|
response: AIMessage;
|
|
@@ -8576,6 +8704,20 @@ export type SiteAgentSettings = {
|
|
|
8576
8704
|
location: string;
|
|
8577
8705
|
};
|
|
8578
8706
|
} & SiteAgentSettingsInput;
|
|
8707
|
+
/** A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each. */
|
|
8708
|
+
export interface SiteStyleguideRun {
|
|
8709
|
+
object: "styleguide-run";
|
|
8710
|
+
/** The ID of the run */
|
|
8711
|
+
id: string;
|
|
8712
|
+
/** ID of the site the run belongs to */
|
|
8713
|
+
site: string;
|
|
8714
|
+
/** ID of the style guide space the run checked against */
|
|
8715
|
+
styleguide: string;
|
|
8716
|
+
/** IDs of the spaces the run was asked to check. A change request may have failed to open for one of them, so this is the intent rather than the result. */
|
|
8717
|
+
spaces: string[];
|
|
8718
|
+
createdAt: Timestamp;
|
|
8719
|
+
createdBy: User;
|
|
8720
|
+
}
|
|
8579
8721
|
/** Analytics info on the GitBook's site session. */
|
|
8580
8722
|
export type SiteInsightsEventSession = SiteInsightsSession & {
|
|
8581
8723
|
/** The visitors cookies. */
|
|
@@ -8643,6 +8785,8 @@ export type SiteInsightsEventPageView = SiteInsightsEventBase & {
|
|
|
8643
8785
|
};
|
|
8644
8786
|
export type SiteInsightsEventPageMarkdownRequest = SiteInsightsEventBase & {
|
|
8645
8787
|
type: "page_markdown_request";
|
|
8788
|
+
/** How a page's markdown was requested. `page-action` means a reader used the site's page-actions menu — its copy or view-as-markdown action — rather than a client fetching the URL directly. */
|
|
8789
|
+
markdownSource?: SiteInsightsMarkdownSource;
|
|
8646
8790
|
};
|
|
8647
8791
|
export type SiteInsightsEventSearchOpen = SiteInsightsEventBase & {
|
|
8648
8792
|
type: "search_open";
|
|
@@ -8818,6 +8962,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
8818
8962
|
column: "eventLLMSVariant";
|
|
8819
8963
|
} | {
|
|
8820
8964
|
column: "eventPageNotFoundType";
|
|
8965
|
+
} | {
|
|
8966
|
+
column: "eventMarkdownSource";
|
|
8821
8967
|
} | {
|
|
8822
8968
|
column: "eventSearchQuery";
|
|
8823
8969
|
} | {
|
|
@@ -8927,6 +9073,9 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
8927
9073
|
} | {
|
|
8928
9074
|
column: "eventPageNotFoundType";
|
|
8929
9075
|
values: (null | SiteInsightsPageNotFoundType)[];
|
|
9076
|
+
} | {
|
|
9077
|
+
column: "eventMarkdownSource";
|
|
9078
|
+
values: (null | SiteInsightsMarkdownSource)[];
|
|
8930
9079
|
} | {
|
|
8931
9080
|
column: "siteSpace";
|
|
8932
9081
|
values: (string | null)[];
|
|
@@ -9100,6 +9249,8 @@ export interface SiteRedirect {
|
|
|
9100
9249
|
draft: boolean;
|
|
9101
9250
|
/** Capture and append the wildcard-matched suffix to the destination URL. */
|
|
9102
9251
|
captureWildcard: boolean;
|
|
9252
|
+
/** Whether the redirect is configured as permanent. Permanent redirects are served as HTTP 308 for public live traffic and HTTP 307 in non-public contexts. */
|
|
9253
|
+
permanent: boolean;
|
|
9103
9254
|
destination: SiteRedirectDestination;
|
|
9104
9255
|
/**
|
|
9105
9256
|
* When the redirect was created.
|
|
@@ -9776,7 +9927,7 @@ export interface GitSyncSiteOperation {
|
|
|
9776
9927
|
error?: string;
|
|
9777
9928
|
/** An action the user can take to resolve a failed Git Sync operation. */
|
|
9778
9929
|
errorAction?: GitSyncOperationErrorAction;
|
|
9779
|
-
spaces
|
|
9930
|
+
spaces?: Record<string, GitSyncSpaceOperation>;
|
|
9780
9931
|
}
|
|
9781
9932
|
/**
|
|
9782
9933
|
* A section group — a container that nests sections (and other section
|
|
@@ -9802,8 +9953,8 @@ export interface GitSyncSiteStructureSectionGroup {
|
|
|
9802
9953
|
icon?: Icon;
|
|
9803
9954
|
/** Whether the section group is draft and not live. */
|
|
9804
9955
|
draft?: boolean;
|
|
9805
|
-
/** Section
|
|
9806
|
-
children?: (GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection)[];
|
|
9956
|
+
/** Section, section group, or external link nodes nested under this group. */
|
|
9957
|
+
children?: (GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureExternalLink)[];
|
|
9807
9958
|
}
|
|
9808
9959
|
/**
|
|
9809
9960
|
* A space — a single content unit in the site's navigation tree. Discriminated
|
|
@@ -9897,19 +10048,70 @@ export interface GitSyncSiteStructureSection {
|
|
|
9897
10048
|
/** Space nodes nested under this section. */
|
|
9898
10049
|
children?: GitSyncSiteStructureSpace[];
|
|
9899
10050
|
}
|
|
10051
|
+
/**
|
|
10052
|
+
* Title of the external link
|
|
10053
|
+
* @minLength 2
|
|
10054
|
+
* @maxLength 128
|
|
10055
|
+
*/
|
|
10056
|
+
export type SiteExternalLinkTitle = string;
|
|
10057
|
+
/**
|
|
10058
|
+
* Description of the external link
|
|
10059
|
+
* @minLength 0
|
|
10060
|
+
* @maxLength 256
|
|
10061
|
+
*/
|
|
10062
|
+
export type SiteExternalLinkDescription = string;
|
|
10063
|
+
/**
|
|
10064
|
+
* An external link — a leaf that navigates away from the site to an absolute
|
|
10065
|
+
* HTTP(S) URL. Discriminated by `type: external-link`.
|
|
10066
|
+
*
|
|
10067
|
+
* An external link only exists in a section-based site structure: it may sit
|
|
10068
|
+
* at the root alongside sections and section groups, or nested under a
|
|
10069
|
+
* section group, but never inside a section.
|
|
10070
|
+
*/
|
|
10071
|
+
export interface GitSyncSiteStructureExternalLink {
|
|
10072
|
+
/** Discriminator for an external link node. */
|
|
10073
|
+
type: "external-link";
|
|
10074
|
+
/**
|
|
10075
|
+
* Stable identifier for this external link, used as the Git Sync key.
|
|
10076
|
+
* Must be unique amongst all other nodes of the site. For example:
|
|
10077
|
+
* `link-status` or `link-1`.
|
|
10078
|
+
* @minLength 1
|
|
10079
|
+
*/
|
|
10080
|
+
key: string;
|
|
10081
|
+
/** Title of the external link */
|
|
10082
|
+
title: SiteExternalLinkTitle;
|
|
10083
|
+
/** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
10084
|
+
localizedTitle?: LocalizedString128;
|
|
10085
|
+
/** Description of the external link */
|
|
10086
|
+
description?: SiteExternalLinkDescription;
|
|
10087
|
+
/** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
10088
|
+
localizedDescription?: LocalizedString256;
|
|
10089
|
+
/** Name of the icon */
|
|
10090
|
+
icon?: Icon;
|
|
10091
|
+
/** Absolute HTTP or HTTPS URL opened by the external link. */
|
|
10092
|
+
url: URL;
|
|
10093
|
+
/** Whether the external link is draft and not live. */
|
|
10094
|
+
draft?: boolean;
|
|
10095
|
+
/** Expression to evaluate */
|
|
10096
|
+
condition?: Expression;
|
|
10097
|
+
}
|
|
9900
10098
|
/**
|
|
9901
10099
|
* A single node in a Git Sync site structure tree — a section group, a
|
|
9902
|
-
* section,
|
|
10100
|
+
* section, a space, or an external link, discriminated by `type`.
|
|
9903
10101
|
*/
|
|
9904
|
-
export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureSpace;
|
|
10102
|
+
export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyncSiteStructureSection | GitSyncSiteStructureSpace | GitSyncSiteStructureExternalLink;
|
|
9905
10103
|
/**
|
|
9906
10104
|
* Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
|
|
9907
|
-
*
|
|
10105
|
+
* four node types: a section group, a section, a space, or an external link.
|
|
9908
10106
|
*
|
|
9909
10107
|
* A **space** is a leaf holding content, pointed at a repository directory. A
|
|
9910
10108
|
* **section** gathers spaces behind one top-level navigation entry. A
|
|
9911
|
-
* **section group** gathers sections.
|
|
9912
|
-
*
|
|
10109
|
+
* **section group** gathers sections. An **external link** is a leaf that
|
|
10110
|
+
* navigates away from the site to an absolute HTTP(S) URL — it may sit at the
|
|
10111
|
+
* root or under a section group, but never inside a section, and only exists
|
|
10112
|
+
* in a site that also has at least one section. A site either uses sections
|
|
10113
|
+
* (optionally alongside external links) or lists its spaces at the top level,
|
|
10114
|
+
* never both.
|
|
9913
10115
|
*
|
|
9914
10116
|
* ```yaml
|
|
9915
10117
|
* structure:
|
|
@@ -9972,8 +10174,12 @@ export type GitSyncSiteStructureNode = GitSyncSiteStructureSectionGroup | GitSyn
|
|
|
9972
10174
|
* - A site declaring any section marks exactly one of those sections
|
|
9973
10175
|
* `default: true`, and lists no space at the top level: once a section
|
|
9974
10176
|
* exists, every space belongs inside one.
|
|
9975
|
-
* - Sections hold only spaces. Section groups hold only sections,
|
|
9976
|
-
* further level
|
|
10177
|
+
* - Sections hold only spaces. Section groups hold only sections, nested
|
|
10178
|
+
* section groups (one further level), or external links — nothing nests
|
|
10179
|
+
* deeper than that.
|
|
10180
|
+
* - External links are only valid at the root or nested in a section group,
|
|
10181
|
+
* never inside a section. A site containing an external link must use
|
|
10182
|
+
* sections, with at least one section declared.
|
|
9977
10183
|
* - Spaces pointed at the same `content.directory` declare the same
|
|
9978
10184
|
* `content.language`. One directory is read once, so it cannot produce two
|
|
9979
10185
|
* languages at the same time.
|
|
@@ -10007,12 +10213,16 @@ export interface GitSyncSiteConfig {
|
|
|
10007
10213
|
title: string;
|
|
10008
10214
|
/**
|
|
10009
10215
|
* Hierarchical structure of a site in a Git Sync YAML. Each entry is one of
|
|
10010
|
-
*
|
|
10216
|
+
* four node types: a section group, a section, a space, or an external link.
|
|
10011
10217
|
*
|
|
10012
10218
|
* A **space** is a leaf holding content, pointed at a repository directory. A
|
|
10013
10219
|
* **section** gathers spaces behind one top-level navigation entry. A
|
|
10014
|
-
* **section group** gathers sections.
|
|
10015
|
-
*
|
|
10220
|
+
* **section group** gathers sections. An **external link** is a leaf that
|
|
10221
|
+
* navigates away from the site to an absolute HTTP(S) URL — it may sit at the
|
|
10222
|
+
* root or under a section group, but never inside a section, and only exists
|
|
10223
|
+
* in a site that also has at least one section. A site either uses sections
|
|
10224
|
+
* (optionally alongside external links) or lists its spaces at the top level,
|
|
10225
|
+
* never both.
|
|
10016
10226
|
*
|
|
10017
10227
|
* ```yaml
|
|
10018
10228
|
* structure:
|
|
@@ -10075,8 +10285,12 @@ export interface GitSyncSiteConfig {
|
|
|
10075
10285
|
* - A site declaring any section marks exactly one of those sections
|
|
10076
10286
|
* `default: true`, and lists no space at the top level: once a section
|
|
10077
10287
|
* exists, every space belongs inside one.
|
|
10078
|
-
* - Sections hold only spaces. Section groups hold only sections,
|
|
10079
|
-
* further level
|
|
10288
|
+
* - Sections hold only spaces. Section groups hold only sections, nested
|
|
10289
|
+
* section groups (one further level), or external links — nothing nests
|
|
10290
|
+
* deeper than that.
|
|
10291
|
+
* - External links are only valid at the root or nested in a section group,
|
|
10292
|
+
* never inside a section. A site containing an external link must use
|
|
10293
|
+
* sections, with at least one section declared.
|
|
10080
10294
|
* - Spaces pointed at the same `content.directory` declare the same
|
|
10081
10295
|
* `content.language`. One directory is read once, so it cannot produce two
|
|
10082
10296
|
* languages at the same time.
|
|
@@ -10574,12 +10788,26 @@ export interface AgentStreamMessageResponse {
|
|
|
10574
10788
|
type: "message_response";
|
|
10575
10789
|
response: AIStreamResponse;
|
|
10576
10790
|
}
|
|
10791
|
+
/** A message waiting for the agent's current response to finish, held in the order it will be processed. The identifier addresses the entry to remove it from the queue or run it immediately. */
|
|
10792
|
+
export interface AgentQueuedMessage {
|
|
10793
|
+
/** Identifier of the queue entry, unique within the conversation. */
|
|
10794
|
+
id: string;
|
|
10795
|
+
/** Input version of an AI message. */
|
|
10796
|
+
message: AIMessageInput;
|
|
10797
|
+
/**
|
|
10798
|
+
* When the message entered the queue.
|
|
10799
|
+
* @format date-time
|
|
10800
|
+
*/
|
|
10801
|
+
queuedAt: string;
|
|
10802
|
+
}
|
|
10577
10803
|
/** Describes what the agent is currently doing while processing, used to display a live activity indicator in the conversation. */
|
|
10578
10804
|
export interface AgentActivity {
|
|
10579
10805
|
/** The kind of activity the agent is currently performing. `thinking` while it reasons or decides on a next action, `tool` while it runs a tool, and `responding` while it writes its answer. */
|
|
10580
10806
|
type: "thinking" | "tool" | "responding";
|
|
10581
10807
|
/** When `type` is `tool`, the name of the tool being called (matches `AIToolCall.tool`). */
|
|
10582
10808
|
tool?: string;
|
|
10809
|
+
/** What to show the user instead of a label derived from `tool`, for a tool whose name means nothing to them — an MCP server's, say, where it reads "Searching documentation". */
|
|
10810
|
+
label?: string;
|
|
10583
10811
|
}
|
|
10584
10812
|
/** An option the user can pick when answering a question asked by the agent. */
|
|
10585
10813
|
export interface AgentQuestionOption {
|
|
@@ -10597,16 +10825,31 @@ export interface AgentPendingQuestion {
|
|
|
10597
10825
|
/** The options the user can choose from. */
|
|
10598
10826
|
options: AgentQuestionOption[];
|
|
10599
10827
|
}
|
|
10828
|
+
/** Where the agent's content edits land. Usually a change request, which is how published content is changed; a space whose live edits are unlocked is the exception, and is edited in place. Carries identifiers only: the client resolves the change request's number and subject, or the space's title, through the API. */
|
|
10829
|
+
export interface AgentEditTarget {
|
|
10830
|
+
/** The ID of the space the edits are made in. */
|
|
10831
|
+
spaceId: string;
|
|
10832
|
+
/** The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits. */
|
|
10833
|
+
changeRequestId?: string;
|
|
10834
|
+
}
|
|
10600
10835
|
export interface AgentState {
|
|
10601
10836
|
status: AgentStatus;
|
|
10602
10837
|
/** List of response suggestions for the user to select from. */
|
|
10603
10838
|
suggestions: string[];
|
|
10604
|
-
/** List of messages sent by the users queued to processed. */
|
|
10839
|
+
/** List of messages sent by the users queued to processed. Superseded by `queue`, which carries the same messages with the identifiers needed to act on them; kept for compatibility with clients that predate it. */
|
|
10605
10840
|
queuedMessages: AIMessageInput[];
|
|
10841
|
+
/** Messages waiting for the current response to finish, in the order they will be processed. */
|
|
10842
|
+
queue?: AgentQueuedMessage[];
|
|
10606
10843
|
/** What the agent is currently doing. Only set while the agent is processing. */
|
|
10607
10844
|
activity?: AgentActivity;
|
|
10608
10845
|
/** A question the agent is waiting for the user to answer. While set, the client replaces the prompt with a choice control. */
|
|
10609
10846
|
pendingQuestion?: AgentPendingQuestion;
|
|
10847
|
+
/** Where the agent currently edits content. Absent until something is attached: the organization agent starts read-only, while a change request agent always edits the change request it belongs to. */
|
|
10848
|
+
editTarget?: AgentEditTarget;
|
|
10849
|
+
/** How far this conversation should reach when it changes content. */
|
|
10850
|
+
editScope?: AgentEditScope;
|
|
10851
|
+
/** Whether this conversation can only be read. Set on a transcript the agent produced on its own — an agent review — which is published for its requester to consult rather than to be continued: the client shows no composer and the agent refuses a message sent to it anyway. */
|
|
10852
|
+
consultOnly?: boolean;
|
|
10610
10853
|
}
|
|
10611
10854
|
/** Payload emitted by the agent with its current state. */
|
|
10612
10855
|
export interface AgentStreamState {
|
|
@@ -14209,6 +14452,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14209
14452
|
space?: string;
|
|
14210
14453
|
/** If defined, only change requests linked to this site topic will be returned. */
|
|
14211
14454
|
topic?: string;
|
|
14455
|
+
/** If defined, only change requests opened by this style guide check run will be returned. */
|
|
14456
|
+
styleguideRun?: string;
|
|
14212
14457
|
/** Controls whether change requests from triage are included. Pass `none` to exclude change requests from triage, or `all` to include them. Default is `none`. */
|
|
14213
14458
|
finding?: "none" | "all";
|
|
14214
14459
|
/** The field to sort change requests by. Defaults to 'updatedAt'. */
|
|
@@ -14799,6 +15044,60 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14799
15044
|
/** Document describing the Docs agent instructions. */
|
|
14800
15045
|
instructions: JSONDocument;
|
|
14801
15046
|
}, params?: RequestParams) => Promise<HttpResponse<OrganizationAgentInstructions, any>>;
|
|
15047
|
+
/**
|
|
15048
|
+
* @description Returns a paginated list of the calling user's AI agent conversations with the organization agent. Unlike change request conversations, these are not tied to a single change request: the agent works across the organization and only attaches a change request when it needs to edit content. A conversation belongs to the user who started it and is never visible to anyone else.
|
|
15049
|
+
*
|
|
15050
|
+
* @tags organizations, agents
|
|
15051
|
+
* @name ListOrganizationAgentConversations
|
|
15052
|
+
* @summary List AI agent conversations in an organization
|
|
15053
|
+
* @request GET:/orgs/{organizationId}/agent/conversations
|
|
15054
|
+
* @secure
|
|
15055
|
+
*/
|
|
15056
|
+
listOrganizationAgentConversations: (organizationId: EntityId, query?: {
|
|
15057
|
+
/** Identifier of the page results to fetch. */
|
|
15058
|
+
page?: string;
|
|
15059
|
+
/**
|
|
15060
|
+
* The number of results per page
|
|
15061
|
+
* @min 0
|
|
15062
|
+
* @max 1000
|
|
15063
|
+
*/
|
|
15064
|
+
limit?: number;
|
|
15065
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
15066
|
+
items: AgentConversation[];
|
|
15067
|
+
}, any>>;
|
|
15068
|
+
/**
|
|
15069
|
+
* @description Prepares a conversation so the client can connect to it, giving the agent the credentials it acts with. Call this before opening a conversation; connecting to one that was never provisioned yields an agent whose tools all fail. The conversation itself is only recorded once the user sends a first message, so opening the agent and closing it again leaves nothing behind. Safe to call again to refresh an expiring session.
|
|
15070
|
+
*
|
|
15071
|
+
* @tags organizations, agents
|
|
15072
|
+
* @name ProvisionOrganizationAgentConversation
|
|
15073
|
+
* @summary Provision an AI agent conversation in an organization
|
|
15074
|
+
* @request PUT:/orgs/{organizationId}/agent/conversations/{conversationId}
|
|
15075
|
+
* @secure
|
|
15076
|
+
*/
|
|
15077
|
+
provisionOrganizationAgentConversation: (organizationId: EntityId, conversationId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15078
|
+
/**
|
|
15079
|
+
* @description Updates one of the calling user's conversations with the organization agent. Use this to rename it.
|
|
15080
|
+
*
|
|
15081
|
+
* @tags organizations, agents
|
|
15082
|
+
* @name UpdateOrganizationAgentConversation
|
|
15083
|
+
* @summary Update an AI agent conversation in an organization
|
|
15084
|
+
* @request PATCH:/orgs/{organizationId}/agent/conversations/{conversationId}
|
|
15085
|
+
* @secure
|
|
15086
|
+
*/
|
|
15087
|
+
updateOrganizationAgentConversation: (organizationId: EntityId, conversationId: string, data: {
|
|
15088
|
+
/** The new title of the conversation. */
|
|
15089
|
+
title: string;
|
|
15090
|
+
}, params?: RequestParams) => Promise<HttpResponse<AgentConversation, any>>;
|
|
15091
|
+
/**
|
|
15092
|
+
* @description Deletes one of the calling user's conversations with the organization agent, destroying the messages it holds. This cannot be undone.
|
|
15093
|
+
*
|
|
15094
|
+
* @tags organizations, agents
|
|
15095
|
+
* @name DeleteOrganizationAgentConversation
|
|
15096
|
+
* @summary Delete an agent conversation in an organization
|
|
15097
|
+
* @request DELETE:/orgs/{organizationId}/agent/conversations/{conversationId}
|
|
15098
|
+
* @secure
|
|
15099
|
+
*/
|
|
15100
|
+
deleteOrganizationAgentConversation: (organizationId: EntityId, conversationId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
14802
15101
|
/**
|
|
14803
15102
|
* No description
|
|
14804
15103
|
*
|
|
@@ -16119,11 +16418,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16119
16418
|
*/
|
|
16120
16419
|
getSiteScanById: (organizationId: EntityId, siteId: string, siteScanId: string, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
|
|
16121
16420
|
/**
|
|
16122
|
-
*
|
|
16421
|
+
* @description Lists the quality issues GitBook's AI has identified on a site by comparing its content against real usage and external sources — content gaps, outdated or incorrect content, and broken or outbound links. Use this when asked to find, audit, or fix problems in a site's docs.
|
|
16123
16422
|
*
|
|
16124
16423
|
* @tags site-context
|
|
16125
16424
|
* @name ListSiteFindings
|
|
16126
|
-
* @summary List
|
|
16425
|
+
* @summary List documentation issues GitBook has found on a site
|
|
16127
16426
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/findings
|
|
16128
16427
|
* @secure
|
|
16129
16428
|
*/
|
|
@@ -16166,21 +16465,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16166
16465
|
items: SiteFinding[];
|
|
16167
16466
|
}, any>>;
|
|
16168
16467
|
/**
|
|
16169
|
-
*
|
|
16468
|
+
* @description Retrieves the full detail of one documentation issue found by GitBook's AI. Use this after `listSiteFindings` to inspect a specific issue before deciding to fix, dismiss, or investigate it further.
|
|
16170
16469
|
*
|
|
16171
16470
|
* @tags site-context
|
|
16172
16471
|
* @name GetSiteFindingById
|
|
16173
|
-
* @summary Get a
|
|
16472
|
+
* @summary Get details of a single documentation issue
|
|
16174
16473
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
|
|
16175
16474
|
* @secure
|
|
16176
16475
|
*/
|
|
16177
16476
|
getSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
|
|
16178
16477
|
/**
|
|
16179
|
-
*
|
|
16478
|
+
* @description Changes the status of a documentation issue found by GitBook's AI, typically after fixing it (for example via `triggerChangeRequestsForSiteFinding`) or dismissing it as not worth acting on. This does not edit any content itself — it only records the outcome.
|
|
16180
16479
|
*
|
|
16181
16480
|
* @tags site-context
|
|
16182
16481
|
* @name UpdateSiteFindingById
|
|
16183
|
-
* @summary
|
|
16482
|
+
* @summary Resolve, dismiss, or reopen a documentation issue
|
|
16184
16483
|
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
|
|
16185
16484
|
* @secure
|
|
16186
16485
|
*/
|
|
@@ -16195,11 +16494,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16195
16494
|
status: SiteFindingStatus;
|
|
16196
16495
|
}, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
|
|
16197
16496
|
/**
|
|
16198
|
-
*
|
|
16497
|
+
* @description Lists the change requests created to fix a documentation issue. Use this to check whether an issue already has a pending or merged fix before triggering a new one.
|
|
16199
16498
|
*
|
|
16200
16499
|
* @tags site-context
|
|
16201
16500
|
* @name ListChangeRequestsForSiteFinding
|
|
16202
|
-
* @summary List
|
|
16501
|
+
* @summary List content fixes already proposed for a documentation issue
|
|
16203
16502
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests
|
|
16204
16503
|
* @secure
|
|
16205
16504
|
*/
|
|
@@ -16216,21 +16515,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16216
16515
|
items: ChangeRequest[];
|
|
16217
16516
|
}, any>>;
|
|
16218
16517
|
/**
|
|
16219
|
-
*
|
|
16518
|
+
* @description Starts GitBook's AI on fixing a documentation issue directly: it drafts the content change and opens it as a change request for review, rather than editing content in place. This is the primary way to act on "fix issues/gaps/broken links in my docs" requests once `listSiteFindings` has surfaced the relevant findings. Processing is asynchronous; poll `listChangeRequestsForSiteFinding` for the resulting change request, then review and merge it with `submitOrMergeChangeRequest`.
|
|
16220
16519
|
*
|
|
16221
16520
|
* @tags site-context
|
|
16222
16521
|
* @name TriggerChangeRequestsForSiteFinding
|
|
16223
|
-
* @summary
|
|
16522
|
+
* @summary Fix a documentation issue by generating a change request
|
|
16224
16523
|
* @request POST:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/change-requests
|
|
16225
16524
|
* @secure
|
|
16226
16525
|
*/
|
|
16227
16526
|
triggerChangeRequestsForSiteFinding: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
16228
16527
|
/**
|
|
16229
|
-
*
|
|
16528
|
+
* @description Lists the site pages a documentation issue relates to. Use this to locate which page(s) to edit when fixing an issue manually instead of via `triggerChangeRequestsForSiteFinding`.
|
|
16230
16529
|
*
|
|
16231
16530
|
* @tags site-context
|
|
16232
16531
|
* @name ListPagesForSiteFinding
|
|
16233
|
-
* @summary List pages
|
|
16532
|
+
* @summary List the pages affected by a documentation issue
|
|
16234
16533
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/pages
|
|
16235
16534
|
* @secure
|
|
16236
16535
|
*/
|
|
@@ -16247,11 +16546,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16247
16546
|
items: SiteFindingPage[];
|
|
16248
16547
|
}, any>>;
|
|
16249
16548
|
/**
|
|
16250
|
-
*
|
|
16549
|
+
* @description Lists the questions end users asked GitBook's Ask-AI assistant that were used as evidence for a documentation issue. Use this to see what users actually wanted to know before deciding how to fix the issue.
|
|
16251
16550
|
*
|
|
16252
16551
|
* @tags site-context
|
|
16253
16552
|
* @name ListQuestionsForSiteFinding
|
|
16254
|
-
* @summary List questions
|
|
16553
|
+
* @summary List the Ask-AI questions evidencing a documentation issue
|
|
16255
16554
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/questions
|
|
16256
16555
|
* @secure
|
|
16257
16556
|
*/
|
|
@@ -16268,11 +16567,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16268
16567
|
items: SiteQuestion[];
|
|
16269
16568
|
}, any>>;
|
|
16270
16569
|
/**
|
|
16271
|
-
*
|
|
16570
|
+
* @description Lists the context records that GitBook's AI used as evidence for a documentation issue. Use this to see what real-world signal led to the finding before deciding how to fix it.
|
|
16272
16571
|
*
|
|
16273
16572
|
* @tags site-context
|
|
16274
16573
|
* @name ListRecordsForSiteFinding
|
|
16275
|
-
* @summary List
|
|
16574
|
+
* @summary List the source content evidencing a documentation issue
|
|
16276
16575
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/records
|
|
16277
16576
|
* @secure
|
|
16278
16577
|
*/
|
|
@@ -16289,11 +16588,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16289
16588
|
items: ContextRecord[];
|
|
16290
16589
|
}, any>>;
|
|
16291
16590
|
/**
|
|
16292
|
-
* @description Returns aggregate statistics about the
|
|
16591
|
+
* @description Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.
|
|
16293
16592
|
*
|
|
16294
16593
|
* @tags site-context
|
|
16295
16594
|
* @name GetSiteFindingStats
|
|
16296
|
-
* @summary Get
|
|
16595
|
+
* @summary Get a summary of documentation issues found on a site
|
|
16297
16596
|
* @request GET:/orgs/{organizationId}/sites/{siteId}/stats/findings
|
|
16298
16597
|
* @secure
|
|
16299
16598
|
*/
|
|
@@ -16448,11 +16747,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16448
16747
|
usageSettings: SiteTopicUsageSettings;
|
|
16449
16748
|
}, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
|
|
16450
16749
|
/**
|
|
16451
|
-
*
|
|
16750
|
+
* @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `updateSiteFindingById` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
|
|
16452
16751
|
*
|
|
16453
16752
|
* @tags site-context
|
|
16454
16753
|
* @name DeleteSiteTopicFindings
|
|
16455
|
-
* @summary Delete all
|
|
16754
|
+
* @summary Delete all documentation issues found under a topic
|
|
16456
16755
|
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}/findings
|
|
16457
16756
|
* @secure
|
|
16458
16757
|
*/
|
|
@@ -17214,6 +17513,55 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17214
17513
|
message: string;
|
|
17215
17514
|
};
|
|
17216
17515
|
}>>;
|
|
17516
|
+
/**
|
|
17517
|
+
* @description Starts a style guide check: GitBook Agent reviews the given spaces against the site's style guide and proposes fixes. One draft change request is opened per space, each marked as belonging to the returned run. Fails if the site has no style guide.
|
|
17518
|
+
*
|
|
17519
|
+
* @tags sites
|
|
17520
|
+
* @name CreateSiteStyleguideRun
|
|
17521
|
+
* @summary Start a style guide check run for a site
|
|
17522
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/styleguide/runs
|
|
17523
|
+
* @secure
|
|
17524
|
+
*/
|
|
17525
|
+
createSiteStyleguideRun: (organizationId: EntityId, siteId: string, data: {
|
|
17526
|
+
/**
|
|
17527
|
+
* IDs of the site's spaces to check. Each must be an editable content space of the site, and not the style guide itself.
|
|
17528
|
+
* @maxItems 3
|
|
17529
|
+
* @minItems 1
|
|
17530
|
+
*/
|
|
17531
|
+
spaces: string[];
|
|
17532
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
17533
|
+
/** A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each. */
|
|
17534
|
+
run: SiteStyleguideRun;
|
|
17535
|
+
/** The change requests opened by the run, one per space that could be started. */
|
|
17536
|
+
changeRequests: ChangeRequest[];
|
|
17537
|
+
}, {
|
|
17538
|
+
error: {
|
|
17539
|
+
/** @format int32 */
|
|
17540
|
+
code: 404;
|
|
17541
|
+
message: string;
|
|
17542
|
+
};
|
|
17543
|
+
}>>;
|
|
17544
|
+
/**
|
|
17545
|
+
* @description Returns the site's style guide check runs, most recent first. Use the `styleguideRun` filter on the organization change requests endpoint to get the change requests a run opened.
|
|
17546
|
+
*
|
|
17547
|
+
* @tags sites
|
|
17548
|
+
* @name ListSiteStyleguideRuns
|
|
17549
|
+
* @summary List the style guide check runs of a site
|
|
17550
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/styleguide/runs
|
|
17551
|
+
* @secure
|
|
17552
|
+
*/
|
|
17553
|
+
listSiteStyleguideRuns: (organizationId: EntityId, siteId: string, query?: {
|
|
17554
|
+
/** Identifier of the page results to fetch. */
|
|
17555
|
+
page?: string;
|
|
17556
|
+
/**
|
|
17557
|
+
* The number of results per page
|
|
17558
|
+
* @min 0
|
|
17559
|
+
* @max 1000
|
|
17560
|
+
*/
|
|
17561
|
+
limit?: number;
|
|
17562
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
17563
|
+
items: SiteStyleguideRun[];
|
|
17564
|
+
}, any>>;
|
|
17217
17565
|
/**
|
|
17218
17566
|
* No description
|
|
17219
17567
|
*
|
|
@@ -17284,6 +17632,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17284
17632
|
* @default false
|
|
17285
17633
|
*/
|
|
17286
17634
|
draft?: boolean;
|
|
17635
|
+
/**
|
|
17636
|
+
* Whether the redirect is permanent for public live traffic.
|
|
17637
|
+
* @default false
|
|
17638
|
+
*/
|
|
17639
|
+
permanent?: boolean;
|
|
17287
17640
|
destination: SiteRedirectInputDestination;
|
|
17288
17641
|
}, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
|
|
17289
17642
|
/**
|
|
@@ -17320,6 +17673,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17320
17673
|
* @default false
|
|
17321
17674
|
*/
|
|
17322
17675
|
captureWildcard?: boolean;
|
|
17676
|
+
/** Whether the redirect is permanent for public live traffic. */
|
|
17677
|
+
permanent?: boolean;
|
|
17323
17678
|
/** If set to null, the redirect matching the source+intent target will be deleted. */
|
|
17324
17679
|
destination: SiteRedirectInputDestination | null;
|
|
17325
17680
|
})[];
|
|
@@ -17415,6 +17770,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17415
17770
|
captureWildcard?: boolean;
|
|
17416
17771
|
/** When true, it can be used to promote a draft redirect to live. */
|
|
17417
17772
|
draft?: boolean;
|
|
17773
|
+
/** Whether the redirect is permanent for public live traffic. */
|
|
17774
|
+
permanent?: boolean;
|
|
17418
17775
|
destination?: SiteRedirectDestination;
|
|
17419
17776
|
}, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
|
|
17420
17777
|
/**
|