@gitbook/api 0.5.0 → 0.7.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/index.cjs CHANGED
@@ -49,7 +49,6 @@ __export(src_exports, {
49
49
  OrganizationType: () => OrganizationType,
50
50
  OrganizationUseCase: () => OrganizationUseCase,
51
51
  PurgeCDNCacheContextType: () => PurgeCDNCacheContextType,
52
- RecordingContext: () => RecordingContext,
53
52
  SpaceRelationType: () => SpaceRelationType,
54
53
  SpaceType: () => SpaceType,
55
54
  TeamMemberRole: () => TeamMemberRole
@@ -138,12 +137,6 @@ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
138
137
  TeamMemberRole2["Participant"] = "participant";
139
138
  return TeamMemberRole2;
140
139
  })(TeamMemberRole || {});
141
- var RecordingContext = /* @__PURE__ */ ((RecordingContext2) => {
142
- RecordingContext2["Meeting"] = "meeting";
143
- RecordingContext2["Conversation"] = "conversation";
144
- RecordingContext2["Walkthrough"] = "walkthrough";
145
- return RecordingContext2;
146
- })(RecordingContext || {});
147
140
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
148
141
  ChangeRequestStatus2["Draft"] = "draft";
149
142
  ChangeRequestStatus2["Open"] = "open";
@@ -169,7 +162,8 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
169
162
  return AnalyticsTrafficInterval2;
170
163
  })(AnalyticsTrafficInterval || {});
171
164
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
172
- IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
165
+ IntegrationScope2["EntitiesWrite"] = "entities:write";
166
+ IntegrationScope2["RecordingWrite"] = "recording:write";
173
167
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
174
168
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
175
169
  IntegrationScope2["SpaceContentWrite"] = "space:content:write";
@@ -262,6 +256,7 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
262
256
  ContentKitIcon2["Close"] = "close";
263
257
  ContentKitIcon2["Edit"] = "edit";
264
258
  ContentKitIcon2["Github"] = "github";
259
+ ContentKitIcon2["Gitlab"] = "gitlab";
265
260
  ContentKitIcon2["Maximize"] = "maximize";
266
261
  ContentKitIcon2["Email"] = "email";
267
262
  ContentKitIcon2["Settings"] = "settings";
@@ -271,12 +266,14 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
271
266
  ContentKitIcon2["Warning"] = "warning";
272
267
  ContentKitIcon2["Link"] = "link";
273
268
  ContentKitIcon2["LinkExternal"] = "link-external";
269
+ ContentKitIcon2["Eye"] = "eye";
274
270
  return ContentKitIcon2;
275
271
  })(ContentKitIcon || {});
276
272
  var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
277
273
  CustomFieldType2["Text"] = "text";
278
274
  CustomFieldType2["Number"] = "number";
279
275
  CustomFieldType2["Boolean"] = "boolean";
276
+ CustomFieldType2["Tags"] = "tags";
280
277
  return CustomFieldType2;
281
278
  })(CustomFieldType || {});
282
279
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
@@ -1052,43 +1049,6 @@ var Api = class extends HttpClient {
1052
1049
  secure: true,
1053
1050
  type: "application/json" /* Json */,
1054
1051
  ...params
1055
- }),
1056
- listSpaceEntities: (spaceId, query, params = {}) => this.request({
1057
- path: `/spaces/${spaceId}/entities`,
1058
- method: "GET",
1059
- query,
1060
- secure: true,
1061
- format: "json",
1062
- ...params
1063
- }),
1064
- addSpaceEntities: (spaceId, data, params = {}) => this.request({
1065
- path: `/spaces/${spaceId}/entities`,
1066
- method: "POST",
1067
- body: data,
1068
- secure: true,
1069
- type: "application/json" /* Json */,
1070
- ...params
1071
- }),
1072
- getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1073
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1074
- method: "GET",
1075
- secure: true,
1076
- format: "json",
1077
- ...params
1078
- }),
1079
- updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1080
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1081
- method: "PATCH",
1082
- body: data,
1083
- secure: true,
1084
- type: "application/json" /* Json */,
1085
- ...params
1086
- }),
1087
- deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1088
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1089
- method: "DELETE",
1090
- secure: true,
1091
- ...params
1092
1052
  })
