@gitbook/api 0.96.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/client.d.ts +159 -507
- package/dist/index.cjs +24 -221
- package/dist/index.js +23 -221
- package/package.json +1 -1
- package/spec/openapi.json +874 -1884
- package/spec/openapi.yaml +360 -927
package/dist/index.cjs
CHANGED
|
@@ -261,13 +261,14 @@ __export(src_exports, {
|
|
|
261
261
|
SiteType: () => SiteType,
|
|
262
262
|
SiteVisibility: () => SiteVisibility,
|
|
263
263
|
SpaceEditMode: () => SpaceEditMode,
|
|
264
|
+
StorageUploadKind: () => StorageUploadKind,
|
|
264
265
|
TeamMemberRole: () => TeamMemberRole
|
|
265
266
|
});
|
|
266
267
|
module.exports = __toCommonJS(src_exports);
|
|
267
268
|
|
|
268
269
|
// package.json
|
|
269
270
|
var name = "@gitbook/api";
|
|
270
|
-
var version = "0.96.
|
|
271
|
+
var version = "0.96.1";
|
|
271
272
|
|
|
272
273
|
// src/client.ts
|
|
273
274
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -478,6 +479,14 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
478
479
|
BillingProduct2["BusinessDec2021"] = "business_dec_2021";
|
|
479
480
|
return BillingProduct2;
|
|
480
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 || {});
|
|
481
490
|
var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
|
|
482
491
|
OrganizationBlockReason2["Security"] = "security";
|
|
483
492
|
return OrganizationBlockReason2;
|
|
@@ -868,6 +877,10 @@ var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
|
|
|
868
877
|
InsightsInterval2["Year"] = "year";
|
|
869
878
|
return InsightsInterval2;
|
|
870
879
|
})(InsightsInterval || {});
|
|
880
|
+
var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
|
|
881
|
+
StorageUploadKind2["CustomizationFont"] = "customization_font";
|
|
882
|
+
return StorageUploadKind2;
|
|
883
|
+
})(StorageUploadKind || {});
|
|
871
884
|
var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
|
|
872
885
|
CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
|
|
873
886
|
CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
|
|
@@ -948,14 +961,6 @@ var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
|
|
|
948
961
|
GitSyncOperationStage2["Finalize"] = "finalize";
|
|
949
962
|
return GitSyncOperationStage2;
|
|
950
963
|
})(GitSyncOperationStage || {});
|
|
951
|
-
var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
|
|
952
|
-
BillingTrialStatus2["Notapplicable"] = "notapplicable";
|
|
953
|
-
BillingTrialStatus2["None"] = "none";
|
|
954
|
-
BillingTrialStatus2["Active"] = "active";
|
|
955
|
-
BillingTrialStatus2["Ended"] = "ended";
|
|
956
|
-
BillingTrialStatus2["Expired"] = "expired";
|
|
957
|
-
return BillingTrialStatus2;
|
|
958
|
-
})(BillingTrialStatus || {});
|
|
959
964
|
var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
|
|
960
965
|
APIIntegrationScope2["IntegrationRead"] = "integration:read";
|
|
961
966
|
APIIntegrationScope2["IntegrationUpdate"] = "integration:update";
|
|
@@ -2467,15 +2472,6 @@ var Api = class extends HttpClient {
|
|
|
2467
2472
|
format: "json",
|
|
2468
2473
|
...params
|
|
2469
2474
|
}),
|
|
2470
|
-
createOrganization: (data, params = {}) => this.request({
|
|
2471
|
-
path: `/orgs`,
|
|
2472
|
-
method: "POST",
|
|
2473
|
-
body: data,
|
|
2474
|
-
secure: true,
|
|
2475
|
-
type: "application/json" /* Json */,
|
|
2476
|
-
format: "json",
|
|
2477
|
-
...params
|
|
2478
|
-
}),
|
|
2479
2475
|
getOrganizationById: (organizationId, params = {}) => this.request({
|
|
2480
2476
|
path: `/orgs/${organizationId}`,
|
|
2481
2477
|
method: "GET",
|
|
@@ -2483,12 +2479,6 @@ var Api = class extends HttpClient {
|
|
|
2483
2479
|
format: "json",
|
|
2484
2480
|
...params
|
|
2485
2481
|
}),
|
|
2486
|
-
deleteOrganizationById: (organizationId, params = {}) => this.request({
|
|
2487
|
-
path: `/orgs/${organizationId}`,
|
|
2488
|
-
method: "DELETE",
|
|
2489
|
-
secure: true,
|
|
2490
|
-
...params
|
|
2491
|
-
}),
|
|
2492
2482
|
updateOrganizationById: (organizationId, data, params = {}) => this.request({
|
|
2493
2483
|
path: `/orgs/${organizationId}`,
|
|
2494
2484
|
method: "PATCH",
|
|
@@ -2498,13 +2488,6 @@ var Api = class extends HttpClient {
|
|
|
2498
2488
|
format: "json",
|
|
2499
2489
|
...params
|
|
2500
2490
|
}),
|
|
2501
|
-
getOrganizationAllContent: (organizationId, params = {}) => this.request({
|
|
2502
|
-
path: `/orgs/${organizationId}/content`,
|
|
2503
|
-
method: "GET",
|
|
2504
|
-
secure: true,
|
|
2505
|
-
format: "json",
|
|
2506
|
-
...params
|
|
2507
|
-
}),
|
|
2508
2491
|
listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
|
|
2509
2492
|
path: `/orgs/${organizationId}/members`,
|
|
2510
2493
|
method: "GET",
|
|
@@ -2650,14 +2633,6 @@ var Api = class extends HttpClient {
|
|
|
2650
2633
|
format: "json",
|
|
2651
2634
|
...params
|
|
2652
2635
|
}),
|
|
2653
|
-
listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2654
|
-
path: `/orgs/${organizationId}/content-link-invites`,
|
|
2655
|
-
method: "GET",
|
|
2656
|
-
query,
|
|
2657
|
-
secure: true,
|
|
2658
|
-
format: "json",
|
|
2659
|
-
...params
|
|
2660
|
-
}),
|
|
2661
2636
|
listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2662
2637
|
path: `/orgs/${organizationId}/link-invites`,
|
|
2663
2638
|
method: "GET",
|
|
@@ -2690,63 +2665,6 @@ var Api = class extends HttpClient {
|
|
|
2690
2665
|
secure: true,
|
|
2691
2666
|
...params
|
|
2692
2667
|
}),
|
|
2693
|
-
upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
|
|
2694
|
-
path: `/orgs/${organizationId}/billing`,
|
|
2695
|
-
method: "POST",
|
|
2696
|
-
query,
|
|
2697
|
-
body: data,
|
|
2698
|
-
secure: true,
|
|
2699
|
-
type: "application/json" /* Json */,
|
|
2700
|
-
format: "json",
|
|
2701
|
-
...params
|
|
2702
|
-
}),
|
|
2703
|
-
migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2704
|
-
path: `/orgs/${organizationId}/billing/migrate`,
|
|
2705
|
-
method: "POST",
|
|
2706
|
-
body: data,
|
|
2707
|
-
secure: true,
|
|
2708
|
-
type: "application/json" /* Json */,
|
|
2709
|
-
...params
|
|
2710
|
-
}),
|
|
2711
|
-
previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2712
|
-
path: `/orgs/${organizationId}/billing/migrate/preview`,
|
|
2713
|
-
method: "POST",
|
|
2714
|
-
body: data,
|
|
2715
|
-
secure: true,
|
|
2716
|
-
type: "application/json" /* Json */,
|
|
2717
|
-
format: "json",
|
|
2718
|
-
...params
|
|
2719
|
-
}),
|
|
2720
|
-
listSitesToMigrate: (organizationId, query, params = {}) => this.request({
|
|
2721
|
-
path: `/orgs/${organizationId}/billing/migrate/sites`,
|
|
2722
|
-
method: "GET",
|
|
2723
|
-
query,
|
|
2724
|
-
secure: true,
|
|
2725
|
-
format: "json",
|
|
2726
|
-
...params
|
|
2727
|
-
}),
|
|
2728
|
-
getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
|
|
2729
|
-
path: `/orgs/${organizationId}/billing/portal`,
|
|
2730
|
-
method: "GET",
|
|
2731
|
-
secure: true,
|
|
2732
|
-
format: "json",
|
|
2733
|
-
...params
|
|
2734
|
-
}),
|
|
2735
|
-
previewBillingInvoice: (organizationId, query, params = {}) => this.request({
|
|
2736
|
-
path: `/orgs/${organizationId}/billing/preview`,
|
|
2737
|
-
method: "GET",
|
|
2738
|
-
query,
|
|
2739
|
-
secure: true,
|
|
2740
|
-
format: "json",
|
|
2741
|
-
...params
|
|
2742
|
-
}),
|
|
2743
|
-
requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
|
|
2744
|
-
path: `/orgs/${organizationId}/request_upgrade`,
|
|
2745
|
-
method: "POST",
|
|
2746
|
-
secure: true,
|
|
2747
|
-
format: "json",
|
|
2748
|
-
...params
|
|
2749
|
-
}),
|
|
2750
2668
|
searchOrganizationContent: (organizationId, query, params = {}) => this.request({
|
|
2751
2669
|
path: `/orgs/${organizationId}/search`,
|
|
2752
2670
|
method: "GET",
|
|
@@ -2905,55 +2823,6 @@ var Api = class extends HttpClient {
|
|
|
2905
2823
|
format: "json",
|
|
2906
2824
|
...params
|
|
2907
2825
|
}),
|
|
2908
|
-
getUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2909
|
-
path: `/orgs/${organizationId}/usage`,
|
|
2910
|
-
method: "GET",
|
|
2911
|
-
secure: true,
|
|
2912
|
-
format: "json",
|
|
2913
|
-
...params
|
|
2914
|
-
}),
|
|
2915
|
-
getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2916
|
-
path: `/orgs/${organizationId}/usage/collections`,
|
|
2917
|
-
method: "GET",
|
|
2918
|
-
secure: true,
|
|
2919
|
-
format: "json",
|
|
2920
|
-
...params
|
|
2921
|
-
}),
|
|
2922
|
-
getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2923
|
-
path: `/orgs/${organizationId}/usage/spaces`,
|
|
2924
|
-
method: "GET",
|
|
2925
|
-
secure: true,
|
|
2926
|
-
format: "json",
|
|
2927
|
-
...params
|
|
2928
|
-
}),
|
|
2929
|
-
getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2930
|
-
path: `/orgs/${organizationId}/usage/sites`,
|
|
2931
|
-
method: "GET",
|
|
2932
|
-
secure: true,
|
|
2933
|
-
format: "json",
|
|
2934
|
-
...params
|
|
2935
|
-
}),
|
|
2936
|
-
getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2937
|
-
path: `/orgs/${organizationId}/usage/teams`,
|
|
2938
|
-
method: "GET",
|
|
2939
|
-
secure: true,
|
|
2940
|
-
format: "json",
|
|
2941
|
-
...params
|
|
2942
|
-
}),
|
|
2943
|
-
getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2944
|
-
path: `/orgs/${organizationId}/usage/members`,
|
|
2945
|
-
method: "GET",
|
|
2946
|
-
secure: true,
|
|
2947
|
-
format: "json",
|
|
2948
|
-
...params
|
|
2949
|
-
}),
|
|
2950
|
-
getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2951
|
-
path: `/orgs/${organizationId}/usage/team-members`,
|
|
2952
|
-
method: "GET",
|
|
2953
|
-
secure: true,
|
|
2954
|
-
format: "json",
|
|
2955
|
-
...params
|
|
2956
|
-
}),
|
|
2957
2826
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2958
2827
|
path: `/orgs/${organizationId}/ask`,
|
|
2959
2828
|
method: "POST",
|
|
@@ -3001,14 +2870,6 @@ var Api = class extends HttpClient {
|
|
|
3001
2870
|
format: "json",
|
|
3002
2871
|
...params
|
|
3003
2872
|
}),
|
|
3004
|
-
previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
|
|
3005
|
-
path: `/orgs/${organizationId}/sites/publishing/checkout`,
|
|
3006
|
-
method: "GET",
|
|
3007
|
-
query,
|
|
3008
|
-
secure: true,
|
|
3009
|
-
format: "json",
|
|
3010
|
-
...params
|
|
3011
|
-
}),
|
|
3012
2873
|
getSiteById: (organizationId, siteId, params = {}) => this.request({
|
|
3013
2874
|
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
3014
2875
|
method: "GET",
|
|
@@ -3093,24 +2954,6 @@ var Api = class extends HttpClient {
|
|
|
3093
2954
|
format: "json",
|
|
3094
2955
|
...params
|
|
3095
2956
|
}),
|
|
3096
|
-
updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
|
|
3097
|
-
path: `/orgs/${organizationId}/sites/${siteId}/plan`,
|
|
3098
|
-
method: "POST",
|
|
3099
|
-
query,
|
|
3100
|
-
body: data,
|
|
3101
|
-
secure: true,
|
|
3102
|
-
type: "application/json" /* Json */,
|
|
3103
|
-
format: "json",
|
|
3104
|
-
...params
|
|
3105
|
-
}),
|
|
3106
|
-
previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
|
|
3107
|
-
path: `/orgs/${organizationId}/sites/${siteId}/plan`,
|
|
3108
|
-
method: "GET",
|
|
3109
|
-
query,
|
|
3110
|
-
secure: true,
|
|
3111
|
-
format: "json",
|
|
3112
|
-
...params
|
|
3113
|
-
}),
|
|
3114
2957
|
getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
|
|
3115
2958
|
path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
|
|
3116
2959
|
method: "GET",
|
|
@@ -3159,13 +3002,6 @@ var Api = class extends HttpClient {
|
|
|
3159
3002
|
format: "json",
|
|
3160
3003
|
...params
|
|
3161
3004
|
}),
|
|
3162
|
-
getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
|
|
3163
|
-
path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
|
|
3164
|
-
method: "GET",
|
|
3165
|
-
secure: true,
|
|
3166
|
-
format: "json",
|
|
3167
|
-
...params
|
|
3168
|
-
}),
|
|
3169
3005
|
listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
|
|
3170
3006
|
path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
|
|
3171
3007
|
method: "GET",
|
|
@@ -3340,13 +3176,6 @@ var Api = class extends HttpClient {
|
|
|
3340
3176
|
secure: true,
|
|
3341
3177
|
...params
|
|
3342
3178
|
}),
|
|
3343
|
-
getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
3344
|
-
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
|
|
3345
|
-
method: "GET",
|
|
3346
|
-
secure: true,
|
|
3347
|
-
format: "json",
|
|
3348
|
-
...params
|
|
3349
|
-
}),
|
|
3350
3179
|
getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
|
|
3351
3180
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
|
|
3352
3181
|
method: "GET",
|
|
@@ -3431,14 +3260,6 @@ var Api = class extends HttpClient {
|
|
|
3431
3260
|
format: "json",
|
|
3432
3261
|
...params
|
|
3433
3262
|
}),
|
|
3434
|
-
getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3435
|
-
path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
|
|
3436
|
-
method: "GET",
|
|
3437
|
-
query,
|
|
3438
|
-
secure: true,
|
|
3439
|
-
format: "json",
|
|
3440
|
-
...params
|
|
3441
|
-
}),
|
|
3442
3263
|
getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3443
3264
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
|
|
3444
3265
|
method: "GET",
|
|
@@ -3495,6 +3316,15 @@ var Api = class extends HttpClient {
|
|
|
3495
3316
|
format: "json",
|
|
3496
3317
|
...params
|
|
3497
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
|
+
}),
|
|
3498
3328
|
listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
|
|
3499
3329
|
path: `/orgs/${organizationId}/openapi`,
|
|
3500
3330
|
method: "GET",
|
|
@@ -3570,15 +3400,6 @@ var Api = class extends HttpClient {
|
|
|
3570
3400
|
format: "json",
|
|
3571
3401
|
...params
|
|
3572
3402
|
}),
|
|
3573
|
-
setupCustomHostname: (hostname, data, params = {}) => this.request({
|
|
3574
|
-
path: `/custom-hostnames/${hostname}`,
|
|
3575
|
-
method: "POST",
|
|
3576
|
-
body: data,
|
|
3577
|
-
secure: true,
|
|
3578
|
-
type: "application/json" /* Json */,
|
|
3579
|
-
format: "json",
|
|
3580
|
-
...params
|
|
3581
|
-
}),
|
|
3582
3403
|
dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
|
|
3583
3404
|
path: `/custom-hostnames/${hostname}`,
|
|
3584
3405
|
method: "PATCH",
|
|
@@ -3590,14 +3411,6 @@ var Api = class extends HttpClient {
|
|
|
3590
3411
|
method: "DELETE",
|
|
3591
3412
|
secure: true,
|
|
3592
3413
|
...params
|
|
3593
|
-
}),
|
|
3594
|
-
testCustomHostname: (hostname, data, params = {}) => this.request({
|
|
3595
|
-
path: `/custom-hostnames/${hostname}/test`,
|
|
3596
|
-
method: "POST",
|
|
3597
|
-
body: data,
|
|
3598
|
-
secure: true,
|
|
3599
|
-
type: "application/json" /* Json */,
|
|
3600
|
-
...params
|
|
3601
3414
|
})
|
|
3602
3415
|
};
|
|
3603
3416
|
ads = {
|
|
@@ -3618,17 +3431,6 @@ var Api = class extends HttpClient {
|
|
|
3618
3431
|
...params
|
|
3619
3432
|
})
|
|
3620
3433
|
};
|
|
3621
|
-
internal = {
|
|
3622
|
-
generateHiveAccessToken: (data, params = {}) => this.request({
|
|
3623
|
-
path: `/internal/hive/token`,
|
|
3624
|
-
method: "POST",
|
|
3625
|
-
body: data,
|
|
3626
|
-
secure: true,
|
|
3627
|
-
type: "application/json" /* Json */,
|
|
3628
|
-
format: "json",
|
|
3629
|
-
...params
|
|
3630
|
-
})
|
|
3631
|
-
};
|
|
3632
3434
|
urls = {
|
|
3633
3435
|
getContentByUrl: (query, params = {}) => this.request({
|
|
3634
3436
|
path: `/urls/content`,
|
|
@@ -3818,5 +3620,6 @@ var GitBookAPI = class extends Api {
|
|
|
3818
3620
|
SiteType,
|
|
3819
3621
|
SiteVisibility,
|
|
3820
3622
|
SpaceEditMode,
|
|
3623
|
+
StorageUploadKind,
|
|
3821
3624
|
TeamMemberRole
|
|
3822
3625
|
});
|