@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.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.95.0";
175
+ var version = "0.96.1";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -383,6 +383,14 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
383
383
  BillingProduct2["BusinessDec2021"] = "business_dec_2021";
384
384
  return BillingProduct2;
385
385
  })(BillingProduct || {});
386
+ var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
387
+ BillingTrialStatus2["Notapplicable"] = "notapplicable";
388
+ BillingTrialStatus2["None"] = "none";
389
+ BillingTrialStatus2["Active"] = "active";
390
+ BillingTrialStatus2["Ended"] = "ended";
391
+ BillingTrialStatus2["Expired"] = "expired";
392
+ return BillingTrialStatus2;
393
+ })(BillingTrialStatus || {});
386
394
  var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
387
395
  OrganizationBlockReason2["Security"] = "security";
388
396
  return OrganizationBlockReason2;
@@ -654,6 +662,11 @@ var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
654
662
  CustomizationTheme2["Gradient"] = "gradient";
655
663
  return CustomizationTheme2;
656
664
  })(CustomizationTheme || {});
665
+ var CustomizationLinksStyle = /* @__PURE__ */ ((CustomizationLinksStyle2) => {
666
+ CustomizationLinksStyle2["Default"] = "default";
667
+ CustomizationLinksStyle2["Accent"] = "accent";
668
+ return CustomizationLinksStyle2;
669
+ })(CustomizationLinksStyle || {});
657
670
  var CustomizationIconsStyle = /* @__PURE__ */ ((CustomizationIconsStyle2) => {
658
671
  CustomizationIconsStyle2["Regular"] = "regular";
659
672
  CustomizationIconsStyle2["Solid"] = "solid";
@@ -768,6 +781,10 @@ var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
768
781
  InsightsInterval2["Year"] = "year";
769
782
  return InsightsInterval2;
770
783
  })(InsightsInterval || {});
784
+ var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
785
+ StorageUploadKind2["CustomizationFont"] = "customization_font";
786
+ return StorageUploadKind2;
787
+ })(StorageUploadKind || {});
771
788
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
772
789
  CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
773
790
  CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
@@ -848,14 +865,6 @@ var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
848
865
  GitSyncOperationStage2["Finalize"] = "finalize";
849
866
  return GitSyncOperationStage2;
850
867
  })(GitSyncOperationStage || {});
851
- var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
852
- BillingTrialStatus2["Notapplicable"] = "notapplicable";
853
- BillingTrialStatus2["None"] = "none";
854
- BillingTrialStatus2["Active"] = "active";
855
- BillingTrialStatus2["Ended"] = "ended";
856
- BillingTrialStatus2["Expired"] = "expired";
857
- return BillingTrialStatus2;
858
- })(BillingTrialStatus || {});
859
868
  var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
860
869
  APIIntegrationScope2["IntegrationRead"] = "integration:read";
861
870
  APIIntegrationScope2["IntegrationUpdate"] = "integration:update";
@@ -2367,15 +2376,6 @@ var Api = class extends HttpClient {
2367
2376
  format: "json",
2368
2377
  ...params
2369
2378
  }),
2370
- createOrganization: (data, params = {}) => this.request({
2371
- path: `/orgs`,
2372
- method: "POST",
2373
- body: data,
2374
- secure: true,
2375
- type: "application/json" /* Json */,
2376
- format: "json",
2377
- ...params
2378
- }),
2379
2379
  getOrganizationById: (organizationId, params = {}) => this.request({
2380
2380
  path: `/orgs/${organizationId}`,
2381
2381
  method: "GET",
@@ -2383,12 +2383,6 @@ var Api = class extends HttpClient {
2383
2383
  format: "json",
2384
2384
  ...params
2385
2385
  }),
2386
- deleteOrganizationById: (organizationId, params = {}) => this.request({
2387
- path: `/orgs/${organizationId}`,
2388
- method: "DELETE",
2389
- secure: true,
2390
- ...params
2391
- }),
2392
2386
  updateOrganizationById: (organizationId, data, params = {}) => this.request({
2393
2387
  path: `/orgs/${organizationId}`,
2394
2388
  method: "PATCH",
@@ -2398,13 +2392,6 @@ var Api = class extends HttpClient {
2398
2392
  format: "json",
2399
2393
  ...params
2400
2394
  }),
2401
- getOrganizationAllContent: (organizationId, params = {}) => this.request({
2402
- path: `/orgs/${organizationId}/content`,
2403
- method: "GET",
2404
- secure: true,
2405
- format: "json",
2406
- ...params
2407
- }),
2408
2395
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
2409
2396
  path: `/orgs/${organizationId}/members`,
2410
2397
  method: "GET",
@@ -2550,14 +2537,6 @@ var Api = class extends HttpClient {
2550
2537
  format: "json",
2551
2538
  ...params
2552
2539
  }),
2553
- listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
2554
- path: `/orgs/${organizationId}/content-link-invites`,
2555
- method: "GET",
2556
- query,
2557
- secure: true,
2558
- format: "json",
2559
- ...params
2560
- }),
2561
2540
  listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