1093
1053
  };
1094
1054
  this.collections = {
@@ -1281,6 +1241,13 @@ var Api = class extends HttpClient {
1281
1241
  format: "json",
1282
1242
  ...params
1283
1243
  }),
1244
+ getIntegrationSpaceInstallation: (integrationName, installationId, spaceId, params = {}) => this.request({
1245
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1246
+ method: "GET",
1247
+ secure: true,
1248
+ format: "json",
1249
+ ...params
1250
+ }),
1284
1251
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
1285
1252
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1286
1253
  method: "PATCH",
@@ -1295,21 +1262,6 @@ var Api = class extends HttpClient {
1295
1262
  method: "DELETE",
1296
1263
  secure: true,
1297
1264
  ...params
1298
- }),
1299
- getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1300
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1301
- method: "GET",
1302
- secure: true,
1303
- format: "json",
1304
- ...params
1305
- }),
1306
- syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1307
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1308
- method: "POST",
1309
- body: data,
1310
- secure: true,
1311
- type: "application/json" /* Json */,
1312
- ...params
1313
1265
  })
1314
1266
  };
1315
1267
  this.orgs = {
@@ -1626,14 +1578,6 @@ var Api = class extends HttpClient {
1626
1578
  format: "json",
1627
1579
  ...params
1628
1580
  }),
