@gitbook/api 0.11.1 → 0.13.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
@@ -34,6 +34,11 @@ __export(src_exports, {
34
34
  ContentType: () => ContentType,
35
35
  ContentVisibility: () => ContentVisibility,
36
36
  CustomFieldType: () => CustomFieldType,
37
+ CustomizationCorners: () => CustomizationCorners,
38
+ CustomizationFont: () => CustomizationFont,
39
+ CustomizationHeaderPreset: () => CustomizationHeaderPreset,
40
+ CustomizationLocale: () => CustomizationLocale,
41
+ CustomizationThemeMode: () => CustomizationThemeMode,
37
42
  GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
38
43
  GitBookAPI: () => GitBookAPI,
39
44
  GitSyncOperationState: () => GitSyncOperationState,
@@ -268,6 +273,49 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
268
273
  CustomFieldType2["SelectSingle"] = "select:single";
269
274
  return CustomFieldType2;
270
275
  })(CustomFieldType || {});
276
+ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
277
+ CustomizationLocale2["En"] = "en";
278
+ CustomizationLocale2["Fr"] = "fr";
279
+ CustomizationLocale2["Es"] = "es";
280
+ CustomizationLocale2["Zh"] = "zh";
281
+ CustomizationLocale2["Ja"] = "ja";
282
+ return CustomizationLocale2;
283
+ })(CustomizationLocale || {});
284
+ var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
285
+ CustomizationFont2["Inter"] = "Inter";
286
+ CustomizationFont2["Roboto"] = "Roboto";
287
+ CustomizationFont2["RobotoSlab"] = "RobotoSlab";
288
+ CustomizationFont2["OpenSans"] = "OpenSans";
289
+ CustomizationFont2["SourceSansPro"] = "SourceSansPro";
290
+ CustomizationFont2["Lato"] = "Lato";
291
+ CustomizationFont2["Ubuntu"] = "Ubuntu";
292
+ CustomizationFont2["Raleway"] = "Raleway";
293
+ CustomizationFont2["Merriweather"] = "Merriweather";
294
+ CustomizationFont2["Overpass"] = "Overpass";
295
+ CustomizationFont2["NotoSans"] = "NotoSans";
296
+ CustomizationFont2["IBMPlexSerif"] = "IBMPlexSerif";
297
+ CustomizationFont2["Poppins"] = "Poppins";
298
+ CustomizationFont2["FiraSans"] = "FiraSans";
299
+ return CustomizationFont2;
300
+ })(CustomizationFont || {});
301
+ var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
302
+ CustomizationHeaderPreset2["Default"] = "default";
303
+ CustomizationHeaderPreset2["Bold"] = "bold";
304
+ CustomizationHeaderPreset2["Contrast"] = "contrast";
305
+ CustomizationHeaderPreset2["Custom"] = "custom";
306
+ CustomizationHeaderPreset2["None"] = "none";
307
+ return CustomizationHeaderPreset2;
308
+ })(CustomizationHeaderPreset || {});
309
+ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
310
+ CustomizationThemeMode2["Light"] = "light";
311
+ CustomizationThemeMode2["Dark"] = "dark";
312
+ return CustomizationThemeMode2;
313
+ })(CustomizationThemeMode || {});
314
+ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
315
+ CustomizationCorners2["Straight"] = "straight";
316
+ CustomizationCorners2["Rounded"] = "rounded";
317
+ return CustomizationCorners2;
318
+ })(CustomizationCorners || {});
271
319
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
272
320
  ContentType2["Json"] = "application/json";
273
321
  ContentType2["FormData"] = "multipart/form-data";
@@ -964,6 +1012,22 @@ var Api = class extends HttpClient {
964
1012
  format: "json",
965
1013
  ...params
966
1014
  }),
