@gitbook/api 0.7.0 → 0.9.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 +172 -66
- package/dist/index.cjs +51 -13
- package/dist/index.js +49 -12
- package/package.json +1 -1
- package/spec/openapi.json +504 -105
- package/spec/openapi.yaml +335 -91
package/dist/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// src/client.ts
|
|
2
|
+
var UserPreferencesTheme = /* @__PURE__ */ ((UserPreferencesTheme2) => {
|
|
3
|
+
UserPreferencesTheme2["Light"] = "light";
|
|
4
|
+
UserPreferencesTheme2["Dark"] = "dark";
|
|
5
|
+
UserPreferencesTheme2["Default"] = "default";
|
|
6
|
+
return UserPreferencesTheme2;
|
|
7
|
+
})(UserPreferencesTheme || {});
|
|
2
8
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
3
9
|
ContentVisibility2["Public"] = "public";
|
|
4
10
|
ContentVisibility2["Unlisted"] = "unlisted";
|
|
@@ -106,7 +112,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
|
|
|
106
112
|
})(AnalyticsTrafficInterval || {});
|
|
107
113
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
108
114
|
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
109
|
-
IntegrationScope2["
|
|
115
|
+
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
110
116
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
111
117
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
112
118
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
@@ -127,6 +133,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
|
127
133
|
IntegrationCategory2["Collaboration"] = "collaboration";
|
|
128
134
|
IntegrationCategory2["Marketing"] = "marketing";
|
|
129
135
|
IntegrationCategory2["Content"] = "content";
|
|
136
|
+
IntegrationCategory2["Gitsync"] = "gitsync";
|
|
130
137
|
IntegrationCategory2["Other"] = "other";
|
|
131
138
|
return IntegrationCategory2;
|
|
132
139
|
})(IntegrationCategory || {});
|
|
@@ -210,6 +217,7 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
|
|
|
210
217
|
ContentKitIcon2["Link"] = "link";
|
|
211
218
|
ContentKitIcon2["LinkExternal"] = "link-external";
|
|
212
219
|
ContentKitIcon2["Eye"] = "eye";
|
|
220
|
+
ContentKitIcon2["Lock"] = "lock";
|
|
213
221
|
return ContentKitIcon2;
|
|
214
222
|
})(ContentKitIcon || {});
|
|
215
223
|
var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
@@ -217,6 +225,8 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
|
|
|
217
225
|
CustomFieldType2["Number"] = "number";
|
|
218
226
|
CustomFieldType2["Boolean"] = "boolean";
|
|
219
227
|
CustomFieldType2["Tags"] = "tags";
|
|
228
|
+
CustomFieldType2["SelectMulti"] = "select:multi";
|
|
229
|
+
CustomFieldType2["SelectSingle"] = "select:single";
|
|
220
230
|
return CustomFieldType2;
|
|
221
231
|
})(CustomFieldType || {});
|
|
222
232
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
@@ -414,6 +424,22 @@ var Api = class extends HttpClient {
|
|
|
414
424
|
format: "json",
|
|
415
425
|
...params
|
|
416
426
|
}),
|
|
427
|
+
getPreferencesForAuthenticatedUser: (params = {}) => this.request({
|
|
428
|
+
path: `/user/preferences`,
|
|
429
|
+
method: "GET",
|
|
430
|
+
secure: true,
|
|
431
|
+
format: "json",
|
|
432
|
+
...params
|
|
433
|
+
}),
|
|
434
|
+
updatePreferencesForAuthenticatedUser: (data, params = {}) => this.request({
|
|
435
|
+
path: `/user/preferences`,
|
|
436
|
+
method: "PATCH",
|
|
437
|
+
body: data,
|
|
438
|
+
secure: true,
|
|
439
|
+
type: "application/json" /* Json */,
|
|
440
|
+
format: "json",
|
|
441
|
+
...params
|
|
442
|
+
}),
|
|
417
443
|
listSpacesForAuthenticatedUser: (query, params = {}) => this.request({
|
|
418
444
|
path: `/user/spaces`,
|
|
419
445
|
method: "GET",
|
|
@@ -1146,6 +1172,14 @@ var Api = class extends HttpClient {
|
|
|
1146
1172
|
format: "json",
|
|
1147
1173
|
...params
|
|
1148
1174
|
}),
|
|
1175
|
+
queueIntegrationTask: (integrationName, data, params = {}) => this.request({
|
|
1176
|
+
path: `/integrations/${integrationName}/tasks`,
|
|
1177
|
+
method: "POST",
|
|
1178
|
+
body: data,
|
|
1179
|
+
secure: true,
|
|
1180
|
+
type: "application/json" /* Json */,
|
|
1181
|
+
...params
|
|
1182
|
+
}),
|
|
1149
1183
|
getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
|
|
1150
1184
|
path: `/integrations/${integrationName}/installations/${installationId}`,
|
|
1151
1185
|
method: "GET",
|
|
@@ -1612,16 +1646,16 @@ var Api = class extends HttpClient {
|
|
|
1612
1646
|
format: "json",
|
|
1613
1647
|
...params
|
|
1614
1648
|
}),
|
|
1615
|
-
|
|
1616
|
-
path: `/orgs/${organizationId}/
|
|
1649
|
+
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
1650
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1617
1651
|
method: "GET",
|
|
1618
1652
|
query,
|
|
1619
1653
|
secure: true,
|
|
1620
1654
|
format: "json",
|
|
1621
1655
|
...params
|
|
1622
1656
|
}),
|
|
1623
|
-
|
|
1624
|
-
path: `/orgs/${organizationId}/
|
|
1657
|
+
startCapture: (organizationId, data, params = {}) => this.request({
|
|
1658
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1625
1659
|
method: "POST",
|
|
1626
1660
|
body: data,
|
|
1627
1661
|
secure: true,
|
|
@@ -1629,24 +1663,26 @@ var Api = class extends HttpClient {
|
|
|
1629
1663
|
format: "json",
|
|
1630
1664
|
...params
|
|
1631
1665
|
}),
|
|
1632
|
-
|
|
1633
|
-
path: `/orgs/${organizationId}/
|
|
1666
|
+
getCapture: (organizationId, captureId, query, params = {}) => this.request({
|
|
1667
|
+
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1634
1668
|
method: "GET",
|
|
1669
|
+
query,
|
|
1635
1670
|
secure: true,
|
|
1636
1671
|
format: "json",
|
|
1637
1672
|
...params
|
|
1638
1673
|
}),
|
|
1639
|
-
|
|
1640
|
-
path: `/orgs/${organizationId}/
|
|
1674
|
+
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1675
|
+
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1641
1676
|
method: "POST",
|
|
1642
1677
|
body: data,
|
|
1643
1678
|
secure: true,
|
|
1644
1679
|
type: "application/json" /* Json */,
|
|
1645
1680
|
...params
|
|
1646
1681
|
}),
|
|
1647
|
-
|
|
1648
|
-
path: `/orgs/${organizationId}/
|
|
1682
|
+
stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
|
|
1683
|
+
path: `/orgs/${organizationId}/captures/${captureId}/stop`,
|
|
1649
1684
|
method: "POST",
|
|
1685
|
+
query,
|
|
1650
1686
|
body: data,
|
|
1651
1687
|
secure: true,
|
|
1652
1688
|
type: "application/json" /* Json */,
|
|
@@ -1767,5 +1803,6 @@ export {
|
|
|
1767
1803
|
PurgeCDNCacheContextType,
|
|
1768
1804
|
SpaceRelationType,
|
|
1769
1805
|
SpaceType,
|
|
1770
|
-
TeamMemberRole
|
|
1806
|
+
TeamMemberRole,
|
|
1807
|
+
UserPreferencesTheme
|
|
1771
1808
|
};
|