@gitbook/api 0.178.0 → 0.179.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 +299 -8
- package/dist/constants.d.ts +4 -2
- package/dist/index.cjs +82 -3
- package/dist/index.js +78 -3
- package/package.json +1 -1
- package/spec/openapi.json +762 -20
- package/spec/openapi.yaml +481 -13
package/dist/client.d.ts
CHANGED
|
@@ -82,6 +82,16 @@ export declare enum RevisionSemanticChangeType {
|
|
|
82
82
|
export declare enum GitBookUsers {
|
|
83
83
|
GitbookAgent = "gitbook:agent"
|
|
84
84
|
}
|
|
85
|
+
/** Which side should be treated as the source of truth when Git Sync is configured. */
|
|
86
|
+
export declare enum GitSyncInstallationPriority {
|
|
87
|
+
Git = "git",
|
|
88
|
+
Gitbook = "gitbook"
|
|
89
|
+
}
|
|
90
|
+
/** The provider of the Git Sync installation. */
|
|
91
|
+
export declare enum GitSyncInstallationProvider {
|
|
92
|
+
Github = "github",
|
|
93
|
+
Gitlab = "gitlab"
|
|
94
|
+
}
|
|
85
95
|
/** The Cloudflare Hostname TLS validation method */
|
|
86
96
|
export declare enum CloudflareHostnameTLSValidationMethod {
|
|
87
97
|
Http = "http",
|
|
@@ -936,6 +946,7 @@ export declare enum TextAlignment {
|
|
|
936
946
|
Center = "center",
|
|
937
947
|
End = "end"
|
|
938
948
|
}
|
|
949
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
939
950
|
export declare enum DocumentTextColor {
|
|
940
951
|
Default = "default",
|
|
941
952
|
Green = "green",
|
|
@@ -944,11 +955,15 @@ export declare enum DocumentTextColor {
|
|
|
944
955
|
Orange = "orange",
|
|
945
956
|
Yellow = "yellow",
|
|
946
957
|
Purple = "purple",
|
|
958
|
+
Pink = "pink",
|
|
959
|
+
Violet = "violet",
|
|
960
|
+
Cyan = "cyan",
|
|
947
961
|
Primary = "$primary",
|
|
948
962
|
Info = "$info",
|
|
949
963
|
Success = "$success",
|
|
950
964
|
Warning = "$warning",
|
|
951
|
-
Danger = "$danger"
|
|
965
|
+
Danger = "$danger",
|
|
966
|
+
Tint = "$tint"
|
|
952
967
|
}
|
|
953
968
|
/**
|
|
954
969
|
* "The role of a member in an organization.
|
|
@@ -984,6 +999,7 @@ export declare enum TranslationLanguage {
|
|
|
984
999
|
Ru = "ru",
|
|
985
1000
|
Ja = "ja",
|
|
986
1001
|
Zh = "zh",
|
|
1002
|
+
ZhTw = "zh-tw",
|
|
987
1003
|
Yue = "yue",
|
|
988
1004
|
Ko = "ko",
|
|
989
1005
|
Ar = "ar",
|
|
@@ -1043,6 +1059,8 @@ export declare enum ContentVisibility {
|
|
|
1043
1059
|
export type APIChannelData = APIChannelGitSyncOperationData | APIChannelSpaceContentRefsData | APIChannelChangeRequestContentRefsData | APIChannelTranslationRunData | APIChannelImportRunData | APIChannelMutationData;
|
|
1044
1060
|
/** Channel to subscribe to for realtime updates. */
|
|
1045
1061
|
export type APIChannel = APIChannelSpaceInfo | APIChannelSpaceContent | APIChannelSpaceGitInfo | APIChannelSpacePublishingAuth | APIChannelSpacePublishingCustomization | APIChannelSpaceContentRefs | APIChannelSpaceIntegrations | APIChannelUserAPITokens | APIChannelUserOrganizations | APIChannelUserProfile | APIChannelChangeRequest | APIChannelChangeRequests | APIChannelChangeRequestReviews | APIChannelChangeRequestContentRefs | 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 | APIChannelGitSyncOperation | APIChannelOpenAPISpec | APIChannelSubdomain | APIChannelTranslation | APIChannelTranslationRun | APIChannelImportRun;
|
|
1062
|
+
/** Provider-specific setup payload for a Git Sync installation. */
|
|
1063
|
+
export type GitSyncInstallationSetup = GitSyncInstallationSetupGitHub | GitSyncInstallationSetupGitLab;
|
|
1046
1064
|
export type PublishedContentRedirect = {
|
|
1047
1065
|
/** Type of target for the redirect */
|
|
1048
1066
|
target: "application" | "content";
|
|
@@ -1586,7 +1604,9 @@ export interface DocumentMarkColor {
|
|
|
1586
1604
|
object: "mark";
|
|
1587
1605
|
type: "color";
|
|
1588
1606
|
data: {
|
|
1607
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
1589
1608
|
text: DocumentTextColor;
|
|
1609
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
1590
1610
|
background: DocumentTextColor;
|
|
1591
1611
|
};
|
|
1592
1612
|
}
|
|
@@ -1704,6 +1724,7 @@ export interface DocumentInlineIcon {
|
|
|
1704
1724
|
key?: string;
|
|
1705
1725
|
data: {
|
|
1706
1726
|
icon: string;
|
|
1727
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
1707
1728
|
color?: DocumentTextColor;
|
|
1708
1729
|
};
|
|
1709
1730
|
isVoid: true;
|
|
@@ -2672,6 +2693,7 @@ export type RevisionTag = {
|
|
|
2672
2693
|
slug: string;
|
|
2673
2694
|
/** Display label for the tag. Can be renamed and differ from the slug. */
|
|
2674
2695
|
label: string;
|
|
2696
|
+
/** Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid. */
|
|
2675
2697
|
color: DocumentTextColor;
|
|
2676
2698
|
} & ({
|
|
2677
2699
|
/** Unicode codepoint or character of the emoji */
|
|
@@ -2821,6 +2843,8 @@ export type RevisionTypeUpdate = RevisionBase & {
|
|
|
2821
2843
|
export type RevisionTypeComputed = RevisionBase & {
|
|
2822
2844
|
/** Virtual revision, computed from a source revision */
|
|
2823
2845
|
type: "computed";
|
|
2846
|
+
/** ID of the non-computed revision used to compute this revision. */
|
|
2847
|
+
sourceRevision: string;
|
|
2824
2848
|
/** The change request the source revision was merged from, when the computed revision is derived from a merge revision. */
|
|
2825
2849
|
mergedFrom?: ChangeRequest;
|
|
2826
2850
|
};
|
|
@@ -6135,6 +6159,13 @@ export interface SearchRecordResult {
|
|
|
6135
6159
|
*/
|
|
6136
6160
|
url: string;
|
|
6137
6161
|
}
|
|
6162
|
+
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
6163
|
+
export interface SiteInsightsSession {
|
|
6164
|
+
/** GitBook's unique identifier of the visitor. */
|
|
6165
|
+
visitorId: string;
|
|
6166
|
+
/** GitBook's unique identifier of the visitor's session. */
|
|
6167
|
+
sessionId: string;
|
|
6168
|
+
}
|
|
6138
6169
|
/** Integration source */
|
|
6139
6170
|
export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom";
|
|
6140
6171
|
/**
|
|
@@ -6541,13 +6572,6 @@ export type SiteQuestionAnswerSourceRecord = SiteQuestionAnswerSourceBase & {
|
|
|
6541
6572
|
/** Integration source */
|
|
6542
6573
|
connector?: ContextConnector;
|
|
6543
6574
|
};
|
|
6544
|
-
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
6545
|
-
export interface SiteInsightsSession {
|
|
6546
|
-
/** GitBook's unique identifier of the visitor. */
|
|
6547
|
-
visitorId: string;
|
|
6548
|
-
/** GitBook's unique identifier of the visitor's session. */
|
|
6549
|
-
sessionId: string;
|
|
6550
|
-
}
|
|
6551
6575
|
export interface SiteQuestionAnswer {
|
|
6552
6576
|
object: "site-question-answer";
|
|
6553
6577
|
/** The ID of the site question answer. */
|
|
@@ -6992,6 +7016,13 @@ export interface AIMessageContext {
|
|
|
6992
7016
|
/** ID of the current page. */
|
|
6993
7017
|
pageId: string;
|
|
6994
7018
|
};
|
|
7019
|
+
/** Range of the current selection in a document. */
|
|
7020
|
+
selection?: {
|
|
7021
|
+
anchorKey: string | null;
|
|
7022
|
+
anchorOffset: number;
|
|
7023
|
+
focusKey: string | null;
|
|
7024
|
+
focusOffset: number;
|
|
7025
|
+
};
|
|
6995
7026
|
}
|
|
6996
7027
|
/** Input version of an AI message. */
|
|
6997
7028
|
export interface AIMessageInput {
|
|
@@ -7785,6 +7816,14 @@ export interface UnsplashImage {
|
|
|
7785
7816
|
export interface HiveAccessToken {
|
|
7786
7817
|
contents: Record<string, string>;
|
|
7787
7818
|
}
|
|
7819
|
+
export interface SignedURL {
|
|
7820
|
+
/** The kind of signed URL */
|
|
7821
|
+
object: "signed-url";
|
|
7822
|
+
/** Signed URL that can be opened by the browser */
|
|
7823
|
+
url: URL;
|
|
7824
|
+
/** Expiration time of the signed URL */
|
|
7825
|
+
expiresAt: Timestamp;
|
|
7826
|
+
}
|
|
7788
7827
|
/** The context to send when purging the CDN Cache */
|
|
7789
7828
|
export interface PurgeCDNCacheContext {
|
|
7790
7829
|
/** The list of tags to purge */
|
|
@@ -7937,6 +7976,83 @@ export interface SiteVisitorPayload {
|
|
|
7937
7976
|
jwtToken?: string;
|
|
7938
7977
|
unsignedClaims?: PlainObject;
|
|
7939
7978
|
}
|
|
7979
|
+
/** Resource targeted by a Git Sync installation. Currently only spaces are supported. */
|
|
7980
|
+
export interface GitSyncInstallationTarget {
|
|
7981
|
+
/** Unique identifier of the space targeted by the Git Sync installation. */
|
|
7982
|
+
spaceId: string;
|
|
7983
|
+
}
|
|
7984
|
+
/** Common setup fields for a Git Sync installation. */
|
|
7985
|
+
export interface GitSyncInstallationSetupCommon {
|
|
7986
|
+
/** Optional directory used when syncing a monorepo subdirectory. */
|
|
7987
|
+
projectDirectory?: string;
|
|
7988
|
+
/** Optional template used when generating commit messages. */
|
|
7989
|
+
commitMessageTemplate?: string;
|
|
7990
|
+
/**
|
|
7991
|
+
* Whether previews should be generated from branches outside the configured branch.
|
|
7992
|
+
* @default false
|
|
7993
|
+
*/
|
|
7994
|
+
previewExternalBranches?: boolean;
|
|
7995
|
+
/** Which side should be treated as the source of truth when Git Sync is configured. */
|
|
7996
|
+
priority?: GitSyncInstallationPriority;
|
|
7997
|
+
}
|
|
7998
|
+
/** GitHub provider configuration for a Git Sync installation. */
|
|
7999
|
+
export type GitSyncInstallationSetupGitHub = GitSyncInstallationSetupCommon & {
|
|
8000
|
+
provider: "github";
|
|
8001
|
+
/** GitHub specific configuration for the Git Sync installation. */
|
|
8002
|
+
providerConfiguration: {
|
|
8003
|
+
/** GitHub repository identifier. */
|
|
8004
|
+
repositoryId?: number;
|
|
8005
|
+
/** GitHub repository branch. */
|
|
8006
|
+
branch?: string;
|
|
8007
|
+
};
|
|
8008
|
+
};
|
|
8009
|
+
/** GitLab provider configuration for a Git Sync installation. */
|
|
8010
|
+
export type GitSyncInstallationSetupGitLab = GitSyncInstallationSetupCommon & {
|
|
8011
|
+
provider: "gitlab";
|
|
8012
|
+
/** GitLab specific configuration for the Git Sync installation. */
|
|
8013
|
+
providerConfiguration: {
|
|
8014
|
+
/** GitLab project identifier. */
|
|
8015
|
+
projectId?: number;
|
|
8016
|
+
/** GitLab access token with appropriate scopes for repository access. */
|
|
8017
|
+
accessToken?: string;
|
|
8018
|
+
/** Custom GitLab instance URL, if using a self-hosted GitLab. */
|
|
8019
|
+
customInstanceURL?: string;
|
|
8020
|
+
/** GitLab repository branch. */
|
|
8021
|
+
branch?: string;
|
|
8022
|
+
};
|
|
8023
|
+
};
|
|
8024
|
+
export type GitSyncInstallation = GitSyncInstallationSetup & {
|
|
8025
|
+
object: "git-sync-installation";
|
|
8026
|
+
/** Unique identifier of the Git Sync installation. */
|
|
8027
|
+
id: string;
|
|
8028
|
+
/** Resource targeted by a Git Sync installation. Currently only spaces are supported. */
|
|
8029
|
+
target: GitSyncInstallationTarget;
|
|
8030
|
+
createdAt: Timestamp;
|
|
8031
|
+
/** Identifier of the user who created the installation. */
|
|
8032
|
+
createdBy: string;
|
|
8033
|
+
updatedAt: Timestamp;
|
|
8034
|
+
};
|
|
8035
|
+
/** GitHub repository that can be selected for Git Sync. */
|
|
8036
|
+
export interface GitSyncGitHubRepository {
|
|
8037
|
+
id: number;
|
|
8038
|
+
accountName: string;
|
|
8039
|
+
repositoryName: string;
|
|
8040
|
+
fullName: string;
|
|
8041
|
+
defaultBranch: string | null;
|
|
8042
|
+
}
|
|
8043
|
+
/** Branch that can be used for Git Sync. */
|
|
8044
|
+
export interface GitSyncBranch {
|
|
8045
|
+
name: string;
|
|
8046
|
+
ref: string;
|
|
8047
|
+
}
|
|
8048
|
+
/** GitLab project that can be selected for Git Sync. */
|
|
8049
|
+
export interface GitSyncGitLabProject {
|
|
8050
|
+
id: number;
|
|
8051
|
+
accountName: string;
|
|
8052
|
+
repositoryName: string;
|
|
8053
|
+
fullName: string;
|
|
8054
|
+
defaultBranch: string | null;
|
|
8055
|
+
}
|
|
7940
8056
|
/**
|
|
7941
8057
|
* @minLength 64
|
|
7942
8058
|
* @maxLength 64
|
|
@@ -12176,6 +12292,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12176
12292
|
contributor?: string;
|
|
12177
12293
|
/** If defined, only change requests with a requested reviewer for this user will be returned. */
|
|
12178
12294
|
requestedReviewer?: string;
|
|
12295
|
+
/** If defined, only change requests linked to this site will be returned. */
|
|
12296
|
+
site?: string;
|
|
12297
|
+
/** If defined, only change requests from this space will be returned. */
|
|
12298
|
+
space?: string;
|
|
12179
12299
|
/** If defined, only change requests linked to this site topic will be returned. */
|
|
12180
12300
|
topic?: string;
|
|
12181
12301
|
/** The field to sort change requests by. Defaults to 'updatedAt'. */
|
|
@@ -13755,6 +13875,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13755
13875
|
siteSpaceId?: string;
|
|
13756
13876
|
};
|
|
13757
13877
|
scope: SiteSearchScope;
|
|
13878
|
+
/** Identifiers for a GitBook site session, used for analytics and adaptive content. */
|
|
13879
|
+
session?: SiteInsightsSession;
|
|
13758
13880
|
}, query?: {
|
|
13759
13881
|
/** Output format for the content. */
|
|
13760
13882
|
format?: "document" | "markdown";
|
|
@@ -15500,5 +15622,174 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
15500
15622
|
};
|
|
15501
15623
|
}>>;
|
|
15502
15624
|
};
|
|
15625
|
+
git: {
|
|
15626
|
+
/**
|
|
15627
|
+
* No description
|
|
15628
|
+
*
|
|
15629
|
+
* @tags git
|
|
15630
|
+
* @name InstallGitSyncProviderOnTarget
|
|
15631
|
+
* @summary Install a Git Sync provider on a target
|
|
15632
|
+
* @request POST:/git/installations
|
|
15633
|
+
* @secure
|
|
15634
|
+
*/
|
|
15635
|
+
installGitSyncProviderOnTarget: (data: {
|
|
15636
|
+
/** The provider of the Git Sync installation. */
|
|
15637
|
+
provider: GitSyncInstallationProvider;
|
|
15638
|
+
/** Resource targeted by a Git Sync installation. Currently only spaces are supported. */
|
|
15639
|
+
target: GitSyncInstallationTarget;
|
|
15640
|
+
}, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
15641
|
+
error: {
|
|
15642
|
+
/** @format int32 */
|
|
15643
|
+
code: 404;
|
|
15644
|
+
message: string;
|
|
15645
|
+
};
|
|
15646
|
+
} | {
|
|
15647
|
+
error: {
|
|
15648
|
+
/** @format int32 */
|
|
15649
|
+
code: 409;
|
|
15650
|
+
message: string;
|
|
15651
|
+
};
|
|
15652
|
+
}>>;
|
|
15653
|
+
/**
|
|
15654
|
+
* No description
|
|
15655
|
+
*
|
|
15656
|
+
* @tags git
|
|
15657
|
+
* @name UpdateGitSyncInstallationById
|
|
15658
|
+
* @summary Update a Git Sync installation configuration
|
|
15659
|
+
* @request PATCH:/git/installations/{installationId}
|
|
15660
|
+
* @secure
|
|
15661
|
+
*/
|
|
15662
|
+
updateGitSyncInstallationById: (installationId: string, data: GitSyncInstallationSetup, params?: RequestParams) => Promise<HttpResponse<GitSyncInstallation, {
|
|
15663
|
+
error: {
|
|
15664
|
+
/** @format int32 */
|
|
15665
|
+
code: 401;
|
|
15666
|
+
message: string;
|
|
15667
|
+
};
|
|
15668
|
+
} | {
|
|
15669
|
+
error: {
|
|
15670
|
+
/** @format int32 */
|
|
15671
|
+
code: 404;
|
|
15672
|
+
message: string;
|
|
15673
|
+
};
|
|
15674
|
+
} | {
|
|
15675
|
+
error: {
|
|
15676
|
+
/** @format int32 */
|
|
15677
|
+
code: 409;
|
|
15678
|
+
message: string;
|
|
15679
|
+
};
|
|
15680
|
+
}>>;
|
|
15681
|
+
/**
|
|
15682
|
+
* No description
|
|
15683
|
+
*
|
|
15684
|
+
* @tags git
|
|
15685
|
+
* @name UninstallGitSyncInstallation
|
|
15686
|
+
* @summary Uninstall a Git Sync installation
|
|
15687
|
+
* @request DELETE:/git/installations/{installationId}
|
|
15688
|
+
* @secure
|
|
15689
|
+
*/
|
|
15690
|
+
uninstallGitSyncInstallation: (installationId: string, params?: RequestParams) => Promise<HttpResponse<void, {
|
|
15691
|
+
error: {
|
|
15692
|
+
/** @format int32 */
|
|
15693
|
+
code: 404;
|
|
15694
|
+
message: string;
|
|
15695
|
+
};
|
|
15696
|
+
}>>;
|
|
15697
|
+
/**
|
|
15698
|
+
* No description
|
|
15699
|
+
*
|
|
15700
|
+
* @tags git
|
|
15701
|
+
* @name ListGitHubRepositoriesForGitSyncInstallation
|
|
15702
|
+
* @summary List GitHub repositories available for a Git Sync installation
|
|
15703
|
+
* @request GET:/git/installations/{installationId}/github/repos
|
|
15704
|
+
* @secure
|
|
15705
|
+
*/
|
|
15706
|
+
listGitHubRepositoriesForGitSyncInstallation: (installationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
15707
|
+
items: GitSyncGitHubRepository[];
|
|
15708
|
+
}, {
|
|
15709
|
+
error: {
|
|
15710
|
+
/** @format int32 */
|
|
15711
|
+
code: 401;
|
|
15712
|
+
message: string;
|
|
15713
|
+
};
|
|
15714
|
+
} | {
|
|
15715
|
+
error: {
|
|
15716
|
+
/** @format int32 */
|
|
15717
|
+
code: 404;
|
|
15718
|
+
message: string;
|
|
15719
|
+
};
|
|
15720
|
+
}>>;
|
|
15721
|
+
/**
|
|
15722
|
+
* No description
|
|
15723
|
+
*
|
|
15724
|
+
* @tags git
|
|
15725
|
+
* @name ListGitHubRepoBranchesForGitSyncInstallation
|
|
15726
|
+
* @summary List GitHub repository branches available for a Git Sync installation
|
|
15727
|
+
* @request GET:/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/branches
|
|
15728
|
+
* @secure
|
|
15729
|
+
*/
|
|
15730
|
+
listGitHubRepoBranchesForGitSyncInstallation: (installationId: string, accountName: string, repositoryName: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
15731
|
+
items: GitSyncBranch[];
|
|
15732
|
+
}, {
|
|
15733
|
+
error: {
|
|
15734
|
+
/** @format int32 */
|
|
15735
|
+
code: 401;
|
|
15736
|
+
message: string;
|
|
15737
|
+
};
|
|
15738
|
+
} | {
|
|
15739
|
+
error: {
|
|
15740
|
+
/** @format int32 */
|
|
15741
|
+
code: 404;
|
|
15742
|
+
message: string;
|
|
15743
|
+
};
|
|
15744
|
+
}>>;
|
|
15745
|
+
/**
|
|
15746
|
+
* No description
|
|
15747
|
+
*
|
|
15748
|
+
* @tags git
|
|
15749
|
+
* @name ListGitLabProjectsForGitSyncInstallation
|
|
15750
|
+
* @summary List GitLab projects available for a Git Sync installation
|
|
15751
|
+
* @request GET:/git/installations/{installationId}/gitlab/projects
|
|
15752
|
+
* @secure
|
|
15753
|
+
*/
|
|
15754
|
+
listGitLabProjectsForGitSyncInstallation: (installationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
15755
|
+
items: GitSyncGitLabProject[];
|
|
15756
|
+
}, {
|
|
15757
|
+
error: {
|
|
15758
|
+
/** @format int32 */
|
|
15759
|
+
code: 401;
|
|
15760
|
+
message: string;
|
|
15761
|
+
};
|
|
15762
|
+
} | {
|
|
15763
|
+
error: {
|
|
15764
|
+
/** @format int32 */
|
|
15765
|
+
code: 404;
|
|
15766
|
+
message: string;
|
|
15767
|
+
};
|
|
15768
|
+
}>>;
|
|
15769
|
+
/**
|
|
15770
|
+
* No description
|
|
15771
|
+
*
|
|
15772
|
+
* @tags git
|
|
15773
|
+
* @name ListGitLabProjectBranchesForGitSyncInstallation
|
|
15774
|
+
* @summary List GitLab project branches available for a Git Sync installation
|
|
15775
|
+
* @request GET:/git/installations/{installationId}/gitlab/projects/{projectId}/branches
|
|
15776
|
+
* @secure
|
|
15777
|
+
*/
|
|
15778
|
+
listGitLabProjectBranchesForGitSyncInstallation: (installationId: string, projectId: number, params?: RequestParams) => Promise<HttpResponse<{
|
|
15779
|
+
items: GitSyncBranch[];
|
|
15780
|
+
}, {
|
|
15781
|
+
error: {
|
|
15782
|
+
/** @format int32 */
|
|
15783
|
+
code: 401;
|
|
15784
|
+
message: string;
|
|
15785
|
+
};
|
|
15786
|
+
} | {
|
|
15787
|
+
error: {
|
|
15788
|
+
/** @format int32 */
|
|
15789
|
+
code: 404;
|
|
15790
|
+
message: string;
|
|
15791
|
+
};
|
|
15792
|
+
}>>;
|
|
15793
|
+
};
|
|
15503
15794
|
}
|
|
15504
15795
|
export {};
|
package/dist/constants.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ export declare const CONTENT_VISIBILITY_ENUM: ["public", "unlisted", "share-link
|
|
|
7
7
|
export declare const SPACE_EDIT_MODE_ENUM: ["live", "locked"];
|
|
8
8
|
export declare const EXPRESSION_MAX_LENGTH = 1024;
|
|
9
9
|
export declare const EXPRESSION_MIN_LENGTH = 0;
|
|
10
|
-
export declare const TRANSLATION_LANGUAGE_ENUM: ["en", "fr", "de", "es", "it", "pt", "pt-br", "ru", "ja", "zh", "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"];
|
|
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_PROVIDER_ENUM: ["github", "gitlab", "github-legacy"];
|
|
12
12
|
export declare const MEMBER_ROLE_ENUM: ["admin", "create", "edit", "review", "comment", "read"];
|
|
13
13
|
export declare const ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
|
|
14
14
|
export declare const ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
|
|
15
15
|
export declare const ICON_MAX_LENGTH = 50;
|
|
16
|
-
export declare const DOCUMENT_TEXT_COLOR_ENUM: ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
|
|
16
|
+
export declare const DOCUMENT_TEXT_COLOR_ENUM: ["default", "green", "blue", "red", "orange", "yellow", "purple", "pink", "violet", "cyan", "$primary", "$info", "$success", "$warning", "$danger", "$tint"];
|
|
17
17
|
export declare const TEXT_ALIGNMENT_ENUM: ["start", "center", "end"];
|
|
18
18
|
export declare const CARDS_IMAGE_OBJECT_FIT_ENUM: ["contain", "fill", "cover"];
|
|
19
19
|
export declare const VERTICAL_ALIGNMENT_ENUM: ["top", "middle", "bottom"];
|
|
@@ -188,6 +188,8 @@ export declare const CUSTOM_HOSTNAME_ERROR_STATUS_ENUM: ["invalid_domain", "inte
|
|
|
188
188
|
export declare const CLOUDFLARE_HOSTNAME_STATUS_ENUM: ["pending", "active", "blocked", "moved", "deleted"];
|
|
189
189
|
export declare const CLOUDFLARE_HOSTNAME_TLSSTATUS_ENUM: ["initializing", "pending_validation", "pending_issuance", "pending_deployment", "active", "pending_deletion", "pending_cleanup", "deleted"];
|
|
190
190
|
export declare const CLOUDFLARE_HOSTNAME_TLSVALIDATION_METHOD_ENUM: ["http", "txt", "email"];
|
|
191
|
+
export declare const GIT_SYNC_INSTALLATION_PROVIDER_ENUM: ["github", "gitlab"];
|
|
192
|
+
export declare const GIT_SYNC_INSTALLATION_PRIORITY_ENUM: ["git", "gitbook"];
|
|
191
193
|
export declare const SHA256_MAX_LENGTH = 64;
|
|
192
194
|
export declare const SHA256_MIN_LENGTH = 64;
|
|
193
195
|
export declare const GIT_BOOK_USERS_ENUM: ["gitbook:agent"];
|
package/dist/index.cjs
CHANGED
|
@@ -307,6 +307,8 @@ __export(src_exports, {
|
|
|
307
307
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
308
308
|
GIT_BOOK_USERS_ENUM: () => GIT_BOOK_USERS_ENUM,
|
|
309
309
|
GIT_HUB_REPOSITORY_PATTERN_PATTERN: () => GIT_HUB_REPOSITORY_PATTERN_PATTERN,
|
|
310
|
+
GIT_SYNC_INSTALLATION_PRIORITY_ENUM: () => GIT_SYNC_INSTALLATION_PRIORITY_ENUM,
|
|
311
|
+
GIT_SYNC_INSTALLATION_PROVIDER_ENUM: () => GIT_SYNC_INSTALLATION_PROVIDER_ENUM,
|
|
310
312
|
GIT_SYNC_OPERATION_DIRECTION_ENUM: () => GIT_SYNC_OPERATION_DIRECTION_ENUM,
|
|
311
313
|
GIT_SYNC_OPERATION_STAGE_ENUM: () => GIT_SYNC_OPERATION_STAGE_ENUM,
|
|
312
314
|
GIT_SYNC_OPERATION_STATE_ENUM: () => GIT_SYNC_OPERATION_STATE_ENUM,
|
|
@@ -314,6 +316,8 @@ __export(src_exports, {
|
|
|
314
316
|
GitBookAPI: () => GitBookAPI,
|
|
315
317
|
GitBookAPIError: () => GitBookAPIError,
|
|
316
318
|
GitBookUsers: () => GitBookUsers,
|
|
319
|
+
GitSyncInstallationPriority: () => GitSyncInstallationPriority,
|
|
320
|
+
GitSyncInstallationProvider: () => GitSyncInstallationProvider,
|
|
317
321
|
GitSyncOperationDirection: () => GitSyncOperationDirection,
|
|
318
322
|
GitSyncOperationStage: () => GitSyncOperationStage,
|
|
319
323
|
GitSyncOperationState: () => GitSyncOperationState,
|
|
@@ -509,7 +513,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
509
513
|
|
|
510
514
|
// package.json
|
|
511
515
|
var name = "@gitbook/api";
|
|
512
|
-
var version = "0.
|
|
516
|
+
var version = "0.179.0";
|
|
513
517
|
|
|
514
518
|
// src/client.ts
|
|
515
519
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -693,6 +697,16 @@ var GitBookUsers = /* @__PURE__ */ ((GitBookUsers2) => {
|
|
|
693
697
|
GitBookUsers2["GitbookAgent"] = "gitbook:agent";
|
|
694
698
|
return GitBookUsers2;
|
|
695
699
|
})(GitBookUsers || {});
|
|
700
|
+
var GitSyncInstallationPriority = /* @__PURE__ */ ((GitSyncInstallationPriority2) => {
|
|
701
|
+
GitSyncInstallationPriority2["Git"] = "git";
|
|
702
|
+
GitSyncInstallationPriority2["Gitbook"] = "gitbook";
|
|
703
|
+
return GitSyncInstallationPriority2;
|
|
704
|
+
})(GitSyncInstallationPriority || {});
|
|
705
|
+
var GitSyncInstallationProvider = /* @__PURE__ */ ((GitSyncInstallationProvider2) => {
|
|
706
|
+
GitSyncInstallationProvider2["Github"] = "github";
|
|
707
|
+
GitSyncInstallationProvider2["Gitlab"] = "gitlab";
|
|
708
|
+
return GitSyncInstallationProvider2;
|
|
709
|
+
})(GitSyncInstallationProvider || {});
|
|
696
710
|
var CloudflareHostnameTLSValidationMethod = /* @__PURE__ */ ((CloudflareHostnameTLSValidationMethod2) => {
|
|
697
711
|
CloudflareHostnameTLSValidationMethod2["Http"] = "http";
|
|
698
712
|
CloudflareHostnameTLSValidationMethod2["Txt"] = "txt";
|
|
@@ -1526,11 +1540,15 @@ var DocumentTextColor = /* @__PURE__ */ ((DocumentTextColor2) => {
|
|
|
1526
1540
|
DocumentTextColor2["Orange"] = "orange";
|
|
1527
1541
|
DocumentTextColor2["Yellow"] = "yellow";
|
|
1528
1542
|
DocumentTextColor2["Purple"] = "purple";
|
|
1543
|
+
DocumentTextColor2["Pink"] = "pink";
|
|
1544
|
+
DocumentTextColor2["Violet"] = "violet";
|
|
1545
|
+
DocumentTextColor2["Cyan"] = "cyan";
|
|
1529
1546
|
DocumentTextColor2["Primary"] = "$primary";
|
|
1530
1547
|
DocumentTextColor2["Info"] = "$info";
|
|
1531
1548
|
DocumentTextColor2["Success"] = "$success";
|
|
1532
1549
|
DocumentTextColor2["Warning"] = "$warning";
|
|
1533
1550
|
DocumentTextColor2["Danger"] = "$danger";
|
|
1551
|
+
DocumentTextColor2["Tint"] = "$tint";
|
|
1534
1552
|
return DocumentTextColor2;
|
|
1535
1553
|
})(DocumentTextColor || {});
|
|
1536
1554
|
var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
|
|
@@ -1559,6 +1577,7 @@ var TranslationLanguage = /* @__PURE__ */ ((TranslationLanguage2) => {
|
|
|
1559
1577
|
TranslationLanguage2["Ru"] = "ru";
|
|
1560
1578
|
TranslationLanguage2["Ja"] = "ja";
|
|
1561
1579
|
TranslationLanguage2["Zh"] = "zh";
|
|
1580
|
+
TranslationLanguage2["ZhTw"] = "zh-tw";
|
|
1562
1581
|
TranslationLanguage2["Yue"] = "yue";
|
|
1563
1582
|
TranslationLanguage2["Ko"] = "ko";
|
|
1564
1583
|
TranslationLanguage2["Ar"] = "ar";
|
|
@@ -4539,6 +4558,60 @@ var Api = class extends HttpClient {
|
|
|
4539
4558
|
...params
|
|
4540
4559
|
})
|
|
4541
4560
|
};
|
|
4561
|
+
git = {
|
|
4562
|
+
installGitSyncProviderOnTarget: (data, params = {}) => this.request({
|
|
4563
|
+
path: `/git/installations`,
|
|
4564
|
+
method: "POST",
|
|
4565
|
+
body: data,
|
|
4566
|
+
secure: true,
|
|
4567
|
+
type: "application/json" /* Json */,
|
|
4568
|
+
format: "json",
|
|
4569
|
+
...params
|
|
4570
|
+
}),
|
|
4571
|
+
updateGitSyncInstallationById: (installationId, data, params = {}) => this.request({
|
|
4572
|
+
path: `/git/installations/${installationId}`,
|
|
4573
|
+
method: "PATCH",
|
|
4574
|
+
body: data,
|
|
4575
|
+
secure: true,
|
|
4576
|
+
type: "application/json" /* Json */,
|
|
4577
|
+
format: "json",
|
|
4578
|
+
...params
|
|
4579
|
+
}),
|
|
4580
|
+
uninstallGitSyncInstallation: (installationId, params = {}) => this.request({
|
|
4581
|
+
path: `/git/installations/${installationId}`,
|
|
4582
|
+
method: "DELETE",
|
|
4583
|
+
secure: true,
|
|
4584
|
+
...params
|
|
4585
|
+
}),
|
|
4586
|
+
listGitHubRepositoriesForGitSyncInstallation: (installationId, params = {}) => this.request({
|
|
4587
|
+
path: `/git/installations/${installationId}/github/repos`,
|
|
4588
|
+
method: "GET",
|
|
4589
|
+
secure: true,
|
|
4590
|
+
format: "json",
|
|
4591
|
+
...params
|
|
4592
|
+
}),
|
|
4593
|
+
listGitHubRepoBranchesForGitSyncInstallation: (installationId, accountName, repositoryName, params = {}) => this.request({
|
|
4594
|
+
path: `/git/installations/${installationId}/github/repos/${accountName}/${repositoryName}/branches`,
|
|
4595
|
+
method: "GET",
|
|
4596
|
+
secure: true,
|
|
4597
|
+
format: "json",
|
|
4598
|
+
...params
|
|
4599
|
+
}),
|
|
4600
|
+
listGitLabProjectsForGitSyncInstallation: (installationId, params = {}) => this.request({
|
|
4601
|
+
path: `/git/installations/${installationId}/gitlab/projects`,
|
|
4602
|
+
method: "GET",
|
|
4603
|
+
secure: true,
|
|
4604
|
+
format: "json",
|
|
4605
|
+
...params
|
|
4606
|
+
}),
|
|
4607
|
+
listGitLabProjectBranchesForGitSyncInstallation: (installationId, projectId, params = {}) => this.request({
|
|
4608
|
+
path: `/git/installations/${installationId}/gitlab/projects/${projectId}/branches`,
|
|
4609
|
+
method: "GET",
|
|
4610
|
+
secure: true,
|
|
4611
|
+
format: "json",
|
|
4612
|
+
...params
|
|
4613
|
+
})
|
|
4614
|
+
};
|
|
4542
4615
|
};
|
|
4543
4616
|
|
|
4544
4617
|
// src/GitBookAPIError.ts
|
|
@@ -4566,13 +4639,13 @@ var CONTENT_VISIBILITY_ENUM = ["public", "unlisted", "share-link", "visitor-auth
|
|
|
4566
4639
|
var SPACE_EDIT_MODE_ENUM = ["live", "locked"];
|
|
4567
4640
|
var EXPRESSION_MAX_LENGTH = 1024;
|
|
4568
4641
|
var EXPRESSION_MIN_LENGTH = 0;
|
|
4569
|
-
var TRANSLATION_LANGUAGE_ENUM = ["en", "fr", "de", "es", "it", "pt", "pt-br", "ru", "ja", "zh", "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"];
|
|
4642
|
+
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"];
|
|
4570
4643
|
var GIT_SYNC_PROVIDER_ENUM = ["github", "gitlab", "github-legacy"];
|
|
4571
4644
|
var MEMBER_ROLE_ENUM = ["admin", "create", "edit", "review", "comment", "read"];
|
|
4572
4645
|
var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
|
|
4573
4646
|
var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
|
|
4574
4647
|
var ICON_MAX_LENGTH = 50;
|
|
4575
|
-
var DOCUMENT_TEXT_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
|
|
4648
|
+
var DOCUMENT_TEXT_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "pink", "violet", "cyan", "$primary", "$info", "$success", "$warning", "$danger", "$tint"];
|
|
4576
4649
|
var TEXT_ALIGNMENT_ENUM = ["start", "center", "end"];
|
|
4577
4650
|
var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
|
|
4578
4651
|
var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
|
|
@@ -4747,6 +4820,8 @@ var CUSTOM_HOSTNAME_ERROR_STATUS_ENUM = ["invalid_domain", "internal_error"];
|
|
|
4747
4820
|
var CLOUDFLARE_HOSTNAME_STATUS_ENUM = ["pending", "active", "blocked", "moved", "deleted"];
|
|
4748
4821
|
var CLOUDFLARE_HOSTNAME_TLSSTATUS_ENUM = ["initializing", "pending_validation", "pending_issuance", "pending_deployment", "active", "pending_deletion", "pending_cleanup", "deleted"];
|
|
4749
4822
|
var CLOUDFLARE_HOSTNAME_TLSVALIDATION_METHOD_ENUM = ["http", "txt", "email"];
|
|
4823
|
+
var GIT_SYNC_INSTALLATION_PROVIDER_ENUM = ["github", "gitlab"];
|
|
4824
|
+
var GIT_SYNC_INSTALLATION_PRIORITY_ENUM = ["git", "gitbook"];
|
|
4750
4825
|
var SHA256_MAX_LENGTH = 64;
|
|
4751
4826
|
var SHA256_MIN_LENGTH = 64;
|
|
4752
4827
|
var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
|
|
@@ -4958,6 +5033,8 @@ var GitBookAPI = class extends Api {
|
|
|
4958
5033
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
4959
5034
|
GIT_BOOK_USERS_ENUM,
|
|
4960
5035
|
GIT_HUB_REPOSITORY_PATTERN_PATTERN,
|
|
5036
|
+
GIT_SYNC_INSTALLATION_PRIORITY_ENUM,
|
|
5037
|
+
GIT_SYNC_INSTALLATION_PROVIDER_ENUM,
|
|
4961
5038
|
GIT_SYNC_OPERATION_DIRECTION_ENUM,
|
|
4962
5039
|
GIT_SYNC_OPERATION_STAGE_ENUM,
|
|
4963
5040
|
GIT_SYNC_OPERATION_STATE_ENUM,
|
|
@@ -4965,6 +5042,8 @@ var GitBookAPI = class extends Api {
|
|
|
4965
5042
|
GitBookAPI,
|
|
4966
5043
|
GitBookAPIError,
|
|
4967
5044
|
GitBookUsers,
|
|
5045
|
+
GitSyncInstallationPriority,
|
|
5046
|
+
GitSyncInstallationProvider,
|
|
4968
5047
|
GitSyncOperationDirection,
|
|
4969
5048
|
GitSyncOperationStage,
|
|
4970
5049
|
GitSyncOperationState,
|