@gitbook/api 0.100.0 → 0.102.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
@@ -265,7 +265,7 @@ module.exports = __toCommonJS(src_exports);
265
265
 
266
266
  // package.json
267
267
  var name = "@gitbook/api";
268
- var version = "0.100.0";
268
+ var version = "0.102.0";
269
269
 
270
270
  // src/client.ts
271
271
  var import_event_iterator = __toESM(require_node(), 1);
@@ -670,6 +670,10 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
670
670
  BillingInterval2["Yearly"] = "yearly";
671
671
  return BillingInterval2;
672
672
  })(BillingInterval || {});
673
+ var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
674
+ StorageUploadKind2["CustomizationFont"] = "customization_font";
675
+ return StorageUploadKind2;
676
+ })(StorageUploadKind || {});
673
677
  var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
674
678
  CustomizationTheme2["Clean"] = "clean";
675
679
  CustomizationTheme2["Muted"] = "muted";
@@ -853,10 +857,6 @@ var SiteInsightsQueryRange = /* @__PURE__ */ ((SiteInsightsQueryRange2) => {
853
857
  SiteInsightsQueryRange2["Last24Hours"] = "last24Hours";
854
858
  return SiteInsightsQueryRange2;
855
859
  })(SiteInsightsQueryRange || {});
856
- var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
857
- StorageUploadKind2["CustomizationFont"] = "customization_font";
858
- return StorageUploadKind2;
859
- })(StorageUploadKind || {});
860
860
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
861
861
  CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
862
862
  CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
@@ -2686,6 +2686,103 @@ var Api = class extends HttpClient {
2686
2686
  secure: true,
2687
2687
  ...params
2688
2688
  }),