2562
2541
  path: `/orgs/${organizationId}/link-invites`,
2563
2542
  method: "GET",
@@ -2590,63 +2569,6 @@ var Api = class extends HttpClient {
2590
2569
  secure: true,
2591
2570
  ...params
2592
2571
  }),
2593
- upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
2594
- path: `/orgs/${organizationId}/billing`,
2595
- method: "POST",
2596
- query,
2597
- body: data,
2598
- secure: true,
2599
- type: "application/json" /* Json */,
2600
- format: "json",
2601
- ...params
2602
- }),
2603
- migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2604
- path: `/orgs/${organizationId}/billing/migrate`,
2605
- method: "POST",
2606
- body: data,
2607
- secure: true,
2608
- type: "application/json" /* Json */,
2609
- ...params
2610
- }),
2611
- previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
2612
- path: `/orgs/${organizationId}/billing/migrate/preview`,
2613
- method: "POST",
2614
- body: data,
2615
- secure: true,
2616
- type: "application/json" /* Json */,
2617
- format: "json",
2618
- ...params
2619
- }),
2620
- listSitesToMigrate: (organizationId, query, params = {}) => this.request({
2621
- path: `/orgs/${organizationId}/billing/migrate/sites`,
2622
- method: "GET",
2623
- query,
2624
- secure: true,
2625
- format: "json",
2626
- ...params
2627
- }),
2628
- getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
2629
- path: `/orgs/${organizationId}/billing/portal`,
2630
- method: "GET",
2631
- secure: true,
2632
- format: "json",
2633
- ...params
2634
- }),
2635
- previewBillingInvoice: (organizationId, query, params = {}) => this.request({
2636
- path: `/orgs/${organizationId}/billing/preview`,
2637
- method: "GET",
2638
- query,
2639
- secure: true,
2640
- format: "json",
2641
- ...params
2642
- }),
2643
- requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
2644
- path: `/orgs/${organizationId}/request_upgrade`,
2645
- method: "POST",
2646
- secure: true,
2647
- format: "json",
2648
- ...params
2649
- }),
2650
2572
  searchOrganizationContent: (organizationId, query, params = {}) => this.request({
2651
2573
  path: `/orgs/${organizationId}/search`,
2652
2574
  method: "GET",
@@ -2805,55 +2727,6 @@ var Api = class extends HttpClient {
2805
2727
  format: "json",
2806
2728
  ...params
2807
2729
  }),
2808
- getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2809
- path: `/orgs/${organizationId}/usage`,
2810
- method: "GET",
2811
- secure: true,
2812
- format: "json",
2813
- ...params
2814
- }),
2815
- getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2816
- path: `/orgs/${organizationId}/usage/collections`,
2817
- method: "GET",
2818
- secure: true,
2819
- format: "json",
2820
- ...params
2821
- }),
2822
- getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2823
- path: `/orgs/${organizationId}/usage/spaces`,
2824
- method: "GET",
2825
- secure: true,
2826
- format: "json",
2827
- ...params
2828
- }),
2829
- getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2830
- path: `/orgs/${organizationId}/usage/sites`,
2831
- method: "GET",
2832
- secure: true,
2833
- format: "json",
2834
- ...params
2835
- }),
2836
- getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2837
- path: `/orgs/${organizationId}/usage/teams`,
2838
- method: "GET",
2839
- secure: true,
2840
- format: "json",
2841
- ...params
2842
- }),
2843
- getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2844
- path: `/orgs/${organizationId}/usage/members`,
2845
- method: "GET",
2846
- secure: true,
2847
- format: "json",
2848
- ...params
2849
- }),
2850
- getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2851
- path: `/orgs/${organizationId}/usage/team-members`,
2852
- method: "GET",
2853
- secure: true,
2854
- format: "json",
2855
- ...params
2856
- }),
2857
2730
  askInOrganization: (organizationId, data, query, params = {}) => this.request({
2858
2731
  path: `/orgs/${organizationId}/ask`,
2859
2732
  method: "POST",
@@ -2901,14 +2774,6 @@ var Api = class extends HttpClient {
2901
2774
  format: "json",
2902
2775
  ...params
2903
2776
  }),
2904
- previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
2905
- path: `/orgs/${organizationId}/sites/publishing/checkout`,
2906
- method: "GET",
2907
- query,
2908
- secure: true,
2909
- format: "json",
2910
- ...params
2911
- }),
2912
2777
  getSiteById: (organizationId, siteId, params = {}) => this.request({
2913
2778
  path: `/orgs/${organizationId}/sites/${siteId}`,
2914
2779
  method: "GET",
@@ -2993,24 +2858,6 @@ var Api = class extends HttpClient {
2993
2858
  format: "json",
2994
2859
  ...params
2995
2860
  }),
2996
- updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
2997
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
2998
- method: "POST",
2999
- query,
3000
- body: data,
3001
- secure: true,
3002
- type: "application/json" /* Json */,
3003
- format: "json",
3004
- ...params
3005
- }),
3006
- previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
3007
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
3008
- method: "GET",
3009
- query,
3010
- secure: true,
3011
- format: "json",
3012
- ...params
3013
- }),
3014
2861
  getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
