@gitbook/api 0.96.0 → 0.97.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
@@ -180,8 +180,6 @@ var require_node = __commonJS({
180
180
  var src_exports = {};
181
181
  __export(src_exports, {
182
182
  APIIntegrationScope: () => APIIntegrationScope,
183
- AnalyticsSearchPeriod: () => AnalyticsSearchPeriod,
184
- AnalyticsTrafficInterval: () => AnalyticsTrafficInterval,
185
183
  Api: () => Api,
186
184
  BillingInterval: () => BillingInterval,
187
185
  BillingProduct: () => BillingProduct,
@@ -206,7 +204,7 @@ __export(src_exports, {
206
204
  CustomHostnameSslStatus: () => CustomHostnameSslStatus,
207
205
  CustomizationBackground: () => CustomizationBackground,
208
206
  CustomizationCorners: () => CustomizationCorners,
209
- CustomizationFont: () => CustomizationFont,
207
+ CustomizationDefaultFont: () => CustomizationDefaultFont,
210
208
  CustomizationHeaderPreset: () => CustomizationHeaderPreset,
211
209
  CustomizationIconsStyle: () => CustomizationIconsStyle,
212
210
  CustomizationLinksStyle: () => CustomizationLinksStyle,
@@ -224,7 +222,6 @@ __export(src_exports, {
224
222
  GitSyncProvider: () => GitSyncProvider,
225
223
  HttpClient: () => HttpClient,
226
224
  ImportContentSource: () => ImportContentSource,
227
- InsightsInterval: () => InsightsInterval,
228
225
  IntegrationCategory: () => IntegrationCategory,
229
226
  IntegrationInstallationSiteSelection: () => IntegrationInstallationSiteSelection,
230
227
  IntegrationInstallationSpaceSelection: () => IntegrationInstallationSpaceSelection,
@@ -247,6 +244,7 @@ __export(src_exports, {
247
244
  RevisionSemanticChangeType: () => RevisionSemanticChangeType,
248
245
  SiteAdsStatus: () => SiteAdsStatus,
249
246
  SiteAdsTopic: () => SiteAdsTopic,
247
+ SiteCustomizationFeature: () => SiteCustomizationFeature,
250
248
  SiteInsightsAdPlacement: () => SiteInsightsAdPlacement,
251
249
  SiteInsightsEventType: () => SiteInsightsEventType,
252
250
  SiteInsightsLinkPosition: () => SiteInsightsLinkPosition,
@@ -257,17 +255,17 @@ __export(src_exports, {
257
255
  SiteInsightsVisitorBrowser: () => SiteInsightsVisitorBrowser,
258
256
  SiteInsightsVisitorDevice: () => SiteInsightsVisitorDevice,
259
257
  SiteInsightsVisitorOS: () => SiteInsightsVisitorOS,
260
- SiteToMigrateFeature: () => SiteToMigrateFeature,
261
258
  SiteType: () => SiteType,
262
259
  SiteVisibility: () => SiteVisibility,
263
260
  SpaceEditMode: () => SpaceEditMode,
261
+ StorageUploadKind: () => StorageUploadKind,
264
262
  TeamMemberRole: () => TeamMemberRole
265
263
  });
266
264
  module.exports = __toCommonJS(src_exports);
267
265
 
268
266
  // package.json
269
267
  var name = "@gitbook/api";
270
- var version = "0.96.0";
268
+ var version = "0.97.0";
271
269
 
272
270
  // src/client.ts
273
271
  var import_event_iterator = __toESM(require_node(), 1);
@@ -401,18 +399,6 @@ var RevisionPageLayoutOptionsCoverSize = /* @__PURE__ */ ((RevisionPageLayoutOpt
401
399
  RevisionPageLayoutOptionsCoverSize2["Full"] = "full";
402
400
  return RevisionPageLayoutOptionsCoverSize2;
403
401
  })(RevisionPageLayoutOptionsCoverSize || {});
404
- var AnalyticsSearchPeriod = /* @__PURE__ */ ((AnalyticsSearchPeriod2) => {
405
- AnalyticsSearchPeriod2["LastMonth"] = "last_month";
406
- AnalyticsSearchPeriod2["LastWeek"] = "last_week";
407
- AnalyticsSearchPeriod2["LastYear"] = "last_year";
408
- return AnalyticsSearchPeriod2;
409
- })(AnalyticsSearchPeriod || {});
410
- var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
411
- AnalyticsTrafficInterval2["Daily"] = "daily";
412
- AnalyticsTrafficInterval2["Weekly"] = "weekly";
413
- AnalyticsTrafficInterval2["Monthly"] = "monthly";
414
- return AnalyticsTrafficInterval2;
415
- })(AnalyticsTrafficInterval || {});
416
402
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
417
403
  ChangeRequestStatus2["Draft"] = "draft";
418
404
  ChangeRequestStatus2["Open"] = "open";
@@ -478,6 +464,14 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
478
464
  BillingProduct2["BusinessDec2021"] = "business_dec_2021";
479
465
  return BillingProduct2;
480
466
  })(BillingProduct || {});
467
+ var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
468
+ BillingTrialStatus2["Notapplicable"] = "notapplicable";
469
+ BillingTrialStatus2["None"] = "none";
470
+ BillingTrialStatus2["Active"] = "active";
471
+ BillingTrialStatus2["Ended"] = "ended";
472
+ BillingTrialStatus2["Expired"] = "expired";
473
+ return BillingTrialStatus2;
474
+ })(BillingTrialStatus || {});
481
475
  var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
482
476
  OrganizationBlockReason2["Security"] = "security";
483
477
  return OrganizationBlockReason2;
@@ -548,59 +542,6 @@ var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
548
542
  RevisionPageLayoutPreset2["Landing"] = "landing";
549
543
  return RevisionPageLayoutPreset2;
550
544
  })(RevisionPageLayoutPreset || {});
551
- var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
552
- CustomizationCorners2["Straight"] = "straight";
553
- CustomizationCorners2["Rounded"] = "rounded";
554
- return CustomizationCorners2;
555
- })(CustomizationCorners || {});
556
- var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
557
- CustomizationFont2["ABCFavorit"] = "ABCFavorit";
558
- CustomizationFont2["Inter"] = "Inter";
559
- CustomizationFont2["Roboto"] = "Roboto";
560
- CustomizationFont2["RobotoSlab"] = "RobotoSlab";
561
- CustomizationFont2["OpenSans"] = "OpenSans";
562
- CustomizationFont2["SourceSansPro"] = "SourceSansPro";
563
- CustomizationFont2["Lato"] = "Lato";
564
- CustomizationFont2["Ubuntu"] = "Ubuntu";
565
- CustomizationFont2["Raleway"] = "Raleway";
566
- CustomizationFont2["Merriweather"] = "Merriweather";
567
- CustomizationFont2["Overpass"] = "Overpass";
568
- CustomizationFont2["NotoSans"] = "NotoSans";
569
- CustomizationFont2["IBMPlexSerif"] = "IBMPlexSerif";
570
- CustomizationFont2["Poppins"] = "Poppins";
571
- CustomizationFont2["FiraSans"] = "FiraSans";
572
- return CustomizationFont2;
573
- })(CustomizationFont || {});
574
- var CustomizationBackground = /* @__PURE__ */ ((CustomizationBackground2) => {
575
- CustomizationBackground2["Plain"] = "plain";
576
- CustomizationBackground2["Match"] = "match";
577
- return CustomizationBackground2;
578
- })(CustomizationBackground || {});
579
- var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
580
- CustomizationLocale2["En"] = "en";
581
- CustomizationLocale2["Fr"] = "fr";
582
- CustomizationLocale2["Es"] = "es";
583
- CustomizationLocale2["Zh"] = "zh";
584
- CustomizationLocale2["Ja"] = "ja";
585
- CustomizationLocale2["De"] = "de";
586
- CustomizationLocale2["Nl"] = "nl";
587
- CustomizationLocale2["No"] = "no";
588
- CustomizationLocale2["PtBr"] = "pt-br";
589
- return CustomizationLocale2;
590
- })(CustomizationLocale || {});
591
- var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
592
- CustomizationHeaderPreset2["Default"] = "default";
593
- CustomizationHeaderPreset2["Bold"] = "bold";
594
- CustomizationHeaderPreset2["Contrast"] = "contrast";
595
- CustomizationHeaderPreset2["Custom"] = "custom";
596
- CustomizationHeaderPreset2["None"] = "none";
597
- return CustomizationHeaderPreset2;
598
- })(CustomizationHeaderPreset || {});
599
- var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
600
- CustomizationThemeMode2["Light"] = "light";
601
- CustomizationThemeMode2["Dark"] = "dark";
602
- return CustomizationThemeMode2;
603
- })(CustomizationThemeMode || {});
604
545
  var IntegrationTarget = /* @__PURE__ */ ((IntegrationTarget2) => {
605
546
  IntegrationTarget2["All"] = "all";
606
547
  IntegrationTarget2["Site"] = "site";
@@ -652,12 +593,6 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
652
593
  CustomFieldType2["SelectSingle"] = "select:single";
653
594
  return CustomFieldType2;
654
595
  })(CustomFieldType || {});
