@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.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.96.0";
175
+ var version = "0.97.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -306,18 +306,6 @@ var RevisionPageLayoutOptionsCoverSize = /* @__PURE__ */ ((RevisionPageLayoutOpt
306
306
  RevisionPageLayoutOptionsCoverSize2["Full"] = "full";
307
307
  return RevisionPageLayoutOptionsCoverSize2;
308
308
  })(RevisionPageLayoutOptionsCoverSize || {});
309
- var AnalyticsSearchPeriod = /* @__PURE__ */ ((AnalyticsSearchPeriod2) => {
310
- AnalyticsSearchPeriod2["LastMonth"] = "last_month";
311
- AnalyticsSearchPeriod2["LastWeek"] = "last_week";
312
- AnalyticsSearchPeriod2["LastYear"] = "last_year";
313
- return AnalyticsSearchPeriod2;
314
- })(AnalyticsSearchPeriod || {});
315
- var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
316
- AnalyticsTrafficInterval2["Daily"] = "daily";
317
- AnalyticsTrafficInterval2["Weekly"] = "weekly";
318
- AnalyticsTrafficInterval2["Monthly"] = "monthly";
319
- return AnalyticsTrafficInterval2;
320
- })(AnalyticsTrafficInterval || {});
321
309
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
322
310
  ChangeRequestStatus2["Draft"] = "draft";
323
311
  ChangeRequestStatus2["Open"] = "open";
@@ -383,6 +371,14 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
383
371
  BillingProduct2["BusinessDec2021"] = "business_dec_2021";
384
372
  return BillingProduct2;
385
373
  })(BillingProduct || {});
374
+ var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
375
+ BillingTrialStatus2["Notapplicable"] = "notapplicable";
376
+ BillingTrialStatus2["None"] = "none";
377
+ BillingTrialStatus2["Active"] = "active";
378
+ BillingTrialStatus2["Ended"] = "ended";
379
+ BillingTrialStatus2["Expired"] = "expired";
380
+ return BillingTrialStatus2;
381
+ })(BillingTrialStatus || {});
386
382
  var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
387
383
  OrganizationBlockReason2["Security"] = "security";
388
384
  return OrganizationBlockReason2;
@@ -453,59 +449,6 @@ var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
453
449
  RevisionPageLayoutPreset2["Landing"] = "landing";
454
450
  return RevisionPageLayoutPreset2;
455
451
  })(RevisionPageLayoutPreset || {});
456
- var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
457
- CustomizationCorners2["Straight"] = "straight";
458
- CustomizationCorners2["Rounded"] = "rounded";
459
- return CustomizationCorners2;
460
- })(CustomizationCorners || {});
461
- var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
462
- CustomizationFont2["ABCFavorit"] = "ABCFavorit";
463
- CustomizationFont2["Inter"] = "Inter";
464
- CustomizationFont2["Roboto"] = "Roboto";
465
- CustomizationFont2["RobotoSlab"] = "RobotoSlab";
466
- CustomizationFont2["OpenSans"] = "OpenSans";
467
- CustomizationFont2["SourceSansPro"] = "SourceSansPro";
468
- CustomizationFont2["Lato"] = "Lato";
469
- CustomizationFont2["Ubuntu"] = "Ubuntu";
470
- CustomizationFont2["Raleway"] = "Raleway";
471
- CustomizationFont2["Merriweather"] = "Merriweather";
472
- CustomizationFont2["Overpass"] = "Overpass";
473
- CustomizationFont2["NotoSans"] = "NotoSans";
474
- CustomizationFont2["IBMPlexSerif"] = "IBMPlexSerif";
475
- CustomizationFont2["Poppins"] = "Poppins";
476
- CustomizationFont2["FiraSans"] = "FiraSans";
477
- return CustomizationFont2;
478
- })(CustomizationFont || {});
479
- var CustomizationBackground = /* @__PURE__ */ ((CustomizationBackground2) => {
480
- CustomizationBackground2["Plain"] = "plain";
481
- CustomizationBackground2["Match"] = "match";
482
- return CustomizationBackground2;
483
- })(CustomizationBackground || {});
484
- var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
485
- CustomizationLocale2["En"] = "en";
486
- CustomizationLocale2["Fr"] = "fr";
487
- CustomizationLocale2["Es"] = "es";
488
- CustomizationLocale2["Zh"] = "zh";
489
- CustomizationLocale2["Ja"] = "ja";
490
- CustomizationLocale2["De"] = "de";
491
- CustomizationLocale2["Nl"] = "nl";
492
- CustomizationLocale2["No"] = "no";
493
- CustomizationLocale2["PtBr"] = "pt-br";
494
- return CustomizationLocale2;
495
- })(CustomizationLocale || {});
496
- var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
497
- CustomizationHeaderPreset2["Default"] = "default";
498
- CustomizationHeaderPreset2["Bold"] = "bold";
499
- CustomizationHeaderPreset2["Contrast"] = "contrast";
500
- CustomizationHeaderPreset2["Custom"] = "custom";
501
- CustomizationHeaderPreset2["None"] = "none";
502
- return CustomizationHeaderPreset2;
503
- })(CustomizationHeaderPreset || {});
504
- var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
505
- CustomizationThemeMode2["Light"] = "light";
506
- CustomizationThemeMode2["Dark"] = "dark";
507
- return CustomizationThemeMode2;
508
- })(CustomizationThemeMode || {});
509
452
  var IntegrationTarget = /* @__PURE__ */ ((IntegrationTarget2) => {
510
453
  IntegrationTarget2["All"] = "all";
511
454
  IntegrationTarget2["Site"] = "site";
@@ -557,12 +500,6 @@ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
557
500
  CustomFieldType2["SelectSingle"] = "select:single";
558
501
  return CustomFieldType2;
559
502
  })(CustomFieldType || {});
