@gitbook/api 0.28.0 → 0.29.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 +221 -53
- package/dist/index.cjs +91 -18
- package/dist/index.js +89 -18
- package/package.json +1 -1
- package/spec/openapi.json +788 -228
- package/spec/openapi.yaml +500 -148
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var name = "@gitbook/api";
|
|
3
|
-
var version = "0.
|
|
3
|
+
var version = "0.29.0";
|
|
4
4
|
|
|
5
5
|
// src/client.ts
|
|
6
6
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
@@ -234,6 +234,14 @@ var PurgeCDNCacheContextType = /* @__PURE__ */ ((PurgeCDNCacheContextType2) => {
|
|
|
234
234
|
PurgeCDNCacheContextType2["Hosts"] = "hosts";
|
|
235
235
|
return PurgeCDNCacheContextType2;
|
|
236
236
|
})(PurgeCDNCacheContextType || {});
|
|
237
|
+
var SpaceBlockReason = /* @__PURE__ */ ((SpaceBlockReason2) => {
|
|
238
|
+
SpaceBlockReason2["DMCA"] = "DMCA";
|
|
239
|
+
SpaceBlockReason2["THREAT_TYPE_UNSPECIFIED"] = "THREAT_TYPE_UNSPECIFIED";
|
|
240
|
+
SpaceBlockReason2["MALWARE"] = "MALWARE";
|
|
241
|
+
SpaceBlockReason2["SOCIAL_ENGINEERING"] = "SOCIAL_ENGINEERING";
|
|
242
|
+
SpaceBlockReason2["UNWANTED_SOFTWARE"] = "UNWANTED_SOFTWARE";
|
|
243
|
+
return SpaceBlockReason2;
|
|
244
|
+
})(SpaceBlockReason || {});
|
|
237
245
|
var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
|
|
238
246
|
ContentKitIcon2["Close"] = "close";
|
|
239
247
|
ContentKitIcon2["Edit"] = "edit";
|
|
@@ -305,6 +313,11 @@ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
|
|
|
305
313
|
CustomizationCorners2["Rounded"] = "rounded";
|
|
306
314
|
return CustomizationCorners2;
|
|
307
315
|
})(CustomizationCorners || {});
|
|
316
|
+
var CustomizationBackground = /* @__PURE__ */ ((CustomizationBackground2) => {
|
|
317
|
+
CustomizationBackground2["Plain"] = "plain";
|
|
318
|
+
CustomizationBackground2["Match"] = "match";
|
|
319
|
+
return CustomizationBackground2;
|
|
320
|
+
})(CustomizationBackground || {});
|
|
308
321
|
var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
309
322
|
PageFeedbackRating2["Bad"] = "bad";
|
|
310
323
|
PageFeedbackRating2["Ok"] = "ok";
|
|
@@ -759,6 +772,15 @@ var Api = class extends HttpClient {
|
|
|
759
772
|
format: "json",
|
|
760
773
|
...params
|
|
761
774
|
}),
|
|
775
|
+
updateChangeRequestById: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
776
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
|
|
777
|
+
method: "PATCH",
|
|
778
|
+
body: data,
|
|
779
|
+
secure: true,
|
|
780
|
+
type: "application/json" /* Json */,
|
|
781
|
+
format: "json",
|
|
782
|
+
...params
|
|
783
|
+
}),
|
|
762
784
|
mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
|
|
763
785
|
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
|
|
764
786
|
method: "POST",
|
|
@@ -1183,6 +1205,30 @@ var Api = class extends HttpClient {
|
|
|
1183
1205
|
secure: true,
|
|
1184
1206
|
format: "json",
|
|
1185
1207
|
...params
|
|
1208
|
+
}),
|
|
1209
|
+
createSpaceShareLink: (spaceId, data, params = {}) => this.request({
|
|
1210
|
+
path: `/spaces/${spaceId}/share-links`,
|
|
1211
|
+
method: "POST",
|
|
1212
|
+
body: data,
|
|
1213
|
+
secure: true,
|
|
1214
|
+
type: "application/json" /* Json */,
|
|
1215
|
+
format: "json",
|
|
1216
|
+
...params
|
|
1217
|
+
}),
|
|
1218
|
+
updateSpaceShareLinkById: (spaceId, shareLinkId, data, params = {}) => this.request({
|
|
1219
|
+
path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
|
|
1220
|
+
method: "PATCH",
|
|
1221
|
+
body: data,
|
|
1222
|
+
secure: true,
|
|
1223
|
+
type: "application/json" /* Json */,
|
|
1224
|
+
format: "json",
|
|
1225
|
+
...params
|
|
1226
|
+
}),
|
|
1227
|
+
deleteSpaceShareLinkById: (spaceId, shareLinkId, params = {}) => this.request({
|
|
1228
|
+
path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
|
|
1229
|
+
method: "DELETE",
|
|
1230
|
+
secure: true,
|
|
1231
|
+
...params
|
|
1186
1232
|
})
|
|
1187
1233
|
};
|
|
1188
1234
|
this.collections = {
|
|
@@ -1273,6 +1319,30 @@ var Api = class extends HttpClient {
|
|
|
1273
1319
|
type: "application/json" /* Json */,
|
|
1274
1320
|
format: "json",
|
|
1275
1321
|
...params
|
|
1322
|
+
}),
|
|
1323
|
+
createCollectionShareLink: (collectionId, data, params = {}) => this.request({
|
|
1324
|
+
path: `/collections/${collectionId}/share-links`,
|
|
1325
|
+
method: "POST",
|
|
1326
|
+
body: data,
|
|
1327
|
+
secure: true,
|
|
1328
|
+
type: "application/json" /* Json */,
|
|
1329
|
+
format: "json",
|
|
1330
|
+
...params
|
|
1331
|
+
}),
|
|
1332
|
+
updateCollectionShareLinkById: (collectionId, shareLinkId, data, params = {}) => this.request({
|
|
1333
|
+
path: `/collections/${collectionId}/share-links/${shareLinkId}`,
|
|
1334
|
+
method: "PATCH",
|
|
1335
|
+
body: data,
|
|
1336
|
+
secure: true,
|
|
1337
|
+
type: "application/json" /* Json */,
|
|
1338
|
+
format: "json",
|
|
1339
|
+
...params
|
|
1340
|
+
}),
|
|
1341
|
+
deleteCollectionShareLinkById: (collectionId, shareLinkId, params = {}) => this.request({
|
|
1342
|
+
path: `/collections/${collectionId}/share-links/${shareLinkId}`,
|
|
1343
|
+
method: "DELETE",
|
|
1344
|
+
secure: true,
|
|
1345
|
+
...params
|
|
1276
1346
|
})
|
|
1277
1347
|
};
|
|
1278
1348
|
this.integrations = {
|
|
@@ -1638,6 +1708,21 @@ var Api = class extends HttpClient {
|
|
|
1638
1708
|
format: "json",
|
|
1639
1709
|
...params
|
|
1640
1710
|
}),
|
|
1711
|
+
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
1712
|
+
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
1713
|
+
method: "PATCH",
|
|
1714
|
+
body: data,
|
|
1715
|
+
secure: true,
|
|
1716
|
+
type: "application/json" /* Json */,
|
|
1717
|
+
format: "json",
|
|
1718
|
+
...params
|
|
1719
|
+
}),
|
|
1720
|
+
deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
|
|
1721
|
+
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
1722
|
+
method: "DELETE",
|
|
1723
|
+
secure: true,
|
|
1724
|
+
...params
|
|
1725
|
+
}),
|
|
1641
1726
|
upgradeOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
1642
1727
|
path: `/orgs/${organizationId}/billing`,
|
|
1643
1728
|
method: "POST",
|
|
@@ -1874,21 +1959,6 @@ var Api = class extends HttpClient {
|
|
|
1874
1959
|
format: "json",
|
|
1875
1960
|
...params
|
|
1876
1961
|
}),
|
|
1877
|
-
deleteCapture: (organizationId, captureId, params = {}) => this.request({
|
|
1878
|
-
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1879
|
-
method: "DELETE",
|
|
1880
|
-
secure: true,
|
|
1881
|
-
...params
|
|
1882
|
-
}),
|
|
1883
|
-
updateCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1884
|
-
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1885
|
-
method: "PUT",
|
|
1886
|
-
body: data,
|
|
1887
|
-
secure: true,
|
|
1888
|
-
type: "application/json" /* Json */,
|
|
1889
|
-
format: "json",
|
|
1890
|
-
...params
|
|
1891
|
-
}),
|
|
1892
1962
|
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1893
1963
|
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1894
1964
|
method: "POST",
|
|
@@ -1924,10 +1994,9 @@ var Api = class extends HttpClient {
|
|
|
1924
1994
|
format: "json",
|
|
1925
1995
|
...params
|
|
1926
1996
|
}),
|
|
1927
|
-
getSnippet: (organizationId, snippetId,
|
|
1997
|
+
getSnippet: (organizationId, snippetId, params = {}) => this.request({
|
|
1928
1998
|
path: `/orgs/${organizationId}/snippets/${snippetId}`,
|
|
1929
1999
|
method: "GET",
|
|
1930
|
-
query,
|
|
1931
2000
|
secure: true,
|
|
1932
2001
|
format: "json",
|
|
1933
2002
|
...params
|
|
@@ -2142,6 +2211,7 @@ export {
|
|
|
2142
2211
|
ContentType,
|
|
2143
2212
|
ContentVisibility,
|
|
2144
2213
|
CustomFieldType,
|
|
2214
|
+
CustomizationBackground,
|
|
2145
2215
|
CustomizationCorners,
|
|
2146
2216
|
CustomizationFont,
|
|
2147
2217
|
CustomizationHeaderPreset,
|
|
@@ -2169,6 +2239,7 @@ export {
|
|
|
2169
2239
|
RevisionPageLayoutPreset,
|
|
2170
2240
|
RevisionPageType,
|
|
2171
2241
|
RevisionSemanticChangeType,
|
|
2242
|
+
SpaceBlockReason,
|
|
2172
2243
|
SpaceEditMode,
|
|
2173
2244
|
TeamMemberRole
|
|
2174
2245
|
};
|