@gitbook/api 0.45.0 → 0.47.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/client.d.ts +185 -59
- package/dist/index.cjs +62 -20
- package/dist/index.js +61 -18
- package/package.json +1 -1
- package/spec/openapi.json +616 -166
- package/spec/openapi.yaml +339 -96
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.
|
|
175
|
+
var version = "0.47.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -448,6 +448,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
448
448
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
449
449
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
450
450
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
451
|
+
IntegrationScope2["SiteMetadataRead"] = "site:metadata:read";
|
|
451
452
|
IntegrationScope2["SiteViewsRead"] = "site:views:read";
|
|
452
453
|
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
453
454
|
IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
|
|
@@ -471,6 +472,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
|
471
472
|
IntegrationCategory2["Content"] = "content";
|
|
472
473
|
IntegrationCategory2["Gitsync"] = "gitsync";
|
|
473
474
|
IntegrationCategory2["Marketing"] = "marketing";
|
|
475
|
+
IntegrationCategory2["VisitorAuth"] = "visitor-auth";
|
|
474
476
|
IntegrationCategory2["Other"] = "other";
|
|
475
477
|
return IntegrationCategory2;
|
|
476
478
|
})(IntegrationCategory || {});
|
|
@@ -500,7 +502,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
500
502
|
BillingProduct2["Free2024"] = "free_2024";
|
|
501
503
|
BillingProduct2["Plus2024"] = "plus_2024";
|
|
502
504
|
BillingProduct2["Pro2024"] = "pro_2024";
|
|
503
|
-
BillingProduct2["
|
|
505
|
+
BillingProduct2["Enterprise2024"] = "enterprise_2024";
|
|
504
506
|
BillingProduct2["Free"] = "free";
|
|
505
507
|
BillingProduct2["Plus"] = "plus";
|
|
506
508
|
BillingProduct2["Pro"] = "pro";
|
|
@@ -508,6 +510,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
508
510
|
BillingProduct2["Business"] = "business";
|
|
509
511
|
BillingProduct2["Legacy"] = "legacy";
|
|
510
512
|
BillingProduct2["Startup"] = "startup";
|
|
513
|
+
BillingProduct2["Enterprise"] = "enterprise";
|
|
511
514
|
return BillingProduct2;
|
|
512
515
|
})(BillingProduct || {});
|
|
513
516
|
var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
|
|
@@ -637,25 +640,19 @@ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
|
637
640
|
PageFeedbackRating2["Good"] = "good";
|
|
638
641
|
return PageFeedbackRating2;
|
|
639
642
|
})(PageFeedbackRating || {});
|
|
643
|
+
var SiteType = /* @__PURE__ */ ((SiteType2) => {
|
|
644
|
+
SiteType2["Basic"] = "basic";
|
|
645
|
+
SiteType2["Standard"] = "standard";
|
|
646
|
+
SiteType2["Premium"] = "premium";
|
|
647
|
+
return SiteType2;
|
|
648
|
+
})(SiteType || {});
|
|
640
649
|
var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
641
650
|
SiteVisibility2["Public"] = "public";
|
|
642
651
|
SiteVisibility2["Unlisted"] = "unlisted";
|
|
643
652
|
SiteVisibility2["ShareLink"] = "share-link";
|
|
644
653
|
SiteVisibility2["VisitorAuth"] = "visitor-auth";
|
|
645
|
-
SiteVisibility2["Unpublished"] = "unpublished";
|
|
646
654
|
return SiteVisibility2;
|
|
647
655
|
})(SiteVisibility || {});
|
|
648
|
-
var SiteSubscriptionStatus = /* @__PURE__ */ ((SiteSubscriptionStatus2) => {
|
|
649
|
-
SiteSubscriptionStatus2["Active"] = "active";
|
|
650
|
-
SiteSubscriptionStatus2["Inactive"] = "inactive";
|
|
651
|
-
return SiteSubscriptionStatus2;
|
|
652
|
-
})(SiteSubscriptionStatus || {});
|
|
653
|
-
var SiteSubscriptionType = /* @__PURE__ */ ((SiteSubscriptionType2) => {
|
|
654
|
-
SiteSubscriptionType2["Basic"] = "basic";
|
|
655
|
-
SiteSubscriptionType2["Premium"] = "premium";
|
|
656
|
-
SiteSubscriptionType2["PremiumVa"] = "premium_va";
|
|
657
|
-
return SiteSubscriptionType2;
|
|
658
|
-
})(SiteSubscriptionType || {});
|
|
659
656
|
var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
|
|
660
657
|
CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
|
|
661
658
|
CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
|
|
@@ -2412,6 +2409,14 @@ var Api = class extends HttpClient {
|
|
|
2412
2409
|
format: "json",
|
|
2413
2410
|
...params
|
|
2414
2411
|
}),
|
|
2412
|
+
listOrganizationIntegrationsStatus: (organizationId, query, params = {}) => this.request({
|
|
2413
|
+
path: `/orgs/${organizationId}/integrations/installations-status`,
|
|
2414
|
+
method: "GET",
|
|
2415
|
+
query,
|
|
2416
|
+
secure: true,
|
|
2417
|
+
format: "json",
|
|
2418
|
+
...params
|
|
2419
|
+
}),
|
|
2415
2420
|
listOrgExperimentalFeatures: (organizationId, params = {}) => this.request({
|
|
2416
2421
|
path: `/orgs/${organizationId}/experiments`,
|
|
2417
2422
|
method: "GET",
|
|
@@ -2767,6 +2772,36 @@ var Api = class extends HttpClient {
|
|
|
2767
2772
|
secure: true,
|
|
2768
2773
|
...params
|
|
2769
2774
|
}),
|
|
2775
|
+
checkoutSite: (organizationId, siteId, data, params = {}) => this.request({
|
|
2776
|
+
path: `/orgs/${organizationId}/sites/${siteId}/checkout`,
|
|
2777
|
+
method: "POST",
|
|
2778
|
+
body: data,
|
|
2779
|
+
secure: true,
|
|
2780
|
+
type: "application/json" /* Json */,
|
|
2781
|
+
format: "json",
|
|
2782
|
+
...params
|
|
2783
|
+
}),
|
|
2784
|
+
getSiteCheckoutById: (organizationId, siteId, params = {}) => this.request({
|
|
2785
|
+
path: `/orgs/${organizationId}/sites/${siteId}/checkout`,
|
|
2786
|
+
method: "GET",
|
|
2787
|
+
secure: true,
|
|
2788
|
+
format: "json",
|
|
2789
|
+
...params
|
|
2790
|
+
}),
|
|
2791
|
+
publishSite: (organizationId, siteId, params = {}) => this.request({
|
|
2792
|
+
path: `/orgs/${organizationId}/sites/${siteId}/publish`,
|
|
2793
|
+
method: "POST",
|
|
2794
|
+
secure: true,
|
|
2795
|
+
format: "json",
|
|
2796
|
+
...params
|
|
2797
|
+
}),
|
|
2798
|
+
unpublishSite: (organizationId, siteId, params = {}) => this.request({
|
|
2799
|
+
path: `/orgs/${organizationId}/sites/${siteId}/unpublish`,
|
|
2800
|
+
method: "POST",
|
|
2801
|
+
secure: true,
|
|
2802
|
+
format: "json",
|
|
2803
|
+
...params
|
|
2804
|
+
}),
|
|
2770
2805
|
listSiteShareLinks: (organizationId, siteId, query, params = {}) => this.request({
|
|
2771
2806
|
path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
|
|
2772
2807
|
method: "GET",
|
|
@@ -2815,6 +2850,13 @@ var Api = class extends HttpClient {
|
|
|
2815
2850
|
format: "json",
|
|
2816
2851
|
...params
|
|
2817
2852
|
}),
|
|
2853
|
+
regenerateSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
|
|
2854
|
+
path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth/regenerate`,
|
|
2855
|
+
method: "POST",
|
|
2856
|
+
secure: true,
|
|
2857
|
+
format: "json",
|
|
2858
|
+
...params
|
|
2859
|
+
}),
|
|
2818
2860
|
getSitePublishingPreviewById: (organizationId, siteId, query, params = {}) => this.request({
|
|
2819
2861
|
path: `/orgs/${organizationId}/sites/${siteId}/publishing/preview`,
|
|
2820
2862
|
method: "GET",
|
|
@@ -2823,9 +2865,10 @@ var Api = class extends HttpClient {
|
|
|
2823
2865
|
format: "json",
|
|
2824
2866
|
...params
|
|
2825
2867
|
}),
|
|
2826
|
-
getSiteCustomizationById: (organizationId, siteId, params = {}) => this.request({
|
|
2868
|
+
getSiteCustomizationById: (organizationId, siteId, query, params = {}) => this.request({
|
|
2827
2869
|
path: `/orgs/${organizationId}/sites/${siteId}/customization`,
|
|
2828
2870
|
method: "GET",
|
|
2871
|
+
query,
|
|
2829
2872
|
secure: true,
|
|
2830
2873
|
format: "json",
|
|
2831
2874
|
...params
|
|
@@ -2886,9 +2929,10 @@ var Api = class extends HttpClient {
|
|
|
2886
2929
|
secure: true,
|
|
2887
2930
|
...params
|
|
2888
2931
|
}),
|
|
2889
|
-
getSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
2932
|
+
getSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
|
|
2890
2933
|
path: `/orgs/${organizationId}/sites/${siteId}/spaces/${siteSpaceId}/customization`,
|
|
2891
2934
|
method: "GET",
|
|
2935
|
+
query,
|
|
2892
2936
|
secure: true,
|
|
2893
2937
|
format: "json",
|
|
2894
2938
|
...params
|
|
@@ -3128,8 +3172,7 @@ export {
|
|
|
3128
3172
|
RevisionPageLayoutPreset,
|
|
3129
3173
|
RevisionPageType,
|
|
3130
3174
|
RevisionSemanticChangeType,
|
|
3131
|
-
|
|
3132
|
-
SiteSubscriptionType,
|
|
3175
|
+
SiteType,
|
|
3133
3176
|
SiteVisibility,
|
|
3134
3177
|
SpaceBlockReason,
|
|
3135
3178
|
SpaceEditMode,
|