@gitbook/api 0.64.1 → 0.66.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
@@ -192,6 +192,7 @@ __export(src_exports, {
192
192
  CloudflareHostnameTLSStatus: () => CloudflareHostnameTLSStatus,
193
193
  CloudflareHostnameTLSValidationMethod: () => CloudflareHostnameTLSValidationMethod,
194
194
  ContentKitIcon: () => ContentKitIcon,
195
+ ContentReferenceRelation: () => ContentReferenceRelation,
195
196
  ContentReferenceStatus: () => ContentReferenceStatus,
196
197
  ContentType: () => ContentType,
197
198
  ContentVisibility: () => ContentVisibility,
@@ -241,7 +242,7 @@ module.exports = __toCommonJS(src_exports);
241
242
 
242
243
  // package.json
243
244
  var name = "@gitbook/api";
244
- var version = "0.64.1";
245
+ var version = "0.66.0";
245
246
 
246
247
  // src/client.ts
247
248
  var import_event_iterator = __toESM(require_node(), 1);
@@ -505,6 +506,11 @@ var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
505
506
  ContentReferenceStatus2["InApp"] = "in-app";
506
507
  return ContentReferenceStatus2;
507
508
  })(ContentReferenceStatus || {});
509
+ var ContentReferenceRelation = /* @__PURE__ */ ((ContentReferenceRelation2) => {
510
+ ContentReferenceRelation2["Reference"] = "reference";
511
+ ContentReferenceRelation2["DependsOn"] = "dependsOn";
512
+ return ContentReferenceRelation2;
513
+ })(ContentReferenceRelation || {});
508
514
  var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
509
515
  ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
510
516
  ChangeRequestReviewStatus2["Approved"] = "approved";
@@ -514,6 +520,7 @@ var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
514
520
  RevisionPageType2["Document"] = "document";
515
521
  RevisionPageType2["Group"] = "group";
516
522
  RevisionPageType2["Link"] = "link";
523
+ RevisionPageType2["Computed"] = "computed";
517
524
  return RevisionPageType2;
518
525
  })(RevisionPageType || {});
519
526
  var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
