@gitbook/api 0.95.0 → 0.96.1

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
@@ -209,6 +209,7 @@ __export(src_exports, {
209
209
  CustomizationFont: () => CustomizationFont,
210
210
  CustomizationHeaderPreset: () => CustomizationHeaderPreset,
211
211
  CustomizationIconsStyle: () => CustomizationIconsStyle,
212
+ CustomizationLinksStyle: () => CustomizationLinksStyle,
212
213
  CustomizationLocale: () => CustomizationLocale,
213
214
  CustomizationSidebarBackgroundStyle: () => CustomizationSidebarBackgroundStyle,
214
215
  CustomizationSidebarListStyle: () => CustomizationSidebarListStyle,
@@ -260,13 +261,14 @@ __export(src_exports, {
260
261
  SiteType: () => SiteType,
261
262
  SiteVisibility: () => SiteVisibility,
262
263
  SpaceEditMode: () => SpaceEditMode,
264
+ StorageUploadKind: () => StorageUploadKind,
263
265
  TeamMemberRole: () => TeamMemberRole
264
266
  });
265
267
  module.exports = __toCommonJS(src_exports);
266
268
 
267
269
  // package.json
268
270
  var name = "@gitbook/api";
269
- var version = "0.95.0";
271
+ var version = "0.96.1";
270
272
 
271
273
  // src/client.ts
272
274
  var import_event_iterator = __toESM(require_node(), 1);
@@ -477,6 +479,14 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
477
479
  BillingProduct2["BusinessDec2021"] = "business_dec_2021";
478
480
  return BillingProduct2;
479
481
  })(BillingProduct || {});
482
+ var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
483
+ BillingTrialStatus2["Notapplicable"] = "notapplicable";
484
+ BillingTrialStatus2["None"] = "none";
485
+ BillingTrialStatus2["Active"] = "active";
486
+ BillingTrialStatus2["Ended"] = "ended";
487
+ BillingTrialStatus2["Expired"] = "expired";
488
+ return BillingTrialStatus2;
489
+ })(BillingTrialStatus || {});
480
490
  var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
481
491
  OrganizationBlockReason2["Security"] = "security";
482
492
  return OrganizationBlockReason2;
@@ -748,6 +758,11 @@ var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
748
758
  CustomizationTheme2["Gradient"] = "gradient";
749
759
  return CustomizationTheme2;
750
760
  })(CustomizationTheme || {});
761
+ var CustomizationLinksStyle = /* @__PURE__ */ ((CustomizationLinksStyle2) => {
762
+ CustomizationLinksStyle2["Default"] = "default";
763
+ CustomizationLinksStyle2["Accent"] = "accent";
764
+ return CustomizationLinksStyle2;
765
+ })(CustomizationLinksStyle || {});
751
766
  var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
752
767
  CustomizationIconsStyle2["Regular"] = "regular";
753
768
  CustomizationIconsStyle2["Solid"] = "solid";
@@ -862,6 +877,10 @@ var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
862
877
  InsightsInterval2["Year"] = "year";
863
878
  return InsightsInterval2;
864
879
  })(InsightsInterval || {});
880
+ var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
881
+ StorageUploadKind2["CustomizationFont"] = "customization_font";
882
+ return StorageUploadKind2;
883
+ })(StorageUploadKind || {});
865
884
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
866
885
  CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
867
886
  CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
@@ -942,14 +961,6 @@ var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
942
961
  GitSyncOperationStage2["Finalize"] = "finalize";
943
962
  return GitSyncOperationStage2;
944
963
  })(GitSyncOperationStage || {});
945
- var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
946
- BillingTrialStatus2["Notapplicable"] = "notapplicable";
947
- BillingTrialStatus2["None"] = "none";
948
- BillingTrialStatus2["Active"] = "active";
949
- BillingTrialStatus2["Ended"] = "ended";
950
- BillingTrialStatus2["Expired"] = "expired";
951
- return BillingTrialStatus2;
952
- })(BillingTrialStatus || {});
953
964
  var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