655
- var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
656
- PageFeedbackRating2["Bad"] = "bad";
657
- PageFeedbackRating2["Ok"] = "ok";
658
- PageFeedbackRating2["Good"] = "good";
659
- return PageFeedbackRating2;
660
- })(PageFeedbackRating || {});
661
596
  var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
662
597
  IntegrationInstallationStatus2["Active"] = "active";
663
598
  IntegrationInstallationStatus2["Pending"] = "pending";
@@ -713,6 +648,17 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
713
648
  SiteAdsTopic2["Crypto"] = "crypto";
714
649
  return SiteAdsTopic2;
715
650
  })(SiteAdsTopic || {});
651
+ var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
652
+ SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
653
+ SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
654
+ SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
655
+ SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
656
+ SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
657
+ SiteCustomizationFeature2["FooterLinks"] = "footer-links";
658
+ SiteCustomizationFeature2["FooterCopyright"] = "footer-copyright";
659
+ SiteCustomizationFeature2["SemanticColors"] = "semantic-colors";
660
+ return SiteCustomizationFeature2;
661
+ })(SiteCustomizationFeature || {});
716
662
  var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
717
663
  TeamMemberRole2["Owner"] = "owner";
718
664
  TeamMemberRole2["Member"] = "member";
@@ -723,25 +669,6 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
723
669
  BillingInterval2["Yearly"] = "yearly";