560
- var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
561
- PageFeedbackRating2["Bad"] = "bad";
562
- PageFeedbackRating2["Ok"] = "ok";
563
- PageFeedbackRating2["Good"] = "good";
564
- return PageFeedbackRating2;
565
- })(PageFeedbackRating || {});
566
503
  var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
567
504
  IntegrationInstallationStatus2["Active"] = "active";
568
505
  IntegrationInstallationStatus2["Pending"] = "pending";
@@ -618,6 +555,17 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
618
555
  SiteAdsTopic2["Crypto"] = "crypto";
619
556
  return SiteAdsTopic2;
620
557
  })(SiteAdsTopic || {});
558
+ var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
559
+ SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
560
+ SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
561
+ SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
562
+ SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
563
+ SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
564
+ SiteCustomizationFeature2["FooterLinks"] = "footer-links";
565
+ SiteCustomizationFeature2["FooterCopyright"] = "footer-copyright";
566
+ SiteCustomizationFeature2["SemanticColors"] = "semantic-colors";
567
+ return SiteCustomizationFeature2;
568
+ })(SiteCustomizationFeature || {});
621
569
  var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
622
570
  TeamMemberRole2["Owner"] = "owner";
623
571
  TeamMemberRole2["Member"] = "member";
@@ -628,25 +576,6 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
628
576
  BillingInterval2["Yearly"] = "yearly";
629
577
  return BillingInterval2;
630
578
  })(BillingInterval || {});
631
- var SiteToMigrateFeature = /* @__PURE__ */ ((SiteToMigrateFeature2) => {
632
- SiteToMigrateFeature2["Sections"] = "sections";
633
- SiteToMigrateFeature2["VisitorAuth"] = "visitor-auth";
634
- SiteToMigrateFeature2["Redirects"] = "redirects";
635
- SiteToMigrateFeature2["CustomHostname"] = "custom-hostname";
636
- SiteToMigrateFeature2["AISearch"] = "AI-search";
637
- SiteToMigrateFeature2["PDFExport"] = "PDF-export";
638
- SiteToMigrateFeature2["PageRatings"] = "page-ratings";
639
- SiteToMigrateFeature2["CustomLogo"] = "custom-logo";
640
- SiteToMigrateFeature2["CustomThemePreset"] = "custom-theme-preset";
641
- SiteToMigrateFeature2["CustomFonts"] = "custom-fonts";
642
- SiteToMigrateFeature2["CustomIcons"] = "custom-icons";
643
- SiteToMigrateFeature2["CustomFooterLogo"] = "custom-footer-logo";
644
- SiteToMigrateFeature2["CustomFooterCopyright"] = "custom-footer-copyright";
645
- SiteToMigrateFeature2["CustomFooterLinks"] = "custom-footer-links";
646
- SiteToMigrateFeature2["Unlisted"] = "unlisted";
647
- SiteToMigrateFeature2["ShareLinks"] = "share-links";
648
- return SiteToMigrateFeature2;
649
- })(SiteToMigrateFeature || {});
650
579
  var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
651
580
  CustomizationTheme2["Clean"] = "clean";
652
581
  CustomizationTheme2["Muted"] = "muted";
@@ -654,11 +583,39 @@ var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
654
583
  CustomizationTheme2["Gradient"] = "gradient";
655
584
  return CustomizationTheme2;
656
585
  })(CustomizationTheme || {});
586
+ var CustomizationCorners = /* @__PURE__ */ ((CustomizationCorners2) => {
587
+ CustomizationCorners2["Straight"] = "straight";
588
+ CustomizationCorners2["Rounded"] = "rounded";
589
+ return CustomizationCorners2;
590
+ })(CustomizationCorners || {});
657
591
  var CustomizationLinksStyle = /* @__PURE__ */ ((CustomizationLinksStyle2) => {
658
592
  CustomizationLinksStyle2["Default"] = "default";
659
593
  CustomizationLinksStyle2["Accent"] = "accent";
660
594
  return CustomizationLinksStyle2;
661
595
  })(CustomizationLinksStyle || {});
