@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.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.96.
|
|
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;
|
|
@@ -773,6 +781,10 @@ var InsightsInterval = /* @__PURE__ */ ((InsightsInterval2) => {
|
|
|
773
781
|
InsightsInterval2["Year"] = "year";
|
|
774
782
|
return InsightsInterval2;
|
|
775
783
|
})(InsightsInterval || {});
|
|
784
|
+
var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
|
|
785
|
+
StorageUploadKind2["CustomizationFont"] = "customization_font";
|
|
786
|
+
return StorageUploadKind2;
|
|
787
|
+
})(StorageUploadKind || {});
|
|
776
788
|
var CustomHostnameDnsStatus = /* @__PURE__ */ ((CustomHostnameDnsStatus2) => {
|
|
777
789
|
CustomHostnameDnsStatus2["DnsPassed"] = "dns_passed";
|
|
778
790
|
CustomHostnameDnsStatus2["DnsWrongCname"] = "dns_wrong_cname";
|
|
@@ -853,14 +865,6 @@ var GitSyncOperationStage = /* @__PURE__ */ ((GitSyncOperationStage2) => {
|
|
|
853
865
|
GitSyncOperationStage2["Finalize"] = "finalize";
|
|
854
866
|
return GitSyncOperationStage2;
|
|
855
867
|
})(GitSyncOperationStage || {});
|
|
856
|
-
var BillingTrialStatus = /* @__PURE__ */ ((BillingTrialStatus2) => {
|
|
857
|
-
BillingTrialStatus2["Notapplicable"] = "notapplicable";
|
|
858
|
-
BillingTrialStatus2["None"] = "none";
|
|
859
|
-
BillingTrialStatus2["Active"] = "active";
|
|
860
|
-
BillingTrialStatus2["Ended"] = "ended";
|
|
861
|
-
BillingTrialStatus2["Expired"] = "expired";
|
|
862
|
-
return BillingTrialStatus2;
|
|
863
|
-
})(BillingTrialStatus || {});
|
|
864
868
|
var APIIntegrationScope = /* @__PURE__ */ ((APIIntegrationScope2) => {
|
|
865
869
|
APIIntegrationScope2["IntegrationRead"] = "integration:read";
|
|
866
870
|
APIIntegrationScope2["IntegrationUpdate"] = "integration:update";
|
|
@@ -2372,15 +2376,6 @@ var Api = class extends HttpClient {
|
|
|
2372
2376
|
format: "json",
|
|
2373
2377
|
...params
|
|
2374
2378
|
}),
|
|
2375
|
-
createOrganization: (data, params = {}) => this.request({
|
|
2376
|
-
path: `/orgs`,
|
|
2377
|
-
method: "POST",
|
|
2378
|
-
body: data,
|
|
2379
|
-
secure: true,
|
|
2380
|
-
type: "application/json" /* Json */,
|
|
2381
|
-
format: "json",
|
|
2382
|
-
...params
|
|
2383
|
-
}),
|
|
2384
2379
|
getOrganizationById: (organizationId, params = {}) => this.request({
|
|
2385
2380
|
path: `/orgs/${organizationId}`,
|
|
2386
2381
|
method: "GET",
|
|
@@ -2388,12 +2383,6 @@ var Api = class extends HttpClient {
|
|
|
2388
2383
|
format: "json",
|
|
2389
2384
|
...params
|
|
2390
2385
|
}),
|
|
2391
|
-
deleteOrganizationById: (organizationId, params = {}) => this.request({
|
|
2392
|
-
path: `/orgs/${organizationId}`,
|
|
2393
|
-
method: "DELETE",
|
|
2394
|
-
secure: true,
|
|
2395
|
-
...params
|
|
2396
|
-
}),
|
|
2397
2386
|
updateOrganizationById: (organizationId, data, params = {}) => this.request({
|
|
2398
2387
|
path: `/orgs/${organizationId}`,
|
|
2399
2388
|
method: "PATCH",
|
|
@@ -2403,13 +2392,6 @@ var Api = class extends HttpClient {
|
|
|
2403
2392
|
format: "json",
|
|
2404
2393
|
...params
|
|
2405
2394
|
}),
|
|
2406
|
-
getOrganizationAllContent: (organizationId, params = {}) => this.request({
|
|
2407
|
-
path: `/orgs/${organizationId}/content`,
|
|
2408
|
-
method: "GET",
|
|
2409
|
-
secure: true,
|
|
2410
|
-
format: "json",
|
|
2411
|
-
...params
|
|
2412
|
-
}),
|
|
2413
2395
|
listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
|
|
2414
2396
|
path: `/orgs/${organizationId}/members`,
|
|
2415
2397
|
method: "GET",
|
|
@@ -2555,14 +2537,6 @@ var Api = class extends HttpClient {
|
|
|
2555
2537
|
format: "json",
|
|
2556
2538
|
...params
|
|
2557
2539
|
}),
|
|
2558
|
-
listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2559
|
-
path: `/orgs/${organizationId}/content-link-invites`,
|
|
2560
|
-
method: "GET",
|
|
2561
|
-
query,
|
|
2562
|
-
secure: true,
|
|
2563
|
-
format: "json",
|
|
2564
|
-
...params
|
|
2565
|
-
}),
|
|
2566
2540
|
listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2567
2541
|
path: `/orgs/${organizationId}/link-invites`,
|
|
2568
2542
|
method: "GET",
|
|
@@ -2595,63 +2569,6 @@ var Api = class extends HttpClient {
|
|
|
2595
2569
|
secure: true,
|
|
2596
2570
|
...params
|
|
2597
2571
|
}),
|
|
2598
|
-
upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
|
|
2599
|
-
path: `/orgs/${organizationId}/billing`,
|
|
2600
|
-
method: "POST",
|
|
2601
|
-
query,
|
|
2602
|
-
body: data,
|
|
2603
|
-
secure: true,
|
|
2604
|
-
type: "application/json" /* Json */,
|
|
2605
|
-
format: "json",
|
|
2606
|
-
...params
|
|
2607
|
-
}),
|
|
2608
|
-
migrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2609
|
-
path: `/orgs/${organizationId}/billing/migrate`,
|
|
2610
|
-
method: "POST",
|
|
2611
|
-
body: data,
|
|
2612
|
-
secure: true,
|
|
2613
|
-
type: "application/json" /* Json */,
|
|
2614
|
-
...params
|
|
2615
|
-
}),
|
|
2616
|
-
previewMigrateOrganizationPlan: (organizationId, data, params = {}) => this.request({
|
|
2617
|
-
path: `/orgs/${organizationId}/billing/migrate/preview`,
|
|
2618
|
-
method: "POST",
|
|
2619
|
-
body: data,
|
|
2620
|
-
secure: true,
|
|
2621
|
-
type: "application/json" /* Json */,
|
|
2622
|
-
format: "json",
|
|
2623
|
-
...params
|
|
2624
|
-
}),
|
|
2625
|
-
listSitesToMigrate: (organizationId, query, params = {}) => this.request({
|
|
2626
|
-
path: `/orgs/${organizationId}/billing/migrate/sites`,
|
|
2627
|
-
method: "GET",
|
|
2628
|
-
query,
|
|
2629
|
-
secure: true,
|
|
2630
|
-
format: "json",
|
|
2631
|
-
...params
|
|
2632
|
-
}),
|
|
2633
|
-
getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
|
|
2634
|
-
path: `/orgs/${organizationId}/billing/portal`,
|
|
2635
|
-
method: "GET",
|
|
2636
|
-
secure: true,
|
|
2637
|
-
format: "json",
|
|
2638
|
-
...params
|
|
2639
|
-
}),
|
|
2640
|
-
previewBillingInvoice: (organizationId, query, params = {}) => this.request({
|
|
2641
|
-
path: `/orgs/${organizationId}/billing/preview`,
|
|
2642
|
-
method: "GET",
|
|
2643
|
-
query,
|
|
2644
|
-
secure: true,
|
|
2645
|
-
format: "json",
|
|
2646
|
-
...params
|
|
2647
|
-
}),
|
|
2648
|
-
requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
|
|
2649
|
-
path: `/orgs/${organizationId}/request_upgrade`,
|
|
2650
|
-
method: "POST",
|
|
2651
|
-
secure: true,
|
|
2652
|
-
format: "json",
|
|
2653
|
-
...params
|
|
2654
|
-
}),
|
|
2655
2572
|
searchOrganizationContent: (organizationId, query, params = {}) => this.request({
|
|
2656
2573
|
path: `/orgs/${organizationId}/search`,
|
|
2657
2574
|
method: "GET",
|
|
@@ -2810,55 +2727,6 @@ var Api = class extends HttpClient {
|
|
|
2810
2727
|
format: "json",
|
|
2811
2728
|
...params
|
|
2812
2729
|
}),
|
|
2813
|
-
getUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2814
|
-
path: `/orgs/${organizationId}/usage`,
|
|
2815
|
-
method: "GET",
|
|
2816
|
-
secure: true,
|
|
2817
|
-
format: "json",
|
|
2818
|
-
...params
|
|
2819
|
-
}),
|
|
2820
|
-
getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2821
|
-
path: `/orgs/${organizationId}/usage/collections`,
|
|
2822
|
-
method: "GET",
|
|
2823
|
-
secure: true,
|
|
2824
|
-
format: "json",
|
|
2825
|
-
...params
|
|
2826
|
-
}),
|
|
2827
|
-
getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2828
|
-
path: `/orgs/${organizationId}/usage/spaces`,
|
|
2829
|
-
method: "GET",
|
|
2830
|
-
secure: true,
|
|
2831
|
-
format: "json",
|
|
2832
|
-
...params
|
|
2833
|
-
}),
|
|
2834
|
-
getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2835
|
-
path: `/orgs/${organizationId}/usage/sites`,
|
|
2836
|
-
method: "GET",
|
|
2837
|
-
secure: true,
|
|
2838
|
-
format: "json",
|
|
2839
|
-
...params
|
|
2840
|
-
}),
|
|
2841
|
-
getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2842
|
-
path: `/orgs/${organizationId}/usage/teams`,
|
|
2843
|
-
method: "GET",
|
|
2844
|
-
secure: true,
|
|
2845
|
-
format: "json",
|
|
2846
|
-
...params
|
|
2847
|
-
}),
|
|
2848
|
-
getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2849
|
-
path: `/orgs/${organizationId}/usage/members`,
|
|
2850
|
-
method: "GET",
|
|
2851
|
-
secure: true,
|
|
2852
|
-
format: "json",
|
|
2853
|
-
...params
|
|
2854
|
-
}),
|
|
2855
|
-
getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
|
|
2856
|
-
path: `/orgs/${organizationId}/usage/team-members`,
|
|
2857
|
-
method: "GET",
|
|
2858
|
-
secure: true,
|
|
2859
|
-
format: "json",
|
|
2860
|
-
...params
|
|
2861
|
-
}),
|
|
2862
2730
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2863
2731
|
path: `/orgs/${organizationId}/ask`,
|
|
2864
2732
|
method: "POST",
|
|
@@ -2906,14 +2774,6 @@ var Api = class extends HttpClient {
|
|
|
2906
2774
|
format: "json",
|
|
2907
2775
|
...params
|
|
2908
2776
|
}),
|
|
2909
|
-
previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
|
|
2910
|
-
path: `/orgs/${organizationId}/sites/publishing/checkout`,
|
|
2911
|
-
method: "GET",
|
|
2912
|
-
query,
|
|
2913
|
-
secure: true,
|
|
2914
|
-
format: "json",
|
|
2915
|
-
...params
|
|
2916
|
-
}),
|
|
2917
2777
|
getSiteById: (organizationId, siteId, params = {}) => this.request({
|
|
2918
2778
|
path: `/orgs/${organizationId}/sites/${siteId}`,
|
|
2919
2779
|
method: "GET",
|
|
@@ -2998,24 +2858,6 @@ var Api = class extends HttpClient {
|
|
|
2998
2858
|
format: "json",
|
|
2999
2859
|
...params
|
|
3000
2860
|
}),
|
|
3001
|
-
updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
|
|
3002
|
-
path: `/orgs/${organizationId}/sites/${siteId}/plan`,
|
|
3003
|
-
method: "POST",
|
|
3004
|
-
query,
|
|
3005
|
-
body: data,
|
|
3006
|
-
secure: true,
|
|
3007
|
-
type: "application/json" /* Json */,
|
|
3008
|
-
format: "json",
|
|
3009
|
-
...params
|
|
3010
|
-
}),
|
|
3011
|
-
previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
|
|
3012
|
-
path: `/orgs/${organizationId}/sites/${siteId}/plan`,
|
|
3013
|
-
method: "GET",
|
|
3014
|
-
query,
|
|
3015
|
-
secure: true,
|
|
3016
|
-
format: "json",
|
|
3017
|
-
...params
|
|
3018
|
-
}),
|
|
3019
2861
|
getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
|
|
3020
2862
|
path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
|
|
3021
2863
|
method: "GET",
|
|
@@ -3064,13 +2906,6 @@ var Api = class extends HttpClient {
|
|
|
3064
2906
|
format: "json",
|
|
3065
2907
|
...params
|
|
3066
2908
|
}),
|
|
3067
|
-
getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
|
|
3068
|
-
path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
|
|
3069
|
-
method: "GET",
|
|
3070
|
-
secure: true,
|
|
3071
|
-
format: "json",
|
|
3072
|
-
...params
|
|
3073
|
-
}),
|
|
3074
2909
|
listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
|
|
3075
2910
|
path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
|
|
3076
2911
|
method: "GET",
|
|
@@ -3245,13 +3080,6 @@ var Api = class extends HttpClient {
|
|
|
3245
3080
|
secure: true,
|
|
3246
3081
|
...params
|
|
3247
3082
|
}),
|
|
3248
|
-
getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
3249
|
-
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
|
|
3250
|
-
method: "GET",
|
|
3251
|
-
secure: true,
|
|
3252
|
-
format: "json",
|
|
3253
|
-
...params
|
|
3254
|
-
}),
|
|
3255
3083
|
getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
|
|
3256
3084
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
|
|
3257
3085
|
method: "GET",
|
|
@@ -3336,14 +3164,6 @@ var Api = class extends HttpClient {
|
|
|
3336
3164
|
format: "json",
|
|
3337
3165
|
...params
|
|
3338
3166
|
}),
|
|
3339
|
-
getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3340
|
-
path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
|
|
3341
|
-
method: "GET",
|
|
3342
|
-
query,
|
|
3343
|
-
secure: true,
|
|
3344
|
-
format: "json",
|
|
3345
|
-
...params
|
|
3346
|
-
}),
|
|
3347
3167
|
getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3348
3168
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
|
|
3349
3169
|
method: "GET",
|
|
@@ -3400,6 +3220,15 @@ var Api = class extends HttpClient {
|
|
|
3400
3220
|
format: "json",
|
|
3401
3221
|
...params
|
|
3402
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
|
+
}),
|
|
3403
3232
|
listOpenApiSpecs: (organizationId, query, params = {}) => this.request({
|
|
3404
3233
|
path: `/orgs/${organizationId}/openapi`,
|
|
3405
3234
|
method: "GET",
|
|
@@ -3475,15 +3304,6 @@ var Api = class extends HttpClient {
|
|
|
3475
3304
|
format: "json",
|
|
3476
3305
|
...params
|
|
3477
3306
|
}),
|
|
3478
|
-
setupCustomHostname: (hostname, data, params = {}) => this.request({
|
|
3479
|
-
path: `/custom-hostnames/${hostname}`,
|
|
3480
|
-
method: "POST",
|
|
3481
|
-
body: data,
|
|
3482
|
-
secure: true,
|
|
3483
|
-
type: "application/json" /* Json */,
|
|
3484
|
-
format: "json",
|
|
3485
|
-
...params
|
|
3486
|
-
}),
|
|
3487
3307
|
dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
|
|
3488
3308
|
path: `/custom-hostnames/${hostname}`,
|
|
3489
3309
|
method: "PATCH",
|
|
@@ -3495,14 +3315,6 @@ var Api = class extends HttpClient {
|
|
|
3495
3315
|
method: "DELETE",
|
|
3496
3316
|
secure: true,
|
|
3497
3317
|
...params
|
|
3498
|
-
}),
|
|
3499
|
-
testCustomHostname: (hostname, data, params = {}) => this.request({
|
|
3500
|
-
path: `/custom-hostnames/${hostname}/test`,
|
|
3501
|
-
method: "POST",
|
|
3502
|
-
body: data,
|
|
3503
|
-
secure: true,
|
|
3504
|
-
type: "application/json" /* Json */,
|
|
3505
|
-
...params
|
|
3506
3318
|
})
|
|
3507
3319
|
};
|
|
3508
3320
|
ads = {
|
|
@@ -3523,17 +3335,6 @@ var Api = class extends HttpClient {
|
|
|
3523
3335
|
...params
|
|
3524
3336
|
})
|
|
3525
3337
|
};
|
|
3526
|
-
internal = {
|
|
3527
|
-
generateHiveAccessToken: (data, params = {}) => this.request({
|
|
3528
|
-
path: `/internal/hive/token`,
|
|
3529
|
-
method: "POST",
|
|
3530
|
-
body: data,
|
|
3531
|
-
secure: true,
|
|
3532
|
-
type: "application/json" /* Json */,
|
|
3533
|
-
format: "json",
|
|
3534
|
-
...params
|
|
3535
|
-
})
|
|
3536
|
-
};
|
|
3537
3338
|
urls = {
|
|
3538
3339
|
getContentByUrl: (query, params = {}) => this.request({
|
|
3539
3340
|
path: `/urls/content`,
|
|
@@ -3722,5 +3523,6 @@ export {
|
|
|
3722
3523
|
SiteType,
|
|
3723
3524
|
SiteVisibility,
|
|
3724
3525
|
SpaceEditMode,
|
|
3526
|
+
StorageUploadKind,
|
|
3725
3527
|
TeamMemberRole
|
|
3726
3528
|
};
|