@gitbook/api 0.177.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 +301 -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 +766 -20
- package/spec/openapi.yaml +484 -13
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.179.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -356,6 +356,16 @@ var GitBookUsers = /* @__PURE__ */ ((GitBookUsers2) => {
|
|
|
356
356
|
GitBookUsers2["GitbookAgent"] = "gitbook:agent";
|
|
357
357
|
return GitBookUsers2;
|
|
358
358
|
})(GitBookUsers || {});
|
|
359
|
+
var GitSyncInstallationPriority = /* @__PURE__ */ ((GitSyncInstallationPriority2) => {
|
|
360
|
+
GitSyncInstallationPriority2["Git"] = "git";
|
|
361
|
+
GitSyncInstallationPriority2["Gitbook"] = "gitbook";
|
|
362
|
+
return GitSyncInstallationPriority2;
|
|
363
|
+
})(GitSyncInstallationPriority || {});
|
|
364
|
+
var GitSyncInstallationProvider = /* @__PURE__ */ ((GitSyncInstallationProvider2) => {
|
|
365
|
+
GitSyncInstallationProvider2["Github"] = "github";
|
|
366
|
+
GitSyncInstallationProvider2["Gitlab"] = "gitlab";
|
|
367
|
+
return GitSyncInstallationProvider2;
|
|
368
|
+
})(GitSyncInstallationProvider || {});
|
|
359
369
|
var CloudflareHostnameTLSValidationMethod = /* @__PURE__ */ ((CloudflareHostnameTLSValidationMethod2) => {
|
|
360
370
|
CloudflareHostnameTLSValidationMethod2["Http"] = "http";
|
|
361
371
|
CloudflareHostnameTLSValidationMethod2["Txt"] = "txt";
|
|
@@ -1189,11 +1199,15 @@ var DocumentTextColor = /* @__PURE__ */ ((DocumentTextColor2) => {
|
|
|
1189
1199
|
DocumentTextColor2["Orange"] = "orange";
|
|
1190
1200
|
DocumentTextColor2["Yellow"] = "yellow";
|
|
1191
1201
|
DocumentTextColor2["Purple"] = "purple";
|
|
1202
|
+
DocumentTextColor2["Pink"] = "pink";
|
|
1203
|
+
DocumentTextColor2["Violet"] = "violet";
|
|
1204
|
+
DocumentTextColor2["Cyan"] = "cyan";
|
|
1192
1205
|
DocumentTextColor2["Primary"] = "$primary";
|
|
1193
1206
|
DocumentTextColor2["Info"] = "$info";
|
|
1194
1207
|
DocumentTextColor2["Success"] = "$success";
|
|
1195
1208
|
DocumentTextColor2["Warning"] = "$warning";
|
|
1196
1209
|
DocumentTextColor2["Danger"] = "$danger";
|
|
1210
|
+
DocumentTextColor2["Tint"] = "$tint";
|
|
1197
1211
|
return DocumentTextColor2;
|
|
1198
1212
|
})(DocumentTextColor || {});
|
|
1199
1213
|
var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
|
|
@@ -1222,6 +1236,7 @@ var TranslationLanguage = /* @__PURE__ */ ((TranslationLanguage2) => {
|
|
|
1222
1236
|
TranslationLanguage2["Ru"] = "ru";
|
|
1223
1237
|
TranslationLanguage2["Ja"] = "ja";
|
|
1224
1238
|
TranslationLanguage2["Zh"] = "zh";
|
|
1239
|
+
TranslationLanguage2["ZhTw"] = "zh-tw";
|
|
1225
1240
|
TranslationLanguage2["Yue"] = "yue";
|
|
1226
1241
|
TranslationLanguage2["Ko"] = "ko";
|
|
1227
1242
|
TranslationLanguage2["Ar"] = "ar";
|
|
@@ -4202,6 +4217,60 @@ var Api = class extends HttpClient {
|
|
|
4202
4217
|
...params
|
|
4203
4218
|
})
|
|
4204
4219
|
};
|
|
4220
|
+
git = {
|
|
4221
|
+
installGitSyncProviderOnTarget: (data, params = {}) => this.request({
|
|
4222
|
+
path: `/git/installations`,
|
|
4223
|
+
method: "POST",
|
|
4224
|
+
body: data,
|
|
4225
|
+
secure: true,
|
|
4226
|
+
type: "application/json" /* Json */,
|
|
4227
|
+
format: "json",
|
|
4228
|
+
...params
|
|
4229
|
+
}),
|
|
4230
|
+
updateGitSyncInstallationById: (installationId, data, params = {}) => this.request({
|
|
4231
|
+
path: `/git/installations/${installationId}`,
|
|
4232
|
+
method: "PATCH",
|
|
4233
|
+
body: data,
|
|
4234
|
+
secure: true,
|
|
4235
|
+
type: "application/json" /* Json */,
|
|
4236
|
+
format: "json",
|
|
4237
|
+
...params
|
|
4238
|
+
}),
|
|
4239
|
+
uninstallGitSyncInstallation: (installationId, params = {}) => this.request({
|
|
4240
|
+
path: `/git/installations/${installationId}`,
|
|
4241
|
+
method: "DELETE",
|
|
4242
|
+
secure: true,
|
|
4243
|
+
...params
|
|
4244
|
+
}),
|
|
4245
|
+
listGitHubRepositoriesForGitSyncInstallation: (installationId, params = {}) => this.request({
|
|
4246
|
+
path: `/git/installations/${installationId}/github/repos`,
|
|
4247
|
+
method: "GET",
|
|
4248
|
+
secure: true,
|
|
4249
|
+
format: "json",
|
|
4250
|
+
...params
|
|
4251
|
+
}),
|
|
4252
|
+
listGitHubRepoBranchesForGitSyncInstallation: (installationId, accountName, repositoryName, params = {}) => this.request({
|
|
4253
|
+
path: `/git/installations/${installationId}/github/repos/${accountName}/${repositoryName}/branches`,
|
|
4254
|
+
method: "GET",
|
|
4255
|
+
secure: true,
|
|
4256
|
+
format: "json",
|
|
4257
|
+
...params
|
|
4258
|
+
}),
|
|
4259
|
+
listGitLabProjectsForGitSyncInstallation: (installationId, params = {}) => this.request({
|
|
4260
|
+
path: `/git/installations/${installationId}/gitlab/projects`,
|
|
4261
|
+
method: "GET",
|
|
4262
|
+
secure: true,
|
|
4263
|
+
format: "json",
|
|
4264
|
+
...params
|
|
4265
|
+
}),
|
|
4266
|
+
listGitLabProjectBranchesForGitSyncInstallation: (installationId, projectId, params = {}) => this.request({
|
|
4267
|
+
path: `/git/installations/${installationId}/gitlab/projects/${projectId}/branches`,
|
|
4268
|
+
method: "GET",
|
|
4269
|
+
secure: true,
|
|
4270
|
+
format: "json",
|
|
4271
|
+
...params
|
|
4272
|
+
})
|
|
4273
|
+
};
|
|
4205
4274
|
};
|
|
4206
4275
|
|
|
4207
4276
|
// src/GitBookAPIError.ts
|
|
@@ -4229,13 +4298,13 @@ var CONTENT_VISIBILITY_ENUM = ["public", "unlisted", "share-link", "visitor-auth
|
|
|
4229
4298
|
var SPACE_EDIT_MODE_ENUM = ["live", "locked"];
|
|
4230
4299
|
var EXPRESSION_MAX_LENGTH = 1024;
|
|
4231
4300
|
var EXPRESSION_MIN_LENGTH = 0;
|
|
4232
|
-
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"];
|
|
4301
|
+
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"];
|
|
4233
4302
|
var GIT_SYNC_PROVIDER_ENUM = ["github", "gitlab", "github-legacy"];
|
|
4234
4303
|
var MEMBER_ROLE_ENUM = ["admin", "create", "edit", "review", "comment", "read"];
|
|
4235
4304
|
var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
|
|
4236
4305
|
var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
|
|
4237
4306
|
var ICON_MAX_LENGTH = 50;
|
|
4238
|
-
var DOCUMENT_TEXT_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "$primary", "$info", "$success", "$warning", "$danger"];
|
|
4307
|
+
var DOCUMENT_TEXT_COLOR_ENUM = ["default", "green", "blue", "red", "orange", "yellow", "purple", "pink", "violet", "cyan", "$primary", "$info", "$success", "$warning", "$danger", "$tint"];
|
|
4239
4308
|
var TEXT_ALIGNMENT_ENUM = ["start", "center", "end"];
|
|
4240
4309
|
var CARDS_IMAGE_OBJECT_FIT_ENUM = ["contain", "fill", "cover"];
|
|
4241
4310
|
var VERTICAL_ALIGNMENT_ENUM = ["top", "middle", "bottom"];
|
|
@@ -4410,6 +4479,8 @@ var CUSTOM_HOSTNAME_ERROR_STATUS_ENUM = ["invalid_domain", "internal_error"];
|
|
|
4410
4479
|
var CLOUDFLARE_HOSTNAME_STATUS_ENUM = ["pending", "active", "blocked", "moved", "deleted"];
|
|
4411
4480
|
var CLOUDFLARE_HOSTNAME_TLSSTATUS_ENUM = ["initializing", "pending_validation", "pending_issuance", "pending_deployment", "active", "pending_deletion", "pending_cleanup", "deleted"];
|
|
4412
4481
|
var CLOUDFLARE_HOSTNAME_TLSVALIDATION_METHOD_ENUM = ["http", "txt", "email"];
|
|
4482
|
+
var GIT_SYNC_INSTALLATION_PROVIDER_ENUM = ["github", "gitlab"];
|
|
4483
|
+
var GIT_SYNC_INSTALLATION_PRIORITY_ENUM = ["git", "gitbook"];
|
|
4413
4484
|
var SHA256_MAX_LENGTH = 64;
|
|
4414
4485
|
var SHA256_MIN_LENGTH = 64;
|
|
4415
4486
|
var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
|
|
@@ -4620,6 +4691,8 @@ export {
|
|
|
4620
4691
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
4621
4692
|
GIT_BOOK_USERS_ENUM,
|
|
4622
4693
|
GIT_HUB_REPOSITORY_PATTERN_PATTERN,
|
|
4694
|
+
GIT_SYNC_INSTALLATION_PRIORITY_ENUM,
|
|
4695
|
+
GIT_SYNC_INSTALLATION_PROVIDER_ENUM,
|
|
4623
4696
|
GIT_SYNC_OPERATION_DIRECTION_ENUM,
|
|
4624
4697
|
GIT_SYNC_OPERATION_STAGE_ENUM,
|
|
4625
4698
|
GIT_SYNC_OPERATION_STATE_ENUM,
|
|
@@ -4627,6 +4700,8 @@ export {
|
|
|
4627
4700
|
GitBookAPI,
|
|
4628
4701
|
GitBookAPIError,
|
|
4629
4702
|
GitBookUsers,
|
|
4703
|
+
GitSyncInstallationPriority,
|
|
4704
|
+
GitSyncInstallationProvider,
|
|
4630
4705
|
GitSyncOperationDirection,
|
|
4631
4706
|
GitSyncOperationStage,
|
|
4632
4707
|
GitSyncOperationState,
|