724
670
  return BillingInterval2;
725
671
  })(BillingInterval || {});
726
- var SiteToMigrateFeature = /* @__PURE__ */ ((SiteToMigrateFeature2) => {
727
- SiteToMigrateFeature2["Sections"] = "sections";
728
- SiteToMigrateFeature2["VisitorAuth"] = "visitor-auth";
729
- SiteToMigrateFeature2["Redirects"] = "redirects";
730
- SiteToMigrateFeature2["CustomHostname"] = "custom-hostname";
731
- SiteToMigrateFeature2["AISearch"] = "AI-search";
732
- SiteToMigrateFeature2["PDFExport"] = "PDF-export";
733
- SiteToMigrateFeature2["PageRatings"] = "page-ratings";
734
- SiteToMigrateFeature2["CustomLogo"] = "custom-logo";
735
- SiteToMigrateFeature2["CustomThemePreset"] = "custom-theme-preset";
736
- SiteToMigrateFeature2["CustomFonts"] = "custom-fonts";
737
- SiteToMigrateFeature2["CustomIcons"] = "custom-icons";
738
- SiteToMigrateFeature2["CustomFooterLogo"] = "custom-footer-logo";
739
- SiteToMigrateFeature2["CustomFooterCopyright"] = "custom-footer-copyright";
740
- SiteToMigrateFeature2["CustomFooterLinks"] = "custom-footer-links";
741
- SiteToMigrateFeature2["Unlisted"] = "unlisted";
742
- SiteToMigrateFeature2["ShareLinks"] = "share-links";
743
- return SiteToMigrateFeature2;
744
- })(SiteToMigrateFeature || {});
745
672
  var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
746
673
  CustomizationTheme2["Clean"] = "clean";
747
674
  CustomizationTheme2["Muted"] = "muted";
@@ -749,11 +676,39 @@ var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
749
676
  CustomizationTheme2["Gradient"] = "gradient";
750
677
  return CustomizationTheme2;
751
678
  })(CustomizationTheme || {});
679
+ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
680
+ CustomizationCorners2["Straight"] = "straight";
681
+ CustomizationCorners2["Rounded"] = "rounded";
682
+ return CustomizationCorners2;
683
+ })(CustomizationCorners || {});
752
684
  var CustomizationLinksStyle = /* @__PURE__ */ ((CustomizationLinksStyle2) => {
753
685
  CustomizationLinksStyle2["Default"] = "default";
754
686
  CustomizationLinksStyle2["Accent"] = "accent";
755
687
  return CustomizationLinksStyle2;
756
688
  })(CustomizationLinksStyle || {});
689
+ var CustomizationDefaultFont = /* @__PURE__ */ ((CustomizationDefaultFont2) => {
690
+ CustomizationDefaultFont2["ABCFavorit"] = "ABCFavorit";
691
+ CustomizationDefaultFont2["Inter"] = "Inter";
692
+ CustomizationDefaultFont2["Roboto"] = "Roboto";
693
+ CustomizationDefaultFont2["RobotoSlab"] = "RobotoSlab";
694
+ CustomizationDefaultFont2["OpenSans"] = "OpenSans";
695
+ CustomizationDefaultFont2["SourceSansPro"] = "SourceSansPro";
696
+ CustomizationDefaultFont2["Lato"] = "Lato";
697
+ CustomizationDefaultFont2["Ubuntu"] = "Ubuntu";
698
+ CustomizationDefaultFont2["Raleway"] = "Raleway";
699
+ CustomizationDefaultFont2["Merriweather"] = "Merriweather";
700
+ CustomizationDefaultFont2["Overpass"] = "Overpass";
701
+ CustomizationDefaultFont2["NotoSans"] = "NotoSans";
702
+ CustomizationDefaultFont2["IBMPlexSerif"] = "IBMPlexSerif";
703
+ CustomizationDefaultFont2["Poppins"] = "Poppins";
704
+ CustomizationDefaultFont2["FiraSans"] = "FiraSans";
705
+ return CustomizationDefaultFont2;
706
+ })(CustomizationDefaultFont || {});
707
+ var CustomizationBackground = /* @__PURE__ */ ((CustomizationBackground2) => {
708
+ CustomizationBackground2["Plain"] = "plain";
709
+ CustomizationBackground2["Match"] = "match";
710
+ return CustomizationBackground2;
711
+ })(CustomizationBackground || {});
757
712
  var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
758
713
  CustomizationIconsStyle2["Regular"] = "regular";
759
714
  CustomizationIconsStyle2["Solid"] = "solid";
@@ -773,6 +728,37 @@ var CustomizationSidebarListStyle = /* @__PURE__ */ ((CustomizationSidebarListSt
773
728
  CustomizationSidebarListStyle2["Line"] = "line";
774
729
  return CustomizationSidebarListStyle2;
775
730
  })(CustomizationSidebarListStyle || {});