2689
+ listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
2690
+ path: `/orgs/${organizationId}/openapi`,
2691
+ method: "GET",
2692
+ query,
2693
+ secure: true,
2694
+ format: "json",
2695
+ ...params
2696
+ }),
2697
+ getOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
2698
+ path: `/orgs/${organizationId}/openapi/${specSlug}`,
2699
+ method: "GET",
2700
+ secure: true,
2701
+ format: "json",
2702
+ ...params
2703
+ }),
2704
+ createOrUpdateOpenApiSpecBySlug: (organizationId, specSlug, data, params = {}) => this.request({
2705
+ path: `/orgs/${organizationId}/openapi/${specSlug}`,
2706
+ method: "PUT",
2707
+ body: data,
2708
+ secure: true,
2709
+ type: "application/json" /* Json */,
2710
+ format: "json",
2711
+ ...params
2712
+ }),
2713
+ deleteOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
2714
+ path: `/orgs/${organizationId}/openapi/${specSlug}`,
2715
+ method: "DELETE",
2716
+ secure: true,
2717
+ ...params
2718
+ }),
2719
+ listOpenApiSpecVersions: (organizationId, specSlug, query, params = {}) => this.request({
2720
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions`,
2721
+ method: "GET",
2722
+ query,
2723
+ secure: true,
2724
+ format: "json",
2725
+ ...params
2726
+ }),
2727
+ getLatestOpenApiSpecVersion: (organizationId, specSlug, params = {}) => this.request({
2728
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest`,
2729
+ method: "GET",
2730
+ secure: true,
2731
+ format: "json",
2732
+ ...params
2733
+ }),
2734
+ getLatestOpenApiSpecVersionContent: (organizationId, specSlug, params = {}) => this.request({
2735
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest/content`,
2736
+ method: "GET",
2737
+ secure: true,
2738
+ format: "json",
2739
+ ...params
2740
+ }),
2741
+ getOpenApiSpecVersionById: (organizationId, specSlug, versionId, params = {}) => this.request({
2742
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}`,
2743
+ method: "GET",
2744
+ secure: true,
2745
+ format: "json",
2746
+ ...params
2747
+ }),
2748
+ getOpenApiSpecVersionContentById: (organizationId, specSlug, versionId, params = {}) => this.request({
2749
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}/content`,
2750
+ method: "GET",
2751
+ secure: true,
2752
+ format: "json",
2753
+ ...params
2754
+ }),
2755
+ generateStorageUploadUrl: (organizationId, data, params = {}) => this.request({
2756
+ path: `/orgs/${organizationId}/storage/upload`,
2757
+ method: "POST",
2758
+ body: data,
2759
+ secure: true,
2760
+ type: "application/json" /* Json */,
2761
+ format: "json",
2762
+ ...params
2763
+ }),
2764
+ listCustomFonts: (organizationId, params = {}) => this.request({
2765
+ path: `/orgs/${organizationId}/fonts`,
2766
+ method: "GET",
2767
+ secure: true,
2768
+ format: "json",
2769
+ ...params
2770
+ }),
2771
+ createCustomFont: (organizationId, data, params = {}) => this.request({
2772
+ path: `/orgs/${organizationId}/fonts`,
2773
+ method: "PUT",
2774
+ body: data,
2775
+ secure: true,
2776
+ type: "application/json" /* Json */,
2777
+ format: "json",
2778
+ ...params
2779
+ }),
2780
+ deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
2781
+ path: `/orgs/${organizationId}/fonts/${fontId}`,
2782
+ method: "DELETE",
2783
+ secure: true,
2784
+ ...params
2785
+ }),
2689
2786
  listSites: (organizationId, query, params = {}) => this.request({
2690
2787
  path: `/orgs/${organizationId}/sites`,
2691
2788
  method: "GET",
@@ -3115,81 +3212,6 @@ var Api = class extends HttpClient {
3115
3212
  secure: true,
3116
3213
  format: "json",
3117
3214
  ...params
3118
- }),
3119
- generateSiteStorageUploadUrl: (organizationId, siteId, data, params = {}) => this.request({
3120
- path: `/orgs/${organizationId}/sites/${siteId}/storage/upload`,
3121
- method: "POST",
3122
- body: data,
3123
- secure: true,
3124
- type: "application/json" /* Json */,
3125
- format: "json",
3126
- ...params
3127
- }),
3128
- listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
3129
- path: `/orgs/${organizationId}/openapi`,
3130
- method: "GET",
3131
- query,
3132
- secure: true,
3133
- format: "json",
3134
- ...params
3135
- }),
3136
- getOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
3137
- path: `/orgs/${organizationId}/openapi/${specSlug}`,
3138
- method: "GET",
3139
- secure: true,
3140
- format: "json",
3141
- ...params
3142
- }),
3143
- createOrUpdateOpenApiSpecBySlug: (organizationId, specSlug, data, params = {}) => this.request({
3144
- path: `/orgs/${organizationId}/openapi/${specSlug}`,
3145
- method: "PUT",
3146
- body: data,
3147
- secure: true,
3148
- type: "application/json" /* Json */,
3149
- format: "json",
3150
- ...params
3151
- }),
3152
- deleteOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
3153
- path: `/orgs/${organizationId}/openapi/${specSlug}`,
3154
- method: "DELETE",
3155
- secure: true,
3156
- ...params
3157
- }),
3158
- listOpenApiSpecVersions: (organizationId, specSlug, query, params = {}) => this.request({
3159
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions`,
3160
- method: "GET",
3161
- query,
3162
- secure: true,
3163
- format: "json",
3164
- ...params
3165
- }),
3166
- getLatestOpenApiSpecVersion: (organizationId, specSlug, params = {}) => this.request({
3167
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest`,
3168
- method: "GET",
3169
- secure: true,
3170
- format: "json",
3171
- ...params
3172
- }),
3173
- getLatestOpenApiSpecVersionContent: (organizationId, specSlug, params = {}) => this.request({
3174
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest/content`,
3175
- method: "GET",
3176
- secure: true,
3177
- format: "json",
3178
- ...params
3179
- }),
3180
- getOpenApiSpecVersionById: (organizationId, specSlug, versionId, params = {}) => this.request({
3181
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}`,
3182
- method: "GET",
3183
- secure: true,
3184
- format: "json",
3185
- ...params
3186
- }),
3187
- getOpenApiSpecVersionContentById: (organizationId, specSlug, versionId, params = {}) => this.request({
3188
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}/content`,
3189
- method: "GET",
3190
- secure: true,
3191
- format: "json",
3192
- ...params
3193
3215
  })
3194
3216
  };