3015
2862
  path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
3016
2863
  method: "GET",
@@ -3059,13 +2906,6 @@ var Api = class extends HttpClient {
3059
2906
  format: "json",
3060
2907
  ...params
3061
2908
  }),
3062
- getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
3063
- path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
3064
- method: "GET",
3065
- secure: true,
3066
- format: "json",
3067
- ...params
3068
- }),
3069
2909
  listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
3070
2910
  path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
3071
2911
  method: "GET",
@@ -3240,13 +3080,6 @@ var Api = class extends HttpClient {
3240
3080
  secure: true,
3241
3081
  ...params
3242
3082
  }),
3243
- getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3244
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
3245
- method: "GET",
3246
- secure: true,
3247
- format: "json",
3248
- ...params
3249
- }),
3250
3083
  getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
3251
3084
  path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
3252
3085
  method: "GET",
@@ -3331,14 +3164,6 @@ var Api = class extends HttpClient {
3331
3164
  format: "json",
3332
3165
  ...params
3333
3166
  }),
3334
- getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3335
- path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
3336
- method: "GET",
3337
- query,
3338
- secure: true,
3339
- format: "json",
3340
- ...params
3341
- }),
3342
3167
  getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3343
3168
  path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
3344
3169
  method: "GET",
@@ -3395,6 +3220,15 @@ var Api = class extends HttpClient {
3395
3220
  format: "json",
3396
3221
  ...params
3397
3222
  }),
3223
+ generateSiteStorageUploadUrl: (organizationId, siteId, data, params = {}) => this.request({
3224
+ path: `/orgs/${organizationId}/sites/${siteId}/storage/upload`,
3225
+ method: "POST",
3226
+ body: data,
3227
+ secure: true,
3228
+ type: "application/json" /* Json */,
3229
+ format: "json",
3230
+ ...params
3231
+ }),
3398
3232
  listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
3399
3233
  path: `/orgs/${organizationId}/openapi`,
3400
3234
  method: "GET",
@@ -3470,15 +3304,6 @@ var Api = class extends HttpClient {
3470
3304
  format: "json",
3471
3305
  ...params
3472
3306
  }),
3473
- setupCustomHostname: (hostname, data, params = {}) => this.request({
3474
- path: `/custom-hostnames/${hostname}`,
3475
- method: "POST",
3476
- body: data,
3477
- secure: true,
3478
- type: "application/json" /* Json */,
3479
- format: "json",
3480
- ...params
3481
- }),
3482
3307
  dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
3483
3308
  path: `/custom-hostnames/${hostname}`,
3484
3309
  method: "PATCH",
@@ -3490,14 +3315,6 @@ var Api = class extends HttpClient {
3490
3315
  method: "DELETE",
3491
3316
  secure: true,
3492
3317
  ...params
3493
- }),
3494
- testCustomHostname: (hostname, data, params = {}) => this.request({
3495
- path: `/custom-hostnames/${hostname}/test`,
3496
- method: "POST",
3497
- body: data,
3498
- secure: true,
3499
- type: "application/json" /* Json */,
3500
- ...params
3501
3318
  })
3502
3319
  };
3503
3320
  ads = {
@@ -3518,17 +3335,6 @@ var Api = class extends HttpClient {
3518
3335
  ...params
3519
3336
  })
3520
3337
  };
3521
- internal = {
3522
- generateHiveAccessToken: (data, params = {}) => this.request({
3523
- path: `/internal/hive/token`,
3524
- method: "POST",
3525
- body: data,
3526
- secure: true,
3527
- type: "application/json" /* Json */,
3528
- format: "json",
3529
- ...params
3530
- })
3531
- };
3532
3338
  urls = {
3533
3339
  getContentByUrl: (query, params = {}) => this.request({
3534
3340
  path: `/urls/content`,
@@ -3665,6 +3471,7 @@ export {
3665
3471
  CustomizationFont,
3666
3472
  CustomizationHeaderPreset,
3667
3473
  CustomizationIconsStyle,
3474
+ CustomizationLinksStyle,
3668
3475
  CustomizationLocale,
3669
3476
  CustomizationSidebarBackgroundStyle,
3670
3477
  CustomizationSidebarListStyle,
@@ -3716,5 +3523,6 @@ export {
3716
3523
  SiteType,
3717
3524
  SiteVisibility,
3718
3525
  SpaceEditMode,
3526
+ StorageUploadKind,
3719
3527
  TeamMemberRole
3720
3528
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.95.0",
7
+ "version": "0.96.1",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",