@gitbook/api 0.34.0 → 0.36.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 +1148 -190
- package/dist/index.cjs +282 -12
- package/dist/index.js +275 -12
- package/package.json +1 -1
- package/spec/openapi.json +7155 -4453
- package/spec/openapi.yaml +2275 -602
package/dist/index.cjs
CHANGED
|
@@ -192,9 +192,13 @@ __export(src_exports, {
|
|
|
192
192
|
ContentAuditRelationStatus: () => ContentAuditRelationStatus,
|
|
193
193
|
ContentAuditRelationType: () => ContentAuditRelationType,
|
|
194
194
|
ContentKitIcon: () => ContentKitIcon,
|
|
195
|
+
ContentReferenceStatus: () => ContentReferenceStatus,
|
|
195
196
|
ContentType: () => ContentType,
|
|
196
197
|
ContentVisibility: () => ContentVisibility,
|
|
197
198
|
CustomFieldType: () => CustomFieldType,
|
|
199
|
+
CustomHostnameDnsStatus: () => CustomHostnameDnsStatus,
|
|
200
|
+
CustomHostnameErrorStatus: () => CustomHostnameErrorStatus,
|
|
201
|
+
CustomHostnameSslStatus: () => CustomHostnameSslStatus,
|
|
198
202
|
CustomizationBackground: () => CustomizationBackground,
|
|
199
203
|
CustomizationCorners: () => CustomizationCorners,
|
|
200
204
|
CustomizationFont: () => CustomizationFont,
|
|
@@ -223,6 +227,9 @@ __export(src_exports, {
|
|
|
223
227
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
224
228
|
RevisionPageType: () => RevisionPageType,
|
|
225
229
|
RevisionSemanticChangeType: () => RevisionSemanticChangeType,
|
|
230
|
+
SiteSubscriptionStatus: () => SiteSubscriptionStatus,
|
|
231
|
+
SiteSubscriptionType: () => SiteSubscriptionType,
|
|
232
|
+
SiteVisibility: () => SiteVisibility,
|
|
226
233
|
SpaceBlockReason: () => SpaceBlockReason,
|
|
227
234
|
SpaceEditMode: () => SpaceEditMode,
|
|
228
235
|
TeamMemberRole: () => TeamMemberRole
|
|
@@ -231,7 +238,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
231
238
|
|
|
232
239
|
// package.json
|
|
233
240
|
var name = "@gitbook/api";
|
|
234
|
-
var version = "0.
|
|
241
|
+
var version = "0.36.0";
|
|
235
242
|
|
|
236
243
|
// src/client.ts
|
|
237
244
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -464,6 +471,12 @@ var ContentAuditRelationStatus = /* @__PURE__ */ ((ContentAuditRelationStatus2)
|
|
|
464
471
|
ContentAuditRelationStatus2["Rejected"] = "rejected";
|
|
465
472
|
return ContentAuditRelationStatus2;
|
|
466
473
|
})(ContentAuditRelationStatus || {});
|
|
474
|
+
var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
|
|
475
|
+
ContentReferenceStatus2["Ok"] = "ok";
|
|
476
|
+
ContentReferenceStatus2["Broken"] = "broken";
|
|
477
|
+
ContentReferenceStatus2["InApp"] = "in-app";
|
|
478
|
+
return ContentReferenceStatus2;
|
|
479
|
+
})(ContentReferenceStatus || {});
|
|
467
480
|
var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
|
|
468
481
|
ChangeRequestStatus2["Draft"] = "draft";
|
|
469
482
|
ChangeRequestStatus2["Open"] = "open";
|
|
@@ -501,6 +514,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
501
514
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
502
515
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
503
516
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
517
|
+
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
504
518
|
return IntegrationScope2;
|
|
505
519
|
})(IntegrationScope || {});
|
|
506
520
|
var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstallationSpaceSelection2) => {
|
|
@@ -678,6 +692,45 @@ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
|
678
692
|
PageFeedbackRating2["Good"] = "good";
|
|
679
693
|
return PageFeedbackRating2;
|
|
680
694
|
})(PageFeedbackRating || {});
|
|
695
|
+
var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
696
|
+
SiteVisibility2["Public"] = "public";
|
|
697
|
+
SiteVisibility2["Unlisted"] = "unlisted";
|
|
698
|
+
SiteVisibility2["ShareLink"] = "share-link";
|
|
699
|
+
SiteVisibility2["VisitorAuth"] = "visitor-auth";
|
|
700
|
+
SiteVisibility2["Unpublished"] = "unpublished";
|
|
701
|
+
return SiteVisibility2;
|
|
702
|
+
})(SiteVisibility || {});
|
|
703
|
+
var SiteSubscriptionStatus = /* @__PURE__ */ ((SiteSubscriptionStatus2) => {
|
|
704
|
+
SiteSubscriptionStatus2["Active"] = "active";
|
|
705
|
+
SiteSubscriptionStatus2["Inactive"] = "inactive";
|
|
706
|
+
return SiteSubscriptionStatus2;
|
|
707
|
+
})(SiteSubscriptionStatus || {});
|
|
708
|
+
var SiteSubscriptionType = /* @__PURE__ */ ((SiteSubscriptionType2) => {
|
|
709
|
+
SiteSubscriptionType2["Basic"] = "basic";
|
|
710
|
+
SiteSubscriptionType2["Premium"] = "premium";
|
|
711
|
+
return SiteSubscriptionType2;
|
|
712
|
+
})(SiteSubscriptionType || {});
|
|
713
|
+
var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
|
|
714
|
+
CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
|
|
715
|
+
CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
|
|
716
|
+
CustomHostnameDnsStatus2["DnsNoCname"] = "dns_no_cname";
|
|
717
|
+
CustomHostnameDnsStatus2["DnsCloudflareProxied"] = "dns_cloudflare_proxied";
|
|
718
|
+
CustomHostnameDnsStatus2["DnsWrongCaa"] = "dns_wrong_caa";
|
|
719
|
+
return CustomHostnameDnsStatus2;
|
|
720
|
+
})(CustomHostnameDnsStatus || {});
|
|
721
|
+
var CustomHostnameSslStatus = /* @__PURE__ */ ((CustomHostnameSslStatus2) => {
|
|
722
|
+
CustomHostnameSslStatus2["Live"] = "live";
|
|
723
|
+
CustomHostnameSslStatus2["SslUnknown"] = "ssl_unknown";
|
|
724
|
+
CustomHostnameSslStatus2["SslPending"] = "ssl_pending";
|
|
725
|
+
CustomHostnameSslStatus2["SslFailed"] = "ssl_failed";
|
|
726
|
+
CustomHostnameSslStatus2["SslRetryExpired"] = "ssl_retry_expired";
|
|
727
|
+
return CustomHostnameSslStatus2;
|
|
728
|
+
})(CustomHostnameSslStatus || {});
|
|
729
|
+
var CustomHostnameErrorStatus = /* @__PURE__ */ ((CustomHostnameErrorStatus2) => {
|
|
730
|
+
CustomHostnameErrorStatus2["InvalidDomain"] = "invalid_domain";
|
|
731
|
+
CustomHostnameErrorStatus2["InternalError"] = "internal_error";
|
|
732
|
+
return CustomHostnameErrorStatus2;
|
|
733
|
+
})(CustomHostnameErrorStatus || {});
|
|
681
734
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
682
735
|
ContentType2["Json"] = "application/json";
|
|
683
736
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -1042,6 +1095,12 @@ var Api = class extends HttpClient {
|
|
|
1042
1095
|
format: "json",
|
|
1043
1096
|
...params
|
|
1044
1097
|
}),
|
|
1098
|
+
streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
|
|
1099
|
+
path: `/spaces/${spaceId}/search/questions/stream`,
|
|
1100
|
+
method: "GET",
|
|
1101
|
+
secure: true,
|
|
1102
|
+
...params
|
|
1103
|
+
}),
|
|
1045
1104
|
importGitRepository: (spaceId, data, params = {}) => this.request({
|
|
1046
1105
|
path: `/spaces/${spaceId}/git/import`,
|
|
1047
1106
|
method: "POST",
|
|
@@ -1058,6 +1117,14 @@ var Api = class extends HttpClient {
|
|
|
1058
1117
|
type: "application/json" /* Json */,
|
|
1059
1118
|
...params
|
|
1060
1119
|
}),
|
|
1120
|
+
syncGitRepository: (spaceId, data, params = {}) => this.request({
|
|
1121
|
+
path: `/spaces/${spaceId}/git/sync`,
|
|
1122
|
+
method: "POST",
|
|
1123
|
+
body: data,
|
|
1124
|
+
secure: true,
|
|
1125
|
+
type: "application/json" /* Json */,
|
|
1126
|
+
...params
|
|
1127
|
+
}),
|
|
1061
1128
|
getSpaceGitInfo: (spaceId, params = {}) => this.request({
|
|
1062
1129
|
path: `/spaces/${spaceId}/git/info`,
|
|
1063
1130
|
method: "GET",
|
|
@@ -1096,9 +1163,10 @@ var Api = class extends HttpClient {
|
|
|
1096
1163
|
type: "application/json" /* Json */,
|
|
1097
1164
|
...params
|
|
1098
1165
|
}),
|
|
1099
|
-
getCurrentRevision: (spaceId, params = {}) => this.request({
|
|
1166
|
+
getCurrentRevision: (spaceId, query, params = {}) => this.request({
|
|
1100
1167
|
path: `/spaces/${spaceId}/content`,
|
|
1101
1168
|
method: "GET",
|
|
1169
|
+
query,
|
|
1102
1170
|
secure: true,
|
|
1103
1171
|
format: "json",
|
|
1104
1172
|
...params
|
|
@@ -1112,9 +1180,10 @@ var Api = class extends HttpClient {
|
|
|
1112
1180
|
format: "json",
|
|
1113
1181
|
...params
|
|
1114
1182
|
}),
|
|
1115
|
-
listPages: (spaceId, params = {}) => this.request({
|
|
1183
|
+
listPages: (spaceId, query, params = {}) => this.request({
|
|
1116
1184
|
path: `/spaces/${spaceId}/content/pages`,
|
|
1117
1185
|
method: "GET",
|
|
1186
|
+
query,
|
|
1118
1187
|
secure: true,
|
|
1119
1188
|
format: "json",
|
|
1120
1189
|
...params
|
|
@@ -1127,9 +1196,10 @@ var Api = class extends HttpClient {
|
|
|
1127
1196
|
format: "json",
|
|
1128
1197
|
...params
|
|
1129
1198
|
}),
|
|
1130
|
-
getFileById: (spaceId, fileId, params = {}) => this.request({
|
|
1199
|
+
getFileById: (spaceId, fileId, query, params = {}) => this.request({
|
|
1131
1200
|
path: `/spaces/${spaceId}/content/files/${fileId}`,
|
|
1132
1201
|
method: "GET",
|
|
1202
|
+
query,
|
|
1133
1203
|
secure: true,
|
|
1134
1204
|
format: "json",
|
|
1135
1205
|
...params
|
|
@@ -1248,6 +1318,14 @@ var Api = class extends HttpClient {
|
|
|
1248
1318
|
format: "json",
|
|
1249
1319
|
...params
|
|
1250
1320
|
}),
|
|
1321
|
+
listChangeRequestLinks: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1322
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/links`,
|
|
1323
|
+
method: "GET",
|
|
1324
|
+
query,
|
|
1325
|
+
secure: true,
|
|
1326
|
+
format: "json",
|
|
1327
|
+
...params
|
|
1328
|
+
}),
|
|
1251
1329
|
listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1252
1330
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
|
|
1253
1331
|
method: "GET",
|
|
@@ -1336,9 +1414,10 @@ var Api = class extends HttpClient {
|
|
|
1336
1414
|
format: "json",
|
|
1337
1415
|
...params
|
|
1338
1416
|
}),
|
|
1339
|
-
getRevisionOfChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
|
|
1417
|
+
getRevisionOfChangeRequestById: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1340
1418
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
|
|
1341
1419
|
method: "GET",
|
|
1420
|
+
query,
|
|
1342
1421
|
secure: true,
|
|
1343
1422
|
format: "json",
|
|
1344
1423
|
...params
|
|
@@ -1352,9 +1431,10 @@ var Api = class extends HttpClient {
|
|
|
1352
1431
|
format: "json",
|
|
1353
1432
|
...params
|
|
1354
1433
|
}),
|
|
1355
|
-
listPagesInChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
|
|
1434
|
+
listPagesInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1356
1435
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/pages`,
|
|
1357
1436
|
method: "GET",
|
|
1437
|
+
query,
|
|
1358
1438
|
secure: true,
|
|
1359
1439
|
format: "json",
|
|
1360
1440
|
...params
|
|
@@ -1367,9 +1447,10 @@ var Api = class extends HttpClient {
|
|
|
1367
1447
|
format: "json",
|
|
1368
1448
|
...params
|
|
1369
1449
|
}),
|
|
1370
|
-
getFileInChangeRequestById: (spaceId, changeRequestId, fileId, params = {}) => this.request({
|
|
1450
|
+
getFileInChangeRequestById: (spaceId, changeRequestId, fileId, query, params = {}) => this.request({
|
|
1371
1451
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files/${fileId}`,
|
|
1372
1452
|
method: "GET",
|
|
1453
|
+
query,
|
|
1373
1454
|
secure: true,
|
|
1374
1455
|
format: "json",
|
|
1375
1456
|
...params
|
|
@@ -1399,9 +1480,19 @@ var Api = class extends HttpClient {
|
|
|
1399
1480
|
format: "json",
|
|
1400
1481
|
...params
|
|
1401
1482
|
}),
|
|
1402
|
-
|
|
1483
|
+
touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
1484
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
|
|
1485
|
+
method: "POST",
|
|
1486
|
+
body: data,
|
|
1487
|
+
secure: true,
|
|
1488
|
+
type: "application/json" /* Json */,
|
|
1489
|
+
format: "json",
|
|
1490
|
+
...params
|
|
1491
|
+
}),
|
|
1492
|
+
getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1403
1493
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1404
1494
|
method: "GET",
|
|
1495
|
+
query,
|
|
1405
1496
|
secure: true,
|
|
1406
1497
|
format: "json",
|
|
1407
1498
|
...params
|
|
@@ -1414,9 +1505,10 @@ var Api = class extends HttpClient {
|
|
|
1414
1505
|
format: "json",
|
|
1415
1506
|
...params
|
|
1416
1507
|
}),
|
|
1417
|
-
listPagesInRevisionById: (spaceId, revisionId, params = {}) => this.request({
|
|
1508
|
+
listPagesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1418
1509
|
path: `/spaces/${spaceId}/revisions/${revisionId}/pages`,
|
|
1419
1510
|
method: "GET",
|
|
1511
|
+
query,
|
|
1420
1512
|
secure: true,
|
|
1421
1513
|
format: "json",
|
|
1422
1514
|
...params
|
|
@@ -1429,9 +1521,10 @@ var Api = class extends HttpClient {
|
|
|
1429
1521
|
format: "json",
|
|
1430
1522
|
...params
|
|
1431
1523
|
}),
|
|
1432
|
-
getFileInRevisionById: (spaceId, revisionId, fileId, params = {}) => this.request({
|
|
1524
|
+
getFileInRevisionById: (spaceId, revisionId, fileId, query, params = {}) => this.request({
|
|
1433
1525
|
path: `/spaces/${spaceId}/revisions/${revisionId}/files/${fileId}`,
|
|
1434
1526
|
method: "GET",
|
|
1527
|
+
query,
|
|
1435
1528
|
secure: true,
|
|
1436
1529
|
format: "json",
|
|
1437
1530
|
...params
|
|
@@ -1572,6 +1665,21 @@ var Api = class extends HttpClient {
|
|
|
1572
1665
|
format: "json",
|
|
1573
1666
|
...params
|
|
1574
1667
|
}),
|
|
1668
|
+
getSpacePublishingPreviewById: (spaceId, params = {}) => this.request({
|
|
1669
|
+
path: `/spaces/${spaceId}/publishing/preview`,
|
|
1670
|
+
method: "GET",
|
|
1671
|
+
secure: true,
|
|
1672
|
+
format: "json",
|
|
1673
|
+
...params
|
|
1674
|
+
}),
|
|
1675
|
+
listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
|
|
1676
|
+
path: `/spaces/${spaceId}/integrations`,
|
|
1677
|
+
method: "GET",
|
|
1678
|
+
query,
|
|
1679
|
+
secure: true,
|
|
1680
|
+
format: "json",
|
|
1681
|
+
...params
|
|
1682
|
+
}),
|
|
1575
1683
|
listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request({
|
|
1576
1684
|
path: `/spaces/${spaceId}/integration-blocks`,
|
|
1577
1685
|
method: "GET",
|
|
@@ -2127,8 +2235,17 @@ var Api = class extends HttpClient {
|
|
|
2127
2235
|
format: "json",
|
|
2128
2236
|
...params
|
|
2129
2237
|
}),
|
|
2238
|
+
createOrganizationInvite: (organizationId, data, params = {}) => this.request({
|
|
2239
|
+
path: `/orgs/${organizationId}/link-invites`,
|
|
2240
|
+
method: "POST",
|
|
2241
|
+
body: data,
|
|
2242
|
+
secure: true,
|
|
2243
|
+
type: "application/json" /* Json */,
|
|
2244
|
+
format: "json",
|
|
2245
|
+
...params
|
|
2246
|
+
}),
|
|
2130
2247
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2131
|
-
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
2248
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2132
2249
|
method: "PATCH",
|
|
2133
2250
|
body: data,
|
|
2134
2251
|
secure: true,
|
|
@@ -2137,7 +2254,7 @@ var Api = class extends HttpClient {
|
|
|
2137
2254
|
...params
|
|
2138
2255
|
}),
|
|
2139
2256
|
deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
|
|
2140
|
-
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
2257
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2141
2258
|
method: "DELETE",
|
|
2142
2259
|
secure: true,
|
|
2143
2260
|
...params
|
|
@@ -2452,6 +2569,30 @@ var Api = class extends HttpClient {
|
|
|
2452
2569
|
format: "json",
|
|
2453
2570
|
...params
|
|
2454
2571
|
}),
|
|
2572
|
+
createSyncedBlock: (organizationId, data, params = {}) => this.request({
|
|
2573
|
+
path: `/orgs/${organizationId}/synced-blocks`,
|
|
2574
|
+
method: "POST",
|
|
2575
|
+
body: data,
|
|
2576
|
+
secure: true,
|
|
2577
|
+
type: "application/json" /* Json */,
|
|
2578
|
+
format: "json",
|
|
2579
|
+
...params
|
|
2580
|
+
}),
|
|
2581
|
+
getSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2582
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2583
|
+
method: "GET",
|
|
2584
|
+
secure: true,
|
|
2585
|
+
format: "json",
|
|
2586
|
+
...params
|
|
2587
|
+
}),
|
|
2588
|
+
updateSyncedBlock: (organizationId, syncedBlockId, data, params = {}) => this.request({
|
|
2589
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2590
|
+
method: "PUT",
|
|
2591
|
+
body: data,
|
|
2592
|
+
secure: true,
|
|
2593
|
+
type: "application/json" /* Json */,
|
|
2594
|
+
...params
|
|
2595
|
+
}),
|
|
2455
2596
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2456
2597
|
path: `/orgs/${organizationId}/ask`,
|
|
2457
2598
|
method: "POST",
|
|
@@ -2469,6 +2610,12 @@ var Api = class extends HttpClient {
|
|
|
2469
2610
|
format: "json",
|
|
2470
2611
|
...params
|
|
2471
2612
|
}),
|
|
2613
|
+
streamRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.streamRequest({
|
|
2614
|
+
path: `/orgs/${organizationId}/ask/questions/stream`,
|
|
2615
|
+
method: "GET",
|
|
2616
|
+
secure: true,
|
|
2617
|
+
...params
|
|
2618
|
+
}),
|
|
2472
2619
|
streamAskInOrganization: (organizationId, query, params = {}) => this.streamRequest({
|
|
2473
2620
|
path: `/orgs/${organizationId}/ask/stream`,
|
|
2474
2621
|
method: "GET",
|
|
@@ -2507,6 +2654,122 @@ var Api = class extends HttpClient {
|
|
|
2507
2654
|
secure: true,
|
|
2508
2655
|
format: "json",
|
|
2509
2656
|
...params
|
|
2657
|
+
}),
|
|
2658
|
+
listSites: (organizationId, query, params = {}) => this.request({
|
|
2659
|
+
path: `/orgs/${organizationId}/sites`,
|
|
2660
|
+
method: "GET",
|
|
2661
|
+
query,
|
|
2662
|
+
secure: true,
|
|
2663
|
+
format: "json",
|
|
2664
|
+
...params
|
|
2665
|
+
}),
|
|
2666
|
+
createSite: (organizationId, data, params = {}) => this.request({
|
|
2667
|
+
path: `/orgs/${organizationId}/sites`,
|
|
2668
|
+
method: "POST",
|
|
2669
|
+
body: data,
|
|
2670
|
+
secure: true,
|
|
2671
|
+
type: "application/json" /* Json */,
|
|
2672
|
+
format: "json",
|
|
2673
|
+
...params
|
|
2674
|
+
}),
|
|
2675
|
+
getSiteById: (organizationId, siteId, params = {}) => this.request({
|
|
2676
|
+
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2677
|
+
method: "GET",
|
|
2678
|
+
secure: true,
|
|
2679
|
+
format: "json",
|
|
2680
|
+
...params
|
|
2681
|
+
}),
|
|
2682
|
+
updateSiteById: (organizationId, siteId, data, params = {}) => this.request({
|
|
2683
|
+
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2684
|
+
method: "PATCH",
|
|
2685
|
+
body: data,
|
|
2686
|
+
secure: true,
|
|
2687
|
+
type: "application/json" /* Json */,
|
|
2688
|
+
format: "json",
|
|
2689
|
+
...params
|
|
2690
|
+
}),
|
|
2691
|
+
deleteSiteById: (organizationId, siteId, params = {}) => this.request({
|
|
2692
|
+
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2693
|
+
method: "DELETE",
|
|
2694
|
+
secure: true,
|
|
2695
|
+
...params
|
|
2696
|
+
}),
|
|
2697
|
+
getSitePublishingAuthSettings: (organizationId, siteId, params = {}) => this.request({
|
|
2698
|
+
path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
|
|
2699
|
+
method: "GET",
|
|
2700
|
+
secure: true,
|
|
2701
|
+
format: "json",
|
|
2702
|
+
...params
|
|
2703
|
+
}),
|
|
2704
|
+
addSpaceToSite: (organizationId, siteId, data, params = {}) => this.request({
|
|
2705
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces`,
|
|
2706
|
+
method: "POST",
|
|
2707
|
+
body: data,
|
|
2708
|
+
secure: true,
|
|
2709
|
+
type: "application/json" /* Json */,
|
|
2710
|
+
format: "json",
|
|
2711
|
+
...params
|
|
2712
|
+
}),
|
|
2713
|
+
listSiteSpaces: (organizationId, siteId, query, params = {}) => this.request({
|
|
2714
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces`,
|
|
2715
|
+
method: "GET",
|
|
2716
|
+
query,
|
|
2717
|
+
secure: true,
|
|
2718
|
+
format: "json",
|
|
2719
|
+
...params
|
|
2720
|
+
}),
|
|
2721
|
+
updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2722
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}`,
|
|
2723
|
+
method: "PATCH",
|
|
2724
|
+
body: data,
|
|
2725
|
+
secure: true,
|
|
2726
|
+
type: "application/json" /* Json */,
|
|
2727
|
+
format: "json",
|
|
2728
|
+
...params
|
|
2729
|
+
}),
|
|
2730
|
+
deleteSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
2731
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}`,
|
|
2732
|
+
method: "DELETE",
|
|
2733
|
+
secure: true,
|
|
2734
|
+
...params
|
|
2735
|
+
})
|
|
2736
|
+
};
|
|
2737
|
+
this.customHostnames = {
|
|
2738
|
+
getCustomHostname: (hostname, params = {}) => this.request({
|
|
2739
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2740
|
+
method: "GET",
|
|
2741
|
+
secure: true,
|
|
2742
|
+
format: "json",
|
|
2743
|
+
...params
|
|
2744
|
+
}),
|
|
2745
|
+
setupCustomHostname: (hostname, data, params = {}) => this.request({
|
|
2746
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2747
|
+
method: "POST",
|
|
2748
|
+
body: data,
|
|
2749
|
+
secure: true,
|
|
2750
|
+
type: "application/json" /* Json */,
|
|
2751
|
+
format: "json",
|
|
2752
|
+
...params
|
|
2753
|
+
}),
|
|
2754
|
+
dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
|
|
2755
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2756
|
+
method: "PATCH",
|
|
2757
|
+
secure: true,
|
|
2758
|
+
...params
|
|
2759
|
+
}),
|
|
2760
|
+
removeCustomHostname: (hostname, params = {}) => this.request({
|
|
2761
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2762
|
+
method: "DELETE",
|
|
2763
|
+
secure: true,
|
|
2764
|
+
...params
|
|
2765
|
+
}),
|
|
2766
|
+
testCustomHostname: (hostname, data, params = {}) => this.request({
|
|
2767
|
+
path: `/custom-hostnames/${hostname}/test`,
|
|
2768
|
+
method: "POST",
|
|
2769
|
+
body: data,
|
|
2770
|
+
secure: true,
|
|
2771
|
+
type: "application/json" /* Json */,
|
|
2772
|
+
...params
|
|
2510
2773
|
})
|
|
2511
2774
|
};
|
|
2512
2775
|
this.internal = {
|
|
@@ -2636,9 +2899,13 @@ var GitBookAPI = class extends Api {
|
|
|
2636
2899
|
ContentAuditRelationStatus,
|
|
2637
2900
|
ContentAuditRelationType,
|
|
2638
2901
|
ContentKitIcon,
|
|
2902
|
+
ContentReferenceStatus,
|
|
2639
2903
|
ContentType,
|
|
2640
2904
|
ContentVisibility,
|
|
2641
2905
|
CustomFieldType,
|
|
2906
|
+
CustomHostnameDnsStatus,
|
|
2907
|
+
CustomHostnameErrorStatus,
|
|
2908
|
+
CustomHostnameSslStatus,
|
|
2642
2909
|
CustomizationBackground,
|
|
2643
2910
|
CustomizationCorners,
|
|
2644
2911
|
CustomizationFont,
|
|
@@ -2667,6 +2934,9 @@ var GitBookAPI = class extends Api {
|
|
|
2667
2934
|
RevisionPageLayoutPreset,
|
|
2668
2935
|
RevisionPageType,
|
|
2669
2936
|
RevisionSemanticChangeType,
|
|
2937
|
+
SiteSubscriptionStatus,
|
|
2938
|
+
SiteSubscriptionType,
|
|
2939
|
+
SiteVisibility,
|
|
2670
2940
|
SpaceBlockReason,
|
|
2671
2941
|
SpaceEditMode,
|
|
2672
2942
|
TeamMemberRole
|