731
+ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
732
+ CustomizationLocale2["En"] = "en";
733
+ CustomizationLocale2["Fr"] = "fr";
734
+ CustomizationLocale2["Es"] = "es";
735
+ CustomizationLocale2["Zh"] = "zh";
736
+ CustomizationLocale2["Ja"] = "ja";
737
+ CustomizationLocale2["De"] = "de";
738
+ CustomizationLocale2["Nl"] = "nl";
739
+ CustomizationLocale2["No"] = "no";
740
+ CustomizationLocale2["PtBr"] = "pt-br";
741
+ return CustomizationLocale2;
742
+ })(CustomizationLocale || {});
743
+ var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
744
+ CustomizationHeaderPreset2["Default"] = "default";
745
+ CustomizationHeaderPreset2["Bold"] = "bold";
746
+ CustomizationHeaderPreset2["Contrast"] = "contrast";
747
+ CustomizationHeaderPreset2["Custom"] = "custom";
748
+ CustomizationHeaderPreset2["None"] = "none";
749
+ return CustomizationHeaderPreset2;
750
+ })(CustomizationHeaderPreset || {});
751
+ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
752
+ CustomizationThemeMode2["Light"] = "light";
753
+ CustomizationThemeMode2["Dark"] = "dark";
754
+ return CustomizationThemeMode2;
755
+ })(CustomizationThemeMode || {});
756
+ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
757
+ PageFeedbackRating2["Bad"] = "bad";
758
+ PageFeedbackRating2["Ok"] = "ok";
759
+ PageFeedbackRating2["Good"] = "good";
760
+ return PageFeedbackRating2;
761
+ })(PageFeedbackRating || {});
776
762
  var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
777
763
  SiteInsightsLinkPosition2["Header"] = "header";
778
764
  SiteInsightsLinkPosition2["Footer"] = "footer";
@@ -861,13 +847,10 @@ var SiteInsightsQueryRange = /* @__PURE__ */ ((SiteInsightsQueryRange2) => {
861
847
  SiteInsightsQueryRange2["Last24Hours"] = "last24Hours";
862
848
  return SiteInsightsQueryRange2;
863
849
  })(SiteInsightsQueryRange || {});
864
- var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
865
- InsightsInterval2["Day"] = "day";
866
- InsightsInterval2["Week"] = "week";
867
- InsightsInterval2["Month"] = "month";
868
- InsightsInterval2["Year"] = "year";
869
- return InsightsInterval2;
870
- })(InsightsInterval || {});
850
+ var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
851
+ StorageUploadKind2["CustomizationFont"] = "customization_font";
852
+ return StorageUploadKind2;
853
+ })(StorageUploadKind || {});
871
854
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
872
855
  CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
873
856
  CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
@@ -948,14 +931,6 @@ var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
948
931
  GitSyncOperationStage2["Finalize"] = "finalize";
949
932
  return GitSyncOperationStage2;
950
933
  })(GitSyncOperationStage || {});
951
- var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
952
- BillingTrialStatus2["Notapplicable"] = "notapplicable";
953
- BillingTrialStatus2["None"] = "none";
954
- BillingTrialStatus2["Active"] = "active";
955
- BillingTrialStatus2["Ended"] = "ended";
956
- BillingTrialStatus2["Expired"] = "expired";
957
- return BillingTrialStatus2;
958
- })(BillingTrialStatus || {});
959
934
  var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
960
935
  APIIntegrationScope2["IntegrationRead"] = "integration:read";
961
936
  APIIntegrationScope2["IntegrationUpdate"] = "integration:update";
@@ -1191,43 +1166,6 @@ var Api = class extends HttpClient {
1191
1166
  format: "json",
1192
1167
  ...params
1193
1168
  });