3195
3217
  customHostnames = {
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.100.0";
175
+ var version = "0.102.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -577,6 +577,10 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
577
577
  BillingInterval2["Yearly"] = "yearly";
578
578
  return BillingInterval2;
579
579
  })(BillingInterval || {});
580
+ var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
581
+ StorageUploadKind2["CustomizationFont"] = "customization_font";
582
+ return StorageUploadKind2;
583
+ })(StorageUploadKind || {});
580
584
  var CustomizationTheme = /* @__PURE__ */ ((CustomizationTheme2) => {
581
585
  CustomizationTheme2["Clean"] = "clean";
582
586
  CustomizationTheme2["Muted"] = "muted";
@@ -760,10 +764,6 @@ var SiteInsightsQueryRange = /* @__PURE__ */ ((SiteInsightsQueryRange2) => {
760
764
  SiteInsightsQueryRange2["Last24Hours"] = "last24Hours";
761
765
  return SiteInsightsQueryRange2;
762
766
  })(SiteInsightsQueryRange || {});
763
- var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
764
- StorageUploadKind2["CustomizationFont"] = "customization_font";
765
- return StorageUploadKind2;
766
- })(StorageUploadKind || {});
767
767
  var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
768
768
  CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
769
769
  CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
@@ -2593,6 +2593,103 @@ var Api = class extends HttpClient {
2593
2593
  secure: true,
2594
2594
  ...params
2595
2595
  }),