954
965
  APIIntegrationScope2["IntegrationRead"] = "integration:read";
955
966
  APIIntegrationScope2["IntegrationUpdate"] = "integration:update";
@@ -2461,15 +2472,6 @@ var Api = class extends HttpClient {
2461
2472
  format: "json",
2462
2473
  ...params
2463
2474
  }),
2464
- createOrganization: (data, params = {}) => this.request({
2465
- path: `/orgs`,
2466
- method: "POST",
2467
- body: data,
2468
- secure: true,
2469
- type: "application/json" /* Json */,
2470
- format: "json",
2471
- ...params
2472
- }),
2473
2475
  getOrganizationById: (organizationId, params = {}) => this.request({
2474
2476
  path: `/orgs/${organizationId}`,
2475
2477
  method: "GET",
@@ -2477,12 +2479,6 @@ var Api = class extends HttpClient {
2477
2479
  format: "json",
2478
2480
  ...params
2479
2481
  }),
2480
- deleteOrganizationById: (organizationId, params = {}) => this.request({
2481
- path: `/orgs/${organizationId}`,
2482
- method: "DELETE",
2483
- secure: true,
2484
- ...params
2485
- }),
2486
2482
  updateOrganizationById: (organizationId, data, params = {}) => this.request({
2487
2483
  path: `/orgs/${organizationId}`,
2488
2484
  method: "PATCH",
@@ -2492,13 +2488,6 @@ var Api = class extends HttpClient {
2492
2488
  format: "json",
2493
2489
  ...params
2494
2490
  }),
2495
- getOrganizationAllContent: (organizationId, params = {}) => this.request({
2496
- path: `/orgs/${organizationId}/content`,
2497
- method: "GET",
2498
- secure: true,
2499
- format: "json",
2500
- ...params
2501
- }),
2502
2491
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
2503
2492
  path: `/orgs/${organizationId}/members`,
2504
2493
  method: "GET",
@@ -2644,14 +2633,6 @@ var Api = class extends HttpClient {
2644
2633
  format: "json",
2645
2634
  ...params
2646
2635
  }),
2647
- listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
2648
- path: `/orgs/${organizationId}/content-link-invites`,
2649
- method: "GET",
2650
- query,
2651
- secure: true,
2652
- format: "json",
2653
- ...params
2654
- }),
2655
2636
  listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
2656
2637
  path: `/orgs/${organizationId}/link-invites`,
2657
2638
  method: "GET",
@@ -2684,63 +2665,6 @@ var Api = class extends HttpClient {
2684
2665
  secure: true,
2685
2666
  ...params
2686
2667
  }),
