@gitbook/api 0.193.0 → 0.195.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 +380 -58
- package/dist/constants.d.ts +6 -5
- package/dist/index.cjs +24 -7
- package/dist/index.js +22 -7
- package/package.json +1 -1
- package/spec/openapi.json +1100 -156
- package/spec/openapi.yaml +767 -110
package/dist/client.d.ts
CHANGED
|
@@ -324,13 +324,13 @@ export declare enum SiteQuestionType {
|
|
|
324
324
|
Unknown = "unknown"
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
327
|
-
* The field to sort site findings by. `updatedAt` returns the most recently updated findings first. `severity` returns the most severe findings first. `
|
|
327
|
+
* 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'.
|
|
328
328
|
* @default "updatedAt"
|
|
329
329
|
*/
|
|
330
330
|
export declare enum SiteFindingOrderBy {
|
|
331
331
|
UpdatedAt = "updatedAt",
|
|
332
332
|
Severity = "severity",
|
|
333
|
-
|
|
333
|
+
Sources = "sources"
|
|
334
334
|
}
|
|
335
335
|
/** Findings source filter matching evidence coming from site questions. */
|
|
336
336
|
export declare enum SiteTriageFilterQuestions {
|
|
@@ -347,12 +347,14 @@ export declare enum SiteFindingSeverity {
|
|
|
347
347
|
* - Outdated content: The content was correct but is no longer up to date with external context and may be misleading or incorrect.
|
|
348
348
|
* - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
|
|
349
349
|
* - Content gap: The content is missing important information that should be present to answer user questions effectively.
|
|
350
|
+
* - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.
|
|
350
351
|
* - Other: Any other type of finding not covered by the above categories.
|
|
351
352
|
*/
|
|
352
353
|
export declare enum SiteFindingType {
|
|
353
354
|
ContentOutdated = "content-outdated",
|
|
354
355
|
ContentIncorrect = "content-incorrect",
|
|
355
356
|
ContentGap = "content-gap",
|
|
357
|
+
BrokenLink = "broken-link",
|
|
356
358
|
Other = "other"
|
|
357
359
|
}
|
|
358
360
|
/**
|
|
@@ -725,11 +727,14 @@ export declare enum SiteFeatureKey {
|
|
|
725
727
|
SitesAiSearch = "sites-ai-search",
|
|
726
728
|
SitesAiAssistant = "sites-ai-assistant",
|
|
727
729
|
SitesAiInsights = "sites-ai-insights",
|
|
730
|
+
SitesFixBrokenLinks = "sites-fix-broken-links",
|
|
728
731
|
SitesConnections = "sites-connections",
|
|
732
|
+
SitesContentGaps = "sites-content-gaps",
|
|
729
733
|
SitesChannels = "sites-channels",
|
|
730
734
|
SitesEmbed = "sites-embed",
|
|
731
735
|
SitesApiPlayground = "sites-api-playground",
|
|
732
736
|
SitesBasicCustomization = "sites-basic-customization",
|
|
737
|
+
SitesBrokenLinks = "sites-broken-links",
|
|
733
738
|
SitesCustomDomain = "sites-custom-domain",
|
|
734
739
|
SitesCustomFonts = "sites-custom-fonts",
|
|
735
740
|
SitesCustomSubdirectory = "sites-custom-subdirectory",
|
|
@@ -812,6 +817,14 @@ export declare enum BillingTrialStatus {
|
|
|
812
817
|
Ended = "ended",
|
|
813
818
|
Expired = "expired"
|
|
814
819
|
}
|
|
820
|
+
/** The AI credit bundle to top up every month */
|
|
821
|
+
export declare enum BillingCreditsBundle {
|
|
822
|
+
None = "none",
|
|
823
|
+
Value135001500 = "13500_1500",
|
|
824
|
+
Value240006000 = "24000_6000",
|
|
825
|
+
Value4200018000 = "42000_18000",
|
|
826
|
+
Value6000040000 = "60000_40000"
|
|
827
|
+
}
|
|
815
828
|
/** Interval for a billing subscription */
|
|
816
829
|
export declare enum BillingInterval {
|
|
817
830
|
Monthly = "monthly",
|
|
@@ -1095,9 +1108,9 @@ export declare enum ContentVisibility {
|
|
|
1095
1108
|
Private = "private"
|
|
1096
1109
|
}
|
|
1097
1110
|
/** Data passed through a realtime channel */
|
|
1098
|
-
export type APIChannelData = APIChannelGitSyncOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
|
|
1111
|
+
export type APIChannelData = APIChannelGitSyncOperationData | APIChannelGitSyncSiteOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
|
|
1099
1112
|
/** Channel to subscribe to for realtime updates. */
|
|
1100
|
-
export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
|
|
1113
|
+
export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelCollection | APIChannelCollectionPublishingCustomization | APIChannelOrganizationInfo | APIChannelOrganizationAgentData | APIChannelOrganizationInviteLinks | APIChannelOrganizationMembers | APIChannelOrganizationMember | APIChannelOrganizationSAML | APIChannelOrganizationTeams | APIChannelOrganizationTeam | APIChannelOrganizationTeamMembers | APIChannelOrganizationTeamMember | APIChannelOrganizationSpaces | APIChannelOrganizationCollections | APIChannelOrganizationIntegrations | APIChannelOrganizationInstallations | APIChannelOrganizationSites | APIChannelOrganizationOpenAPISpecs | APIChannelOrganizationTranslations | APIChannelOrganizationTranslationsGlossary | APIChannelOrganizationCustomFonts | APIChannelOrganizationAgentInstructions | APIChannelOrganizationChangeRequests | APIChannelSpaceComments | APIChannelChangeRequestComments | APIChannelCommentInfo | APIChannelCommentReplies | APIChannelIntegration | APIChannelIntegrationInstallation | APIChannelIntegrationSpaceInstallation | APIChannelIntegrationSpaceInstallations | APIChannelIntegrationSiteInstallation | APIChannelIntegrationSiteInstallations | APIChannelPublishedContentSite | APIChannelSiteRedirects | APIChannelSite | APIChannelSiteChannels | APIChannelSiteContext | APIChannelSiteCustomization | APIChannelSiteAgentSettings | APIChannelSiteIntegrations | APIChannelSiteSpace | APIChannelSiteSpaceCustomization | APIChannelSiteStructure | APIChannelSiteAdaptiveSchema | APIChannelSitePublishingAuth | APIChannelSiteShareLinks | APIChannelSiteShareLink | APIChannelSiteMcpServers | APIChannelSiteMcpServer | APIChannelSiteSection | APIChannelCustomHostname | APIChannelGitSyncInstallation | APIChannelGitSyncOperation | APIChannelGitSyncSiteOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
|
|
1101
1114
|
/** An absolute reference to content in GitBook. */
|
|
1102
1115
|
export type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationReusableContent | ContentLocationOpenAPI;
|
|
1103
1116
|
export type PublishedContentRedirect = {
|
|
@@ -1153,7 +1166,9 @@ export type ChangeRequestContentChange = ({
|
|
|
1153
1166
|
operation: "delete_page";
|
|
1154
1167
|
} & ChangeRequestContentChangeDeletePage) | ({
|
|
1155
1168
|
operation: "revert_page";
|
|
1156
|
-
} & ChangeRequestContentChangeRevertPage)
|
|
1169
|
+
} & ChangeRequestContentChangeRevertPage) | ({
|
|
1170
|
+
operation: "insert_files";
|
|
1171
|
+
} & ChangeRequestContentChangeInsertFiles);
|
|
1157
1172
|
export type Revision = RevisionTypeEdits | RevisionTypeMerge | RevisionTypeRollback | RevisionTypeUpdate | RevisionTypeComputed;
|
|
1158
1173
|
export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink | RevisionPageComputed;
|
|
1159
1174
|
export interface ApiInformation {
|
|
@@ -1292,6 +1307,16 @@ export interface MergeRulesConfigurationNone {
|
|
|
1292
1307
|
}
|
|
1293
1308
|
export type MergeRulesStandaloneConfiguration = MergeRulesConfigurationRules | MergeRulesConfigurationNone;
|
|
1294
1309
|
export type MergeRulesSpaceConfiguration = MergeRulesConfigurationInherit | MergeRulesStandaloneConfiguration;
|
|
1310
|
+
/** An action the user can take to resolve a failed Git Sync operation. */
|
|
1311
|
+
export interface GitSyncOperationErrorAction {
|
|
1312
|
+
/** Label for the action. */
|
|
1313
|
+
label: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* URL where the user can resolve the failure.
|
|
1316
|
+
* @format uri
|
|
1317
|
+
*/
|
|
1318
|
+
url: string;
|
|
1319
|
+
}
|
|
1295
1320
|
export interface GitSyncState {
|
|
1296
1321
|
/** Repository name. */
|
|
1297
1322
|
repoName?: string;
|
|
@@ -1323,6 +1348,8 @@ export interface GitSyncState {
|
|
|
1323
1348
|
endedAt?: Timestamp;
|
|
1324
1349
|
/** Why the operation failed, when it did. */
|
|
1325
1350
|
error?: string;
|
|
1351
|
+
/** An action the user can take to resolve a failed Git Sync operation. */
|
|
1352
|
+
errorAction?: GitSyncOperationErrorAction;
|
|
1326
1353
|
};
|
|
1327
1354
|
/** When the Git provider details were last updated */
|
|
1328
1355
|
updatedAt?: Timestamp;
|
|
@@ -3348,7 +3375,7 @@ export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
|
|
|
3348
3375
|
document?: Document;
|
|
3349
3376
|
};
|
|
3350
3377
|
/**
|
|
3351
|
-
* Insert a new page into the change request.
|
|
3378
|
+
* Insert a new page into the change request. The title is taken from `title`, or, when the document is markdown, from the document's frontmatter or leading heading (which take precedence, matching Git Sync). When no title can be resolved, the page falls back to a default title.
|
|
3352
3379
|
* @example {"operation":"insert_page","title":"New page","document":{"markdown":"# New page\n\nThis is a new page.\n"}}
|
|
3353
3380
|
*/
|
|
3354
3381
|
export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
|
|
@@ -3387,6 +3414,39 @@ export interface ChangeRequestContentChangeRevertPage {
|
|
|
3387
3414
|
/** Keys of the specific blocks to revert within the page's document, as they appear in the page's document. If omitted, the whole page is reverted. */
|
|
3388
3415
|
block?: string[];
|
|
3389
3416
|
}
|
|
3417
|
+
/**
|
|
3418
|
+
* Upload files (images or attachments) into the change request. A document references one as `` or `[Label](/files/<fileId>)` — use a `ref` to reference it from a later change in the same batch, or read the generated IDs from `insertedFiles`.
|
|
3419
|
+
* @example {"operation":"insert_files","files":[{"ref":"architecture.png","name":"architecture.png","url":"https://example.com/architecture.png"}]}
|
|
3420
|
+
*/
|
|
3421
|
+
export interface ChangeRequestContentChangeInsertFiles {
|
|
3422
|
+
operation: "insert_files";
|
|
3423
|
+
/**
|
|
3424
|
+
* @maxItems 20
|
|
3425
|
+
* @minItems 1
|
|
3426
|
+
*/
|
|
3427
|
+
files: (({
|
|
3428
|
+
/**
|
|
3429
|
+
* Public http(s) URL to fetch the file from. A URL resolving to a private or reserved address is rejected — send internally hosted bytes with `base64` instead.
|
|
3430
|
+
* @format uri
|
|
3431
|
+
* @maxLength 2048
|
|
3432
|
+
*/
|
|
3433
|
+
url: string;
|
|
3434
|
+
} | {
|
|
3435
|
+
/** Base64-encoded bytes, max 1MB. Requires `contentType`. */
|
|
3436
|
+
base64: string;
|
|
3437
|
+
}) & {
|
|
3438
|
+
/** Temporary local reference for the file, used only for the lifetime of this request and never persisted. Pages inserted in the same batch can link to this file by its ref (e.g. `[File](./<ref>)`), which resolves to the file's ID at apply time — regardless of operation order or the file's eventual path. A ref must be unique within the batch and must not collide a page ref in the batch or an existing page path. */
|
|
3439
|
+
ref?: string;
|
|
3440
|
+
/**
|
|
3441
|
+
* Filename to store the file under, including its extension.
|
|
3442
|
+
* @minLength 1
|
|
3443
|
+
* @maxLength 256
|
|
3444
|
+
*/
|
|
3445
|
+
name: string;
|
|
3446
|
+
/** MIME type. Required with `base64`; overrides the source's own type otherwise. */
|
|
3447
|
+
contentType?: string;
|
|
3448
|
+
})[];
|
|
3449
|
+
}
|
|
3390
3450
|
export interface ChangeRequestContentUpdatePageRef {
|
|
3391
3451
|
/** Type of Object, always equals to "page". */
|
|
3392
3452
|
object: "page";
|
|
@@ -3426,6 +3486,8 @@ export interface ChangeRequestContentUpdate {
|
|
|
3426
3486
|
changeRequest: ChangeRequest;
|
|
3427
3487
|
/** One entry per affected page (deduplicated), in the order the pages were first touched by the batch. */
|
|
3428
3488
|
changes: ChangeRequestContentUpdateChange[];
|
|
3489
|
+
/** Files created by the `insert_files` changes in this batch, in the order they were inserted. Use their IDs to reference them from a document. */
|
|
3490
|
+
insertedFiles?: RevisionFile[];
|
|
3429
3491
|
}
|
|
3430
3492
|
export interface ChangedRevisionPage {
|
|
3431
3493
|
id: string;
|
|
@@ -3810,6 +3872,10 @@ export interface OrganizationBilling {
|
|
|
3810
3872
|
canChangeInterval: boolean;
|
|
3811
3873
|
/** Whether configuring SAML is allowed */
|
|
3812
3874
|
canUseSAML: boolean;
|
|
3875
|
+
/** 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. */
|
|
3876
|
+
creditsBundle: BillingCreditsBundle | null;
|
|
3877
|
+
/** Percentage of total AI credits remaining at which to send a low-balance alert, or null when the alert is disabled. */
|
|
3878
|
+
aiCreditAlertThreshold: number | null;
|
|
3813
3879
|
}
|
|
3814
3880
|
/**
|
|
3815
3881
|
* A short description giving context on the reason for the block.
|
|
@@ -4679,6 +4745,12 @@ export interface Site {
|
|
|
4679
4745
|
gitSync?: GitSyncState;
|
|
4680
4746
|
/** @format date-time */
|
|
4681
4747
|
createdAt: string;
|
|
4748
|
+
/**
|
|
4749
|
+
* When GitBook last completed a scan of the site's content
|
|
4750
|
+
* gaps. Absent until the site has been scanned at least once.
|
|
4751
|
+
* @format date-time
|
|
4752
|
+
*/
|
|
4753
|
+
lastScanAt?: string;
|
|
4682
4754
|
adaptiveContent?: SiteAdaptiveContent;
|
|
4683
4755
|
ads?: SiteAds;
|
|
4684
4756
|
/**
|
|
@@ -5423,9 +5495,41 @@ export interface UpgradeOrganizationBilling {
|
|
|
5423
5495
|
coupon?: BillingCoupon;
|
|
5424
5496
|
/** Optional usage addons to apply when upgrading: - if set, apply provided billable addons (non-billable meters are ignored) - if omitted, keep current subscription addons (or billing addons for new subs) - if omitted during interval switch, keep addon selection and switch addon price interval - if empty, or all provided meters are ignored, remove all existing billable addons */
|
|
5425
5497
|
addons?: BillingMeter[];
|
|
5498
|
+
/** The AI credit bundle to top up every month */
|
|
5499
|
+
creditsBundle?: BillingCreditsBundle;
|
|
5426
5500
|
/** Mode to use for the upgrade (default value is `commit`): - `commit`: a checkout session is returned or the upgrade is applied directly - `preview`: a preview invoice is always returned */
|
|
5427
5501
|
mode?: "commit" | "preview";
|
|
5428
5502
|
}
|
|
5503
|
+
/** A product line of an invoice, enriched and normalized for the billing summary UI. */
|
|
5504
|
+
export interface BillingInvoiceSummaryLine {
|
|
5505
|
+
/** How Stripe describes the line, as a fallback for lines the client cannot label itself. */
|
|
5506
|
+
description: string;
|
|
5507
|
+
amount: number;
|
|
5508
|
+
/** How many units the line bills, such as the number of members. */
|
|
5509
|
+
quantity?: number;
|
|
5510
|
+
/** Which kind of site a `sites` line bills for. */
|
|
5511
|
+
siteType?: SiteType;
|
|
5512
|
+
/** Price of a single unit, over the period the line covers. */
|
|
5513
|
+
unitAmount?: number;
|
|
5514
|
+
periodStart: Timestamp;
|
|
5515
|
+
periodEnd: Timestamp;
|
|
5516
|
+
/** What the invoice line is billing for, so a preview can be grouped by product area. */
|
|
5517
|
+
category: "members" | "sites" | "addons" | "credits" | "usage" | "watermark_removal" | "other";
|
|
5518
|
+
}
|
|
5519
|
+
/** An amount adjusting an invoice, summed across everything of its type. */
|
|
5520
|
+
export interface BillingInvoiceAdjustment {
|
|
5521
|
+
/** What adjusts the amount an invoice bills, beyond the products it lists. `proration` is the net of the mid-period changes, and `balance` the credit applied from the customer's balance. */
|
|
5522
|
+
type: "proration" | "watermark_removal" | "balance";
|
|
5523
|
+
/** The adjustment, negative when it reduces the amount billed. */
|
|
5524
|
+
amount: number;
|
|
5525
|
+
}
|
|
5526
|
+
/** A total of AI credits, and how much of it is left. */
|
|
5527
|
+
export interface BillingCreditsTotals {
|
|
5528
|
+
/** Credits granted for the current AI billing period. */
|
|
5529
|
+
grantedCredits: number;
|
|
5530
|
+
/** Credits still available of those granted. */
|
|
5531
|
+
remainingCredits: number;
|
|
5532
|
+
}
|
|
5429
5533
|
export interface BillingInvoicePreview {
|
|
5430
5534
|
/** Final total owed for this invoice after discounts and credits. */
|
|
5431
5535
|
amount: number;
|
|
@@ -5444,6 +5548,72 @@ export interface BillingInvoicePreview {
|
|
|
5444
5548
|
periodStart: Timestamp;
|
|
5445
5549
|
periodEnd: Timestamp;
|
|
5446
5550
|
}[];
|
|
5551
|
+
/** Structured representation of the invoice for the current billing summary UI. */
|
|
5552
|
+
summary: {
|
|
5553
|
+
/** Product lines enriched and normalized for the billing summary UI. */
|
|
5554
|
+
lines: BillingInvoiceSummaryLine[];
|
|
5555
|
+
/** What adjusts the amount billed beyond the products listed, each summed across its type. Only the ones that apply are returned. */
|
|
5556
|
+
adjustments: BillingInvoiceAdjustment[];
|
|
5557
|
+
/** AI credits available for the current AI billing period. Empty when the organization is not billed for AI usage. */
|
|
5558
|
+
creditGrants: {
|
|
5559
|
+
/** 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. */
|
|
5560
|
+
type: "paid" | "bonus" | "site" | "rollover";
|
|
5561
|
+
/** Credits the grant was created with. */
|
|
5562
|
+
grantedCredits: number;
|
|
5563
|
+
/** Credits of the grant spent by the usage metered so far. */
|
|
5564
|
+
usedCredits: number;
|
|
5565
|
+
/** Credits of the grant still available. */
|
|
5566
|
+
remainingCredits: number;
|
|
5567
|
+
/** For a `site` grant, the published sites the credits come from. */
|
|
5568
|
+
sites?: {
|
|
5569
|
+
/** The type of the site */
|
|
5570
|
+
siteType: SiteType;
|
|
5571
|
+
/** How many sites of this type are published. */
|
|
5572
|
+
count: number;
|
|
5573
|
+
/** Credits included with one site of this type. */
|
|
5574
|
+
creditsPerSite: number;
|
|
5575
|
+
/** Credits these sites contribute to the grant. */
|
|
5576
|
+
grantedCredits: number;
|
|
5577
|
+
}[];
|
|
5578
|
+
}[];
|
|
5579
|
+
/** The AI credits of the current billing period, grouped the ways the billing screens display them. */
|
|
5580
|
+
credits: {
|
|
5581
|
+
/** Credits granted across every grant. */
|
|
5582
|
+
grantedCredits: number;
|
|
5583
|
+
/** Credits spent by the usage metered so far. */
|
|
5584
|
+
usedCredits: number;
|
|
5585
|
+
/** Credits still available across every grant. */
|
|
5586
|
+
remainingCredits: number;
|
|
5587
|
+
/** Part of the metered AI usage paid by credits rather than billed, as a positive amount. */
|
|
5588
|
+
coveredAmount: number;
|
|
5589
|
+
/** The credits the organization pays for. */
|
|
5590
|
+
paid: BillingCreditsTotals;
|
|
5591
|
+
/** The credits included at no extra cost, from the bundle, sites and rollover. */
|
|
5592
|
+
free: BillingCreditsTotals;
|
|
5593
|
+
/** The credits of the monthly bundle, both paid and bonus. */
|
|
5594
|
+
bundle: BillingCreditsTotals;
|
|
5595
|
+
};
|
|
5596
|
+
/** When the upcoming invoice is charged. */
|
|
5597
|
+
chargeDate?: Timestamp;
|
|
5598
|
+
/** The renewal invoice, when the plan and the AI usage bill on different cadences. Absent when a single invoice covers everything. */
|
|
5599
|
+
renewal?: {
|
|
5600
|
+
/** Product lines of the renewal invoice. */
|
|
5601
|
+
lines: BillingInvoiceSummaryLine[];
|
|
5602
|
+
/** What adjusts the renewal beyond the products listed. Prorations and the customer balance are reported on the upcoming invoice instead. */
|
|
5603
|
+
adjustments: BillingInvoiceAdjustment[];
|
|
5604
|
+
/** Discounts still applying when the subscription renews. */
|
|
5605
|
+
discounts: {
|
|
5606
|
+
/** The description of the applied discount. */
|
|
5607
|
+
description: string;
|
|
5608
|
+
/** The amount of the applied discount. */
|
|
5609
|
+
amount: number;
|
|
5610
|
+
}[];
|
|
5611
|
+
/** Total owed for the renewal invoice. */
|
|
5612
|
+
amount: number;
|
|
5613
|
+
/** When the renewal invoice is charged. */
|
|
5614
|
+
chargeDate: Timestamp;
|
|
5615
|
+
};
|
|
5616
|
+
};
|
|
5447
5617
|
/** Discounts applied to the subscription. */
|
|
5448
5618
|
discounts?: {
|
|
5449
5619
|
/** The description of the applied discount. */
|
|
@@ -5535,10 +5705,23 @@ export type CreateSpace = {
|
|
|
5535
5705
|
} | {
|
|
5536
5706
|
empty: true;
|
|
5537
5707
|
}));
|
|
5538
|
-
/**
|
|
5708
|
+
/** The resource on which an integration is installed. */
|
|
5709
|
+
export type InstalledIntegrationTarget = {
|
|
5710
|
+
type: "organization";
|
|
5711
|
+
organizationId: string;
|
|
5712
|
+
} | {
|
|
5713
|
+
type: "site";
|
|
5714
|
+
siteId: string;
|
|
5715
|
+
} | {
|
|
5716
|
+
type: "space";
|
|
5717
|
+
spaceId: string;
|
|
5718
|
+
};
|
|
5719
|
+
/** An integration installation, its current status, and the resource it targets. */
|
|
5539
5720
|
export interface InstalledIntegration {
|
|
5540
5721
|
status: IntegrationInstallationStatus;
|
|
5541
5722
|
integration: Integration;
|
|
5723
|
+
/** The resource on which an integration is installed. */
|
|
5724
|
+
target: InstalledIntegrationTarget;
|
|
5542
5725
|
}
|
|
5543
5726
|
/**
|
|
5544
5727
|
* @minLength 1
|
|
@@ -6091,12 +6274,9 @@ export interface GitSyncInstallationSetupCommon {
|
|
|
6091
6274
|
projectDirectory?: string;
|
|
6092
6275
|
/** Optional template used when generating commit messages. */
|
|
6093
6276
|
commitMessageTemplate?: string;
|
|
6094
|
-
/**
|
|
6095
|
-
* Whether previews should be generated from branches outside the configured branch.
|
|
6096
|
-
* @default false
|
|
6097
|
-
*/
|
|
6277
|
+
/** Whether previews should be generated from branches outside the configured branch. For space installations belonging to a parent installation, this field is inherited from the parent installation and cannot be set. */
|
|
6098
6278
|
previewExternalBranches?: boolean;
|
|
6099
|
-
/** Agent instruction files GitBook should always export at the repository root. */
|
|
6279
|
+
/** Agent instruction files GitBook should always export at the repository root. For space installations belonging to a parent installation, this field is inherited from the parent installation and cannot be set. */
|
|
6100
6280
|
agentInstructions?: ("agents" | "claude")[];
|
|
6101
6281
|
/** Which side should be treated as the source of truth when Git Sync is configured. */
|
|
6102
6282
|
priority?: GitSyncInstallationPriority;
|
|
@@ -6174,6 +6354,21 @@ export interface GitRepositoryRef {
|
|
|
6174
6354
|
latestImportedCommitId?: string;
|
|
6175
6355
|
updatedAt: Timestamp;
|
|
6176
6356
|
}
|
|
6357
|
+
/** A repository-backed review and permission boundary for GitBook content. */
|
|
6358
|
+
export interface GitSyncRoot {
|
|
6359
|
+
object: "git-sync-root";
|
|
6360
|
+
/** Unique identifier of the Sync Root. */
|
|
6361
|
+
id: string;
|
|
6362
|
+
/** Unique identifier of the top-level installation that owns this Sync Root. */
|
|
6363
|
+
installationId: string;
|
|
6364
|
+
/** Resource targeted by a Git Sync installation. */
|
|
6365
|
+
target: GitSyncInstallationTarget;
|
|
6366
|
+
/** System responsible for completing merges by default for this Sync Root. */
|
|
6367
|
+
defaultMergeAuthorityPolicy: "provider" | "gitbook";
|
|
6368
|
+
status: "active" | "disabled";
|
|
6369
|
+
createdAt: Timestamp;
|
|
6370
|
+
updatedAt: Timestamp;
|
|
6371
|
+
}
|
|
6177
6372
|
export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
6178
6373
|
object: "git-sync-installation";
|
|
6179
6374
|
/** Unique identifier of the Git Sync installation. */
|
|
@@ -6185,6 +6380,8 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
|
6185
6380
|
status: GitSyncInstallationStatus;
|
|
6186
6381
|
repositoryConnection?: GitRepositoryConnection;
|
|
6187
6382
|
repositoryRef?: GitRepositoryRef;
|
|
6383
|
+
/** Effective Sync Root for this installation, inherited from its parent when present. */
|
|
6384
|
+
syncRoot?: GitSyncRoot;
|
|
6188
6385
|
createdAt: Timestamp;
|
|
6189
6386
|
/** Identifier of the user who created the installation. */
|
|
6190
6387
|
createdBy: string;
|
|
@@ -6315,6 +6512,11 @@ export interface CustomizationAnnouncement {
|
|
|
6315
6512
|
/** The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner. */
|
|
6316
6513
|
style: "info" | "warning" | "danger" | "success";
|
|
6317
6514
|
}
|
|
6515
|
+
/**
|
|
6516
|
+
* Initial greeting displayed by the AI Assistant when a visitor starts a conversation.
|
|
6517
|
+
* @maxLength 256
|
|
6518
|
+
*/
|
|
6519
|
+
export type CustomizationAIGreeting = string;
|
|
6318
6520
|
/**
|
|
6319
6521
|
* @minLength 3
|
|
6320
6522
|
* @maxLength 64
|
|
@@ -6461,6 +6663,10 @@ export interface SiteCustomizationSettingsBase {
|
|
|
6461
6663
|
};
|
|
6462
6664
|
ai: {
|
|
6463
6665
|
mode: CustomizationAIMode;
|
|
6666
|
+
/** Initial greeting displayed by the AI Assistant when a visitor starts a conversation. */
|
|
6667
|
+
greeting?: CustomizationAIGreeting;
|
|
6668
|
+
/** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
6669
|
+
localizedGreeting?: LocalizedString128;
|
|
6464
6670
|
/** Suggested questions to display at the start of the chosen AI mode. */
|
|
6465
6671
|
suggestions?: CustomizationSuggestedQuestions;
|
|
6466
6672
|
/** Additional instructions for the AI Assistant, injected after the base system prompt. Use them to adjust tone of voice and contribute site-specific knowledge. These instructions refine, but never override, the assistant's built-in guardrails. Only available to site admins and never exposed on the published site. */
|
|
@@ -6786,6 +6992,50 @@ export type SiteTriageFilterConnections = string;
|
|
|
6786
6992
|
* @maxLength 256
|
|
6787
6993
|
*/
|
|
6788
6994
|
export type SiteFindingTitle = string;
|
|
6995
|
+
/**
|
|
6996
|
+
* The source path to redirect from.
|
|
6997
|
+
* @maxLength 512
|
|
6998
|
+
* @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
|
|
6999
|
+
*/
|
|
7000
|
+
export type SiteRedirectSourcePath = string;
|
|
7001
|
+
export interface SiteRedirectDestinationSiteSection {
|
|
7002
|
+
kind: "site-section";
|
|
7003
|
+
/** Unique identifier for the site section to redirect to */
|
|
7004
|
+
siteSectionId: string;
|
|
7005
|
+
}
|
|
7006
|
+
export interface SiteRedirectDestinationSiteSpace {
|
|
7007
|
+
kind: "site-space";
|
|
7008
|
+
/** Unique identifier for the site space to redirect to */
|
|
7009
|
+
siteSpaceId: string;
|
|
7010
|
+
}
|
|
7011
|
+
export interface SiteRedirectDestinationPage {
|
|
7012
|
+
kind: "site-page";
|
|
7013
|
+
/** Unique identifier for the site space of the page */
|
|
7014
|
+
siteSpaceId: string;
|
|
7015
|
+
/** Unique identifier for the page within the site space to redirect to */
|
|
7016
|
+
pageId: string;
|
|
7017
|
+
}
|
|
7018
|
+
export interface SiteRedirectDestinationExternal {
|
|
7019
|
+
kind: "external";
|
|
7020
|
+
url: URL;
|
|
7021
|
+
}
|
|
7022
|
+
export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage | SiteRedirectDestinationExternal;
|
|
7023
|
+
export interface SiteRedirectInputDestinationPath {
|
|
7024
|
+
kind: "path";
|
|
7025
|
+
/** Unique identifier for the space containing the page referenced by the path. */
|
|
7026
|
+
spaceId: string;
|
|
7027
|
+
/** Path to the page within the space revision to resolve. */
|
|
7028
|
+
path: string;
|
|
7029
|
+
}
|
|
7030
|
+
export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
|
|
7031
|
+
/** 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). */
|
|
7032
|
+
export interface SiteFindingBrokenLinkAction {
|
|
7033
|
+
/** The source path to redirect from. */
|
|
7034
|
+
source: SiteRedirectSourcePath;
|
|
7035
|
+
/** Whether the redirect appends the wildcard-matched suffix of the source path to the destination. */
|
|
7036
|
+
captureWildcard?: boolean;
|
|
7037
|
+
destination: SiteRedirectInputDestination;
|
|
7038
|
+
}
|
|
6789
7039
|
export interface SiteFinding {
|
|
6790
7040
|
object: "site-finding";
|
|
6791
7041
|
/** The ID of the finding */
|
|
@@ -6817,6 +7067,7 @@ export interface SiteFinding {
|
|
|
6817
7067
|
* - Outdated content: The content was correct but is no longer up to date with external context and may be misleading or incorrect.
|
|
6818
7068
|
* - Incorrect content: The content is factually wrong or misleading, leading users astray regardless of whether it was ever correct.
|
|
6819
7069
|
* - Content gap: The content is missing important information that should be present to answer user questions effectively.
|
|
7070
|
+
* - Broken link: A URL on the site returns a 404, and can be resolved by creating a redirect or a new page.
|
|
6820
7071
|
* - Other: Any other type of finding not covered by the above categories.
|
|
6821
7072
|
*/
|
|
6822
7073
|
type: SiteFindingType;
|
|
@@ -6825,6 +7076,8 @@ export interface SiteFinding {
|
|
|
6825
7076
|
description: JSONDocument;
|
|
6826
7077
|
/** Whether an AI agent should be able to fix this finding directly */
|
|
6827
7078
|
autoFixable: boolean;
|
|
7079
|
+
/** 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). */
|
|
7080
|
+
brokenLinkAction?: SiteFindingBrokenLinkAction;
|
|
6828
7081
|
createdAt: Timestamp;
|
|
6829
7082
|
updatedAt: Timestamp;
|
|
6830
7083
|
/** URLs associated with the finding */
|
|
@@ -7530,6 +7783,15 @@ export interface AIToolCallSetChangeRequestDetails {
|
|
|
7530
7783
|
/** The ID of the change request. */
|
|
7531
7784
|
changeRequestId: string;
|
|
7532
7785
|
}
|
|
7786
|
+
export interface AIToolCallArchiveChangeRequest {
|
|
7787
|
+
tool: "archiveChangeRequest";
|
|
7788
|
+
/** The ID of the space the change request belongs to. */
|
|
7789
|
+
spaceId: string;
|
|
7790
|
+
/** The ID of the change request. */
|
|
7791
|
+
changeRequestId: string;
|
|
7792
|
+
/** Why the agent gave up on implementing the change request. */
|
|
7793
|
+
reason: string;
|
|
7794
|
+
}
|
|
7533
7795
|
export interface AIToolCallComment {
|
|
7534
7796
|
tool: "comment";
|
|
7535
7797
|
/** The ID of the space being commented. */
|
|
@@ -7595,7 +7857,7 @@ export interface AIToolCallOther {
|
|
|
7595
7857
|
/** Summary of a generic tool call. */
|
|
7596
7858
|
summary: AIToolCallOtherSummary;
|
|
7597
7859
|
}
|
|
7598
|
-
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 | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
|
|
7860
|
+
export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallGetChangeRequestDetails | AIToolCallSetChangeRequestDetails | AIToolCallArchiveChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
|
|
7599
7861
|
export interface Timerange {
|
|
7600
7862
|
start: Timestamp;
|
|
7601
7863
|
end: Timestamp;
|
|
@@ -8127,8 +8389,15 @@ export interface SiteInsightsQueryDateTimeColumn {
|
|
|
8127
8389
|
column: "datetime";
|
|
8128
8390
|
interval?: "hour" | "day" | "week" | "month";
|
|
8129
8391
|
}
|
|
8392
|
+
/** Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
|
|
8130
8393
|
export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
8394
|
+
column: "dayOfWeek";
|
|
8395
|
+
} | {
|
|
8396
|
+
column: "hourOfDay";
|
|
8397
|
+
} | {
|
|
8131
8398
|
column: "url";
|
|
8399
|
+
} | {
|
|
8400
|
+
column: "urlPath";
|
|
8132
8401
|
} | {
|
|
8133
8402
|
column: "eventType";
|
|
8134
8403
|
} | {
|
|
@@ -8223,9 +8492,18 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
|
8223
8492
|
export type SiteInsightsQueryEventsValues = {
|
|
8224
8493
|
column: "datetime";
|
|
8225
8494
|
values: Timestamp[];
|
|
8495
|
+
} | {
|
|
8496
|
+
column: "dayOfWeek";
|
|
8497
|
+
values: number[];
|
|
8498
|
+
} | {
|
|
8499
|
+
column: "hourOfDay";
|
|
8500
|
+
values: number[];
|
|
8226
8501
|
} | {
|
|
8227
8502
|
column: "url";
|
|
8228
8503
|
values: URL[];
|
|
8504
|
+
} | {
|
|
8505
|
+
column: "urlPath";
|
|
8506
|
+
values: string[];
|
|
8229
8507
|
} | {
|
|
8230
8508
|
column: "eventsCount";
|
|
8231
8509
|
values: number[];
|
|
@@ -8381,6 +8659,7 @@ export interface SiteInsightsQueryEventsAggregation {
|
|
|
8381
8659
|
where?: SiteInsightsQueryEventsFilter[];
|
|
8382
8660
|
groupBy?: SiteInsightsQueryEventsColumn[];
|
|
8383
8661
|
order?: {
|
|
8662
|
+
/** Day of the week the event happened, in UTC, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
|
|
8384
8663
|
by: SiteInsightsQueryEventsColumn;
|
|
8385
8664
|
direction: "asc" | "desc";
|
|
8386
8665
|
};
|
|
@@ -8412,34 +8691,6 @@ export interface SiteAdsStats {
|
|
|
8412
8691
|
clicks: number;
|
|
8413
8692
|
revenue: string;
|
|
8414
8693
|
}
|
|
8415
|
-
/**
|
|
8416
|
-
* The source path to redirect from.
|
|
8417
|
-
* @maxLength 512
|
|
8418
|
-
* @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
|
|
8419
|
-
*/
|
|
8420
|
-
export type SiteRedirectSourcePath = string;
|
|
8421
|
-
export interface SiteRedirectDestinationSiteSection {
|
|
8422
|
-
kind: "site-section";
|
|
8423
|
-
/** Unique identifier for the site section to redirect to */
|
|
8424
|
-
siteSectionId: string;
|
|
8425
|
-
}
|
|
8426
|
-
export interface SiteRedirectDestinationSiteSpace {
|
|
8427
|
-
kind: "site-space";
|
|
8428
|
-
/** Unique identifier for the site space to redirect to */
|
|
8429
|
-
siteSpaceId: string;
|
|
8430
|
-
}
|
|
8431
|
-
export interface SiteRedirectDestinationPage {
|
|
8432
|
-
kind: "site-page";
|
|
8433
|
-
/** Unique identifier for the site space of the page */
|
|
8434
|
-
siteSpaceId: string;
|
|
8435
|
-
/** Unique identifier for the page within the site space to redirect to */
|
|
8436
|
-
pageId: string;
|
|
8437
|
-
}
|
|
8438
|
-
export interface SiteRedirectDestinationExternal {
|
|
8439
|
-
kind: "external";
|
|
8440
|
-
url: URL;
|
|
8441
|
-
}
|
|
8442
|
-
export type SiteRedirectDestination = SiteRedirectDestinationSiteSection | SiteRedirectDestinationSiteSpace | SiteRedirectDestinationPage | SiteRedirectDestinationExternal;
|
|
8443
8694
|
export interface SiteRedirect {
|
|
8444
8695
|
object: "site-redirect";
|
|
8445
8696
|
/** The unique identifier for the redirect. */
|
|
@@ -8452,14 +8703,6 @@ export interface SiteRedirect {
|
|
|
8452
8703
|
captureWildcard: boolean;
|
|
8453
8704
|
destination: SiteRedirectDestination;
|
|
8454
8705
|
}
|
|
8455
|
-
export interface SiteRedirectInputDestinationPath {
|
|
8456
|
-
kind: "path";
|
|
8457
|
-
/** Unique identifier for the space containing the page referenced by the path. */
|
|
8458
|
-
spaceId: string;
|
|
8459
|
-
/** Path to the page within the space revision to resolve. */
|
|
8460
|
-
path: string;
|
|
8461
|
-
}
|
|
8462
|
-
export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
|
|
8463
8706
|
/**
|
|
8464
8707
|
* Name of the MCP server
|
|
8465
8708
|
* @minLength 1
|
|
@@ -8718,12 +8961,24 @@ export type OrganizationBillingDateOverride = true | Timestamp;
|
|
|
8718
8961
|
* @min 0
|
|
8719
8962
|
*/
|
|
8720
8963
|
export type OrganizationBillingNumericOverride = number;
|
|
8964
|
+
/**
|
|
8965
|
+
* Current percentage billing override, when set.
|
|
8966
|
+
* @min 0
|
|
8967
|
+
* @max 100
|
|
8968
|
+
*/
|
|
8969
|
+
export type OrganizationBillingPercentageOverride = number;
|
|
8721
8970
|
export interface OrganizationBillingOverrides {
|
|
8722
8971
|
overrides: {
|
|
8723
8972
|
/** Current interval-change override, when set. */
|
|
8724
8973
|
frozenInterval?: OrganizationBillingDateOverride;
|
|
8725
8974
|
/** Current SAML override, when set. */
|
|
8726
8975
|
enableSAML?: OrganizationBillingDateOverride;
|
|
8976
|
+
/** Contractual AI credit allowance for Enterprise organizations only. */
|
|
8977
|
+
aiCreditAllowance?: OrganizationBillingNumericOverride;
|
|
8978
|
+
/** Percentage of remaining paid AI credits carried into the next billing period. Paid self-serve organizations default to 50% when unset. */
|
|
8979
|
+
aiCreditRollover?: OrganizationBillingPercentageOverride;
|
|
8980
|
+
/** Percentage of total AI credits remaining at which to send a low-balance alert. */
|
|
8981
|
+
aiCreditAlertThreshold?: OrganizationBillingPercentageOverride;
|
|
8727
8982
|
/** Current minimum users override, when set. */
|
|
8728
8983
|
minUsers?: OrganizationBillingNumericOverride;
|
|
8729
8984
|
/** Current maximum users override, when set. */
|
|
@@ -8780,6 +9035,8 @@ export interface PublishedSiteContent {
|
|
|
8780
9035
|
export type PublishedSiteContentLookup = PublishedContentRedirect | PublishedSiteContent;
|
|
8781
9036
|
/** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
|
|
8782
9037
|
export interface SiteVisitorPayload {
|
|
9038
|
+
/** Whether the visitor is a human or an AI agent. Defaults to human when omitted. */
|
|
9039
|
+
type?: "human" | "agent";
|
|
8783
9040
|
/** JWT token generated for a authenticated access session. */
|
|
8784
9041
|
jwtToken?: string;
|
|
8785
9042
|
unsignedClaims?: PlainObject;
|
|
@@ -9036,7 +9293,7 @@ export interface InputFile {
|
|
|
9036
9293
|
height: number;
|
|
9037
9294
|
};
|
|
9038
9295
|
}
|
|
9039
|
-
export interface
|
|
9296
|
+
export interface GitSyncSpaceOperation {
|
|
9040
9297
|
/**
|
|
9041
9298
|
* * `running`: The operation is still running
|
|
9042
9299
|
* * `failure`: The operation failed
|
|
@@ -9065,6 +9322,44 @@ export interface GitSyncOperation {
|
|
|
9065
9322
|
completedAt?: Timestamp;
|
|
9066
9323
|
/** Error details, defined if state is `failure`. */
|
|
9067
9324
|
error?: string;
|
|
9325
|
+
/** An action the user can take to resolve a failed Git Sync operation. */
|
|
9326
|
+
errorAction?: GitSyncOperationErrorAction;
|
|
9327
|
+
}
|
|
9328
|
+
/**
|
|
9329
|
+
* Deprecated. Use `GitSyncSpaceOperation` instead.
|
|
9330
|
+
* @deprecated
|
|
9331
|
+
*/
|
|
9332
|
+
export type GitSyncOperation = GitSyncSpaceOperation;
|
|
9333
|
+
export interface GitSyncSiteOperation {
|
|
9334
|
+
/**
|
|
9335
|
+
* * `running`: The operation is still running
|
|
9336
|
+
* * `failure`: The operation failed
|
|
9337
|
+
* * `success`: The operation was successful
|
|
9338
|
+
* * `timeout`: The operation timed out
|
|
9339
|
+
*/
|
|
9340
|
+
state: GitSyncOperationState;
|
|
9341
|
+
direction: GitSyncOperationDirection;
|
|
9342
|
+
/**
|
|
9343
|
+
* Core stages of a Git Sync process. This is not exhaustive, but should cover
|
|
9344
|
+
* the important ones.
|
|
9345
|
+
* - repo_fetch: Includes fetching the latest repository contents from remote provider.
|
|
9346
|
+
* - config_check: Includes checking if the YAML config is valid, etc.
|
|
9347
|
+
* - content_process: Includes processing of pages & files to be imported/exported.
|
|
9348
|
+
* - finalize: Includes finalizing the sync process like creating the commit on git, or
|
|
9349
|
+
* creating a new revision.
|
|
9350
|
+
*/
|
|
9351
|
+
stage: GitSyncOperationStage;
|
|
9352
|
+
/** Date when the operation was started */
|
|
9353
|
+
startedAt: Timestamp;
|
|
9354
|
+
/** Date when the operation was last updated */
|
|
9355
|
+
updatedAt: Timestamp;
|
|
9356
|
+
/** Date when the operation was successful (when state is `success`) */
|
|
9357
|
+
completedAt?: Timestamp;
|
|
9358
|
+
/** Error details, defined if state is `failure`. */
|
|
9359
|
+
error?: string;
|
|
9360
|
+
/** An action the user can take to resolve a failed Git Sync operation. */
|
|
9361
|
+
errorAction?: GitSyncOperationErrorAction;
|
|
9362
|
+
spaces: Record<string, GitSyncSpaceOperation>;
|
|
9068
9363
|
}
|
|
9069
9364
|
/**
|
|
9070
9365
|
* A section group — a container that nests sections (and other section
|
|
@@ -9275,6 +9570,8 @@ export interface ContentAPIBaseToken {
|
|
|
9275
9570
|
organization: string;
|
|
9276
9571
|
/** List of spaces that the token is allowed to access. */
|
|
9277
9572
|
spaces: string[];
|
|
9573
|
+
/** Whether the visitor, for which the token was generated, is a human or an AI agent. Defaults to human when omitted. */
|
|
9574
|
+
visitorType?: "human" | "agent";
|
|
9278
9575
|
/** Attributes or assertions that provide specific details about the visitor for which the token was generated. */
|
|
9279
9576
|
claims?: Record<string, any>;
|
|
9280
9577
|
/** Multiplier for the rate limit applied to the token. */
|
|
@@ -9609,6 +9906,10 @@ export interface APIChannelGitSyncOperation {
|
|
|
9609
9906
|
channel: "space-gitsync-operation";
|
|
9610
9907
|
space: string;
|
|
9611
9908
|
}
|
|
9909
|
+
export interface APIChannelGitSyncSiteOperation {
|
|
9910
|
+
channel: "site-gitsync-operation";
|
|
9911
|
+
site: string;
|
|
9912
|
+
}
|
|
9612
9913
|
/** Subscription channel for changes in OpenAPI specification. */
|
|
9613
9914
|
export interface APIChannelOpenAPISpec {
|
|
9614
9915
|
channel: "openapi-spec";
|
|
@@ -9645,7 +9946,11 @@ export interface APIChannelImportRunData {
|
|
|
9645
9946
|
}
|
|
9646
9947
|
export interface APIChannelGitSyncOperationData {
|
|
9647
9948
|
channel: "space-gitsync-operation";
|
|
9648
|
-
data:
|
|
9949
|
+
data: GitSyncSpaceOperation;
|
|
9950
|
+
}
|
|
9951
|
+
export interface APIChannelGitSyncSiteOperationData {
|
|
9952
|
+
channel: "site-gitsync-operation";
|
|
9953
|
+
data: GitSyncSiteOperation;
|
|
9649
9954
|
}
|
|
9650
9955
|
export interface APIChannelMutationData {
|
|
9651
9956
|
channel: "*";
|
|
@@ -10984,7 +11289,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10984
11289
|
computed?: boolean;
|
|
10985
11290
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
|
|
10986
11291
|
/**
|
|
10987
|
-
* @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
|
|
11292
|
+
* @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content. **Response shape (`compat`)** — this endpoint is changing what it returns: - `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior. - `compat=false` returns the updated change request **and** the list of affected pages (see the response schema). The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.
|
|
10988
11293
|
*
|
|
10989
11294
|
* @tags change-request-content
|
|
10990
11295
|
* @name UpdateChangeRequestContent
|
|
@@ -13349,7 +13654,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13349
13654
|
}[];
|
|
13350
13655
|
}, any>>;
|
|
13351
13656
|
/**
|
|
13352
|
-
*
|
|
13657
|
+
* @description Returns integration installations in the organization. Use site or space with the matching target to efficiently scope the result to one resource.
|
|
13353
13658
|
*
|
|
13354
13659
|
* @tags integrations, critical
|
|
13355
13660
|
* @name ListOrganizationIntegrationsStatus
|
|
@@ -13371,6 +13676,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13371
13676
|
* @default "organization"
|
|
13372
13677
|
*/
|
|
13373
13678
|
target?: "organization" | "space" | "site";
|
|
13679
|
+
/** Return installations for this site. Only valid when target is site. */
|
|
13680
|
+
site?: string;
|
|
13681
|
+
/** Return installations for this space. Only valid when target is space. */
|
|
13682
|
+
space?: string;
|
|
13374
13683
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
13375
13684
|
items: InstalledIntegration[];
|
|
13376
13685
|
}, any>>;
|
|
@@ -14971,14 +15280,24 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14971
15280
|
topic?: string;
|
|
14972
15281
|
/** Filter findings by status. */
|
|
14973
15282
|
status?: SiteFindingStatus;
|
|
14974
|
-
/** Filter findings by type. */
|
|
14975
|
-
type?: SiteFindingType;
|
|
15283
|
+
/** Filter findings by type. When multiple types are given, findings matching any of them are returned. */
|
|
15284
|
+
type?: SiteFindingType[];
|
|
14976
15285
|
/** Filter findings by estimated severity. */
|
|
14977
15286
|
severity?: SiteFindingSeverity;
|
|
14978
15287
|
/** Filter findings that have at least one associated change request. */
|
|
14979
15288
|
hasChangeRequests?: boolean;
|
|
14980
15289
|
/** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are returned. */
|
|
14981
15290
|
source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
|
|
15291
|
+
/**
|
|
15292
|
+
* Only return findings last updated at or after this date.
|
|
15293
|
+
* @format date-time
|
|
15294
|
+
*/
|
|
15295
|
+
updatedAfter?: string;
|
|
15296
|
+
/**
|
|
15297
|
+
* Only return findings last updated before this date.
|
|
15298
|
+
* @format date-time
|
|
15299
|
+
*/
|
|
15300
|
+
updatedBefore?: string;
|
|
14982
15301
|
/** Sort findings by the given field. */
|
|
14983
15302
|
orderBy?: SiteFindingOrderBy;
|
|
14984
15303
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
@@ -15121,8 +15440,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15121
15440
|
topic?: string;
|
|
15122
15441
|
/** Filter findings by status. */
|
|
15123
15442
|
status?: SiteFindingStatus;
|
|
15124
|
-
/** Filter findings by type. */
|
|
15125
|
-
type?: SiteFindingType;
|
|
15443
|
+
/** Filter findings by type. When multiple types are given, findings matching any of them are returned. */
|
|
15444
|
+
type?: SiteFindingType[];
|
|
15126
15445
|
/** Filter findings by estimated severity. */
|
|
15127
15446
|
severity?: SiteFindingSeverity;
|
|
15128
15447
|
/** Filter findings that have at least one associated change request. */
|
|
@@ -16753,7 +17072,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16753
17072
|
* @request PATCH:/git/installations/{installationId}
|
|
16754
17073
|
* @secure
|
|
16755
17074
|
*/
|
|
16756
|
-
updateGitSyncInstallationById: (installationId: string, data: GitSyncInstallationSetup
|
|
17075
|
+
updateGitSyncInstallationById: (installationId: string, data: GitSyncInstallationSetup & {
|
|
17076
|
+
/** Project directories keyed by child installation ID for a site installation. */
|
|
17077
|
+
childInstallationProjectDirectories?: Record<string, string>;
|
|
17078
|
+
}, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
16757
17079
|
error: {
|
|
16758
17080
|
/** @format int32 */
|
|
16759
17081
|
code: 401;
|