596
+ var CustomizationDefaultFont = /* @__PURE__ */ ((CustomizationDefaultFont2) => {
597
+ CustomizationDefaultFont2["ABCFavorit"] = "ABCFavorit";
598
+ CustomizationDefaultFont2["Inter"] = "Inter";
599
+ CustomizationDefaultFont2["Roboto"] = "Roboto";
600
+ CustomizationDefaultFont2["RobotoSlab"] = "RobotoSlab";
601
+ CustomizationDefaultFont2["OpenSans"] = "OpenSans";
602
+ CustomizationDefaultFont2["SourceSansPro"] = "SourceSansPro";
603
+ CustomizationDefaultFont2["Lato"] = "Lato";
604
+ CustomizationDefaultFont2["Ubuntu"] = "Ubuntu";
605
+ CustomizationDefaultFont2["Raleway"] = "Raleway";
606
+ CustomizationDefaultFont2["Merriweather"] = "Merriweather";
607
+ CustomizationDefaultFont2["Overpass"] = "Overpass";
608
+ CustomizationDefaultFont2["NotoSans"] = "NotoSans";
609
+ CustomizationDefaultFont2["IBMPlexSerif"] = "IBMPlexSerif";
610
+ CustomizationDefaultFont2["Poppins"] = "Poppins";
611
+ CustomizationDefaultFont2["FiraSans"] = "FiraSans";
612
+ return CustomizationDefaultFont2;
613
+ })(CustomizationDefaultFont || {});
614
+ var CustomizationBackground = /* @__PURE__ */ ((CustomizationBackground2) => {
615
+ CustomizationBackground2["Plain"] = "plain";
616
+ CustomizationBackground2["Match"] = "match";
617
+ return CustomizationBackground2;
618
+ })(CustomizationBackground || {});
662
619
  var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
663
620
  CustomizationIconsStyle2["Regular"] = "regular";
664
621
  CustomizationIconsStyle2["Solid"] = "solid";
@@ -678,6 +635,37 @@ var CustomizationSidebarListStyle = /* @__PURE__ */ ((CustomizationSidebarListSt
678
635
  CustomizationSidebarListStyle2["Line"] = "line";
679
636
  return CustomizationSidebarListStyle2;
680
637
  })(CustomizationSidebarListStyle || {});
638
+ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
639
+ CustomizationLocale2["En"] = "en";
640
+ CustomizationLocale2["Fr"] = "fr";
641
+ CustomizationLocale2["Es"] = "es";
642
+ CustomizationLocale2["Zh"] = "zh";
643
+ CustomizationLocale2["Ja"] = "ja";
644
+ CustomizationLocale2["De"] = "de";
645
+ CustomizationLocale2["Nl"] = "nl";
646
+ CustomizationLocale2["No"] = "no";
647
+ CustomizationLocale2["PtBr"] = "pt-br";
648
+ return CustomizationLocale2;
649
+ })(CustomizationLocale || {});
650
+ var CustomizationHeaderPreset = /* @__PURE__ */ ((CustomizationHeaderPreset2) => {
651
+ CustomizationHeaderPreset2["Default"] = "default";
652
+ CustomizationHeaderPreset2["Bold"] = "bold";
653
+ CustomizationHeaderPreset2["Contrast"] = "contrast";
654
+ CustomizationHeaderPreset2["Custom"] = "custom";
655
+ CustomizationHeaderPreset2["None"] = "none";
656
+ return CustomizationHeaderPreset2;
657
+ })(CustomizationHeaderPreset || {});
658
+ var CustomizationThemeMode = /* @__PURE__ */ ((CustomizationThemeMode2) => {
659
+ CustomizationThemeMode2["Light"] = "light";
660
+ CustomizationThemeMode2["Dark"] = "dark";
661
+ return CustomizationThemeMode2;
662
+ })(CustomizationThemeMode || {});
663
+ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
664
+ PageFeedbackRating2["Bad"] = "bad";
665
+ PageFeedbackRating2["Ok"] = "ok";
666
+ PageFeedbackRating2["Good"] = "good";
667
+ return PageFeedbackRating2;
668
+ })(PageFeedbackRating || {});
681
669
  var SiteInsightsLinkPosition = /* @__PURE__ */ ((SiteInsightsLinkPosition2) => {
682
670
  SiteInsightsLinkPosition2["Header"] = "header";
683
671
  SiteInsightsLinkPosition2["Footer"] = "footer";
@@ -766,13 +754,10 @@ var SiteInsightsQueryRange = /* @__PURE__ */ ((SiteInsightsQueryRange2) => {
766
754
  SiteInsightsQueryRange2["Last24Hours"] = "last24Hours";
767
755
  return SiteInsightsQueryRange2;
768
756
  })(SiteInsightsQueryRange || {});
769
- var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
770
- InsightsInterval2["Day"] = "day";
771
- InsightsInterval2["Week"] = "week";
772
- InsightsInterval2["Month"] = "month";
773
- InsightsInterval2["Year"] = "year";
774
- return InsightsInterval2;
775
- })(InsightsInterval || {});
757
+ var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
758
+ StorageUploadKind2["CustomizationFont"] = "customization_font";
759
+ return StorageUploadKind2;
760
+ })(StorageUploadKind || {});
776
761
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
777
762
  CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