2687
- upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
2688
- path: `/orgs/${organizationId}/billing`,
2689
- method: "POST",
2690
- query,
2691
- body: data,
2692
- secure: true,
2693
- type: "application/json" /* Json */,
2694
- format: "json",
2695
- ...params
2696
- }),
2697
- migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2698
- path: `/orgs/${organizationId}/billing/migrate`,
2699
- method: "POST",
2700
- body: data,
2701
- secure: true,
2702
- type: "application/json" /* Json */,
2703
- ...params
2704
- }),
2705
- previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2706
- path: `/orgs/${organizationId}/billing/migrate/preview`,
2707
- method: "POST",
2708
- body: data,
2709
- secure: true,
2710
- type: "application/json" /* Json */,
2711
- format: "json",
2712
- ...params
2713
- }),
2714
- listSitesToMigrate: (organizationId, query, params = {}) => this.request({
2715
- path: `/orgs/${organizationId}/billing/migrate/sites`,
2716
- method: "GET",
2717
- query,
2718
- secure: true,
2719
- format: "json",
2720
- ...params
2721
- }),
2722
- getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
2723
- path: `/orgs/${organizationId}/billing/portal`,
2724
- method: "GET",
2725
- secure: true,
2726
- format: "json",
2727
- ...params
2728
- }),
2729
- previewBillingInvoice: (organizationId, query, params = {}) => this.request({
2730
- path: `/orgs/${organizationId}/billing/preview`,
2731
- method: "GET",
2732
- query,
2733
- secure: true,
2734
- format: "json",
2735
- ...params
2736
- }),
2737
- requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
2738
- path: `/orgs/${organizationId}/request_upgrade`,
2739
- method: "POST",
2740
- secure: true,
2741
- format: "json",
2742
- ...params
2743
- }),
2744
2668
  searchOrganizationContent: (organizationId, query, params = {}) => this.request({
2745
2669
  path: `/orgs/${organizationId}/search`,
2746
2670
  method: "GET",
@@ -2899,55 +2823,6 @@ var Api = class extends HttpClient {
2899
2823
  format: "json",
2900
2824
  ...params
2901
2825
  }),
2902
- getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2903
- path: `/orgs/${organizationId}/usage`,
2904
- method: "GET",
2905
- secure: true,
2906
- format: "json",
2907
- ...params
2908
- }),
2909
- getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2910
- path: `/orgs/${organizationId}/usage/collections`,
2911
- method: "GET",
2912
- secure: true,
2913
- format: "json",
2914
- ...params
2915
- }),
2916
- getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2917
- path: `/orgs/${organizationId}/usage/spaces`,
2918
- method: "GET",
2919
- secure: true,
2920
- format: "json",
2921
- ...params
2922
- }),
2923
- getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2924
- path: `/orgs/${organizationId}/usage/sites`,
2925
- method: "GET",
2926
- secure: true,
2927
- format: "json",
2928
- ...params
2929
- }),
2930
- getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2931
- path: `/orgs/${organizationId}/usage/teams`,
2932
- method: "GET",
2933
- secure: true,
2934
- format: "json",
2935
- ...params
2936
- }),
2937
- getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2938
- path: `/orgs/${organizationId}/usage/members`,
2939
- method: "GET",
2940
- secure: true,
2941
- format: "json",
2942
- ...params
2943
- }),
2944
- getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2945
- path: `/orgs/${organizationId}/usage/team-members`,
2946
- method: "GET",
2947
- secure: true,
2948
- format: "json",
2949
- ...params
2950
- }),
2951
2826
  askInOrganization: (organizationId, data, query, params = {}) => this.request({
2952
2827
  path: `/orgs/${organizationId}/ask`,
2953
2828
  method: "POST",
@@ -2995,14 +2870,6 @@ var Api = class extends HttpClient {
2995
2870
  format: "json",
2996
2871
  ...params
2997
2872
  }),
2998
- previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
2999
- path: `/orgs/${organizationId}/sites/publishing/checkout`,
3000
- method: "GET",
3001
- query,
3002
- secure: true,
3003
- format: "json",
3004
- ...params
3005
- }),
3006
2873
  getSiteById: (organizationId, siteId, params = {}) => this.request({
3007
2874
  path: `/orgs/${organizationId}/sites/${siteId}`,
3008
2875
  method: "GET",
@@ -3087,24 +2954,6 @@ var Api = class extends HttpClient {
3087
2954
  format: "json",
3088
2955
  ...params
3089
2956
  }),
3090
- updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
3091
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3092
- method: "POST",
3093
- query,
3094
- body: data,
3095
- secure: true,
3096
- type: "application/json" /* Json */,
3097
- format: "json",
3098
- ...params
3099
- }),
3100
- previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
3101
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3102
- method: "GET",
3103
- query,
3104
- secure: true,
3105
- format: "json",
3106
- ...params
3107
- }),
3108
2957
  getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
3109
2958
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
3110
2959
  method: "GET",
@@ -3153,13 +3002,6 @@ var Api = class extends HttpClient {
3153
3002
  format: "json",
3154
3003
  ...params
3155
3004
  }),
3156
- getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
3157
- path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
3158
- method: "GET",
3159
- secure: true,
3160
- format: "json",
3161
- ...params
3162
- }),
3163
3005
  listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
3164
3006
  path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
3165
3007
  method: "GET",
