@gitbook/api 0.206.0 → 0.208.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 +791 -84
- package/dist/constants.d.ts +19 -6
- package/dist/index.cjs +191 -13
- package/dist/index.js +170 -13
- package/package.json +1 -1
- package/spec/openapi.json +2139 -378
- package/spec/openapi.yaml +1386 -184
package/dist/client.d.ts
CHANGED
|
@@ -373,12 +373,26 @@ export declare enum SiteQuestionAnswerHelpfulness {
|
|
|
373
373
|
Medium = "medium",
|
|
374
374
|
High = "high"
|
|
375
375
|
}
|
|
376
|
+
/** Size of a timeline bucket. Weeks start on Sunday, and every bucket is in UTC. */
|
|
377
|
+
export declare enum SiteQuestionTimelineInterval {
|
|
378
|
+
Hour = "hour",
|
|
379
|
+
Day = "day",
|
|
380
|
+
Week = "week",
|
|
381
|
+
Month = "month"
|
|
382
|
+
}
|
|
376
383
|
/** Whether the response answered the question. */
|
|
377
384
|
export declare enum SiteQuestionAnswerResolution {
|
|
378
385
|
No = "no",
|
|
379
386
|
Partially = "partially",
|
|
380
387
|
Yes = "yes"
|
|
381
388
|
}
|
|
389
|
+
/** Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API. */
|
|
390
|
+
export declare enum SiteQuestionVisitorType {
|
|
391
|
+
Human = "human",
|
|
392
|
+
Agent = "agent",
|
|
393
|
+
Bot = "bot",
|
|
394
|
+
Unknown = "unknown"
|
|
395
|
+
}
|
|
382
396
|
export declare enum SiteConfigurableChannelType {
|
|
383
397
|
BuiltinSlack = "builtin:slack",
|
|
384
398
|
BuiltinDiscord = "builtin:discord",
|
|
@@ -445,6 +459,25 @@ export declare enum SiteQuestionType {
|
|
|
445
459
|
Reference = "reference",
|
|
446
460
|
Unknown = "unknown"
|
|
447
461
|
}
|
|
462
|
+
/**
|
|
463
|
+
* An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
|
|
464
|
+
* - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding. A change request GitBook drafted for an outbound link is approved by merging it.
|
|
465
|
+
* - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again. For an outbound link, it archives the change request GitBook drafted (`awaitingChangeRequest`) and unlinks every link it fixes. They are open again, marked `undone`, and GitBook won't draft a fix for them again.
|
|
466
|
+
* - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
|
|
467
|
+
* - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
|
|
468
|
+
* - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
|
|
469
|
+
* - `ignore` dismisses it.
|
|
470
|
+
* - `restore` reopens a dismissed finding.
|
|
471
|
+
*/
|
|
472
|
+
export declare enum SiteFindingAction {
|
|
473
|
+
Approve = "approve",
|
|
474
|
+
Reject = "reject",
|
|
475
|
+
CreateRedirect = "create-redirect",
|
|
476
|
+
MarkResolved = "mark-resolved",
|
|
477
|
+
Reopen = "reopen",
|
|
478
|
+
Ignore = "ignore",
|
|
479
|
+
Restore = "restore"
|
|
480
|
+
}
|
|
448
481
|
/**
|
|
449
482
|
* 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'.
|
|
450
483
|
* @default "updatedAt"
|
|
@@ -459,6 +492,30 @@ export declare enum SiteFindingOrderBy {
|
|
|
459
492
|
export declare enum SiteTriageFilterQuestions {
|
|
460
493
|
Questions = "questions"
|
|
461
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* Where a link finding stands, from its status and what GitBook did with it.
|
|
497
|
+
* - `open` needs a fix.
|
|
498
|
+
* - `awaiting-approval` has a fix GitBook drafted, waiting to be approved or rejected: a redirect at a `broken-link` finding's path, or an unmerged change request for an `outbound-link-error` finding (`awaitingChangeRequest`).
|
|
499
|
+
* - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
|
|
500
|
+
* - `ignored` was dismissed.
|
|
501
|
+
*/
|
|
502
|
+
export declare enum SiteFindingState {
|
|
503
|
+
Open = "open",
|
|
504
|
+
AwaitingApproval = "awaiting-approval",
|
|
505
|
+
Resolved = "resolved",
|
|
506
|
+
Ignored = "ignored"
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* What GitBook did on its own to resolve a finding.
|
|
510
|
+
* - `drafted` drafted a fix that waits for approval.
|
|
511
|
+
* - `applied` has its fix live, applied on its own or approved from a draft, resolving the finding.
|
|
512
|
+
* - `undone` had its fix undone or rejected, so GitBook won't try again.
|
|
513
|
+
*/
|
|
514
|
+
export declare enum SiteFindingAutoResolution {
|
|
515
|
+
Drafted = "drafted",
|
|
516
|
+
Applied = "applied",
|
|
517
|
+
Undone = "undone"
|
|
518
|
+
}
|
|
462
519
|
/** Estimated end-user severity of a site finding. */
|
|
463
520
|
export declare enum SiteFindingSeverity {
|
|
464
521
|
Low = "low",
|
|
@@ -516,6 +573,14 @@ export declare enum SiteChangeRequestMemberStatus {
|
|
|
516
573
|
Active = "active",
|
|
517
574
|
Removed = "removed"
|
|
518
575
|
}
|
|
576
|
+
/** A step of the setup of a site, in the order they are done. */
|
|
577
|
+
export declare enum SiteSetupStepId {
|
|
578
|
+
FirstEdit = "first-edit",
|
|
579
|
+
Customize = "customize",
|
|
580
|
+
GitSync = "git-sync",
|
|
581
|
+
Domain = "domain",
|
|
582
|
+
Publish = "publish"
|
|
583
|
+
}
|
|
519
584
|
/** The platform of the social handle. */
|
|
520
585
|
export declare enum SiteSocialAccountPlatform {
|
|
521
586
|
Twitter = "twitter",
|
|
@@ -777,7 +842,8 @@ export declare enum StorageUploadKind {
|
|
|
777
842
|
export declare enum TranslationStatus {
|
|
778
843
|
Pending = "pending",
|
|
779
844
|
Running = "running",
|
|
780
|
-
Completed = "completed"
|
|
845
|
+
Completed = "completed",
|
|
846
|
+
Failed = "failed"
|
|
781
847
|
}
|
|
782
848
|
/** OpenAPI processing error code */
|
|
783
849
|
export declare enum OpenAPISpecProcessingErrorCode {
|
|
@@ -791,6 +857,12 @@ export declare enum OpenAPISpecProcessingState {
|
|
|
791
857
|
Progress = "progress",
|
|
792
858
|
Complete = "complete"
|
|
793
859
|
}
|
|
860
|
+
/** Identity provider that provisions members through the SCIM connection. */
|
|
861
|
+
export declare enum SCIMConnectionProvider {
|
|
862
|
+
Okta = "okta",
|
|
863
|
+
Entra = "entra",
|
|
864
|
+
Generic = "generic"
|
|
865
|
+
}
|
|
794
866
|
/**
|
|
795
867
|
* Status of the provider.
|
|
796
868
|
* - `active`: The provider is active and can be used to authenticate users.
|
|
@@ -813,6 +885,7 @@ export declare enum OrganizationFeature {
|
|
|
813
885
|
MembersTeams = "members-teams",
|
|
814
886
|
MembersTeamOwners = "members-team-owners",
|
|
815
887
|
SecuritySaml = "security-saml",
|
|
888
|
+
Scim = "scim",
|
|
816
889
|
ChangeRequestsMergeRules = "change-requests-merge-rules"
|
|
817
890
|
}
|
|
818
891
|
/**
|
|
@@ -924,7 +997,6 @@ export declare enum SiteFeatureKey {
|
|
|
924
997
|
SitesBasicCustomization = "sites-basic-customization",
|
|
925
998
|
SitesBrokenLinks = "sites-broken-links",
|
|
926
999
|
SitesCustomDomain = "sites-custom-domain",
|
|
927
|
-
SitesCustomFonts = "sites-custom-fonts",
|
|
928
1000
|
SitesCustomSubdirectory = "sites-custom-subdirectory",
|
|
929
1001
|
SitesFullTextSearch = "sites-full-text-search",
|
|
930
1002
|
SitesMultivariantSite = "sites-multivariant-site",
|
|
@@ -968,9 +1040,7 @@ export declare enum SiteType {
|
|
|
968
1040
|
Basic = "basic",
|
|
969
1041
|
Premium = "premium",
|
|
970
1042
|
Ultimate = "ultimate",
|
|
971
|
-
Sponsored = "sponsored"
|
|
972
|
-
LegacyBasic = "legacy-basic",
|
|
973
|
-
LegacyPremium = "legacy-premium"
|
|
1043
|
+
Sponsored = "sponsored"
|
|
974
1044
|
}
|
|
975
1045
|
export declare enum PageFeedbackRating {
|
|
976
1046
|
Bad = "bad",
|
|
@@ -1026,9 +1096,6 @@ export declare enum BillingProduct {
|
|
|
1026
1096
|
Pro2024 = "pro_2024",
|
|
1027
1097
|
Enterprise2024 = "enterprise_2024",
|
|
1028
1098
|
Community2024 = "community_2024",
|
|
1029
|
-
Free = "free",
|
|
1030
|
-
Plus = "plus",
|
|
1031
|
-
Pro = "pro",
|
|
1032
1099
|
Internal = "internal"
|
|
1033
1100
|
}
|
|
1034
1101
|
export declare enum OrganizationCommunityType {
|
|
@@ -1090,6 +1157,17 @@ export declare enum IntegrationTarget {
|
|
|
1090
1157
|
Space = "space",
|
|
1091
1158
|
Organization = "organization"
|
|
1092
1159
|
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Why a member is disabled in an organization.
|
|
1162
|
+
* "billing": The organization's plan has reached its maximum number of members.
|
|
1163
|
+
* "scim": The member was deactivated by the organization's identity provider.
|
|
1164
|
+
* "admin": An organization admin disabled the member.
|
|
1165
|
+
*/
|
|
1166
|
+
export declare enum MemberDisabledReason {
|
|
1167
|
+
Billing = "billing",
|
|
1168
|
+
Scim = "scim",
|
|
1169
|
+
Admin = "admin"
|
|
1170
|
+
}
|
|
1093
1171
|
/** The core layout presets for a page. */
|
|
1094
1172
|
export declare enum RevisionPageLayoutPreset {
|
|
1095
1173
|
Docs = "docs",
|
|
@@ -1179,6 +1257,7 @@ export declare enum DocumentTextColor {
|
|
|
1179
1257
|
Violet = "violet",
|
|
1180
1258
|
Cyan = "cyan",
|
|
1181
1259
|
Primary = "$primary",
|
|
1260
|
+
Secondary = "$secondary",
|
|
1182
1261
|
Info = "$info",
|
|
1183
1262
|
Success = "$success",
|
|
1184
1263
|
Warning = "$warning",
|
|
@@ -1302,14 +1381,19 @@ export declare enum ContentVisibility {
|
|
|
1302
1381
|
/** Data passed through a realtime channel */
|
|
1303
1382
|
export type APIChannelData = APIChannelGitSyncOperationData | APIChannelGitSyncSiteOperationData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
|
|
1304
1383
|
/** Channel to subscribe to for realtime updates. */
|
|
1305
|
-
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;
|
|
1384
|
+
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 | APIChannelOrganizationSCIMConnections | 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;
|
|
1306
1385
|
/** The plan upgrade that would make a feature available. */
|
|
1307
1386
|
export type FeatureUpgradeRequirement = {
|
|
1308
1387
|
type: "organization";
|
|
1309
1388
|
/** An organization feature used for plan access and upgrade prompts. */
|
|
1310
1389
|
feature: OrganizationFeature;
|
|
1311
|
-
/** The minimum organization plan that includes the feature. */
|
|
1390
|
+
/** The internal identifier of the minimum organization plan that includes the feature. The human-readable name is provided in requiredPlanName. */
|
|
1312
1391
|
requiredPlan: BillingProduct;
|
|
1392
|
+
/**
|
|
1393
|
+
* The human-readable name of the required organization plan.
|
|
1394
|
+
* @example "Pro"
|
|
1395
|
+
*/
|
|
1396
|
+
requiredPlanName: string;
|
|
1313
1397
|
/**
|
|
1314
1398
|
* Where an admin may upgrade the organization's plan.
|
|
1315
1399
|
* @format uri
|
|
@@ -1319,8 +1403,13 @@ export type FeatureUpgradeRequirement = {
|
|
|
1319
1403
|
type: "site";
|
|
1320
1404
|
/** The site feature identifier */
|
|
1321
1405
|
feature: SiteFeatureKey;
|
|
1322
|
-
/** The minimum site plan that includes the feature. */
|
|
1406
|
+
/** The internal identifier of the minimum site plan that includes the feature. The human-readable name is provided in requiredPlanName. */
|
|
1323
1407
|
requiredPlan: SiteType;
|
|
1408
|
+
/**
|
|
1409
|
+
* The human-readable name of the required site plan.
|
|
1410
|
+
* @example "Ultimate"
|
|
1411
|
+
*/
|
|
1412
|
+
requiredPlanName: string;
|
|
1324
1413
|
/**
|
|
1325
1414
|
* Where an admin may upgrade the site's plan.
|
|
1326
1415
|
* @format uri
|
|
@@ -1388,7 +1477,17 @@ export type ChangeRequestContentChange = ({
|
|
|
1388
1477
|
operation: "insert_files";
|
|
1389
1478
|
} & ChangeRequestContentChangeInsertFiles) | ({
|
|
1390
1479
|
operation: "insert_computed_page";
|
|
1391
|
-
} & ChangeRequestContentChangeInsertComputedPage)
|
|
1480
|
+
} & ChangeRequestContentChangeInsertComputedPage) | ({
|
|
1481
|
+
operation: "insert_reusable_contents";
|
|
1482
|
+
} & ChangeRequestContentChangeInsertReusableContents) | ({
|
|
1483
|
+
operation: "update_reusable_content";
|
|
1484
|
+
} & ChangeRequestContentChangeUpdateReusableContent) | ({
|
|
1485
|
+
operation: "delete_reusable_content";
|
|
1486
|
+
} & ChangeRequestContentChangeDeleteReusableContent) | ({
|
|
1487
|
+
operation: "insert_variables";
|
|
1488
|
+
} & ChangeRequestContentChangeInsertVariables) | ({
|
|
1489
|
+
operation: "update_variable";
|
|
1490
|
+
} & ChangeRequestContentChangeUpdateVariable);
|
|
1392
1491
|
export type Revision = RevisionTypeEdits | RevisionTypeMerge | RevisionTypeRollback | RevisionTypeUpdate | RevisionTypeComputed;
|
|
1393
1492
|
export type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink | RevisionPageComputed;
|
|
1394
1493
|
export interface ApiInformation {
|
|
@@ -2670,7 +2769,7 @@ export interface DocumentBlockExpandable {
|
|
|
2670
2769
|
fragment: "expandable-body";
|
|
2671
2770
|
type: "expandable-body";
|
|
2672
2771
|
/** @minItems 1 */
|
|
2673
|
-
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper)[];
|
|
2772
|
+
nodes: (DocumentBlocksEssentials | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockCode | DocumentBlockTable | DocumentBlockHint | DocumentBlockPrompt | DocumentBlockQuote | DocumentBlockIf | DocumentBlockReusableContent | DocumentBlockIntegration | DocumentBlockStepper | DocumentBlockTabs)[];
|
|
2674
2773
|
}))[];
|
|
2675
2774
|
meta?: {
|
|
2676
2775
|
/** Unique ID to be used in an URL for the block. */
|
|
@@ -3821,6 +3920,12 @@ export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
|
|
|
3821
3920
|
at?: number;
|
|
3822
3921
|
/** Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path. */
|
|
3823
3922
|
ref?: string;
|
|
3923
|
+
/**
|
|
3924
|
+
* Stable identifier for the page's content, such as the ID of the record it is generated from. The page's ID is derived from it, so re-inserting a deleted page with the same key restores its ID and links to it keep working. The same key gives the same page ID in every space, including duplicated spaces. To change a page that exists, use `update_page`: an insert whose key matches an existing page, or another insert in the batch, is rejected, so deleting a page and re-inserting its key must be done in separate requests. A re-created page takes over the old page's comments, redirects, insights and history. When two change requests insert the same key, merging both keeps only one of the pages, without a conflict.
|
|
3925
|
+
* @minLength 1
|
|
3926
|
+
* @maxLength 255
|
|
3927
|
+
*/
|
|
3928
|
+
stableKey?: string;
|
|
3824
3929
|
/** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
|
|
3825
3930
|
document: Document;
|
|
3826
3931
|
};
|
|
@@ -3900,6 +4005,90 @@ export interface ChangeRequestContentChangeInsertComputedPage {
|
|
|
3900
4005
|
*/
|
|
3901
4006
|
at?: number;
|
|
3902
4007
|
}
|
|
4008
|
+
/**
|
|
4009
|
+
* Create reusable content (snippets shared by several pages) in the change request. A markdown document includes one as `{% include "/reusable-content/<reusableContentId>" %}` — use a `ref` to include it from a page in the same batch, or read the generated IDs from `insertedReusableContents`.
|
|
4010
|
+
* @example {"operation":"insert_reusable_contents","reusableContents":[{"ref":"disclaimer","title":"Disclaimer","document":{"markdown":"{% hint style=\"warning\" %}\nThis feature is in beta.\n{% endhint %}\n"}}]}
|
|
4011
|
+
*/
|
|
4012
|
+
export interface ChangeRequestContentChangeInsertReusableContents {
|
|
4013
|
+
operation: "insert_reusable_contents";
|
|
4014
|
+
/**
|
|
4015
|
+
* @maxItems 20
|
|
4016
|
+
* @minItems 1
|
|
4017
|
+
*/
|
|
4018
|
+
reusableContents: {
|
|
4019
|
+
/** Temporary local reference for the reusable content, used only for the lifetime of this request and never persisted. Pages in the same batch can include it by its ref (e.g. `{% include "./<ref>" %}`), which resolves to the reusable content's ID at apply time — regardless of operation order. A ref must be unique among the reusable content refs of the batch. */
|
|
4020
|
+
ref?: string;
|
|
4021
|
+
/**
|
|
4022
|
+
* Title of the reusable content, shown when picking it in the editor.
|
|
4023
|
+
* @minLength 1
|
|
4024
|
+
* @maxLength 100
|
|
4025
|
+
*/
|
|
4026
|
+
title: string;
|
|
4027
|
+
/** Body of the reusable content. */
|
|
4028
|
+
document: Document;
|
|
4029
|
+
}[];
|
|
4030
|
+
}
|
|
4031
|
+
/**
|
|
4032
|
+
* Update an existing reusable content's title and/or document. Its ID is unchanged, so every page including it shows the update.
|
|
4033
|
+
* @example {"operation":"update_reusable_content","reusableContent":"reusable_content_id","title":"Beta disclaimer"}
|
|
4034
|
+
*/
|
|
4035
|
+
export interface ChangeRequestContentChangeUpdateReusableContent {
|
|
4036
|
+
operation: "update_reusable_content";
|
|
4037
|
+
/** ID of the reusable content to update. */
|
|
4038
|
+
reusableContent: string;
|
|
4039
|
+
/**
|
|
4040
|
+
* New title of the reusable content. Omit to keep the current title.
|
|
4041
|
+
* @minLength 1
|
|
4042
|
+
* @maxLength 100
|
|
4043
|
+
*/
|
|
4044
|
+
title?: string;
|
|
4045
|
+
/** New body of the reusable content. Omit to keep the current body. */
|
|
4046
|
+
document?: Document;
|
|
4047
|
+
}
|
|
4048
|
+
/**
|
|
4049
|
+
* Delete an existing reusable content from the change request.
|
|
4050
|
+
* @example {"operation":"delete_reusable_content","reusableContent":"reusable_content_id"}
|
|
4051
|
+
*/
|
|
4052
|
+
export interface ChangeRequestContentChangeDeleteReusableContent {
|
|
4053
|
+
operation: "delete_reusable_content";
|
|
4054
|
+
/** ID of the reusable content to delete. */
|
|
4055
|
+
reusableContent: string;
|
|
4056
|
+
}
|
|
4057
|
+
/**
|
|
4058
|
+
* Name of a variable, referenced in content as `space.vars.<name>`. It starts with a letter, `_` or `$` and contains only letters, digits, `_` and `$`.
|
|
4059
|
+
* @minLength 1
|
|
4060
|
+
* @maxLength 64
|
|
4061
|
+
* @pattern ^[a-zA-Z_$][a-zA-Z0-9_$]*$
|
|
4062
|
+
*/
|
|
4063
|
+
export type VariableName = string;
|
|
4064
|
+
/**
|
|
4065
|
+
* Create space variables in the change request (Git Sync's `.gitbook/vars.yaml`). Content references one as an expression, `<code class="expression">space.vars.<name></code>` in markdown, which renders the variable's value.
|
|
4066
|
+
* @example {"operation":"insert_variables","variables":[{"name":"version","value":"2.0"}]}
|
|
4067
|
+
*/
|
|
4068
|
+
export interface ChangeRequestContentChangeInsertVariables {
|
|
4069
|
+
operation: "insert_variables";
|
|
4070
|
+
/**
|
|
4071
|
+
* @maxItems 50
|
|
4072
|
+
* @minItems 1
|
|
4073
|
+
*/
|
|
4074
|
+
variables: {
|
|
4075
|
+
/** Name of a variable, referenced in content as `space.vars.<name>`. It starts with a letter, `_` or `$` and contains only letters, digits, `_` and `$`. */
|
|
4076
|
+
name: VariableName;
|
|
4077
|
+
/** Value of the variable. */
|
|
4078
|
+
value: VariableValue;
|
|
4079
|
+
}[];
|
|
4080
|
+
}
|
|
4081
|
+
/**
|
|
4082
|
+
* Change the value of an existing space variable. Every expression referencing it shows the new value.
|
|
4083
|
+
* @example {"operation":"update_variable","variable":"version","value":"2.1"}
|
|
4084
|
+
*/
|
|
4085
|
+
export interface ChangeRequestContentChangeUpdateVariable {
|
|
4086
|
+
operation: "update_variable";
|
|
4087
|
+
/** Name of the variable to update. */
|
|
4088
|
+
variable: VariableName;
|
|
4089
|
+
/** New value of the variable. */
|
|
4090
|
+
value: VariableValue;
|
|
4091
|
+
}
|
|
3903
4092
|
export interface ChangeRequestContentUpdatePageRef {
|
|
3904
4093
|
/** Type of Object, always equals to "page". */
|
|
3905
4094
|
object: "page";
|
|
@@ -3941,6 +4130,8 @@ export interface ChangeRequestContentUpdate {
|
|
|
3941
4130
|
changes: ChangeRequestContentUpdateChange[];
|
|
3942
4131
|
/** 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. */
|
|
3943
4132
|
insertedFiles?: RevisionFile[];
|
|
4133
|
+
/** Reusable contents created by the `insert_reusable_contents` changes in this batch, in the order they were inserted. Use their IDs to include them from a document. */
|
|
4134
|
+
insertedReusableContents?: RevisionReusableContent[];
|
|
3944
4135
|
}
|
|
3945
4136
|
export interface ChangedRevisionPage {
|
|
3946
4137
|
id: string;
|
|
@@ -4094,13 +4285,46 @@ export interface RevisionSemanticChangeTagDeleted {
|
|
|
4094
4285
|
}
|
|
4095
4286
|
export interface RevisionTagChangeAttributes {
|
|
4096
4287
|
label?: ChangeAttributeString;
|
|
4288
|
+
group?: ChangeAttributeString;
|
|
4289
|
+
parent?: ChangeAttributeString;
|
|
4097
4290
|
}
|
|
4098
4291
|
export interface RevisionSemanticChangeTagEdited {
|
|
4099
4292
|
type: "tag_edited";
|
|
4100
4293
|
tag: ChangedRevisionTag;
|
|
4101
4294
|
attributes: RevisionTagChangeAttributes;
|
|
4102
4295
|
}
|
|
4103
|
-
|
|
4296
|
+
/** A space-scoped group of tags in this revision. Groups may contain other groups. */
|
|
4297
|
+
export interface RevisionTagGroup {
|
|
4298
|
+
/** Immutable group identifier, unique within the revision. */
|
|
4299
|
+
slug: string;
|
|
4300
|
+
/** Display name of the group. */
|
|
4301
|
+
label: string;
|
|
4302
|
+
/** Parent group slug. Omitted for root groups. */
|
|
4303
|
+
parent?: string;
|
|
4304
|
+
/** Lexicographic sibling sort key. Break ties using the slug. */
|
|
4305
|
+
orderIndex: string;
|
|
4306
|
+
}
|
|
4307
|
+
export interface RevisionSemanticChangeTagGroupCreated {
|
|
4308
|
+
type: "tag_group_created";
|
|
4309
|
+
/** A space-scoped group of tags in this revision. Groups may contain other groups. */
|
|
4310
|
+
tagGroup: RevisionTagGroup;
|
|
4311
|
+
}
|
|
4312
|
+
export interface RevisionSemanticChangeTagGroupEdited {
|
|
4313
|
+
type: "tag_group_edited";
|
|
4314
|
+
/** A space-scoped group of tags in this revision. Groups may contain other groups. */
|
|
4315
|
+
tagGroup: RevisionTagGroup;
|
|
4316
|
+
attributes: {
|
|
4317
|
+
label?: ChangeAttributeString;
|
|
4318
|
+
parent?: ChangeAttributeString;
|
|
4319
|
+
orderIndex?: ChangeAttributeString;
|
|
4320
|
+
};
|
|
4321
|
+
}
|
|
4322
|
+
export interface RevisionSemanticChangeTagGroupDeleted {
|
|
4323
|
+
type: "tag_group_deleted";
|
|
4324
|
+
/** A space-scoped group of tags in this revision. Groups may contain other groups. */
|
|
4325
|
+
tagGroup: RevisionTagGroup;
|
|
4326
|
+
}
|
|
4327
|
+
export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeVariablesEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited | RevisionSemanticChangeTagCreated | RevisionSemanticChangeTagDeleted | RevisionSemanticChangeTagEdited | RevisionSemanticChangeTagGroupCreated | RevisionSemanticChangeTagGroupEdited | RevisionSemanticChangeTagGroupDeleted;
|
|
4104
4328
|
export interface RevisionSemanticChanges {
|
|
4105
4329
|
/** The change request object that initiated the changes in the case of a merge revision. */
|
|
4106
4330
|
mergedFrom?: ChangeRequest;
|
|
@@ -4116,6 +4340,8 @@ export interface UpdateCommentReplySchema {
|
|
|
4116
4340
|
/** Reactions to remove from the comment. */
|
|
4117
4341
|
removedReactions?: string[];
|
|
4118
4342
|
}
|
|
4343
|
+
/** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
|
|
4344
|
+
export type MemberDisabled = false | MemberDisabledReason;
|
|
4119
4345
|
export interface OrganizationMember {
|
|
4120
4346
|
/** Type of Object, always equals to "member" */
|
|
4121
4347
|
object: "member";
|
|
@@ -4124,8 +4350,8 @@ export interface OrganizationMember {
|
|
|
4124
4350
|
/** The role of a member in an organization, null for guests */
|
|
4125
4351
|
role: MemberRoleOrGuest;
|
|
4126
4352
|
user: User;
|
|
4127
|
-
/**
|
|
4128
|
-
disabled:
|
|
4353
|
+
/** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
|
|
4354
|
+
disabled: MemberDisabled;
|
|
4129
4355
|
/** Date at which the user joined the organization. */
|
|
4130
4356
|
joinedAt: Timestamp;
|
|
4131
4357
|
/** Date at which the user was last seen active in the organization. */
|
|
@@ -4410,6 +4636,8 @@ export interface Organization {
|
|
|
4410
4636
|
sso?: boolean;
|
|
4411
4637
|
/** If true, the organization is configured to use all our AI features. */
|
|
4412
4638
|
ai?: boolean;
|
|
4639
|
+
/** Whether the master AI setting is turned on, regardless of plan availability. Contract overrides forcing AI off take precedence. */
|
|
4640
|
+
aiPreference?: boolean;
|
|
4413
4641
|
/** AI preferences. Missing feature keys leave features enabled, subject to the master AI setting and feature eligibility. */
|
|
4414
4642
|
aiSettings?: OrganizationAISettings;
|
|
4415
4643
|
/** Whether AI features have been paused automatically due to lack of AI credits. */
|
|
@@ -4459,14 +4687,6 @@ export interface Organization {
|
|
|
4459
4687
|
/** A short description giving context on the reason for the block. */
|
|
4460
4688
|
reason: BlockReason;
|
|
4461
4689
|
};
|
|
4462
|
-
internal_billingMigration?: {
|
|
4463
|
-
/** When we will upgrade the organization onto new pricing, if they haven't already. */
|
|
4464
|
-
deadline?: Timestamp;
|
|
4465
|
-
/** A discount the organization may have received thanks to migrating early. */
|
|
4466
|
-
discountPercent?: number;
|
|
4467
|
-
/** The expiration date of the discount, after wich regular pricing resumes. */
|
|
4468
|
-
discountEndDate?: Timestamp;
|
|
4469
|
-
};
|
|
4470
4690
|
/** The set of permissions for the organization */
|
|
4471
4691
|
permissions: {
|
|
4472
4692
|
/** Can the user view the organization. */
|
|
@@ -5221,6 +5441,8 @@ export interface Site {
|
|
|
5221
5441
|
type: SiteType;
|
|
5222
5442
|
/** The currently applied type of the site. For example, frozen sites will have this set to Basic. */
|
|
5223
5443
|
appliedType: SiteType;
|
|
5444
|
+
/** Who unpublished this site last. Cleared when the site is published again. */
|
|
5445
|
+
unpublishedBy?: "user" | "system";
|
|
5224
5446
|
/** Title of the site */
|
|
5225
5447
|
title: SiteTitle;
|
|
5226
5448
|
icon?: CustomizationFavicon | null;
|
|
@@ -5813,6 +6035,8 @@ export interface SiteSection {
|
|
|
5813
6035
|
default?: boolean;
|
|
5814
6036
|
/** Whether the site section is draft and not live. */
|
|
5815
6037
|
draft: boolean;
|
|
6038
|
+
/** Whether the site section is hidden. It is hidden when all of its site spaces are hidden, in which case it is not shown in the site's navigation. */
|
|
6039
|
+
hidden?: boolean;
|
|
5816
6040
|
/** Path to the section on the site */
|
|
5817
6041
|
path: SiteSectionPath;
|
|
5818
6042
|
/** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
|
|
@@ -5851,6 +6075,8 @@ export interface SiteSectionGroup {
|
|
|
5851
6075
|
* @deprecated
|
|
5852
6076
|
*/
|
|
5853
6077
|
sections: SiteSection[];
|
|
6078
|
+
/** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor. */
|
|
6079
|
+
condition?: Expression;
|
|
5854
6080
|
/** ID of the parent section group this group belongs to */
|
|
5855
6081
|
sectionGroup?: string;
|
|
5856
6082
|
/** Whether the site section group is draft and not live. */
|
|
@@ -6422,34 +6648,6 @@ export type BillingUpgrade = {
|
|
|
6422
6648
|
} | {
|
|
6423
6649
|
result: "interval_changed";
|
|
6424
6650
|
};
|
|
6425
|
-
export interface MigrateOrganizationParameters {
|
|
6426
|
-
/** The desired billing interval */
|
|
6427
|
-
interval: BillingInterval;
|
|
6428
|
-
/** The new product to upgrade to */
|
|
6429
|
-
product: "free_2024" | "plus_2024" | "pro_2024";
|
|
6430
|
-
/** Changes to apply during a subscription upgrade or downgrade */
|
|
6431
|
-
changes: SubscriptionChanges;
|
|
6432
|
-
}
|
|
6433
|
-
export interface Error {
|
|
6434
|
-
error: {
|
|
6435
|
-
/** @format int32 */
|
|
6436
|
-
code: number;
|
|
6437
|
-
message: string;
|
|
6438
|
-
};
|
|
6439
|
-
}
|
|
6440
|
-
export interface BillingDiscount {
|
|
6441
|
-
/** How many months the discount will last */
|
|
6442
|
-
duration: number;
|
|
6443
|
-
/** Percent that will be deducted from the subtotal of the invoice */
|
|
6444
|
-
percentOff: number;
|
|
6445
|
-
}
|
|
6446
|
-
export interface SitePageviews {
|
|
6447
|
-
object: "site-pageviews";
|
|
6448
|
-
/** The identifier of the site */
|
|
6449
|
-
siteId: string;
|
|
6450
|
-
/** Number of pageviews in the past 30 days */
|
|
6451
|
-
pageviews: number;
|
|
6452
|
-
}
|
|
6453
6651
|
export interface BillingPortal {
|
|
6454
6652
|
/** URL to the billing portal for an organization */
|
|
6455
6653
|
url: string;
|
|
@@ -6590,6 +6788,47 @@ export interface OrganizationSAMLProvider {
|
|
|
6590
6788
|
location: string;
|
|
6591
6789
|
};
|
|
6592
6790
|
}
|
|
6791
|
+
/**
|
|
6792
|
+
* Name of the SCIM connection, shown to organization admins.
|
|
6793
|
+
* @minLength 1
|
|
6794
|
+
* @maxLength 100
|
|
6795
|
+
*/
|
|
6796
|
+
export type SCIMConnectionLabel = string;
|
|
6797
|
+
/** A SCIM connection through which an identity provider provisions organization members. */
|
|
6798
|
+
export interface OrganizationSCIMConnection {
|
|
6799
|
+
/** The object type, which is always "scim-connection" */
|
|
6800
|
+
object: "scim-connection";
|
|
6801
|
+
/** Unique identifier of the SCIM connection */
|
|
6802
|
+
id: string;
|
|
6803
|
+
/** Name of the SCIM connection, shown to organization admins. */
|
|
6804
|
+
label: SCIMConnectionLabel;
|
|
6805
|
+
/** Identity provider that provisions members through the SCIM connection. */
|
|
6806
|
+
provider: SCIMConnectionProvider;
|
|
6807
|
+
/** SCIM base URL to configure in the identity provider */
|
|
6808
|
+
baseURL: URL;
|
|
6809
|
+
/** Last characters of the current token, to identify it */
|
|
6810
|
+
tokenHint: string;
|
|
6811
|
+
/** Date the current token was created */
|
|
6812
|
+
tokenCreatedAt: Timestamp;
|
|
6813
|
+
/** Date of the last request authenticated with the token */
|
|
6814
|
+
lastUsedAt?: Timestamp;
|
|
6815
|
+
/** Date of creation */
|
|
6816
|
+
createdAt: Timestamp;
|
|
6817
|
+
/** Date of the last update */
|
|
6818
|
+
updatedAt: Timestamp;
|
|
6819
|
+
/** URLs associated with the object */
|
|
6820
|
+
urls: {
|
|
6821
|
+
/** URL of the SCIM connection in the API */
|
|
6822
|
+
location: URL;
|
|
6823
|
+
};
|
|
6824
|
+
}
|
|
6825
|
+
/** A SCIM connection with its token, returned only when the token is created. */
|
|
6826
|
+
export interface OrganizationSCIMConnectionWithToken {
|
|
6827
|
+
/** A SCIM connection through which an identity provider provisions organization members. */
|
|
6828
|
+
connection: OrganizationSCIMConnection;
|
|
6829
|
+
/** Bearer token to configure in the identity provider. It can't be retrieved again. */
|
|
6830
|
+
token: string;
|
|
6831
|
+
}
|
|
6593
6832
|
export interface OrganizationSSOProviderLogin {
|
|
6594
6833
|
/** Unique identifier for the provider. */
|
|
6595
6834
|
id: string;
|
|
@@ -6611,14 +6850,7 @@ export interface OrganizationUsageCollections {
|
|
|
6611
6850
|
total: number;
|
|
6612
6851
|
}
|
|
6613
6852
|
/** Sites usage metrics of an organization */
|
|
6614
|
-
export
|
|
6615
|
-
/** Count of all sites */
|
|
6616
|
-
total: number;
|
|
6617
|
-
/** Count of all legacy basic sites */
|
|
6618
|
-
legacyBasic: number;
|
|
6619
|
-
/** Count of all legacy premium sites */
|
|
6620
|
-
legacyPremium: number;
|
|
6621
|
-
} | {
|
|
6853
|
+
export interface OrganizationUsageSites {
|
|
6622
6854
|
/** Count of all sites */
|
|
6623
6855
|
total: number;
|
|
6624
6856
|
/** Count of all basic sites */
|
|
@@ -6629,7 +6861,7 @@ export type OrganizationUsageSites = {
|
|
|
6629
6861
|
ultimate: number;
|
|
6630
6862
|
/** Count of all sponsored sites */
|
|
6631
6863
|
sponsored: number;
|
|
6632
|
-
}
|
|
6864
|
+
}
|
|
6633
6865
|
/** Team members usage metrics of an organization */
|
|
6634
6866
|
export interface OrganizationUsageTeams {
|
|
6635
6867
|
/** Count of all teams */
|
|
@@ -6637,9 +6869,20 @@ export interface OrganizationUsageTeams {
|
|
|
6637
6869
|
}
|
|
6638
6870
|
/** Members usage metrics of an organization */
|
|
6639
6871
|
export interface OrganizationUsageMembers {
|
|
6640
|
-
/** Count of all members */
|
|
6872
|
+
/** Count of all members, including disabled ones */
|
|
6641
6873
|
total: number;
|
|
6642
|
-
/** Count of
|
|
6874
|
+
/** Count of members that are not disabled */
|
|
6875
|
+
active: number;
|
|
6876
|
+
/** Count of disabled members, by the reason they are disabled */
|
|
6877
|
+
disabled: {
|
|
6878
|
+
billing: number;
|
|
6879
|
+
scim: number;
|
|
6880
|
+
admin: number;
|
|
6881
|
+
};
|
|
6882
|
+
/**
|
|
6883
|
+
* Count of paid seats. On the Free plan, it includes members disabled for billing, since
|
|
6884
|
+
* upgrading re-enables them. On paid plans, it only includes active members.
|
|
6885
|
+
*/
|
|
6643
6886
|
seats: number;
|
|
6644
6887
|
/** Count of all admins */
|
|
6645
6888
|
admin: number;
|
|
@@ -7170,6 +7413,13 @@ export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
|
7170
7413
|
location: string;
|
|
7171
7414
|
};
|
|
7172
7415
|
};
|
|
7416
|
+
export interface Error {
|
|
7417
|
+
error: {
|
|
7418
|
+
/** @format int32 */
|
|
7419
|
+
code: number;
|
|
7420
|
+
message: string;
|
|
7421
|
+
};
|
|
7422
|
+
}
|
|
7173
7423
|
/** 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. */
|
|
7174
7424
|
export type SiteAdaptiveRegions = Record<any, {
|
|
7175
7425
|
/** ISO 3166-1 alpha-2 codes of the countries in the region. */
|
|
@@ -7354,6 +7604,8 @@ export interface SiteCustomizationSettingsBase {
|
|
|
7354
7604
|
*/
|
|
7355
7605
|
theme: CustomizationTheme;
|
|
7356
7606
|
primaryColor: CustomizationThemedColor;
|
|
7607
|
+
/** Secondary brand color, used for secondary buttons and for content colored with `$secondary`. When not set, these elements use the neutral colors of the site. */
|
|
7608
|
+
secondaryColor?: CustomizationThemedColor;
|
|
7357
7609
|
tint?: CustomizationTint;
|
|
7358
7610
|
infoColor: CustomizationThemedColor;
|
|
7359
7611
|
successColor: CustomizationThemedColor;
|
|
@@ -7529,6 +7781,17 @@ export interface PublishedContentSite {
|
|
|
7529
7781
|
};
|
|
7530
7782
|
scripts: SiteIntegrationScript[];
|
|
7531
7783
|
}
|
|
7784
|
+
/** Steps to set up a site, each completed or not from the site's current data. */
|
|
7785
|
+
export interface SiteSetup {
|
|
7786
|
+
/** Every setup step, in order. Empty once the site has been published, which ends the setup even if other steps are not completed. */
|
|
7787
|
+
steps: {
|
|
7788
|
+
/** A step of the setup of a site, in the order they are done. */
|
|
7789
|
+
id: SiteSetupStepId;
|
|
7790
|
+
completed: boolean;
|
|
7791
|
+
/** How to complete the step. Only present when it is not completed. */
|
|
7792
|
+
action?: string;
|
|
7793
|
+
}[];
|
|
7794
|
+
}
|
|
7532
7795
|
/** 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. */
|
|
7533
7796
|
export interface SiteChangeRequestMember {
|
|
7534
7797
|
object: "site-change-request-member";
|
|
@@ -7993,6 +8256,49 @@ export type SiteTriageFilterConnections = string;
|
|
|
7993
8256
|
* @maxLength 256
|
|
7994
8257
|
*/
|
|
7995
8258
|
export type SiteFindingTitle = string;
|
|
8259
|
+
/**
|
|
8260
|
+
* Serving redirect
|
|
8261
|
+
* The live redirect serving a `broken-link` finding's path.
|
|
8262
|
+
*/
|
|
8263
|
+
export interface SiteFindingServingRedirect {
|
|
8264
|
+
/** ID of the redirect. */
|
|
8265
|
+
redirect: string;
|
|
8266
|
+
/** Whether a wildcard redirect covers the path rather than one at the path itself. Reopening the finding would delete it, so `reopen` isn't offered. */
|
|
8267
|
+
wildcard: boolean;
|
|
8268
|
+
/** Whether GitBook created the redirect on its own. */
|
|
8269
|
+
createdByAgent: boolean;
|
|
8270
|
+
}
|
|
8271
|
+
/**
|
|
8272
|
+
* Awaiting change request
|
|
8273
|
+
* The change request GitBook drafted to fix an `outbound-link-error` finding, waiting to be approved or rejected. Approving it means merging it. Reject it with `applySiteFindingAction`.
|
|
8274
|
+
*/
|
|
8275
|
+
export interface SiteFindingAwaitingChangeRequest {
|
|
8276
|
+
/** ID of the space the change request is in. */
|
|
8277
|
+
space: string;
|
|
8278
|
+
/** ID of the change request. */
|
|
8279
|
+
changeRequest: string;
|
|
8280
|
+
/** Number of open outbound links on the site the change request fixes. */
|
|
8281
|
+
findings: number;
|
|
8282
|
+
}
|
|
8283
|
+
/**
|
|
8284
|
+
* Available action
|
|
8285
|
+
* An action a finding allows now, with the site permission it needs.
|
|
8286
|
+
*/
|
|
8287
|
+
export interface SiteFindingAvailableAction {
|
|
8288
|
+
/**
|
|
8289
|
+
* An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
|
|
8290
|
+
* - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding. A change request GitBook drafted for an outbound link is approved by merging it.
|
|
8291
|
+
* - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again. For an outbound link, it archives the change request GitBook drafted (`awaitingChangeRequest`) and unlinks every link it fixes. They are open again, marked `undone`, and GitBook won't draft a fix for them again.
|
|
8292
|
+
* - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
|
|
8293
|
+
* - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
|
|
8294
|
+
* - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
|
|
8295
|
+
* - `ignore` dismisses it.
|
|
8296
|
+
* - `restore` reopens a dismissed finding.
|
|
8297
|
+
*/
|
|
8298
|
+
action: SiteFindingAction;
|
|
8299
|
+
/** Site permission the action needs. */
|
|
8300
|
+
permission: "edit" | "admin";
|
|
8301
|
+
}
|
|
7996
8302
|
/**
|
|
7997
8303
|
* The source path to redirect from.
|
|
7998
8304
|
* @maxLength 512
|
|
@@ -8014,20 +8320,22 @@ export interface SiteFindingBrokenLinkAction {
|
|
|
8014
8320
|
captureWildcard?: boolean;
|
|
8015
8321
|
destination?: SiteRedirectInputDestinationPath;
|
|
8016
8322
|
}
|
|
8017
|
-
/** 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. */
|
|
8323
|
+
/** Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type. */
|
|
8018
8324
|
export interface SiteFindingOutboundLink {
|
|
8019
8325
|
/**
|
|
8020
|
-
* The external URL that fails
|
|
8326
|
+
* The external URL that fails. Absent when `host` is set.
|
|
8021
8327
|
* @format uri
|
|
8022
8328
|
*/
|
|
8023
|
-
url
|
|
8024
|
-
/**
|
|
8025
|
-
|
|
8329
|
+
url?: string;
|
|
8330
|
+
/** The domain that doesn't resolve, set instead of `url` when the finding covers every link to that domain on the site. */
|
|
8331
|
+
host?: string;
|
|
8332
|
+
/** Current health status of the URL or domain for this site. */
|
|
8333
|
+
status?: "pending" | "healthy" | "suspect" | "failed" | "recovering" | "canceled";
|
|
8026
8334
|
/** Classification of the confirmed failure. */
|
|
8027
8335
|
failureKind?: "client-error" | "server-error" | "redirect" | "dns" | "tls" | "connection" | "timeout";
|
|
8028
8336
|
/** HTTP status code of the last observation, when one was received. */
|
|
8029
8337
|
httpStatus?: number;
|
|
8030
|
-
/** When the URL was last observed
|
|
8338
|
+
/** When the URL or domain was last observed. */
|
|
8031
8339
|
checkedAt?: Timestamp;
|
|
8032
8340
|
}
|
|
8033
8341
|
export interface SiteFinding {
|
|
@@ -8071,9 +8379,25 @@ export interface SiteFinding {
|
|
|
8071
8379
|
description: JSONDocument;
|
|
8072
8380
|
/** Whether an AI agent should be able to fix this finding directly */
|
|
8073
8381
|
autoFixable: boolean;
|
|
8382
|
+
/** What GitBook did on its own to resolve the finding. Null when it never acted on the finding. */
|
|
8383
|
+
autoResolution: SiteFindingAutoResolution | null;
|
|
8384
|
+
/**
|
|
8385
|
+
* Where a link finding stands, from its status and what GitBook did with it.
|
|
8386
|
+
* - `open` needs a fix.
|
|
8387
|
+
* - `awaiting-approval` has a fix GitBook drafted, waiting to be approved or rejected: a redirect at a `broken-link` finding's path, or an unmerged change request for an `outbound-link-error` finding (`awaitingChangeRequest`).
|
|
8388
|
+
* - `resolved` was fixed or closed: `servingRedirect` says whether a live redirect serves its path.
|
|
8389
|
+
* - `ignored` was dismissed.
|
|
8390
|
+
*/
|
|
8391
|
+
state?: SiteFindingState;
|
|
8392
|
+
/** The live redirect serving a `broken-link` finding's path. */
|
|
8393
|
+
servingRedirect?: SiteFindingServingRedirect;
|
|
8394
|
+
/** The change request GitBook drafted to fix an `outbound-link-error` finding, waiting to be approved or rejected. Approving it means merging it. Reject it with `applySiteFindingAction`. */
|
|
8395
|
+
awaitingChangeRequest?: SiteFindingAwaitingChangeRequest;
|
|
8396
|
+
/** Actions the finding allows now, applied with `applySiteFindingAction`. */
|
|
8397
|
+
actions?: SiteFindingAvailableAction[];
|
|
8074
8398
|
/** 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. */
|
|
8075
8399
|
brokenLinkAction?: SiteFindingBrokenLinkAction;
|
|
8076
|
-
/** 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. */
|
|
8400
|
+
/** Details of an `outbound-link-error` finding: the failing external URL, or the domain when it doesn't resolve, and the observed failure, sourced from the site's outbound link checks. A resolved finding has either `url` or `host` and no other field. Absent on findings of any other type. */
|
|
8077
8401
|
outboundLink?: SiteFindingOutboundLink;
|
|
8078
8402
|
createdAt: Timestamp;
|
|
8079
8403
|
updatedAt: Timestamp;
|
|
@@ -8127,6 +8451,13 @@ export interface SiteQuestionStatsTypes {
|
|
|
8127
8451
|
export type SiteQuestionStatsChannelTypes = Record<string, number>;
|
|
8128
8452
|
/** Count of answers by site channel ID. */
|
|
8129
8453
|
export type SiteQuestionStatsChannels = Record<string, number>;
|
|
8454
|
+
/** Count of answers by visitor type. */
|
|
8455
|
+
export interface SiteQuestionStatsVisitorTypes {
|
|
8456
|
+
human: number;
|
|
8457
|
+
agent: number;
|
|
8458
|
+
bot: number;
|
|
8459
|
+
unknown: number;
|
|
8460
|
+
}
|
|
8130
8461
|
/** Aggregated stats for questions and linked answers. */
|
|
8131
8462
|
export interface SiteQuestionStats {
|
|
8132
8463
|
/** Total count of questions included in the aggregation. */
|
|
@@ -8143,6 +8474,8 @@ export interface SiteQuestionStats {
|
|
|
8143
8474
|
channelTypes: SiteQuestionStatsChannelTypes;
|
|
8144
8475
|
/** Count of answers by site channel ID. */
|
|
8145
8476
|
channels: SiteQuestionStatsChannels;
|
|
8477
|
+
/** Count of answers by visitor type. */
|
|
8478
|
+
visitorTypes: SiteQuestionStatsVisitorTypes;
|
|
8146
8479
|
/**
|
|
8147
8480
|
* Weekly count of related question answers for the past 3 months.
|
|
8148
8481
|
* @maxItems 13
|
|
@@ -8555,6 +8888,18 @@ export type SiteQuestionAnswerSourceRecord = SiteQuestionAnswerSourceBase & {
|
|
|
8555
8888
|
/** Integration source */
|
|
8556
8889
|
connector?: ContextConnector;
|
|
8557
8890
|
};
|
|
8891
|
+
export interface SiteQuestionTimelineBucket {
|
|
8892
|
+
/** Start of the bucket. */
|
|
8893
|
+
time: Timestamp;
|
|
8894
|
+
/** Count of answers given during the bucket. */
|
|
8895
|
+
answers: number;
|
|
8896
|
+
/** Count of distinct visitors who received those answers. */
|
|
8897
|
+
visitors: number;
|
|
8898
|
+
}
|
|
8899
|
+
/** Ask AI answers counted per bucket, oldest first. */
|
|
8900
|
+
export interface SiteQuestionTimeline {
|
|
8901
|
+
items: SiteQuestionTimelineBucket[];
|
|
8902
|
+
}
|
|
8558
8903
|
export interface SiteQuestionAnswer {
|
|
8559
8904
|
object: "site-question-answer";
|
|
8560
8905
|
/** The ID of the site question answer. */
|
|
@@ -8602,6 +8947,8 @@ export interface SiteQuestionAnswer {
|
|
|
8602
8947
|
/** ID of the associated site channel when the answer originates from a configurable channel. Null if the channel has been deleted. */
|
|
8603
8948
|
id: string | null;
|
|
8604
8949
|
};
|
|
8950
|
+
/** Who asked the question: `human` for a person using a web browser, `agent` for an AI agent, `bot` for another automated client that names itself, such as a search engine crawler, and `unknown` when it can't be told, such as for a script calling the API. */
|
|
8951
|
+
visitorType: SiteQuestionVisitorType;
|
|
8605
8952
|
createdAt: Timestamp;
|
|
8606
8953
|
updatedAt?: Timestamp;
|
|
8607
8954
|
/** URLs associated with the site question answer. */
|
|
@@ -8860,6 +9207,13 @@ export interface AIToolCallArchiveChangeRequest {
|
|
|
8860
9207
|
/** Why the agent gave up on implementing the change request. */
|
|
8861
9208
|
reason: string;
|
|
8862
9209
|
}
|
|
9210
|
+
export interface AIToolCallMergeChangeRequest {
|
|
9211
|
+
tool: "mergeChangeRequest";
|
|
9212
|
+
/** The ID of the space the change request belongs to. */
|
|
9213
|
+
spaceId: string;
|
|
9214
|
+
/** The ID of the change request that was merged. */
|
|
9215
|
+
changeRequestId: string;
|
|
9216
|
+
}
|
|
8863
9217
|
export interface AIToolCallComment {
|
|
8864
9218
|
tool: "comment";
|
|
8865
9219
|
/** The ID of the space being commented. */
|
|
@@ -8926,6 +9280,32 @@ export interface AIToolCallCheckContentImport {
|
|
|
8926
9280
|
/** Number of pages the import has discovered so far. */
|
|
8927
9281
|
totalPages: number;
|
|
8928
9282
|
}
|
|
9283
|
+
export interface AIToolCallImportOpenAPISpec {
|
|
9284
|
+
tool: "importOpenAPISpec";
|
|
9285
|
+
/** The ID of the space the API reference is added to. */
|
|
9286
|
+
spaceId: string;
|
|
9287
|
+
/** The ID of the change request the API reference is added to. */
|
|
9288
|
+
changeRequestId: string;
|
|
9289
|
+
/** The slug of the OpenAPI spec the reference is generated from. */
|
|
9290
|
+
specSlug: string;
|
|
9291
|
+
/** The URL the spec is imported from, when importing from a URL. */
|
|
9292
|
+
url?: string;
|
|
9293
|
+
/** Name of the attached file the spec is imported from, when importing a file. */
|
|
9294
|
+
file?: string;
|
|
9295
|
+
}
|
|
9296
|
+
export interface AIToolCallSiteSetupStep {
|
|
9297
|
+
tool: "siteSetupStep";
|
|
9298
|
+
/** A step of the setup of a site, in the order they are done. */
|
|
9299
|
+
step: SiteSetupStepId;
|
|
9300
|
+
/**
|
|
9301
|
+
* Where the setup step stands in the conversation.
|
|
9302
|
+
* * `current`: The step is being worked on.
|
|
9303
|
+
* * `done`: The step is completed.
|
|
9304
|
+
* * `skipped`: The user skipped the step.
|
|
9305
|
+
* * `pending`: The step is not started: it waits again after the user went back to an earlier step.
|
|
9306
|
+
*/
|
|
9307
|
+
status: "current" | "done" | "skipped" | "pending";
|
|
9308
|
+
}
|
|
8929
9309
|
/** 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. */
|
|
8930
9310
|
export interface AIToolCallStartBackgroundAgent {
|
|
8931
9311
|
tool: "startBackgroundAgent";
|
|
@@ -8963,7 +9343,7 @@ export interface AIToolCallOther {
|
|
|
8963
9343
|
/** Summary of a generic tool call. */
|
|
8964
9344
|
summary: AIToolCallOtherSummary;
|
|
8965
9345
|
}
|
|
8966
|
-
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;
|
|
9346
|
+
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 | AIToolCallMergeChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallGetComments | AIToolCallSubmitChangeRequestReview | AIToolCallStartContentImport | AIToolCallCheckContentImport | AIToolCallImportOpenAPISpec | AIToolCallSiteSetupStep | AIToolCallStartBackgroundAgent | AIToolCallMCP | AIToolCallOther;
|
|
8967
9347
|
export interface Timerange {
|
|
8968
9348
|
start: Timestamp;
|
|
8969
9349
|
end: Timestamp;
|
|
@@ -9082,6 +9462,8 @@ export interface AIMessage {
|
|
|
9082
9462
|
* @format date-time
|
|
9083
9463
|
*/
|
|
9084
9464
|
createdAt?: string;
|
|
9465
|
+
/** The identifier the client gave the message when it sent it. Absent on messages the agent wrote, and on messages sent without one. */
|
|
9466
|
+
clientMessageId?: string;
|
|
9085
9467
|
}
|
|
9086
9468
|
export type SiteQuestionAnswerWithResponse = SiteQuestionAnswer & {
|
|
9087
9469
|
response: AIMessage;
|
|
@@ -9154,8 +9536,8 @@ export interface UserSitePermission {
|
|
|
9154
9536
|
user: User;
|
|
9155
9537
|
/** The origin that enforced the effective permission level for a user in a site. */
|
|
9156
9538
|
origin: UserSitePermissionOrigin;
|
|
9157
|
-
/**
|
|
9158
|
-
disabled:
|
|
9539
|
+
/** Why the member is disabled, or false when the member is active. A disabled member cannot access the organization or its content. */
|
|
9540
|
+
disabled: MemberDisabled;
|
|
9159
9541
|
/** Date at which the user was last seen */
|
|
9160
9542
|
lastSeenAt?: Timestamp;
|
|
9161
9543
|
}
|
|
@@ -9178,6 +9560,11 @@ export interface AIMessageInput {
|
|
|
9178
9560
|
/** Context about the current user sending a message. */
|
|
9179
9561
|
context?: AIMessageContext;
|
|
9180
9562
|
attachments?: AIAttachment[];
|
|
9563
|
+
/**
|
|
9564
|
+
* Identifier the client gives the message it sends, echoed on the message the agent adds to the conversation, so the client can tell its own message apart from any other.
|
|
9565
|
+
* @maxLength 64
|
|
9566
|
+
*/
|
|
9567
|
+
clientMessageId?: string;
|
|
9181
9568
|
}
|
|
9182
9569
|
/** Description of a tool that can be called from an AI agent. */
|
|
9183
9570
|
export interface AIToolDefinition {
|
|
@@ -9364,6 +9751,11 @@ export interface SiteStyleguideRun {
|
|
|
9364
9751
|
createdAt: Timestamp;
|
|
9365
9752
|
createdBy: User;
|
|
9366
9753
|
}
|
|
9754
|
+
/**
|
|
9755
|
+
* User agent of the visitor.
|
|
9756
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
|
|
9757
|
+
*/
|
|
9758
|
+
export type SiteInsightsUserAgent = string;
|
|
9367
9759
|
/** Analytics info on the GitBook's site session. */
|
|
9368
9760
|
export type SiteInsightsEventSession = SiteInsightsSession & {
|
|
9369
9761
|
/** The visitors cookies. */
|
|
@@ -9374,10 +9766,10 @@ export type SiteInsightsEventSession = SiteInsightsSession & {
|
|
|
9374
9766
|
*/
|
|
9375
9767
|
ip?: string;
|
|
9376
9768
|
/**
|
|
9377
|
-
* User
|
|
9769
|
+
* User agent of the visitor.
|
|
9378
9770
|
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
|
|
9379
9771
|
*/
|
|
9380
|
-
userAgent:
|
|
9772
|
+
userAgent: SiteInsightsUserAgent;
|
|
9381
9773
|
/**
|
|
9382
9774
|
* Language of the visitor.
|
|
9383
9775
|
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
|
|
@@ -9554,11 +9946,21 @@ export interface SiteInsightsQueryDateTimeColumn {
|
|
|
9554
9946
|
column: "datetime";
|
|
9555
9947
|
interval?: "hour" | "day" | "week" | "month";
|
|
9556
9948
|
}
|
|
9557
|
-
/** Day of the week the event happened
|
|
9949
|
+
/** Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
|
|
9558
9950
|
export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
|
|
9559
9951
|
column: "dayOfWeek";
|
|
9952
|
+
/**
|
|
9953
|
+
* IANA time zone the event is read in, UTC when omitted.
|
|
9954
|
+
* @example "Europe/Paris"
|
|
9955
|
+
*/
|
|
9956
|
+
timezone?: string;
|
|
9560
9957
|
} | {
|
|
9561
9958
|
column: "hourOfDay";
|
|
9959
|
+
/**
|
|
9960
|
+
* IANA time zone the event is read in, UTC when omitted.
|
|
9961
|
+
* @example "Europe/Paris"
|
|
9962
|
+
*/
|
|
9963
|
+
timezone?: string;
|
|
9562
9964
|
} | {
|
|
9563
9965
|
column: "url";
|
|
9564
9966
|
} | {
|
|
@@ -9859,7 +10261,7 @@ export interface SiteInsightsQueryEventsAggregation {
|
|
|
9859
10261
|
where?: SiteInsightsQueryEventsFilter[];
|
|
9860
10262
|
groupBy?: SiteInsightsQueryEventsColumn[];
|
|
9861
10263
|
order?: {
|
|
9862
|
-
/** Day of the week the event happened
|
|
10264
|
+
/** Day of the week the event happened in `timezone`, from 1 (Monday) to 7 (Sunday). Group by it alongside `hourOfDay` to fold any range into a weekly activity profile. */
|
|
9863
10265
|
by: SiteInsightsQueryEventsColumn;
|
|
9864
10266
|
direction: "asc" | "desc";
|
|
9865
10267
|
};
|
|
@@ -10084,6 +10486,43 @@ export interface SignedURL {
|
|
|
10084
10486
|
/** Expiration time of the signed URL */
|
|
10085
10487
|
expiresAt: Timestamp;
|
|
10086
10488
|
}
|
|
10489
|
+
export interface APIProfilingSession {
|
|
10490
|
+
object: "api_cpu_profiling_session";
|
|
10491
|
+
/** @format uuid */
|
|
10492
|
+
id: string;
|
|
10493
|
+
status: "active" | "stopped" | "expired";
|
|
10494
|
+
/** The profiler selected for this session. Earlier sessions without this field use CPU profiling. */
|
|
10495
|
+
mode?: "cpu" | "allocations";
|
|
10496
|
+
releaseVersion: string;
|
|
10497
|
+
releaseBuild: string;
|
|
10498
|
+
/** @format date-time */
|
|
10499
|
+
createdAt: string;
|
|
10500
|
+
/** @format date-time */
|
|
10501
|
+
expiresAt: string;
|
|
10502
|
+
/** @format date-time */
|
|
10503
|
+
stoppedAt?: string;
|
|
10504
|
+
startedBy: string;
|
|
10505
|
+
urls: {
|
|
10506
|
+
location: string;
|
|
10507
|
+
};
|
|
10508
|
+
}
|
|
10509
|
+
export interface APICPUProfile {
|
|
10510
|
+
object: "api_cpu_profile" | "api_allocation_profile";
|
|
10511
|
+
mode?: "cpu" | "allocations";
|
|
10512
|
+
/** @format uuid */
|
|
10513
|
+
id: string;
|
|
10514
|
+
instanceId: string;
|
|
10515
|
+
/** @format date-time */
|
|
10516
|
+
startedAt: string;
|
|
10517
|
+
/** @format date-time */
|
|
10518
|
+
endedAt: string;
|
|
10519
|
+
bytes: number;
|
|
10520
|
+
urls: {
|
|
10521
|
+
location: string;
|
|
10522
|
+
/** Download the raw .cpuprofile or .heapprofile for Chrome DevTools. */
|
|
10523
|
+
devtools?: string;
|
|
10524
|
+
};
|
|
10525
|
+
}
|
|
10087
10526
|
/** The context to send when purging the CDN Cache */
|
|
10088
10527
|
export interface PurgeCDNCacheContext {
|
|
10089
10528
|
/** The list of tags to purge */
|
|
@@ -10647,6 +11086,8 @@ export interface GitSyncSiteStructureSectionGroup {
|
|
|
10647
11086
|
localizedTitle?: LocalizedString128;
|
|
10648
11087
|
/** Name of the icon */
|
|
10649
11088
|
icon?: Icon;
|
|
11089
|
+
/** Expression to evaluate */
|
|
11090
|
+
condition?: Expression;
|
|
10650
11091
|
/** Whether the section group is draft and not live. */
|
|
10651
11092
|
draft?: boolean;
|
|
10652
11093
|
/** Section, section group, or external link nodes nested under this group. */
|
|
@@ -11059,6 +11500,12 @@ export interface ContentComputeRevisionEventResponse {
|
|
|
11059
11500
|
pages?: InputPage[];
|
|
11060
11501
|
files?: InputFile[];
|
|
11061
11502
|
}
|
|
11503
|
+
export interface BillingDiscount {
|
|
11504
|
+
/** How many months the discount will last */
|
|
11505
|
+
duration: number;
|
|
11506
|
+
/** Percent that will be deducted from the subtotal of the invoice */
|
|
11507
|
+
percentOff: number;
|
|
11508
|
+
}
|
|
11062
11509
|
export type APIScope = IntegrationScope | APIIntegrationScope;
|
|
11063
11510
|
/** Common properties for all Content API tokens. */
|
|
11064
11511
|
export interface ContentAPIBaseToken {
|
|
@@ -11248,6 +11695,11 @@ export interface APIChannelOrganizationTranslationsGlossary {
|
|
|
11248
11695
|
channel: "organization-translations-glossary";
|
|
11249
11696
|
organization: string;
|
|
11250
11697
|
}
|
|
11698
|
+
/** Subscription channel for changes in the SCIM connections of an organization. */
|
|
11699
|
+
export interface APIChannelOrganizationSCIMConnections {
|
|
11700
|
+
channel: "organization-scim-connections";
|
|
11701
|
+
organization: string;
|
|
11702
|
+
}
|
|
11251
11703
|
/** Subscription channel for changes in custom fonts in an organization. */
|
|
11252
11704
|
export interface APIChannelOrganizationCustomFonts {
|
|
11253
11705
|
channel: "organization-fonts";
|
|
@@ -12912,7 +13364,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12912
13364
|
computed?: boolean;
|
|
12913
13365
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
|
|
12914
13366
|
/**
|
|
12915
|
-
* @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, rename, 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. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. 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. **Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "<spec slug>" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `"grouping": "by-operation"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name. 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.
|
|
13367
|
+
* @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, rename, 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. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. 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. **Reusable content** (snippets shared by several pages, Git Sync's `.gitbook/includes/`) is created with `insert_reusable_contents`, changed with `update_reusable_content` and removed with `delete_reusable_content`. A page includes one in markdown as `{% include "/reusable-content/<reusableContentId>" %}`; give a new one a `ref` and a page in the same batch can include it as `{% include "./<ref>" %}`, regardless of operation order. Created reusable contents are listed as `insertedReusableContents` when `compat=false`. An update keeps the ID, so every page including it shows the change. Deleting one leaves the includes in pages unresolved, as in the editor: remove them from those pages too. Reusable content cannot include other reusable content, so an include in its document is dropped. Unlike a link, an include that matches no reusable content of the change request (or of the batch) rejects the batch, since dropping it would remove it from the page silently. **Variables** (space variables, Git Sync's `.gitbook/vars.yaml`) are created with `insert_variables` and changed with `update_variable`. A variable is identified by its name, which content references as an expression: `<code class="expression">space.vars.<name></code>` in markdown. Inserting a name the change request already uses, or updating one it does not, rejects the batch. **Publishing an OpenAPI spec** — an OpenAPI spec belongs to the organization (see `createOpenAPISpec`) and appears in a space only through a page that renders it. Insert that page with an `insert_computed_page` change: `{ "operation": "insert_computed_page", "title": "API reference", "computed": { "type": "builtin:openapi", "props": { "models": true }, "dependencies": { "spec": { "ref": { "kind": "openapi", "spec": "<spec slug>" } } } } }`. GitBook replaces that page, at its position, with the API reference: one page per tag (or per operation with `"grouping": "by-operation"` in `props`), plus a models page when `models` is true, regenerated whenever the spec changes. Use `into` to nest the reference under an existing page. Do not recreate a spec with `insert_page`: `openapi-operation` blocks in a document only render the operations they name. 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. For change requests with frequent concurrent edits, consider `expectedRevision` to protect against overwriting changes made since your read. If the branch has changed since the supplied revision, the batch is rejected with HTTP 409 and none of the submitted changes are applied. **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.
|
|
12916
13368
|
*
|
|
12917
13369
|
* @tags change-request-content
|
|
12918
13370
|
* @name UpdateChangeRequestContent
|
|
@@ -12921,6 +13373,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12921
13373
|
* @secure
|
|
12922
13374
|
*/
|
|
12923
13375
|
updateChangeRequestContent: (spaceId: EntityId, changeRequestId: EntityId, data: {
|
|
13376
|
+
/**
|
|
13377
|
+
* The saved branch revision on which these changes are based, available in getChangeRequestById's revision field. If the branch has changed, including pending realtime edits, the batch is rejected with 409 and none of the submitted changes are applied. This field is optional and most changes can omit it.
|
|
13378
|
+
* @minLength 1
|
|
13379
|
+
*/
|
|
13380
|
+
expectedRevision?: string;
|
|
12924
13381
|
/**
|
|
12925
13382
|
* @maxItems 50
|
|
12926
13383
|
* @minItems 1
|
|
@@ -12938,6 +13395,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12938
13395
|
code: 404;
|
|
12939
13396
|
message: string;
|
|
12940
13397
|
};
|
|
13398
|
+
} | {
|
|
13399
|
+
error: {
|
|
13400
|
+
/** @format int32 */
|
|
13401
|
+
code: 409;
|
|
13402
|
+
message: string;
|
|
13403
|
+
};
|
|
12941
13404
|
}>>;
|
|
12942
13405
|
/**
|
|
12943
13406
|
* @description Returns the full flat list of all pages in the change request's current draft revision, including page groups. Does not include page body content — use the individual page endpoint to fetch content. Use this to get an overview of the draft's page structure before reading or modifying specific pages.
|
|
@@ -14741,7 +15204,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14741
15204
|
actor?: string;
|
|
14742
15205
|
/** Filter by an exact stable target identifier. */
|
|
14743
15206
|
target?: string;
|
|
15207
|
+
/** Include matching counts for action and actor options, excluding the option's own filter. */
|
|
15208
|
+
includeFacets?: boolean;
|
|
15209
|
+
/**
|
|
15210
|
+
* Include any of these action names. Combined with other filters using AND.
|
|
15211
|
+
* @maxItems 100
|
|
15212
|
+
*/
|
|
15213
|
+
actions?: string[];
|
|
15214
|
+
/**
|
|
15215
|
+
* Include any of these stable actor identifiers, including system actors. Combined with other filters using AND.
|
|
15216
|
+
* @maxItems 100
|
|
15217
|
+
*/
|
|
15218
|
+
actors?: string[];
|
|
14744
15219
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
15220
|
+
facets?: {
|
|
15221
|
+
actions: Record<string, number>;
|
|
15222
|
+
actors: Record<string, number>;
|
|
15223
|
+
};
|
|
14745
15224
|
items: AuditEvent[];
|
|
14746
15225
|
}, {
|
|
14747
15226
|
error: {
|
|
@@ -14817,7 +15296,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14817
15296
|
*/
|
|
14818
15297
|
listStyleguideTemplates: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<StyleguideTemplates, any>>;
|
|
14819
15298
|
/**
|
|
14820
|
-
*
|
|
15299
|
+
* @description Lists the members of the organization. Guests can list members too, but the list they get leaves out every guest, themselves included, and filtering by the `guest` role returns no one.
|
|
14821
15300
|
*
|
|
14822
15301
|
* @tags organization-members
|
|
14823
15302
|
* @name ListMembersInOrganizationById
|
|
@@ -14852,7 +15331,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14852
15331
|
items: OrganizationMember[];
|
|
14853
15332
|
}, any>>;
|
|
14854
15333
|
/**
|
|
14855
|
-
*
|
|
15334
|
+
* @description Returns a member of the organization. Guests can get any member who isn't a guest, and themselves. Another guest is reported as not found.
|
|
14856
15335
|
*
|
|
14857
15336
|
* @tags organization-members, critical
|
|
14858
15337
|
* @name GetMemberInOrganizationById
|
|
@@ -14873,9 +15352,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14873
15352
|
updateMemberInOrganizationById: (organizationId: EntityId, userId: string, data: {
|
|
14874
15353
|
/** The role of a member in an organization, null for guests */
|
|
14875
15354
|
role?: MemberRoleOrGuest;
|
|
15355
|
+
/** Disable or re-enable the member. Only members disabled by an admin can be re-enabled. */
|
|
15356
|
+
disabled?: boolean;
|
|
14876
15357
|
}, params?: RequestParams) => Promise<HttpResponse<OrganizationMember, any>>;
|
|
14877
15358
|
/**
|
|
14878
|
-
*
|
|
15359
|
+
* @description Users cannot remove their own membership. Ask another organization admin to remove it.
|
|
14879
15360
|
*
|
|
14880
15361
|
* @tags organization-members
|
|
14881
15362
|
* @name RemoveMemberFromOrganizationById
|
|
@@ -15587,6 +16068,130 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15587
16068
|
* @secure
|
|
15588
16069
|
*/
|
|
15589
16070
|
deleteOrganizationSamlProvider: (organizationId: EntityId, samlProviderId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
16071
|
+
/**
|
|
16072
|
+
* No description
|
|
16073
|
+
*
|
|
16074
|
+
* @tags scim
|
|
16075
|
+
* @name ListOrganizationScimConnections
|
|
16076
|
+
* @summary List SCIM connections
|
|
16077
|
+
* @request GET:/orgs/{organizationId}/scim/connections
|
|
16078
|
+
* @secure
|
|
16079
|
+
*/
|
|
16080
|
+
listOrganizationScimConnections: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
16081
|
+
items: OrganizationSCIMConnection[];
|
|
16082
|
+
}, {
|
|
16083
|
+
error: {
|
|
16084
|
+
/** @format int32 */
|
|
16085
|
+
code: 404;
|
|
16086
|
+
message: string;
|
|
16087
|
+
};
|
|
16088
|
+
}>>;
|
|
16089
|
+
/**
|
|
16090
|
+
* @description Creates a SCIM connection and its token. The token is only returned in this response.
|
|
16091
|
+
*
|
|
16092
|
+
* @tags scim
|
|
16093
|
+
* @name CreateOrganizationScimConnection
|
|
16094
|
+
* @summary Create a SCIM connection
|
|
16095
|
+
* @request POST:/orgs/{organizationId}/scim/connections
|
|
16096
|
+
* @secure
|
|
16097
|
+
*/
|
|
16098
|
+
createOrganizationScimConnection: (organizationId: EntityId, data: {
|
|
16099
|
+
/** Name of the SCIM connection, shown to organization admins. */
|
|
16100
|
+
label: SCIMConnectionLabel;
|
|
16101
|
+
/** Identity provider that provisions members through the SCIM connection. */
|
|
16102
|
+
provider: SCIMConnectionProvider;
|
|
16103
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnectionWithToken, {
|
|
16104
|
+
error: {
|
|
16105
|
+
/** @format int32 */
|
|
16106
|
+
code: 400;
|
|
16107
|
+
message: string;
|
|
16108
|
+
};
|
|
16109
|
+
} | {
|
|
16110
|
+
error: {
|
|
16111
|
+
/** @format int32 */
|
|
16112
|
+
code: 404;
|
|
16113
|
+
message: string;
|
|
16114
|
+
};
|
|
16115
|
+
} | {
|
|
16116
|
+
error: {
|
|
16117
|
+
/** @format int32 */
|
|
16118
|
+
code: 412;
|
|
16119
|
+
message: string;
|
|
16120
|
+
};
|
|
16121
|
+
}>>;
|
|
16122
|
+
/**
|
|
16123
|
+
* No description
|
|
16124
|
+
*
|
|
16125
|
+
* @tags scim
|
|
16126
|
+
* @name GetOrganizationScimConnection
|
|
16127
|
+
* @summary Get a SCIM connection by its ID
|
|
16128
|
+
* @request GET:/orgs/{organizationId}/scim/connections/{scimConnectionId}
|
|
16129
|
+
* @secure
|
|
16130
|
+
*/
|
|
16131
|
+
getOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnection, {
|
|
16132
|
+
error: {
|
|
16133
|
+
/** @format int32 */
|
|
16134
|
+
code: 404;
|
|
16135
|
+
message: string;
|
|
16136
|
+
};
|
|
16137
|
+
}>>;
|
|
16138
|
+
/**
|
|
16139
|
+
* No description
|
|
16140
|
+
*
|
|
16141
|
+
* @tags scim
|
|
16142
|
+
* @name UpdateOrganizationScimConnection
|
|
16143
|
+
* @summary Update a SCIM connection
|
|
16144
|
+
* @request PATCH:/orgs/{organizationId}/scim/connections/{scimConnectionId}
|
|
16145
|
+
* @secure
|
|
16146
|
+
*/
|
|
16147
|
+
updateOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, data: {
|
|
16148
|
+
/** Name of the SCIM connection, shown to organization admins. */
|
|
16149
|
+
label: SCIMConnectionLabel;
|
|
16150
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnection, {
|
|
16151
|
+
error: {
|
|
16152
|
+
/** @format int32 */
|
|
16153
|
+
code: 400;
|
|
16154
|
+
message: string;
|
|
16155
|
+
};
|
|
16156
|
+
} | {
|
|
16157
|
+
error: {
|
|
16158
|
+
/** @format int32 */
|
|
16159
|
+
code: 404;
|
|
16160
|
+
message: string;
|
|
16161
|
+
};
|
|
16162
|
+
}>>;
|
|
16163
|
+
/**
|
|
16164
|
+
* @description Deletes a SCIM connection. Its token stops working immediately.
|
|
16165
|
+
*
|
|
16166
|
+
* @tags scim
|
|
16167
|
+
* @name DeleteOrganizationScimConnection
|
|
16168
|
+
* @summary Delete a SCIM connection
|
|
16169
|
+
* @request DELETE:/orgs/{organizationId}/scim/connections/{scimConnectionId}
|
|
16170
|
+
* @secure
|
|
16171
|
+
*/
|
|
16172
|
+
deleteOrganizationScimConnection: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<void, {
|
|
16173
|
+
error: {
|
|
16174
|
+
/** @format int32 */
|
|
16175
|
+
code: 404;
|
|
16176
|
+
message: string;
|
|
16177
|
+
};
|
|
16178
|
+
}>>;
|
|
16179
|
+
/**
|
|
16180
|
+
* @description Replaces the token of a SCIM connection. The previous token stops working immediately, and the new token is only returned in this response.
|
|
16181
|
+
*
|
|
16182
|
+
* @tags scim
|
|
16183
|
+
* @name RotateOrganizationScimConnectionToken
|
|
16184
|
+
* @summary Rotate the token of a SCIM connection
|
|
16185
|
+
* @request POST:/orgs/{organizationId}/scim/connections/{scimConnectionId}/token
|
|
16186
|
+
* @secure
|
|
16187
|
+
*/
|
|
16188
|
+
rotateOrganizationScimConnectionToken: (organizationId: EntityId, scimConnectionId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationSCIMConnectionWithToken, {
|
|
16189
|
+
error: {
|
|
16190
|
+
/** @format int32 */
|
|
16191
|
+
code: 404;
|
|
16192
|
+
message: string;
|
|
16193
|
+
};
|
|
16194
|
+
}>>;
|
|
15590
16195
|
/**
|
|
15591
16196
|
* No description
|
|
15592
16197
|
*
|
|
@@ -16477,6 +17082,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16477
17082
|
/** 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. */
|
|
16478
17083
|
subscriptionNotice?: SubscriptionNotice;
|
|
16479
17084
|
}, any>>;
|
|
17085
|
+
/**
|
|
17086
|
+
* @description Lists the steps to set up a site, from a first edit to publishing, and whether each one is completed. Use it to know what is left to do on a site. Returns no steps once the site has been published.
|
|
17087
|
+
*
|
|
17088
|
+
* @tags sites
|
|
17089
|
+
* @name GetSiteSetup
|
|
17090
|
+
* @summary Get the setup steps of a site
|
|
17091
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/setup
|
|
17092
|
+
* @secure
|
|
17093
|
+
*/
|
|
17094
|
+
getSiteSetup: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<SiteSetup, {
|
|
17095
|
+
error: {
|
|
17096
|
+
/** @format int32 */
|
|
17097
|
+
code: 400;
|
|
17098
|
+
message: string;
|
|
17099
|
+
};
|
|
17100
|
+
}>>;
|
|
16480
17101
|
/**
|
|
16481
17102
|
* @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.
|
|
16482
17103
|
*
|
|
@@ -16956,6 +17577,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16956
17577
|
addSectionGroupToSite: (organizationId: EntityId, siteId: string, data: {
|
|
16957
17578
|
/** Title of the site section group */
|
|
16958
17579
|
title: SiteSectionGroupTitle;
|
|
17580
|
+
/** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). */
|
|
17581
|
+
condition?: Expression;
|
|
16959
17582
|
icon?: Icon | null;
|
|
16960
17583
|
/** IDs of the sections to be added to the section group */
|
|
16961
17584
|
sections?: string[];
|
|
@@ -16981,6 +17604,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
16981
17604
|
title?: SiteSectionGroupTitle;
|
|
16982
17605
|
/** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
|
|
16983
17606
|
localizedTitle?: LocalizedString128;
|
|
17607
|
+
/** Conditional expression used to evaluate whether the site section group should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
|
|
17608
|
+
condition?: Expression | null;
|
|
16984
17609
|
icon?: Icon | null;
|
|
16985
17610
|
/** Whether the site section group should be kept in draft mode. Setting it to true makes the site section group draft. Setting it to false makes the site section group live. */
|
|
16986
17611
|
draft?: boolean;
|
|
@@ -17073,6 +17698,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17073
17698
|
path?: SiteSectionPath;
|
|
17074
17699
|
/** ID of the site-space to be used as the default in this section. */
|
|
17075
17700
|
defaultSiteSpace?: string;
|
|
17701
|
+
/** Whether to hide the site section from the site's navigation. Setting it updates all the site spaces of the section, and site spaces added to a hidden section are hidden too. The default site section cannot be hidden. */
|
|
17702
|
+
hidden?: boolean;
|
|
17076
17703
|
/** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
|
|
17077
17704
|
condition?: Expression | null;
|
|
17078
17705
|
icon?: Icon | null;
|
|
@@ -17449,8 +18076,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17449
18076
|
url?: string;
|
|
17450
18077
|
/** Filter findings by estimated severity. */
|
|
17451
18078
|
severity?: SiteFindingSeverity;
|
|
18079
|
+
/** Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person. */
|
|
18080
|
+
autoResolution?: SiteFindingAutoResolution;
|
|
18081
|
+
/**
|
|
18082
|
+
* Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
|
|
18083
|
+
* @format date-time
|
|
18084
|
+
*/
|
|
18085
|
+
autoResolvedAfter?: string;
|
|
17452
18086
|
/** Filter findings that have at least one associated change request. */
|
|
17453
18087
|
hasChangeRequests?: boolean;
|
|
18088
|
+
/** Filter link findings by where they stand, for example `awaiting-approval` for broken links with a redirect GitBook drafted. */
|
|
18089
|
+
state?: SiteFindingState;
|
|
17454
18090
|
/** 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. */
|
|
17455
18091
|
source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
|
|
17456
18092
|
/**
|
|
@@ -17479,12 +18115,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17479
18115
|
*/
|
|
17480
18116
|
getSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
|
|
17481
18117
|
/**
|
|
17482
|
-
* @description Changes the status of a documentation issue found by GitBook's AI
|
|
18118
|
+
* @description Changes the status of a documentation issue found by GitBook's AI. Refuses `broken-link` findings, whose status follows the redirects at their path. Deprecated in favour of `applySiteFindingAction`, which applies one of the `actions` a finding lists: `mark-resolved`, `ignore`, `reopen` or `restore`.
|
|
17483
18119
|
*
|
|
17484
18120
|
* @tags site-context
|
|
17485
18121
|
* @name UpdateSiteFindingById
|
|
17486
|
-
* @summary Resolve, dismiss, or reopen a documentation issue
|
|
18122
|
+
* @summary Resolve, dismiss, or reopen a documentation issue. (Deprecated) use applySiteFindingAction instead.
|
|
17487
18123
|
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}
|
|
18124
|
+
* @deprecated
|
|
17488
18125
|
* @secure
|
|
17489
18126
|
*/
|
|
17490
18127
|
updateSiteFindingById: (organizationId: EntityId, siteId: string, siteFindingId: string, data: {
|
|
@@ -17591,6 +18228,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17591
18228
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
17592
18229
|
items: ContextRecord[];
|
|
17593
18230
|
}, any>>;
|
|
18231
|
+
/**
|
|
18232
|
+
* @description Applies one of the `actions` a finding lists, with the site permission it gives: resolve, dismiss or reopen it, act on a broken link's redirect, or reject the change request GitBook drafted for an outbound link. Returns 409 when the finding doesn't allow the action now.
|
|
18233
|
+
*
|
|
18234
|
+
* @tags site-context
|
|
18235
|
+
* @name ApplySiteFindingAction
|
|
18236
|
+
* @summary Apply an action to a finding
|
|
18237
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/findings/{siteFindingId}/actions
|
|
18238
|
+
* @secure
|
|
18239
|
+
*/
|
|
18240
|
+
applySiteFindingAction: (organizationId: EntityId, siteId: string, siteFindingId: string, data: {
|
|
18241
|
+
/**
|
|
18242
|
+
* An action that moves a finding to another state. A finding's `actions` lists the ones it allows.
|
|
18243
|
+
* - `approve` makes the redirect GitBook drafted for a broken link live, which resolves the finding. A change request GitBook drafted for an outbound link is approved by merging it.
|
|
18244
|
+
* - `reject` deletes the redirect GitBook drafted for a broken link; the finding stays open and GitBook won't draft a fix for it again. For an outbound link, it archives the change request GitBook drafted (`awaitingChangeRequest`) and unlinks every link it fixes. They are open again, marked `undone`, and GitBook won't draft a fix for them again.
|
|
18245
|
+
* - `create-redirect` creates a redirect for a broken link's path with `createSiteRedirect`, prefilled with the suggestion; it resolves the finding.
|
|
18246
|
+
* - `mark-resolved` resolves it. A broken link resolved this way has no redirect: visitors still get a 404.
|
|
18247
|
+
* - `reopen` reopens a resolved finding. For a broken link, it deletes the live redirect at its path; for a fix GitBook applied, this undoes the fix and GitBook won't fix the link again.
|
|
18248
|
+
* - `ignore` dismisses it.
|
|
18249
|
+
* - `restore` reopens a dismissed finding.
|
|
18250
|
+
*/
|
|
18251
|
+
action: SiteFindingAction;
|
|
18252
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteFinding, any>>;
|
|
17594
18253
|
/**
|
|
17595
18254
|
* @description Returns aggregate statistics about the documentation issues GitBook identified on a site. Accepts the same filters as `listSiteFindings`. Use this to answer "how healthy are my docs" before drilling into individual findings.
|
|
17596
18255
|
*
|
|
@@ -17609,6 +18268,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17609
18268
|
type?: SiteFindingType[];
|
|
17610
18269
|
/** Filter findings by estimated severity. */
|
|
17611
18270
|
severity?: SiteFindingSeverity;
|
|
18271
|
+
/** Filter findings by what GitBook did on its own to resolve them: `drafted` fixes wait for approval, `applied` ones were made live, `undone` ones were reversed by a person. */
|
|
18272
|
+
autoResolution?: SiteFindingAutoResolution;
|
|
18273
|
+
/**
|
|
18274
|
+
* Only return findings GitBook drafted or applied a fix for at or after this date. Combine with `autoResolution` and `status` to count recent automatic fixes.
|
|
18275
|
+
* @format date-time
|
|
18276
|
+
*/
|
|
18277
|
+
autoResolvedAfter?: string;
|
|
17612
18278
|
/** Filter findings that have at least one associated change request. */
|
|
17613
18279
|
hasChangeRequests?: boolean;
|
|
17614
18280
|
/** 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 counted. */
|
|
@@ -17745,6 +18411,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17745
18411
|
relevance?: SiteQuestionAnswerRelevance[];
|
|
17746
18412
|
/** Filter stats by answer channel type. */
|
|
17747
18413
|
channelType?: SiteChannelType[];
|
|
18414
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18415
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
17748
18416
|
/** Filter stats by answer resolution. */
|
|
17749
18417
|
answered?: SiteQuestionAnswerResolution[];
|
|
17750
18418
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
@@ -17773,7 +18441,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17773
18441
|
usageSettings: SiteTopicUsageSettings;
|
|
17774
18442
|
}, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
|
|
17775
18443
|
/**
|
|
17776
|
-
* @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `
|
|
18444
|
+
* @description Permanently deletes every finding associated with a site topic, regardless of status. This is a bulk, irreversible cleanup operation — use `applySiteFindingAction` to resolve or dismiss individual issues instead unless the intent is to wipe every issue under a topic, for example when the topic itself is being removed.
|
|
17777
18445
|
*
|
|
17778
18446
|
* @tags site-context
|
|
17779
18447
|
* @name DeleteSiteTopicFindings
|
|
@@ -17802,6 +18470,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17802
18470
|
relevance?: SiteQuestionAnswerRelevance[];
|
|
17803
18471
|
/** Filter questions by answer channel type. */
|
|
17804
18472
|
channelType?: SiteChannelType[];
|
|
18473
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18474
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
17805
18475
|
/** Filter questions by answer resolution. */
|
|
17806
18476
|
answered?: SiteQuestionAnswerResolution[];
|
|
17807
18477
|
/** Filter questions by associated site topic IDs. */
|
|
@@ -17842,6 +18512,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17842
18512
|
relevance?: SiteQuestionAnswerRelevance[];
|
|
17843
18513
|
/** Filter stats by answer channel type. */
|
|
17844
18514
|
channelType?: SiteChannelType[];
|
|
18515
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18516
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
17845
18517
|
/** Filter stats by answer resolution. */
|
|
17846
18518
|
answered?: SiteQuestionAnswerResolution[];
|
|
17847
18519
|
}, params?: RequestParams) => Promise<HttpResponse<SiteQuestion, any>>;
|
|
@@ -17871,6 +18543,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17871
18543
|
relevance?: SiteQuestionAnswerRelevance[];
|
|
17872
18544
|
/** Filter answer sources by answer channel type. */
|
|
17873
18545
|
channelType?: SiteChannelType[];
|
|
18546
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18547
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
17874
18548
|
/** Filter answer sources by answer resolution. */
|
|
17875
18549
|
answered?: SiteQuestionAnswerResolution[];
|
|
17876
18550
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
@@ -17896,9 +18570,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17896
18570
|
relevance?: SiteQuestionAnswerRelevance[];
|
|
17897
18571
|
/** Filter stats by answer channel type. */
|
|
17898
18572
|
channelType?: SiteChannelType[];
|
|
18573
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18574
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
17899
18575
|
/** Filter stats by answer resolution. */
|
|
17900
18576
|
answered?: SiteQuestionAnswerResolution[];
|
|
17901
18577
|
}, params?: RequestParams) => Promise<HttpResponse<SiteQuestionStats, any>>;
|
|
18578
|
+
/**
|
|
18579
|
+
* @description Returns how many answers the site's Ask AI assistant gave, and to how many visitors, in each UTC bucket of the interval between `from` and `to`, optionally filtered by topic, relevance, channel, visitor type or resolution. Buckets without answers are omitted.
|
|
18580
|
+
*
|
|
18581
|
+
* @tags site-questions
|
|
18582
|
+
* @name GetSiteQuestionTimeline
|
|
18583
|
+
* @summary Get Ask AI answers over time for a site
|
|
18584
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/question-timeline
|
|
18585
|
+
* @secure
|
|
18586
|
+
*/
|
|
18587
|
+
getSiteQuestionTimeline: (organizationId: EntityId, siteId: string, query: {
|
|
18588
|
+
/** Count answers created at or after this timestamp. */
|
|
18589
|
+
from: Timestamp;
|
|
18590
|
+
/** Count answers created at or before this timestamp. */
|
|
18591
|
+
to: Timestamp;
|
|
18592
|
+
/** Size of each bucket. An hourly timeline covers at most 31 days. */
|
|
18593
|
+
interval: SiteQuestionTimelineInterval;
|
|
18594
|
+
/** Filter answers by associated site topic IDs. */
|
|
18595
|
+
topic?: string[];
|
|
18596
|
+
/** Filter answers by question relevance. */
|
|
18597
|
+
relevance?: SiteQuestionAnswerRelevance[];
|
|
18598
|
+
/** Filter answers by channel type. */
|
|
18599
|
+
channelType?: SiteChannelType[];
|
|
18600
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18601
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
18602
|
+
/** Filter answers by resolution. */
|
|
18603
|
+
answered?: SiteQuestionAnswerResolution[];
|
|
18604
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteQuestionTimeline, any>>;
|
|
17902
18605
|
/**
|
|
17903
18606
|
* @description Returns a paginated list of individual Ask AI answers generated for a site. Each is the assistant's response to a specific asked question, with the raw question text, channel, and feedback. Use it to review answer quality and what users asked across the site.
|
|
17904
18607
|
*
|
|
@@ -17925,6 +18628,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
17925
18628
|
relevance?: SiteQuestionAnswerRelevance[];
|
|
17926
18629
|
/** Filter answers by answer channel type. */
|
|
17927
18630
|
channelType?: SiteChannelType[];
|
|
18631
|
+
/** Filter by whether a person or an AI agent asked the question. */
|
|
18632
|
+
visitorType?: SiteQuestionVisitorType[];
|
|
17928
18633
|
/** Filter answers by question type. */
|
|
17929
18634
|
"question.type"?: SiteQuestionType;
|
|
17930
18635
|
/** Filter answers by associated site topic ID. */
|
|
@@ -18074,6 +18779,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
18074
18779
|
theme?: CustomizationTheme | null;
|
|
18075
18780
|
/** The primary color used for links and UI text. Set to null to reset the override. */
|
|
18076
18781
|
primaryColor?: CustomizationThemedColor | null;
|
|
18782
|
+
/** The secondary brand color used for secondary buttons and content colored with `$secondary`. Set to null to reset the override. */
|
|
18783
|
+
secondaryColor?: CustomizationThemedColor | null;
|
|
18077
18784
|
/** Used for informational messages and neutral alerts. Set to null to reset the override. */
|
|
18078
18785
|
infoColor?: CustomizationThemedColor | null;
|
|
18079
18786
|
/** Used for showing positive actions or achievements. Set to null to reset the override. */
|