778
763
  CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
@@ -853,14 +838,6 @@ var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
853
838
  GitSyncOperationStage2["Finalize"] = "finalize";
854
839
  return GitSyncOperationStage2;
855
840
  })(GitSyncOperationStage || {});
856
- var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
857
- BillingTrialStatus2["Notapplicable"] = "notapplicable";
858
- BillingTrialStatus2["None"] = "none";
859
- BillingTrialStatus2["Active"] = "active";
860
- BillingTrialStatus2["Ended"] = "ended";
861
- BillingTrialStatus2["Expired"] = "expired";
862
- return BillingTrialStatus2;
863
- })(BillingTrialStatus || {});
864
841
  var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
865
842
  APIIntegrationScope2["IntegrationRead"] = "integration:read";
866
843
  APIIntegrationScope2["IntegrationUpdate"] = "integration:update";
@@ -1096,43 +1073,6 @@ var Api = class extends HttpClient {
1096
1073
  format: "json",
1097
1074
  ...params
1098
1075
  });
1099
- search = {
1100
- searchContent: (query, params = {}) => this.request({
1101
- path: `/search`,
1102
- method: "GET",
1103
- query,
1104
- secure: true,
1105
- format: "json",
1106
- ...params
1107
- }),
1108
- askQueryWithGet: (query, params = {}) => this.request({
1109
- path: `/search/ask`,
1110
- method: "GET",
1111
- query,
1112
- secure: true,
1113
- format: "json",
1114
- ...params
1115
- }),
1116
- askQuery: (data, query, params = {}) => this.request({
1117
- path: `/search/ask`,
1118
- method: "POST",
1119
- query,
1120
- body: data,
1121
- secure: true,
1122
- type: "application/json" /* Json */,
1123
- format: "json",
1124
- ...params
1125
- }),
1126
- getRecommendedQuestions: (data, params = {}) => this.request({
1127
- path: `/search/questions`,
1128
- method: "POST",
1129
- body: data,
1130
- secure: true,
1131
- type: "application/json" /* Json */,
1132
- format: "json",
1133
- ...params
1134
- })
1135
- };
1136
1076
  user = {
1137
1077
  getAuthenticatedUser: (params = {}) => this.request({
1138
1078
  path: `/user`,
@@ -1223,44 +1163,6 @@ var Api = class extends HttpClient {
1223
1163
  format: "json",
1224
1164
  ...params
1225
1165
  }),
1226
- askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
1227
- path: `/spaces/${spaceId}/search/ask`,
1228
- method: "GET",
1229
- query,
1230
- secure: true,
1231
- format: "json",
1232
- ...params
1233
- }),
1234
- askQueryInSpace: (spaceId, data, query, params = {}) => this.request({
1235
- path: `/spaces/${spaceId}/search/ask`,
1236
- method: "POST",
1237
- query,
1238
- body: data,
1239
- secure: true,
1240
- type: "application/json" /* Json */,
1241
- format: "json",
1242
- ...params
1243
- }),
1244
- streamAskInSpace: (spaceId, query, params = {}) => this.streamRequest({
1245
- path: `/spaces/${spaceId}/search/ask/stream`,
1246
- method: "GET",
1247
- query,
1248
- secure: true,
1249
- ...params
1250
- }),
1251
- getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
1252
- path: `/spaces/${spaceId}/search/questions`,
1253
- method: "GET",
1254
- secure: true,
1255
- format: "json",
1256
- ...params
1257
- }),
1258
- streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
1259
- path: `/spaces/${spaceId}/search/questions/stream`,
1260
- method: "GET",
1261
- secure: true,
1262
- ...params
1263
- }),
1264
1166
  importGitRepository: (spaceId, data, params = {}) => this.request({
1265
1167
  path: `/spaces/${spaceId}/git/import`,
1266
1168
  method: "POST",
@@ -1284,37 +1186,6 @@ var Api = class extends HttpClient {
1284
1186
  format: "json",
1285
1187
  ...params
1286
1188
  }),
1287
- getContentAnalyticsForSpaceById: (spaceId, params = {}) => this.request({
1288
- path: `/spaces/${spaceId}/insights/content`,
1289
- method: "GET",
1290
- secure: true,
1291
- format: "json",
1292
- ...params
1293
- }),
1294
- getSearchAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1295
- path: `/spaces/${spaceId}/insights/search`,
1296
- method: "GET",
1297
- query,
1298
- secure: true,
1299
- format: "json",
1300
- ...params
1301
- }),
1302
- getTrafficAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1303
- path: `/spaces/${spaceId}/insights/traffic`,
1304
- method: "GET",
1305
- query,
1306
- secure: true,
1307
- format: "json",
1308
- ...params
1309
- }),
1310
- trackViewInSpaceById: (spaceId, data, params = {}) => this.request({
1311
- path: `/spaces/${spaceId}/insights/track_view`,
1312
- method: "POST",
1313
- body: data,
1314
- secure: true,
1315
- type: "application/json" /* Json */,
1316
- ...params
1317
- }),
1318
1189
  inviteToSpace: (spaceId, data, params = {}) => this.request({
1319
1190
  path: `/spaces/${spaceId}/permissions`,
1320
1191
  method: "POST",
@@ -1943,22 +1814,6 @@ var Api = class extends HttpClient {
1943
1814
  format: "json",
1944
1815
  ...params
1945
1816
  }),
1946
- getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
1947
- path: `/spaces/${spaceId}/publishing/customization`,
1948
- method: "GET",
1949
- secure: true,
1950
- format: "json",
1951
- ...params
1952
- }),
1953
- updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
1954
- path: `/spaces/${spaceId}/publishing/customization`,
1955
- method: "PUT",
1956
- body: data,
1957
- secure: true,
1958
- type: "application/json" /* Json */,
1959
- format: "json",
1960
- ...params
1961
- }),
1962
1817
  listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