1194
- search = {
1195
- searchContent: (query, params = {}) => this.request({
1196
- path: `/search`,
1197
- method: "GET",
1198
- query,
1199
- secure: true,
1200
- format: "json",
1201
- ...params
1202
- }),
1203
- askQueryWithGet: (query, params = {}) => this.request({
1204
- path: `/search/ask`,
1205
- method: "GET",
1206
- query,
1207
- secure: true,
1208
- format: "json",
1209
- ...params
1210
- }),
1211
- askQuery: (data, query, params = {}) => this.request({
1212
- path: `/search/ask`,
1213
- method: "POST",
1214
- query,
1215
- body: data,
1216
- secure: true,
1217
- type: "application/json" /* Json */,
1218
- format: "json",
1219
- ...params
1220
- }),
1221
- getRecommendedQuestions: (data, params = {}) => this.request({
1222
- path: `/search/questions`,
1223
- method: "POST",
1224
- body: data,
1225
- secure: true,
1226
- type: "application/json" /* Json */,
1227
- format: "json",
1228
- ...params
1229
- })
1230
- };
1231
1169
  user = {
1232
1170
  getAuthenticatedUser: (params = {}) => this.request({
1233
1171
  path: `/user`,
@@ -1318,44 +1256,6 @@ var Api = class extends HttpClient {
1318
1256
  format: "json",
1319
1257
  ...params
1320
1258
  }),
1321
- askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
1322
- path: `/spaces/${spaceId}/search/ask`,
1323
- method: "GET",
1324
- query,
1325
- secure: true,
1326
- format: "json",
1327
- ...params
1328
- }),
1329
- askQueryInSpace: (spaceId, data, query, params = {}) => this.request({
1330
- path: `/spaces/${spaceId}/search/ask`,
1331
- method: "POST",
1332
- query,
1333
- body: data,
1334
- secure: true,
1335
- type: "application/json" /* Json */,
1336
- format: "json",
1337
- ...params
1338
- }),
1339
- streamAskInSpace: (spaceId, query, params = {}) => this.streamRequest({
1340
- path: `/spaces/${spaceId}/search/ask/stream`,
1341
- method: "GET",
1342
- query,
1343
- secure: true,
1344
- ...params
1345
- }),
1346
- getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
1347
- path: `/spaces/${spaceId}/search/questions`,
1348
- method: "GET",
1349
- secure: true,
1350
- format: "json",
1351
- ...params
1352
- }),
1353
- streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
1354
- path: `/spaces/${spaceId}/search/questions/stream`,
1355
- method: "GET",
1356
- secure: true,
1357
- ...params
1358
- }),
1359
1259
  importGitRepository: (spaceId, data, params = {}) => this.request({
1360
1260
  path: `/spaces/${spaceId}/git/import`,
1361
1261
  method: "POST",
@@ -1379,37 +1279,6 @@ var Api = class extends HttpClient {
1379
1279
  format: "json",
1380
1280
  ...params
1381
1281
  }),
1382
- getContentAnalyticsForSpaceById: (spaceId, params = {}) => this.request({
1383
- path: `/spaces/${spaceId}/insights/content`,
1384
- method: "GET",
1385
- secure: true,
1386
- format: "json",
1387
- ...params
1388
- }),
1389
- getSearchAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1390
- path: `/spaces/${spaceId}/insights/search`,
1391
- method: "GET",
1392
- query,
1393
- secure: true,
1394
- format: "json",
1395
- ...params
1396
- }),
1397
- getTrafficAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1398
- path: `/spaces/${spaceId}/insights/traffic`,
1399
- method: "GET",
1400
- query,
1401
- secure: true,
1402
- format: "json",
1403
- ...params
1404
- }),
1405
- trackViewInSpaceById: (spaceId, data, params = {}) => this.request({
1406
- path: `/spaces/${spaceId}/insights/track_view`,
1407
- method: "POST",
1408
- body: data,
1409
- secure: true,
1410
- type: "application/json" /* Json */,
1411
- ...params
1412
- }),
1413
1282
  inviteToSpace: (spaceId, data, params = {}) => this.request({
1414
1283
  path: `/spaces/${spaceId}/permissions`,
1415
1284
  method: "POST",
@@ -2038,22 +1907,6 @@ var Api = class extends HttpClient {
2038
1907
  format: "json",
2039
1908
  ...params
2040
1909
  }),
2041
- getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
2042
- path: `/spaces/${spaceId}/publishing/customization`,
2043
- method: "GET",
2044
- secure: true,
2045
- format: "json",
2046
- ...params
2047
- }),
2048
- updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
2049
- path: `/spaces/${spaceId}/publishing/customization`,
2050
- method: "PUT",
2051
- body: data,
2052
- secure: true,
2053
- type: "application/json" /* Json */,
2054
- format: "json",
2055
- ...params
2056
- }),
2057
1910
  listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
2058
1911
  path: `/spaces/${spaceId}/integrations`,
2059
1912
  method: "GET",
@@ -2091,22 +1944,6 @@ var Api = class extends HttpClient {
2091
1944
  type: "application/json" /* Json */,
2092
1945
  ...params
2093
1946
  }),
2094
- getPageFeedback: (spaceId, pageId, visitorId, params = {}) => this.request({
2095
- path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
2096
- method: "GET",
2097
- secure: true,
2098
- format: "json",
2099
- ...params
2100
- }),
2101
- createPageFeedback: (spaceId, pageId, visitorId, data, params = {}) => this.request({
2102
- path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
2103
- method: "PUT",
2104
- body: data,
2105
- secure: true,
2106
- type: "application/json" /* Json */,
2107
- format: "json",
2108
- ...params
2109
- }),
2110
1947
  getSpacePdf: (spaceId, query, params = {}) => this.request({
2111
1948
  path: `/spaces/${spaceId}/pdf`,
2112
1949
  method: "GET",
@@ -2467,15 +2304,6 @@ var Api = class extends HttpClient {
2467
2304
  format: "json",
2468
2305
  ...params
2469
2306
  }),
2470
- createOrganization: (data, params = {}) => this.request({
2471
- path: `/orgs`,
2472
- method: "POST",
2473
- body: data,
2474
- secure: true,
2475
- type: "application/json" /* Json */,
2476
- format: "json",
2477
- ...params
2478
- }),
2479
2307
  getOrganizationById: (organizationId, params = {}) => this.request({
2480
2308
  path: `/orgs/${organizationId}`,
2481
2309
  method: "GET",
@@ -2483,12 +2311,6 @@ var Api = class extends HttpClient {
2483
2311
  format: "json",
2484
2312
  ...params
2485
2313
  }),
2486
- deleteOrganizationById: (organizationId, params = {}) => this.request({
2487
- path: `/orgs/${organizationId}`,
2488
- method: "DELETE",
2489
- secure: true,
2490
- ...params
2491
- }),
2492
2314
  updateOrganizationById: (organizationId, data, params = {}) => this.request({
2493
2315
  path: `/orgs/${organizationId}`,
2494
2316
  method: "PATCH",
@@ -2498,13 +2320,6 @@ var Api = class extends HttpClient {
2498
2320
  format: "json",
2499
2321
  ...params
2500
2322
  }),
2501
- getOrganizationAllContent: (organizationId, params = {}) => this.request({
2502
- path: `/orgs/${organizationId}/content`,
2503
- method: "GET",
2504
- secure: true,
2505
- format: "json",
2506
- ...params
2507
- }),
2508
2323
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
2509
2324
  path: `/orgs/${organizationId}/members`,
2510
2325
  method: "GET",
@@ -2650,14 +2465,6 @@ var Api = class extends HttpClient {
2650
2465
  format: "json",
2651
2466
  ...params
2652
2467
  }),
2653
- listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
2654
- path: `/orgs/${organizationId}/content-link-invites`,
2655
- method: "GET",
2656
- query,
2657
- secure: true,
2658
- format: "json",
2659
- ...params
2660
- }),
2661
2468
  listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
