@gitbook/api 0.6.0 → 0.8.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
@@ -162,7 +162,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
162
162
  return AnalyticsTrafficInterval2;
163
163
  })(AnalyticsTrafficInterval || {});
164
164
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
165
- IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
165
+ IntegrationScope2["EntitiesWrite"] = "entities:write";
166
166
  IntegrationScope2["RecordingWrite"] = "recording:write";
167
167
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
168
168
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
@@ -184,6 +184,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
184
184
  IntegrationCategory2["Collaboration"] = "collaboration";
185
185
  IntegrationCategory2["Marketing"] = "marketing";
186
186
  IntegrationCategory2["Content"] = "content";
187
+ IntegrationCategory2["Gitsync"] = "gitsync";
187
188
  IntegrationCategory2["Other"] = "other";
188
189
  return IntegrationCategory2;
189
190
  })(IntegrationCategory || {});
@@ -267,12 +268,16 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
267
268
  ContentKitIcon2["Link"] = "link";
268
269
  ContentKitIcon2["LinkExternal"] = "link-external";
269
270
  ContentKitIcon2["Eye"] = "eye";
271
+ ContentKitIcon2["Lock"] = "lock";
270
272
  return ContentKitIcon2;
271
273
  })(ContentKitIcon || {});
272
274
  var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
273
275
  CustomFieldType2["Text"] = "text";
274
276
  CustomFieldType2["Number"] = "number";
275
277
  CustomFieldType2["Boolean"] = "boolean";
278
+ CustomFieldType2["Tags"] = "tags";
279
+ CustomFieldType2["SelectMulti"] = "select:multi";
280
+ CustomFieldType2["SelectSingle"] = "select:single";
276
281
  return CustomFieldType2;
277
282
  })(CustomFieldType || {});
278
283
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
@@ -1048,43 +1053,6 @@ var Api = class extends HttpClient {
1048
1053
  secure: true,
1049
1054
  type: "application/json" /* Json */,
1050
1055
  ...params
1051
- }),
1052
- listSpaceEntities: (spaceId, query, params = {}) => this.request({
1053
- path: `/spaces/${spaceId}/entities`,
1054
- method: "GET",
1055
- query,
1056
- secure: true,
1057
- format: "json",
1058
- ...params
1059
- }),
1060
- addSpaceEntities: (spaceId, data, params = {}) => this.request({
1061
- path: `/spaces/${spaceId}/entities`,
1062
- method: "POST",
1063
- body: data,
1064
- secure: true,
1065
- type: "application/json" /* Json */,
1066
- ...params
1067
- }),
1068
- getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1069
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1070
- method: "GET",
1071
- secure: true,
1072
- format: "json",
1073
- ...params
1074
- }),
1075
- updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1076
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1077
- method: "PATCH",
1078
- body: data,
1079
- secure: true,
1080
- type: "application/json" /* Json */,
1081
- ...params
1082
- }),
1083
- deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1084
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1085
- method: "DELETE",
1086
- secure: true,
1087
- ...params
1088
1056
  })
1089
1057
  };
1090
1058
  this.collections = {
@@ -1239,6 +1207,14 @@ var Api = class extends HttpClient {
1239
1207
  format: "json",
1240
1208
  ...params
1241
1209
  }),
1210
+ queueIntegrationTask: (integrationName, data, params = {}) => this.request({
1211
+ path: `/integrations/${integrationName}/tasks`,
1212
+ method: "POST",
1213
+ body: data,
1214
+ secure: true,
1215
+ type: "application/json" /* Json */,
1216
+ ...params
1217
+ }),
1242
1218
  getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
1243
1219
  path: `/integrations/${integrationName}/installations/${installationId}`,
1244
1220
  method: "GET",
@@ -1277,6 +1253,13 @@ var Api = class extends HttpClient {
1277
1253
  format: "json",
1278
1254
  ...params
1279
1255
  }),
1256
+ getIntegrationSpaceInstallation: (integrationName, installationId, spaceId, params = {}) => this.request({
1257
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1258
+ method: "GET",
1259
+ secure: true,
1260
+ format: "json",
1261
+ ...params
1262
+ }),
1280
1263
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
1281
1264
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1282
1265
  method: "PATCH",
@@ -1291,21 +1274,6 @@ var Api = class extends HttpClient {
1291
1274
  method: "DELETE",
1292
1275
  secure: true,
1293
1276
  ...params
1294
- }),
1295
- getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1296
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1297
- method: "GET",
1298
- secure: true,
1299
- format: "json",
1300
- ...params
1301
- }),
1302
- syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1303
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1304
- method: "POST",
1305
- body: data,
1306
- secure: true,
1307
- type: "application/json" /* Json */,
1308
- ...params
1309
1277
  })
1310
1278
  };
1311
1279
  this.orgs = {
@@ -1622,14 +1590,6 @@ var Api = class extends HttpClient {
1622
1590
  format: "json",
1623
1591
  ...params
1624
1592
  }),