1963
1818
  path: `/spaces/${spaceId}/integrations`,
1964
1819
  method: "GET",
@@ -1996,22 +1851,6 @@ var Api = class extends HttpClient {
1996
1851
  type: "application/json" /* Json */,
1997
1852
  ...params
1998
1853
  }),
1999
- getPageFeedback: (spaceId, pageId, visitorId, params = {}) => this.request({
2000
- path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
2001
- method: "GET",
2002
- secure: true,
2003
- format: "json",
2004
- ...params
2005
- }),
2006
- createPageFeedback: (spaceId, pageId, visitorId, data, params = {}) => this.request({
2007
- path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
2008
- method: "PUT",
2009
- body: data,
2010
- secure: true,
2011
- type: "application/json" /* Json */,
2012
- format: "json",
2013
- ...params
2014
- }),
2015
1854
  getSpacePdf: (spaceId, query, params = {}) => this.request({
2016
1855
  path: `/spaces/${spaceId}/pdf`,
2017
1856
  method: "GET",
@@ -2372,15 +2211,6 @@ var Api = class extends HttpClient {
2372
2211
  format: "json",
2373
2212
  ...params
2374
2213
  }),
2375
- createOrganization: (data, params = {}) => this.request({
2376
- path: `/orgs`,
2377
- method: "POST",
2378
- body: data,
2379
- secure: true,
2380
- type: "application/json" /* Json */,
2381
- format: "json",
2382
- ...params
2383
- }),
2384
2214
  getOrganizationById: (organizationId, params = {}) => this.request({
2385
2215
  path: `/orgs/${organizationId}`,
2386
2216
  method: "GET",
@@ -2388,12 +2218,6 @@ var Api = class extends HttpClient {
2388
2218
  format: "json",
2389
2219
  ...params
2390
2220
  }),
2391
- deleteOrganizationById: (organizationId, params = {}) => this.request({
2392
- path: `/orgs/${organizationId}`,
2393
- method: "DELETE",
2394
- secure: true,
2395
- ...params
2396
- }),
2397
2221
  updateOrganizationById: (organizationId, data, params = {}) => this.request({
2398
2222
  path: `/orgs/${organizationId}`,
2399
2223
  method: "PATCH",
@@ -2403,13 +2227,6 @@ var Api = class extends HttpClient {
2403
2227
  format: "json",
2404
2228
  ...params
2405
2229
  }),
2406
- getOrganizationAllContent: (organizationId, params = {}) => this.request({
2407
- path: `/orgs/${organizationId}/content`,
2408
- method: "GET",
2409
- secure: true,
2410
- format: "json",
2411
- ...params
2412
- }),
2413
2230
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
2414
2231
  path: `/orgs/${organizationId}/members`,
2415
2232
  method: "GET",
@@ -2555,14 +2372,6 @@ var Api = class extends HttpClient {
2555
2372
  format: "json",
2556
2373
  ...params
2557
2374
  }),
2558
- listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
2559
- path: `/orgs/${organizationId}/content-link-invites`,
2560
- method: "GET",
2561
- query,
2562
- secure: true,
2563
- format: "json",
2564
- ...params
2565
- }),
2566
2375
  listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
2567
2376
  path: `/orgs/${organizationId}/link-invites`,
2568
2377
  method: "GET",
@@ -2595,63 +2404,6 @@ var Api = class extends HttpClient {
2595
2404
  secure: true,
2596
2405
  ...params
2597
2406
  }),