2662
2469
  path: `/orgs/${organizationId}/link-invites`,
2663
2470
  method: "GET",
@@ -2690,63 +2497,6 @@ var Api = class extends HttpClient {
2690
2497
  secure: true,
2691
2498
  ...params
2692
2499
  }),
2693
- upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
2694
- path: `/orgs/${organizationId}/billing`,
2695
- method: "POST",
2696
- query,
2697
- body: data,
2698
- secure: true,
2699
- type: "application/json" /* Json */,
2700
- format: "json",
2701
- ...params
2702
- }),
2703
- migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2704
- path: `/orgs/${organizationId}/billing/migrate`,
2705
- method: "POST",
2706
- body: data,
2707
- secure: true,
2708
- type: "application/json" /* Json */,
2709
- ...params
2710
- }),
2711
- previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2712
- path: `/orgs/${organizationId}/billing/migrate/preview`,
2713
- method: "POST",
2714
- body: data,
2715
- secure: true,
2716
- type: "application/json" /* Json */,
2717
- format: "json",
2718
- ...params
2719
- }),
2720
- listSitesToMigrate: (organizationId, query, params = {}) => this.request({
2721
- path: `/orgs/${organizationId}/billing/migrate/sites`,
2722
- method: "GET",
2723
- query,
2724
- secure: true,
2725
- format: "json",
2726
- ...params
2727
- }),
2728
- getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
2729
- path: `/orgs/${organizationId}/billing/portal`,
2730
- method: "GET",
2731
- secure: true,
2732
- format: "json",
2733
- ...params
2734
- }),
2735
- previewBillingInvoice: (organizationId, query, params = {}) => this.request({
2736
- path: `/orgs/${organizationId}/billing/preview`,
2737
- method: "GET",
2738
- query,
2739
- secure: true,
2740
- format: "json",
2741
- ...params
2742
- }),
2743
- requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
2744
- path: `/orgs/${organizationId}/request_upgrade`,
2745
- method: "POST",
2746
- secure: true,
2747
- format: "json",
2748
- ...params
2749
- }),
2750
2500
  searchOrganizationContent: (organizationId, query, params = {}) => this.request({
2751
2501
  path: `/orgs/${organizationId}/search`,
2752
2502
  method: "GET",
@@ -2905,55 +2655,6 @@ var Api = class extends HttpClient {
2905
2655
  format: "json",
2906
2656
  ...params
2907
2657
  }),
2908
- getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2909
- path: `/orgs/${organizationId}/usage`,
2910
- method: "GET",
2911
- secure: true,
2912
- format: "json",
2913
- ...params
2914
- }),
2915
- getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2916
- path: `/orgs/${organizationId}/usage/collections`,
2917
- method: "GET",
2918
- secure: true,
2919
- format: "json",
2920
- ...params
2921
- }),
2922
- getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2923
- path: `/orgs/${organizationId}/usage/spaces`,
2924
- method: "GET",
2925
- secure: true,
2926
- format: "json",
2927
- ...params
2928
- }),
2929
- getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2930
- path: `/orgs/${organizationId}/usage/sites`,
2931
- method: "GET",
2932
- secure: true,
2933
- format: "json",
2934
- ...params
2935
- }),
2936
- getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2937
- path: `/orgs/${organizationId}/usage/teams`,
2938
- method: "GET",
2939
- secure: true,
2940
- format: "json",
2941
- ...params
2942
- }),
2943
- getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2944
- path: `/orgs/${organizationId}/usage/members`,
2945
- method: "GET",
2946
- secure: true,
2947
- format: "json",
2948
- ...params
2949
- }),
2950
- getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2951
- path: `/orgs/${organizationId}/usage/team-members`,
2952
- method: "GET",
2953
- secure: true,
2954
- format: "json",
2955
- ...params
2956
- }),
2957
2658
  askInOrganization: (organizationId, data, query, params = {}) => this.request({
2958
2659
  path: `/orgs/${organizationId}/ask`,
2959
2660
  method: "POST",
@@ -3001,14 +2702,6 @@ var Api = class extends HttpClient {
3001
2702
  format: "json",
3002
2703
  ...params
3003
2704
  }),
3004
- previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
3005
- path: `/orgs/${organizationId}/sites/publishing/checkout`,
3006
- method: "GET",
3007
- query,
3008
- secure: true,
3009
- format: "json",
3010
- ...params
3011
- }),
3012
2705
  getSiteById: (organizationId, siteId, params = {}) => this.request({
3013
2706
  path: `/orgs/${organizationId}/sites/${siteId}`,
3014
2707
  method: "GET",
@@ -3093,24 +2786,6 @@ var Api = class extends HttpClient {
3093
2786
  format: "json",
3094
2787
  ...params
3095
2788
  }),
3096
- updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
3097
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3098
- method: "POST",
3099
- query,
3100
- body: data,
3101
- secure: true,
3102
- type: "application/json" /* Json */,
3103
- format: "json",
3104
- ...params
3105
- }),
3106
- previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
3107
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3108
- method: "GET",
3109
- query,
3110
- secure: true,
3111
- format: "json",
3112
- ...params
3113
- }),
3114
2789
  getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