1625
- listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1626
- path: `/orgs/${organizationId}/entities`,
1627
- method: "GET",
1628
- query,
1629
- secure: true,
1630
- format: "json",
1631
- ...params
1632
- }),
1633
1593
  listEnvironments: (organizationId, query, params = {}) => this.request({
1634
1594
  path: `/orgs/${organizationId}/environments`,
1635
1595
  method: "GET",
@@ -1669,6 +1629,58 @@ var Api = class extends HttpClient {
1669
1629
  secure: true,
1670
1630
  ...params
1671
1631
  }),
1632
+ listEntitySchemas: (organizationId, query, params = {}) => this.request({
1633
+ path: `/orgs/${organizationId}/schemas`,
1634
+ method: "GET",
1635
+ query,
1636
+ secure: true,
1637
+ format: "json",
1638
+ ...params
1639
+ }),
1640
+ getEntitySchema: (organizationId, entityType, params = {}) => this.request({
1641
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1642
+ method: "GET",
1643
+ secure: true,
1644
+ format: "json",
1645
+ ...params
1646
+ }),
1647
+ setEntitySchema: (organizationId, entityType, data, params = {}) => this.request({
1648
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1649
+ method: "PUT",
1650
+ body: data,
1651
+ secure: true,
1652
+ type: "application/json" /* Json */,
1653
+ ...params
1654
+ }),
1655
+ deleteEntitySchema: (organizationId, entityType, params = {}) => this.request({
1656
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1657
+ method: "DELETE",
1658
+ secure: true,
1659
+ ...params
1660
+ }),
1661
+ listSchemaEntities: (organizationId, entityType, query, params = {}) => this.request({
1662
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1663
+ method: "GET",
1664
+ query,
1665
+ secure: true,
1666
+ format: "json",
1667
+ ...params
1668
+ }),
1669
+ upsertSchemaEntities: (organizationId, entityType, data, params = {}) => this.request({
1670
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1671
+ method: "PUT",
1672
+ body: data,
1673
+ secure: true,
1674
+ type: "application/json" /* Json */,
1675
+ ...params
1676
+ }),
1677
+ getEntity: (organizationId, entityType, entityId, params = {}) => this.request({
1678
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities/${entityId}`,
1679
+ method: "GET",
1680
+ secure: true,
1681
+ format: "json",
1682
+ ...params
1683
+ }),
1672
1684
  listRecordings: (organizationId, query, params = {}) => this.request({
1673
1685
  path: `/orgs/${organizationId}/recordings`,
1674
1686
  method: "GET",
package/dist/index.js CHANGED
@@ -105,7 +105,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
105
105
  return AnalyticsTrafficInterval2;
106
106
  })(AnalyticsTrafficInterval || {});
107
107
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
108
- IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
108
+ IntegrationScope2["EntitiesWrite"] = "entities:write";
109
109
  IntegrationScope2["RecordingWrite"] = "recording:write";
110
110
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
111
111
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
@@ -127,6 +127,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
127
127
  IntegrationCategory2["Collaboration"] = "collaboration";
128
128
  IntegrationCategory2["Marketing"] = "marketing";
129
129
  IntegrationCategory2["Content"] = "content";
130
+ IntegrationCategory2["Gitsync"] = "gitsync";
130
131
  IntegrationCategory2["Other"] = "other";
131
132
  return IntegrationCategory2;
132
133
  })(IntegrationCategory || {});
@@ -210,12 +211,16 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
210
211
  ContentKitIcon2["Link"] = "link";
211
212
  ContentKitIcon2["LinkExternal"] = "link-external";
212
213
  ContentKitIcon2["Eye"] = "eye";
214
+ ContentKitIcon2["Lock"] = "lock";
213
215
  return ContentKitIcon2;
214
216
  })(ContentKitIcon || {});
215
217
  var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
216
218
  CustomFieldType2["Text"] = "text";
217
219
  CustomFieldType2["Number"] = "number";
218
220
  CustomFieldType2["Boolean"] = "boolean";
221
+ CustomFieldType2["Tags"] = "tags";
222
+ CustomFieldType2["SelectMulti"] = "select:multi";
223
+ CustomFieldType2["SelectSingle"] = "select:single";
219
224
  return CustomFieldType2;
220
225
  })(CustomFieldType || {});
221
226
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
@@ -991,43 +996,6 @@ var Api = class extends HttpClient {
991
996
  secure: true,
992
997
  type: "application/json" /* Json */,
993
998
  ...params
994
- }),
995
- listSpaceEntities: (spaceId, query, params = {}) => this.request({
996
- path: `/spaces/${spaceId}/entities`,
997
- method: "GET",
998
- query,
999
- secure: true,
1000
- format: "json",
1001
- ...params
1002
- }),
1003
- addSpaceEntities: (spaceId, data, params = {}) => this.request({
1004
- path: `/spaces/${spaceId}/entities`,
1005
- method: "POST",
1006
- body: data,
1007
- secure: true,
1008
- type: "application/json" /* Json */,
1009
- ...params
1010
- }),
1011
- getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1012
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1013
- method: "GET",
1014
- secure: true,
1015
- format: "json",
1016
- ...params
1017
- }),
1018
- updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1019
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1020
- method: "PATCH",
1021
- body: data,
1022
- secure: true,
1023
- type: "application/json" /* Json */,
1024
- ...params
1025
- }),
1026
- deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1027
- path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1028
- method: "DELETE",
1029
- secure: true,
1030
- ...params
1031
999
  })
1032
1000
  };
1033
1001
  this.collections = {
@@ -1182,6 +1150,14 @@ var Api = class extends HttpClient {
1182
1150
  format: "json",
1183
1151
  ...params
1184
1152
  }),
1153
+ queueIntegrationTask: (integrationName, data, params = {}) => this.request({
1154
+ path: `/integrations/${integrationName}/tasks`,
1155
+ method: "POST",
1156
+ body: data,
1157
+ secure: true,
1158
+ type: "application/json" /* Json */,
1159
+ ...params
1160
+ }),
1185
1161
  getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
1186
1162
  path: `/integrations/${integrationName}/installations/${installationId}`,
1187
1163
  method: "GET",
@@ -1220,6 +1196,13 @@ var Api = class extends HttpClient {
1220
1196
  format: "json",
1221
1197
  ...params
1222
1198
  }),
1199
+ getIntegrationSpaceInstallation: (integrationName, installationId, spaceId, params = {}) => this.request({
1200
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1201
+ method: "GET",
1202
+ secure: true,
1203
+ format: "json",
1204
+ ...params
1205
+ }),
1223
1206
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
1224
1207
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1225
1208
  method: "PATCH",
@@ -1234,21 +1217,6 @@ var Api = class extends HttpClient {
1234
1217
  method: "DELETE",
1235
1218
  secure: true,
1236
1219
  ...params
1237
- }),
1238
- getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1239
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1240
- method: "GET",
1241
- secure: true,
1242
- format: "json",
1243
- ...params
1244
- }),
1245
- syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1246
- path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1247
- method: "POST",
1248
- body: data,
1249
- secure: true,
1250
- type: "application/json" /* Json */,
1251
- ...params
1252
1220
  })
1253
1221
  };
1254
1222
  this.orgs = {
@@ -1565,14 +1533,6 @@ var Api = class extends HttpClient {
1565
1533
  format: "json",
1566
1534
  ...params
1567
1535
  }),
1568
- listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1569
- path: `/orgs/${organizationId}/entities`,
1570
- method: "GET",
1571
- query,
1572
- secure: true,
1573
- format: "json",
1574
- ...params
1575
- }),
1576
1536
  listEnvironments: (organizationId, query, params = {}) => this.request({
1577
1537
  path: `/orgs/${organizationId}/environments`,
1578
1538
  method: "GET",
@@ -1612,6 +1572,58 @@ var Api = class extends HttpClient {
1612
1572
  secure: true,
1613
1573
  ...params
1614
1574
  }),
1575
+ listEntitySchemas: (organizationId, query, params = {}) => this.request({
1576
+ path: `/orgs/${organizationId}/schemas`,
1577
+ method: "GET",
1578
+ query,
1579
+ secure: true,
1580
+ format: "json",
1581
+ ...params
1582
+ }),
1583
+ getEntitySchema: (organizationId, entityType, params = {}) => this.request({
1584
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1585
+ method: "GET",
1586
+ secure: true,
1587
+ format: "json",
1588
+ ...params
1589
+ }),
1590
+ setEntitySchema: (organizationId, entityType, data, params = {}) => this.request({
1591
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1592
+ method: "PUT",
1593
+ body: data,
1594
+ secure: true,
1595
+ type: "application/json" /* Json */,
1596
+ ...params
1597
+ }),
1598
+ deleteEntitySchema: (organizationId, entityType, params = {}) => this.request({
1599
+ path: `/orgs/${organizationId}/schemas/${entityType}`,
1600
+ method: "DELETE",
1601
+ secure: true,
1602
+ ...params
1603
+ }),
1604
+ listSchemaEntities: (organizationId, entityType, query, params = {}) => this.request({
1605
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1606
+ method: "GET",
1607
+ query,
1608
+ secure: true,
1609
+ format: "json",
1610
+ ...params
1611
+ }),
1612
+ upsertSchemaEntities: (organizationId, entityType, data, params = {}) => this.request({
1613
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
1614
+ method: "PUT",
1615
+ body: data,
1616
+ secure: true,
1617
+ type: "application/json" /* Json */,
1618
+ ...params
1619
+ }),
1620
+ getEntity: (organizationId, entityType, entityId, params = {}) => this.request({
1621
+ path: `/orgs/${organizationId}/schemas/${entityType}/entities/${entityId}`,
1622
+ method: "GET",
1623
+ secure: true,
1624
+ format: "json",
1625
+ ...params
1626
+ }),
1615
1627
  listRecordings: (organizationId, query, params = {}) => this.request({
1616
1628
  path: `/orgs/${organizationId}/recordings`,
1617
1629
  method: "GET",
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.6.0",
7
+ "version": "0.8.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "spec/**",