@gitbook/api 0.188.0 → 0.190.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 +225 -44
- package/dist/constants.d.ts +6 -3
- package/dist/index.cjs +49 -17
- package/dist/index.js +44 -17
- package/package.json +1 -1
- package/spec/openapi.json +578 -89
- package/spec/openapi.yaml +420 -67
package/dist/client.d.ts
CHANGED
|
@@ -54,16 +54,6 @@ export declare enum GitSyncOperationDirection {
|
|
|
54
54
|
Export = "export",
|
|
55
55
|
Import = "import"
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* * `running`: The operation is still running
|
|
59
|
-
* * `failure`: The operation failed
|
|
60
|
-
* * `success`: The operation was successful
|
|
61
|
-
*/
|
|
62
|
-
export declare enum GitSyncOperationState {
|
|
63
|
-
Running = "running",
|
|
64
|
-
Failure = "failure",
|
|
65
|
-
Success = "success"
|
|
66
|
-
}
|
|
67
57
|
/** The type of semantic change. */
|
|
68
58
|
export declare enum RevisionSemanticChangeType {
|
|
69
59
|
PageCreated = "page_created",
|
|
@@ -854,7 +844,6 @@ export declare enum IntegrationCategory {
|
|
|
854
844
|
Analytics = "analytics",
|
|
855
845
|
Collaboration = "collaboration",
|
|
856
846
|
Content = "content",
|
|
857
|
-
Gitsync = "gitsync",
|
|
858
847
|
Marketing = "marketing",
|
|
859
848
|
VisitorAuth = "visitor-auth",
|
|
860
849
|
Other = "other"
|
|
@@ -921,10 +910,20 @@ export declare enum ChangeRequestStatus {
|
|
|
921
910
|
Archived = "archived",
|
|
922
911
|
Merged = "merged"
|
|
923
912
|
}
|
|
913
|
+
export declare enum RevisionPageDocumentCoverTextColor {
|
|
914
|
+
Black = "black",
|
|
915
|
+
White = "white"
|
|
916
|
+
}
|
|
917
|
+
/** Mask applied to the cover image. */
|
|
918
|
+
export declare enum RevisionPageLayoutOptionsCoverMask {
|
|
919
|
+
None = "none",
|
|
920
|
+
Radial = "radial"
|
|
921
|
+
}
|
|
924
922
|
/** Size of the cover image. */
|
|
925
923
|
export declare enum RevisionPageLayoutOptionsCoverSize {
|
|
926
924
|
Hero = "hero",
|
|
927
|
-
Full = "full"
|
|
925
|
+
Full = "full",
|
|
926
|
+
Background = "background"
|
|
928
927
|
}
|
|
929
928
|
/** Width of the page. */
|
|
930
929
|
export declare enum RevisionPageLayoutOptionsWidth {
|
|
@@ -992,6 +991,18 @@ export declare enum MemberRole {
|
|
|
992
991
|
Comment = "comment",
|
|
993
992
|
Read = "read"
|
|
994
993
|
}
|
|
994
|
+
/**
|
|
995
|
+
* * `running`: The operation is still running
|
|
996
|
+
* * `failure`: The operation failed
|
|
997
|
+
* * `success`: The operation was successful
|
|
998
|
+
* * `timeout`: The operation timed out
|
|
999
|
+
*/
|
|
1000
|
+
export declare enum GitSyncOperationState {
|
|
1001
|
+
Running = "running",
|
|
1002
|
+
Failure = "failure",
|
|
1003
|
+
Success = "success",
|
|
1004
|
+
Timeout = "timeout"
|
|
1005
|
+
}
|
|
995
1006
|
/** The provider of the Git Sync installation. */
|
|
996
1007
|
export declare enum GitSyncProvider {
|
|
997
1008
|
Github = "github",
|
|
@@ -1096,6 +1107,8 @@ export type GitSyncInstallationTarget = {
|
|
|
1096
1107
|
type: "space";
|
|
1097
1108
|
/** Unique identifier of the space targeted by the Git Sync installation. */
|
|
1098
1109
|
spaceId: string;
|
|
1110
|
+
/** Unique identifier of the site whose Git Sync installation should manage the space installation. Omit to install Git Sync directly on the space. */
|
|
1111
|
+
siteId?: string;
|
|
1099
1112
|
} | {
|
|
1100
1113
|
/** Type of resource targeted by the Git Sync installation. */
|
|
1101
1114
|
type: "site";
|
|
@@ -1273,6 +1286,16 @@ export interface GitSyncState {
|
|
|
1273
1286
|
installationId?: string;
|
|
1274
1287
|
/** The URL to the repository tree, used when rendering public content. */
|
|
1275
1288
|
url?: string;
|
|
1289
|
+
/** The latest operation on the Git Sync installation. */
|
|
1290
|
+
operation?: {
|
|
1291
|
+
/**
|
|
1292
|
+
* * `running`: The operation is still running
|
|
1293
|
+
* * `failure`: The operation failed
|
|
1294
|
+
* * `success`: The operation was successful
|
|
1295
|
+
* * `timeout`: The operation timed out
|
|
1296
|
+
*/
|
|
1297
|
+
state: GitSyncOperationState;
|
|
1298
|
+
};
|
|
1276
1299
|
/** When the Git provider details were last updated */
|
|
1277
1300
|
updatedAt?: Timestamp;
|
|
1278
1301
|
}
|
|
@@ -1527,7 +1550,10 @@ export interface ImportGitRepository {
|
|
|
1527
1550
|
force?: boolean;
|
|
1528
1551
|
/** If true, the import will generate a revision without updating the space primary content. */
|
|
1529
1552
|
standalone?: boolean;
|
|
1530
|
-
/**
|
|
1553
|
+
/**
|
|
1554
|
+
* Optional metadata to store on the space about the Git provider
|
|
1555
|
+
* @deprecated
|
|
1556
|
+
*/
|
|
1531
1557
|
gitInfo?: UpdateSpaceGitInfo;
|
|
1532
1558
|
}
|
|
1533
1559
|
export interface ExportToGitRepository {
|
|
@@ -1551,7 +1577,12 @@ export interface ExportToGitRepository {
|
|
|
1551
1577
|
/** The timestamp of the event that triggered this export. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository. */
|
|
1552
1578
|
timestamp?: Timestamp;
|
|
1553
1579
|
force?: boolean;
|
|
1554
|
-
/**
|
|
1580
|
+
/** If true, the export will be done in a standalone mode, meaning that the exported content will not be linked to the Git repository. This is useful for creating a snapshot of the space's content. */
|
|
1581
|
+
standalone?: boolean;
|
|
1582
|
+
/**
|
|
1583
|
+
* Optional metadata to store on the space about the Git provider
|
|
1584
|
+
* @deprecated
|
|
1585
|
+
*/
|
|
1555
1586
|
gitInfo?: UpdateSpaceGitInfo;
|
|
1556
1587
|
}
|
|
1557
1588
|
export type InviteUsersAndTeams = ({
|
|
@@ -1634,6 +1665,11 @@ export interface RevisionPageBase {
|
|
|
1634
1665
|
createdAt?: Timestamp;
|
|
1635
1666
|
/** When the page was last edited. Only present if page has been edited at least once. */
|
|
1636
1667
|
updatedAt?: Timestamp;
|
|
1668
|
+
/**
|
|
1669
|
+
* Adaptive-content condition controlling whether the page is shown to a visitor. Only present when the page has a condition set, and only returned when the API is called with a user, user-internal or OAuth token (never with a site/content token).
|
|
1670
|
+
* @minLength 1
|
|
1671
|
+
*/
|
|
1672
|
+
condition?: string;
|
|
1637
1673
|
}
|
|
1638
1674
|
export interface MarkdownDocument {
|
|
1639
1675
|
/**
|
|
@@ -1955,6 +1991,8 @@ export interface DocumentTableViewCards {
|
|
|
1955
1991
|
coverDefinitionDark?: string;
|
|
1956
1992
|
/** Should we display the column title or not */
|
|
1957
1993
|
hideColumnTitle?: boolean;
|
|
1994
|
+
/** Whether the cards wrap onto multiple rows (true, the default) or are laid out in a single horizontally-scrolling carousel row (false). */
|
|
1995
|
+
wrap?: boolean;
|
|
1958
1996
|
}
|
|
1959
1997
|
/** A table record value for image columns, supporting both direct ContentRefs and the additional format with record-level settings. */
|
|
1960
1998
|
export type DocumentTableImageRecord = ContentRefFile | ContentRefURL | {
|
|
@@ -2088,6 +2126,11 @@ export interface DocumentBlockPrompt {
|
|
|
2088
2126
|
/** Name of the icon */
|
|
2089
2127
|
icon?: Icon;
|
|
2090
2128
|
openInAIProviders?: boolean;
|
|
2129
|
+
/**
|
|
2130
|
+
* Controls how much of the prompt content is visible by default.
|
|
2131
|
+
* @default "hidden"
|
|
2132
|
+
*/
|
|
2133
|
+
defaultExpanded?: "hidden" | "partial" | "full";
|
|
2091
2134
|
};
|
|
2092
2135
|
/**
|
|
2093
2136
|
* @maxItems 1
|
|
@@ -2673,6 +2716,8 @@ export interface RevisionPageLayoutOptions {
|
|
|
2673
2716
|
cover: boolean;
|
|
2674
2717
|
/** Size of the cover image. */
|
|
2675
2718
|
coverSize: RevisionPageLayoutOptionsCoverSize;
|
|
2719
|
+
/** Mask applied to the cover image. */
|
|
2720
|
+
coverMask: RevisionPageLayoutOptionsCoverMask;
|
|
2676
2721
|
/** Should the title be visible? */
|
|
2677
2722
|
title: boolean;
|
|
2678
2723
|
/** Should the description be visible? */
|
|
@@ -2695,6 +2740,10 @@ export interface RevisionPageDocumentCover {
|
|
|
2695
2740
|
ref?: ContentRefFile | ContentRefURL;
|
|
2696
2741
|
/** Content reference pointing to the source image for dark mode. */
|
|
2697
2742
|
refDark?: ContentRefFile | ContentRefURL;
|
|
2743
|
+
/** Text color to use on top of the cover image when in background mode. */
|
|
2744
|
+
textColor?: RevisionPageDocumentCoverTextColor;
|
|
2745
|
+
/** Text color to use on top of the dark mode cover image when in background mode. */
|
|
2746
|
+
textColorDark?: RevisionPageDocumentCoverTextColor;
|
|
2698
2747
|
/**
|
|
2699
2748
|
* Vertical position of the cover image.
|
|
2700
2749
|
* @default 0
|
|
@@ -2882,11 +2931,39 @@ export type ChangeRequestSubject = string;
|
|
|
2882
2931
|
* @maxLength 128
|
|
2883
2932
|
*/
|
|
2884
2933
|
export type ChangeRequestLinkTitle = string;
|
|
2885
|
-
|
|
2934
|
+
/** External link associated with a change request. */
|
|
2935
|
+
export interface ChangeRequestLinkInput {
|
|
2886
2936
|
ref: ContentRefURL;
|
|
2887
2937
|
/** Optional title to display for the link. */
|
|
2888
2938
|
title?: ChangeRequestLinkTitle;
|
|
2889
2939
|
}
|
|
2940
|
+
/** External ticket data resolved for this link by a configured connector. */
|
|
2941
|
+
export type ChangeRequestLinkExpanded = {
|
|
2942
|
+
kind: "external-ticket";
|
|
2943
|
+
provider: "jira";
|
|
2944
|
+
state: "connected";
|
|
2945
|
+
/** The ticket's provider-specific key. */
|
|
2946
|
+
key: string;
|
|
2947
|
+
/**
|
|
2948
|
+
* URL to open the ticket.
|
|
2949
|
+
* @format uri
|
|
2950
|
+
*/
|
|
2951
|
+
url: string;
|
|
2952
|
+
status: {
|
|
2953
|
+
id: string;
|
|
2954
|
+
name: string;
|
|
2955
|
+
};
|
|
2956
|
+
/** The ticket's summary. */
|
|
2957
|
+
summary: string;
|
|
2958
|
+
} | {
|
|
2959
|
+
kind: "external-ticket";
|
|
2960
|
+
provider: "jira";
|
|
2961
|
+
state: "error";
|
|
2962
|
+
};
|
|
2963
|
+
export type ChangeRequestLink = ChangeRequestLinkInput & {
|
|
2964
|
+
/** External ticket data resolved for this link by a configured connector. */
|
|
2965
|
+
expanded?: ChangeRequestLinkExpanded;
|
|
2966
|
+
};
|
|
2890
2967
|
/**
|
|
2891
2968
|
* External links associated with the change request.
|
|
2892
2969
|
* @maxItems 10
|
|
@@ -3195,24 +3272,45 @@ export interface PostCommentReplySchema {
|
|
|
3195
3272
|
export type ChangeRequestUserContributor = UserContributor & {
|
|
3196
3273
|
actionType: "edit" | "comment";
|
|
3197
3274
|
};
|
|
3275
|
+
/** Page metadata that can be set when inserting or updating a page through a change request. When a markdown document is provided on the same operation, the values read from its frontmatter take precedence over these fields. */
|
|
3276
|
+
export interface RevisionPageUpdate {
|
|
3277
|
+
/**
|
|
3278
|
+
* Title of the page.
|
|
3279
|
+
* @minLength 1
|
|
3280
|
+
*/
|
|
3281
|
+
title?: string;
|
|
3282
|
+
/** Emoji of the page. Set to an empty string to remove it. */
|
|
3283
|
+
emoji?: Emoji;
|
|
3284
|
+
/** Icon of the page. Set to an empty string to remove it. */
|
|
3285
|
+
icon?: Icon;
|
|
3286
|
+
/** Description of the page. */
|
|
3287
|
+
description?: string;
|
|
3288
|
+
/** If true, the page is not displayed in the navigation, while still being accessible. */
|
|
3289
|
+
hidden?: boolean;
|
|
3290
|
+
/** If true, the page is not indexable in the search and ask features. */
|
|
3291
|
+
noIndex?: boolean;
|
|
3292
|
+
/** If true, the page is not indexable by search engine robots. */
|
|
3293
|
+
noRobotsIndex?: boolean;
|
|
3294
|
+
/** Adaptive-content condition controlling whether the page is shown to a visitor. Set to an empty string to remove the condition. */
|
|
3295
|
+
condition?: string;
|
|
3296
|
+
}
|
|
3198
3297
|
/**
|
|
3199
|
-
*
|
|
3298
|
+
* Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed.
|
|
3200
3299
|
* @example {"operation":"update_page","page":"page_id","document":{"markdown":"# Hello World\n\nThis is a markdown document linking to [another page](/pages/page_id).\n"}}
|
|
3201
3300
|
*/
|
|
3202
|
-
export
|
|
3301
|
+
export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
|
|
3203
3302
|
operation: "update_page";
|
|
3204
|
-
/** ID of the page
|
|
3303
|
+
/** ID of the page to update. */
|
|
3205
3304
|
page: string;
|
|
3206
|
-
document
|
|
3207
|
-
|
|
3305
|
+
/** New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields. */
|
|
3306
|
+
document?: Document;
|
|
3307
|
+
};
|
|
3208
3308
|
/**
|
|
3209
3309
|
* Insert a new page into the change request.
|
|
3210
3310
|
* @example {"operation":"insert_page","title":"New page","document":{"markdown":"# New page\n\nThis is a new page.\n"}}
|
|
3211
3311
|
*/
|
|
3212
|
-
export
|
|
3312
|
+
export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
|
|
3213
3313
|
operation: "insert_page";
|
|
3214
|
-
/** Title of the new page. */
|
|
3215
|
-
title: string;
|
|
3216
3314
|
/** ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page. */
|
|
3217
3315
|
into?: string;
|
|
3218
3316
|
/**
|
|
@@ -3220,8 +3318,9 @@ export interface ChangeRequestContentChangeInsertPage {
|
|
|
3220
3318
|
* @min 0
|
|
3221
3319
|
*/
|
|
3222
3320
|
at?: number;
|
|
3321
|
+
/** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
|
|
3223
3322
|
document: Document;
|
|
3224
|
-
}
|
|
3323
|
+
};
|
|
3225
3324
|
/**
|
|
3226
3325
|
* Delete an existing page (and its subpages) from the change request.
|
|
3227
3326
|
* @example {"operation":"delete_page","page":"page_id"}
|
|
@@ -6393,6 +6492,19 @@ export type SiteSearchScope = {
|
|
|
6393
6492
|
mode: "default";
|
|
6394
6493
|
/** The ID of the site space that must always be included in the search results. The language of this site space will be used to match other site spaces with the same language, if applicable. */
|
|
6395
6494
|
currentSiteSpace?: string;
|
|
6495
|
+
/**
|
|
6496
|
+
* Must not be provided when searching the entire default scope. To restrict the search to a subset of the default scope, provide `restrictTo` along with `currentSiteSpace`.
|
|
6497
|
+
* @minLength 2
|
|
6498
|
+
* @maxLength 1
|
|
6499
|
+
*/
|
|
6500
|
+
restrictTo?: string;
|
|
6501
|
+
} | {
|
|
6502
|
+
/** Search a subset of the default scope of the site, relative to the current site space. */
|
|
6503
|
+
mode: "default";
|
|
6504
|
+
/** The ID of the site space the search is made from. The language of this site space will be used to match other site spaces with the same language, if applicable. */
|
|
6505
|
+
currentSiteSpace: string;
|
|
6506
|
+
/** Restrict the search to a subset of the default scope. With `currentSiteSpace`, only the current site space is searched. With `otherSiteSpaces`, the current site space is excluded and only the other site spaces in the default scope are searched. */
|
|
6507
|
+
restrictTo: "currentSiteSpace" | "otherSiteSpaces";
|
|
6396
6508
|
} | {
|
|
6397
6509
|
/** Only search in the provided site spaces. */
|
|
6398
6510
|
mode: "specific";
|
|
@@ -6419,6 +6531,11 @@ export interface SearchRecordResult {
|
|
|
6419
6531
|
*/
|
|
6420
6532
|
url: string;
|
|
6421
6533
|
}
|
|
6534
|
+
/**
|
|
6535
|
+
* The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is working towards.
|
|
6536
|
+
* @maxLength 1024
|
|
6537
|
+
*/
|
|
6538
|
+
export type AgentGoal = string;
|
|
6422
6539
|
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
6423
6540
|
export interface SiteInsightsSession {
|
|
6424
6541
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -6427,7 +6544,7 @@ export interface SiteInsightsSession {
|
|
|
6427
6544
|
sessionId: string;
|
|
6428
6545
|
}
|
|
6429
6546
|
/** Integration source */
|
|
6430
|
-
export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom" | "builtin:zendesk" | "builtin:pylon" | "builtin:linear" | "builtin:jira";
|
|
6547
|
+
export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom" | "builtin:front" | "builtin:zendesk" | "builtin:zoho-desk" | "builtin:freshdesk" | "builtin:pylon" | "builtin:hubspot" | "builtin:linear" | "builtin:jira";
|
|
6431
6548
|
/**
|
|
6432
6549
|
* Title for the context record
|
|
6433
6550
|
* @minLength 1
|
|
@@ -6735,6 +6852,12 @@ export type ContextConnectorSetup = {
|
|
|
6735
6852
|
/** @minLength 1 */
|
|
6736
6853
|
token: string;
|
|
6737
6854
|
};
|
|
6855
|
+
} | {
|
|
6856
|
+
connector: "builtin:front";
|
|
6857
|
+
setupSettings: {
|
|
6858
|
+
/** @minLength 1 */
|
|
6859
|
+
token: string;
|
|
6860
|
+
};
|
|
6738
6861
|
} | {
|
|
6739
6862
|
connector: "builtin:zendesk";
|
|
6740
6863
|
setupSettings: {
|
|
@@ -6745,12 +6868,52 @@ export type ContextConnectorSetup = {
|
|
|
6745
6868
|
/** @minLength 1 */
|
|
6746
6869
|
apiToken: string;
|
|
6747
6870
|
};
|
|
6871
|
+
} | {
|
|
6872
|
+
connector: "builtin:zoho-desk";
|
|
6873
|
+
setupSettings: {
|
|
6874
|
+
/**
|
|
6875
|
+
* Zoho data center hosting the account, given as its API domain suffix (e.g. `com`, `eu`, `in`, `com.au`). Zoho scopes both the accounts and desk API hosts by data center.
|
|
6876
|
+
* @minLength 1
|
|
6877
|
+
*/
|
|
6878
|
+
dataCenter: string;
|
|
6879
|
+
/**
|
|
6880
|
+
* Zoho Desk organization id the tickets belong to.
|
|
6881
|
+
* @minLength 1
|
|
6882
|
+
*/
|
|
6883
|
+
orgId: string;
|
|
6884
|
+
/** @minLength 1 */
|
|
6885
|
+
clientId: string;
|
|
6886
|
+
/** @minLength 1 */
|
|
6887
|
+
clientSecret: string;
|
|
6888
|
+
/** @minLength 1 */
|
|
6889
|
+
refreshToken: string;
|
|
6890
|
+
};
|
|
6891
|
+
} | {
|
|
6892
|
+
connector: "builtin:freshdesk";
|
|
6893
|
+
setupSettings: {
|
|
6894
|
+
/**
|
|
6895
|
+
* Freshdesk domain hosting the account, e.g. `mycompany.freshdesk.com` or just `mycompany`. Tickets and the API are scoped by this domain.
|
|
6896
|
+
* @minLength 1
|
|
6897
|
+
*/
|
|
6898
|
+
domain: string;
|
|
6899
|
+
/**
|
|
6900
|
+
* Freshdesk API key with permission to read tickets. Sent as HTTP Basic auth and redacted when read back.
|
|
6901
|
+
* @minLength 1
|
|
6902
|
+
*/
|
|
6903
|
+
apiKey: string;
|
|
6904
|
+
};
|
|
6748
6905
|
} | {
|
|
6749
6906
|
connector: "builtin:pylon";
|
|
6750
6907
|
setupSettings: {
|
|
6751
6908
|
/** @minLength 1 */
|
|
6752
6909
|
token: string;
|
|
6753
6910
|
};
|
|
6911
|
+
} | {
|
|
6912
|
+
connector: "builtin:hubspot";
|
|
6913
|
+
setupSettings: {
|
|
6914
|
+
/** @minLength 1 */
|
|
6915
|
+
token: string;
|
|
6916
|
+
};
|
|
6754
6917
|
} | {
|
|
6755
6918
|
connector: "builtin:linear";
|
|
6756
6919
|
setupSettings: {
|
|
@@ -7280,6 +7443,13 @@ export interface AIMessageContext {
|
|
|
7280
7443
|
/** ID of the current page. */
|
|
7281
7444
|
pageId: string;
|
|
7282
7445
|
};
|
|
7446
|
+
/** Comments on the content the user is referring to in the message. */
|
|
7447
|
+
comments?: {
|
|
7448
|
+
/** ID of the comment. */
|
|
7449
|
+
id: string;
|
|
7450
|
+
/** Snapshot of the comment for display. */
|
|
7451
|
+
content?: string;
|
|
7452
|
+
}[];
|
|
7283
7453
|
/** Range of the current selection in a document. */
|
|
7284
7454
|
selection?: {
|
|
7285
7455
|
anchorKey: string | null;
|
|
@@ -8700,6 +8870,7 @@ export interface GitSyncOperation {
|
|
|
8700
8870
|
* * `running`: The operation is still running
|
|
8701
8871
|
* * `failure`: The operation failed
|
|
8702
8872
|
* * `success`: The operation was successful
|
|
8873
|
+
* * `timeout`: The operation timed out
|
|
8703
8874
|
*/
|
|
8704
8875
|
state: GitSyncOperationState;
|
|
8705
8876
|
direction: GitSyncOperationDirection;
|
|
@@ -10221,16 +10392,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10221
10392
|
message: string;
|
|
10222
10393
|
};
|
|
10223
10394
|
}>>;
|
|
10224
|
-
/**
|
|
10225
|
-
* No description
|
|
10226
|
-
*
|
|
10227
|
-
* @tags space-git
|
|
10228
|
-
* @name DeleteLegacyGitInstallation
|
|
10229
|
-
* @summary Remove the legacy Git Sync installation from the space to be able to upgrade it to use the new Git integrations
|
|
10230
|
-
* @request DELETE:/spaces/{spaceId}/git/legacy-installation
|
|
10231
|
-
* @secure
|
|
10232
|
-
*/
|
|
10233
|
-
deleteLegacyGitInstallation: (spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
10234
10395
|
/**
|
|
10235
10396
|
* No description
|
|
10236
10397
|
*
|
|
@@ -10738,8 +10899,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10738
10899
|
/** Subject of the change request */
|
|
10739
10900
|
subject?: ChangeRequestSubject;
|
|
10740
10901
|
description?: JSONDocument;
|
|
10741
|
-
/**
|
|
10742
|
-
|
|
10902
|
+
/**
|
|
10903
|
+
* External links associated with the change request.
|
|
10904
|
+
* @maxItems 10
|
|
10905
|
+
*/
|
|
10906
|
+
links?: ChangeRequestLinkInput[];
|
|
10743
10907
|
status?: "draft" | "open" | "archived";
|
|
10744
10908
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
|
|
10745
10909
|
/**
|
|
@@ -11119,7 +11283,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11119
11283
|
computed?: boolean;
|
|
11120
11284
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
|
|
11121
11285
|
/**
|
|
11122
|
-
* @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.
|
|
11286
|
+
* @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.
|
|
11123
11287
|
*
|
|
11124
11288
|
* @tags change-request-content
|
|
11125
11289
|
* @name UpdateChangeRequestContent
|
|
@@ -12840,6 +13004,26 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12840
13004
|
message: string;
|
|
12841
13005
|
};
|
|
12842
13006
|
}>>;
|
|
13007
|
+
/**
|
|
13008
|
+
* @description Lists every styleguide (a space holding a team's writing styleguide) in the organization, along with every site that references each one. Styleguides that are not referenced by any site are still returned with an empty `sites` list.
|
|
13009
|
+
*
|
|
13010
|
+
* @tags organizations
|
|
13011
|
+
* @name ListOrganizationStyleguides
|
|
13012
|
+
* @summary List all styleguides in an organization
|
|
13013
|
+
* @request GET:/orgs/{organizationId}/styleguides
|
|
13014
|
+
* @secure
|
|
13015
|
+
*/
|
|
13016
|
+
listOrganizationStyleguides: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<OrganizationStyleguides, any>>;
|
|
13017
|
+
/**
|
|
13018
|
+
* @description Lists the built-in styleguide starter templates that can seed a new styleguide, including the markdown content used to render each template's preview.
|
|
13019
|
+
*
|
|
13020
|
+
* @tags organizations
|
|
13021
|
+
* @name ListStyleguideTemplates
|
|
13022
|
+
* @summary List all built-in styleguide templates
|
|
13023
|
+
* @request GET:/orgs/{organizationId}/styleguide-templates
|
|
13024
|
+
* @secure
|
|
13025
|
+
*/
|
|
13026
|
+
listStyleguideTemplates: (organizationId: EntityId, params?: RequestParams) => Promise<HttpResponse<StyleguideTemplates, any>>;
|
|
12843
13027
|
/**
|
|
12844
13028
|
* No description
|
|
12845
13029
|
*
|
|
@@ -12903,7 +13087,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12903
13087
|
*
|
|
12904
13088
|
* @tags organization-members
|
|
12905
13089
|
* @name RemoveMemberFromOrganizationById
|
|
12906
|
-
* @summary
|
|
13090
|
+
* @summary Remove an organization member or request an organization admin to do it
|
|
12907
13091
|
* @request DELETE:/orgs/{organizationId}/members/{userId}
|
|
12908
13092
|
* @secure
|
|
12909
13093
|
*/
|
|
@@ -14919,11 +15103,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14919
15103
|
/** You may optionally provide additional information about the context of the question. This doesn't affect the scope of the search, but GitBook may use this information to provide a better answer. Generally speaking, you should provide as much context as possible. */
|
|
14920
15104
|
context?: {
|
|
14921
15105
|
siteSpaceId?: string;
|
|
14922
|
-
/**
|
|
14923
|
-
|
|
14924
|
-
* @maxLength 1024
|
|
14925
|
-
*/
|
|
14926
|
-
goal?: string;
|
|
15106
|
+
/** The end goal the agent is trying to accomplish on behalf of the user. Unlike the question, which is the immediate query, the goal describes the broader task or outcome the agent is working towards. GitBook uses this to steer the answer towards what is ultimately useful for that goal. */
|
|
15107
|
+
goal?: AgentGoal;
|
|
14927
15108
|
};
|
|
14928
15109
|
scope: SiteSearchScope;
|
|
14929
15110
|
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
package/dist/constants.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const EXPRESSION_MIN_LENGTH = 0;
|
|
|
10
10
|
export declare const TRANSLATION_LANGUAGE_ENUM: ["en", "fr", "de", "es", "it", "pt", "pt-br", "ru", "ja", "zh", "zh-tw", "yue", "ko", "ar", "hi", "nl", "pl", "tr", "sv", "no", "da", "fi", "el", "cs", "hu", "ro", "th", "vi", "id", "ms", "he", "uk", "sk", "bg", "hr", "lt", "lv", "et", "sl"];
|
|
11
11
|
export declare const GIT_SYNC_INSTALLATION_STATUS_ENUM: ["unauthenticated", "active", "pending"];
|
|
12
12
|
export declare const GIT_SYNC_PROVIDER_ENUM: ["github", "gitlab", "github-legacy"];
|
|
13
|
+
export declare const GIT_SYNC_OPERATION_STATE_ENUM: ["running", "failure", "success", "timeout"];
|
|
13
14
|
export declare const MEMBER_ROLE_ENUM: ["admin", "create", "edit", "review", "comment", "read"];
|
|
14
15
|
export declare const ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
|
|
15
16
|
export declare const ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
|
|
@@ -22,7 +23,9 @@ export declare const REVISION_PAGE_SLUG_MAX_LENGTH = 100;
|
|
|
22
23
|
export declare const REVISION_PAGE_SLUG_MIN_LENGTH = 0;
|
|
23
24
|
export declare const OPEN_APISPEC_VISIBILITY_ENUM: ["private", "public"];
|
|
24
25
|
export declare const REVISION_PAGE_LAYOUT_OPTIONS_WIDTH_ENUM: ["default", "wide"];
|
|
25
|
-
export declare const REVISION_PAGE_LAYOUT_OPTIONS_COVER_SIZE_ENUM: ["hero", "full"];
|
|
26
|
+
export declare const REVISION_PAGE_LAYOUT_OPTIONS_COVER_SIZE_ENUM: ["hero", "full", "background"];
|
|
27
|
+
export declare const REVISION_PAGE_LAYOUT_OPTIONS_COVER_MASK_ENUM: ["none", "radial"];
|
|
28
|
+
export declare const REVISION_PAGE_DOCUMENT_COVER_TEXT_COLOR_ENUM: ["black", "white"];
|
|
26
29
|
export declare const CHANGE_REQUEST_STATUS_ENUM: ["draft", "open", "archived", "merged"];
|
|
27
30
|
export declare const CHANGE_REQUEST_SUBJECT_MAX_LENGTH = 100;
|
|
28
31
|
export declare const CHANGE_REQUEST_SUBJECT_MIN_LENGTH = 0;
|
|
@@ -38,7 +41,7 @@ export declare const INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
|
|
|
38
41
|
export declare const INTEGRATION_TARGET_ENUM: ["all", "site", "space", "organization"];
|
|
39
42
|
export declare const INTEGRATION_VISIBILITY_ENUM: ["public", "private", "unlisted"];
|
|
40
43
|
export declare const INTEGRATION_SCOPE_ENUM: ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:visitor:claims", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
|
|
41
|
-
export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "
|
|
44
|
+
export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "marketing", "visitor-auth", "other"];
|
|
42
45
|
export declare const INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
|
|
43
46
|
export declare const INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
|
|
44
47
|
export declare const ORGANIZATION_TITLE_MAX_LENGTH = 255;
|
|
@@ -137,6 +140,7 @@ export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
|
|
|
137
140
|
export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
|
|
138
141
|
export declare const SHARE_LINK_NAME_MAX_LENGTH = 50;
|
|
139
142
|
export declare const SHARE_LINK_NAME_MIN_LENGTH = 0;
|
|
143
|
+
export declare const AGENT_GOAL_MAX_LENGTH = 1024;
|
|
140
144
|
export declare const CONTEXT_RECORD_TYPE_ENUM: ["ticket", "document"];
|
|
141
145
|
export declare const CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
|
|
142
146
|
export declare const CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
|
|
@@ -197,7 +201,6 @@ export declare const SHA256_MAX_LENGTH = 64;
|
|
|
197
201
|
export declare const SHA256_MIN_LENGTH = 64;
|
|
198
202
|
export declare const GIT_BOOK_USERS_ENUM: ["gitbook:agent"];
|
|
199
203
|
export declare const REVISION_SEMANTIC_CHANGE_TYPE_ENUM: ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited"];
|
|
200
|
-
export declare const GIT_SYNC_OPERATION_STATE_ENUM: ["running", "failure", "success"];
|
|
201
204
|
export declare const GIT_SYNC_OPERATION_DIRECTION_ENUM: ["export", "import"];
|
|
202
205
|
export declare const GIT_SYNC_OPERATION_STAGE_ENUM: ["repo_fetch", "config_check", "content_process", "finalize"];
|
|
203
206
|
export declare const GIT_SYNC_SITE_CUSTOMIZATION_FONT_SOURCE_MIN_LENGTH = 1;
|