2596
+ listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
2597
+ path: `/orgs/${organizationId}/openapi`,
2598
+ method: "GET",
2599
+ query,
2600
+ secure: true,
2601
+ format: "json",
2602
+ ...params
2603
+ }),
2604
+ getOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
2605
+ path: `/orgs/${organizationId}/openapi/${specSlug}`,
2606
+ method: "GET",
2607
+ secure: true,
2608
+ format: "json",
2609
+ ...params
2610
+ }),
2611
+ createOrUpdateOpenApiSpecBySlug: (organizationId, specSlug, data, params = {}) => this.request({
2612
+ path: `/orgs/${organizationId}/openapi/${specSlug}`,
2613
+ method: "PUT",
2614
+ body: data,
2615
+ secure: true,
2616
+ type: "application/json" /* Json */,
2617
+ format: "json",
2618
+ ...params
2619
+ }),
2620
+ deleteOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
2621
+ path: `/orgs/${organizationId}/openapi/${specSlug}`,
2622
+ method: "DELETE",
2623
+ secure: true,
2624
+ ...params
2625
+ }),
2626
+ listOpenApiSpecVersions: (organizationId, specSlug, query, params = {}) => this.request({
2627
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions`,
2628
+ method: "GET",
2629
+ query,
2630
+ secure: true,
2631
+ format: "json",
2632
+ ...params
2633
+ }),
2634
+ getLatestOpenApiSpecVersion: (organizationId, specSlug, params = {}) => this.request({
2635
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest`,
2636
+ method: "GET",
2637
+ secure: true,
2638
+ format: "json",
2639
+ ...params
2640
+ }),
2641
+ getLatestOpenApiSpecVersionContent: (organizationId, specSlug, params = {}) => this.request({
2642
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest/content`,
2643
+ method: "GET",
2644
+ secure: true,
2645
+ format: "json",
2646
+ ...params
2647
+ }),
2648
+ getOpenApiSpecVersionById: (organizationId, specSlug, versionId, params = {}) => this.request({
2649
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}`,
2650
+ method: "GET",
2651
+ secure: true,
2652
+ format: "json",
2653
+ ...params
2654
+ }),
2655
+ getOpenApiSpecVersionContentById: (organizationId, specSlug, versionId, params = {}) => this.request({
2656
+ path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}/content`,
2657
+ method: "GET",
2658
+ secure: true,
2659
+ format: "json",
2660
+ ...params
2661
+ }),
2662
+ generateStorageUploadUrl: (organizationId, data, params = {}) => this.request({
2663
+ path: `/orgs/${organizationId}/storage/upload`,
2664
+ method: "POST",
2665
+ body: data,
2666
+ secure: true,
2667
+ type: "application/json" /* Json */,
2668
+ format: "json",
2669
+ ...params
2670
+ }),
2671
+ listCustomFonts: (organizationId, params = {}) => this.request({
2672
+ path: `/orgs/${organizationId}/fonts`,
2673
+ method: "GET",
2674
+ secure: true,
2675
+ format: "json",
2676
+ ...params
2677
+ }),
2678
+ createCustomFont: (organizationId, data, params = {}) => this.request({
2679
+ path: `/orgs/${organizationId}/fonts`,
2680
+ method: "PUT",
2681
+ body: data,
2682
+ secure: true,
2683
+ type: "application/json" /* Json */,
2684
+ format: "json",
2685
+ ...params
2686
+ }),
2687
+ deleteCustomFont: (organizationId, fontId, params = {}) => this.request({
2688
+ path: `/orgs/${organizationId}/fonts/${fontId}`,
2689
+ method: "DELETE",
2690
+ secure: true,
2691
+ ...params
2692
+ }),
2596
2693
  listSites: (organizationId, query, params = {}) => this.request({
2597
2694
  path: `/orgs/${organizationId}/sites`,
2598
2695
  method: "GET",
@@ -3022,81 +3119,6 @@ var Api = class extends HttpClient {
3022
3119
  secure: true,
3023
3120
  format: "json",
3024
3121
  ...params
3025
- }),
3026
- generateSiteStorageUploadUrl: (organizationId, siteId, data, params = {}) => this.request({
3027
- path: `/orgs/${organizationId}/sites/${siteId}/storage/upload`,
3028
- method: "POST",
3029
- body: data,
3030
- secure: true,
3031
- type: "application/json" /* Json */,
3032
- format: "json",
3033
- ...params
3034
- }),
3035
- listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
3036
- path: `/orgs/${organizationId}/openapi`,
3037
- method: "GET",
3038
- query,
3039
- secure: true,
3040
- format: "json",
3041
- ...params
3042
- }),
3043
- getOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
3044
- path: `/orgs/${organizationId}/openapi/${specSlug}`,
3045
- method: "GET",
3046
- secure: true,
3047
- format: "json",
3048
- ...params
3049
- }),
3050
- createOrUpdateOpenApiSpecBySlug: (organizationId, specSlug, data, params = {}) => this.request({
3051
- path: `/orgs/${organizationId}/openapi/${specSlug}`,
3052
- method: "PUT",
3053
- body: data,
3054
- secure: true,
3055
- type: "application/json" /* Json */,
3056
- format: "json",
3057
- ...params
3058
- }),
3059
- deleteOpenApiSpecBySlug: (organizationId, specSlug, params = {}) => this.request({
3060
- path: `/orgs/${organizationId}/openapi/${specSlug}`,
3061
- method: "DELETE",
3062
- secure: true,
3063
- ...params
3064
- }),
3065
- listOpenApiSpecVersions: (organizationId, specSlug, query, params = {}) => this.request({
3066
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions`,
3067
- method: "GET",
3068
- query,
3069
- secure: true,
3070
- format: "json",
3071
- ...params
3072
- }),
3073
- getLatestOpenApiSpecVersion: (organizationId, specSlug, params = {}) => this.request({
3074
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest`,
3075
- method: "GET",
3076
- secure: true,
3077
- format: "json",
3078
- ...params
3079
- }),
3080
- getLatestOpenApiSpecVersionContent: (organizationId, specSlug, params = {}) => this.request({
3081
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/latest/content`,
3082
- method: "GET",
3083
- secure: true,
3084
- format: "json",
3085
- ...params
3086
- }),
3087
- getOpenApiSpecVersionById: (organizationId, specSlug, versionId, params = {}) => this.request({
3088
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}`,
3089
- method: "GET",
3090
- secure: true,
3091
- format: "json",
3092
- ...params
3093
- }),
3094
- getOpenApiSpecVersionContentById: (organizationId, specSlug, versionId, params = {}) => this.request({
3095
- path: `/orgs/${organizationId}/openapi/${specSlug}/versions/${versionId}/content`,
3096
- method: "GET",
3097
- secure: true,
3098
- format: "json",
3099
- ...params
3100
3122
  })
3101
3123
  };
3102
3124
  customHostnames = {
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.100.0",
7
+ "version": "0.102.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",