2598
- upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
2599
- path: `/orgs/${organizationId}/billing`,
2600
- method: "POST",
2601
- query,
2602
- body: data,
2603
- secure: true,
2604
- type: "application/json" /* Json */,
2605
- format: "json",
2606
- ...params
2607
- }),
2608
- migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2609
- path: `/orgs/${organizationId}/billing/migrate`,
2610
- method: "POST",
2611
- body: data,
2612
- secure: true,
2613
- type: "application/json" /* Json */,
2614
- ...params
2615
- }),
2616
- previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2617
- path: `/orgs/${organizationId}/billing/migrate/preview`,
2618
- method: "POST",
2619
- body: data,
2620
- secure: true,
2621
- type: "application/json" /* Json */,
2622
- format: "json",
2623
- ...params
2624
- }),
2625
- listSitesToMigrate: (organizationId, query, params = {}) => this.request({
2626
- path: `/orgs/${organizationId}/billing/migrate/sites`,
2627
- method: "GET",
2628
- query,
2629
- secure: true,
2630
- format: "json",
2631
- ...params
2632
- }),
2633
- getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
2634
- path: `/orgs/${organizationId}/billing/portal`,
2635
- method: "GET",
2636
- secure: true,
2637
- format: "json",
2638
- ...params
2639
- }),
2640
- previewBillingInvoice: (organizationId, query, params = {}) => this.request({
2641
- path: `/orgs/${organizationId}/billing/preview`,
2642
- method: "GET",
2643
- query,
2644
- secure: true,
2645
- format: "json",
2646
- ...params
2647
- }),
2648
- requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
2649
- path: `/orgs/${organizationId}/request_upgrade`,
2650
- method: "POST",
2651
- secure: true,
2652
- format: "json",
2653
- ...params
2654
- }),
2655
2407
  searchOrganizationContent: (organizationId, query, params = {}) => this.request({
2656
2408
  path: `/orgs/${organizationId}/search`,
2657
2409
  method: "GET",
@@ -2810,55 +2562,6 @@ var Api = class extends HttpClient {
2810
2562
  format: "json",
2811
2563
  ...params
2812
2564
  }),
2813
- getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2814
- path: `/orgs/${organizationId}/usage`,
2815
- method: "GET",
2816
- secure: true,
2817
- format: "json",
2818
- ...params
2819
- }),
2820
- getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2821
- path: `/orgs/${organizationId}/usage/collections`,
2822
- method: "GET",
2823
- secure: true,
2824
- format: "json",
2825
- ...params
2826
- }),
2827
- getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2828
- path: `/orgs/${organizationId}/usage/spaces`,
2829
- method: "GET",
2830
- secure: true,
2831
- format: "json",
2832
- ...params
2833
- }),
2834
- getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2835
- path: `/orgs/${organizationId}/usage/sites`,
2836
- method: "GET",
2837
- secure: true,
2838
- format: "json",
2839
- ...params
2840
- }),
2841
- getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2842
- path: `/orgs/${organizationId}/usage/teams`,
2843
- method: "GET",
2844
- secure: true,
2845
- format: "json",
2846
- ...params
2847
- }),
2848
- getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2849
- path: `/orgs/${organizationId}/usage/members`,
2850
- method: "GET",
2851
- secure: true,
2852
- format: "json",
2853
- ...params
2854
- }),
2855
- getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2856
- path: `/orgs/${organizationId}/usage/team-members`,
2857
- method: "GET",
2858
- secure: true,
2859
- format: "json",
2860
- ...params
2861
- }),
2862
2565
  askInOrganization: (organizationId, data, query, params = {}) => this.request({
2863
2566
  path: `/orgs/${organizationId}/ask`,
2864
2567
  method: "POST",
@@ -2906,14 +2609,6 @@ var Api = class extends HttpClient {
2906
2609
  format: "json",
2907
2610
  ...params
2908
2611
  }),
2909
- previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
2910
- path: `/orgs/${organizationId}/sites/publishing/checkout`,
2911
- method: "GET",
2912
- query,
2913
- secure: true,
2914
- format: "json",
2915
- ...params
2916
- }),
2917
2612
  getSiteById: (organizationId, siteId, params = {}) => this.request({
2918
2613
  path: `/orgs/${organizationId}/sites/${siteId}`,
2919
2614
  method: "GET",
@@ -2998,24 +2693,6 @@ var Api = class extends HttpClient {
2998
2693
  format: "json",
2999
2694
  ...params
3000
2695
  }),
3001
- updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
3002
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3003
- method: "POST",
3004
- query,
3005
- body: data,
3006
- secure: true,
3007
- type: "application/json" /* Json */,
3008
- format: "json",
3009
- ...params
3010
- }),
3011
- previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
3012
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3013
- method: "GET",
3014
- query,
3015
- secure: true,
3016
- format: "json",
3017
- ...params
3018
- }),
3019
2696
  getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
