@gitbook/api 0.35.0 → 0.37.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 +1376 -85
- package/dist/index.cjs +417 -10
- package/dist/index.js +412 -10
- package/package.json +1 -1
- package/spec/openapi.json +4244 -945
- package/spec/openapi.yaml +2086 -149
package/dist/index.cjs
CHANGED
|
@@ -196,6 +196,9 @@ __export(src_exports, {
|
|
|
196
196
|
ContentType: () => ContentType,
|
|
197
197
|
ContentVisibility: () => ContentVisibility,
|
|
198
198
|
CustomFieldType: () => CustomFieldType,
|
|
199
|
+
CustomHostnameDnsStatus: () => CustomHostnameDnsStatus,
|
|
200
|
+
CustomHostnameErrorStatus: () => CustomHostnameErrorStatus,
|
|
201
|
+
CustomHostnameSslStatus: () => CustomHostnameSslStatus,
|
|
199
202
|
CustomizationBackground: () => CustomizationBackground,
|
|
200
203
|
CustomizationCorners: () => CustomizationCorners,
|
|
201
204
|
CustomizationFont: () => CustomizationFont,
|
|
@@ -224,6 +227,8 @@ __export(src_exports, {
|
|
|
224
227
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
225
228
|
RevisionPageType: () => RevisionPageType,
|
|
226
229
|
RevisionSemanticChangeType: () => RevisionSemanticChangeType,
|
|
230
|
+
SiteSubscriptionStatus: () => SiteSubscriptionStatus,
|
|
231
|
+
SiteSubscriptionType: () => SiteSubscriptionType,
|
|
227
232
|
SiteVisibility: () => SiteVisibility,
|
|
228
233
|
SpaceBlockReason: () => SpaceBlockReason,
|
|
229
234
|
SpaceEditMode: () => SpaceEditMode,
|
|
@@ -233,7 +238,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
233
238
|
|
|
234
239
|
// package.json
|
|
235
240
|
var name = "@gitbook/api";
|
|
236
|
-
var version = "0.
|
|
241
|
+
var version = "0.37.0";
|
|
237
242
|
|
|
238
243
|
// src/client.ts
|
|
239
244
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -467,6 +472,7 @@ var ContentAuditRelationStatus = /* @__PURE__ */ ((ContentAuditRelationStatus2)
|
|
|
467
472
|
return ContentAuditRelationStatus2;
|
|
468
473
|
})(ContentAuditRelationStatus || {});
|
|
469
474
|
var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
|
|
475
|
+
ContentReferenceStatus2["Ok"] = "ok";
|
|
470
476
|
ContentReferenceStatus2["Broken"] = "broken";
|
|
471
477
|
ContentReferenceStatus2["InApp"] = "in-app";
|
|
472
478
|
return ContentReferenceStatus2;
|
|
@@ -694,6 +700,37 @@ var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
|
694
700
|
SiteVisibility2["Unpublished"] = "unpublished";
|
|
695
701
|
return SiteVisibility2;
|
|
696
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 || {});
|
|
697
734
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
698
735
|
ContentType2["Json"] = "application/json";
|
|
699
736
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -1126,9 +1163,10 @@ var Api = class extends HttpClient {
|
|
|
1126
1163
|
type: "application/json" /* Json */,
|
|
1127
1164
|
...params
|
|
1128
1165
|
}),
|
|
1129
|
-
getCurrentRevision: (spaceId, params = {}) => this.request({
|
|
1166
|
+
getCurrentRevision: (spaceId, query, params = {}) => this.request({
|
|
1130
1167
|
path: `/spaces/${spaceId}/content`,
|
|
1131
1168
|
method: "GET",
|
|
1169
|
+
query,
|
|
1132
1170
|
secure: true,
|
|
1133
1171
|
format: "json",
|
|
1134
1172
|
...params
|
|
@@ -1142,9 +1180,10 @@ var Api = class extends HttpClient {
|
|
|
1142
1180
|
format: "json",
|
|
1143
1181
|
...params
|
|
1144
1182
|
}),
|
|
1145
|
-
listPages: (spaceId, params = {}) => this.request({
|
|
1183
|
+
listPages: (spaceId, query, params = {}) => this.request({
|
|
1146
1184
|
path: `/spaces/${spaceId}/content/pages`,
|
|
1147
1185
|
method: "GET",
|
|
1186
|
+
query,
|
|
1148
1187
|
secure: true,
|
|
1149
1188
|
format: "json",
|
|
1150
1189
|
...params
|
|
@@ -1157,9 +1196,10 @@ var Api = class extends HttpClient {
|
|
|
1157
1196
|
format: "json",
|
|
1158
1197
|
...params
|
|
1159
1198
|
}),
|
|
1160
|
-
getFileById: (spaceId, fileId, params = {}) => this.request({
|
|
1199
|
+
getFileById: (spaceId, fileId, query, params = {}) => this.request({
|
|
1161
1200
|
path: `/spaces/${spaceId}/content/files/${fileId}`,
|
|
1162
1201
|
method: "GET",
|
|
1202
|
+
query,
|
|
1163
1203
|
secure: true,
|
|
1164
1204
|
format: "json",
|
|
1165
1205
|
...params
|
|
@@ -1278,6 +1318,14 @@ var Api = class extends HttpClient {
|
|
|
1278
1318
|
format: "json",
|
|
1279
1319
|
...params
|
|
1280
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
|
+
}),
|
|
1281
1329
|
listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1282
1330
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
|
|
1283
1331
|
method: "GET",
|
|
@@ -1366,9 +1414,10 @@ var Api = class extends HttpClient {
|
|
|
1366
1414
|
format: "json",
|
|
1367
1415
|
...params
|
|
1368
1416
|
}),
|
|
1369
|
-
getRevisionOfChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
|
|
1417
|
+
getRevisionOfChangeRequestById: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1370
1418
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
|
|
1371
1419
|
method: "GET",
|
|
1420
|
+
query,
|
|
1372
1421
|
secure: true,
|
|
1373
1422
|
format: "json",
|
|
1374
1423
|
...params
|
|
@@ -1382,9 +1431,10 @@ var Api = class extends HttpClient {
|
|
|
1382
1431
|
format: "json",
|
|
1383
1432
|
...params
|
|
1384
1433
|
}),
|
|
1385
|
-
listPagesInChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
|
|
1434
|
+
listPagesInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1386
1435
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/pages`,
|
|
1387
1436
|
method: "GET",
|
|
1437
|
+
query,
|
|
1388
1438
|
secure: true,
|
|
1389
1439
|
format: "json",
|
|
1390
1440
|
...params
|
|
@@ -1397,9 +1447,10 @@ var Api = class extends HttpClient {
|
|
|
1397
1447
|
format: "json",
|
|
1398
1448
|
...params
|
|
1399
1449
|
}),
|
|
1400
|
-
getFileInChangeRequestById: (spaceId, changeRequestId, fileId, params = {}) => this.request({
|
|
1450
|
+
getFileInChangeRequestById: (spaceId, changeRequestId, fileId, query, params = {}) => this.request({
|
|
1401
1451
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files/${fileId}`,
|
|
1402
1452
|
method: "GET",
|
|
1453
|
+
query,
|
|
1403
1454
|
secure: true,
|
|
1404
1455
|
format: "json",
|
|
1405
1456
|
...params
|
|
@@ -1438,9 +1489,18 @@ var Api = class extends HttpClient {
|
|
|
1438
1489
|
format: "json",
|
|
1439
1490
|
...params
|
|
1440
1491
|
}),
|
|
1441
|
-
|
|
1492
|
+
getChangeRequestPdf: (spaceId, changeRequestId, query, params = {}) => this.request({
|
|
1493
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/pdf`,
|
|
1494
|
+
method: "GET",
|
|
1495
|
+
query,
|
|
1496
|
+
secure: true,
|
|
1497
|
+
format: "json",
|
|
1498
|
+
...params
|
|
1499
|
+
}),
|
|
1500
|
+
getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1442
1501
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1443
1502
|
method: "GET",
|
|
1503
|
+
query,
|
|
1444
1504
|
secure: true,
|
|
1445
1505
|
format: "json",
|
|
1446
1506
|
...params
|
|
@@ -1453,9 +1513,10 @@ var Api = class extends HttpClient {
|
|
|
1453
1513
|
format: "json",
|
|
1454
1514
|
...params
|
|
1455
1515
|
}),
|
|
1456
|
-
listPagesInRevisionById: (spaceId, revisionId, params = {}) => this.request({
|
|
1516
|
+
listPagesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
|
|
1457
1517
|
path: `/spaces/${spaceId}/revisions/${revisionId}/pages`,
|
|
1458
1518
|
method: "GET",
|
|
1519
|
+
query,
|
|
1459
1520
|
secure: true,
|
|
1460
1521
|
format: "json",
|
|
1461
1522
|
...params
|
|
@@ -1468,9 +1529,10 @@ var Api = class extends HttpClient {
|
|
|
1468
1529
|
format: "json",
|
|
1469
1530
|
...params
|
|
1470
1531
|
}),
|
|
1471
|
-
getFileInRevisionById: (spaceId, revisionId, fileId, params = {}) => this.request({
|
|
1532
|
+
getFileInRevisionById: (spaceId, revisionId, fileId, query, params = {}) => this.request({
|
|
1472
1533
|
path: `/spaces/${spaceId}/revisions/${revisionId}/files/${fileId}`,
|
|
1473
1534
|
method: "GET",
|
|
1535
|
+
query,
|
|
1474
1536
|
secure: true,
|
|
1475
1537
|
format: "json",
|
|
1476
1538
|
...params
|
|
@@ -1702,6 +1764,14 @@ var Api = class extends HttpClient {
|
|
|
1702
1764
|
method: "DELETE",
|
|
1703
1765
|
secure: true,
|
|
1704
1766
|
...params
|
|
1767
|
+
}),
|
|
1768
|
+
listSpaceLinks: (spaceId, query, params = {}) => this.request({
|
|
1769
|
+
path: `/spaces/${spaceId}/links`,
|
|
1770
|
+
method: "GET",
|
|
1771
|
+
query,
|
|
1772
|
+
secure: true,
|
|
1773
|
+
format: "json",
|
|
1774
|
+
...params
|
|
1705
1775
|
})
|
|
1706
1776
|
};
|
|
1707
1777
|
this.collections = {
|
|
@@ -1995,6 +2065,45 @@ var Api = class extends HttpClient {
|
|
|
1995
2065
|
method: "DELETE",
|
|
1996
2066
|
secure: true,
|
|
1997
2067
|
...params
|
|
2068
|
+
}),
|
|
2069
|
+
listIntegrationInstallationSites: (integrationName, installationId, query, params = {}) => this.request({
|
|
2070
|
+
path: `/integrations/${integrationName}/installations/${installationId}/sites`,
|
|
2071
|
+
method: "GET",
|
|
2072
|
+
query,
|
|
2073
|
+
secure: true,
|
|
2074
|
+
format: "json",
|
|
2075
|
+
...params
|
|
2076
|
+
}),
|
|
2077
|
+
installIntegrationOnSite: (integrationName, installationId, data, params = {}) => this.request({
|
|
2078
|
+
path: `/integrations/${integrationName}/installations/${installationId}/sites`,
|
|
2079
|
+
method: "POST",
|
|
2080
|
+
body: data,
|
|
2081
|
+
secure: true,
|
|
2082
|
+
type: "application/json" /* Json */,
|
|
2083
|
+
format: "json",
|
|
2084
|
+
...params
|
|
2085
|
+
}),
|
|
2086
|
+
getIntegrationSiteInstallation: (integrationName, installationId, siteId, params = {}) => this.request({
|
|
2087
|
+
path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
|
|
2088
|
+
method: "GET",
|
|
2089
|
+
secure: true,
|
|
2090
|
+
format: "json",
|
|
2091
|
+
...params
|
|
2092
|
+
}),
|
|
2093
|
+
updateIntegrationSiteInstallation: (integrationName, installationId, siteId, data, params = {}) => this.request({
|
|
2094
|
+
path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
|
|
2095
|
+
method: "PATCH",
|
|
2096
|
+
body: data,
|
|
2097
|
+
secure: true,
|
|
2098
|
+
type: "application/json" /* Json */,
|
|
2099
|
+
format: "json",
|
|
2100
|
+
...params
|
|
2101
|
+
}),
|
|
2102
|
+
uninstallIntegrationFromSite: (integrationName, installationId, siteId, params = {}) => this.request({
|
|
2103
|
+
path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
|
|
2104
|
+
method: "DELETE",
|
|
2105
|
+
secure: true,
|
|
2106
|
+
...params
|
|
1998
2107
|
})
|
|
1999
2108
|
};
|
|
2000
2109
|
this.orgs = {
|
|
@@ -2364,6 +2473,62 @@ var Api = class extends HttpClient {
|
|
|
2364
2473
|
type: "application/json" /* Json */,
|
|
2365
2474
|
...params
|
|
2366
2475
|
}),
|
|
2476
|
+
getUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2477
|
+
path: `/orgs/${organizationId}/usage`,
|
|
2478
|
+
method: "GET",
|
|
2479
|
+
secure: true,
|
|
2480
|
+
format: "json",
|
|
2481
|
+
...params
|
|
2482
|
+
}),
|
|
2483
|
+
getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2484
|
+
path: `/orgs/${organizationId}/usage/collections`,
|
|
2485
|
+
method: "GET",
|
|
2486
|
+
secure: true,
|
|
2487
|
+
format: "json",
|
|
2488
|
+
...params
|
|
2489
|
+
}),
|
|
2490
|
+
getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2491
|
+
path: `/orgs/${organizationId}/usage/spaces`,
|
|
2492
|
+
method: "GET",
|
|
2493
|
+
secure: true,
|
|
2494
|
+
format: "json",
|
|
2495
|
+
...params
|
|
2496
|
+
}),
|
|
2497
|
+
getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2498
|
+
path: `/orgs/${organizationId}/usage/sites`,
|
|
2499
|
+
method: "GET",
|
|
2500
|
+
secure: true,
|
|
2501
|
+
format: "json",
|
|
2502
|
+
...params
|
|
2503
|
+
}),
|
|
2504
|
+
getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2505
|
+
path: `/orgs/${organizationId}/usage/teams`,
|
|
2506
|
+
method: "GET",
|
|
2507
|
+
secure: true,
|
|
2508
|
+
format: "json",
|
|
2509
|
+
...params
|
|
2510
|
+
}),
|
|
2511
|
+
getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2512
|
+
path: `/orgs/${organizationId}/usage/members`,
|
|
2513
|
+
method: "GET",
|
|
2514
|
+
secure: true,
|
|
2515
|
+
format: "json",
|
|
2516
|
+
...params
|
|
2517
|
+
}),
|
|
2518
|
+
getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2519
|
+
path: `/orgs/${organizationId}/usage/team-members`,
|
|
2520
|
+
method: "GET",
|
|
2521
|
+
secure: true,
|
|
2522
|
+
format: "json",
|
|
2523
|
+
...params
|
|
2524
|
+
}),
|
|
2525
|
+
getSeatsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2526
|
+
path: `/orgs/${organizationId}/usage/seats`,
|
|
2527
|
+
method: "GET",
|
|
2528
|
+
secure: true,
|
|
2529
|
+
format: "json",
|
|
2530
|
+
...params
|
|
2531
|
+
}),
|
|
2367
2532
|
listEntitySchemas: (organizationId, query, params = {}) => this.request({
|
|
2368
2533
|
path: `/orgs/${organizationId}/schemas`,
|
|
2369
2534
|
method: "GET",
|
|
@@ -2531,6 +2696,22 @@ var Api = class extends HttpClient {
|
|
|
2531
2696
|
format: "json",
|
|
2532
2697
|
...params
|
|
2533
2698
|
}),
|
|
2699
|
+
updateSyncedBlock: (organizationId, syncedBlockId, data, params = {}) => this.request({
|
|
2700
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2701
|
+
method: "PUT",
|
|
2702
|
+
body: data,
|
|
2703
|
+
secure: true,
|
|
2704
|
+
type: "application/json" /* Json */,
|
|
2705
|
+
...params
|
|
2706
|
+
}),
|
|
2707
|
+
getSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2708
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
|
|
2709
|
+
method: "GET",
|
|
2710
|
+
query,
|
|
2711
|
+
secure: true,
|
|
2712
|
+
format: "json",
|
|
2713
|
+
...params
|
|
2714
|
+
}),
|
|
2534
2715
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2535
2716
|
path: `/orgs/${organizationId}/ask`,
|
|
2536
2717
|
method: "POST",
|
|
@@ -2609,6 +2790,227 @@ var Api = class extends HttpClient {
|
|
|
2609
2790
|
type: "application/json" /* Json */,
|
|
2610
2791
|
format: "json",
|
|
2611
2792
|
...params
|
|
2793
|
+
}),
|
|
2794
|
+
getSiteById: (organizationId, siteId, params = {}) => this.request({
|
|
2795
|
+
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2796
|
+
method: "GET",
|
|
2797
|
+
secure: true,
|
|
2798
|
+
format: "json",
|
|
2799
|
+
...params
|
|
2800
|
+
}),
|
|
2801
|
+
updateSiteById: (organizationId, siteId, data, params = {}) => this.request({
|
|
2802
|
+
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2803
|
+
method: "PATCH",
|
|
2804
|
+
body: data,
|
|
2805
|
+
secure: true,
|
|
2806
|
+
type: "application/json" /* Json */,
|
|
2807
|
+
format: "json",
|
|
2808
|
+
...params
|
|
2809
|
+
}),
|
|
2810
|
+
deleteSiteById: (organizationId, siteId, params = {}) => this.request({
|
|
2811
|
+
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2812
|
+
method: "DELETE",
|
|
2813
|
+
secure: true,
|
|
2814
|
+
...params
|
|
2815
|
+
}),
|
|
2816
|
+
listSiteShareLinks: (organizationId, siteId, query, params = {}) => this.request({
|
|
2817
|
+
path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
|
|
2818
|
+
method: "GET",
|
|
2819
|
+
query,
|
|
2820
|
+
secure: true,
|
|
2821
|
+
format: "json",
|
|
2822
|
+
...params
|
|
2823
|
+
}),
|
|
2824
|
+
createSiteShareLink: (organizationId, siteId, data, params = {}) => this.request({
|
|
2825
|
+
path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
|
|
2826
|
+
method: "POST",
|
|
2827
|
+
body: data,
|
|
2828
|
+
secure: true,
|
|
2829
|
+
type: "application/json" /* Json */,
|
|
2830
|
+
format: "json",
|
|
2831
|
+
...params
|
|
2832
|
+
}),
|
|
2833
|
+
updateSiteShareLinkById: (organizationId, siteId, shareLinkId, data, params = {}) => this.request({
|
|
2834
|
+
path: `/orgs/${organizationId}/sites/${siteId}/share-links/${shareLinkId}`,
|
|
2835
|
+
method: "PATCH",
|
|
2836
|
+
body: data,
|
|
2837
|
+
secure: true,
|
|
2838
|
+
type: "application/json" /* Json */,
|
|
2839
|
+
format: "json",
|
|
2840
|
+
...params
|
|
2841
|
+
}),
|
|
2842
|
+
deleteSiteShareLinkById: (organizationId, siteId, shareLinkId, params = {}) => this.request({
|
|
2843
|
+
path: `/orgs/${organizationId}/sites/${siteId}/share-links/${shareLinkId}`,
|
|
2844
|
+
method: "DELETE",
|
|
2845
|
+
secure: true,
|
|
2846
|
+
...params
|
|
2847
|
+
}),
|
|
2848
|
+
getSitePublishingAuthSettings: (organizationId, siteId, params = {}) => this.request({
|
|
2849
|
+
path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
|
|
2850
|
+
method: "GET",
|
|
2851
|
+
secure: true,
|
|
2852
|
+
format: "json",
|
|
2853
|
+
...params
|
|
2854
|
+
}),
|
|
2855
|
+
updateSitePublishingAuthSettings: (organizationId, siteId, data, params = {}) => this.request({
|
|
2856
|
+
path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
|
|
2857
|
+
method: "PATCH",
|
|
2858
|
+
body: data,
|
|
2859
|
+
secure: true,
|
|
2860
|
+
type: "application/json" /* Json */,
|
|
2861
|
+
format: "json",
|
|
2862
|
+
...params
|
|
2863
|
+
}),
|
|
2864
|
+
getSiteCustomizationById: (organizationId, siteId, params = {}) => this.request({
|
|
2865
|
+
path: `/orgs/${organizationId}/sites/${siteId}/customization`,
|
|
2866
|
+
method: "GET",
|
|
2867
|
+
secure: true,
|
|
2868
|
+
format: "json",
|
|
2869
|
+
...params
|
|
2870
|
+
}),
|
|
2871
|
+
updateSiteCustomizationById: (organizationId, siteId, data, params = {}) => this.request({
|
|
2872
|
+
path: `/orgs/${organizationId}/sites/${siteId}/customization`,
|
|
2873
|
+
method: "PUT",
|
|
2874
|
+
body: data,
|
|
2875
|
+
secure: true,
|
|
2876
|
+
type: "application/json" /* Json */,
|
|
2877
|
+
format: "json",
|
|
2878
|
+
...params
|
|
2879
|
+
}),
|
|
2880
|
+
addSpaceToSite: (organizationId, siteId, data, params = {}) => this.request({
|
|
2881
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces`,
|
|
2882
|
+
method: "POST",
|
|
2883
|
+
body: data,
|
|
2884
|
+
secure: true,
|
|
2885
|
+
type: "application/json" /* Json */,
|
|
2886
|
+
format: "json",
|
|
2887
|
+
...params
|
|
2888
|
+
}),
|
|
2889
|
+
listSiteSpaces: (organizationId, siteId, query, params = {}) => this.request({
|
|
2890
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces`,
|
|
2891
|
+
method: "GET",
|
|
2892
|
+
query,
|
|
2893
|
+
secure: true,
|
|
2894
|
+
format: "json",
|
|
2895
|
+
...params
|
|
2896
|
+
}),
|
|
2897
|
+
updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2898
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}`,
|
|
2899
|
+
method: "PATCH",
|
|
2900
|
+
body: data,
|
|
2901
|
+
secure: true,
|
|
2902
|
+
type: "application/json" /* Json */,
|
|
2903
|
+
format: "json",
|
|
2904
|
+
...params
|
|
2905
|
+
}),
|
|
2906
|
+
deleteSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
2907
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}`,
|
|
2908
|
+
method: "DELETE",
|
|
2909
|
+
secure: true,
|
|
2910
|
+
...params
|
|
2911
|
+
}),
|
|
2912
|
+
getSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
2913
|
+
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}/customization`,
|
|
2914
|
+
method: "GET",
|
|
2915
|
+
secure: true,
|
|
2916
|
+
format: "json",
|
|
2917
|
+
...params
|
|
2918
|
+
}),
|
|
2919
|
+
listSeatsInOrganizationById: (organizationId, params = {}) => this.request({
|
|
2920
|
+
path: `/orgs/${organizationId}/seats`,
|
|
2921
|
+
method: "GET",
|
|
2922
|
+
secure: true,
|
|
2923
|
+
format: "json",
|
|
2924
|
+
...params
|
|
2925
|
+
}),
|
|
2926
|
+
addSeatsToOrganizationById: (organizationId, data, params = {}) => this.request({
|
|
2927
|
+
path: `/orgs/${organizationId}/seats`,
|
|
2928
|
+
method: "POST",
|
|
2929
|
+
body: data,
|
|
2930
|
+
secure: true,
|
|
2931
|
+
type: "application/json" /* Json */,
|
|
2932
|
+
...params
|
|
2933
|
+
}),
|
|
2934
|
+
removeSeatsFromOrganizationById: (organizationId, data, params = {}) => this.request({
|
|
2935
|
+
path: `/orgs/${organizationId}/seats`,
|
|
2936
|
+
method: "DELETE",
|
|
2937
|
+
body: data,
|
|
2938
|
+
secure: true,
|
|
2939
|
+
type: "application/json" /* Json */,
|
|
2940
|
+
...params
|
|
2941
|
+
}),
|
|
2942
|
+
assignSeatsToMembersInOrganizationById: (organizationId, data, params = {}) => this.request({
|
|
2943
|
+
path: `/orgs/${organizationId}/seats/members`,
|
|
2944
|
+
method: "PUT",
|
|
2945
|
+
body: data,
|
|
2946
|
+
secure: true,
|
|
2947
|
+
type: "application/json" /* Json */,
|
|
2948
|
+
...params
|
|
2949
|
+
}),
|
|
2950
|
+
revokeSeatsFromMembersInOrganizationById: (organizationId, data, params = {}) => this.request({
|
|
2951
|
+
path: `/orgs/${organizationId}/seats/members`,
|
|
2952
|
+
method: "DELETE",
|
|
2953
|
+
body: data,
|
|
2954
|
+
secure: true,
|
|
2955
|
+
type: "application/json" /* Json */,
|
|
2956
|
+
...params
|
|
2957
|
+
}),
|
|
2958
|
+
getSeatForMemberInOrganizationById: (organizationId, userId, params = {}) => this.request({
|
|
2959
|
+
path: `/orgs/${organizationId}/seats/members/${userId}`,
|
|
2960
|
+
method: "GET",
|
|
2961
|
+
secure: true,
|
|
2962
|
+
format: "json",
|
|
2963
|
+
...params
|
|
2964
|
+
}),
|
|
2965
|
+
assignSeatToMemberInOrganizationById: (organizationId, userId, params = {}) => this.request({
|
|
2966
|
+
path: `/orgs/${organizationId}/seats/members/${userId}`,
|
|
2967
|
+
method: "PUT",
|
|
2968
|
+
secure: true,
|
|
2969
|
+
...params
|
|
2970
|
+
}),
|
|
2971
|
+
revokeSeatFromMemberInOrganizationById: (organizationId, userId, params = {}) => this.request({
|
|
2972
|
+
path: `/orgs/${organizationId}/seats/members/${userId}`,
|
|
2973
|
+
method: "DELETE",
|
|
2974
|
+
secure: true,
|
|
2975
|
+
...params
|
|
2976
|
+
})
|
|
2977
|
+
};
|
|
2978
|
+
this.customHostnames = {
|
|
2979
|
+
getCustomHostname: (hostname, params = {}) => this.request({
|
|
2980
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2981
|
+
method: "GET",
|
|
2982
|
+
secure: true,
|
|
2983
|
+
format: "json",
|
|
2984
|
+
...params
|
|
2985
|
+
}),
|
|
2986
|
+
setupCustomHostname: (hostname, data, params = {}) => this.request({
|
|
2987
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2988
|
+
method: "POST",
|
|
2989
|
+
body: data,
|
|
2990
|
+
secure: true,
|
|
2991
|
+
type: "application/json" /* Json */,
|
|
2992
|
+
format: "json",
|
|
2993
|
+
...params
|
|
2994
|
+
}),
|
|
2995
|
+
dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
|
|
2996
|
+
path: `/custom-hostnames/${hostname}`,
|
|
2997
|
+
method: "PATCH",
|
|
2998
|
+
secure: true,
|
|
2999
|
+
...params
|
|
3000
|
+
}),
|
|
3001
|
+
removeCustomHostname: (hostname, params = {}) => this.request({
|
|
3002
|
+
path: `/custom-hostnames/${hostname}`,
|
|
3003
|
+
method: "DELETE",
|
|
3004
|
+
secure: true,
|
|
3005
|
+
...params
|
|
3006
|
+
}),
|
|
3007
|
+
testCustomHostname: (hostname, data, params = {}) => this.request({
|
|
3008
|
+
path: `/custom-hostnames/${hostname}/test`,
|
|
3009
|
+
method: "POST",
|
|
3010
|
+
body: data,
|
|
3011
|
+
secure: true,
|
|
3012
|
+
type: "application/json" /* Json */,
|
|
3013
|
+
...params
|
|
2612
3014
|
})
|
|
2613
3015
|
};
|
|
2614
3016
|
this.internal = {
|
|
@@ -2742,6 +3144,9 @@ var GitBookAPI = class extends Api {
|
|
|
2742
3144
|
ContentType,
|
|
2743
3145
|
ContentVisibility,
|
|
2744
3146
|
CustomFieldType,
|
|
3147
|
+
CustomHostnameDnsStatus,
|
|
3148
|
+
CustomHostnameErrorStatus,
|
|
3149
|
+
CustomHostnameSslStatus,
|
|
2745
3150
|
CustomizationBackground,
|
|
2746
3151
|
CustomizationCorners,
|
|
2747
3152
|
CustomizationFont,
|
|
@@ -2770,6 +3175,8 @@ var GitBookAPI = class extends Api {
|
|
|
2770
3175
|
RevisionPageLayoutPreset,
|
|
2771
3176
|
RevisionPageType,
|
|
2772
3177
|
RevisionSemanticChangeType,
|
|
3178
|
+
SiteSubscriptionStatus,
|
|
3179
|
+
SiteSubscriptionType,
|
|
2773
3180
|
SiteVisibility,
|
|
2774
3181
|
SpaceBlockReason,
|
|
2775
3182
|
SpaceEditMode,
|