@@ -3334,13 +3176,6 @@ var Api = class extends HttpClient {
3334
3176
  secure: true,
3335
3177
  ...params
3336
3178
  }),
3337
- getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3338
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
3339
- method: "GET",
3340
- secure: true,
3341
- format: "json",
3342
- ...params
3343
- }),
3344
3179
  getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
3345
3180
  path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
3346
3181
  method: "GET",
@@ -3425,14 +3260,6 @@ var Api = class extends HttpClient {
3425
3260
  format: "json",
3426
3261
  ...params
3427
3262
  }),
3428
- getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3429
- path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
3430
- method: "GET",
3431
- query,
3432
- secure: true,
3433
- format: "json",
3434
- ...params
3435
- }),
3436
3263
  getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3437
3264
  path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
3438
3265
  method: "GET",
@@ -3489,6 +3316,15 @@ var Api = class extends HttpClient {
3489
3316
  format: "json",
3490
3317
  ...params
3491
3318
  }),
3319
+ generateSiteStorageUploadUrl: (organizationId, siteId, data, params = {}) => this.request({
3320
+ path: `/orgs/${organizationId}/sites/${siteId}/storage/upload`,
3321
+ method: "POST",
3322
+ body: data,
3323
+ secure: true,
3324
+ type: "application/json" /* Json */,
3325
+ format: "json",
3326
+ ...params
3327
+ }),
3492
3328
  listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
3493
3329
  path: `/orgs/${organizationId}/openapi`,
3494
3330
  method: "GET",
@@ -3564,15 +3400,6 @@ var Api = class extends HttpClient {
3564
3400
  format: "json",
3565
3401
  ...params
3566
3402
  }),
3567
- setupCustomHostname: (hostname, data, params = {}) => this.request({
3568
- path: `/custom-hostnames/${hostname}`,
3569
- method: "POST",
3570
- body: data,
3571
- secure: true,
3572
- type: "application/json" /* Json */,
3573
- format: "json",
3574
- ...params
3575
- }),
3576
3403
  dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
3577
3404
  path: `/custom-hostnames/${hostname}`,
3578
3405
  method: "PATCH",
@@ -3584,14 +3411,6 @@ var Api = class extends HttpClient {
3584
3411
  method: "DELETE",
3585
3412
  secure: true,
3586
3413
  ...params
3587
- }),
3588
- testCustomHostname: (hostname, data, params = {}) => this.request({
3589
- path: `/custom-hostnames/${hostname}/test`,
3590
- method: "POST",
3591
- body: data,
3592
- secure: true,
3593
- type: "application/json" /* Json */,
3594
- ...params
3595
3414
  })
3596
3415
  };
3597
3416
  ads = {
@@ -3612,17 +3431,6 @@ var Api = class extends HttpClient {
3612
3431
  ...params
3613
3432
  })
3614
3433
  };
3615
- internal = {
3616
- generateHiveAccessToken: (data, params = {}) => this.request({
3617
- path: `/internal/hive/token`,
3618
- method: "POST",
3619
- body: data,
3620
- secure: true,
3621
- type: "application/json" /* Json */,
3622
- format: "json",
3623
- ...params
3624
- })
3625
- };
3626
3434
  urls = {
3627
3435
  getContentByUrl: (query, params = {}) => this.request({
3628
3436
  path: `/urls/content`,
@@ -3760,6 +3568,7 @@ var GitBookAPI = class extends Api {
3760
3568
  CustomizationFont,
3761
3569
  CustomizationHeaderPreset,
3762
3570
  CustomizationIconsStyle,
3571
+ CustomizationLinksStyle,
3763
3572
  CustomizationLocale,
3764
3573
  CustomizationSidebarBackgroundStyle,
3765
3574
  CustomizationSidebarListStyle,
@@ -3811,5 +3620,6 @@ var GitBookAPI = class extends Api {
3811
3620
  SiteType,
3812
3621
  SiteVisibility,
3813
3622
  SpaceEditMode,
3623
+ StorageUploadKind,
3814
3624
  TeamMemberRole
3815
3625
  });