1629
- listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1630
- path: `/orgs/${organizationId}/entities`,
1631
- method: "GET",
1632
- query,
1633
- secure: true,
1634
- format: "json",
1635
- ...params
1636
- }),
1637
1581
  listEnvironments: (organizationId, query, params = {}) => this.request({
1638
1582
  path: `/orgs/${organizationId}/environments`,
1639
1583
  method: "GET",
@@ -1673,6 +1617,66 @@ var Api = class extends HttpClient {
1673
1617
  secure: true,
1674
1618
  ...params
1675
1619
  }),
1620
+ listEntitySchemas: (organizationId, query, params = {}) => this.request({
1621
+ path: `/orgs/${organizationId}/schemas`,
1622
+ method: "GET",
1623
+ query,
1624
+ secure: true,
1625
+ format: "json",
1626
+ ...params
1627
+ }),
1628
+ getEntitySchema: (organizationId, entityType, params = {}) => this.request({
1629
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1630
+ method: "GET",
1631
+ secure: true,
1632
+ format: "json",
1633
+ ...params
1634
+ }),
1635
+ setEntitySchema: (organizationId, entityType, data, params = {}) => this.request({
1636
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1637
+ method: "PUT",
1638
+ body: data,
1639
+ secure: true,
1640
+ type: "application/json" /* Json */,
1641
+ ...params
1642
+ }),
1643
+ deleteEntitySchema: (organizationId, entityType, params = {}) => this.request({
1644
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1645
+ method: "DELETE",
1646
+ secure: true,
1647
+ ...params
1648
+ }),
1649
+ listSchemaEntities: (organizationId, entityType, query, params = {}) => this.request({
1650
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1651
+ method: "GET",
1652
+ query,
1653
+ secure: true,
1654
+ format: "json",
1655
+ ...params
1656
+ }),
1657
+ upsertSchemaEntities: (organizationId, entityType, data, params = {}) => this.request({
1658
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1659
+ method: "PUT",
1660
+ body: data,
1661
+ secure: true,
1662
+ type: "application/json" /* Json */,
1663
+ ...params
1664
+ }),
1665
+ getEntity: (organizationId, entityType, entityId, params = {}) => this.request({
1666
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities/${entityId}`,
1667
+ method: "GET",
1668
+ secure: true,
1669
+ format: "json",
1670
+ ...params
1671
+ }),
1672
+ listRecordings: (organizationId, query, params = {}) => this.request({
1673
+ path: `/orgs/${organizationId}/recordings`,
1674
+ method: "GET",
1675
+ query,
1676
+ secure: true,
1677
+ format: "json",
1678
+ ...params
1679
+ }),
1676
1680
  startRecording: (organizationId, data, params = {}) => this.request({
1677
1681
  path: `/orgs/${organizationId}/recordings`,
1678
1682
  method: "POST",
@@ -1682,6 +1686,13 @@ var Api = class extends HttpClient {
1682
1686
  format: "json",
1683
1687
  ...params
1684
1688
  }),
1689
+ getRecording: (organizationId, recordingId, params = {}) => this.request({
1690
+ path: `/orgs/${organizationId}/recordings/${recordingId}`,
1691
+ method: "GET",
1692
+ secure: true,
1693
+ format: "json",
1694
+ ...params
1695
+ }),
1685
1696
  addEventsToRecording: (organizationId, recordingId, data, params = {}) => this.request({
1686
1697
  path: `/orgs/${organizationId}/recordings/${recordingId}/events`,
1687
1698
  method: "POST",
@@ -1690,10 +1701,12 @@ var Api = class extends HttpClient {
1690
1701
  type: "application/json" /* Json */,
1691
1702
  ...params
1692
1703
  }),
1693
- stopRecording: (organizationId, recordingId, params = {}) => this.request({
1704
+ stopRecording: (organizationId, recordingId, data, params = {}) => this.request({
1694
1705
  path: `/orgs/${organizationId}/recordings/${recordingId}/stop`,
1695
1706
  method: "POST",
1707
+ body: data,
1696
1708
  secure: true,
1709
+ type: "application/json" /* Json */,
1697
1710
  format: "json",
1698
1711
  ...params
1699
1712
  })
@@ -1810,7 +1823,6 @@ var GitBookAPI = class extends Api {
1810
1823
  OrganizationType,
1811
1824
  OrganizationUseCase,
1812
1825
  PurgeCDNCacheContextType,
1813
- RecordingContext,
1814
1826
  SpaceRelationType,
1815
1827
  SpaceType,
1816
1828
  TeamMemberRole
package/dist/index.js CHANGED
@@ -80,12 +80,6 @@ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
80
80
  TeamMemberRole2["Participant"] = "participant";
81
81
  return TeamMemberRole2;
82
82
  })(TeamMemberRole || {});
83
- var RecordingContext = /* @__PURE__ */ ((RecordingContext2) => {
84
- RecordingContext2["Meeting"] = "meeting";
85
- RecordingContext2["Conversation"] = "conversation";
86
- RecordingContext2["Walkthrough"] = "walkthrough";
87
- return RecordingContext2;
88
- })(RecordingContext || {});
89
83
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
90
84
  ChangeRequestStatus2["Draft"] = "draft";
91
85
  ChangeRequestStatus2["Open"] = "open";
@@ -111,7 +105,8 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
111
105
  return AnalyticsTrafficInterval2;
112
106
  })(AnalyticsTrafficInterval || {});
113
107
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
114
- IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
108
+ IntegrationScope2["EntitiesWrite"] = "entities:write";
109
+ IntegrationScope2["RecordingWrite"] = "recording:write";
115
110
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
116
111
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
117
112
  IntegrationScope2["SpaceContentWrite"] = "space:content:write";
@@ -204,6 +199,7 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
204
199
  ContentKitIcon2["Close"] = "close";
205
200
  ContentKitIcon2["Edit"] = "edit";
206
201
  ContentKitIcon2["Github"] = "github";
202
+ ContentKitIcon2["Gitlab"] = "gitlab";
207
203
  ContentKitIcon2["Maximize"] = "maximize";
208
204
  ContentKitIcon2["Email"] = "email";
209
205
  ContentKitIcon2["Settings"] = "settings";
@@ -213,12 +209,14 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
213
209
  ContentKitIcon2["Warning"] = "warning";
214
210
  ContentKitIcon2["Link"] = "link";
215
211
  ContentKitIcon2["LinkExternal"] = "link-external";
212
+ ContentKitIcon2["Eye"] = "eye";
216
213
  return ContentKitIcon2;
217
214
  })(ContentKitIcon || {});
218
215
  var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
219
216
  CustomFieldType2["Text"] = "text";
220
217
  CustomFieldType2["Number"] = "number";
221
218
  CustomFieldType2["Boolean"] = "boolean";
219
+ CustomFieldType2["Tags"] = "tags";
222
220
  return CustomFieldType2;
223
221
  })(CustomFieldType || {});
224
222
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
@@ -994,43 +992,6 @@ var Api = class extends HttpClient {
994
992
  secure: true,
995
993
  type: "application/json" /* Json */,
996
994
  ...params
997
- }),
998
- listSpaceEntities: (spaceId, query, params = {}) => this.request({
999
- path: `/spaces/${spaceId}/entities`,
1000
- method: "GET",
1001
- query,
1002
- secure: true,
1003
- format: "json",
1004
- ...params
1005
- }),
1006
- addSpaceEntities: (spaceId, data, params = {}) => this.request({
1007
- path: `/spaces/${spaceId}/entities`,
1008
- method: "POST",
1009
- body: data,
1010
- secure: true,
1011
- type: "application/json" /* Json */,
1012
- ...params
1013
- }),
1014
- getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1015
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1016
- method: "GET",
1017
- secure: true,
1018
- format: "json",
1019
- ...params
1020
- }),
1021
- updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1022
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1023
- method: "PATCH",
1024
- body: data,
1025
- secure: true,
1026
- type: "application/json" /* Json */,
1027
- ...params
1028
- }),
1029
- deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1030
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1031
- method: "DELETE",
1032
- secure: true,
1033
- ...params
1034
995
  })
1035
996
  };
1036
997
  this.collections = {
@@ -1223,6 +1184,13 @@ var Api = class extends HttpClient {
1223
1184
  format: "json",
1224
1185
  ...params
1225
1186
  }),
1187
+ getIntegrationSpaceInstallation: (integrationName, installationId, spaceId, params = {}) => this.request({
1188
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1189
+ method: "GET",
1190
+ secure: true,
1191
+ format: "json",
1192
+ ...params
1193
+ }),
1226
1194
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
1227
1195
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1228
1196
  method: "PATCH",
@@ -1237,21 +1205,6 @@ var Api = class extends HttpClient {
1237
1205
  method: "DELETE",
1238
1206
  secure: true,
1239
1207
  ...params
1240
- }),
1241
- getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1242
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1243
- method: "GET",
1244
- secure: true,
1245
- format: "json",
1246
- ...params
1247
- }),
1248
- syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1249
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1250
- method: "POST",
1251
- body: data,
1252
- secure: true,
1253
- type: "application/json" /* Json */,
1254
- ...params
1255
1208
  })
1256
1209
  };
1257
1210
  this.orgs = {
@@ -1568,14 +1521,6 @@ var Api = class extends HttpClient {
1568
1521
  format: "json",
1569
1522
  ...params
1570
1523
  }),
1571
- listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1572
- path: `/orgs/${organizationId}/entities`,
1573
- method: "GET",
1574
- query,
1575
- secure: true,
1576
- format: "json",
1577
- ...params
1578
- }),
1579
1524
  listEnvironments: (organizationId, query, params = {}) => this.request({
1580
1525
  path: `/orgs/${organizationId}/environments`,
1581
1526
  method: "GET",
@@ -1615,6 +1560,66 @@ var Api = class extends HttpClient {
1615
1560
  secure: true,
1616
1561
  ...params
1617
1562
  }),
1563
+ listEntitySchemas: (organizationId, query, params = {}) => this.request({
1564
+ path: `/orgs/${organizationId}/schemas`,
1565
+ method: "GET",
1566
+ query,
1567
+ secure: true,
1568
+ format: "json",
1569
+ ...params
1570
+ }),
1571
+ getEntitySchema: (organizationId, entityType, params = {}) => this.request({
1572
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1573
+ method: "GET",
1574
+ secure: true,
1575
+ format: "json",
1576
+ ...params
1577
+ }),
1578
+ setEntitySchema: (organizationId, entityType, data, params = {}) => this.request({
1579
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1580
+ method: "PUT",
1581
+ body: data,
1582
+ secure: true,
1583
+ type: "application/json" /* Json */,
1584
+ ...params
1585
+ }),
1586
+ deleteEntitySchema: (organizationId, entityType, params = {}) => this.request({
1587
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1588
+ method: "DELETE",
1589
+ secure: true,
1590
+ ...params
1591
+ }),
1592
+ listSchemaEntities: (organizationId, entityType, query, params = {}) => this.request({
1593
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1594
+ method: "GET",
1595
+ query,
1596
+ secure: true,
1597
+ format: "json",
1598
+ ...params
1599
+ }),
1600
+ upsertSchemaEntities: (organizationId, entityType, data, params = {}) => this.request({
1601
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1602
+ method: "PUT",
1603
+ body: data,
1604
+ secure: true,
1605
+ type: "application/json" /* Json */,
1606
+ ...params
1607
+ }),
1608
+ getEntity: (organizationId, entityType, entityId, params = {}) => this.request({
1609
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities/${entityId}`,
1610
+ method: "GET",
1611
+ secure: true,
1612
+ format: "json",
1613
+ ...params
1614
+ }),
1615
+ listRecordings: (organizationId, query, params = {}) => this.request({
1616
+ path: `/orgs/${organizationId}/recordings`,
1617
+ method: "GET",
1618
+ query,
1619
+ secure: true,
1620
+ format: "json",
1621
+ ...params
1622
+ }),
1618
1623
  startRecording: (organizationId, data, params = {}) => this.request({
1619
1624
  path: `/orgs/${organizationId}/recordings`,
1620
1625
  method: "POST",
@@ -1624,6 +1629,13 @@ var Api = class extends HttpClient {
1624
1629
  format: "json",
1625
1630
  ...params
1626
1631
  }),
1632
+ getRecording: (organizationId, recordingId, params = {}) => this.request({
1633
+ path: `/orgs/${organizationId}/recordings/${recordingId}`,
1634
+ method: "GET",
1635
+ secure: true,
1636
+ format: "json",
1637
+ ...params
1638
+ }),
1627
1639
  addEventsToRecording: (organizationId, recordingId, data, params = {}) => this.request({
1628
1640
  path: `/orgs/${organizationId}/recordings/${recordingId}/events`,
1629
1641
  method: "POST",
@@ -1632,10 +1644,12 @@ var Api = class extends HttpClient {
1632
1644
  type: "application/json" /* Json */,
1633
1645
  ...params
1634
1646
  }),
1635
- stopRecording: (organizationId, recordingId, params = {}) => this.request({
1647
+ stopRecording: (organizationId, recordingId, data, params = {}) => this.request({
1636
1648
  path: `/orgs/${organizationId}/recordings/${recordingId}/stop`,
1637
1649
  method: "POST",
1650
+ body: data,
1638
1651
  secure: true,
1652
+ type: "application/json" /* Json */,
1639
1653
  format: "json",
1640
1654
  ...params
1641
1655
  })
@@ -1751,7 +1765,6 @@ export {
1751
1765
  OrganizationType,
1752
1766
  OrganizationUseCase,
1753
1767
  PurgeCDNCacheContextType,
1754
- RecordingContext,
1755
1768
  SpaceRelationType,
1756
1769
  SpaceType,
1757
1770
  TeamMemberRole
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.5.0",
7
+ "version": "0.7.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "spec/**",