@gitbook/api 0.201.0 → 0.203.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 +821 -50
- package/dist/constants.d.ts +8 -5
- package/dist/index.cjs +121 -10
- package/dist/index.js +115 -10
- package/package.json +1 -1
- package/spec/openapi.json +2632 -254
- package/spec/openapi.yaml +1730 -45
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",
|
|
@@ -393,13 +405,14 @@ export declare enum SiteQuestionType {
|
|
|
393
405
|
Unknown = "unknown"
|
|
394
406
|
}
|
|
395
407
|
/**
|
|
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'.
|
|
408
|
+
* 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
409
|
* @default "updatedAt"
|
|
398
410
|
*/
|
|
399
411
|
export declare enum SiteFindingOrderBy {
|
|
400
412
|
UpdatedAt = "updatedAt",
|
|
401
413
|
Severity = "severity",
|
|
402
|
-
Sources = "sources"
|
|
414
|
+
Sources = "sources",
|
|
415
|
+
SuggestedFix = "suggestedFix"
|
|
403
416
|
}
|
|
404
417
|
/** Findings source filter matching evidence coming from site questions. */
|
|
405
418
|
export declare enum SiteTriageFilterQuestions {
|
|
@@ -457,6 +470,11 @@ export declare enum AgentFeedbackSource {
|
|
|
457
470
|
Mcp = "mcp",
|
|
458
471
|
Assistant = "assistant"
|
|
459
472
|
}
|
|
473
|
+
/** 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. */
|
|
474
|
+
export declare enum SiteChangeRequestMemberStatus {
|
|
475
|
+
Active = "active",
|
|
476
|
+
Removed = "removed"
|
|
477
|
+
}
|
|
460
478
|
/** The platform of the social handle. */
|
|
461
479
|
export declare enum SiteSocialAccountPlatform {
|
|
462
480
|
Twitter = "twitter",
|
|
@@ -744,6 +762,7 @@ export declare enum SAMLProviderStatus {
|
|
|
744
762
|
/** An organization feature used for plan access and upgrade prompts. */
|
|
745
763
|
export declare enum OrganizationFeature {
|
|
746
764
|
MaxMembers = "max-members",
|
|
765
|
+
Ai = "ai",
|
|
747
766
|
AiLens = "ai-lens",
|
|
748
767
|
PdfExport = "pdf-export",
|
|
749
768
|
AiWriting = "ai-writing",
|
|
@@ -755,6 +774,16 @@ export declare enum OrganizationFeature {
|
|
|
755
774
|
SecuritySaml = "security-saml",
|
|
756
775
|
ChangeRequestsMergeRules = "change-requests-merge-rules"
|
|
757
776
|
}
|
|
777
|
+
/**
|
|
778
|
+
* UTC calendar interval for AI usage, with weeks starting on Monday.
|
|
779
|
+
* @default "day"
|
|
780
|
+
*/
|
|
781
|
+
export declare enum AIUsageInterval {
|
|
782
|
+
Day = "day",
|
|
783
|
+
Week = "week",
|
|
784
|
+
Month = "month",
|
|
785
|
+
Year = "year"
|
|
786
|
+
}
|
|
758
787
|
export declare enum BillingSwitchAction {
|
|
759
788
|
Trial = "trial",
|
|
760
789
|
Upgrade = "upgrade",
|
|
@@ -861,6 +890,7 @@ export declare enum SiteFeatureKey {
|
|
|
861
890
|
SitesSections = "sites-sections",
|
|
862
891
|
SitesSeo = "sites-seo",
|
|
863
892
|
SitesShareLinks = "sites-share-links",
|
|
893
|
+
SitesStyleGuide = "sites-style-guide",
|
|
864
894
|
SitesUnlistedVisibility = "sites-unlisted-visibility",
|
|
865
895
|
SitesUserContribution = "sites-user-contribution",
|
|
866
896
|
SitesVisitorAuthentication = "sites-visitor-authentication",
|
|
@@ -930,10 +960,10 @@ export declare enum BillingTrialStatus {
|
|
|
930
960
|
/** The AI credit bundle to top up every month */
|
|
931
961
|
export declare enum BillingCreditsBundle {
|
|
932
962
|
None = "none",
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
963
|
+
Value4750250 = "4750_250",
|
|
964
|
+
Value90001000 = "9000_1000",
|
|
965
|
+
Value127502250 = "12750_2250",
|
|
966
|
+
Value3000010000 = "30000_10000"
|
|
937
967
|
}
|
|
938
968
|
/** Interval for a billing subscription */
|
|
939
969
|
export declare enum BillingInterval {
|
|
@@ -1446,6 +1476,8 @@ export interface GitSyncState {
|
|
|
1446
1476
|
parentInstallationId?: string;
|
|
1447
1477
|
/** The URL to the repository tree, used when rendering public content. */
|
|
1448
1478
|
url?: string;
|
|
1479
|
+
/** 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. */
|
|
1480
|
+
installationProjectDirectory?: string;
|
|
1449
1481
|
/** The latest operation on the Git Sync installation. */
|
|
1450
1482
|
operation?: {
|
|
1451
1483
|
/**
|
|
@@ -1468,6 +1500,11 @@ export interface GitSyncState {
|
|
|
1468
1500
|
/** When the Git provider details were last updated */
|
|
1469
1501
|
updatedAt?: Timestamp;
|
|
1470
1502
|
}
|
|
1503
|
+
/** What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation. */
|
|
1504
|
+
export interface PreviousGitSyncState {
|
|
1505
|
+
/** 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. */
|
|
1506
|
+
url: string;
|
|
1507
|
+
}
|
|
1471
1508
|
export type ContentImportSource = {
|
|
1472
1509
|
type: "website";
|
|
1473
1510
|
url: URL;
|
|
@@ -1612,6 +1649,8 @@ export interface Space {
|
|
|
1612
1649
|
parent?: string;
|
|
1613
1650
|
language?: TranslationLanguage;
|
|
1614
1651
|
gitSync?: GitSyncState;
|
|
1652
|
+
/** What is still known about a target's Git Sync after its installation was removed. Never returned alongside `gitSync`, which describes a live installation. */
|
|
1653
|
+
previousGitSync?: PreviousGitSyncState;
|
|
1615
1654
|
/** Import runs targeting this space, still running or ended recently, most recent first. Only returned when fetching a single space. */
|
|
1616
1655
|
imports?: ContentImportRun[];
|
|
1617
1656
|
visitorAuth?: VisitorAuth;
|
|
@@ -2591,6 +2630,8 @@ export interface DocumentBlockTabsItem {
|
|
|
2591
2630
|
title?: string;
|
|
2592
2631
|
/** Name of the icon */
|
|
2593
2632
|
icon?: Icon;
|
|
2633
|
+
/** Stable identifier for this tab's selection, shared with every tab and button targeting the same slug. It is slugified before matching, so casing and spacing need not be exact. Omit it — or send an empty value, which counts as omitted — to derive one from the title, which is what makes same-named tabs across a site select together. A value that slugifies to nothing, such as emoji alone, also falls back to the title. */
|
|
2634
|
+
slug?: string;
|
|
2594
2635
|
};
|
|
2595
2636
|
meta?: {
|
|
2596
2637
|
/** Unique ID to be used in an URL for the block. */
|
|
@@ -3010,6 +3051,8 @@ export interface RevisionPageLayoutOptions {
|
|
|
3010
3051
|
tags: boolean;
|
|
3011
3052
|
/** Should the page actions be visible on the page? */
|
|
3012
3053
|
actions: boolean;
|
|
3054
|
+
/** Should the anchor links on headings and other linkable blocks be visible? */
|
|
3055
|
+
anchors: boolean;
|
|
3013
3056
|
}
|
|
3014
3057
|
export interface RevisionPageDocumentCover {
|
|
3015
3058
|
/** Content reference pointing to the source image. */
|
|
@@ -3218,7 +3261,7 @@ export interface ChangeRequestLinkInput {
|
|
|
3218
3261
|
/** External ticket data resolved for this link by a configured connector. */
|
|
3219
3262
|
export type ChangeRequestLinkExpanded = {
|
|
3220
3263
|
kind: "external-ticket";
|
|
3221
|
-
provider: "jira";
|
|
3264
|
+
provider: "jira" | "linear";
|
|
3222
3265
|
state: "connected";
|
|
3223
3266
|
/** The ticket's provider-specific key. */
|
|
3224
3267
|
key: string;
|
|
@@ -3235,12 +3278,14 @@ export type ChangeRequestLinkExpanded = {
|
|
|
3235
3278
|
summary: string;
|
|
3236
3279
|
} | {
|
|
3237
3280
|
kind: "external-ticket";
|
|
3238
|
-
provider: "jira";
|
|
3281
|
+
provider: "jira" | "linear";
|
|
3239
3282
|
state: "error";
|
|
3240
3283
|
};
|
|
3241
3284
|
export type ChangeRequestLink = ChangeRequestLinkInput & {
|
|
3242
3285
|
/** The ID of the link. */
|
|
3243
3286
|
id: string;
|
|
3287
|
+
/** Whether this link owns synchronization with the external issue. Other links are references only. */
|
|
3288
|
+
isSyncing: boolean;
|
|
3244
3289
|
/** External ticket data resolved for this link by a configured connector. */
|
|
3245
3290
|
expanded?: ChangeRequestLinkExpanded;
|
|
3246
3291
|
};
|
|
@@ -3279,16 +3324,26 @@ export interface ChangeRequest {
|
|
|
3279
3324
|
revisionMerged?: string;
|
|
3280
3325
|
/** Count of opened comments on the change request. */
|
|
3281
3326
|
comments: number;
|
|
3282
|
-
/** Site
|
|
3327
|
+
/** Site topic the change request was created from, when it came from one. */
|
|
3283
3328
|
siteTopic?: {
|
|
3284
3329
|
/** ID of the site associated with the change request. */
|
|
3285
3330
|
site: string;
|
|
3286
3331
|
/** ID of the site topic associated with the change request. */
|
|
3287
3332
|
topic: string;
|
|
3288
|
-
/**
|
|
3333
|
+
/**
|
|
3334
|
+
* 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.
|
|
3335
|
+
* @deprecated
|
|
3336
|
+
*/
|
|
3289
3337
|
finding?: string;
|
|
3290
3338
|
};
|
|
3291
|
-
/**
|
|
3339
|
+
/** 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. */
|
|
3340
|
+
siteFinding?: {
|
|
3341
|
+
/** ID of the site the finding belongs to. */
|
|
3342
|
+
site: string;
|
|
3343
|
+
/** ID of the site finding the change request fixes. */
|
|
3344
|
+
finding: string;
|
|
3345
|
+
};
|
|
3346
|
+
/** 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. */
|
|
3292
3347
|
styleguide?: {
|
|
3293
3348
|
/** ID of the site the style guide belongs to. */
|
|
3294
3349
|
site: string;
|
|
@@ -3296,6 +3351,8 @@ export interface ChangeRequest {
|
|
|
3296
3351
|
run: string;
|
|
3297
3352
|
/** Number of pages the check changed, recorded when it finished. Absent while it is still running, or when it never completed. */
|
|
3298
3353
|
changedPages?: number;
|
|
3354
|
+
/** When the most recent style guide check on the change request finished. Later edits from anyone else do not move it. Absent while the first one is still running. */
|
|
3355
|
+
checkedAt?: Timestamp;
|
|
3299
3356
|
};
|
|
3300
3357
|
/** If true, the change request is not up-to-date with latest changes in the main content. */
|
|
3301
3358
|
outdated: boolean;
|
|
@@ -3470,6 +3527,8 @@ export interface ChangeRequestReview {
|
|
|
3470
3527
|
location: string;
|
|
3471
3528
|
};
|
|
3472
3529
|
}
|
|
3530
|
+
/** Exact review totals for the applied filters, independent of pagination. Keyed by review status, with a count of zero for a status nobody used. */
|
|
3531
|
+
export type ChangeRequestReviewStats = Record<ChangeRequestReviewStatus, number>;
|
|
3473
3532
|
export interface Team {
|
|
3474
3533
|
/** Type of Object, always equals to "team" */
|
|
3475
3534
|
object: "team";
|
|
@@ -4033,6 +4092,28 @@ export interface SitePointer {
|
|
|
4033
4092
|
}
|
|
4034
4093
|
/** The default content for the organization */
|
|
4035
4094
|
export type OrganizationDefaultContent = SitePointer;
|
|
4095
|
+
/** An AI credit threshold from 5% to 50%, or null when disabled. */
|
|
4096
|
+
export type AICreditThreshold = number | null;
|
|
4097
|
+
/** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4098
|
+
export interface OrganizationAISettings {
|
|
4099
|
+
/** Whether AI features are automatically paused because credits are low. */
|
|
4100
|
+
aiPaused?: boolean;
|
|
4101
|
+
"ai-agent"?: false;
|
|
4102
|
+
"ai-assistant"?: false;
|
|
4103
|
+
"ai-broken-links"?: false;
|
|
4104
|
+
"ai-content-gap"?: false;
|
|
4105
|
+
"ai-insight"?: false;
|
|
4106
|
+
"ai-import"?: false;
|
|
4107
|
+
"ai-platform"?: false;
|
|
4108
|
+
"ai-style-guide"?: false;
|
|
4109
|
+
"ai-translation"?: false;
|
|
4110
|
+
/** An AI credit threshold from 5% to 50%, or null when disabled. */
|
|
4111
|
+
aiCreditAlertThreshold?: AICreditThreshold;
|
|
4112
|
+
/** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
|
|
4113
|
+
aiCreditPauseEnabled?: boolean;
|
|
4114
|
+
aiAlertNotificationAlertId?: string;
|
|
4115
|
+
aiPauseNotificationAlertId?: string;
|
|
4116
|
+
}
|
|
4036
4117
|
/** Pricing pair for monthly and yearly intervals */
|
|
4037
4118
|
export interface OrganizationPricePair {
|
|
4038
4119
|
/**
|
|
@@ -4107,9 +4188,39 @@ export interface OrganizationBilling {
|
|
|
4107
4188
|
canUseSAML: boolean;
|
|
4108
4189
|
/** 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. */
|
|
4109
4190
|
creditsBundle: BillingCreditsBundle | null;
|
|
4110
|
-
/**
|
|
4111
|
-
|
|
4191
|
+
/** The yearly AI credit allowance agreed in the organization's contract, or null when none is set. */
|
|
4192
|
+
aiCreditAllowance: number | null;
|
|
4193
|
+
/**
|
|
4194
|
+
* The percentage of unused paid bundle credits carried over to the next monthly AI billing period.
|
|
4195
|
+
* @min 0
|
|
4196
|
+
* @max 100
|
|
4197
|
+
*/
|
|
4198
|
+
aiCreditRollover: number;
|
|
4112
4199
|
}
|
|
4200
|
+
/** What support costs the organization, per ticket or per hour of agent time, used to estimate how much AI answers save in site insights. */
|
|
4201
|
+
export type OrganizationSupportCost = {
|
|
4202
|
+
/**
|
|
4203
|
+
* Cost of one support ticket, in `currency`.
|
|
4204
|
+
* @min 0.01
|
|
4205
|
+
*/
|
|
4206
|
+
perTicket: number;
|
|
4207
|
+
/**
|
|
4208
|
+
* ISO 4217 currency code.
|
|
4209
|
+
* @pattern ^[A-Z]{3}$
|
|
4210
|
+
*/
|
|
4211
|
+
currency: string;
|
|
4212
|
+
} | {
|
|
4213
|
+
/**
|
|
4214
|
+
* Cost of one hour of support agent time, in `currency`.
|
|
4215
|
+
* @min 0.01
|
|
4216
|
+
*/
|
|
4217
|
+
perHour: number;
|
|
4218
|
+
/**
|
|
4219
|
+
* ISO 4217 currency code.
|
|
4220
|
+
* @pattern ^[A-Z]{3}$
|
|
4221
|
+
*/
|
|
4222
|
+
currency: string;
|
|
4223
|
+
};
|
|
4113
4224
|
/**
|
|
4114
4225
|
* A short description giving context on the reason for the block.
|
|
4115
4226
|
* @minLength 1
|
|
@@ -4138,6 +4249,8 @@ export interface Organization {
|
|
|
4138
4249
|
sso?: boolean;
|
|
4139
4250
|
/** If true, the organization is configured to use all our AI features. */
|
|
4140
4251
|
ai?: boolean;
|
|
4252
|
+
/** AI preferences and automatic pause status. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4253
|
+
aiSettings?: OrganizationAISettings;
|
|
4141
4254
|
/** If true, invite links are enabled for this organization. */
|
|
4142
4255
|
inviteLinks: boolean;
|
|
4143
4256
|
/** Whether audit logs can currently be accessed for this organization. */
|
|
@@ -4147,6 +4260,8 @@ export interface Organization {
|
|
|
4147
4260
|
/** Billing details, only available for org members. */
|
|
4148
4261
|
billing?: OrganizationBilling;
|
|
4149
4262
|
mergeRules: MergeRulesStandaloneConfiguration;
|
|
4263
|
+
/** Support cost set by the organization, only available for org members. */
|
|
4264
|
+
supportCost?: OrganizationSupportCost;
|
|
4150
4265
|
/** URLs associated with the object */
|
|
4151
4266
|
urls: {
|
|
4152
4267
|
/**
|
|
@@ -5405,6 +5520,57 @@ export interface CreateOrganization {
|
|
|
5405
5520
|
/** Preferences collected from the user during onboarding, to apply to the organization's default site. Only used when `withDefaultSite` is true. */
|
|
5406
5521
|
onboardingPreferences?: SiteOnboardingPreferences;
|
|
5407
5522
|
}
|
|
5523
|
+
/** The current or last trial of an organization. */
|
|
5524
|
+
export interface SubscriptionTrial {
|
|
5525
|
+
/** - 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. */
|
|
5526
|
+
status: BillingTrialStatus;
|
|
5527
|
+
/** When the trial ends, or ended. */
|
|
5528
|
+
endDate: Timestamp;
|
|
5529
|
+
/** Days left in the trial, rounded up, so 1 is its last day. 0 once it has ended. */
|
|
5530
|
+
daysRemaining: number;
|
|
5531
|
+
}
|
|
5532
|
+
/** 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. */
|
|
5533
|
+
export interface SubscriptionNotice {
|
|
5534
|
+
/** - 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. */
|
|
5535
|
+
type: "trial_started" | "trial_countdown" | "checkout_required";
|
|
5536
|
+
/** What the user was doing when the notice was given. */
|
|
5537
|
+
context: "trial_started" | "site_publishing" | "site_features" | "site_customization";
|
|
5538
|
+
/** Whether the organization is on a trial, the free plan, or a paid plan. */
|
|
5539
|
+
commercialStatus: "trial" | "free" | "paid";
|
|
5540
|
+
/** Message to show the user. For users who cannot upgrade, it asks them to reach out to an administrator of the organization. */
|
|
5541
|
+
message: string;
|
|
5542
|
+
/** The current or last trial of an organization. */
|
|
5543
|
+
trial?: SubscriptionTrial;
|
|
5544
|
+
/** Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade. */
|
|
5545
|
+
canManageBilling: boolean;
|
|
5546
|
+
/** Where to upgrade in the application. Only set when `canManageBilling` is true. */
|
|
5547
|
+
upgradeUrl?: URL;
|
|
5548
|
+
/** Public page comparing the GitBook plans. */
|
|
5549
|
+
pricingUrl: URL;
|
|
5550
|
+
}
|
|
5551
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5552
|
+
export type OptOutUpdate = false | null;
|
|
5553
|
+
/** Partial AI preference update. Omitted keys are unchanged; null removes an opt-out. */
|
|
5554
|
+
export interface OrganizationAISettingsUpdate {
|
|
5555
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5556
|
+
"ai-agent"?: OptOutUpdate;
|
|
5557
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5558
|
+
"ai-assistant"?: OptOutUpdate;
|
|
5559
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5560
|
+
"ai-broken-links"?: OptOutUpdate;
|
|
5561
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5562
|
+
"ai-content-gap"?: OptOutUpdate;
|
|
5563
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5564
|
+
"ai-insight"?: OptOutUpdate;
|
|
5565
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5566
|
+
"ai-import"?: OptOutUpdate;
|
|
5567
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5568
|
+
"ai-platform"?: OptOutUpdate;
|
|
5569
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5570
|
+
"ai-style-guide"?: OptOutUpdate;
|
|
5571
|
+
/** Set false to disable, or null to remove the opt-out. Omit to leave unchanged. */
|
|
5572
|
+
"ai-translation"?: OptOutUpdate;
|
|
5573
|
+
}
|
|
5408
5574
|
/**
|
|
5409
5575
|
* Title of the site section
|
|
5410
5576
|
* @minLength 2
|
|
@@ -5593,6 +5759,13 @@ export interface AuditEventActor {
|
|
|
5593
5759
|
id: string;
|
|
5594
5760
|
/** Display label captured when the event was recorded. */
|
|
5595
5761
|
label?: string;
|
|
5762
|
+
/** 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. */
|
|
5763
|
+
impersonator?: {
|
|
5764
|
+
/** Stable ID of the impersonating staff member. */
|
|
5765
|
+
id: string;
|
|
5766
|
+
/** Staff display name captured when the event was recorded, if available. */
|
|
5767
|
+
label?: string;
|
|
5768
|
+
};
|
|
5596
5769
|
}
|
|
5597
5770
|
export interface AuditEventTarget {
|
|
5598
5771
|
/** Kind of resource affected by the change. */
|
|
@@ -5667,6 +5840,28 @@ export interface StyleguideTemplate {
|
|
|
5667
5840
|
export interface StyleguideTemplates {
|
|
5668
5841
|
templates: StyleguideTemplate[];
|
|
5669
5842
|
}
|
|
5843
|
+
/** An organization's subscription, as needed to tell a user their plan, trial and how to upgrade. */
|
|
5844
|
+
export interface OrganizationSubscription {
|
|
5845
|
+
/** Type of Object, always equals to "organization-subscription" */
|
|
5846
|
+
object: "organization-subscription";
|
|
5847
|
+
/** Whether the organization is on a trial, the free plan, or a paid plan. */
|
|
5848
|
+
status: "trial" | "free" | "paid";
|
|
5849
|
+
/** The plan in effect, which is the trial's plan while trialing. */
|
|
5850
|
+
plan: {
|
|
5851
|
+
/** Name of the product */
|
|
5852
|
+
id: BillingProduct;
|
|
5853
|
+
/** Name of the plan shown to users, e.g. Pro. */
|
|
5854
|
+
title: string;
|
|
5855
|
+
};
|
|
5856
|
+
/** The current or last trial. Absent when the organization never had one. */
|
|
5857
|
+
trial?: SubscriptionTrial;
|
|
5858
|
+
/** Whether the user is an administrator of the organization, and so can upgrade. Otherwise, they have to ask an administrator to upgrade. */
|
|
5859
|
+
canManageBilling: boolean;
|
|
5860
|
+
/** Where to upgrade in the application. Only set when `canManageBilling` is true. */
|
|
5861
|
+
upgradeUrl?: URL;
|
|
5862
|
+
/** Public page comparing the GitBook plans. */
|
|
5863
|
+
pricingUrl: URL;
|
|
5864
|
+
}
|
|
5670
5865
|
/** Permission of a member in a content. */
|
|
5671
5866
|
export interface MemberContentPermission {
|
|
5672
5867
|
/**
|
|
@@ -5930,9 +6125,11 @@ export interface BillingInvoicePreview {
|
|
|
5930
6125
|
adjustments: BillingInvoiceAdjustment[];
|
|
5931
6126
|
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
5932
6127
|
creditGrants: {
|
|
5933
|
-
/** 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. */
|
|
5934
|
-
type: "paid" | "bonus" | "site" | "rollover";
|
|
5935
|
-
/**
|
|
6128
|
+
/** 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. */
|
|
6129
|
+
type: "paid" | "bonus" | "site" | "rollover" | "custom";
|
|
6130
|
+
/** Stripe spending priority. Lower values are consumed first. */
|
|
6131
|
+
priority?: number;
|
|
6132
|
+
/** Credits available from this grant before the current invoice usage. */
|
|
5936
6133
|
grantedCredits: number;
|
|
5937
6134
|
/** Credits of the grant spent by the usage metered so far. */
|
|
5938
6135
|
usedCredits: number;
|
|
@@ -5962,7 +6159,7 @@ export interface BillingInvoicePreview {
|
|
|
5962
6159
|
coveredAmount: number;
|
|
5963
6160
|
/** The credits the organization pays for. */
|
|
5964
6161
|
paid: BillingCreditsTotals;
|
|
5965
|
-
/** The
|
|
6162
|
+
/** The bonus, site and custom credits. */
|
|
5966
6163
|
free: BillingCreditsTotals;
|
|
5967
6164
|
/** The credits of the monthly bundle, both paid and bonus. */
|
|
5968
6165
|
bundle: BillingCreditsTotals;
|
|
@@ -5996,6 +6193,56 @@ export interface BillingInvoicePreview {
|
|
|
5996
6193
|
amount: number;
|
|
5997
6194
|
}[];
|
|
5998
6195
|
}
|
|
6196
|
+
/** The AI credits of the current billing period, grouped the ways the billing screens display them. */
|
|
6197
|
+
export interface Credits {
|
|
6198
|
+
/** Credits granted across every grant. */
|
|
6199
|
+
grantedCredits: number;
|
|
6200
|
+
/** Credits spent by the usage metered so far. */
|
|
6201
|
+
usedCredits: number;
|
|
6202
|
+
/** Credits still available across every grant. */
|
|
6203
|
+
remainingCredits: number;
|
|
6204
|
+
/** Part of the metered AI usage paid by credits rather than billed, as a positive amount. */
|
|
6205
|
+
coveredAmount: number;
|
|
6206
|
+
/** The credits the organization pays for. */
|
|
6207
|
+
paid: BillingCreditsTotals;
|
|
6208
|
+
/** The bonus, site and custom credits. */
|
|
6209
|
+
free: BillingCreditsTotals;
|
|
6210
|
+
/** The credits of the monthly bundle, both paid and bonus. */
|
|
6211
|
+
bundle: BillingCreditsTotals;
|
|
6212
|
+
}
|
|
6213
|
+
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6214
|
+
export type CreditGrants = {
|
|
6215
|
+
/** 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. */
|
|
6216
|
+
type: "paid" | "bonus" | "site" | "rollover" | "custom";
|
|
6217
|
+
/** Stripe spending priority. Lower values are consumed first. */
|
|
6218
|
+
priority?: number;
|
|
6219
|
+
/** Credits available from this grant before the current invoice usage. */
|
|
6220
|
+
grantedCredits: number;
|
|
6221
|
+
/** Credits of the grant spent by the usage metered so far. */
|
|
6222
|
+
usedCredits: number;
|
|
6223
|
+
/** Credits of the grant still available. */
|
|
6224
|
+
remainingCredits: number;
|
|
6225
|
+
/** For a `site` grant, the published sites the credits come from. */
|
|
6226
|
+
sites?: {
|
|
6227
|
+
/** The type of the site */
|
|
6228
|
+
siteType: SiteType;
|
|
6229
|
+
/** How many sites of this type are published. */
|
|
6230
|
+
count: number;
|
|
6231
|
+
/** Credits included with one site of this type. */
|
|
6232
|
+
creditsPerSite: number;
|
|
6233
|
+
/** Credits these sites contribute to the grant. */
|
|
6234
|
+
grantedCredits: number;
|
|
6235
|
+
}[];
|
|
6236
|
+
}[];
|
|
6237
|
+
/** Credit balance after an accepted bundle change, including grants pending webhook synchronization. */
|
|
6238
|
+
export interface BillingCreditBalance {
|
|
6239
|
+
/** The AI credit bundle to top up every month */
|
|
6240
|
+
creditsBundle: BillingCreditsBundle;
|
|
6241
|
+
/** The AI credits of the current billing period, grouped the ways the billing screens display them. */
|
|
6242
|
+
credits: Credits;
|
|
6243
|
+
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
6244
|
+
creditGrants: CreditGrants;
|
|
6245
|
+
}
|
|
5999
6246
|
export type BillingUpgrade = {
|
|
6000
6247
|
result: "checkout";
|
|
6001
6248
|
/** Stripe payment session ID */
|
|
@@ -6005,6 +6252,8 @@ export type BillingUpgrade = {
|
|
|
6005
6252
|
invoice: BillingInvoicePreview;
|
|
6006
6253
|
} | {
|
|
6007
6254
|
result: "upgraded";
|
|
6255
|
+
/** Credit balance after an accepted bundle change, including grants pending webhook synchronization. */
|
|
6256
|
+
creditBalance?: BillingCreditBalance;
|
|
6008
6257
|
} | {
|
|
6009
6258
|
result: "downgraded";
|
|
6010
6259
|
} | {
|
|
@@ -6042,6 +6291,35 @@ export interface BillingPortal {
|
|
|
6042
6291
|
/** URL to the billing portal for an organization */
|
|
6043
6292
|
url: string;
|
|
6044
6293
|
}
|
|
6294
|
+
export interface OrganizationAIUsage {
|
|
6295
|
+
/**
|
|
6296
|
+
* Inclusive start of the queried range.
|
|
6297
|
+
* @format date-time
|
|
6298
|
+
*/
|
|
6299
|
+
from: string;
|
|
6300
|
+
/**
|
|
6301
|
+
* Exclusive end of the queried range, capped at the current instant.
|
|
6302
|
+
* @format date-time
|
|
6303
|
+
*/
|
|
6304
|
+
to: string;
|
|
6305
|
+
/** Chronological calendar buckets. Edge buckets include only the requested dates. */
|
|
6306
|
+
periods: {
|
|
6307
|
+
/**
|
|
6308
|
+
* UTC date at the start of this calendar bucket.
|
|
6309
|
+
* @format date
|
|
6310
|
+
*/
|
|
6311
|
+
date: string;
|
|
6312
|
+
/** Total credits used in this bucket. */
|
|
6313
|
+
credits: number;
|
|
6314
|
+
features: {
|
|
6315
|
+
/** AI feature category with recorded credit usage. */
|
|
6316
|
+
feature: string;
|
|
6317
|
+
credits: number;
|
|
6318
|
+
/** Percentage of this bucket's total credits (0 to 100). */
|
|
6319
|
+
creditsPercent: number;
|
|
6320
|
+
}[];
|
|
6321
|
+
}[];
|
|
6322
|
+
}
|
|
6045
6323
|
/** Usage metrics for a billing meter */
|
|
6046
6324
|
export interface BillingMeterUsage {
|
|
6047
6325
|
/** Total usage for the current billing period */
|
|
@@ -6266,6 +6544,8 @@ export interface SearchAIAnswerSourcePage {
|
|
|
6266
6544
|
revision: string;
|
|
6267
6545
|
/** The space ID owning the page. */
|
|
6268
6546
|
space: string;
|
|
6547
|
+
/** The title of the page, as of `revision`. */
|
|
6548
|
+
title: string;
|
|
6269
6549
|
/** The IDs of the sections of the page that were used to answer the question. */
|
|
6270
6550
|
sections: string[];
|
|
6271
6551
|
}
|
|
@@ -6452,7 +6732,7 @@ export interface Translation {
|
|
|
6452
6732
|
stats: {
|
|
6453
6733
|
/** Total number of times the translation has been run */
|
|
6454
6734
|
runs: number;
|
|
6455
|
-
/** Total number of words
|
|
6735
|
+
/** Total number of words counted toward translation usage over all runs */
|
|
6456
6736
|
totalWords: number;
|
|
6457
6737
|
/** Total number of unique pages translated */
|
|
6458
6738
|
totalPages: number;
|
|
@@ -6462,7 +6742,7 @@ export interface Translation {
|
|
|
6462
6742
|
latestRunDuration: number;
|
|
6463
6743
|
/** Number of unique pages translated in the latest run */
|
|
6464
6744
|
latestPages: number;
|
|
6465
|
-
/** Number of words
|
|
6745
|
+
/** Number of words counted toward translation usage in the latest run */
|
|
6466
6746
|
latestWords: number;
|
|
6467
6747
|
};
|
|
6468
6748
|
permissions: {
|
|
@@ -6727,6 +7007,11 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
|
6727
7007
|
location: string;
|
|
6728
7008
|
};
|
|
6729
7009
|
};
|
|
7010
|
+
/** 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. */
|
|
7011
|
+
export type SiteAdaptiveRegions = Record<any, {
|
|
7012
|
+
/** ISO 3166-1 alpha-2 codes of the countries in the region. */
|
|
7013
|
+
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")[];
|
|
7014
|
+
}>;
|
|
6730
7015
|
export type SiteAdaptiveDeterministicJSONSchemaPrimitives = {
|
|
6731
7016
|
type: "boolean";
|
|
6732
7017
|
description: string;
|
|
@@ -6752,8 +7037,10 @@ export type SiteAdaptiveJSONSchemaClaimsProperties = SiteAdaptiveJSONSchemaPrimi
|
|
|
6752
7037
|
properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
|
|
6753
7038
|
additionalProperties: false;
|
|
6754
7039
|
};
|
|
6755
|
-
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
6756
|
-
export interface
|
|
7040
|
+
/** JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from. */
|
|
7041
|
+
export interface SiteAdaptiveJSONSchemaWithRegions {
|
|
7042
|
+
/** 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. */
|
|
7043
|
+
regions?: SiteAdaptiveRegions;
|
|
6757
7044
|
$schema?: "http://json-schema.org/draft-07/schema#";
|
|
6758
7045
|
type: "object";
|
|
6759
7046
|
properties: {
|
|
@@ -6770,8 +7057,8 @@ export interface SiteAdaptiveJSONSchema {
|
|
|
6770
7057
|
}
|
|
6771
7058
|
export interface SiteAdaptiveSchema {
|
|
6772
7059
|
object: "site-adaptive-schema";
|
|
6773
|
-
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
6774
|
-
jsonSchema:
|
|
7060
|
+
/** JSON schema describing the expected attributes of an Adaptive site schema, with the regions `visitor.region` is resolved from. */
|
|
7061
|
+
jsonSchema: SiteAdaptiveJSONSchemaWithRegions;
|
|
6775
7062
|
/** When the adaptive schema was updated. */
|
|
6776
7063
|
updatedAt: Timestamp;
|
|
6777
7064
|
}
|
|
@@ -7079,6 +7366,89 @@ export interface PublishedContentSite {
|
|
|
7079
7366
|
};
|
|
7080
7367
|
scripts: SiteIntegrationScript[];
|
|
7081
7368
|
}
|
|
7369
|
+
/** 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. */
|
|
7370
|
+
export interface SiteChangeRequestMember {
|
|
7371
|
+
object: "site-change-request-member";
|
|
7372
|
+
/** Unique identifier for the member */
|
|
7373
|
+
id: string;
|
|
7374
|
+
/** 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. */
|
|
7375
|
+
status: SiteChangeRequestMemberStatus;
|
|
7376
|
+
createdAt: Timestamp;
|
|
7377
|
+
updatedAt: Timestamp;
|
|
7378
|
+
}
|
|
7379
|
+
/** Content of one space changed by a site change request. */
|
|
7380
|
+
export type SiteChangeRequestContentMember = SiteChangeRequestMember & {
|
|
7381
|
+
/** ID of the space whose content changes. */
|
|
7382
|
+
space: string;
|
|
7383
|
+
/** ID of the revision in the space's main content this member diverged from. */
|
|
7384
|
+
baseRevisionId: string;
|
|
7385
|
+
/** ID of the revision currently proposed for the space. */
|
|
7386
|
+
headRevisionId: string;
|
|
7387
|
+
/** 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. */
|
|
7388
|
+
mergedRevisionId?: string;
|
|
7389
|
+
};
|
|
7390
|
+
/** Structure of the site changed by a site change request: its space membership, sections, ordering and paths. */
|
|
7391
|
+
export type SiteChangeRequestStructureMember = SiteChangeRequestMember & {
|
|
7392
|
+
/** The live site structure this member diverged from. */
|
|
7393
|
+
base?: SiteStructure;
|
|
7394
|
+
/** The site structure currently proposed. */
|
|
7395
|
+
head?: SiteStructure;
|
|
7396
|
+
};
|
|
7397
|
+
/** Customization settings of the site changed by a site change request. */
|
|
7398
|
+
export type SiteChangeRequestCustomizationMember = SiteChangeRequestMember & {
|
|
7399
|
+
/** The live customization settings this member diverged from. */
|
|
7400
|
+
base?: SiteCustomizationSettings;
|
|
7401
|
+
/** The customization settings currently proposed. */
|
|
7402
|
+
head?: SiteCustomizationSettings;
|
|
7403
|
+
};
|
|
7404
|
+
/** 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. */
|
|
7405
|
+
export interface SiteChangeRequest {
|
|
7406
|
+
object: "site-change-request";
|
|
7407
|
+
/** Unique identifier for the change request */
|
|
7408
|
+
id: string;
|
|
7409
|
+
/** ID of the organization owning the change request. */
|
|
7410
|
+
organization: string;
|
|
7411
|
+
/** ID of the site reviewed by the change request. */
|
|
7412
|
+
site: string;
|
|
7413
|
+
/** Incremental identifier of the change request within the site. */
|
|
7414
|
+
number: number;
|
|
7415
|
+
/** 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. */
|
|
7416
|
+
version: number;
|
|
7417
|
+
status: ChangeRequestStatus;
|
|
7418
|
+
/** Subject of the change request */
|
|
7419
|
+
subject: ChangeRequestSubject;
|
|
7420
|
+
description?: JSONDocument;
|
|
7421
|
+
/** External links associated with the change request. */
|
|
7422
|
+
links?: ChangeRequestLinks;
|
|
7423
|
+
/** Spaces whose content the change request changes, one entry per space. Empty when it only changes the site itself. */
|
|
7424
|
+
content: SiteChangeRequestContentMember[];
|
|
7425
|
+
/** Only present when the change request changes the site structure. */
|
|
7426
|
+
structure?: SiteChangeRequestStructureMember;
|
|
7427
|
+
/** Only present when the change request changes the site customization settings. */
|
|
7428
|
+
customization?: SiteChangeRequestCustomizationMember;
|
|
7429
|
+
/** Count of opened comments across all members of the change request. */
|
|
7430
|
+
comments: number;
|
|
7431
|
+
createdBy: User;
|
|
7432
|
+
createdAt: Timestamp;
|
|
7433
|
+
updatedAt: Timestamp;
|
|
7434
|
+
/** User who merged the change request. Only present when it has been merged. */
|
|
7435
|
+
mergedBy?: User;
|
|
7436
|
+
/** Date at which the change request was merged. Only present when it has been merged. */
|
|
7437
|
+
mergedAt?: Timestamp;
|
|
7438
|
+
/** URLs associated with the object */
|
|
7439
|
+
urls: {
|
|
7440
|
+
/**
|
|
7441
|
+
* URL of the change request in the application
|
|
7442
|
+
* @format uri
|
|
7443
|
+
*/
|
|
7444
|
+
app: string;
|
|
7445
|
+
/**
|
|
7446
|
+
* URL of the change request in the API
|
|
7447
|
+
* @format uri
|
|
7448
|
+
*/
|
|
7449
|
+
location: string;
|
|
7450
|
+
};
|
|
7451
|
+
}
|
|
7082
7452
|
/**
|
|
7083
7453
|
* Name of the share link
|
|
7084
7454
|
* @minLength 0
|
|
@@ -7473,13 +7843,13 @@ export interface SiteRedirectInputDestinationPath {
|
|
|
7473
7843
|
/** Path to the page within the space revision to resolve. */
|
|
7474
7844
|
path: string;
|
|
7475
7845
|
}
|
|
7476
|
-
/** 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). */
|
|
7846
|
+
/** 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. */
|
|
7477
7847
|
export interface SiteFindingBrokenLinkAction {
|
|
7478
7848
|
/** The source path to redirect from. */
|
|
7479
7849
|
source: SiteRedirectSourcePath;
|
|
7480
7850
|
/** Whether the redirect appends the wildcard-matched suffix of the source path to the destination. */
|
|
7481
7851
|
captureWildcard?: boolean;
|
|
7482
|
-
destination
|
|
7852
|
+
destination?: SiteRedirectInputDestinationPath;
|
|
7483
7853
|
}
|
|
7484
7854
|
/** 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. */
|
|
7485
7855
|
export interface SiteFindingOutboundLink {
|
|
@@ -7538,7 +7908,7 @@ export interface SiteFinding {
|
|
|
7538
7908
|
description: JSONDocument;
|
|
7539
7909
|
/** Whether an AI agent should be able to fix this finding directly */
|
|
7540
7910
|
autoFixable: boolean;
|
|
7541
|
-
/** 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). */
|
|
7911
|
+
/** 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. */
|
|
7542
7912
|
brokenLinkAction?: SiteFindingBrokenLinkAction;
|
|
7543
7913
|
/** 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. */
|
|
7544
7914
|
outboundLink?: SiteFindingOutboundLink;
|
|
@@ -7658,6 +8028,13 @@ export interface SiteFindingStatsSeverities {
|
|
|
7658
8028
|
}
|
|
7659
8029
|
/** 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. */
|
|
7660
8030
|
export type SiteFindingStatsConnectors = Record<string, number>;
|
|
8031
|
+
/** Breakdown of the broken-link findings included in the aggregation. */
|
|
8032
|
+
export interface SiteFindingStatsBrokenLinks {
|
|
8033
|
+
/** Broken URLs the audit found a page to redirect to. */
|
|
8034
|
+
redirectSuggested: number;
|
|
8035
|
+
/** Broken URLs the audit judged and found no page to redirect to. */
|
|
8036
|
+
noMatchingPage: number;
|
|
8037
|
+
}
|
|
7661
8038
|
/** Aggregated stats for the findings identified on a site. */
|
|
7662
8039
|
export interface SiteFindingStats {
|
|
7663
8040
|
/** Total count of findings included in the aggregation. */
|
|
@@ -7668,6 +8045,8 @@ export interface SiteFindingStats {
|
|
|
7668
8045
|
severities: SiteFindingStatsSeverities;
|
|
7669
8046
|
/** 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. */
|
|
7670
8047
|
connectors: SiteFindingStatsConnectors;
|
|
8048
|
+
/** Breakdown of the broken-link findings included in the aggregation. */
|
|
8049
|
+
brokenLinks: SiteFindingStatsBrokenLinks;
|
|
7671
8050
|
/** Count of findings with at least one piece of evidence coming from a site question. */
|
|
7672
8051
|
questions: number;
|
|
7673
8052
|
/** Count of change requests created to fix a finding that have been merged. */
|
|
@@ -7839,6 +8218,12 @@ export type ContextConnectorSetup = {
|
|
|
7839
8218
|
* @maxLength 1024
|
|
7840
8219
|
*/
|
|
7841
8220
|
apiToken: string;
|
|
8221
|
+
/**
|
|
8222
|
+
* Projects where GitBook handles issues. Empty means all accessible projects.
|
|
8223
|
+
* @maxItems 100
|
|
8224
|
+
* @uniqueItems true
|
|
8225
|
+
*/
|
|
8226
|
+
projectKeys?: string[];
|
|
7842
8227
|
/** 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. */
|
|
7843
8228
|
statusMapping?: Record<ChangeRequestStatus, string>;
|
|
7844
8229
|
};
|
|
@@ -8072,6 +8457,8 @@ export interface AIToolCallSearchResultPage {
|
|
|
8072
8457
|
pageId: string;
|
|
8073
8458
|
/** The revision ID of the result */
|
|
8074
8459
|
revisionId: string;
|
|
8460
|
+
/** The path of the page within its space, as the published site serves it. */
|
|
8461
|
+
path?: string;
|
|
8075
8462
|
/** The anchor of the result */
|
|
8076
8463
|
anchor?: string;
|
|
8077
8464
|
/** The title of the result */
|
|
@@ -8334,6 +8721,20 @@ export interface AIToolCallCheckContentImport {
|
|
|
8334
8721
|
/** Number of pages the import has discovered so far. */
|
|
8335
8722
|
totalPages: number;
|
|
8336
8723
|
}
|
|
8724
|
+
/** 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. */
|
|
8725
|
+
export interface AIToolCallStartBackgroundAgent {
|
|
8726
|
+
tool: "startBackgroundAgent";
|
|
8727
|
+
/** Identifier of the background agent within the conversation that started it. */
|
|
8728
|
+
agentId: string;
|
|
8729
|
+
/** The child conversation holding the background agent's transcript. It can only be read, never continued. */
|
|
8730
|
+
conversationId: string;
|
|
8731
|
+
/** 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. */
|
|
8732
|
+
title: string;
|
|
8733
|
+
/** The task the background agent was given. */
|
|
8734
|
+
task: string;
|
|
8735
|
+
/** 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. */
|
|
8736
|
+
pages?: string[];
|
|
8737
|
+
}
|
|
8337
8738
|
/** Tool called from an MCP server */
|
|
8338
8739
|
export interface AIToolCallMCP {
|
|
8339
8740
|
tool: "mcp";
|
|
@@ -8357,7 +8758,7 @@ export interface AIToolCallOther {
|
|
|
8357
8758
|
/** Summary of a generic tool call. */
|
|
8358
8759
|
summary: AIToolCallOtherSummary;
|
|
8359
8760
|
}
|
|
8360
|
-
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;
|
|
8761
|
+
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;
|
|
8361
8762
|
export interface Timerange {
|
|
8362
8763
|
start: Timestamp;
|
|
8363
8764
|
end: Timestamp;
|
|
@@ -8449,6 +8850,10 @@ export type AIMessageTask = {
|
|
|
8449
8850
|
spaceId: string;
|
|
8450
8851
|
/** The ID of the change request to implement the task in. */
|
|
8451
8852
|
changeRequestId: string;
|
|
8853
|
+
} | {
|
|
8854
|
+
type: "background_agent";
|
|
8855
|
+
/** The conversation that started this background agent. */
|
|
8856
|
+
parentConversationId: string;
|
|
8452
8857
|
};
|
|
8453
8858
|
/** The response that generated this message. */
|
|
8454
8859
|
export interface AIMessageResponseMetadata {
|
|
@@ -8773,6 +9178,8 @@ export type SiteInsightsEventSession = SiteInsightsSession & {
|
|
|
8773
9178
|
export interface SiteInsightsEventLocation {
|
|
8774
9179
|
/** URL of the location. */
|
|
8775
9180
|
url: URL;
|
|
9181
|
+
/** 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. */
|
|
9182
|
+
previousUrl?: null | URL;
|
|
8776
9183
|
/**
|
|
8777
9184
|
* Whether the event was tracked on the site, the server, or an embed widget.
|
|
8778
9185
|
* @default "site"
|
|
@@ -8860,6 +9267,7 @@ export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
|
|
|
8860
9267
|
/** Event when a user views the ask UI. */
|
|
8861
9268
|
export type SiteInsightsEventAskView = SiteInsightsEventBase & {
|
|
8862
9269
|
type: "ask_view";
|
|
9270
|
+
trigger?: "hover" | "selection" | "site" | "page" | "embed";
|
|
8863
9271
|
};
|
|
8864
9272
|
export type SiteInsightsEventAskRateResponse = SiteInsightsEventBase & {
|
|
8865
9273
|
type: "ask_rate_response";
|
|
@@ -9001,6 +9409,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
9001
9409
|
column: "referrer";
|
|
9002
9410
|
} | {
|
|
9003
9411
|
column: "referrerDomain";
|
|
9412
|
+
} | {
|
|
9413
|
+
column: "previousUrl";
|
|
9004
9414
|
} | {
|
|
9005
9415
|
column: "utmSource";
|
|
9006
9416
|
} | {
|
|
@@ -9025,6 +9435,10 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
9025
9435
|
} | {
|
|
9026
9436
|
column: "eventTrademarkPlacement";
|
|
9027
9437
|
};
|
|
9438
|
+
/**
|
|
9439
|
+
* Ratings submitted on a page, counted once per rating a reader submitted rather than once
|
|
9440
|
+
* per event.
|
|
9441
|
+
*/
|
|
9028
9442
|
export type SiteInsightsQueryEventsValues = {
|
|
9029
9443
|
column: "datetime";
|
|
9030
9444
|
values: Timestamp[];
|
|
@@ -9106,6 +9520,7 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
9106
9520
|
values: SiteInsightsDisplayContext[];
|
|
9107
9521
|
} | {
|
|
9108
9522
|
column: "page";
|
|
9523
|
+
/** Pages to match. `null` matches events that resolved to no page, which for `page_view` events is a 404 (a broken URL). */
|
|
9109
9524
|
values: (null | {
|
|
9110
9525
|
page: string | null;
|
|
9111
9526
|
space: string;
|
|
@@ -9166,6 +9581,9 @@ export type SiteInsightsQueryEventsValues = {
|
|
|
9166
9581
|
} | {
|
|
9167
9582
|
column: "referrerDomain";
|
|
9168
9583
|
values: string[];
|
|
9584
|
+
} | {
|
|
9585
|
+
column: "previousUrl";
|
|
9586
|
+
values: string[];
|
|
9169
9587
|
} | {
|
|
9170
9588
|
column: "utmSource";
|
|
9171
9589
|
values: string[];
|
|
@@ -9542,11 +9960,11 @@ export type OrganizationBillingDateOverride = true | Timestamp;
|
|
|
9542
9960
|
*/
|
|
9543
9961
|
export type OrganizationBillingNumericOverride = number;
|
|
9544
9962
|
/**
|
|
9545
|
-
*
|
|
9963
|
+
* A percentage from 0 to 100.
|
|
9546
9964
|
* @min 0
|
|
9547
9965
|
* @max 100
|
|
9548
9966
|
*/
|
|
9549
|
-
export type
|
|
9967
|
+
export type Percentage = number;
|
|
9550
9968
|
export interface OrganizationBillingOverrides {
|
|
9551
9969
|
overrides: {
|
|
9552
9970
|
/** Current interval-change override, when set. */
|
|
@@ -9556,9 +9974,11 @@ export interface OrganizationBillingOverrides {
|
|
|
9556
9974
|
/** Contractual AI credit allowance for Enterprise organizations only. */
|
|
9557
9975
|
aiCreditAllowance?: OrganizationBillingNumericOverride;
|
|
9558
9976
|
/** Percentage of remaining paid AI credits carried into the next billing period. Paid self-serve organizations default to 50% when unset. */
|
|
9559
|
-
aiCreditRollover?:
|
|
9977
|
+
aiCreditRollover?: Percentage;
|
|
9560
9978
|
/** Percentage of total AI credits remaining at which to send a low-balance alert. */
|
|
9561
|
-
aiCreditAlertThreshold?:
|
|
9979
|
+
aiCreditAlertThreshold?: Percentage;
|
|
9980
|
+
/** Whether AI features pause automatically once all AI credits are used, before usage is billed as overage. */
|
|
9981
|
+
aiCreditPauseEnabled?: boolean;
|
|
9562
9982
|
/** Current minimum users override, when set. */
|
|
9563
9983
|
minUsers?: OrganizationBillingNumericOverride;
|
|
9564
9984
|
/** Current maximum users override, when set. */
|
|
@@ -9573,6 +9993,8 @@ export interface OrganizationBillingOverrides {
|
|
|
9573
9993
|
maxUltimateSites?: OrganizationBillingNumericOverride;
|
|
9574
9994
|
};
|
|
9575
9995
|
}
|
|
9996
|
+
/** A percentage threshold, or null when disabled. */
|
|
9997
|
+
export type PercentageThreshold = Percentage | null;
|
|
9576
9998
|
export type BackOfficeSite = Site & {
|
|
9577
9999
|
/** ID of the organization owning this site */
|
|
9578
10000
|
organization: string;
|
|
@@ -9619,6 +10041,8 @@ export interface SiteVisitorPayload {
|
|
|
9619
10041
|
type?: "human" | "agent";
|
|
9620
10042
|
/** JWT token generated for a authenticated access session. */
|
|
9621
10043
|
jwtToken?: string;
|
|
10044
|
+
/** ISO 3166-1 alpha-2 code of the country the visitor is browsing from, as detected by the renderer. */
|
|
10045
|
+
country?: string;
|
|
9622
10046
|
unsignedClaims?: PlainObject;
|
|
9623
10047
|
}
|
|
9624
10048
|
/** GitHub repository that can be selected for Git Sync. */
|
|
@@ -9899,7 +10323,15 @@ export interface GitSyncSpaceOperation {
|
|
|
9899
10323
|
* creating a new revision.
|
|
9900
10324
|
*/
|
|
9901
10325
|
stage: GitSyncOperationStage;
|
|
10326
|
+
/**
|
|
10327
|
+
* Always `0`. Task-level progress is no longer tracked; read `stage` instead.
|
|
10328
|
+
* @deprecated
|
|
10329
|
+
*/
|
|
9902
10330
|
dispatchedTasks: number;
|
|
10331
|
+
/**
|
|
10332
|
+
* Always `0`. Task-level progress is no longer tracked; read `stage` instead.
|
|
10333
|
+
* @deprecated
|
|
10334
|
+
*/
|
|
9903
10335
|
completedTasks: number;
|
|
9904
10336
|
/** Date when the operation was started */
|
|
9905
10337
|
startedAt: Timestamp;
|
|
@@ -10391,6 +10823,8 @@ export interface ContentAPIBaseToken {
|
|
|
10391
10823
|
spaces: string[];
|
|
10392
10824
|
/** Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted. */
|
|
10393
10825
|
visitorType?: "human" | "agent";
|
|
10826
|
+
/** The region containing the country of the visitor for whom the token was generated. Omitted if the country isn't in any region. */
|
|
10827
|
+
visitorRegion?: string;
|
|
10394
10828
|
/** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
|
|
10395
10829
|
claims?: Record<string, any>;
|
|
10396
10830
|
/** Multiplier for the rate limit applied to the token. */
|
|
@@ -10779,6 +11213,22 @@ export interface APIChannelMutationData {
|
|
|
10779
11213
|
executionId: string;
|
|
10780
11214
|
};
|
|
10781
11215
|
}
|
|
11216
|
+
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
11217
|
+
export interface SiteAdaptiveJSONSchema {
|
|
11218
|
+
$schema?: "http://json-schema.org/draft-07/schema#";
|
|
11219
|
+
type: "object";
|
|
11220
|
+
properties: {
|
|
11221
|
+
/** Unsigned claims of the site visitor. */
|
|
11222
|
+
unsigned?: {
|
|
11223
|
+
type: "object";
|
|
11224
|
+
description: "Unsigned claims of the site visitor.";
|
|
11225
|
+
properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
|
|
11226
|
+
additionalProperties: false;
|
|
11227
|
+
};
|
|
11228
|
+
[key: string]: any;
|
|
11229
|
+
};
|
|
11230
|
+
additionalProperties: false;
|
|
11231
|
+
}
|
|
10782
11232
|
export type SiteAdaptiveDeterministicJSONSchemaClaimsProperties = SiteAdaptiveDeterministicJSONSchemaPrimitives | {
|
|
10783
11233
|
type: "object";
|
|
10784
11234
|
description: string;
|
|
@@ -10851,6 +11301,34 @@ export interface AgentEditTarget {
|
|
|
10851
11301
|
/** The ID of the change request the edits are made in. Absent when the space itself is the target, through its unlocked live edits. */
|
|
10852
11302
|
changeRequestId?: string;
|
|
10853
11303
|
}
|
|
11304
|
+
/** 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. */
|
|
11305
|
+
export interface AgentBackgroundAgent {
|
|
11306
|
+
/** Identifier of the background agent within the conversation that started it. */
|
|
11307
|
+
id: string;
|
|
11308
|
+
/** The child conversation holding its transcript, which can only be read. */
|
|
11309
|
+
conversationId: string;
|
|
11310
|
+
/** A few words naming what it is doing, for a tab and a line of a transcript. */
|
|
11311
|
+
title: string;
|
|
11312
|
+
/** The task it was given. */
|
|
11313
|
+
task: string;
|
|
11314
|
+
/**
|
|
11315
|
+
* What became of a background agent.
|
|
11316
|
+
* `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.
|
|
11317
|
+
*/
|
|
11318
|
+
status: AgentBackgroundAgentStatus;
|
|
11319
|
+
/**
|
|
11320
|
+
* When it was started.
|
|
11321
|
+
* @format date-time
|
|
11322
|
+
*/
|
|
11323
|
+
startedAt: string;
|
|
11324
|
+
/**
|
|
11325
|
+
* When it stopped running. Absent while it still runs.
|
|
11326
|
+
* @format date-time
|
|
11327
|
+
*/
|
|
11328
|
+
finishedAt?: string;
|
|
11329
|
+
/** Why it failed, when it did. */
|
|
11330
|
+
error?: string;
|
|
11331
|
+
}
|
|
10854
11332
|
export interface AgentState {
|
|
10855
11333
|
status: AgentStatus;
|
|
10856
11334
|
/** List of response suggestions for the user to select from. */
|
|
@@ -10867,6 +11345,8 @@ export interface AgentState {
|
|
|
10867
11345
|
editTarget?: AgentEditTarget;
|
|
10868
11346
|
/** How far this conversation should reach when it changes content. */
|
|
10869
11347
|
editScope?: AgentEditScope;
|
|
11348
|
+
/** 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. */
|
|
11349
|
+
backgroundAgents?: AgentBackgroundAgent[];
|
|
10870
11350
|
/** 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. */
|
|
10871
11351
|
consultOnly?: boolean;
|
|
10872
11352
|
}
|
|
@@ -11678,7 +12158,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11678
12158
|
schema?: "current" | "next";
|
|
11679
12159
|
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
11680
12160
|
/**
|
|
11681
|
-
* @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.
|
|
12161
|
+
* @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.
|
|
11682
12162
|
*
|
|
11683
12163
|
* @tags change-requests
|
|
11684
12164
|
* @name CreateChangeRequest
|
|
@@ -11691,6 +12171,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11691
12171
|
subject?: string;
|
|
11692
12172
|
/** Template to apply to the change request */
|
|
11693
12173
|
template?: ApplySpaceTemplate;
|
|
12174
|
+
/** 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. */
|
|
12175
|
+
description?: JSONDocument;
|
|
12176
|
+
/** 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. */
|
|
12177
|
+
siteFindingId?: string;
|
|
11694
12178
|
[key: string]: any;
|
|
11695
12179
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
11696
12180
|
/**
|
|
@@ -11746,7 +12230,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11746
12230
|
};
|
|
11747
12231
|
}>>;
|
|
11748
12232
|
/**
|
|
11749
|
-
* @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.
|
|
12233
|
+
* @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.
|
|
11750
12234
|
*
|
|
11751
12235
|
* @tags change-requests
|
|
11752
12236
|
* @name UpdateChangeRequestById
|
|
@@ -11764,6 +12248,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11764
12248
|
*/
|
|
11765
12249
|
links?: ChangeRequestLinkInput[];
|
|
11766
12250
|
status?: "draft" | "open" | "archived";
|
|
12251
|
+
/** 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. */
|
|
12252
|
+
siteFindingId?: string | null;
|
|
11767
12253
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
11768
12254
|
/**
|
|
11769
12255
|
* @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.
|
|
@@ -11839,6 +12325,25 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11839
12325
|
/** Optionally, provide a comment along with the review. */
|
|
11840
12326
|
comment?: Document;
|
|
11841
12327
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequestReview, any>>;
|
|
12328
|
+
/**
|
|
12329
|
+
* @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.
|
|
12330
|
+
*
|
|
12331
|
+
* @tags change-requests-reviews
|
|
12332
|
+
* @name GetReviewStatsByChangeRequestId
|
|
12333
|
+
* @summary Get review totals for a change request
|
|
12334
|
+
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/reviews/stats
|
|
12335
|
+
* @secure
|
|
12336
|
+
*/
|
|
12337
|
+
getReviewStatsByChangeRequestId: (spaceId: EntityId, changeRequestId: EntityId, query?: {
|
|
12338
|
+
/** Filter reviews marked as outdated. */
|
|
12339
|
+
outdated?: boolean;
|
|
12340
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequestReviewStats, {
|
|
12341
|
+
error: {
|
|
12342
|
+
/** @format int32 */
|
|
12343
|
+
code: 404;
|
|
12344
|
+
message: string;
|
|
12345
|
+
};
|
|
12346
|
+
}>>;
|
|
11842
12347
|
/**
|
|
11843
12348
|
* @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.
|
|
11844
12349
|
*
|
|
@@ -13847,7 +14352,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13847
14352
|
withDefaultSite?: boolean;
|
|
13848
14353
|
/** URL of an OpenAPI/Swagger specification to import and attach to the default site as a reference. Only used when `withDefaultSite` is true. */
|
|
13849
14354
|
openapiUrl?: string;
|
|
13850
|
-
}, params?: RequestParams) => Promise<HttpResponse<Organization
|
|
14355
|
+
}, params?: RequestParams) => Promise<HttpResponse<Organization & {
|
|
14356
|
+
/** 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. */
|
|
14357
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
14358
|
+
}, any>>;
|
|
13851
14359
|
/**
|
|
13852
14360
|
* No description
|
|
13853
14361
|
*
|
|
@@ -13885,8 +14393,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13885
14393
|
logo?: URL | null;
|
|
13886
14394
|
sso?: boolean;
|
|
13887
14395
|
ai?: boolean;
|
|
14396
|
+
/** Partial AI preference update. Omitted keys are unchanged; null removes an opt-out. */
|
|
14397
|
+
aiSettings?: OrganizationAISettingsUpdate;
|
|
13888
14398
|
inviteLinks?: boolean;
|
|
13889
14399
|
mergeRules?: MergeRulesStandaloneConfiguration;
|
|
14400
|
+
supportCost?: OrganizationSupportCost | null;
|
|
13890
14401
|
}, params?: RequestParams) => Promise<HttpResponse<Organization, {
|
|
13891
14402
|
error: {
|
|
13892
14403
|
/** @format int32 */
|
|
@@ -14115,6 +14626,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14115
14626
|
/** A JTW token containing the claims to attach to this user. */
|
|
14116
14627
|
gitbookVisitorClaims?: string;
|
|
14117
14628
|
}, any>>;
|
|
14629
|
+
/**
|
|
14630
|
+
* @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.
|
|
14631
|
+
*
|
|
14632
|
+
* @tags organizations
|
|
14633
|
+
* @name GetOrganizationSubscription
|
|
14634
|
+
* @summary Get an organization's subscription
|
|
14635
|
+
* @request GET:/orgs/{organizationId}/subscription
|
|
14636
|
+
* @secure
|
|
14637
|
+
*/
|
|
14638
|
+
getOrganizationSubscription: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<OrganizationSubscription, {
|
|
14639
|
+
error: {
|
|
14640
|
+
/** @format int32 */
|
|
14641
|
+
code: 404;
|
|
14642
|
+
message: string;
|
|
14643
|
+
};
|
|
14644
|
+
}>>;
|
|
14118
14645
|
/**
|
|
14119
14646
|
* No description
|
|
14120
14647
|
*
|
|
@@ -14428,6 +14955,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14428
14955
|
message: string;
|
|
14429
14956
|
};
|
|
14430
14957
|
}>>;
|
|
14958
|
+
/**
|
|
14959
|
+
* @description Returns recorded AI usage for an organization. Calendar buckets use UTC; weeks start on Monday. Requires organization administrator permissions.
|
|
14960
|
+
*
|
|
14961
|
+
* @tags billing
|
|
14962
|
+
* @name GetOrganizationAiUsage
|
|
14963
|
+
* @summary Get AI credit usage by AI feature and time period
|
|
14964
|
+
* @request GET:/orgs/{organizationId}/billing/ai-usage
|
|
14965
|
+
* @secure
|
|
14966
|
+
*/
|
|
14967
|
+
getOrganizationAiUsage: (organizationId: EntityId, query: {
|
|
14968
|
+
/**
|
|
14969
|
+
* Inclusive start timestamp. Cannot be older than two years from now.
|
|
14970
|
+
* @format date-time
|
|
14971
|
+
*/
|
|
14972
|
+
from: string;
|
|
14973
|
+
/**
|
|
14974
|
+
* Exclusive end timestamp.
|
|
14975
|
+
* @format date-time
|
|
14976
|
+
*/
|
|
14977
|
+
to: string;
|
|
14978
|
+
/** Calendar interval used to aggregate usage. */
|
|
14979
|
+
interval?: AIUsageInterval;
|
|
14980
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationAIUsage, any>>;
|
|
14431
14981
|
/**
|
|
14432
14982
|
* No description
|
|
14433
14983
|
*
|
|
@@ -15421,7 +15971,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15421
15971
|
*/
|
|
15422
15972
|
deleteCustomFont: (organizationId: EntityId, fontId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15423
15973
|
/**
|
|
15424
|
-
* @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.
|
|
15974
|
+
* @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.
|
|
15425
15975
|
*
|
|
15426
15976
|
* @tags sites, critical
|
|
15427
15977
|
* @name ListSites
|
|
@@ -15479,7 +16029,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15479
16029
|
spaces?: string[];
|
|
15480
16030
|
}, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
|
|
15481
16031
|
/**
|
|
15482
|
-
* @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.
|
|
16032
|
+
* @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.
|
|
15483
16033
|
*
|
|
15484
16034
|
* @tags sites
|
|
15485
16035
|
* @name GetSiteById
|
|
@@ -15597,8 +16147,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15597
16147
|
* @secure
|
|
15598
16148
|
*/
|
|
15599
16149
|
updateSiteAdaptiveSchema: (organizationId: EntityId, siteId: string, data: {
|
|
15600
|
-
/** The JSON schema to set on the site. */
|
|
15601
|
-
jsonSchema:
|
|
16150
|
+
/** The JSON schema to set on the site. `regions` is only accepted for organizations with regions enabled. */
|
|
16151
|
+
jsonSchema: SiteAdaptiveJSONSchemaWithRegions;
|
|
15602
16152
|
}, params?: RequestParams) => Promise<HttpResponse<SiteAdaptiveSchema, Error | {
|
|
15603
16153
|
error: {
|
|
15604
16154
|
/** @format int32 */
|
|
@@ -15646,10 +16196,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15646
16196
|
* @request POST:/orgs/{organizationId}/sites/{siteId}/publish
|
|
15647
16197
|
* @secure
|
|
15648
16198
|
*/
|
|
15649
|
-
publishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site
|
|
16199
|
+
publishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<(Site & {
|
|
16200
|
+
/** 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. */
|
|
16201
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16202
|
+
}) | {
|
|
15650
16203
|
type: "checkout";
|
|
15651
16204
|
/** Stripe payment session ID */
|
|
15652
16205
|
sessionId: string;
|
|
16206
|
+
/** 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. */
|
|
16207
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
15653
16208
|
}, any>>;
|
|
15654
16209
|
/**
|
|
15655
16210
|
* @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.
|
|
@@ -15661,6 +16216,122 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15661
16216
|
* @secure
|
|
15662
16217
|
*/
|
|
15663
16218
|
unpublishSite: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<Site, any>>;
|
|
16219
|
+
/**
|
|
16220
|
+
* @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.
|
|
16221
|
+
*
|
|
16222
|
+
* @tags site-change-requests
|
|
16223
|
+
* @name ListChangeRequestsForSite
|
|
16224
|
+
* @summary List all change requests for a site
|
|
16225
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/change-requests
|
|
16226
|
+
* @secure
|
|
16227
|
+
*/
|
|
16228
|
+
listChangeRequestsForSite: (organizationId: EntityId, siteId: string, query?: {
|
|
16229
|
+
/** Identifier of the page results to fetch. */
|
|
16230
|
+
page?: string;
|
|
16231
|
+
/**
|
|
16232
|
+
* The number of results per page
|
|
16233
|
+
* @min 0
|
|
16234
|
+
* @max 1000
|
|
16235
|
+
*/
|
|
16236
|
+
limit?: number;
|
|
16237
|
+
/**
|
|
16238
|
+
* If defined, only change requests matching this status will be returned.
|
|
16239
|
+
* @default "open"
|
|
16240
|
+
*/
|
|
16241
|
+
status?: ChangeRequestStatus;
|
|
16242
|
+
/** If defined, only change requests created by this user will be returned. */
|
|
16243
|
+
createdBy?: string;
|
|
16244
|
+
/** If defined, only change requests moved out of draft by this user will be returned. */
|
|
16245
|
+
openedBy?: string;
|
|
16246
|
+
/** If defined, only change requests archived by this user will be returned. */
|
|
16247
|
+
archivedBy?: string;
|
|
16248
|
+
/** If defined, only change requests merged by this user will be returned. */
|
|
16249
|
+
mergedBy?: string;
|
|
16250
|
+
/** If defined, only change requests with contributions from this user will be returned. */
|
|
16251
|
+
contributor?: string;
|
|
16252
|
+
/**
|
|
16253
|
+
* Status of the members.
|
|
16254
|
+
* @default "active"
|
|
16255
|
+
*/
|
|
16256
|
+
memberStatus?: SiteChangeRequestMemberStatus;
|
|
16257
|
+
/** The field to sort change requests by. Defaults to 'updatedAt'. */
|
|
16258
|
+
orderBy?: ChangeRequestOrderBy;
|
|
16259
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
16260
|
+
items: SiteChangeRequest[];
|
|
16261
|
+
}, any>>;
|
|
16262
|
+
/**
|
|
16263
|
+
* @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.
|
|
16264
|
+
*
|
|
16265
|
+
* @tags site-change-requests
|
|
16266
|
+
* @name CreateSiteChangeRequest
|
|
16267
|
+
* @summary Create a new change request in a site
|
|
16268
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/change-requests
|
|
16269
|
+
* @secure
|
|
16270
|
+
*/
|
|
16271
|
+
createSiteChangeRequest: (organizationId: EntityId, siteId: string, data: {
|
|
16272
|
+
/** Subject of the change request */
|
|
16273
|
+
subject?: ChangeRequestSubject;
|
|
16274
|
+
description?: JSONDocument;
|
|
16275
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, any>>;
|
|
16276
|
+
/**
|
|
16277
|
+
* @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.
|
|
16278
|
+
*
|
|
16279
|
+
* @tags site-change-requests
|
|
16280
|
+
* @name GetSiteChangeRequestById
|
|
16281
|
+
* @summary Get a site change request by its ID
|
|
16282
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
|
|
16283
|
+
* @secure
|
|
16284
|
+
*/
|
|
16285
|
+
getSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, {
|
|
16286
|
+
error: {
|
|
16287
|
+
/** @format int32 */
|
|
16288
|
+
code: 404;
|
|
16289
|
+
message: string;
|
|
16290
|
+
};
|
|
16291
|
+
}>>;
|
|
16292
|
+
/**
|
|
16293
|
+
* @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.
|
|
16294
|
+
*
|
|
16295
|
+
* @tags site-change-requests
|
|
16296
|
+
* @name UpdateSiteChangeRequestById
|
|
16297
|
+
* @summary Update a site change request's subject, description, or status
|
|
16298
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
|
|
16299
|
+
* @secure
|
|
16300
|
+
*/
|
|
16301
|
+
updateSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, data: {
|
|
16302
|
+
/** Subject of the change request */
|
|
16303
|
+
subject?: ChangeRequestSubject;
|
|
16304
|
+
description?: JSONDocument;
|
|
16305
|
+
status?: "draft" | "open" | "archived";
|
|
16306
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteChangeRequest, {
|
|
16307
|
+
error: {
|
|
16308
|
+
/** @format int32 */
|
|
16309
|
+
code: 404;
|
|
16310
|
+
message: string;
|
|
16311
|
+
};
|
|
16312
|
+
} | {
|
|
16313
|
+
error: {
|
|
16314
|
+
/** @format int32 */
|
|
16315
|
+
code: 409;
|
|
16316
|
+
message: string;
|
|
16317
|
+
};
|
|
16318
|
+
}>>;
|
|
16319
|
+
/**
|
|
16320
|
+
* @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.
|
|
16321
|
+
*
|
|
16322
|
+
* @tags site-change-requests
|
|
16323
|
+
* @name DeleteSiteChangeRequestById
|
|
16324
|
+
* @summary Delete a site change request
|
|
16325
|
+
* @request DELETE:/orgs/{organizationId}/sites/{siteId}/change-requests/{changeRequestId}
|
|
16326
|
+
* @secure
|
|
16327
|
+
*/
|
|
16328
|
+
deleteSiteChangeRequestById: (organizationId: EntityId, siteId: string, changeRequestId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, {
|
|
16329
|
+
error: {
|
|
16330
|
+
/** @format int32 */
|
|
16331
|
+
code: 409;
|
|
16332
|
+
message: string;
|
|
16333
|
+
};
|
|
16334
|
+
}>>;
|
|
15664
16335
|
/**
|
|
15665
16336
|
* @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.
|
|
15666
16337
|
*
|
|
@@ -15722,7 +16393,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15722
16393
|
*/
|
|
15723
16394
|
deleteSiteShareLinkById: (organizationId: EntityId, siteId: string, shareLinkId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
15724
16395
|
/**
|
|
15725
|
-
* @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.
|
|
16396
|
+
* @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.
|
|
15726
16397
|
*
|
|
15727
16398
|
* @tags site-structure
|
|
15728
16399
|
* @name GetSiteStructure
|
|
@@ -15829,6 +16500,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15829
16500
|
siteSpace?: string;
|
|
15830
16501
|
/** Rison encoded string of attributes/assertions about the visitor for which we want to preview the site. */
|
|
15831
16502
|
claims?: string;
|
|
16503
|
+
/** 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`. */
|
|
16504
|
+
country?: string;
|
|
15832
16505
|
/**
|
|
15833
16506
|
* Whether to include draft content in the preview. Defaults to true
|
|
15834
16507
|
* @default true
|
|
@@ -15877,7 +16550,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15877
16550
|
* @request PUT:/orgs/{organizationId}/sites/{siteId}/customization
|
|
15878
16551
|
* @secure
|
|
15879
16552
|
*/
|
|
15880
|
-
updateSiteCustomizationById: (organizationId: EntityId, siteId: string, data: SiteCustomizationSettingsInput, params?: RequestParams) => Promise<HttpResponse<
|
|
16553
|
+
updateSiteCustomizationById: (organizationId: EntityId, siteId: string, data: SiteCustomizationSettingsInput, params?: RequestParams) => Promise<HttpResponse<SiteCustomizationSettingsBase & {
|
|
16554
|
+
/** When the customization settings were updated. If missing, customization was not updated. */
|
|
16555
|
+
updatedAt?: Timestamp;
|
|
16556
|
+
} & {
|
|
16557
|
+
/** 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. */
|
|
16558
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16559
|
+
}, {
|
|
15881
16560
|
error: {
|
|
15882
16561
|
/** @format int32 */
|
|
15883
16562
|
code: 400;
|
|
@@ -15942,7 +16621,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15942
16621
|
title?: SiteTitle;
|
|
15943
16622
|
}, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
|
|
15944
16623
|
/**
|
|
15945
|
-
* @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.
|
|
16624
|
+
* @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.
|
|
15946
16625
|
*
|
|
15947
16626
|
* @tags site-spaces, critical
|
|
15948
16627
|
* @name ListSiteSpaces
|
|
@@ -16006,7 +16685,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16006
16685
|
parent?: string;
|
|
16007
16686
|
/** Whether the section group should be created in draft mode. */
|
|
16008
16687
|
draft?: boolean;
|
|
16009
|
-
}, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup
|
|
16688
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup & {
|
|
16689
|
+
/** 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. */
|
|
16690
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16691
|
+
}, any>>;
|
|
16010
16692
|
/**
|
|
16011
16693
|
* @description Updates a section group's properties in the site's navigation structure.
|
|
16012
16694
|
*
|
|
@@ -16063,7 +16745,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16063
16745
|
pageId?: string;
|
|
16064
16746
|
/** ID of the section group to create the section in */
|
|
16065
16747
|
siteSectionGroupId?: string;
|
|
16066
|
-
}, params?: RequestParams) => Promise<HttpResponse<SiteSection
|
|
16748
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteSection & {
|
|
16749
|
+
/** 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. */
|
|
16750
|
+
subscriptionNotice?: SubscriptionNotice;
|
|
16751
|
+
}, any>>;
|
|
16067
16752
|
/**
|
|
16068
16753
|
* @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.
|
|
16069
16754
|
*
|
|
@@ -16452,7 +17137,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16452
17137
|
*/
|
|
16453
17138
|
getSiteScanById: (organizationId: EntityId, siteId: string, siteScanId: string, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
|
|
16454
17139
|
/**
|
|
16455
|
-
* @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.
|
|
17140
|
+
* @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.
|
|
16456
17141
|
*
|
|
16457
17142
|
* @tags site-context
|
|
16458
17143
|
* @name ListSiteFindings
|
|
@@ -16477,6 +17162,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16477
17162
|
status?: SiteFindingStatus;
|
|
16478
17163
|
/** Filter findings by type. When multiple types are given, findings matching any of them are returned. */
|
|
16479
17164
|
type?: SiteFindingType[];
|
|
17165
|
+
/** 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. */
|
|
17166
|
+
url?: string;
|
|
16480
17167
|
/** Filter findings by estimated severity. */
|
|
16481
17168
|
severity?: SiteFindingSeverity;
|
|
16482
17169
|
/** Filter findings that have at least one associated change request. */
|
|
@@ -17548,7 +18235,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17548
18235
|
};
|
|
17549
18236
|
}>>;
|
|
17550
18237
|
/**
|
|
17551
|
-
* @description Starts a style guide check: GitBook Agent reviews the given spaces against the site's style guide and proposes fixes.
|
|
18238
|
+
* @description Starts a style guide check: GitBook Agent reviews the given spaces against the site's style guide and proposes fixes. A space with no check open gets a new draft change request marked as belonging to the returned run; one whose check is still open has it taken over instead, so it stays marked with the run that opened it. Fails if the site has no style guide.
|
|
17552
18239
|
*
|
|
17553
18240
|
* @tags sites
|
|
17554
18241
|
* @name CreateSiteStyleguideRun
|
|
@@ -17566,7 +18253,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17566
18253
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
17567
18254
|
/** A style guide check run: one time a user asked GitBook Agent to check a set of the site's spaces against the site's style guide, opening a change request for each. */
|
|
17568
18255
|
run: SiteStyleguideRun;
|
|
17569
|
-
/** The change
|
|
18256
|
+
/** The change request each space's check runs in: opened by this run, or already open and taken over. One per space that could be started. */
|
|
17570
18257
|
changeRequests: ChangeRequest[];
|
|
17571
18258
|
}, {
|
|
17572
18259
|
error: {
|
|
@@ -17609,7 +18296,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17609
18296
|
events: SiteInsightsEvent[];
|
|
17610
18297
|
}, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
17611
18298
|
/**
|
|
17612
|
-
* @description Runs an aggregation query over a published site's Insights events, grouped and filtered over a time range. Use it to answer analytics questions about how visitors engage with a site's documentation.
|
|
18299
|
+
* @description Runs an aggregation query over a published site's Insights events, grouped and filtered over a time range. Use it to answer analytics questions about how visitors engage with a site's documentation: page views, visitors, searches, referrers, and broken URLs (404s). A 404 is a `page_view` or `search_open_result` event whose `page` is `null`, in the `site` display context; filter `eventPageNotFoundType` not in `conditional` to leave out 404s that adaptive content explains. Group by `datetime` for a trend over time and by `urlPath` for the top broken URLs.
|
|
17613
18300
|
*
|
|
17614
18301
|
* @tags site-insights
|
|
17615
18302
|
* @name AggregateSiteEvents
|
|
@@ -17654,6 +18341,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17654
18341
|
* @secure
|
|
17655
18342
|
*/
|
|
17656
18343
|
createSiteRedirect: (organizationId: EntityId, siteId: string, data: {
|
|
18344
|
+
/** The broken-link finding that prompted this redirect. Must belong to this site. Used to attribute redirect creation, including drafts, to the finding. */
|
|
18345
|
+
siteFindingId?: string;
|
|
17657
18346
|
/** The source path to redirect from. */
|
|
17658
18347
|
source: SiteRedirectSourcePath;
|
|
17659
18348
|
/**
|
|
@@ -17961,6 +18650,88 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17961
18650
|
createSiteChannel: (organizationId: EntityId, siteId: string, data: SiteChannelSetup & {
|
|
17962
18651
|
role?: SiteChannelRole;
|
|
17963
18652
|
}, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
|
|
18653
|
+
/**
|
|
18654
|
+
* @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.
|
|
18655
|
+
*
|
|
18656
|
+
* @tags site-channels
|
|
18657
|
+
* @name ListSiteChannelScopes
|
|
18658
|
+
* @summary List available site channel scopes
|
|
18659
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/channels/scopes
|
|
18660
|
+
* @secure
|
|
18661
|
+
*/
|
|
18662
|
+
listSiteChannelScopes: (organizationId: EntityId, siteId: string, data: {
|
|
18663
|
+
provider: "linear";
|
|
18664
|
+
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18665
|
+
siteChannelId: string;
|
|
18666
|
+
} | {
|
|
18667
|
+
provider: "github";
|
|
18668
|
+
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18669
|
+
siteChannelId: string;
|
|
18670
|
+
} | {
|
|
18671
|
+
provider: "slack";
|
|
18672
|
+
/** ID of an already-connected channel belonging to this site and matching the provider. */
|
|
18673
|
+
siteChannelId: string;
|
|
18674
|
+
} | {
|
|
18675
|
+
provider: "jira";
|
|
18676
|
+
credentials: {
|
|
18677
|
+
/**
|
|
18678
|
+
* Base URL of the Jira Cloud site, e.g. https://your-team.atlassian.net.
|
|
18679
|
+
* @format uri
|
|
18680
|
+
* @minLength 1
|
|
18681
|
+
* @maxLength 2048
|
|
18682
|
+
*/
|
|
18683
|
+
baseUrl: string;
|
|
18684
|
+
/**
|
|
18685
|
+
* Email of the Atlassian account whose API token is used.
|
|
18686
|
+
* @format email
|
|
18687
|
+
* @minLength 1
|
|
18688
|
+
* @maxLength 254
|
|
18689
|
+
*/
|
|
18690
|
+
apiEmail: string;
|
|
18691
|
+
/**
|
|
18692
|
+
* Atlassian API token used to verify the account and list accessible projects. Not saved.
|
|
18693
|
+
* @minLength 1
|
|
18694
|
+
* @maxLength 1024
|
|
18695
|
+
*/
|
|
18696
|
+
apiToken: string;
|
|
18697
|
+
};
|
|
18698
|
+
}, query?: {
|
|
18699
|
+
/** Identifier of the page results to fetch. */
|
|
18700
|
+
page?: string;
|
|
18701
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
18702
|
+
object: "site-channel-scopes";
|
|
18703
|
+
/** Linear workspace name, GitHub account name, Slack workspace name (or ID if unavailable), or Jira Cloud hostname. */
|
|
18704
|
+
connection: string;
|
|
18705
|
+
items: {
|
|
18706
|
+
/** Value accepted by the provider scope settings, such as a team key, repository full name, channel name, Jira project key. */
|
|
18707
|
+
key: string;
|
|
18708
|
+
name: string;
|
|
18709
|
+
}[];
|
|
18710
|
+
}, {
|
|
18711
|
+
error: {
|
|
18712
|
+
/** @format int32 */
|
|
18713
|
+
code: 400;
|
|
18714
|
+
message: string;
|
|
18715
|
+
};
|
|
18716
|
+
} | {
|
|
18717
|
+
error: {
|
|
18718
|
+
/** @format int32 */
|
|
18719
|
+
code: 401;
|
|
18720
|
+
message: string;
|
|
18721
|
+
};
|
|
18722
|
+
} | {
|
|
18723
|
+
error: {
|
|
18724
|
+
/** @format int32 */
|
|
18725
|
+
code: 403;
|
|
18726
|
+
message: string;
|
|
18727
|
+
};
|
|
18728
|
+
} | {
|
|
18729
|
+
error: {
|
|
18730
|
+
/** @format int32 */
|
|
18731
|
+
code: 404;
|
|
18732
|
+
message: string;
|
|
18733
|
+
};
|
|
18734
|
+
}>>;
|
|
17964
18735
|
/**
|
|
17965
18736
|
* @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.
|
|
17966
18737
|
*
|
|
@@ -17984,7 +18755,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17984
18755
|
role?: SiteChannelRole;
|
|
17985
18756
|
}, params?: RequestParams) => Promise<HttpResponse<SiteChannel, any>>;
|
|
17986
18757
|
/**
|
|
17987
|
-
*
|
|
18758
|
+
* @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.
|
|
17988
18759
|
*
|
|
17989
18760
|
* @tags site-channels
|
|
17990
18761
|
* @name DeleteSiteChannelById
|