@gitbook/api 0.202.0 → 0.204.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 +768 -52
- package/dist/constants.d.ts +10 -7
- package/dist/index.cjs +126 -12
- package/dist/index.js +120 -12
- package/package.json +1 -1
- package/spec/openapi.json +2229 -54
- package/spec/openapi.yaml +1588 -44
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What became of a background agent.
|
|
3
|
+
* `running` while it works, `completed` when it reported its result, `failed` when it crashed without recovering or its request was refused, and `stopped` when someone stopped it.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum AgentBackgroundAgentStatus {
|
|
6
|
+
Running = "running",
|
|
7
|
+
Completed = "completed",
|
|
8
|
+
Failed = "failed",
|
|
9
|
+
Stopped = "stopped"
|
|
10
|
+
}
|
|
1
11
|
/**
|
|
2
12
|
* Steering on how far an agent should reach when it changes content.
|
|
3
13
|
* 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).
|
|
@@ -100,7 +110,8 @@ export declare enum RevisionSemanticChangeType {
|
|
|
100
110
|
}
|
|
101
111
|
/** Predefined GitBook user identifiers */
|
|
102
112
|
export declare enum GitBookUsers {
|
|
103
|
-
GitbookAgent = "gitbook:agent"
|
|
113
|
+
GitbookAgent = "gitbook:agent",
|
|
114
|
+
GitbookGitsync = "gitbook:gitsync"
|
|
104
115
|
}
|
|
105
116
|
/** The Cloudflare Hostname TLS validation method */
|
|
106
117
|
export declare enum CloudflareHostnameTLSValidationMethod {
|
|
@@ -171,6 +182,7 @@ export declare enum SiteRedirectOrderBy {
|
|
|
171
182
|
Source = "source"
|
|
172
183
|
}
|
|
173
184
|
export declare enum SiteInsightsQueryRangePreset {
|
|
185
|
+
YearToDate = "yearToDate",
|
|
174
186
|
LastYear = "lastYear",
|
|
175
187
|
Last3Months = "last3Months",
|
|
176
188
|
Last30Days = "last30Days",
|
|
@@ -224,7 +236,15 @@ export declare enum SiteInsightsVisitorBot {
|
|
|
224
236
|
MetaAds = "meta-ads",
|
|
225
237
|
Duckassist = "duckassist",
|
|
226
238
|
AmznSearchbot = "amzn-searchbot",
|
|
227
|
-
AmznUser = "amzn-user"
|
|
239
|
+
AmznUser = "amzn-user",
|
|
240
|
+
OtherBot = "other-bot",
|
|
241
|
+
Parallel = "parallel",
|
|
242
|
+
Exa = "exa",
|
|
243
|
+
Linkup = "linkup",
|
|
244
|
+
VertexAi = "vertex-ai",
|
|
245
|
+
Atlassian = "atlassian",
|
|
246
|
+
Kapa = "kapa",
|
|
247
|
+
Bedrock = "bedrock"
|
|
228
248
|
}
|
|
229
249
|
export declare enum SiteInsightsVisitorOS {
|
|
230
250
|
Windows = "windows",
|
|
@@ -260,6 +280,7 @@ export declare enum SiteInsightsEventType {
|
|
|
260
280
|
AgentFeedback = "agent_feedback",
|
|
261
281
|
AskQuestion = "ask_question",
|
|
262
282
|
AskView = "ask_view",
|
|
283
|
+
AskTriggerClick = "ask_trigger_click",
|
|
263
284
|
AskRateResponse = "ask_rate_response",
|
|
264
285
|
LinkClick = "link_click",
|
|
265
286
|
ApiClientOpen = "api_client_open",
|
|
@@ -370,6 +391,25 @@ export declare enum ContextSearchBoost {
|
|
|
370
391
|
X10 = "x1.0",
|
|
371
392
|
X12 = "x1.2"
|
|
372
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* Why an AI task was skipped before execution.
|
|
396
|
+
*
|
|
397
|
+
* - `ai_unavailable_for_organization`: The organization's effective plan does not include AI or a
|
|
398
|
+
* required feature. Takes precedence when both the organization and site plans block the task.
|
|
399
|
+
* - `ai_unavailable_for_site`: The site's effective plan does not include the required feature.
|
|
400
|
+
* The site's applied plan takes precedence over its own plan.
|
|
401
|
+
* - `ai_paused`: AI usage is temporarily paused by automatic usage controls.
|
|
402
|
+
* - `ai_disabled`: AI or a required AI feature has been turned off in the organization's settings.
|
|
403
|
+
* - `ai_restricted`: AI is blocked by GitBook or a contractual restriction and cannot be enabled
|
|
404
|
+
* through organization settings.
|
|
405
|
+
*/
|
|
406
|
+
export declare enum AISkipReason {
|
|
407
|
+
AiUnavailableForOrganization = "ai_unavailable_for_organization",
|
|
408
|
+
AiUnavailableForSite = "ai_unavailable_for_site",
|
|
409
|
+
AiDisabled = "ai_disabled",
|
|
410
|
+
AiRestricted = "ai_restricted",
|
|
411
|
+
AiPaused = "ai_paused"
|
|
412
|
+
}
|
|
373
413
|
/** 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. */
|
|
374
414
|
export declare enum ContextConnectionFailureReason {
|
|
375
415
|
Authentication = "authentication",
|
|
@@ -382,7 +422,8 @@ export declare enum ContextConnectionStatus {
|
|
|
382
422
|
Pending = "pending",
|
|
383
423
|
Syncing = "syncing",
|
|
384
424
|
Succeeded = "succeeded",
|
|
385
|
-
Failed = "failed"
|
|
425
|
+
Failed = "failed",
|
|
426
|
+
Skipped = "skipped"
|
|
386
427
|
}
|
|
387
428
|
/** Type classification of the user question. */
|
|
388
429
|
export declare enum SiteQuestionType {
|
|
@@ -393,13 +434,14 @@ export declare enum SiteQuestionType {
|
|
|
393
434
|
Unknown = "unknown"
|
|
394
435
|
}
|
|
395
436
|
/**
|
|
396
|
-
* The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `sources` returns the findings with the most linked sources (questions plus records) first. Defaults to 'updatedAt'.
|
|
437
|
+
* The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `sources` returns the findings with the most linked sources (questions plus records) first. `suggestedFix` is for link findings: those that come with a fix (a suggested redirect, or an outbound link to correct) come before broken URLs the audit found no page for, most severe first within each group. Other finding types sort with the second group. Defaults to 'updatedAt'.
|
|
397
438
|
* @default "updatedAt"
|
|
398
439
|
*/
|
|
399
440
|
export declare enum SiteFindingOrderBy {
|
|
400
441
|
UpdatedAt = "updatedAt",
|
|
401
442
|
Severity = "severity",
|
|
402
|
-
Sources = "sources"
|
|
443
|
+
Sources = "sources",
|
|
444
|
+
SuggestedFix = "suggestedFix"
|
|
403
445
|
}
|
|
404
446
|
/** Findings source filter matching evidence coming from site questions. */
|
|
405
447
|
export declare enum SiteTriageFilterQuestions {
|
|
@@ -457,6 +499,11 @@ export declare enum AgentFeedbackSource {
|
|
|
457
499
|
Mcp = "mcp",
|
|
458
500
|
Assistant = "assistant"
|
|
459
501
|
}
|
|
502
|
+
/** Whether the member is part of the change request, or a tombstone kept so that a member removed and later re-added keeps its identity, comments and history. */
|
|
503
|
+
export declare enum SiteChangeRequestMemberStatus {
|
|
504
|
+
Active = "active",
|
|
505
|
+
Removed = "removed"
|
|
506
|
+
}
|
|
460
507
|
/** The platform of the social handle. */
|
|
461
508
|
export declare enum SiteSocialAccountPlatform {
|
|
462
509
|
Twitter = "twitter",
|
|
@@ -744,6 +791,7 @@ export declare enum SAMLProviderStatus {
|
|
|
744
791
|
/** An organization feature used for plan access and upgrade prompts. */
|
|
745
792
|
export declare enum OrganizationFeature {
|
|
746
793
|
MaxMembers = "max-members",
|
|
794
|
+
Ai = "ai",
|
|
747
795
|
AiLens = "ai-lens",
|
|
748
796
|
PdfExport = "pdf-export",
|
|
749
797
|
AiWriting = "ai-writing",
|
|
@@ -871,6 +919,7 @@ export declare enum SiteFeatureKey {
|
|
|
871
919
|
SitesSections = "sites-sections",
|
|
872
920
|
SitesSeo = "sites-seo",
|
|
873
921
|
SitesShareLinks = "sites-share-links",
|
|
922
|
+
SitesStyleGuide = "sites-style-guide",
|
|
874
923
|
SitesUnlistedVisibility = "sites-unlisted-visibility",
|
|
875
924
|
SitesUserContribution = "sites-user-contribution",
|
|
876
925
|
SitesVisitorAuthentication = "sites-visitor-authentication",
|
|
@@ -940,10 +989,10 @@ export declare enum BillingTrialStatus {
|
|
|
940
989
|
/** The AI credit bundle to top up every month */
|
|
941
990
|
export declare enum BillingCreditsBundle {
|
|
942
991
|
None = "none",
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
992
|
+
Value4750250 = "4750_250",
|
|
993
|
+
Value90001000 = "9000_1000",
|
|
994
|
+
Value127502250 = "12750_2250",
|
|
995
|
+
Value3000010000 = "30000_10000"
|
|
947
996
|
}
|
|
948
997
|
/** Interval for a billing subscription */
|
|
949
998
|
export declare enum BillingInterval {
|
|
@@ -1456,6 +1505,8 @@ export interface GitSyncState {
|
|
|
1456
1505
|
parentInstallationId?: string;
|
|
1457
1506
|
/** The URL to the repository tree, used when rendering public content. */
|
|
1458
1507
|
url?: string;
|
|
1508
|
+
/** Directory in the repository this content syncs from, resolved against the parent installation when the installation is managed by a site. Absent when the content syncs from the root of the repository. */
|
|
1509
|
+
installationProjectDirectory?: string;
|
|
1459
1510
|
/** The latest operation on the Git Sync installation. */
|
|
1460
1511
|
operation?: {
|
|
1461
1512
|
/**
|
|
@@ -1478,6 +1529,11 @@ export interface GitSyncState {
|
|
|
1478
1529
|
/** When the Git provider details were last updated */
|
|
1479
1530
|
updatedAt?: Timestamp;
|
|
1480
1531
|
}
|
|
1532
|
+
/** What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation. */
|
|
1533
|
+
export interface PreviousGitSyncState {
|
|
1534
|
+
/** The URL to the directory of the repository tree the content synced with before its Git Sync installation was removed, at the branch it synced. */
|
|
1535
|
+
url: string;
|
|
1536
|
+
}
|
|
1481
1537
|
export type ContentImportSource = {
|
|
1482
1538
|
type: "website";
|
|
1483
1539
|
url: URL;
|
|
@@ -1622,6 +1678,8 @@ export interface Space {
|
|
|
1622
1678
|
parent?: string;
|
|
1623
1679
|
language?: TranslationLanguage;
|
|
1624
1680
|
gitSync?: GitSyncState;
|
|
1681
|
+
/** What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation. */
|
|
1682
|
+
previousGitSync?: PreviousGitSyncState;
|
|
1625
1683
|
/** Import runs targeting this space, still running or ended recently, most recent first. Only returned when fetching a single space. */
|
|
1626
1684
|
imports?: ContentImportRun[];
|
|
1627
1685
|
visitorAuth?: VisitorAuth;
|
|
@@ -2847,6 +2905,11 @@ export type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
2847
2905
|
/** Complete path to access the page in the revision. */
|
|
2848
2906
|
path: string;
|
|
2849
2907
|
description?: string;
|
|
2908
|
+
/**
|
|
2909
|
+
* Optional title for the page's HTML `<title>` tag. When set, it replaces the page title in the composed `<title>` (`<tagTitle || title> | <section> | <site>`), while the page's visible heading and navigation title remain unchanged. Use this when the search result or browser tab should use a different title from the page itself.
|
|
2910
|
+
* @maxLength 100
|
|
2911
|
+
*/
|
|
2912
|
+
tagTitle?: string;
|
|
2850
2913
|
pages: (RevisionPageDocument | RevisionPageLink | RevisionPageComputed)[];
|
|
2851
2914
|
git?: GitSyncBlob;
|
|
2852
2915
|
layout: RevisionPageLayoutOptions;
|
|
@@ -3232,7 +3295,7 @@ export interface ChangeRequestLinkInput {
|
|
|
3232
3295
|
/** External ticket data resolved for this link by a configured connector. */
|
|
3233
3296
|
export type ChangeRequestLinkExpanded = {
|
|
3234
3297
|
kind: "external-ticket";
|
|
3235
|
-
provider: "jira";
|
|
3298
|
+
provider: "jira" | "linear";
|
|
3236
3299
|
state: "connected";
|
|
3237
3300
|
/** The ticket's provider-specific key. */
|
|
3238
3301
|
key: string;
|
|
@@ -3249,12 +3312,14 @@ export type ChangeRequestLinkExpanded = {
|
|
|
3249
3312
|
summary: string;
|
|
3250
3313
|
} | {
|
|
3251
3314
|
kind: "external-ticket";
|
|
3252
|
-
provider: "jira";
|
|
3315
|
+
provider: "jira" | "linear";
|
|
3253
3316
|
state: "error";
|
|
3254
3317
|
};
|
|
3255
3318
|
export type ChangeRequestLink = ChangeRequestLinkInput & {
|
|
3256
3319
|
/** The ID of the link. */
|
|
3257
3320
|
id: string;
|
|
3321
|
+
/** Whether this link owns synchronization with the external issue. Other links are references only. */
|
|
3322
|
+
isSyncing: boolean;
|
|
3258
3323
|
/** External ticket data resolved for this link by a configured connector. */
|
|
3259
3324
|
expanded?: ChangeRequestLinkExpanded;
|
|
3260
3325
|
};
|
|
@@ -3293,15 +3358,25 @@ export interface ChangeRequest {
|
|
|
3293
3358
|
revisionMerged?: string;
|
|
3294
3359
|
/** Count of opened comments on the change request. */
|
|
3295
3360
|
comments: number;
|
|
3296
|
-
/** Site
|
|
3361
|
+
/** Site topic the change request was created from, when it came from one. */
|
|
3297
3362
|
siteTopic?: {
|
|
3298
3363
|
/** ID of the site associated with the change request. */
|
|
3299
3364
|
site: string;
|
|
3300
3365
|
/** ID of the site topic associated with the change request. */
|
|
3301
3366
|
topic: string;
|
|
3302
|
-
/**
|
|
3367
|
+
/**
|
|
3368
|
+
* ID of the site finding the change request fixes. Use `siteFinding` instead: a change request can fix a finding without belonging to a topic, and this field is absent in that case.
|
|
3369
|
+
* @deprecated
|
|
3370
|
+
*/
|
|
3303
3371
|
finding?: string;
|
|
3304
3372
|
};
|
|
3373
|
+
/** Site finding the change request fixes, when it is linked to one. Merging the change request resolves the finding, once every change request linked to it is merged. */
|
|
3374
|
+
siteFinding?: {
|
|
3375
|
+
/** ID of the site the finding belongs to. */
|
|
3376
|
+
site: string;
|
|
3377
|
+
/** ID of the site finding the change request fixes. */
|
|
3378
|
+
finding: string;
|
|
3379
|
+
};
|
|
3305
3380
|
/** Style guide check that opened the change request, when it came from one. A check can be run again on the change request already open on a space, rather than opening a second one, so several checks can share a change request. */
|
|
3306
3381
|
styleguide?: {
|
|
3307
3382
|
/** ID of the site the style guide belongs to. */
|
|
@@ -3486,6 +3561,8 @@ export interface ChangeRequestReview {
|
|
|
3486
3561
|
location: string;
|
|
3487
3562
|
};
|
|
3488
3563
|
}
|
|
3564
|
+
/** Exact review totals for the applied filters, independent of pagination. Keyed by review status, with a count of zero for a status nobody used. */
|
|
3565
|
+
export type ChangeRequestReviewStats = Record<ChangeRequestReviewStatus, number>;
|
|
3489
3566
|
export interface Team {
|
|
3490
3567
|
/** Type of Object, always equals to "team" */
|
|
3491
3568
|
object: "team";
|
|
@@ -3596,6 +3673,16 @@ export interface RevisionPageUpdate {
|
|
|
3596
3673
|
icon?: Icon;
|
|
3597
3674
|
/** Description of the page. */
|
|
3598
3675
|
description?: string;
|
|
3676
|
+
/**
|
|
3677
|
+
* Optional custom title used for the page in the table of contents and mentions instead of its page title. Set to an empty string to remove it.
|
|
3678
|
+
* @maxLength 100
|
|
3679
|
+
*/
|
|
3680
|
+
linkTitle?: string;
|
|
3681
|
+
/**
|
|
3682
|
+
* Optional title for the page's HTML `<title>` tag. When set, it replaces the page title in the composed `<title>` (`<tagTitle || title> | <section> | <site>`), while the page's visible heading and navigation title remain unchanged. Use this when the search result or browser tab should use a different title from the page itself. Set to an empty string to remove it.
|
|
3683
|
+
* @maxLength 100
|
|
3684
|
+
*/
|
|
3685
|
+
tagTitle?: string;
|
|
3599
3686
|
/** If true, the page is not displayed in the navigation, while still being accessible. */
|
|
3600
3687
|
hidden?: boolean;
|
|
3601
3688
|
/** If true, the page is not indexable in the search and ask features. */
|
|
@@ -4049,6 +4136,28 @@ export interface SitePointer {
|
|
|
4049
4136
|
}
|
|
4050
4137
|
/** The default content for the organization */
|
|
4051
4138
|
export type OrganizationDefaultContent = SitePointer;
|
|
4139
|
+
/** An AI credit threshold from 5% to 50%, or null when disabled. */
|
|
4140
|
+
export type AICreditThreshold = number | null;
|
|
4141
|
+
/** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4142
|
+
export interface OrganizationAISettings {
|
|
4143
|
+
/** Whether AI features are automatically paused because credits are low. */
|
|
4144
|
+
aiPaused?: boolean;
|
|
4145
|
+
"ai-agent"?: false;
|
|
4146
|
+
"ai-assistant"?: false;
|
|
4147
|
+
"ai-broken-links"?: false;
|
|
4148
|
+
"ai-content-gap"?: false;
|
|
4149
|
+
"ai-insight"?: false;
|
|
4150
|
+
"ai-import"?: false;
|
|
4151
|
+
"ai-platform"?: false;
|
|
4152
|
+
"ai-style-guide"?: false;
|
|
4153
|
+
"ai-translation"?: false;
|
|
4154
|
+
/** An AI credit threshold from 5% to 50%, or null when disabled. */
|
|
4155
|
+
aiCreditAlertThreshold?: AICreditThreshold;
|
|
4156
|
+
/** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
|
|
4157
|
+
aiCreditPauseEnabled?: boolean;
|
|
4158
|
+
aiAlertNotificationAlertId?: string;
|
|
4159
|
+
aiPauseNotificationAlertId?: string;
|
|
4160
|
+
}
|
|
4052
4161
|
/** Pricing pair for monthly and yearly intervals */
|
|
4053
4162
|
export interface OrganizationPricePair {
|
|
4054
4163
|
/**
|
|
@@ -4121,11 +4230,43 @@ export interface OrganizationBilling {
|
|
|
4121
4230
|
canChangeInterval: boolean;
|
|
4122
4231
|
/** Whether configuring SAML is allowed */
|
|
4123
4232
|
canUseSAML: boolean;
|
|
4233
|
+
/** Whether AI can be enabled for the organization */
|
|
4234
|
+
canUseAI: boolean;
|
|
4124
4235
|
/** The AI credit bundle the organization tops up every month, or null when the organization is not billed for AI usage. `none` means pay as you go. */
|
|
4125
4236
|
creditsBundle: BillingCreditsBundle | null;
|
|
4126
|
-
/**
|
|
4127
|
-
|
|
4237
|
+
/** The yearly AI credit allowance agreed in the organization's contract, or null when none is set. */
|
|
4238
|
+
aiCreditAllowance: number | null;
|
|
4239
|
+
/**
|
|
4240
|
+
* The percentage of unused paid bundle credits carried over to the next monthly AI billing period.
|
|
4241
|
+
* @min 0
|
|
4242
|
+
* @max 100
|
|
4243
|
+
*/
|
|
4244
|
+
aiCreditRollover: number;
|
|
4128
4245
|
}
|
|
4246
|
+
/** What support costs the organization, per ticket or per hour of agent time, used to estimate how much AI answers save in site insights. */
|
|
4247
|
+
export type OrganizationSupportCost = {
|
|
4248
|
+
/**
|
|
4249
|
+
* Cost of one support ticket, in `currency`.
|
|
4250
|
+
* @min 0.01
|
|
4251
|
+
*/
|
|
4252
|
+
perTicket: number;
|
|
4253
|
+
/**
|
|
4254
|
+
* ISO 4217 currency code.
|
|
4255
|
+
* @pattern ^[A-Z]{3}$
|
|
4256
|
+
*/
|
|
4257
|
+
currency: string;
|
|
4258
|
+
} | {
|
|
4259
|
+
/**
|
|
4260
|
+
* Cost of one hour of support agent time, in `currency`.
|
|
4261
|
+
* @min 0.01
|
|
4262
|
+
*/
|
|
4263
|
+
perHour: number;
|
|
4264
|
+
/**
|
|
4265
|
+
* ISO 4217 currency code.
|
|
4266
|
+
* @pattern ^[A-Z]{3}$
|
|
4267
|
+
*/
|
|
4268
|
+
currency: string;
|
|
4269
|
+
};
|
|
4129
4270
|
/**
|
|
4130
4271
|
* A short description giving context on the reason for the block.
|
|
4131
4272
|
* @minLength 1
|
|
@@ -4154,6 +4295,8 @@ export interface Organization {
|
|
|
4154
4295
|
sso?: boolean;
|
|
4155
4296
|
/** If true, the organization is configured to use all our AI features. */
|
|
4156
4297
|
ai?: boolean;
|
|
4298
|
+
/** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4299
|
+
aiSettings?: OrganizationAISettings;
|
|
4157
4300
|
/** If true, invite links are enabled for this organization. */
|
|
4158
4301
|
inviteLinks: boolean;
|
|
4159
4302
|
/** Whether audit logs can currently be accessed for this organization. */
|
|
@@ -4163,6 +4306,8 @@ export interface Organization {
|
|
|
4163
4306
|
/** Billing details, only available for org members. */
|
|
4164
4307
|
billing?: OrganizationBilling;
|
|
4165
4308
|
mergeRules: MergeRulesStandaloneConfiguration;
|
|
4309
|
+
/** Support cost set by the organization, only available for org members. */
|
|
4310
|
+
supportCost?: OrganizationSupportCost;
|
|
4166
4311
|
/** URLs associated with the object */
|
|
4167
4312
|
urls: {
|
|
4168
4313
|
/**
|
|
@@ -5421,6 +5566,57 @@ export interface CreateOrganization {
|
|
|
5421
5566
|
/** Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true. */
|
|
5422
5567
|
onboardingPreferences?: SiteOnboardingPreferences;
|
|
5423
5568
|
}
|
|
5569
|
+
/** The current or last trial of an organization. */
|
|
5570
|
+
export interface SubscriptionTrial {
|
|
5571
|
+
/** - notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do. */
|
|
5572
|
+
status: BillingTrialStatus;
|
|
5573
|
+
/** When the trial ends, or ended. */
|
|
5574
|
+
endDate: Timestamp;
|
|
5575
|
+
/** Days left in the trial, rounded up, so 1 is its last day. 0 once it has ended. */
|
|
5576
|
+
daysRemaining: number;
|
|
5577
|
+
}
|
|
5578
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
5579
|
+
export interface SubscriptionNotice {
|
|
5580
|
+
/** - trial_started, the operation started the organization's trial. - trial_countdown, the organization's trial ends soon. - checkout_required, the operation needs a paid plan to complete. */
|
|
5581
|
+
type: "trial_started" | "trial_countdown" | "checkout_required";
|
|
5582
|
+
/** What the user was doing when the notice was given. */
|
|
5583
|
+
context: "trial_started" | "site_publishing" | "site_features" | "site_customization";
|
|
5584
|
+
/** Whether the organization is on a trial, the free plan, or a paid plan. */
|
|
5585
|
+
commercialStatus: "trial" | "free" | "paid";
|
|
5586
|
+
/** Message to show the user. For users who cannot upgrade, it asks them to reach out to an administrator of the organization. */
|
|
5587
|
+
message: string;
|
|
5588
|
+
/** The current or last trial of an organization. */
|
|
5589
|
+
trial?: SubscriptionTrial;
|
|
5590
|
+
/** Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade. */
|
|
5591
|
+
canManageBilling: boolean;
|
|
5592
|
+
/** Where to upgrade in the application. Only set when `canManageBilling` is true. */
|
|
5593
|
+
upgradeUrl?: URL;
|
|
5594
|
+
/** Public page comparing the GitBook plans. */
|
|
5595
|
+
pricingUrl: URL;
|
|
5596
|
+
}
|
|
5597
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5598
|
+
export type OptOutUpdate = false | null;
|
|
5599
|
+
/** Partial AI preference update. Omitted keys are unchanged; null removes an opt-out. */
|
|
5600
|
+
export interface OrganizationAISettingsUpdate {
|
|
5601
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5602
|
+
"ai-agent"?: OptOutUpdate;
|
|
5603
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5604
|
+
"ai-assistant"?: OptOutUpdate;
|
|
5605
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5606
|
+
"ai-broken-links"?: OptOutUpdate;
|
|
5607
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5608
|
+
"ai-content-gap"?: OptOutUpdate;
|
|
5609
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5610
|
+
"ai-insight"?: OptOutUpdate;
|
|
5611
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5612
|
+
"ai-import"?: OptOutUpdate;
|
|
5613
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5614
|
+
"ai-platform"?: OptOutUpdate;
|
|
5615
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5616
|
+
"ai-style-guide"?: OptOutUpdate;
|
|
5617
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5618
|
+
"ai-translation"?: OptOutUpdate;
|
|
5619
|
+
}
|
|
5424
5620
|
/**
|
|
5425
5621
|
* Title of the site section
|
|
5426
5622
|
* @minLength 2
|
|
@@ -5609,6 +5805,13 @@ export interface AuditEventActor {
|
|
|
5609
5805
|
id: string;
|
|
5610
5806
|
/** Display label captured when the event was recorded. */
|
|
5611
5807
|
label?: string;
|
|
5808
|
+
/** GitBook staff member acting as this user. Present only for recorded impersonation; older events may not have this information. The actor ID remains the effective user for filtering. */
|
|
5809
|
+
impersonator?: {
|
|
5810
|
+
/** Stable ID of the impersonating staff member. */
|
|
5811
|
+
id: string;
|
|
5812
|
+
/** Staff display name captured when the event was recorded, if available. */
|
|
5813
|
+
label?: string;
|
|
5814
|
+
};
|
|
5612
5815
|
}
|
|
5613
5816
|
export interface AuditEventTarget {
|
|
5614
5817
|
/** Kind of resource affected by the change. */
|
|
@@ -5683,6 +5886,28 @@ export interface StyleguideTemplate {
|
|
|
5683
5886
|
export interface StyleguideTemplates {
|
|
5684
5887
|
templates: StyleguideTemplate[];
|
|
5685
5888
|
}
|
|
5889
|
+
/** An organization's subscription, as needed to tell a user their plan, trial and how to upgrade. */
|
|
5890
|
+
export interface OrganizationSubscription {
|
|
5891
|
+
/** Type of Object, always equals to "organization-subscription" */
|
|
5892
|
+
object: "organization-subscription";
|
|
5893
|
+
/** Whether the organization is on a trial, the free plan, or a paid plan. */
|
|
5894
|
+
status: "trial" | "free" | "paid";
|
|
5895
|
+
/** The plan in effect, which is the trial's plan while trialing. */
|
|
5896
|
+
plan: {
|
|
5897
|
+
/** Name of the product */
|
|
5898
|
+
id: BillingProduct;
|
|
5899
|
+
/** Name of the plan shown to users, e.g. Pro. */
|
|
5900
|
+
title: string;
|
|
5901
|
+
};
|
|
5902
|
+
/** The current or last trial. Absent when the organization never had one. */
|
|
5903
|
+
trial?: SubscriptionTrial;
|
|
5904
|
+
/** Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade. */
|
|
5905
|
+
canManageBilling: boolean;
|
|
5906
|
+
/** Where to upgrade in the application. Only set when `canManageBilling` is true. */
|
|
5907
|
+
upgradeUrl?: URL;
|
|
5908
|
+
/** Public page comparing the GitBook plans. */
|
|
5909
|
+
pricingUrl: URL;
|
|
5910
|
+
}
|
|
5686
5911
|
/** Permission of a member in a content. */
|
|
5687
5912
|
export interface MemberContentPermission {
|
|
5688
5913
|
/**
|
|
@@ -5946,9 +6171,11 @@ export interface BillingInvoicePreview {
|
|
|
5946
6171
|
adjustments: BillingInvoiceAdjustment[];
|
|
5947
6172
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
5948
6173
|
creditGrants: {
|
|
5949
|
-
/** Where the credits come from. `paid` is the credits the monthly bundle pays for, `bonus` the ones included with it, `site` the allowance of the organization's published paid sites, and `rollover` what was left of the previous period. */
|
|
5950
|
-
type: "paid" | "bonus" | "site" | "rollover";
|
|
5951
|
-
/**
|
|
6174
|
+
/** Where the credits come from. `paid` is the credits the monthly bundle pays for, `bonus` the ones included with it, `site` the allowance of the organization's published paid sites, and `rollover` what was left of the previous period. `custom` is a grant created outside GitBook. */
|
|
6175
|
+
type: "paid" | "bonus" | "site" | "rollover" | "custom";
|
|
6176
|
+
/** Stripe spending priority. Lower values are consumed first. */
|
|
6177
|
+
priority?: number;
|
|
6178
|
+
/** Credits available from this grant before the current invoice usage. */
|
|
5952
6179
|
grantedCredits: number;
|
|
5953
6180
|
/** Credits of the grant spent by the usage metered so far. */
|
|
5954
6181
|
usedCredits: number;
|
|
@@ -5978,7 +6205,7 @@ export interface BillingInvoicePreview {
|
|
|
5978
6205
|
coveredAmount: number;
|
|
5979
6206
|
/** The credits the organization pays for. */
|
|
5980
6207
|
paid: BillingCreditsTotals;
|
|
5981
|
-
/** The
|
|
6208
|
+
/** The bonus, site and custom credits. */
|
|
5982
6209
|
free: BillingCreditsTotals;
|
|
5983
6210
|
/** The credits of the monthly bundle, both paid and bonus. */
|
|
5984
6211
|
bundle: BillingCreditsTotals;
|
|
@@ -6024,16 +6251,18 @@ export interface Credits {
|
|
|
6024
6251
|
coveredAmount: number;
|
|
6025
6252
|
/** The credits the organization pays for. */
|
|
6026
6253
|
paid: BillingCreditsTotals;
|
|
6027
|
-
/** The
|
|
6254
|
+
/** The bonus, site and custom credits. */
|
|
6028
6255
|
free: BillingCreditsTotals;
|
|
6029
6256
|
/** The credits of the monthly bundle, both paid and bonus. */
|
|
6030
6257
|
bundle: BillingCreditsTotals;
|
|
6031
6258
|
}
|
|
6032
6259
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6033
6260
|
export type CreditGrants = {
|
|
6034
|
-
/** Where the credits come from. `paid` is the credits the monthly bundle pays for, `bonus` the ones included with it, `site` the allowance of the organization's published paid sites, and `rollover` what was left of the previous period. */
|
|
6035
|
-
type: "paid" | "bonus" | "site" | "rollover";
|
|
6036
|
-
/**
|
|
6261
|
+
/** Where the credits come from. `paid` is the credits the monthly bundle pays for, `bonus` the ones included with it, `site` the allowance of the organization's published paid sites, and `rollover` what was left of the previous period. `custom` is a grant created outside GitBook. */
|
|
6262
|
+
type: "paid" | "bonus" | "site" | "rollover" | "custom";
|
|
6263
|
+
/** Stripe spending priority. Lower values are consumed first. */
|
|
6264
|
+
priority?: number;
|
|
6265
|
+
/** Credits available from this grant before the current invoice usage. */
|
|
6037
6266
|
grantedCredits: number;
|
|
6038
6267
|
/** Credits of the grant spent by the usage metered so far. */
|
|
6039
6268
|
usedCredits: number;
|
|
@@ -6361,6 +6590,8 @@ export interface SearchAIAnswerSourcePage {
|
|
|
6361
6590
|
revision: string;
|
|
6362
6591
|
/** The space ID owning the page. */
|
|
6363
6592
|
space: string;
|
|
6593
|
+
/** The title of the page, as of `revision`. */
|
|
6594
|
+
title: string;
|
|
6364
6595
|
/** The IDs of the sections of the page that were used to answer the question. */
|
|
6365
6596
|
sections: string[];
|
|
6366
6597
|
}
|
|
@@ -6822,6 +7053,11 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
|
6822
7053
|
location: string;
|
|
6823
7054
|
};
|
|
6824
7055
|
};
|
|
7056
|
+
/** Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions. */
|
|
7057
|
+
export type SiteAdaptiveRegions = Record<any, {
|
|
7058
|
+
/** ISO 3166-1 alpha-2 codes of the countries in the region. */
|
|
7059
|
+
countries: ("AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW")[];
|
|
7060
|
+
}>;
|
|
6825
7061
|
export type SiteAdaptiveDeterministicJSONSchemaPrimitives = {
|
|
6826
7062
|
type: "boolean";
|
|
6827
7063
|
description: string;
|
|
@@ -6847,8 +7083,10 @@ export type SiteAdaptiveJSONSchemaClaimsProperties = SiteAdaptiveJSONSchemaPrimi
|
|
|
6847
7083
|
properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
|
|
6848
7084
|
additionalProperties: false;
|
|
6849
7085
|
};
|
|
6850
|
-
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
6851
|
-
export interface
|
|
7086
|
+
/** JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from. */
|
|
7087
|
+
export interface SiteAdaptiveJSONSchemaWithRegions {
|
|
7088
|
+
/** Groups of countries exposed to adaptive content as `visitor.region`. The key of each entry is the region name; `visitor.region` is undefined for a visitor whose country is in none of the regions. A site can declare at most 10 regions. */
|
|
7089
|
+
regions?: SiteAdaptiveRegions;
|
|
6852
7090
|
$schema?: "http://json-schema.org/draft-07/schema#";
|
|
6853
7091
|
type: "object";
|
|
6854
7092
|
properties: {
|
|
@@ -6865,8 +7103,8 @@ export interface SiteAdaptiveJSONSchema {
|
|
|
6865
7103
|
}
|
|
6866
7104
|
export interface SiteAdaptiveSchema {
|
|
6867
7105
|
object: "site-adaptive-schema";
|
|
6868
|
-
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
6869
|
-
jsonSchema:
|
|
7106
|
+
/** JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from. */
|
|
7107
|
+
jsonSchema: SiteAdaptiveJSONSchemaWithRegions;
|
|
6870
7108
|
/** When the adaptive schema was updated. */
|
|
6871
7109
|
updatedAt: Timestamp;
|
|
6872
7110
|
}
|
|
@@ -7174,6 +7412,89 @@ export interface PublishedContentSite {
|
|
|
7174
7412
|
};
|
|
7175
7413
|
scripts: SiteIntegrationScript[];
|
|
7176
7414
|
}
|
|
7415
|
+
/** State shared by every resource changed by a site change request. Each resource is versioned independently; the change request reviews and merges them as one. */
|
|
7416
|
+
export interface SiteChangeRequestMember {
|
|
7417
|
+
object: "site-change-request-member";
|
|
7418
|
+
/** Unique identifier for the member */
|
|
7419
|
+
id: string;
|
|
7420
|
+
/** Whether the member is part of the change request, or a tombstone kept so that a member removed and later re-added keeps its identity, comments and history. */
|
|
7421
|
+
status: SiteChangeRequestMemberStatus;
|
|
7422
|
+
createdAt: Timestamp;
|
|
7423
|
+
updatedAt: Timestamp;
|
|
7424
|
+
}
|
|
7425
|
+
/** Content of one space changed by a site change request. */
|
|
7426
|
+
export type SiteChangeRequestContentMember = SiteChangeRequestMember & {
|
|
7427
|
+
/** ID of the space whose content changes. */
|
|
7428
|
+
space: string;
|
|
7429
|
+
/** ID of the revision in the space's main content this member diverged from. */
|
|
7430
|
+
baseRevisionId: string;
|
|
7431
|
+
/** ID of the revision currently proposed for the space. */
|
|
7432
|
+
headRevisionId: string;
|
|
7433
|
+
/** ID of the revision produced in the space's main content when this member was merged. Only present once the change request has been merged. */
|
|
7434
|
+
mergedRevisionId?: string;
|
|
7435
|
+
};
|
|
7436
|
+
/** Structure of the site changed by a site change request: its space membership, sections, ordering and paths. */
|
|
7437
|
+
export type SiteChangeRequestStructureMember = SiteChangeRequestMember & {
|
|
7438
|
+
/** The live site structure this member diverged from. */
|
|
7439
|
+
base?: SiteStructure;
|
|
7440
|
+
/** The site structure currently proposed. */
|
|
7441
|
+
head?: SiteStructure;
|
|
7442
|
+
};
|
|
7443
|
+
/** Customization settings of the site changed by a site change request. */
|
|
7444
|
+
export type SiteChangeRequestCustomizationMember = SiteChangeRequestMember & {
|
|
7445
|
+
/** The live customization settings this member diverged from. */
|
|
7446
|
+
base?: SiteCustomizationSettings;
|
|
7447
|
+
/** The customization settings currently proposed. */
|
|
7448
|
+
head?: SiteCustomizationSettings;
|
|
7449
|
+
};
|
|
7450
|
+
/** A change request reviewing a site as a whole. It groups every proposed change — the site's structure and its content — into one review, one lifecycle and one merge decision. */
|
|
7451
|
+
export interface SiteChangeRequest {
|
|
7452
|
+
object: "site-change-request";
|
|
7453
|
+
/** Unique identifier for the change request */
|
|
7454
|
+
id: string;
|
|
7455
|
+
/** ID of the organization owning the change request. */
|
|
7456
|
+
organization: string;
|
|
7457
|
+
/** ID of the site reviewed by the change request. */
|
|
7458
|
+
site: string;
|
|
7459
|
+
/** Incremental identifier of the change request within the site. */
|
|
7460
|
+
number: number;
|
|
7461
|
+
/** Identity of the complete set of member states currently exposed. It increments once per completed update, so a review can detect that it applies to outdated content. */
|
|
7462
|
+
version: number;
|
|
7463
|
+
status: ChangeRequestStatus;
|
|
7464
|
+
/** Subject of the change request */
|
|
7465
|
+
subject: ChangeRequestSubject;
|
|
7466
|
+
description?: JSONDocument;
|
|
7467
|
+
/** External links associated with the change request. */
|
|
7468
|
+
links?: ChangeRequestLinks;
|
|
7469
|
+
/** Spaces whose content the change request changes, one entry per space. Empty when it only changes the site itself. */
|
|
7470
|
+
content: SiteChangeRequestContentMember[];
|
|
7471
|
+
/** Only present when the change request changes the site structure. */
|
|
7472
|
+
structure?: SiteChangeRequestStructureMember;
|
|
7473
|
+
/** Only present when the change request changes the site customization settings. */
|
|
7474
|
+
customization?: SiteChangeRequestCustomizationMember;
|
|
7475
|
+
/** Count of opened comments across all members of the change request. */
|
|
7476
|
+
comments: number;
|
|
7477
|
+
createdBy: User;
|
|
7478
|
+
createdAt: Timestamp;
|
|
7479
|
+
updatedAt: Timestamp;
|
|
7480
|
+
/** User who merged the change request. Only present when it has been merged. */
|
|
7481
|
+
mergedBy?: User;
|
|
7482
|
+
/** Date at which the change request was merged. Only present when it has been merged. */
|
|
7483
|
+
mergedAt?: Timestamp;
|
|
7484
|
+
/** URLs associated with the object */
|
|
7485
|
+
urls: {
|
|
7486
|
+
/**
|
|
7487
|
+
* URL of the change request in the application
|
|
7488
|
+
* @format uri
|
|
7489
|
+
*/
|
|
7490
|
+
app: string;
|
|
7491
|
+
/**
|
|
7492
|
+
* URL of the change request in the API
|
|
7493
|
+
* @format uri
|
|
7494
|
+
*/
|
|
7495
|
+
location: string;
|
|
7496
|
+
};
|
|
7497
|
+
}
|
|
7177
7498
|
/**
|
|
7178
7499
|
* Name of the share link
|
|
7179
7500
|
* @minLength 0
|
|
@@ -7568,13 +7889,13 @@ export interface SiteRedirectInputDestinationPath {
|
|
|
7568
7889
|
/** Path to the page within the space revision to resolve. */
|
|
7569
7890
|
path: string;
|
|
7570
7891
|
}
|
|
7571
|
-
/** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
|
|
7892
|
+
/** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). The destination is absent when the audit judged the URL and found no page to redirect to: a redirect can still be created from the source with a destination of your choosing. */
|
|
7572
7893
|
export interface SiteFindingBrokenLinkAction {
|
|
7573
7894
|
/** The source path to redirect from. */
|
|
7574
7895
|
source: SiteRedirectSourcePath;
|
|
7575
7896
|
/** Whether the redirect appends the wildcard-matched suffix of the source path to the destination. */
|
|
7576
7897
|
captureWildcard?: boolean;
|
|
7577
|
-
destination
|
|
7898
|
+
destination?: SiteRedirectInputDestinationPath;
|
|
7578
7899
|
}
|
|
7579
7900
|
/** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
|
|
7580
7901
|
export interface SiteFindingOutboundLink {
|
|
@@ -7633,7 +7954,7 @@ export interface SiteFinding {
|
|
|
7633
7954
|
description: JSONDocument;
|
|
7634
7955
|
/** Whether an AI agent should be able to fix this finding directly */
|
|
7635
7956
|
autoFixable: boolean;
|
|
7636
|
-
/** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). */
|
|
7957
|
+
/** Suggested fix for a broken-link finding, shaped as the input for `createSiteRedirect` so it can be applied directly. Absent when the finding has no directly applicable redirect (for example, a suggestion to create a new page). The destination is absent when the audit judged the URL and found no page to redirect to: a redirect can still be created from the source with a destination of your choosing. */
|
|
7637
7958
|
brokenLinkAction?: SiteFindingBrokenLinkAction;
|
|
7638
7959
|
/** Details of an `outbound-link-error` finding: the failing external URL and the observed failure, sourced from the site's outbound link checks. Absent on findings of any other type. */
|
|
7639
7960
|
outboundLink?: SiteFindingOutboundLink;
|
|
@@ -7753,6 +8074,13 @@ export interface SiteFindingStatsSeverities {
|
|
|
7753
8074
|
}
|
|
7754
8075
|
/** Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total. */
|
|
7755
8076
|
export type SiteFindingStatsConnectors = Record<string, number>;
|
|
8077
|
+
/** Breakdown of the broken-link findings included in the aggregation. */
|
|
8078
|
+
export interface SiteFindingStatsBrokenLinks {
|
|
8079
|
+
/** Broken URLs the audit found a page to redirect to. */
|
|
8080
|
+
redirectSuggested: number;
|
|
8081
|
+
/** Broken URLs the audit judged and found no page to redirect to. */
|
|
8082
|
+
noMatchingPage: number;
|
|
8083
|
+
}
|
|
7756
8084
|
/** Aggregated stats for the findings identified on a site. */
|
|
7757
8085
|
export interface SiteFindingStats {
|
|
7758
8086
|
/** Total count of findings included in the aggregation. */
|
|
@@ -7763,6 +8091,8 @@ export interface SiteFindingStats {
|
|
|
7763
8091
|
severities: SiteFindingStatsSeverities;
|
|
7764
8092
|
/** Count of findings by the connector their evidence came from, keyed by connector (e.g. `builtin:intercom`). A finding is counted once per connector that contributed at least one piece of evidence to it, so the counts can add up to more than the total. */
|
|
7765
8093
|
connectors: SiteFindingStatsConnectors;
|
|
8094
|
+
/** Breakdown of the broken-link findings included in the aggregation. */
|
|
8095
|
+
brokenLinks: SiteFindingStatsBrokenLinks;
|
|
7766
8096
|
/** Count of findings with at least one piece of evidence coming from a site question. */
|
|
7767
8097
|
questions: number;
|
|
7768
8098
|
/** Count of change requests created to fix a finding that have been merged. */
|
|
@@ -7934,6 +8264,12 @@ export type ContextConnectorSetup = {
|
|
|
7934
8264
|
* @maxLength 1024
|
|
7935
8265
|
*/
|
|
7936
8266
|
apiToken: string;
|
|
8267
|
+
/**
|
|
8268
|
+
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8269
|
+
* @maxItems 100
|
|
8270
|
+
* @uniqueItems true
|
|
8271
|
+
*/
|
|
8272
|
+
projectKeys?: string[];
|
|
7937
8273
|
/** Jira status to move the linked issue to when the change request reaches a given status, e.g. `{ "merged": "Done" }`. A status left out is not synced. */
|
|
7938
8274
|
statusMapping?: Record<ChangeRequestStatus, string>;
|
|
7939
8275
|
};
|
|
@@ -7955,6 +8291,19 @@ export type ContextConnection = {
|
|
|
7955
8291
|
failureMessage?: string;
|
|
7956
8292
|
/** 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. */
|
|
7957
8293
|
failureReason?: ContextConnectionFailureReason;
|
|
8294
|
+
/**
|
|
8295
|
+
* Why an AI task was skipped before execution.
|
|
8296
|
+
*
|
|
8297
|
+
* - `ai_unavailable_for_organization`: The organization's effective plan does not include AI or a
|
|
8298
|
+
* required feature. Takes precedence when both the organization and site plans block the task.
|
|
8299
|
+
* - `ai_unavailable_for_site`: The site's effective plan does not include the required feature.
|
|
8300
|
+
* The site's applied plan takes precedence over its own plan.
|
|
8301
|
+
* - `ai_paused`: AI usage is temporarily paused by automatic usage controls.
|
|
8302
|
+
* - `ai_disabled`: AI or a required AI feature has been turned off in the organization's settings.
|
|
8303
|
+
* - `ai_restricted`: AI is blocked by GitBook or a contractual restriction and cannot be enabled
|
|
8304
|
+
* through organization settings.
|
|
8305
|
+
*/
|
|
8306
|
+
skipReason?: AISkipReason;
|
|
7958
8307
|
/** Parameters associated with the connection when it is an email connection */
|
|
7959
8308
|
email?: {
|
|
7960
8309
|
/**
|
|
@@ -8167,6 +8516,8 @@ export interface AIToolCallSearchResultPage {
|
|
|
8167
8516
|
pageId: string;
|
|
8168
8517
|
/** The revision ID of the result */
|
|
8169
8518
|
revisionId: string;
|
|
8519
|
+
/** The path of the page within its space, as the published site serves it. */
|
|
8520
|
+
path?: string;
|
|
8170
8521
|
/** The anchor of the result */
|
|
8171
8522
|
anchor?: string;
|
|
8172
8523
|
/** The title of the result */
|
|
@@ -8429,6 +8780,20 @@ export interface AIToolCallCheckContentImport {
|
|
|
8429
8780
|
/** Number of pages the import has discovered so far. */
|
|
8430
8781
|
totalPages: number;
|
|
8431
8782
|
}
|
|
8783
|
+
/** Tool call recording that the agent started a background agent: a child conversation running one bounded task on its own, in parallel with the conversation that started it. The client renders its live status from `AgentState.backgroundAgents`, matched on `agentId`, and can open the child conversation to read what it did. */
|
|
8784
|
+
export interface AIToolCallStartBackgroundAgent {
|
|
8785
|
+
tool: "startBackgroundAgent";
|
|
8786
|
+
/** Identifier of the background agent within the conversation that started it. */
|
|
8787
|
+
agentId: string;
|
|
8788
|
+
/** The child conversation holding the background agent's transcript. It can only be read, never continued. */
|
|
8789
|
+
conversationId: string;
|
|
8790
|
+
/** A few words naming what the background agent is doing, for a tab and a line of a transcript. The task itself is a brief and far too long to label anything with. */
|
|
8791
|
+
title: string;
|
|
8792
|
+
/** The task the background agent was given. */
|
|
8793
|
+
task: string;
|
|
8794
|
+
/** IDs of the pages the background agent owns, when it was started to change content. Two background agents of the same conversation never own the same page. */
|
|
8795
|
+
pages?: string[];
|
|
8796
|
+
}
|
|
8432
8797
|
/** Tool called from an MCP server */
|
|
8433
8798
|
export interface AIToolCallMCP {
|
|
8434
8799
|
tool: "mcp";
|
|
@@ -8452,7 +8817,7 @@ export interface AIToolCallOther {
|
|
|
8452
8817
|
/** Summary of a generic tool call. */
|
|
8453
8818
|
summary: AIToolCallOtherSummary;
|
|
8454
8819
|
}
|
|
8455
|
-
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;
|
|
8820
|
+
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 | AIToolCallStartBackgroundAgent | AIToolCallMCP | AIToolCallOther;
|
|
8456
8821
|
export interface Timerange {
|
|
8457
8822
|
start: Timestamp;
|
|
8458
8823
|
end: Timestamp;
|
|
@@ -8544,6 +8909,10 @@ export type AIMessageTask = {
|
|
|
8544
8909
|
spaceId: string;
|
|
8545
8910
|
/** The ID of the change request to implement the task in. */
|
|
8546
8911
|
changeRequestId: string;
|
|
8912
|
+
} | {
|
|
8913
|
+
type: "background_agent";
|
|
8914
|
+
/** The conversation that started this background agent. */
|
|
8915
|
+
parentConversationId: string;
|
|
8547
8916
|
};
|
|
8548
8917
|
/** The response that generated this message. */
|
|
8549
8918
|
export interface AIMessageResponseMetadata {
|
|
@@ -8868,6 +9237,8 @@ export type SiteInsightsEventSession = SiteInsightsSession & {
|
|
|
8868
9237
|
export interface SiteInsightsEventLocation {
|
|
8869
9238
|
/** URL of the location. */
|
|
8870
9239
|
url: URL;
|
|
9240
|
+
/** URL of the page of the site the visitor was on before this one, if any. Unlike the session referrer, it follows navigation within the site. Only recorded when it has the same origin as `url`; any other value is discarded. */
|
|
9241
|
+
previousUrl?: null | URL;
|
|
8871
9242
|
/**
|
|
8872
9243
|
* Whether the event was tracked on the site, the server, or an embed widget.
|
|
8873
9244
|
* @default "site"
|
|
@@ -8955,6 +9326,12 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
|
|
|
8955
9326
|
/** Event when a user views the ask UI. */
|
|
8956
9327
|
export type SiteInsightsEventAskView = SiteInsightsEventBase & {
|
|
8957
9328
|
type: "ask_view";
|
|
9329
|
+
trigger?: "hover" | "selection" | "site" | "page" | "code" | "embed";
|
|
9330
|
+
};
|
|
9331
|
+
/** Event when a user clicks an entry point that opens the ask UI. */
|
|
9332
|
+
export type SiteInsightsEventAskTriggerClick = SiteInsightsEventBase & {
|
|
9333
|
+
type: "ask_trigger_click";
|
|
9334
|
+
trigger: "hover" | "selection" | "site" | "page" | "code";
|
|
8958
9335
|
};
|
|
8959
9336
|
export type SiteInsightsEventAskRateResponse = SiteInsightsEventBase & {
|
|
8960
9337
|
type: "ask_rate_response";
|
|
@@ -9009,7 +9386,7 @@ export type SiteInsightsEventMCPRequest = SiteInsightsEventBase & {
|
|
|
9009
9386
|
export type SiteInsightsEventRSSRequest = SiteInsightsEventBase & {
|
|
9010
9387
|
type: "rss_request";
|
|
9011
9388
|
};
|
|
9012
|
-
export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventPageMarkdownRequest | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventPagePostFeedbackComment | SiteInsightsEventAgentFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventAskView | SiteInsightsEventAskRateResponse | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest | SiteInsightsEventTrademarkClick | SiteInsightsEventAdClick | SiteInsightsEventAdDisplay | SiteInsightsEventLLMSRequest | SiteInsightsEventMCPRequest | SiteInsightsEventRSSRequest;
|
|
9389
|
+
export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventPageMarkdownRequest | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventPagePostFeedbackComment | SiteInsightsEventAgentFeedback | SiteInsightsEventAskQuestion | SiteInsightsEventAskView | SiteInsightsEventAskTriggerClick | SiteInsightsEventAskRateResponse | SiteInsightsEventLinkClick | SiteInsightsEventAPIClientOpen | SiteInsightsEventAPIClientRequest | SiteInsightsEventTrademarkClick | SiteInsightsEventAdClick | SiteInsightsEventAdDisplay | SiteInsightsEventLLMSRequest | SiteInsightsEventMCPRequest | SiteInsightsEventRSSRequest;
|
|
9013
9390
|
export interface SiteInsightsQueryDateTimeColumn {
|
|
9014
9391
|
column: "datetime";
|
|
9015
9392
|
interval?: "hour" | "day" | "week" | "month";
|
|
@@ -9096,6 +9473,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
9096
9473
|
column: "referrer";
|
|
9097
9474
|
} | {
|
|
9098
9475
|
column: "referrerDomain";
|
|
9476
|
+
} | {
|
|
9477
|
+
column: "previousUrl";
|
|
9099
9478
|
} | {
|
|
9100
9479
|
column: "utmSource";
|
|
9101
9480
|
} | {
|
|
@@ -9120,6 +9499,10 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
9120
9499
|
} | {
|
|
9121
9500
|
column: "eventTrademarkPlacement";
|
|
9122
9501
|
};
|
|
9502
|
+
/**
|
|
9503
|
+
* Ratings submitted on a page, counted once per rating a reader submitted rather than once
|
|
9504
|
+
* per event.
|
|
9505
|
+
*/
|
|
9123
9506
|
export type SiteInsightsQueryEventsValues = {
|
|
9124
9507
|
column: "datetime";
|
|
9125
9508
|
values: Timestamp[];
|
|
@@ -9262,6 +9645,9 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
9262
9645
|
} | {
|
|
9263
9646
|
column: "referrerDomain";
|
|
9264
9647
|
values: string[];
|
|
9648
|
+
} | {
|
|
9649
|
+
column: "previousUrl";
|
|
9650
|
+
values: string[];
|
|
9265
9651
|
} | {
|
|
9266
9652
|
column: "utmSource";
|
|
9267
9653
|
values: string[];
|
|
@@ -9638,11 +10024,11 @@ export type OrganizationBillingDateOverride = true | Timestamp;
|
|
|
9638
10024
|
*/
|
|
9639
10025
|
export type OrganizationBillingNumericOverride = number;
|
|
9640
10026
|
/**
|
|
9641
|
-
*
|
|
10027
|
+
* A percentage from 0 to 100.
|
|
9642
10028
|
* @min 0
|
|
9643
10029
|
* @max 100
|
|
9644
10030
|
*/
|
|
9645
|
-
export type
|
|
10031
|
+
export type Percentage = number;
|
|
9646
10032
|
export interface OrganizationBillingOverrides {
|
|
9647
10033
|
overrides: {
|
|
9648
10034
|
/** Current interval-change override, when set. */
|
|
@@ -9652,9 +10038,13 @@ export interface OrganizationBillingOverrides {
|
|
|
9652
10038
|
/** Contractual AI credit allowance for Enterprise organizations only. */
|
|
9653
10039
|
aiCreditAllowance?: OrganizationBillingNumericOverride;
|
|
9654
10040
|
/** Percentage of remaining paid AI credits carried into the next billing period. Paid self-serve organizations default to 50% when unset. */
|
|
9655
|
-
aiCreditRollover?:
|
|
10041
|
+
aiCreditRollover?: Percentage;
|
|
9656
10042
|
/** Percentage of total AI credits remaining at which to send a low-balance alert. */
|
|
9657
|
-
aiCreditAlertThreshold?:
|
|
10043
|
+
aiCreditAlertThreshold?: Percentage;
|
|
10044
|
+
/** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
|
|
10045
|
+
aiCreditPauseEnabled?: boolean;
|
|
10046
|
+
/** False when the organization's contract requires AI to stay off, regardless of the admin setting. */
|
|
10047
|
+
hasAI?: false;
|
|
9658
10048
|
/** Current minimum users override, when set. */
|
|
9659
10049
|
minUsers?: OrganizationBillingNumericOverride;
|
|
9660
10050
|
/** Current maximum users override, when set. */
|
|
@@ -9669,6 +10059,8 @@ export interface OrganizationBillingOverrides {
|
|
|
9669
10059
|
maxUltimateSites?: OrganizationBillingNumericOverride;
|
|
9670
10060
|
};
|
|
9671
10061
|
}
|
|
10062
|
+
/** A percentage threshold, or null when disabled. */
|
|
10063
|
+
export type PercentageThreshold = Percentage | null;
|
|
9672
10064
|
export type BackOfficeSite = Site & {
|
|
9673
10065
|
/** ID of the organization owning this site */
|
|
9674
10066
|
organization: string;
|
|
@@ -9715,6 +10107,8 @@ export interface SiteVisitorPayload {
|
|
|
9715
10107
|
type?: "human" | "agent";
|
|
9716
10108
|
/** JWT token generated for a authenticated access session. */
|
|
9717
10109
|
jwtToken?: string;
|
|
10110
|
+
/** ISO 3166-1 alpha-2 code of the country the visitor is browsing from, as detected by the renderer. */
|
|
10111
|
+
country?: string;
|
|
9718
10112
|
unsignedClaims?: PlainObject;
|
|
9719
10113
|
}
|
|
9720
10114
|
/** GitHub repository that can be selected for Git Sync. */
|
|
@@ -9942,6 +10336,12 @@ export type InputPageDocument = InputPageBase & {
|
|
|
9942
10336
|
* @maxLength 300
|
|
9943
10337
|
*/
|
|
9944
10338
|
description?: string;
|
|
10339
|
+
/**
|
|
10340
|
+
* Optional custom title overriding only the page-title segment of the composed `<title>` tag (`<tagTitle || title> | <section> | <site>`).
|
|
10341
|
+
* @minLength 0
|
|
10342
|
+
* @maxLength 100
|
|
10343
|
+
*/
|
|
10344
|
+
tagTitle?: string;
|
|
9945
10345
|
/** Page's slug in its direct parent */
|
|
9946
10346
|
slug?: string;
|
|
9947
10347
|
pages?: (InputPageDocument | InputPageLink | InputPageComputed)[];
|
|
@@ -10495,6 +10895,8 @@ export interface ContentAPIBaseToken {
|
|
|
10495
10895
|
spaces: string[];
|
|
10496
10896
|
/** Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted. */
|
|
10497
10897
|
visitorType?: "human" | "agent";
|
|
10898
|
+
/** The region containing the country of the visitor for whom the token was generated. Omitted if the country isn't in any region. */
|
|
10899
|
+
visitorRegion?: string;
|
|
10498
10900
|
/** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
|
|
10499
10901
|
claims?: Record<string, any>;
|
|
10500
10902
|
/** Multiplier for the rate limit applied to the token. */
|
|
@@ -10883,6 +11285,22 @@ export interface APIChannelMutationData {
|
|
|
10883
11285
|
executionId: string;
|
|
10884
11286
|
};
|
|
10885
11287
|
}
|
|
11288
|
+
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
11289
|
+
export interface SiteAdaptiveJSONSchema {
|
|
11290
|
+
$schema?: "http://json-schema.org/draft-07/schema#";
|
|
11291
|
+
type: "object";
|
|
11292
|
+
properties: {
|
|
11293
|
+
/** Unsigned claims of the site visitor. */
|
|
11294
|
+
unsigned?: {
|
|
11295
|
+
type: "object";
|
|
11296
|
+
description: "Unsigned claims of the site visitor.";
|
|
11297
|
+
properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
|
|
11298
|
+
additionalProperties: false;
|
|
11299
|
+
};
|
|
11300
|
+
[key: string]: any;
|
|
11301
|
+
};
|
|
11302
|
+
additionalProperties: false;
|
|
11303
|
+
}
|
|
10886
11304
|
export type SiteAdaptiveDeterministicJSONSchemaClaimsProperties = SiteAdaptiveDeterministicJSONSchemaPrimitives | {
|
|
10887
11305
|
type: "object";
|
|
10888
11306
|
description: string;
|
|
@@ -10955,6 +11373,34 @@ export interface AgentEditTarget {
|
|
|
10955
11373
|
/** The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits. */
|
|
10956
11374
|
changeRequestId?: string;
|
|
10957
11375
|
}
|
|
11376
|
+
/** A background agent of the conversation: a child running one task on its own. Carries what a client shows about it and nothing of what it produced — the report it writes goes to the agent that started it, and its transcript is read by opening its conversation. */
|
|
11377
|
+
export interface AgentBackgroundAgent {
|
|
11378
|
+
/** Identifier of the background agent within the conversation that started it. */
|
|
11379
|
+
id: string;
|
|
11380
|
+
/** The child conversation holding its transcript, which can only be read. */
|
|
11381
|
+
conversationId: string;
|
|
11382
|
+
/** A few words naming what it is doing, for a tab and a line of a transcript. */
|
|
11383
|
+
title: string;
|
|
11384
|
+
/** The task it was given. */
|
|
11385
|
+
task: string;
|
|
11386
|
+
/**
|
|
11387
|
+
* What became of a background agent.
|
|
11388
|
+
* `running` while it works, `completed` when it reported its result, `failed` when it crashed without recovering or its request was refused, and `stopped` when someone stopped it.
|
|
11389
|
+
*/
|
|
11390
|
+
status: AgentBackgroundAgentStatus;
|
|
11391
|
+
/**
|
|
11392
|
+
* When it was started.
|
|
11393
|
+
* @format date-time
|
|
11394
|
+
*/
|
|
11395
|
+
startedAt: string;
|
|
11396
|
+
/**
|
|
11397
|
+
* When it stopped running. Absent while it still runs.
|
|
11398
|
+
* @format date-time
|
|
11399
|
+
*/
|
|
11400
|
+
finishedAt?: string;
|
|
11401
|
+
/** Why it failed, when it did. */
|
|
11402
|
+
error?: string;
|
|
11403
|
+
}
|
|
10958
11404
|
export interface AgentState {
|
|
10959
11405
|
status: AgentStatus;
|
|
10960
11406
|
/** List of response suggestions for the user to select from. */
|
|
@@ -10971,6 +11417,8 @@ export interface AgentState {
|
|
|
10971
11417
|
editTarget?: AgentEditTarget;
|
|
10972
11418
|
/** How far this conversation should reach when it changes content. */
|
|
10973
11419
|
editScope?: AgentEditScope;
|
|
11420
|
+
/** The background agents this conversation has started, oldest first. Present on every state event so a client can render each one's live status against the tool call that started it. */
|
|
11421
|
+
backgroundAgents?: AgentBackgroundAgent[];
|
|
10974
11422
|
/** 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. */
|
|
10975
11423
|
consultOnly?: boolean;
|
|
10976
11424
|
}
|
|
@@ -11782,7 +12230,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11782
12230
|
schema?: "current" | "next";
|
|
11783
12231
|
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
11784
12232
|
/**
|
|
11785
|
-
* @description Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready.
|
|
12233
|
+
* @description Creates a new change request, which is a draft working copy of the space's content — similar to a Git branch or pull request. Use this before making content edits to avoid modifying the live published content directly. Optionally supply a subject and a template to pre-populate the change request with content. Once created, use the change-request content endpoints to read and modify pages within the draft, then merge it when ready. When the change request fixes a documentation issue found by GitBook, pass its `siteFindingId` so that merging the change request resolves the finding.
|
|
11786
12234
|
*
|
|
11787
12235
|
* @tags change-requests
|
|
11788
12236
|
* @name CreateChangeRequest
|
|
@@ -11795,6 +12243,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11795
12243
|
subject?: string;
|
|
11796
12244
|
/** Template to apply to the change request */
|
|
11797
12245
|
template?: ApplySpaceTemplate;
|
|
12246
|
+
/** Description of the change request, explaining what it changes and why, for whoever reviews it. Only paragraphs and lists are kept; other blocks are stripped along with their text. */
|
|
12247
|
+
description?: JSONDocument;
|
|
12248
|
+
/** The site finding this change request fixes. Merging the change request resolves the finding, once every change request linked to it has been merged. The finding's site must contain this space. */
|
|
12249
|
+
siteFindingId?: string;
|
|
11798
12250
|
[key: string]: any;
|
|
11799
12251
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
11800
12252
|
/**
|
|
@@ -11850,7 +12302,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11850
12302
|
};
|
|
11851
12303
|
}>>;
|
|
11852
12304
|
/**
|
|
11853
|
-
* @description Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead.
|
|
12305
|
+
* @description Updates the metadata of a change request. Use this to rename a change request, add context before requesting a review, or change the workflow status without merging. To update page content within the change request, use the content endpoint instead. Set `siteFindingId` to record that the change request fixes a documentation issue found by GitBook, so that merging it resolves the finding.
|
|
11854
12306
|
*
|
|
11855
12307
|
* @tags change-requests
|
|
11856
12308
|
* @name UpdateChangeRequestById
|
|
@@ -11868,6 +12320,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11868
12320
|
*/
|
|
11869
12321
|
links?: ChangeRequestLinkInput[];
|
|
11870
12322
|
status?: "draft" | "open" | "archived";
|
|
12323
|
+
/** The site finding this change request fixes. Merging the change request resolves the finding, once every change request linked to it has been merged. The finding's site must contain this space. Pass null to unlink a finding linked by mistake. */
|
|
12324
|
+
siteFindingId?: string | null;
|
|
11871
12325
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
11872
12326
|
/**
|
|
11873
12327
|
* @description Merges the change request's draft content into the space's primary (published) content, making all changes live. If the result is "conflicts", the merge was still applied but the space may need manual conflict resolution. Consider running updateChangeRequest first to sync with the latest live content and reduce conflicts.
|
|
@@ -11943,6 +12397,25 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11943
12397
|
/** Optionally, provide a comment along with the review. */
|
|
11944
12398
|
comment?: Document;
|
|
11945
12399
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequestReview, any>>;
|
|
12400
|
+
/**
|
|
12401
|
+
* @description Returns how many reviews were approved and how many requested changes, for the same reviews the list endpoint returns under the same filters. Use this to summarise where a change request stands without paginating through every review.
|
|
12402
|
+
*
|
|
12403
|
+
* @tags change-requests-reviews
|
|
12404
|
+
* @name GetReviewStatsByChangeRequestId
|
|
12405
|
+
* @summary Get review totals for a change request
|
|
12406
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/reviews/stats
|
|
12407
|
+
* @secure
|
|
12408
|
+
*/
|
|
12409
|
+
getReviewStatsByChangeRequestId: (spaceId: EntityId, changeRequestId: EntityId, query?: {
|
|
12410
|
+
/** Filter reviews marked as outdated. */
|
|
12411
|
+
outdated?: boolean;
|
|
12412
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequestReviewStats, {
|
|
12413
|
+
error: {
|
|
12414
|
+
/** @format int32 */
|
|
12415
|
+
code: 404;
|
|
12416
|
+
message: string;
|
|
12417
|
+
};
|
|
12418
|
+
}>>;
|
|
11946
12419
|
/**
|
|
11947
12420
|
* @description Retrieves the full details of a single review submission on a change request, including the decision status (approved/changes-requested), reviewer, and any attached comment. Use this when you have a review ID and need its full details.
|
|
11948
12421
|
*
|
|
@@ -13951,7 +14424,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13951
14424
|
withDefaultSite?: boolean;
|
|
13952
14425
|
/** URL of an OpenAPI/Swagger specification to import and attach to the default site as a reference. Only used when `withDefaultSite` is true. */
|
|
13953
14426
|
openapiUrl?: string;
|
|
13954
|
-
}, params?: RequestParams) => Promise<HttpResponse<Organization
|
|
14427
|
+
}, params?: RequestParams) => Promise<HttpResponse<Organization & {
|
|
14428
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
14429
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
14430
|
+
}, any>>;
|
|
13955
14431
|
/**
|
|
13956
14432
|
* No description
|
|
13957
14433
|
*
|
|
@@ -13989,8 +14465,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13989
14465
|
logo?: URL | null;
|
|
13990
14466
|
sso?: boolean;
|
|
13991
14467
|
ai?: boolean;
|
|
14468
|
+
/** Partial AI preference update. Omitted keys are unchanged; null removes an opt-out. */
|
|
14469
|
+
aiSettings?: OrganizationAISettingsUpdate;
|
|
13992
14470
|
inviteLinks?: boolean;
|
|
13993
14471
|
mergeRules?: MergeRulesStandaloneConfiguration;
|
|
14472
|
+
supportCost?: OrganizationSupportCost | null;
|
|
13994
14473
|
}, params?: RequestParams) => Promise<HttpResponse<Organization, {
|
|
13995
14474
|
error: {
|
|
13996
14475
|
/** @format int32 */
|
|
@@ -14219,6 +14698,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14219
14698
|
/** A JTW token containing the claims to attach to this user. */
|
|
14220
14699
|
gitbookVisitorClaims?: string;
|
|
14221
14700
|
}, any>>;
|
|
14701
|
+
/**
|
|
14702
|
+
* @description Returns whether the organization is on a trial, the free plan or a paid plan, when its trial ends, and where to upgrade. Use it to answer questions about the plan or the trial, or to find how to upgrade.
|
|
14703
|
+
*
|
|
14704
|
+
* @tags organizations
|
|
14705
|
+
* @name GetOrganizationSubscription
|
|
14706
|
+
* @summary Get an organization's subscription
|
|
14707
|
+
* @request GET:/orgs/{organizationId}/subscription
|
|
14708
|
+
* @secure
|
|
14709
|
+
*/
|
|
14710
|
+
getOrganizationSubscription: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<OrganizationSubscription, {
|
|
14711
|
+
error: {
|
|
14712
|
+
/** @format int32 */
|
|
14713
|
+
code: 404;
|
|
14714
|
+
message: string;
|
|
14715
|
+
};
|
|
14716
|
+
}>>;
|
|
14222
14717
|
/**
|
|
14223
14718
|
* No description
|
|
14224
14719
|
*
|
|
@@ -15548,7 +16043,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15548
16043
|
*/
|
|
15549
16044
|
deleteCustomFont: (organizationId: EntityId, fontId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15550
16045
|
/**
|
|
15551
|
-
* @description Returns a paginated list of all documentation sites belonging to the organization. Use this to discover available sites before fetching their content, settings, or structure.
|
|
16046
|
+
* @description Returns a paginated list of all documentation sites belonging to the organization. Use this to discover available sites before fetching their content, settings, or structure. Members with access only to individual spaces receive the sites that use those spaces as site items, with site administration fields omitted.
|
|
15552
16047
|
*
|
|
15553
16048
|
* @tags sites, critical
|
|
15554
16049
|
* @name ListSites
|
|
@@ -15606,7 +16101,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15606
16101
|
spaces?: string[];
|
|
15607
16102
|
}, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
|
|
15608
16103
|
/**
|
|
15609
|
-
* @description Retrieves full details for a single documentation site. Use this to inspect a specific site's metadata before reading or modifying its settings, structure, or content.
|
|
16104
|
+
* @description Retrieves full details for a single documentation site. Use this to inspect a specific site's metadata before reading or modifying its settings, structure, or content. Members with access only through a linked space can retrieve a limited site summary; site administration fields are omitted.
|
|
15610
16105
|
*
|
|
15611
16106
|
* @tags sites
|
|
15612
16107
|
* @name GetSiteById
|
|
@@ -15724,8 +16219,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15724
16219
|
* @secure
|
|
15725
16220
|
*/
|
|
15726
16221
|
updateSiteAdaptiveSchema: (organizationId: EntityId, siteId: string, data: {
|
|
15727
|
-
/** The JSON schema to set on the site. */
|
|
15728
|
-
jsonSchema:
|
|
16222
|
+
/** The JSON schema to set on the site. `regions` is only accepted for organizations with regions enabled. */
|
|
16223
|
+
jsonSchema: SiteAdaptiveJSONSchemaWithRegions;
|
|
15729
16224
|
}, params?: RequestParams) => Promise<HttpResponse<SiteAdaptiveSchema, Error | {
|
|
15730
16225
|
error: {
|
|
15731
16226
|
/** @format int32 */
|
|
@@ -15773,10 +16268,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15773
16268
|
* @request POST:/orgs/{organizationId}/sites/{siteId}/publish
|
|
15774
16269
|
* @secure
|
|
15775
16270
|
*/
|
|
15776
|
-
publishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site
|
|
16271
|
+
publishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<(Site & {
|
|
16272
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
16273
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16274
|
+
}) | {
|
|
15777
16275
|
type: "checkout";
|
|
15778
16276
|
/** Stripe payment session ID */
|
|
15779
16277
|
sessionId: string;
|
|
16278
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
16279
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
15780
16280
|
}, any>>;
|
|
15781
16281
|
/**
|
|
15782
16282
|
* @description Removes the site from public access by unpublishing it. The site's configuration and content are preserved; use the publish endpoint to make it accessible again. Use this when you need to temporarily hide a site or take it down for maintenance.
|
|
@@ -15788,6 +16288,122 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15788
16288
|
* @secure
|
|
15789
16289
|
*/
|
|
15790
16290
|
unpublishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
|
|
16291
|
+
/**
|
|
16292
|
+
* @description Returns a paginated list of change requests reviewing the site. A site change request groups changes to the site structure and to any number of its spaces into one review. Use this to discover existing change requests before creating a new one.
|
|
16293
|
+
*
|
|
16294
|
+
* @tags site-change-requests
|
|
16295
|
+
* @name ListChangeRequestsForSite
|
|
16296
|
+
* @summary List all change requests for a site
|
|
16297
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/change-requests
|
|
16298
|
+
* @secure
|
|
16299
|
+
*/
|
|
16300
|
+
listChangeRequestsForSite: (organizationId: EntityId, siteId: string, query?: {
|
|
16301
|
+
/** Identifier of the page results to fetch. */
|
|
16302
|
+
page?: string;
|
|
16303
|
+
/**
|
|
16304
|
+
* The number of results per page
|
|
16305
|
+
* @min 0
|
|
16306
|
+
* @max 1000
|
|
16307
|
+
*/
|
|
16308
|
+
limit?: number;
|
|
16309
|
+
/**
|
|
16310
|
+
* If defined, only change requests matching this status will be returned.
|
|
16311
|
+
* @default "open"
|
|
16312
|
+
*/
|
|
16313
|
+
status?: ChangeRequestStatus;
|
|
16314
|
+
/** If defined, only change requests created by this user will be returned. */
|
|
16315
|
+
createdBy?: string;
|
|
16316
|
+
/** If defined, only change requests moved out of draft by this user will be returned. */
|
|
16317
|
+
openedBy?: string;
|
|
16318
|
+
/** If defined, only change requests archived by this user will be returned. */
|
|
16319
|
+
archivedBy?: string;
|
|
16320
|
+
/** If defined, only change requests merged by this user will be returned. */
|
|
16321
|
+
mergedBy?: string;
|
|
16322
|
+
/** If defined, only change requests with contributions from this user will be returned. */
|
|
16323
|
+
contributor?: string;
|
|
16324
|
+
/**
|
|
16325
|
+
* Status of the members.
|
|
16326
|
+
* @default "active"
|
|
16327
|
+
*/
|
|
16328
|
+
memberStatus?: SiteChangeRequestMemberStatus;
|
|
16329
|
+
/** The field to sort change requests by. Defaults to 'updatedAt'. */
|
|
16330
|
+
orderBy?: ChangeRequestOrderBy;
|
|
16331
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
16332
|
+
items: SiteChangeRequest[];
|
|
16333
|
+
}, any>>;
|
|
16334
|
+
/**
|
|
16335
|
+
* @description Creates a change request reviewing the site, as a draft working copy of the content of the spaces it changes. It starts with no members: a space becomes one on its first edit.
|
|
16336
|
+
*
|
|
16337
|
+
* @tags site-change-requests
|
|
16338
|
+
* @name CreateSiteChangeRequest
|
|
16339
|
+
* @summary Create a new change request in a site
|
|
16340
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/change-requests
|
|
16341
|
+
* @secure
|
|
16342
|
+
*/
|
|
16343
|
+
createSiteChangeRequest: (organizationId: EntityId, siteId: string, data: {
|
|
16344
|
+
/** Subject of the change request */
|
|
16345
|
+
subject?: ChangeRequestSubject;
|
|
16346
|
+
description?: JSONDocument;
|
|
16347
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, any>>;
|
|
16348
|
+
/**
|
|
16349
|
+
* @description Retrieves a single site change request, including its status, subject, description, aggregate version and active members. Use this to check its current state before deciding to merge, update or request a review.
|
|
16350
|
+
*
|
|
16351
|
+
* @tags site-change-requests
|
|
16352
|
+
* @name GetSiteChangeRequestById
|
|
16353
|
+
* @summary Get a site change request by its ID
|
|
16354
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
|
|
16355
|
+
* @secure
|
|
16356
|
+
*/
|
|
16357
|
+
getSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, {
|
|
16358
|
+
error: {
|
|
16359
|
+
/** @format int32 */
|
|
16360
|
+
code: 404;
|
|
16361
|
+
message: string;
|
|
16362
|
+
};
|
|
16363
|
+
}>>;
|
|
16364
|
+
/**
|
|
16365
|
+
* @description Updates the metadata of a site change request. Use this to rename it, add context before requesting a review, or change its workflow status without merging. To change the resources it reviews, update its members instead.
|
|
16366
|
+
*
|
|
16367
|
+
* @tags site-change-requests
|
|
16368
|
+
* @name UpdateSiteChangeRequestById
|
|
16369
|
+
* @summary Update a site change request's subject, description, or status
|
|
16370
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
|
|
16371
|
+
* @secure
|
|
16372
|
+
*/
|
|
16373
|
+
updateSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, data: {
|
|
16374
|
+
/** Subject of the change request */
|
|
16375
|
+
subject?: ChangeRequestSubject;
|
|
16376
|
+
description?: JSONDocument;
|
|
16377
|
+
status?: "draft" | "open" | "archived";
|
|
16378
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, {
|
|
16379
|
+
error: {
|
|
16380
|
+
/** @format int32 */
|
|
16381
|
+
code: 404;
|
|
16382
|
+
message: string;
|
|
16383
|
+
};
|
|
16384
|
+
} | {
|
|
16385
|
+
error: {
|
|
16386
|
+
/** @format int32 */
|
|
16387
|
+
code: 409;
|
|
16388
|
+
message: string;
|
|
16389
|
+
};
|
|
16390
|
+
}>>;
|
|
16391
|
+
/**
|
|
16392
|
+
* @description Permanently deletes a change request and its members. Merged change requests cannot be deleted; archive a change request instead to keep its review history.
|
|
16393
|
+
*
|
|
16394
|
+
* @tags site-change-requests
|
|
16395
|
+
* @name DeleteSiteChangeRequestById
|
|
16396
|
+
* @summary Delete a site change request
|
|
16397
|
+
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
|
|
16398
|
+
* @secure
|
|
16399
|
+
*/
|
|
16400
|
+
deleteSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, {
|
|
16401
|
+
error: {
|
|
16402
|
+
/** @format int32 */
|
|
16403
|
+
code: 409;
|
|
16404
|
+
message: string;
|
|
16405
|
+
};
|
|
16406
|
+
}>>;
|
|
15791
16407
|
/**
|
|
15792
16408
|
* @description Returns a paginated list of share links configured for the site. Share links grant access to a private site without requiring full authentication. Use this to audit existing share links, check their active status, or find a link ID before updating or revoking it.
|
|
15793
16409
|
*
|
|
@@ -15849,7 +16465,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15849
16465
|
*/
|
|
15850
16466
|
deleteSiteShareLinkById: (organizationId: EntityId, siteId: string, shareLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15851
16467
|
/**
|
|
15852
|
-
* @description Returns the complete hierarchical structure of a site, including all sections, section groups, and site spaces in their current order. Use this to understand how a site's navigation is organized before making structural changes, or to render the full navigation tree of a site.
|
|
16468
|
+
* @description Returns the complete hierarchical structure of a site, including all sections, section groups, and site spaces in their current order. Use this to understand how a site's navigation is organized before making structural changes, or to render the full navigation tree of a site. Members with access only to individual spaces receive only the site items backed by those spaces and their parent sections.
|
|
15853
16469
|
*
|
|
15854
16470
|
* @tags site-structure
|
|
15855
16471
|
* @name GetSiteStructure
|
|
@@ -15956,6 +16572,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15956
16572
|
siteSpace?: string;
|
|
15957
16573
|
/** Rison encoded string of attributes/assertions about the visitor for which we want to preview the site. */
|
|
15958
16574
|
claims?: string;
|
|
16575
|
+
/** ISO 3166-1 alpha-2 code of the country of the visitor for which we want to preview the site. It is matched against the `regions` of the site adaptive schema to resolve `visitor.region`. */
|
|
16576
|
+
country?: string;
|
|
15959
16577
|
/**
|
|
15960
16578
|
* Whether to include draft content in the preview. Defaults to true
|
|
15961
16579
|
* @default true
|
|
@@ -16004,7 +16622,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16004
16622
|
* @request PUT:/orgs/{organizationId}/sites/{siteId}/customization
|
|
16005
16623
|
* @secure
|
|
16006
16624
|
*/
|
|
16007
|
-
updateSiteCustomizationById: (organizationId: EntityId, siteId: string, data: SiteCustomizationSettingsInput, params?: RequestParams) => Promise<HttpResponse<
|
|
16625
|
+
updateSiteCustomizationById: (organizationId: EntityId, siteId: string, data: SiteCustomizationSettingsInput, params?: RequestParams) => Promise<HttpResponse<SiteCustomizationSettingsBase & {
|
|
16626
|
+
/** When the customization settings were updated. If missing, customization was not updated. */
|
|
16627
|
+
updatedAt?: Timestamp;
|
|
16628
|
+
} & {
|
|
16629
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
16630
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16631
|
+
}, {
|
|
16008
16632
|
error: {
|
|
16009
16633
|
/** @format int32 */
|
|
16010
16634
|
code: 400;
|
|
@@ -16069,7 +16693,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16069
16693
|
title?: SiteTitle;
|
|
16070
16694
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
16071
16695
|
/**
|
|
16072
|
-
* @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.
|
|
16696
|
+
* @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. Members with access only to individual spaces receive only site-space links for those spaces.
|
|
16073
16697
|
*
|
|
16074
16698
|
* @tags site-spaces, critical
|
|
16075
16699
|
* @name ListSiteSpaces
|
|
@@ -16133,7 +16757,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16133
16757
|
parent?: string;
|
|
16134
16758
|
/** Whether the section group should be created in draft mode. */
|
|
16135
16759
|
draft?: boolean;
|
|
16136
|
-
}, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup
|
|
16760
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup & {
|
|
16761
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
16762
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16763
|
+
}, any>>;
|
|
16137
16764
|
/**
|
|
16138
16765
|
* @description Updates a section group's properties in the site's navigation structure.
|
|
16139
16766
|
*
|
|
@@ -16190,7 +16817,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16190
16817
|
pageId?: string;
|
|
16191
16818
|
/** ID of the section group to create the section in */
|
|
16192
16819
|
siteSectionGroupId?: string;
|
|
16193
|
-
}, params?: RequestParams) => Promise<HttpResponse<SiteSection
|
|
16820
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSection & {
|
|
16821
|
+
/** A notice about the organization's subscription to relay to the user, such as how many days are left in their trial. It is returned by the operations whose features may require a paid plan once a trial ends. */
|
|
16822
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16823
|
+
}, any>>;
|
|
16194
16824
|
/**
|
|
16195
16825
|
* @description Returns a paginated list of sections in the site. Each section is a top-level navigation item backed by one or more site spaces. Use this to inspect the current navigation structure, find a section ID before updating it, or check whether sections are in draft or live state.
|
|
16196
16826
|
*
|
|
@@ -16254,7 +16884,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16254
16884
|
*/
|
|
16255
16885
|
deleteSiteSectionById: (organizationId: EntityId, siteId: string, siteSectionId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
16256
16886
|
/**
|
|
16257
|
-
* @description Creates an external navigation link at the site root or in a section group.
|
|
16887
|
+
* @description Creates an external navigation link at the site root or in a section group. On a site with root variants and no sections, creating the first external link enables sections and moves those variants into a default section. Links cannot be placed inside a section. The destination must be an absolute HTTP or HTTPS URL. Draft links and links whose adaptive condition does not match are omitted from published structure responses. Use the generic structure sort operation after creation to change sibling order.
|
|
16258
16888
|
*
|
|
16259
16889
|
* @tags site-external-links
|
|
16260
16890
|
* @name AddExternalLinkToSite
|
|
@@ -16579,7 +17209,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16579
17209
|
*/
|
|
16580
17210
|
getSiteScanById: (organizationId: EntityId, siteId: string, siteScanId: string, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
|
|
16581
17211
|
/**
|
|
16582
|
-
* @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.
|
|
17212
|
+
* @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. Only findings with status "open" need work; "candidate" ones have not been confirmed yet. A "broken-link" finding is fixed by a redirect rather than a content edit: pass its `brokenLinkAction` to createSiteRedirect. Fix the rest by opening a change request with its `siteFindingId` set, so merging the change request resolves it.
|
|
16583
17213
|
*
|
|
16584
17214
|
* @tags site-context
|
|
16585
17215
|
* @name ListSiteFindings
|
|
@@ -16604,6 +17234,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16604
17234
|
status?: SiteFindingStatus;
|
|
16605
17235
|
/** Filter findings by type. When multiple types are given, findings matching any of them are returned. */
|
|
16606
17236
|
type?: SiteFindingType[];
|
|
17237
|
+
/** Filter link findings whose URL contains this text: the broken path of a `broken-link` finding, or the checked URL of an `outbound-link-error` one. Findings of any other type never match, so this narrows the list to link findings on its own. */
|
|
17238
|
+
url?: string;
|
|
16607
17239
|
/** Filter findings by estimated severity. */
|
|
16608
17240
|
severity?: SiteFindingSeverity;
|
|
16609
17241
|
/** Filter findings that have at least one associated change request. */
|
|
@@ -17781,6 +18413,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17781
18413
|
* @secure
|
|
17782
18414
|
*/
|
|
17783
18415
|
createSiteRedirect: (organizationId: EntityId, siteId: string, data: {
|
|
18416
|
+
/** The broken-link finding that prompted this redirect. Must belong to this site. Used to attribute redirect creation, including drafts, to the finding. */
|
|
18417
|
+
siteFindingId?: string;
|
|
17784
18418
|
/** The source path to redirect from. */
|
|
17785
18419
|
source: SiteRedirectSourcePath;
|
|
17786
18420
|
/**
|
|
@@ -18088,6 +18722,88 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18088
18722
|
createSiteChannel: (organizationId: EntityId, siteId: string, data: SiteChannelSetup & {
|
|
18089
18723
|
role?: SiteChannelRole;
|
|
18090
18724
|
}, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
|
|
18725
|
+
/**
|
|
18726
|
+
* @description Lists accessible Linear teams, GitHub repositories, Slack channels or Jira projects. Requires site admin permission. Linear, GitHub and Slack require an already-connected channel belonging to this site and matching the provider. Jira credentials are verified without saving a connection. Slack includes public channels and accessible private channels, excluding archived channels. To fetch another page, pass the opaque token from `next.page` as the `page` query parameter with the same request body. An absent `next` means there are no more pages; an empty `items` array alone does not indicate the end of the list.
|
|
18727
|
+
*
|
|
18728
|
+
* @tags site-channels
|
|
18729
|
+
* @name ListSiteChannelScopes
|
|
18730
|
+
* @summary List available site channel scopes
|
|
18731
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/channels/scopes
|
|
18732
|
+
* @secure
|
|
18733
|
+
*/
|
|
18734
|
+
listSiteChannelScopes: (organizationId: EntityId, siteId: string, data: {
|
|
18735
|
+
provider: "linear";
|
|
18736
|
+
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18737
|
+
siteChannelId: string;
|
|
18738
|
+
} | {
|
|
18739
|
+
provider: "github";
|
|
18740
|
+
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18741
|
+
siteChannelId: string;
|
|
18742
|
+
} | {
|
|
18743
|
+
provider: "slack";
|
|
18744
|
+
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18745
|
+
siteChannelId: string;
|
|
18746
|
+
} | {
|
|
18747
|
+
provider: "jira";
|
|
18748
|
+
credentials: {
|
|
18749
|
+
/**
|
|
18750
|
+
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
18751
|
+
* @format uri
|
|
18752
|
+
* @minLength 1
|
|
18753
|
+
* @maxLength 2048
|
|
18754
|
+
*/
|
|
18755
|
+
baseUrl: string;
|
|
18756
|
+
/**
|
|
18757
|
+
* Email of the Atlassian account whose API token is used.
|
|
18758
|
+
* @format email
|
|
18759
|
+
* @minLength 1
|
|
18760
|
+
* @maxLength 254
|
|
18761
|
+
*/
|
|
18762
|
+
apiEmail: string;
|
|
18763
|
+
/**
|
|
18764
|
+
* Atlassian API token used to verify the account and list accessible projects. Not saved.
|
|
18765
|
+
* @minLength 1
|
|
18766
|
+
* @maxLength 1024
|
|
18767
|
+
*/
|
|
18768
|
+
apiToken: string;
|
|
18769
|
+
};
|
|
18770
|
+
}, query?: {
|
|
18771
|
+
/** Identifier of the page results to fetch. */
|
|
18772
|
+
page?: string;
|
|
18773
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
18774
|
+
object: "site-channel-scopes";
|
|
18775
|
+
/** Linear workspace name, GitHub account name, Slack workspace name (or ID if unavailable), or Jira Cloud hostname. */
|
|
18776
|
+
connection: string;
|
|
18777
|
+
items: {
|
|
18778
|
+
/** Value accepted by the provider scope settings, such as a team key, repository full name, channel name, Jira project key. */
|
|
18779
|
+
key: string;
|
|
18780
|
+
name: string;
|
|
18781
|
+
}[];
|
|
18782
|
+
}, {
|
|
18783
|
+
error: {
|
|
18784
|
+
/** @format int32 */
|
|
18785
|
+
code: 400;
|
|
18786
|
+
message: string;
|
|
18787
|
+
};
|
|
18788
|
+
} | {
|
|
18789
|
+
error: {
|
|
18790
|
+
/** @format int32 */
|
|
18791
|
+
code: 401;
|
|
18792
|
+
message: string;
|
|
18793
|
+
};
|
|
18794
|
+
} | {
|
|
18795
|
+
error: {
|
|
18796
|
+
/** @format int32 */
|
|
18797
|
+
code: 403;
|
|
18798
|
+
message: string;
|
|
18799
|
+
};
|
|
18800
|
+
} | {
|
|
18801
|
+
error: {
|
|
18802
|
+
/** @format int32 */
|
|
18803
|
+
code: 404;
|
|
18804
|
+
message: string;
|
|
18805
|
+
};
|
|
18806
|
+
}>>;
|
|
18091
18807
|
/**
|
|
18092
18808
|
* @description Retrieves the configuration of a specific GitBook Agent channel integration, including its connected platform type and role. Use this to inspect or verify the channel's setup before updating it.
|
|
18093
18809
|
*
|
|
@@ -18111,7 +18827,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18111
18827
|
role?: SiteChannelRole;
|
|
18112
18828
|
}, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
|
|
18113
18829
|
/**
|
|
18114
|
-
*
|
|
18830
|
+
* @description Removes the channel configuration from the site, so GitBook Agent stops answering and collaborating through the connected platform. The app itself is not uninstalled and its access is not revoked on the platform, so remove it there as well to fully disconnect.
|
|
18115
18831
|
*
|
|
18116
18832
|
* @tags site-channels
|
|
18117
18833
|
* @name DeleteSiteChannelById
|