@gitbook/api 0.89.0 → 0.90.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 +424 -114
- package/dist/index.cjs +91 -3
- package/dist/index.js +90 -3
- package/package.json +1 -1
- package/spec/openapi.json +1475 -657
- package/spec/openapi.yaml +909 -417
package/dist/index.cjs
CHANGED
|
@@ -212,6 +212,7 @@ __export(src_exports, {
|
|
|
212
212
|
CustomizationLocale: () => CustomizationLocale,
|
|
213
213
|
CustomizationSidebarBackgroundStyle: () => CustomizationSidebarBackgroundStyle,
|
|
214
214
|
CustomizationSidebarListStyle: () => CustomizationSidebarListStyle,
|
|
215
|
+
CustomizationTheme: () => CustomizationTheme,
|
|
215
216
|
CustomizationThemeMode: () => CustomizationThemeMode,
|
|
216
217
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
217
218
|
GitBookAPI: () => GitBookAPI,
|
|
@@ -264,7 +265,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
264
265
|
|
|
265
266
|
// package.json
|
|
266
267
|
var name = "@gitbook/api";
|
|
267
|
-
var version = "0.
|
|
268
|
+
var version = "0.90.0";
|
|
268
269
|
|
|
269
270
|
// src/client.ts
|
|
270
271
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -728,6 +729,13 @@ var SiteToMigrateFeature = /* @__PURE__ */ ((SiteToMigrateFeature2) => {
|
|
|
728
729
|
SiteToMigrateFeature2["ShareLinks"] = "share-links";
|
|
729
730
|
return SiteToMigrateFeature2;
|
|
730
731
|
})(SiteToMigrateFeature || {});
|
|
732
|
+
var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
|
|
733
|
+
CustomizationTheme2["Clean"] = "clean";
|
|
734
|
+
CustomizationTheme2["Muted"] = "muted";
|
|
735
|
+
CustomizationTheme2["Bold"] = "bold";
|
|
736
|
+
CustomizationTheme2["Gradient"] = "gradient";
|
|
737
|
+
return CustomizationTheme2;
|
|
738
|
+
})(CustomizationTheme || {});
|
|
731
739
|
var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
|
|
732
740
|
CustomizationIconsStyle2["Regular"] = "regular";
|
|
733
741
|
CustomizationIconsStyle2["Solid"] = "solid";
|
|
@@ -758,6 +766,7 @@ var SiteInsightsTrademarkPlacement = /* @__PURE__ */ ((SiteInsightsTrademarkPlac
|
|
|
758
766
|
SiteInsightsTrademarkPlacement2["Sidebar"] = "sidebar";
|
|
759
767
|
SiteInsightsTrademarkPlacement2["Ad"] = "ad";
|
|
760
768
|
SiteInsightsTrademarkPlacement2["Footer"] = "footer";
|
|
769
|
+
SiteInsightsTrademarkPlacement2["Pdf"] = "pdf";
|
|
761
770
|
return SiteInsightsTrademarkPlacement2;
|
|
762
771
|
})(SiteInsightsTrademarkPlacement || {});
|
|
763
772
|
var SiteInsightsAdPlacement = /* @__PURE__ */ ((SiteInsightsAdPlacement2) => {
|
|
@@ -1399,18 +1408,50 @@ var Api = class extends HttpClient {
|
|
|
1399
1408
|
type: "application/json" /* Json */,
|
|
1400
1409
|
...params
|
|
1401
1410
|
}),
|
|
1411
|
+
updateTeamPermissionInSpace: (spaceId, teamId, data, params = {}) => this.request({
|
|
1412
|
+
path: `/spaces/${spaceId}/permissions/teams/${teamId}`,
|
|
1413
|
+
method: "PATCH",
|
|
1414
|
+
body: data,
|
|
1415
|
+
secure: true,
|
|
1416
|
+
type: "application/json" /* Json */,
|
|
1417
|
+
...params
|
|
1418
|
+
}),
|
|
1402
1419
|
removeTeamFromSpace: (spaceId, teamId, params = {}) => this.request({
|
|
1403
1420
|
path: `/spaces/${spaceId}/permissions/teams/${teamId}`,
|
|
1404
1421
|
method: "DELETE",
|
|
1405
1422
|
secure: true,
|
|
1406
1423
|
...params
|
|
1407
1424
|
}),
|
|
1425
|
+
listUserPermissionsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1426
|
+
path: `/spaces/${spaceId}/permissions/users`,
|
|
1427
|
+
method: "GET",
|
|
1428
|
+
query,
|
|
1429
|
+
secure: true,
|
|
1430
|
+
format: "json",
|
|
1431
|
+
...params
|
|
1432
|
+
}),
|
|
1433
|
+
updateUserPermissionInSpace: (spaceId, userId, data, params = {}) => this.request({
|
|
1434
|
+
path: `/spaces/${spaceId}/permissions/users/${userId}`,
|
|
1435
|
+
method: "PATCH",
|
|
1436
|
+
body: data,
|
|
1437
|
+
secure: true,
|
|
1438
|
+
type: "application/json" /* Json */,
|
|
1439
|
+
...params
|
|
1440
|
+
}),
|
|
1408
1441
|
removeUserFromSpace: (spaceId, userId, params = {}) => this.request({
|
|
1409
1442
|
path: `/spaces/${spaceId}/permissions/users/${userId}`,
|
|
1410
1443
|
method: "DELETE",
|
|
1411
1444
|
secure: true,
|
|
1412
1445
|
...params
|
|
1413
1446
|
}),
|
|
1447
|
+
listTeamPermissionsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1448
|
+
path: `/spaces/${spaceId}/permissions/teams`,
|
|
1449
|
+
method: "GET",
|
|
1450
|
+
query,
|
|
1451
|
+
secure: true,
|
|
1452
|
+
format: "json",
|
|
1453
|
+
...params
|
|
1454
|
+
}),
|
|
1414
1455
|
getCurrentRevision: (spaceId, query, params = {}) => this.request({
|
|
1415
1456
|
path: `/spaces/${spaceId}/content`,
|
|
1416
1457
|
method: "GET",
|
|
@@ -2127,12 +2168,44 @@ var Api = class extends HttpClient {
|
|
|
2127
2168
|
type: "application/json" /* Json */,
|
|
2128
2169
|
...params
|
|
2129
2170
|
}),
|
|
2171
|
+
listTeamPermissionsInCollection: (collectionId, query, params = {}) => this.request({
|
|
2172
|
+
path: `/collections/${collectionId}/permissions/teams`,
|
|
2173
|
+
method: "GET",
|
|
2174
|
+
query,
|
|
2175
|
+
secure: true,
|
|
2176
|
+
format: "json",
|
|
2177
|
+
...params
|
|
2178
|
+
}),
|
|
2179
|
+
updateTeamPermissionInCollection: (collectionId, teamId, data, params = {}) => this.request({
|
|
2180
|
+
path: `/collections/${collectionId}/permissions/teams/${teamId}`,
|
|
2181
|
+
method: "PATCH",
|
|
2182
|
+
body: data,
|
|
2183
|
+
secure: true,
|
|
2184
|
+
type: "application/json" /* Json */,
|
|
2185
|
+
...params
|
|
2186
|
+
}),
|
|
2130
2187
|
removeTeamFromCollection: (collectionId, teamId, params = {}) => this.request({
|
|
2131
2188
|
path: `/collections/${collectionId}/permissions/teams/${teamId}`,
|
|
2132
2189
|
method: "DELETE",
|
|
2133
2190
|
secure: true,
|
|
2134
2191
|
...params
|
|
2135
2192
|
}),
|
|
2193
|
+
listUserPermissionsInCollection: (collectionId, query, params = {}) => this.request({
|
|
2194
|
+
path: `/collections/${collectionId}/permissions/users`,
|
|
2195
|
+
method: "GET",
|
|
2196
|
+
query,
|
|
2197
|
+
secure: true,
|
|
2198
|
+
format: "json",
|
|
2199
|
+
...params
|
|
2200
|
+
}),
|
|
2201
|
+
updateUserPermissionInCollection: (collectionId, userId, data, params = {}) => this.request({
|
|
2202
|
+
path: `/collections/${collectionId}/permissions/users/${userId}`,
|
|
2203
|
+
method: "PATCH",
|
|
2204
|
+
body: data,
|
|
2205
|
+
secure: true,
|
|
2206
|
+
type: "application/json" /* Json */,
|
|
2207
|
+
...params
|
|
2208
|
+
}),
|
|
2136
2209
|
removeUserFromCollection: (collectionId, userId, params = {}) => this.request({
|
|
2137
2210
|
path: `/collections/${collectionId}/permissions/users/${userId}`,
|
|
2138
2211
|
method: "DELETE",
|
|
@@ -2614,11 +2687,12 @@ var Api = class extends HttpClient {
|
|
|
2614
2687
|
format: "json",
|
|
2615
2688
|
...params
|
|
2616
2689
|
}),
|
|
2617
|
-
migrateOrganizationPlan: (organizationId,
|
|
2690
|
+
migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2618
2691
|
path: `/orgs/${organizationId}/billing/migrate`,
|
|
2619
2692
|
method: "POST",
|
|
2620
|
-
|
|
2693
|
+
body: data,
|
|
2621
2694
|
secure: true,
|
|
2695
|
+
type: "application/json" /* Json */,
|
|
2622
2696
|
...params
|
|
2623
2697
|
}),
|
|
2624
2698
|
previewMigrateOrganizationPlan: (organizationId, query, params = {}) => this.request({
|
|
@@ -3284,6 +3358,12 @@ var Api = class extends HttpClient {
|
|
|
3284
3358
|
type: "application/json" /* Json */,
|
|
3285
3359
|
...params
|
|
3286
3360
|
}),
|
|
3361
|
+
streamRecommendedQuestionsInSite: (organizationId, siteId, params = {}) => this.streamRequest({
|
|
3362
|
+
path: `/orgs/${organizationId}/sites/${siteId}/ask/questions`,
|
|
3363
|
+
method: "GET",
|
|
3364
|
+
secure: true,
|
|
3365
|
+
...params
|
|
3366
|
+
}),
|
|
3287
3367
|
updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3288
3368
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
|
|
3289
3369
|
method: "PATCH",
|
|
@@ -3397,6 +3477,13 @@ var Api = class extends HttpClient {
|
|
|
3397
3477
|
format: "json",
|
|
3398
3478
|
...params
|
|
3399
3479
|
}),
|
|
3480
|
+
listSiteVisitorSegments: (organizationId, siteId, params = {}) => this.request({
|
|
3481
|
+
path: `/orgs/${organizationId}/sites/${siteId}/insights/visitor-segments`,
|
|
3482
|
+
method: "GET",
|
|
3483
|
+
secure: true,
|
|
3484
|
+
format: "json",
|
|
3485
|
+
...params
|
|
3486
|
+
}),
|
|
3400
3487
|
getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3401
3488
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
|
|
3402
3489
|
method: "GET",
|
|
@@ -3669,6 +3756,7 @@ var GitBookAPI = class extends Api {
|
|
|
3669
3756
|
CustomizationLocale,
|
|
3670
3757
|
CustomizationSidebarBackgroundStyle,
|
|
3671
3758
|
CustomizationSidebarListStyle,
|
|
3759
|
+
CustomizationTheme,
|
|
3672
3760
|
CustomizationThemeMode,
|
|
3673
3761
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
3674
3762
|
GitBookAPI,
|
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.90.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -636,6 +636,13 @@ var SiteToMigrateFeature = /* @__PURE__ */ ((SiteToMigrateFeature2) => {
|
|
|
636
636
|
SiteToMigrateFeature2["ShareLinks"] = "share-links";
|
|
637
637
|
return SiteToMigrateFeature2;
|
|
638
638
|
})(SiteToMigrateFeature || {});
|
|
639
|
+
var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
|
|
640
|
+
CustomizationTheme2["Clean"] = "clean";
|
|
641
|
+
CustomizationTheme2["Muted"] = "muted";
|
|
642
|
+
CustomizationTheme2["Bold"] = "bold";
|
|
643
|
+
CustomizationTheme2["Gradient"] = "gradient";
|
|
644
|
+
return CustomizationTheme2;
|
|
645
|
+
})(CustomizationTheme || {});
|
|
639
646
|
var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
|
|
640
647
|
CustomizationIconsStyle2["Regular"] = "regular";
|
|
641
648
|
CustomizationIconsStyle2["Solid"] = "solid";
|
|
@@ -666,6 +673,7 @@ var SiteInsightsTrademarkPlacement = /* @__PURE__ */ ((SiteInsightsTrademarkPlac
|
|
|
666
673
|
SiteInsightsTrademarkPlacement2["Sidebar"] = "sidebar";
|
|
667
674
|
SiteInsightsTrademarkPlacement2["Ad"] = "ad";
|
|
668
675
|
SiteInsightsTrademarkPlacement2["Footer"] = "footer";
|
|
676
|
+
SiteInsightsTrademarkPlacement2["Pdf"] = "pdf";
|
|
669
677
|
return SiteInsightsTrademarkPlacement2;
|
|
670
678
|
})(SiteInsightsTrademarkPlacement || {});
|
|
671
679
|
var SiteInsightsAdPlacement = /* @__PURE__ */ ((SiteInsightsAdPlacement2) => {
|
|
@@ -1307,18 +1315,50 @@ var Api = class extends HttpClient {
|
|
|
1307
1315
|
type: "application/json" /* Json */,
|
|
1308
1316
|
...params
|
|
1309
1317
|
}),
|
|
1318
|
+
updateTeamPermissionInSpace: (spaceId, teamId, data, params = {}) => this.request({
|
|
1319
|
+
path: `/spaces/${spaceId}/permissions/teams/${teamId}`,
|
|
1320
|
+
method: "PATCH",
|
|
1321
|
+
body: data,
|
|
1322
|
+
secure: true,
|
|
1323
|
+
type: "application/json" /* Json */,
|
|
1324
|
+
...params
|
|
1325
|
+
}),
|
|
1310
1326
|
removeTeamFromSpace: (spaceId, teamId, params = {}) => this.request({
|
|
1311
1327
|
path: `/spaces/${spaceId}/permissions/teams/${teamId}`,
|
|
1312
1328
|
method: "DELETE",
|
|
1313
1329
|
secure: true,
|
|
1314
1330
|
...params
|
|
1315
1331
|
}),
|
|
1332
|
+
listUserPermissionsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1333
|
+
path: `/spaces/${spaceId}/permissions/users`,
|
|
1334
|
+
method: "GET",
|
|
1335
|
+
query,
|
|
1336
|
+
secure: true,
|
|
1337
|
+
format: "json",
|
|
1338
|
+
...params
|
|
1339
|
+
}),
|
|
1340
|
+
updateUserPermissionInSpace: (spaceId, userId, data, params = {}) => this.request({
|
|
1341
|
+
path: `/spaces/${spaceId}/permissions/users/${userId}`,
|
|
1342
|
+
method: "PATCH",
|
|
1343
|
+
body: data,
|
|
1344
|
+
secure: true,
|
|
1345
|
+
type: "application/json" /* Json */,
|
|
1346
|
+
...params
|
|
1347
|
+
}),
|
|
1316
1348
|
removeUserFromSpace: (spaceId, userId, params = {}) => this.request({
|
|
1317
1349
|
path: `/spaces/${spaceId}/permissions/users/${userId}`,
|
|
1318
1350
|
method: "DELETE",
|
|
1319
1351
|
secure: true,
|
|
1320
1352
|
...params
|
|
1321
1353
|
}),
|
|
1354
|
+
listTeamPermissionsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1355
|
+
path: `/spaces/${spaceId}/permissions/teams`,
|
|
1356
|
+
method: "GET",
|
|
1357
|
+
query,
|
|
1358
|
+
secure: true,
|
|
1359
|
+
format: "json",
|
|
1360
|
+
...params
|
|
1361
|
+
}),
|
|
1322
1362
|
getCurrentRevision: (spaceId, query, params = {}) => this.request({
|
|
1323
1363
|
path: `/spaces/${spaceId}/content`,
|
|
1324
1364
|
method: "GET",
|
|
@@ -2035,12 +2075,44 @@ var Api = class extends HttpClient {
|
|
|
2035
2075
|
type: "application/json" /* Json */,
|
|
2036
2076
|
...params
|
|
2037
2077
|
}),
|
|
2078
|
+
listTeamPermissionsInCollection: (collectionId, query, params = {}) => this.request({
|
|
2079
|
+
path: `/collections/${collectionId}/permissions/teams`,
|
|
2080
|
+
method: "GET",
|
|
2081
|
+
query,
|
|
2082
|
+
secure: true,
|
|
2083
|
+
format: "json",
|
|
2084
|
+
...params
|
|
2085
|
+
}),
|
|
2086
|
+
updateTeamPermissionInCollection: (collectionId, teamId, data, params = {}) => this.request({
|
|
2087
|
+
path: `/collections/${collectionId}/permissions/teams/${teamId}`,
|
|
2088
|
+
method: "PATCH",
|
|
2089
|
+
body: data,
|
|
2090
|
+
secure: true,
|
|
2091
|
+
type: "application/json" /* Json */,
|
|
2092
|
+
...params
|
|
2093
|
+
}),
|
|
2038
2094
|
removeTeamFromCollection: (collectionId, teamId, params = {}) => this.request({
|
|
2039
2095
|
path: `/collections/${collectionId}/permissions/teams/${teamId}`,
|
|
2040
2096
|
method: "DELETE",
|
|
2041
2097
|
secure: true,
|
|
2042
2098
|
...params
|
|
2043
2099
|
}),
|
|
2100
|
+
listUserPermissionsInCollection: (collectionId, query, params = {}) => this.request({
|
|
2101
|
+
path: `/collections/${collectionId}/permissions/users`,
|
|
2102
|
+
method: "GET",
|
|
2103
|
+
query,
|
|
2104
|
+
secure: true,
|
|
2105
|
+
format: "json",
|
|
2106
|
+
...params
|
|
2107
|
+
}),
|
|
2108
|
+
updateUserPermissionInCollection: (collectionId, userId, data, params = {}) => this.request({
|
|
2109
|
+
path: `/collections/${collectionId}/permissions/users/${userId}`,
|
|
2110
|
+
method: "PATCH",
|
|
2111
|
+
body: data,
|
|
2112
|
+
secure: true,
|
|
2113
|
+
type: "application/json" /* Json */,
|
|
2114
|
+
...params
|
|
2115
|
+
}),
|
|
2044
2116
|
removeUserFromCollection: (collectionId, userId, params = {}) => this.request({
|
|
2045
2117
|
path: `/collections/${collectionId}/permissions/users/${userId}`,
|
|
2046
2118
|
method: "DELETE",
|
|
@@ -2522,11 +2594,12 @@ var Api = class extends HttpClient {
|
|
|
2522
2594
|
format: "json",
|
|
2523
2595
|
...params
|
|
2524
2596
|
}),
|
|
2525
|
-
migrateOrganizationPlan: (organizationId,
|
|
2597
|
+
migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2526
2598
|
path: `/orgs/${organizationId}/billing/migrate`,
|
|
2527
2599
|
method: "POST",
|
|
2528
|
-
|
|
2600
|
+
body: data,
|
|
2529
2601
|
secure: true,
|
|
2602
|
+
type: "application/json" /* Json */,
|
|
2530
2603
|
...params
|
|
2531
2604
|
}),
|
|
2532
2605
|
previewMigrateOrganizationPlan: (organizationId, query, params = {}) => this.request({
|
|
@@ -3192,6 +3265,12 @@ var Api = class extends HttpClient {
|
|
|
3192
3265
|
type: "application/json" /* Json */,
|
|
3193
3266
|
...params
|
|
3194
3267
|
}),
|
|
3268
|
+
streamRecommendedQuestionsInSite: (organizationId, siteId, params = {}) => this.streamRequest({
|
|
3269
|
+
path: `/orgs/${organizationId}/sites/${siteId}/ask/questions`,
|
|
3270
|
+
method: "GET",
|
|
3271
|
+
secure: true,
|
|
3272
|
+
...params
|
|
3273
|
+
}),
|
|
3195
3274
|
updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3196
3275
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
|
|
3197
3276
|
method: "PATCH",
|
|
@@ -3305,6 +3384,13 @@ var Api = class extends HttpClient {
|
|
|
3305
3384
|
format: "json",
|
|
3306
3385
|
...params
|
|
3307
3386
|
}),
|
|
3387
|
+
listSiteVisitorSegments: (organizationId, siteId, params = {}) => this.request({
|
|
3388
|
+
path: `/orgs/${organizationId}/sites/${siteId}/insights/visitor-segments`,
|
|
3389
|
+
method: "GET",
|
|
3390
|
+
secure: true,
|
|
3391
|
+
format: "json",
|
|
3392
|
+
...params
|
|
3393
|
+
}),
|
|
3308
3394
|
getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3309
3395
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
|
|
3310
3396
|
method: "GET",
|
|
@@ -3576,6 +3662,7 @@ export {
|
|
|
3576
3662
|
CustomizationLocale,
|
|
3577
3663
|
CustomizationSidebarBackgroundStyle,
|
|
3578
3664
|
CustomizationSidebarListStyle,
|
|
3665
|
+
CustomizationTheme,
|
|
3579
3666
|
CustomizationThemeMode,
|
|
3580
3667
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
3581
3668
|
GitBookAPI,
|