@gitbook/api 0.189.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 +130 -40
- package/dist/constants.d.ts +3 -2
- package/dist/index.cjs +13 -16
- package/dist/index.js +12 -16
- package/package.json +1 -1
- package/spec/openapi.json +296 -86
- package/spec/openapi.yaml +233 -65
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"
|
|
@@ -1002,6 +991,18 @@ export declare enum MemberRole {
|
|
|
1002
991
|
Comment = "comment",
|
|
1003
992
|
Read = "read"
|
|
1004
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
|
+
}
|
|
1005
1006
|
/** The provider of the Git Sync installation. */
|
|
1006
1007
|
export declare enum GitSyncProvider {
|
|
1007
1008
|
Github = "github",
|
|
@@ -1285,6 +1286,16 @@ export interface GitSyncState {
|
|
|
1285
1286
|
installationId?: string;
|
|
1286
1287
|
/** The URL to the repository tree, used when rendering public content. */
|
|
1287
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
|
+
};
|
|
1288
1299
|
/** When the Git provider details were last updated */
|
|
1289
1300
|
updatedAt?: Timestamp;
|
|
1290
1301
|
}
|
|
@@ -1539,7 +1550,10 @@ export interface ImportGitRepository {
|
|
|
1539
1550
|
force?: boolean;
|
|
1540
1551
|
/** If true, the import will generate a revision without updating the space primary content. */
|
|
1541
1552
|
standalone?: boolean;
|
|
1542
|
-
/**
|
|
1553
|
+
/**
|
|
1554
|
+
* Optional metadata to store on the space about the Git provider
|
|
1555
|
+
* @deprecated
|
|
1556
|
+
*/
|
|
1543
1557
|
gitInfo?: UpdateSpaceGitInfo;
|
|
1544
1558
|
}
|
|
1545
1559
|
export interface ExportToGitRepository {
|
|
@@ -1563,7 +1577,12 @@ export interface ExportToGitRepository {
|
|
|
1563
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. */
|
|
1564
1578
|
timestamp?: Timestamp;
|
|
1565
1579
|
force?: boolean;
|
|
1566
|
-
/**
|
|
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
|
+
*/
|
|
1567
1586
|
gitInfo?: UpdateSpaceGitInfo;
|
|
1568
1587
|
}
|
|
1569
1588
|
export type InviteUsersAndTeams = ({
|
|
@@ -1646,6 +1665,11 @@ export interface RevisionPageBase {
|
|
|
1646
1665
|
createdAt?: Timestamp;
|
|
1647
1666
|
/** When the page was last edited. Only present if page has been edited at least once. */
|
|
1648
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;
|
|
1649
1673
|
}
|
|
1650
1674
|
export interface MarkdownDocument {
|
|
1651
1675
|
/**
|
|
@@ -2102,6 +2126,11 @@ export interface DocumentBlockPrompt {
|
|
|
2102
2126
|
/** Name of the icon */
|
|
2103
2127
|
icon?: Icon;
|
|
2104
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";
|
|
2105
2134
|
};
|
|
2106
2135
|
/**
|
|
2107
2136
|
* @maxItems 1
|
|
@@ -3243,24 +3272,45 @@ export interface PostCommentReplySchema {
|
|
|
3243
3272
|
export type ChangeRequestUserContributor = UserContributor & {
|
|
3244
3273
|
actionType: "edit" | "comment";
|
|
3245
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
|
+
}
|
|
3246
3297
|
/**
|
|
3247
|
-
*
|
|
3298
|
+
* Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed.
|
|
3248
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"}}
|
|
3249
3300
|
*/
|
|
3250
|
-
export
|
|
3301
|
+
export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
|
|
3251
3302
|
operation: "update_page";
|
|
3252
|
-
/** ID of the page
|
|
3303
|
+
/** ID of the page to update. */
|
|
3253
3304
|
page: string;
|
|
3254
|
-
document
|
|
3255
|
-
|
|
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
|
+
};
|
|
3256
3308
|
/**
|
|
3257
3309
|
* Insert a new page into the change request.
|
|
3258
3310
|
* @example {"operation":"insert_page","title":"New page","document":{"markdown":"# New page\n\nThis is a new page.\n"}}
|
|
3259
3311
|
*/
|
|
3260
|
-
export
|
|
3312
|
+
export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
|
|
3261
3313
|
operation: "insert_page";
|
|
3262
|
-
/** Title of the new page. */
|
|
3263
|
-
title: string;
|
|
3264
3314
|
/** ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page. */
|
|
3265
3315
|
into?: string;
|
|
3266
3316
|
/**
|
|
@@ -3268,8 +3318,9 @@ export interface ChangeRequestContentChangeInsertPage {
|
|
|
3268
3318
|
* @min 0
|
|
3269
3319
|
*/
|
|
3270
3320
|
at?: number;
|
|
3321
|
+
/** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
|
|
3271
3322
|
document: Document;
|
|
3272
|
-
}
|
|
3323
|
+
};
|
|
3273
3324
|
/**
|
|
3274
3325
|
* Delete an existing page (and its subpages) from the change request.
|
|
3275
3326
|
* @example {"operation":"delete_page","page":"page_id"}
|
|
@@ -6441,6 +6492,19 @@ export type SiteSearchScope = {
|
|
|
6441
6492
|
mode: "default";
|
|
6442
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. */
|
|
6443
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";
|
|
6444
6508
|
} | {
|
|
6445
6509
|
/** Only search in the provided site spaces. */
|
|
6446
6510
|
mode: "specific";
|
|
@@ -6467,6 +6531,11 @@ export interface SearchRecordResult {
|
|
|
6467
6531
|
*/
|
|
6468
6532
|
url: string;
|
|
6469
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;
|
|
6470
6539
|
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
6471
6540
|
export interface SiteInsightsSession {
|
|
6472
6541
|
/** GitBook's unique identifier of the visitor. */
|
|
@@ -6475,7 +6544,7 @@ export interface SiteInsightsSession {
|
|
|
6475
6544
|
sessionId: string;
|
|
6476
6545
|
}
|
|
6477
6546
|
/** Integration source */
|
|
6478
|
-
export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom" | "builtin:zendesk" | "builtin:zoho-desk" | "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";
|
|
6479
6548
|
/**
|
|
6480
6549
|
* Title for the context record
|
|
6481
6550
|
* @minLength 1
|
|
@@ -6783,6 +6852,12 @@ export type ContextConnectorSetup = {
|
|
|
6783
6852
|
/** @minLength 1 */
|
|
6784
6853
|
token: string;
|
|
6785
6854
|
};
|
|
6855
|
+
} | {
|
|
6856
|
+
connector: "builtin:front";
|
|
6857
|
+
setupSettings: {
|
|
6858
|
+
/** @minLength 1 */
|
|
6859
|
+
token: string;
|
|
6860
|
+
};
|
|
6786
6861
|
} | {
|
|
6787
6862
|
connector: "builtin:zendesk";
|
|
6788
6863
|
setupSettings: {
|
|
@@ -6813,12 +6888,32 @@ export type ContextConnectorSetup = {
|
|
|
6813
6888
|
/** @minLength 1 */
|
|
6814
6889
|
refreshToken: string;
|
|
6815
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
|
+
};
|
|
6816
6905
|
} | {
|
|
6817
6906
|
connector: "builtin:pylon";
|
|
6818
6907
|
setupSettings: {
|
|
6819
6908
|
/** @minLength 1 */
|
|
6820
6909
|
token: string;
|
|
6821
6910
|
};
|
|
6911
|
+
} | {
|
|
6912
|
+
connector: "builtin:hubspot";
|
|
6913
|
+
setupSettings: {
|
|
6914
|
+
/** @minLength 1 */
|
|
6915
|
+
token: string;
|
|
6916
|
+
};
|
|
6822
6917
|
} | {
|
|
6823
6918
|
connector: "builtin:linear";
|
|
6824
6919
|
setupSettings: {
|
|
@@ -7348,6 +7443,13 @@ export interface AIMessageContext {
|
|
|
7348
7443
|
/** ID of the current page. */
|
|
7349
7444
|
pageId: string;
|
|
7350
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
|
+
}[];
|
|
7351
7453
|
/** Range of the current selection in a document. */
|
|
7352
7454
|
selection?: {
|
|
7353
7455
|
anchorKey: string | null;
|
|
@@ -8768,6 +8870,7 @@ export interface GitSyncOperation {
|
|
|
8768
8870
|
* * `running`: The operation is still running
|
|
8769
8871
|
* * `failure`: The operation failed
|
|
8770
8872
|
* * `success`: The operation was successful
|
|
8873
|
+
* * `timeout`: The operation timed out
|
|
8771
8874
|
*/
|
|
8772
8875
|
state: GitSyncOperationState;
|
|
8773
8876
|
direction: GitSyncOperationDirection;
|
|
@@ -10289,16 +10392,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10289
10392
|
message: string;
|
|
10290
10393
|
};
|
|
10291
10394
|
}>>;
|
|
10292
|
-
/**
|
|
10293
|
-
* No description
|
|
10294
|
-
*
|
|
10295
|
-
* @tags space-git
|
|
10296
|
-
* @name DeleteLegacyGitInstallation
|
|
10297
|
-
* @summary Remove the legacy Git Sync installation from the space to be able to upgrade it to use the new Git integrations
|
|
10298
|
-
* @request DELETE:/spaces/{spaceId}/git/legacy-installation
|
|
10299
|
-
* @secure
|
|
10300
|
-
*/
|
|
10301
|
-
deleteLegacyGitInstallation: (spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
10302
10395
|
/**
|
|
10303
10396
|
* No description
|
|
10304
10397
|
*
|
|
@@ -11190,7 +11283,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11190
11283
|
computed?: boolean;
|
|
11191
11284
|
}, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
|
|
11192
11285
|
/**
|
|
11193
|
-
* @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.
|
|
11194
11287
|
*
|
|
11195
11288
|
* @tags change-request-content
|
|
11196
11289
|
* @name UpdateChangeRequestContent
|
|
@@ -12994,7 +13087,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12994
13087
|
*
|
|
12995
13088
|
* @tags organization-members
|
|
12996
13089
|
* @name RemoveMemberFromOrganizationById
|
|
12997
|
-
* @summary
|
|
13090
|
+
* @summary Remove an organization member or request an organization admin to do it
|
|
12998
13091
|
* @request DELETE:/orgs/{organizationId}/members/{userId}
|
|
12999
13092
|
* @secure
|
|
13000
13093
|
*/
|
|
@@ -15010,11 +15103,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15010
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. */
|
|
15011
15104
|
context?: {
|
|
15012
15105
|
siteSpaceId?: string;
|
|
15013
|
-
/**
|
|
15014
|
-
|
|
15015
|
-
* @maxLength 1024
|
|
15016
|
-
*/
|
|
15017
|
-
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;
|
|
15018
15108
|
};
|
|
15019
15109
|
scope: SiteSearchScope;
|
|
15020
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;
|
|
@@ -40,7 +41,7 @@ export declare const INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
|
|
|
40
41
|
export declare const INTEGRATION_TARGET_ENUM: ["all", "site", "space", "organization"];
|
|
41
42
|
export declare const INTEGRATION_VISIBILITY_ENUM: ["public", "private", "unlisted"];
|
|
42
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"];
|
|
43
|
-
export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "
|
|
44
|
+
export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "marketing", "visitor-auth", "other"];
|
|
44
45
|
export declare const INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
|
|
45
46
|
export declare const INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
|
|
46
47
|
export declare const ORGANIZATION_TITLE_MAX_LENGTH = 255;
|
|
@@ -139,6 +140,7 @@ export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
|
|
|
139
140
|
export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
|
|
140
141
|
export declare const SHARE_LINK_NAME_MAX_LENGTH = 50;
|
|
141
142
|
export declare const SHARE_LINK_NAME_MIN_LENGTH = 0;
|
|
143
|
+
export declare const AGENT_GOAL_MAX_LENGTH = 1024;
|
|
142
144
|
export declare const CONTEXT_RECORD_TYPE_ENUM: ["ticket", "document"];
|
|
143
145
|
export declare const CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
|
|
144
146
|
export declare const CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
|
|
@@ -199,7 +201,6 @@ export declare const SHA256_MAX_LENGTH = 64;
|
|
|
199
201
|
export declare const SHA256_MIN_LENGTH = 64;
|
|
200
202
|
export declare const GIT_BOOK_USERS_ENUM: ["gitbook:agent"];
|
|
201
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"];
|
|
202
|
-
export declare const GIT_SYNC_OPERATION_STATE_ENUM: ["running", "failure", "success"];
|
|
203
204
|
export declare const GIT_SYNC_OPERATION_DIRECTION_ENUM: ["export", "import"];
|
|
204
205
|
export declare const GIT_SYNC_OPERATION_STAGE_ENUM: ["repo_fetch", "config_check", "content_process", "finalize"];
|
|
205
206
|
export declare const GIT_SYNC_SITE_CUSTOMIZATION_FONT_SOURCE_MIN_LENGTH = 1;
|
package/dist/index.cjs
CHANGED
|
@@ -179,6 +179,7 @@ var require_node = __commonJS({
|
|
|
179
179
|
// src/index.ts
|
|
180
180
|
var src_exports = {};
|
|
181
181
|
__export(src_exports, {
|
|
182
|
+
AGENT_GOAL_MAX_LENGTH: () => AGENT_GOAL_MAX_LENGTH,
|
|
182
183
|
AGENT_STATUS_ENUM: () => AGENT_STATUS_ENUM,
|
|
183
184
|
AIMESSAGE_ROLE_ENUM: () => AIMESSAGE_ROLE_ENUM,
|
|
184
185
|
AIMESSAGE_STEP_PHASE_ENUM: () => AIMESSAGE_STEP_PHASE_ENUM,
|
|
@@ -524,7 +525,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
524
525
|
|
|
525
526
|
// package.json
|
|
526
527
|
var name = "@gitbook/api";
|
|
527
|
-
var version = "0.
|
|
528
|
+
var version = "0.190.0";
|
|
528
529
|
|
|
529
530
|
// src/client.ts
|
|
530
531
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -684,12 +685,6 @@ var GitSyncOperationDirection = /* @__PURE__ */ ((GitSyncOperationDirection2) =>
|
|
|
684
685
|
GitSyncOperationDirection2["Import"] = "import";
|
|
685
686
|
return GitSyncOperationDirection2;
|
|
686
687
|
})(GitSyncOperationDirection || {});
|
|
687
|
-
var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
|
|
688
|
-
GitSyncOperationState2["Running"] = "running";
|
|
689
|
-
GitSyncOperationState2["Failure"] = "failure";
|
|
690
|
-
GitSyncOperationState2["Success"] = "success";
|
|
691
|
-
return GitSyncOperationState2;
|
|
692
|
-
})(GitSyncOperationState || {});
|
|
693
688
|
var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
|
|
694
689
|
RevisionSemanticChangeType2["PageCreated"] = "page_created";
|
|
695
690
|
RevisionSemanticChangeType2["PageEdited"] = "page_edited";
|
|
@@ -1451,7 +1446,6 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
|
1451
1446
|
IntegrationCategory2["Analytics"] = "analytics";
|
|
1452
1447
|
IntegrationCategory2["Collaboration"] = "collaboration";
|
|
1453
1448
|
IntegrationCategory2["Content"] = "content";
|
|
1454
|
-
IntegrationCategory2["Gitsync"] = "gitsync";
|
|
1455
1449
|
IntegrationCategory2["Marketing"] = "marketing";
|
|
1456
1450
|
IntegrationCategory2["VisitorAuth"] = "visitor-auth";
|
|
1457
1451
|
IntegrationCategory2["Other"] = "other";
|
|
@@ -1592,6 +1586,13 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
|
|
|
1592
1586
|
MemberRole2["Read"] = "read";
|
|
1593
1587
|
return MemberRole2;
|
|
1594
1588
|
})(MemberRole || {});
|
|
1589
|
+
var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
|
|
1590
|
+
GitSyncOperationState2["Running"] = "running";
|
|
1591
|
+
GitSyncOperationState2["Failure"] = "failure";
|
|
1592
|
+
GitSyncOperationState2["Success"] = "success";
|
|
1593
|
+
GitSyncOperationState2["Timeout"] = "timeout";
|
|
1594
|
+
return GitSyncOperationState2;
|
|
1595
|
+
})(GitSyncOperationState || {});
|
|
1595
1596
|
var GitSyncProvider = /* @__PURE__ */ ((GitSyncProvider2) => {
|
|
1596
1597
|
GitSyncProvider2["Github"] = "github";
|
|
1597
1598
|
GitSyncProvider2["Gitlab"] = "gitlab";
|
|
@@ -2002,12 +2003,6 @@ var Api = class extends HttpClient {
|
|
|
2002
2003
|
format: "json",
|
|
2003
2004
|
...params
|
|
2004
2005
|
}),
|
|
2005
|
-
deleteLegacyGitInstallation: (spaceId, params = {}) => this.request({
|
|
2006
|
-
path: `/spaces/${spaceId}/git/legacy-installation`,
|
|
2007
|
-
method: "DELETE",
|
|
2008
|
-
secure: true,
|
|
2009
|
-
...params
|
|
2010
|
-
}),
|
|
2011
2006
|
inviteToSpace: (spaceId, data, params = {}) => this.request({
|
|
2012
2007
|
path: `/spaces/${spaceId}/permissions`,
|
|
2013
2008
|
method: "POST",
|
|
@@ -4699,6 +4694,7 @@ var EXPRESSION_MIN_LENGTH = 0;
|
|
|
4699
4694
|
var 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"];
|
|
4700
4695
|
var GIT_SYNC_INSTALLATION_STATUS_ENUM = ["unauthenticated", "active", "pending"];
|
|
4701
4696
|
var GIT_SYNC_PROVIDER_ENUM = ["github", "gitlab", "github-legacy"];
|
|
4697
|
+
var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success", "timeout"];
|
|
4702
4698
|
var MEMBER_ROLE_ENUM = ["admin", "create", "edit", "review", "comment", "read"];
|
|
4703
4699
|
var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
|
|
4704
4700
|
var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
|
|
@@ -4729,7 +4725,7 @@ var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
|
|
|
4729
4725
|
var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
|
|
4730
4726
|
var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
|
|
4731
4727
|
var 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"];
|
|
4732
|
-
var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "
|
|
4728
|
+
var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "marketing", "visitor-auth", "other"];
|
|
4733
4729
|
var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
|
|
4734
4730
|
var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
|
|
4735
4731
|
var ORGANIZATION_TITLE_MAX_LENGTH = 255;
|
|
@@ -4828,6 +4824,7 @@ var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
|
|
|
4828
4824
|
var SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
|
|
4829
4825
|
var SHARE_LINK_NAME_MAX_LENGTH = 50;
|
|
4830
4826
|
var SHARE_LINK_NAME_MIN_LENGTH = 0;
|
|
4827
|
+
var AGENT_GOAL_MAX_LENGTH = 1024;
|
|
4831
4828
|
var CONTEXT_RECORD_TYPE_ENUM = ["ticket", "document"];
|
|
4832
4829
|
var CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
|
|
4833
4830
|
var CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
|
|
@@ -4888,7 +4885,6 @@ var SHA256_MAX_LENGTH = 64;
|
|
|
4888
4885
|
var SHA256_MIN_LENGTH = 64;
|
|
4889
4886
|
var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
|
|
4890
4887
|
var 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"];
|
|
4891
|
-
var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success"];
|
|
4892
4888
|
var GIT_SYNC_OPERATION_DIRECTION_ENUM = ["export", "import"];
|
|
4893
4889
|
var GIT_SYNC_OPERATION_STAGE_ENUM = ["repo_fetch", "config_check", "content_process", "finalize"];
|
|
4894
4890
|
var GIT_SYNC_SITE_CUSTOMIZATION_FONT_SOURCE_MIN_LENGTH = 1;
|
|
@@ -4970,6 +4966,7 @@ var GitBookAPI = class extends Api {
|
|
|
4970
4966
|
};
|
|
4971
4967
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4972
4968
|
0 && (module.exports = {
|
|
4969
|
+
AGENT_GOAL_MAX_LENGTH,
|
|
4973
4970
|
AGENT_STATUS_ENUM,
|
|
4974
4971
|
AIMESSAGE_ROLE_ENUM,
|
|
4975
4972
|
AIMESSAGE_STEP_PHASE_ENUM,
|
package/dist/index.js
CHANGED
|
@@ -172,7 +172,7 @@ var require_node = __commonJS({
|
|
|
172
172
|
|
|
173
173
|
// package.json
|
|
174
174
|
var name = "@gitbook/api";
|
|
175
|
-
var version = "0.
|
|
175
|
+
var version = "0.190.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -332,12 +332,6 @@ var GitSyncOperationDirection = /* @__PURE__ */ ((GitSyncOperationDirection2) =>
|
|
|
332
332
|
GitSyncOperationDirection2["Import"] = "import";
|
|
333
333
|
return GitSyncOperationDirection2;
|
|
334
334
|
})(GitSyncOperationDirection || {});
|
|
335
|
-
var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
|
|
336
|
-
GitSyncOperationState2["Running"] = "running";
|
|
337
|
-
GitSyncOperationState2["Failure"] = "failure";
|
|
338
|
-
GitSyncOperationState2["Success"] = "success";
|
|
339
|
-
return GitSyncOperationState2;
|
|
340
|
-
})(GitSyncOperationState || {});
|
|
341
335
|
var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
|
|
342
336
|
RevisionSemanticChangeType2["PageCreated"] = "page_created";
|
|
343
337
|
RevisionSemanticChangeType2["PageEdited"] = "page_edited";
|
|
@@ -1099,7 +1093,6 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
|
1099
1093
|
IntegrationCategory2["Analytics"] = "analytics";
|
|
1100
1094
|
IntegrationCategory2["Collaboration"] = "collaboration";
|
|
1101
1095
|
IntegrationCategory2["Content"] = "content";
|
|
1102
|
-
IntegrationCategory2["Gitsync"] = "gitsync";
|
|
1103
1096
|
IntegrationCategory2["Marketing"] = "marketing";
|
|
1104
1097
|
IntegrationCategory2["VisitorAuth"] = "visitor-auth";
|
|
1105
1098
|
IntegrationCategory2["Other"] = "other";
|
|
@@ -1240,6 +1233,13 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
|
|
|
1240
1233
|
MemberRole2["Read"] = "read";
|
|
1241
1234
|
return MemberRole2;
|
|
1242
1235
|
})(MemberRole || {});
|
|
1236
|
+
var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
|
|
1237
|
+
GitSyncOperationState2["Running"] = "running";
|
|
1238
|
+
GitSyncOperationState2["Failure"] = "failure";
|
|
1239
|
+
GitSyncOperationState2["Success"] = "success";
|
|
1240
|
+
GitSyncOperationState2["Timeout"] = "timeout";
|
|
1241
|
+
return GitSyncOperationState2;
|
|
1242
|
+
})(GitSyncOperationState || {});
|
|
1243
1243
|
var GitSyncProvider = /* @__PURE__ */ ((GitSyncProvider2) => {
|
|
1244
1244
|
GitSyncProvider2["Github"] = "github";
|
|
1245
1245
|
GitSyncProvider2["Gitlab"] = "gitlab";
|
|
@@ -1650,12 +1650,6 @@ var Api = class extends HttpClient {
|
|
|
1650
1650
|
format: "json",
|
|
1651
1651
|
...params
|
|
1652
1652
|
}),
|
|
1653
|
-
deleteLegacyGitInstallation: (spaceId, params = {}) => this.request({
|
|
1654
|
-
path: `/spaces/${spaceId}/git/legacy-installation`,
|
|
1655
|
-
method: "DELETE",
|
|
1656
|
-
secure: true,
|
|
1657
|
-
...params
|
|
1658
|
-
}),
|
|
1659
1653
|
inviteToSpace: (spaceId, data, params = {}) => this.request({
|
|
1660
1654
|
path: `/spaces/${spaceId}/permissions`,
|
|
1661
1655
|
method: "POST",
|
|
@@ -4347,6 +4341,7 @@ var EXPRESSION_MIN_LENGTH = 0;
|
|
|
4347
4341
|
var 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"];
|
|
4348
4342
|
var GIT_SYNC_INSTALLATION_STATUS_ENUM = ["unauthenticated", "active", "pending"];
|
|
4349
4343
|
var GIT_SYNC_PROVIDER_ENUM = ["github", "gitlab", "github-legacy"];
|
|
4344
|
+
var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success", "timeout"];
|
|
4350
4345
|
var MEMBER_ROLE_ENUM = ["admin", "create", "edit", "review", "comment", "read"];
|
|
4351
4346
|
var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
|
|
4352
4347
|
var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
|
|
@@ -4377,7 +4372,7 @@ var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
|
|
|
4377
4372
|
var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
|
|
4378
4373
|
var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
|
|
4379
4374
|
var 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"];
|
|
4380
|
-
var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "
|
|
4375
|
+
var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "marketing", "visitor-auth", "other"];
|
|
4381
4376
|
var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
|
|
4382
4377
|
var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
|
|
4383
4378
|
var ORGANIZATION_TITLE_MAX_LENGTH = 255;
|
|
@@ -4476,6 +4471,7 @@ var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
|
|
|
4476
4471
|
var SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
|
|
4477
4472
|
var SHARE_LINK_NAME_MAX_LENGTH = 50;
|
|
4478
4473
|
var SHARE_LINK_NAME_MIN_LENGTH = 0;
|
|
4474
|
+
var AGENT_GOAL_MAX_LENGTH = 1024;
|
|
4479
4475
|
var CONTEXT_RECORD_TYPE_ENUM = ["ticket", "document"];
|
|
4480
4476
|
var CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
|
|
4481
4477
|
var CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
|
|
@@ -4536,7 +4532,6 @@ var SHA256_MAX_LENGTH = 64;
|
|
|
4536
4532
|
var SHA256_MIN_LENGTH = 64;
|
|
4537
4533
|
var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
|
|
4538
4534
|
var 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"];
|
|
4539
|
-
var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success"];
|
|
4540
4535
|
var GIT_SYNC_OPERATION_DIRECTION_ENUM = ["export", "import"];
|
|
4541
4536
|
var GIT_SYNC_OPERATION_STAGE_ENUM = ["repo_fetch", "config_check", "content_process", "finalize"];
|
|
4542
4537
|
var GIT_SYNC_SITE_CUSTOMIZATION_FONT_SOURCE_MIN_LENGTH = 1;
|
|
@@ -4617,6 +4612,7 @@ var GitBookAPI = class extends Api {
|
|
|
4617
4612
|
}
|
|
4618
4613
|
};
|
|
4619
4614
|
export {
|
|
4615
|
+
AGENT_GOAL_MAX_LENGTH,
|
|
4620
4616
|
AGENT_STATUS_ENUM,
|
|
4621
4617
|
AIMESSAGE_ROLE_ENUM,
|
|
4622
4618
|
AIMESSAGE_STEP_PHASE_ENUM,
|