3115
2790
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
3116
2791
  method: "GET",
@@ -3159,13 +2834,6 @@ var Api = class extends HttpClient {
3159
2834
  format: "json",
3160
2835
  ...params
3161
2836
  }),
3162
- getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
3163
- path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
3164
- method: "GET",
3165
- secure: true,
3166
- format: "json",
3167
- ...params
3168
- }),
3169
2837
  listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
3170
2838
  path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
3171
2839
  method: "GET",
@@ -3340,30 +3008,6 @@ var Api = class extends HttpClient {
3340
3008
  secure: true,
3341
3009
  ...params
3342
3010
  }),
3343
- getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3344
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
3345
- method: "GET",
3346
- secure: true,
3347
- format: "json",
3348
- ...params
3349
- }),
3350
- getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
3351
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
3352
- method: "GET",
3353
- query,
3354
- secure: true,
3355
- format: "json",
3356
- ...params
3357
- }),
3358
- createSitesPageFeedback: (organizationId, siteId, siteSpaceId, pageId, visitorId, data, params = {}) => this.request({
3359
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/pages/${pageId}/feedbacks/${visitorId}`,
3360
- method: "PUT",
3361
- body: data,
3362
- secure: true,
3363
- type: "application/json" /* Json */,
3364
- format: "json",
3365
- ...params
3366
- }),
3367
3011
  moveSiteSectionGroup: (organizationId, siteId, siteSectionGroupId, data, params = {}) => this.request({
3368
3012
  path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/move`,
3369
3013
  method: "POST",
@@ -3399,14 +3043,6 @@ var Api = class extends HttpClient {
3399
3043
  format: "json",
3400
3044
  ...params
3401
3045
  }),
3402
- trackViewInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3403
- path: `/orgs/${organizationId}/sites/${siteId}/insights/track_view`,
3404
- method: "POST",
3405
- body: data,
3406
- secure: true,
3407
- type: "application/json" /* Json */,
3408
- ...params
3409
- }),
3410
3046
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3411
3047
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3412
3048
  method: "POST",
@@ -3431,22 +3067,6 @@ var Api = class extends HttpClient {
3431
3067
  format: "json",
3432
3068
  ...params
3433
3069
  }),
3434
- getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3435
- path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
3436
- method: "GET",
3437
- query,
3438
- secure: true,
3439
- format: "json",
3440
- ...params
3441
- }),
3442
- getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3443
- path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
3444
- method: "GET",
3445
- query,
3446
- secure: true,
3447
- format: "json",
3448
- ...params
3449
- }),
3450
3070
  updateSiteAdsById: (organizationId, siteId, data, params = {}) => this.request({
3451
3071
  path: `/orgs/${organizationId}/sites/${siteId}/ads`,
3452
3072
  method: "POST",
@@ -3495,6 +3115,15 @@ var Api = class extends HttpClient {
3495
3115
  format: "json",
3496
3116
  ...params
3497
3117
  }),
3118
+ generateSiteStorageUploadUrl: (organizationId, siteId, data, params = {}) => this.request({
3119
+ path: `/orgs/${organizationId}/sites/${siteId}/storage/upload`,
3120
+ method: "POST",
3121
+ body: data,
3122
+ secure: true,
3123
+ type: "application/json" /* Json */,
3124
+ format: "json",
3125
+ ...params
3126
+ }),
3498
3127
  listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
3499
3128
  path: `/orgs/${organizationId}/openapi`,
3500
3129
  method: "GET",
@@ -3570,15 +3199,6 @@ var Api = class extends HttpClient {
3570
3199
  format: "json",
3571
3200
  ...params
3572
3201
  }),
3573
- setupCustomHostname: (hostname, data, params = {}) => this.request({
3574
- path: `/custom-hostnames/${hostname}`,
3575
- method: "POST",
3576
- body: data,
3577
- secure: true,
3578
- type: "application/json" /* Json */,
3579
- format: "json",
3580
- ...params
3581
- }),
3582
3202
  dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
3583
3203
  path: `/custom-hostnames/${hostname}`,
3584
3204
  method: "PATCH",
@@ -3590,14 +3210,6 @@ var Api = class extends HttpClient {
3590
3210
  method: "DELETE",
3591
3211
  secure: true,
3592
3212
  ...params
3593
- }),
3594
- testCustomHostname: (hostname, data, params = {}) => this.request({
3595
- path: `/custom-hostnames/${hostname}/test`,
3596
- method: "POST",
3597
- body: data,
3598
- secure: true,
3599
- type: "application/json" /* Json */,
3600
- ...params
3601
3213
  })
3602
3214
  };