@@ -653,6 +660,7 @@ var SiteType = /* @__PURE__ */ ((SiteType2) => {
653
660
  SiteType2["Basic"] = "basic";
654
661
  SiteType2["Premium"] = "premium";
655
662
  SiteType2["Ultimate"] = "ultimate";
663
+ SiteType2["Sponsored"] = "sponsored";
656
664
  SiteType2["LegacyBasic"] = "legacy-basic";
657
665
  SiteType2["LegacyPremium"] = "legacy-premium";
658
666
  return SiteType2;
@@ -797,7 +805,9 @@ var HttpClient = class {
797
805
  };
798
806
  encodeQueryParam(key, value) {
799
807
  const encodedKey = encodeURIComponent(key);
800
- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
808
+ return `${encodedKey}=${encodeURIComponent(
809
+ typeof value === "number" ? value : `${value}`
810
+ )}`;
801
811
  }
802
812
  addQueryParam(query, key) {
803
813
  return this.encodeQueryParam(key, query[key]);
@@ -1305,6 +1315,16 @@ var Api = class extends HttpClient {
1305
1315
  format: "json",
1306
1316
  ...params
1307
1317
  }),
1318
+ computePageDocument: (spaceId, data, query, params = {}) => this.request({
1319
+ path: `/spaces/${spaceId}/content/computed/document`,
1320
+ method: "POST",
1321
+ query,
1322
+ body: data,
1323
+ secure: true,
1324
+ type: "application/json" /* Json */,
1325
+ format: "json",
1326
+ ...params
1327
+ }),
1308
1328
  getDocumentById: (spaceId, documentId, query, params = {}) => this.request({
1309
1329
  path: `/spaces/${spaceId}/documents/${documentId}`,
1310
1330
  method: "GET",
@@ -1597,6 +1617,13 @@ var Api = class extends HttpClient {
1597
1617
  format: "json",
1598
1618
  ...params
1599
1619
  }),
1620
+ getSyncedBlockContentInChangeRequest: (spaceId, changeRequestId, syncedBlockId, params = {}) => this.request({
1621
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/synced-blocks/${syncedBlockId}/content`,
1622
+ method: "GET",
1623
+ secure: true,
1624
+ format: "json",
1625
+ ...params
1626
+ }),
1600
1627
  getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1601
1628
  path: `/spaces/${spaceId}/revisions/${revisionId}`,
1602
1629
  method: "GET",
@@ -3360,6 +3387,7 @@ var GitBookAPI = class extends Api {
3360
3387
  CloudflareHostnameTLSStatus,
3361
3388
  CloudflareHostnameTLSValidationMethod,
3362
3389
  ContentKitIcon,
3390
+ ContentReferenceRelation,
3363
3391
  ContentReferenceStatus,
3364
3392
  ContentType,
3365
3393
  ContentVisibility,
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.64.1";
175
+ var version = "0.66.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -436,6 +436,11 @@ var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
436
436
  ContentReferenceStatus2["InApp"] = "in-app";
437
437
  return ContentReferenceStatus2;
438
438
  })(ContentReferenceStatus || {});
439
+ var ContentReferenceRelation = /* @__PURE__ */ ((ContentReferenceRelation2) => {
440
+ ContentReferenceRelation2["Reference"] = "reference";
441
+ ContentReferenceRelation2["DependsOn"] = "dependsOn";
442
+ return ContentReferenceRelation2;
443
+ })(ContentReferenceRelation || {});
439
444
  var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
440
445
  ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
441
446
  ChangeRequestReviewStatus2["Approved"] = "approved";
@@ -445,6 +450,7 @@ var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
445
450
  RevisionPageType2["Document"] = "document";
446
451
  RevisionPageType2["Group"] = "group";
447
452
  RevisionPageType2["Link"] = "link";
453
+ RevisionPageType2["Computed"] = "computed";
448
454
  return RevisionPageType2;
449
455
  })(RevisionPageType || {});
450
456
  var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
@@ -584,6 +590,7 @@ var SiteType = /* @__PURE__ */ ((SiteType2) => {
584
590
  SiteType2["Basic"] = "basic";
585
591
  SiteType2["Premium"] = "premium";
586
592
  SiteType2["Ultimate"] = "ultimate";
593
+ SiteType2["Sponsored"] = "sponsored";
587
594
  SiteType2["LegacyBasic"] = "legacy-basic";
588
595
  SiteType2["LegacyPremium"] = "legacy-premium";
589
596
  return SiteType2;
@@ -728,7 +735,9 @@ var HttpClient = class {
728
735
  };
729
736
  encodeQueryParam(key, value) {
730
737
  const encodedKey = encodeURIComponent(key);
731
- return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
738
+ return `${encodedKey}=${encodeURIComponent(
739
+ typeof value === "number" ? value : `${value}`
740
+ )}`;
732
741
  }
733
742
  addQueryParam(query, key) {
734
743
  return this.encodeQueryParam(key, query[key]);
@@ -1236,6 +1245,16 @@ var Api = class extends HttpClient {
1236
1245
  format: "json",
1237
1246
  ...params
1238
1247
  }),
1248
+ computePageDocument: (spaceId, data, query, params = {}) => this.request({
1249
+ path: `/spaces/${spaceId}/content/computed/document`,
1250
+ method: "POST",
1251
+ query,
1252
+ body: data,
1253
+ secure: true,
1254
+ type: "application/json" /* Json */,
1255
+ format: "json",
1256
+ ...params
1257
+ }),
1239
1258
  getDocumentById: (spaceId, documentId, query, params = {}) => this.request({
1240
1259
  path: `/spaces/${spaceId}/documents/${documentId}`,
1241
1260
  method: "GET",
@@ -1528,6 +1547,13 @@ var Api = class extends HttpClient {
1528
1547
  format: "json",
1529
1548
  ...params
1530
1549
  }),
1550
+ getSyncedBlockContentInChangeRequest: (spaceId, changeRequestId, syncedBlockId, params = {}) => this.request({
1551
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/synced-blocks/${syncedBlockId}/content`,
1552
+ method: "GET",
1553
+ secure: true,
1554
+ format: "json",
1555
+ ...params
1556
+ }),
1531
1557
  getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1532
1558
  path: `/spaces/${spaceId}/revisions/${revisionId}`,
1533
1559
  method: "GET",
@@ -3290,6 +3316,7 @@ export {
3290
3316
  CloudflareHostnameTLSStatus,
3291
3317
  CloudflareHostnameTLSValidationMethod,
3292
3318
  ContentKitIcon,
3319
+ ContentReferenceRelation,
3293
3320
  ContentReferenceStatus,
3294
3321
  ContentType,
3295
3322
  ContentVisibility,
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.64.1",
7
+ "version": "0.66.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",