@gitbook/api 0.138.0 → 0.140.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 +246 -79
- package/dist/index.cjs +34 -14
- package/dist/index.js +33 -14
- package/package.json +1 -1
- package/spec/openapi.json +764 -186
- package/spec/openapi.yaml +497 -122
package/dist/index.cjs
CHANGED
|
@@ -190,6 +190,7 @@ __export(src_exports, {
|
|
|
190
190
|
BillingProduct: () => BillingProduct,
|
|
191
191
|
BillingSwitchAction: () => BillingSwitchAction,
|
|
192
192
|
BillingTrialStatus: () => BillingTrialStatus,
|
|
193
|
+
CardsImageObjectFit: () => CardsImageObjectFit,
|
|
193
194
|
ChangeRequestReviewStatus: () => ChangeRequestReviewStatus,
|
|
194
195
|
ChangeRequestStatus: () => ChangeRequestStatus,
|
|
195
196
|
CloudflareHostnameStatus: () => CloudflareHostnameStatus,
|
|
@@ -281,7 +282,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
281
282
|
|
|
282
283
|
// package.json
|
|
283
284
|
var name = "@gitbook/api";
|
|
284
|
-
var version = "0.
|
|
285
|
+
var version = "0.140.0";
|
|
285
286
|
|
|
286
287
|
// src/client.ts
|
|
287
288
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -457,6 +458,12 @@ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
|
|
|
457
458
|
TextAlignment2["End"] = "end";
|
|
458
459
|
return TextAlignment2;
|
|
459
460
|
})(TextAlignment || {});
|
|
461
|
+
var CardsImageObjectFit = /* @__PURE__ */ ((CardsImageObjectFit2) => {
|
|
462
|
+
CardsImageObjectFit2["Contain"] = "contain";
|
|
463
|
+
CardsImageObjectFit2["Fill"] = "fill";
|
|
464
|
+
CardsImageObjectFit2["Cover"] = "cover";
|
|
465
|
+
return CardsImageObjectFit2;
|
|
466
|
+
})(CardsImageObjectFit || {});
|
|
460
467
|
var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
|
|
461
468
|
VerticalAlignment2["Top"] = "top";
|
|
462
469
|
VerticalAlignment2["Middle"] = "middle";
|
|
@@ -604,15 +611,11 @@ var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
|
|
|
604
611
|
return IntegrationVisibility2;
|
|
605
612
|
})(IntegrationVisibility || {});
|
|
606
613
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
607
|
-
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
608
614
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
609
615
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
610
616
|
IntegrationScope2["SpaceMetadataRead"] = "space:metadata:read";
|
|
611
617
|
IntegrationScope2["SpaceMetadataWrite"] = "space:metadata:write";
|
|
612
|
-
IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
|
|
613
|
-
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
614
618
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
615
|
-
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
616
619
|
IntegrationScope2["SiteMetadataRead"] = "site:metadata:read";
|
|
617
620
|
IntegrationScope2["SiteViewsRead"] = "site:views:read";
|
|
618
621
|
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
@@ -620,7 +623,6 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
620
623
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
621
624
|
IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
|
|
622
625
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
623
|
-
IntegrationScope2["SiteAiAsk"] = "site:ai:ask";
|
|
624
626
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
625
627
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
626
628
|
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
@@ -894,7 +896,6 @@ var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
|
|
|
894
896
|
CustomizationAIMode2["None"] = "none";
|
|
895
897
|
CustomizationAIMode2["Search"] = "search";
|
|
896
898
|
CustomizationAIMode2["Assistant"] = "assistant";
|
|
897
|
-
CustomizationAIMode2["Integration"] = "integration";
|
|
898
899
|
return CustomizationAIMode2;
|
|
899
900
|
})(CustomizationAIMode || {});
|
|
900
901
|
var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
|
@@ -2146,13 +2147,6 @@ var Api = class extends HttpClient {
|
|
|
2146
2147
|
format: "json",
|
|
2147
2148
|
...params
|
|
2148
2149
|
}),
|
|
2149
|
-
listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
|
|
2150
|
-
path: `/spaces/${spaceId}/integration-scripts`,
|
|
2151
|
-
method: "GET",
|
|
2152
|
-
secure: true,
|
|
2153
|
-
format: "json",
|
|
2154
|
-
...params
|
|
2155
|
-
}),
|
|
2156
2150
|
getSpacePdf: (spaceId, query, params = {}) => this.request({
|
|
2157
2151
|
path: `/spaces/${spaceId}/pdf`,
|
|
2158
2152
|
method: "GET",
|
|
@@ -2721,6 +2715,12 @@ var Api = class extends HttpClient {
|
|
|
2721
2715
|
secure: true,
|
|
2722
2716
|
...params
|
|
2723
2717
|
}),
|
|
2718
|
+
joinOrganization: (organizationId, params = {}) => this.request({
|
|
2719
|
+
path: `/orgs/${organizationId}/join`,
|
|
2720
|
+
method: "POST",
|
|
2721
|
+
secure: true,
|
|
2722
|
+
...params
|
|
2723
|
+
}),
|
|
2724
2724
|
searchOrganizationContent: (organizationId, query, params = {}) => this.request({
|
|
2725
2725
|
path: `/orgs/${organizationId}/search`,
|
|
2726
2726
|
method: "GET",
|
|
@@ -2729,6 +2729,14 @@ var Api = class extends HttpClient {
|
|
|
2729
2729
|
format: "json",
|
|
2730
2730
|
...params
|
|
2731
2731
|
}),
|
|
2732
|
+
listChangeRequestsForOrganization: (organizationId, query, params = {}) => this.request({
|
|
2733
|
+
path: `/orgs/${organizationId}/change-requests`,
|
|
2734
|
+
method: "GET",
|
|
2735
|
+
query,
|
|
2736
|
+
secure: true,
|
|
2737
|
+
format: "json",
|
|
2738
|
+
...params
|
|
2739
|
+
}),
|
|
2732
2740
|
listSpacesInOrganizationById: (organizationId, query, params = {}) => this.request({
|
|
2733
2741
|
path: `/orgs/${organizationId}/spaces`,
|
|
2734
2742
|
method: "GET",
|
|
@@ -3648,6 +3656,17 @@ var Api = class extends HttpClient {
|
|
|
3648
3656
|
...params
|
|
3649
3657
|
})
|
|
3650
3658
|
};
|
|
3659
|
+
org = {
|
|
3660
|
+
startImportRun: (organizationId, data, params = {}) => this.request({
|
|
3661
|
+
path: `/org/${organizationId}/imports`,
|
|
3662
|
+
method: "POST",
|
|
3663
|
+
body: data,
|
|
3664
|
+
secure: true,
|
|
3665
|
+
type: "application/json" /* Json */,
|
|
3666
|
+
format: "json",
|
|
3667
|
+
...params
|
|
3668
|
+
})
|
|
3669
|
+
};
|
|
3651
3670
|
subdomains = {
|
|
3652
3671
|
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3653
3672
|
path: `/subdomains/${subdomain}`,
|
|
@@ -3837,6 +3856,7 @@ var GitBookAPI = class extends Api {
|
|
|
3837
3856
|
BillingProduct,
|
|
3838
3857
|
BillingSwitchAction,
|
|
3839
3858
|
BillingTrialStatus,
|
|
3859
|
+
CardsImageObjectFit,
|
|
3840
3860
|
ChangeRequestReviewStatus,
|
|
3841
3861
|
ChangeRequestStatus,
|
|
3842
3862
|
CloudflareHostnameStatus,
|
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.140.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -348,6 +348,12 @@ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
|
|
|
348
348
|
TextAlignment2["End"] = "end";
|
|
349
349
|
return TextAlignment2;
|
|
350
350
|
})(TextAlignment || {});
|
|
351
|
+
var CardsImageObjectFit = /* @__PURE__ */ ((CardsImageObjectFit2) => {
|
|
352
|
+
CardsImageObjectFit2["Contain"] = "contain";
|
|
353
|
+
CardsImageObjectFit2["Fill"] = "fill";
|
|
354
|
+
CardsImageObjectFit2["Cover"] = "cover";
|
|
355
|
+
return CardsImageObjectFit2;
|
|
356
|
+
})(CardsImageObjectFit || {});
|
|
351
357
|
var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
|
|
352
358
|
VerticalAlignment2["Top"] = "top";
|
|
353
359
|
VerticalAlignment2["Middle"] = "middle";
|
|
@@ -495,15 +501,11 @@ var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
|
|
|
495
501
|
return IntegrationVisibility2;
|
|
496
502
|
})(IntegrationVisibility || {});
|
|
497
503
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
498
|
-
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
499
504
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
500
505
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
501
506
|
IntegrationScope2["SpaceMetadataRead"] = "space:metadata:read";
|
|
502
507
|
IntegrationScope2["SpaceMetadataWrite"] = "space:metadata:write";
|
|
503
|
-
IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
|
|
504
|
-
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
505
508
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
506
|
-
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
507
509
|
IntegrationScope2["SiteMetadataRead"] = "site:metadata:read";
|
|
508
510
|
IntegrationScope2["SiteViewsRead"] = "site:views:read";
|
|
509
511
|
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
@@ -511,7 +513,6 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
511
513
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
512
514
|
IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
|
|
513
515
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
514
|
-
IntegrationScope2["SiteAiAsk"] = "site:ai:ask";
|
|
515
516
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
516
517
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
517
518
|
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
@@ -785,7 +786,6 @@ var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
|
|
|
785
786
|
CustomizationAIMode2["None"] = "none";
|
|
786
787
|
CustomizationAIMode2["Search"] = "search";
|
|
787
788
|
CustomizationAIMode2["Assistant"] = "assistant";
|
|
788
|
-
CustomizationAIMode2["Integration"] = "integration";
|
|
789
789
|
return CustomizationAIMode2;
|
|
790
790
|
})(CustomizationAIMode || {});
|
|
791
791
|
var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
|
|
@@ -2037,13 +2037,6 @@ var Api = class extends HttpClient {
|
|
|
2037
2037
|
format: "json",
|
|
2038
2038
|
...params
|
|
2039
2039
|
}),
|
|
2040
|
-
listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
|
|
2041
|
-
path: `/spaces/${spaceId}/integration-scripts`,
|
|
2042
|
-
method: "GET",
|
|
2043
|
-
secure: true,
|
|
2044
|
-
format: "json",
|
|
2045
|
-
...params
|
|
2046
|
-
}),
|
|
2047
2040
|
getSpacePdf: (spaceId, query, params = {}) => this.request({
|
|
2048
2041
|
path: `/spaces/${spaceId}/pdf`,
|
|
2049
2042
|
method: "GET",
|
|
@@ -2612,6 +2605,12 @@ var Api = class extends HttpClient {
|
|
|
2612
2605
|
secure: true,
|
|
2613
2606
|
...params
|
|
2614
2607
|
}),
|
|
2608
|
+
joinOrganization: (organizationId, params = {}) => this.request({
|
|
2609
|
+
path: `/orgs/${organizationId}/join`,
|
|
2610
|
+
method: "POST",
|
|
2611
|
+
secure: true,
|
|
2612
|
+
...params
|
|
2613
|
+
}),
|
|
2615
2614
|
searchOrganizationContent: (organizationId, query, params = {}) => this.request({
|
|
2616
2615
|
path: `/orgs/${organizationId}/search`,
|
|
2617
2616
|
method: "GET",
|
|
@@ -2620,6 +2619,14 @@ var Api = class extends HttpClient {
|
|
|
2620
2619
|
format: "json",
|
|
2621
2620
|
...params
|
|
2622
2621
|
}),
|
|
2622
|
+
listChangeRequestsForOrganization: (organizationId, query, params = {}) => this.request({
|
|
2623
|
+
path: `/orgs/${organizationId}/change-requests`,
|
|
2624
|
+
method: "GET",
|
|
2625
|
+
query,
|
|
2626
|
+
secure: true,
|
|
2627
|
+
format: "json",
|
|
2628
|
+
...params
|
|
2629
|
+
}),
|
|
2623
2630
|
listSpacesInOrganizationById: (organizationId, query, params = {}) => this.request({
|
|
2624
2631
|
path: `/orgs/${organizationId}/spaces`,
|
|
2625
2632
|
method: "GET",
|
|
@@ -3539,6 +3546,17 @@ var Api = class extends HttpClient {
|
|
|
3539
3546
|
...params
|
|
3540
3547
|
})
|
|
3541
3548
|
};
|
|
3549
|
+
org = {
|
|
3550
|
+
startImportRun: (organizationId, data, params = {}) => this.request({
|
|
3551
|
+
path: `/org/${organizationId}/imports`,
|
|
3552
|
+
method: "POST",
|
|
3553
|
+
body: data,
|
|
3554
|
+
secure: true,
|
|
3555
|
+
type: "application/json" /* Json */,
|
|
3556
|
+
format: "json",
|
|
3557
|
+
...params
|
|
3558
|
+
})
|
|
3559
|
+
};
|
|
3542
3560
|
subdomains = {
|
|
3543
3561
|
getSubdomain: (subdomain, params = {}) => this.request({
|
|
3544
3562
|
path: `/subdomains/${subdomain}`,
|
|
@@ -3727,6 +3745,7 @@ export {
|
|
|
3727
3745
|
BillingProduct,
|
|
3728
3746
|
BillingSwitchAction,
|
|
3729
3747
|
BillingTrialStatus,
|
|
3748
|
+
CardsImageObjectFit,
|
|
3730
3749
|
ChangeRequestReviewStatus,
|
|
3731
3750
|
ChangeRequestStatus,
|
|
3732
3751
|
CloudflareHostnameStatus,
|