3603
3215
  ads = {
@@ -3618,17 +3230,6 @@ var Api = class extends HttpClient {
3618
3230
  ...params
3619
3231
  })
3620
3232
  };
3621
- internal = {
3622
- generateHiveAccessToken: (data, params = {}) => this.request({
3623
- path: `/internal/hive/token`,
3624
- method: "POST",
3625
- body: data,
3626
- secure: true,
3627
- type: "application/json" /* Json */,
3628
- format: "json",
3629
- ...params
3630
- })
3631
- };
3632
3233
  urls = {
3633
3234
  getContentByUrl: (query, params = {}) => this.request({
3634
3235
  path: `/urls/content`,
@@ -3678,14 +3279,19 @@ var GitBookAPI = class extends Api {
3678
3279
  endpoint;
3679
3280
  authToken;
3680
3281
  userAgent;
3282
+ serviceBinding;
3681
3283
  constructor(options = {}) {
3682
3284
  const {
3683
3285
  endpoint = GITBOOK_DEFAULT_ENDPOINT,
3684
3286
  authToken,
3685
- userAgent = `${name}/${version}`
3287
+ userAgent = `${name}/${version}`,
3288
+ serviceBinding = {
3289
+ fetch
3290
+ }
3686
3291
  } = options;
3292
+ const normalizedEndpoint = endpoint.endsWith("/") ? endpoint.slice(0, -1) : endpoint;
3687
3293
  super({
3688
- baseUrl: `${endpoint}/v1`,
3294
+ baseUrl: `${normalizedEndpoint}/v1`,
3689
3295
  securityWorker: (securityData) => {
3690
3296
  if (securityData && securityData.authToken) {
3691
3297
  return {
@@ -3704,7 +3310,7 @@ var GitBookAPI = class extends Api {
3704
3310
  if (init && "referrerPolicy" in init) {
3705
3311
  delete init.referrerPolicy;
3706
3312
  }
3707
- const response = await fetch(input, init);
3313
+ const response = await this.serviceBinding.fetch(input, init);
3708
3314
  if (!response.ok) {
3709
3315
  let error = response.statusText;
3710
3316
  try {
@@ -3717,9 +3323,10 @@ var GitBookAPI = class extends Api {
3717
3323
  return response;
3718
3324
  }
3719
3325
  });
3720
- this.endpoint = endpoint;
3326
+ this.endpoint = normalizedEndpoint;
3721
3327
  this.userAgent = userAgent;
3722
3328
  this.authToken = authToken;
3329
+ this.serviceBinding = serviceBinding;
3723
3330
  this.setSecurityData({ authToken });
3724
3331
  }
3725
3332
  async createInstallationClient(integrationName, installationId) {
@@ -3730,15 +3337,14 @@ var GitBookAPI = class extends Api {
3730
3337
  return new GitBookAPI({
3731
3338
  endpoint: this.endpoint,
3732
3339
  userAgent: this.userAgent,
3733
- authToken: installationToken.token
3340
+ authToken: installationToken.token,
3341
+ serviceBinding: this.serviceBinding
3734
3342
  });
3735
3343
  }
3736
3344
  };
3737
3345
  // Annotate the CommonJS export names for ESM import in node:
3738
3346
  0 && (module.exports = {
3739
3347
  APIIntegrationScope,
3740
- AnalyticsSearchPeriod,
3741
- AnalyticsTrafficInterval,
3742
3348
  Api,
3743
3349
  BillingInterval,
3744
3350
  BillingProduct,
@@ -3763,7 +3369,7 @@ var GitBookAPI = class extends Api {
3763
3369
  CustomHostnameSslStatus,
3764
3370
  CustomizationBackground,
3765
3371
  CustomizationCorners,
3766
- CustomizationFont,
3372
+ CustomizationDefaultFont,
3767
3373
  CustomizationHeaderPreset,
3768
3374
  CustomizationIconsStyle,
3769
3375
  CustomizationLinksStyle,
@@ -3781,7 +3387,6 @@ var GitBookAPI = class extends Api {
3781
3387
  GitSyncProvider,
3782
3388
  HttpClient,
3783
3389
  ImportContentSource,
3784
- InsightsInterval,
3785
3390
  IntegrationCategory,
3786
3391
  IntegrationInstallationSiteSelection,
3787
3392
  IntegrationInstallationSpaceSelection,
@@ -3804,6 +3409,7 @@ var GitBookAPI = class extends Api {
3804
3409
  RevisionSemanticChangeType,
3805
3410
  SiteAdsStatus,
3806
3411
  SiteAdsTopic,
3412
+ SiteCustomizationFeature,
3807
3413
  SiteInsightsAdPlacement,
3808
3414
  SiteInsightsEventType,
3809
3415
  SiteInsightsLinkPosition,
@@ -3814,9 +3420,9 @@ var GitBookAPI = class extends Api {
3814
3420
  SiteInsightsVisitorBrowser,
3815
3421
  SiteInsightsVisitorDevice,
3816
3422
  SiteInsightsVisitorOS,
3817
- SiteToMigrateFeature,
3818
3423
  SiteType,
3819
3424
  SiteVisibility,
3820
3425
  SpaceEditMode,
3426
+ StorageUploadKind,
3821
3427
  TeamMemberRole
3822
3428
  });