1015
+ getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
1016
+ path: `/spaces/${spaceId}/publishing/customization`,
1017
+ method: "GET",
1018
+ secure: true,
1019
+ format: "json",
1020
+ ...params
1021
+ }),
1022
+ updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
1023
+ path: `/spaces/${spaceId}/publishing/customization`,
1024
+ method: "PUT",
1025
+ body: data,
1026
+ secure: true,
1027
+ type: "application/json" /* Json */,
1028
+ format: "json",
1029
+ ...params
1030
+ }),
967
1031
  getSpacePublishingAuthById: (spaceId, params = {}) => this.request({
968
1032
  path: `/spaces/${spaceId}/publishing/auth`,
969
1033
  method: "GET",
@@ -1053,6 +1117,22 @@ var Api = class extends HttpClient {
1053
1117
  type: "application/json" /* Json */,
1054
1118
  format: "json",
1055
1119
  ...params
1120
+ }),
1121
+ getCollectionPublishingCustomizationById: (collectionId, params = {}) => this.request({
1122
+ path: `/collections/${collectionId}/publishing/customization`,
1123
+ method: "GET",
1124
+ secure: true,
1125
+ format: "json",
1126
+ ...params
1127
+ }),
1128
+ updateCollectionPublishingCustomizationById: (collectionId, data, params = {}) => this.request({
1129
+ path: `/collections/${collectionId}/publishing/customization`,
1130
+ method: "PUT",
1131
+ body: data,
1132
+ secure: true,
1133
+ type: "application/json" /* Json */,
1134
+ format: "json",
1135
+ ...params
1056
1136
  })
1057
1137
  };
1058
1138
  this.integrations = {
@@ -1478,6 +1558,15 @@ var Api = class extends HttpClient {
1478
1558
  format: "json",
1479
1559
  ...params
1480
1560
  }),
1561
+ createCollection: (organizationId, data, params = {}) => this.request({
1562
+ path: `/orgs/${organizationId}/collections`,
1563
+ method: "POST",
1564
+ body: data,
1565
+ secure: true,
1566
+ type: "application/json" /* Json */,
1567
+ format: "json",
1568
+ ...params
1569
+ }),
1481
1570
  setupDirectorySync: (organizationId, params = {}) => this.request({
1482
1571
  path: `/orgs/${organizationId}/dsync`,
1483
1572
  method: "POST",
@@ -1781,6 +1870,11 @@ var GitBookAPI = class extends Api {
1781
1870
  ContentType,
1782
1871
  ContentVisibility,
1783
1872
  CustomFieldType,
1873
+ CustomizationCorners,
1874
+ CustomizationFont,
1875
+ CustomizationHeaderPreset,
1876
+ CustomizationLocale,
1877
+ CustomizationThemeMode,
1784
1878
  GITBOOK_DEFAULT_ENDPOINT,
1785
1879
  GitBookAPI,
1786
1880
  GitSyncOperationState,
package/dist/index.js CHANGED
@@ -212,6 +212,49 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
212
212
  CustomFieldType2["SelectSingle"] = "select:single";
213
213
  return CustomFieldType2;
214
214
  })(CustomFieldType || {});
215
+ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
216
+ CustomizationLocale2["En"] = "en";
217
+ CustomizationLocale2["Fr"] = "fr";
218
+ CustomizationLocale2["Es"] = "es";
219
+ CustomizationLocale2["Zh"] = "zh";
220
+ CustomizationLocale2["Ja"] = "ja";
221
+ return CustomizationLocale2;
222
+ })(CustomizationLocale || {});
223
+ var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
224
+ CustomizationFont2["Inter"] = "Inter";
225
+ CustomizationFont2["Roboto"] = "Roboto";
226
+ CustomizationFont2["RobotoSlab"] = "RobotoSlab";
227
+ CustomizationFont2["OpenSans"] = "OpenSans";
228
+ CustomizationFont2["SourceSansPro"] = "SourceSansPro";
229
+ CustomizationFont2["Lato"] = "Lato";
230
+ CustomizationFont2["Ubuntu"] = "Ubuntu";
231
+ CustomizationFont2["Raleway"] = "Raleway";
232
+ CustomizationFont2["Merriweather"] = "Merriweather";
233
+ CustomizationFont2["Overpass"] = "Overpass";
234
+ CustomizationFont2["NotoSans"] = "NotoSans";
235
+ CustomizationFont2["IBMPlexSerif"] = "IBMPlexSerif";
236
+ CustomizationFont2["Poppins"] = "Poppins";
237
+ CustomizationFont2["FiraSans"] = "FiraSans";
238
+ return CustomizationFont2;
239
+ })(CustomizationFont || {});
240
+ var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
241
+ CustomizationHeaderPreset2["Default"] = "default";
242
+ CustomizationHeaderPreset2["Bold"] = "bold";
243
+ CustomizationHeaderPreset2["Contrast"] = "contrast";
244
+ CustomizationHeaderPreset2["Custom"] = "custom";
245
+ CustomizationHeaderPreset2["None"] = "none";
246
+ return CustomizationHeaderPreset2;
247
+ })(CustomizationHeaderPreset || {});
248
+ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
249
+ CustomizationThemeMode2["Light"] = "light";
250
+ CustomizationThemeMode2["Dark"] = "dark";
251
+ return CustomizationThemeMode2;
252
+ })(CustomizationThemeMode || {});
253
+ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
254
+ CustomizationCorners2["Straight"] = "straight";
255
+ CustomizationCorners2["Rounded"] = "rounded";
256
+ return CustomizationCorners2;
257
+ })(CustomizationCorners || {});
215
258
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
216
259
  ContentType2["Json"] = "application/json";