3020
2697
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
3021
2698
  method: "GET",
@@ -3064,13 +2741,6 @@ var Api = class extends HttpClient {
3064
2741
  format: "json",
3065
2742
  ...params
3066
2743
  }),
3067
- getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
3068
- path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
3069
- method: "GET",
3070
- secure: true,
3071
- format: "json",
3072
- ...params
3073
- }),
3074
2744
  listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
3075
2745
  path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
3076
2746
  method: "GET",
@@ -3245,30 +2915,6 @@ var Api = class extends HttpClient {
3245
2915
  secure: true,
3246
2916
  ...params
3247
2917
  }),
3248
- getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3249
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
3250
- method: "GET",
3251
- secure: true,
3252
- format: "json",
3253
- ...params
3254
- }),
3255
- getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
3256
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
3257
- method: "GET",
3258
- query,
3259
- secure: true,
3260
- format: "json",
3261
- ...params
3262
- }),
3263
- createSitesPageFeedback: (organizationId, siteId, siteSpaceId, pageId, visitorId, data, params = {}) => this.request({
3264
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/pages/${pageId}/feedbacks/${visitorId}`,
3265
- method: "PUT",
3266
- body: data,
3267
- secure: true,
3268
- type: "application/json" /* Json */,
3269
- format: "json",
3270
- ...params
3271
- }),
3272
2918
  moveSiteSectionGroup: (organizationId, siteId, siteSectionGroupId, data, params = {}) => this.request({
3273
2919
  path: `/orgs/${organizationId}/sites/${siteId}/section-groups/${siteSectionGroupId}/move`,
3274
2920
  method: "POST",
@@ -3304,14 +2950,6 @@ var Api = class extends HttpClient {
3304
2950
  format: "json",
3305
2951
  ...params
3306
2952
  }),
3307
- trackViewInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3308
- path: `/orgs/${organizationId}/sites/${siteId}/insights/track_view`,
3309
- method: "POST",
3310
- body: data,
3311
- secure: true,
3312
- type: "application/json" /* Json */,
3313
- ...params
3314
- }),
3315
2953
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3316
2954
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3317
2955
  method: "POST",
@@ -3336,22 +2974,6 @@ var Api = class extends HttpClient {
3336
2974
  format: "json",
3337
2975
  ...params
3338
2976
  }),
3339
- getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3340
- path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
3341
- method: "GET",
3342
- query,
3343
- secure: true,
3344
- format: "json",
3345
- ...params
3346
- }),
3347
- getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3348
- path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
3349
- method: "GET",
3350
- query,
3351
- secure: true,
3352
- format: "json",
3353
- ...params
3354
- }),
3355
2977
  updateSiteAdsById: (organizationId, siteId, data, params = {}) => this.request({
3356
2978
  path: `/orgs/${organizationId}/sites/${siteId}/ads`,
3357
2979
  method: "POST",
@@ -3400,6 +3022,15 @@ var Api = class extends HttpClient {
3400
3022
  format: "json",
3401
3023
  ...params
3402
3024
  }),
3025
+ generateSiteStorageUploadUrl: (organizationId, siteId, data, params = {}) => this.request({
3026
+ path: `/orgs/${organizationId}/sites/${siteId}/storage/upload`,
3027
+ method: "POST",
3028
+ body: data,
3029
+ secure: true,
3030
+ type: "application/json" /* Json */,
3031
+ format: "json",
3032
+ ...params
3033
+ }),
3403
3034
  listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
3404
3035
  path: `/orgs/${organizationId}/openapi`,
3405
3036
  method: "GET",
@@ -3475,15 +3106,6 @@ var Api = class extends HttpClient {
3475
3106
  format: "json",
3476
3107
  ...params
3477
3108
  }),
3478
- setupCustomHostname: (hostname, data, params = {}) => this.request({
3479
- path: `/custom-hostnames/${hostname}`,
3480
- method: "POST",
3481
- body: data,
3482
- secure: true,
3483
- type: "application/json" /* Json */,
3484
- format: "json",
3485
- ...params
3486
- }),
3487
3109
  dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
3488
3110
  path: `/custom-hostnames/${hostname}`,
3489
3111
  method: "PATCH",
@@ -3495,14 +3117,6 @@ var Api = class extends HttpClient {
3495
3117
  method: "DELETE",
3496
3118
  secure: true,
3497
3119
  ...params
3498
- }),
3499
- testCustomHostname: (hostname, data, params = {}) => this.request({
3500
- path: `/custom-hostnames/${hostname}/test`,
3501
- method: "POST",
3502
- body: data,
3503
- secure: true,
3504
- type: "application/json" /* Json */,
3505
- ...params
3506
3120
  })
3507
3121
  };
3508
3122
  ads = {
@@ -3523,17 +3137,6 @@ var Api = class extends HttpClient {
3523
3137
  ...params
3524
3138
  })
3525
3139
  };
3526
- internal = {
3527
- generateHiveAccessToken: (data, params = {}) => this.request({
3528
- path: `/internal/hive/token`,
3529
- method: "POST",
3530
- body: data,
3531
- secure: true,
3532
- type: "application/json" /* Json */,
3533
- format: "json",
3534
- ...params
3535
- })
3536
- };
3537
3140
  urls = {
3538
3141
  getContentByUrl: (query, params = {}) => this.request({
3539
3142
  path: `/urls/content`,
@@ -3583,14 +3186,19 @@ var GitBookAPI = class extends Api {
3583
3186
  endpoint;
3584
3187
  authToken;
3585
3188
  userAgent;
3189
+ serviceBinding;
3586
3190
  constructor(options = {}) {
3587
3191
  const {
3588
3192
  endpoint = GITBOOK_DEFAULT_ENDPOINT,
3589
3193
  authToken,
3590
- userAgent = `${name}/${version}`
3194
+ userAgent = `${name}/${version}`,
3195
+ serviceBinding = {
3196
+ fetch
3197
+ }
3591
3198
  } = options;
3199
+ const normalizedEndpoint = endpoint.endsWith("/") ? endpoint.slice(0, -1) : endpoint;
3592
3200
  super({
3593
- baseUrl: `${endpoint}/v1`,
3201
+ baseUrl: `${normalizedEndpoint}/v1`,
3594
3202
  securityWorker: (securityData) => {
3595
3203
  if (securityData && securityData.authToken) {
3596
3204
  return {
@@ -3609,7 +3217,7 @@ var GitBookAPI = class extends Api {
3609
3217
  if (init && "referrerPolicy" in init) {
3610
3218
  delete init.referrerPolicy;
3611
3219
  }
3612
- const response = await fetch(input, init);
3220
+ const response = await this.serviceBinding.fetch(input, init);
3613
3221
  if (!response.ok) {
3614
3222
  let error = response.statusText;
3615
3223
  try {
@@ -3622,9 +3230,10 @@ var GitBookAPI = class extends Api {
3622
3230
  return response;
3623
3231
  }
3624
3232
  });
3625
- this.endpoint = endpoint;
3233
+ this.endpoint = normalizedEndpoint;
3626
3234
  this.userAgent = userAgent;
3627
3235
  this.authToken = authToken;
3236
+ this.serviceBinding = serviceBinding;
3628
3237
  this.setSecurityData({ authToken });
3629
3238
  }
3630
3239
  async createInstallationClient(integrationName, installationId) {
@@ -3635,14 +3244,13 @@ var GitBookAPI = class extends Api {
3635
3244
  return new GitBookAPI({
3636
3245
  endpoint: this.endpoint,
3637
3246
  userAgent: this.userAgent,
3638
- authToken: installationToken.token
3247
+ authToken: installationToken.token,
3248
+ serviceBinding: this.serviceBinding
3639
3249
  });
3640
3250
  }
3641
3251
  };
3642
3252
  export {
3643
3253
  APIIntegrationScope,
3644
- AnalyticsSearchPeriod,
3645
- AnalyticsTrafficInterval,
3646
3254
  Api,
3647
3255
  BillingInterval,
3648
3256
  BillingProduct,
@@ -3667,7 +3275,7 @@ export {
3667
3275
  CustomHostnameSslStatus,
3668
3276
  CustomizationBackground,
3669
3277
  CustomizationCorners,
3670
- CustomizationFont,
3278
+ CustomizationDefaultFont,
3671
3279
  CustomizationHeaderPreset,
3672
3280
  CustomizationIconsStyle,
3673
3281
  CustomizationLinksStyle,
@@ -3685,7 +3293,6 @@ export {
3685
3293
  GitSyncProvider,
3686
3294
  HttpClient,
3687
3295
  ImportContentSource,
3688
- InsightsInterval,
3689
3296
  IntegrationCategory,
3690
3297
  IntegrationInstallationSiteSelection,
3691
3298
  IntegrationInstallationSpaceSelection,
@@ -3708,6 +3315,7 @@ export {
3708
3315
  RevisionSemanticChangeType,
3709
3316
  SiteAdsStatus,
3710
3317
  SiteAdsTopic,
3318
+ SiteCustomizationFeature,
3711
3319
  SiteInsightsAdPlacement,
3712
3320
  SiteInsightsEventType,
3713
3321
  SiteInsightsLinkPosition,
@@ -3718,9 +3326,9 @@ export {
3718
3326
  SiteInsightsVisitorBrowser,
3719
3327
  SiteInsightsVisitorDevice,
3720
3328
  SiteInsightsVisitorOS,
3721
- SiteToMigrateFeature,
3722
3329
  SiteType,
3723
3330
  SiteVisibility,
3724
3331
  SpaceEditMode,
3332
+ StorageUploadKind,
3725
3333
  TeamMemberRole
3726
3334
  };