217
260
  ContentType2["FormData"] = "multipart/form-data";
@@ -908,6 +951,22 @@ var Api = class extends HttpClient {
908
951
  format: "json",
909
952
  ...params
910
953
  }),
954
+ getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
955
+ path: `/spaces/${spaceId}/publishing/customization`,
956
+ method: "GET",
957
+ secure: true,
958
+ format: "json",
959
+ ...params
960
+ }),
961
+ updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
962
+ path: `/spaces/${spaceId}/publishing/customization`,
963
+ method: "PUT",
964
+ body: data,
965
+ secure: true,
966
+ type: "application/json" /* Json */,
967
+ format: "json",
968
+ ...params
969
+ }),
911
970
  getSpacePublishingAuthById: (spaceId, params = {}) => this.request({
912
971
  path: `/spaces/${spaceId}/publishing/auth`,
913
972
  method: "GET",
@@ -997,6 +1056,22 @@ var Api = class extends HttpClient {
997
1056
  type: "application/json" /* Json */,
998
1057
  format: "json",
999
1058
  ...params
1059
+ }),
1060
+ getCollectionPublishingCustomizationById: (collectionId, params = {}) => this.request({
1061
+ path: `/collections/${collectionId}/publishing/customization`,
1062
+ method: "GET",
1063
+ secure: true,
1064
+ format: "json",
1065
+ ...params
1066
+ }),
1067
+ updateCollectionPublishingCustomizationById: (collectionId, data, params = {}) => this.request({
1068
+ path: `/collections/${collectionId}/publishing/customization`,
1069
+ method: "PUT",
1070
+ body: data,
1071
+ secure: true,
1072
+ type: "application/json" /* Json */,
1073
+ format: "json",
1074
+ ...params
1000
1075
  })
1001
1076
  };
1002
1077
  this.integrations = {
@@ -1422,6 +1497,15 @@ var Api = class extends HttpClient {
1422
1497
  format: "json",
1423
1498
  ...params
1424
1499
  }),
1500
+ createCollection: (organizationId, data, params = {}) => this.request({
1501
+ path: `/orgs/${organizationId}/collections`,
1502
+ method: "POST",
1503
+ body: data,
1504
+ secure: true,
1505
+ type: "application/json" /* Json */,
1506
+ format: "json",
1507
+ ...params
1508
+ }),
1425
1509
  setupDirectorySync: (organizationId, params = {}) => this.request({
1426
1510
  path: `/orgs/${organizationId}/dsync`,
1427
1511
  method: "POST",
@@ -1724,6 +1808,11 @@ export {
1724
1808
  ContentType,
1725
1809
  ContentVisibility,
1726
1810
  CustomFieldType,
1811
+ CustomizationCorners,
1812
+ CustomizationFont,
1813
+ CustomizationHeaderPreset,
1814
+ CustomizationLocale,
1815
+ CustomizationThemeMode,
1727
1816
  GITBOOK_DEFAULT_ENDPOINT,
1728
1817
  GitBookAPI,
1729
1818
  GitSyncOperationState,
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.11.1",
7
+ "version": "0.13.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",