@gitbook/api 0.80.0 → 0.80.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 +23 -2
- package/dist/index.cjs +16 -2
- package/dist/index.js +15 -2
- package/package.json +1 -1
- package/spec/openapi.json +57 -6
- package/spec/openapi.yaml +39 -2
package/dist/client.d.ts
CHANGED
|
@@ -1504,6 +1504,9 @@ export declare enum BillingProduct {
|
|
|
1504
1504
|
TeamDec2021 = "team_dec_2021",
|
|
1505
1505
|
BusinessDec2021 = "business_dec_2021"
|
|
1506
1506
|
}
|
|
1507
|
+
export declare enum OrganizationBlockReason {
|
|
1508
|
+
Security = "security"
|
|
1509
|
+
}
|
|
1507
1510
|
export interface Organization {
|
|
1508
1511
|
/** Type of Object, always equals to "organization" */
|
|
1509
1512
|
object: 'organization';
|
|
@@ -1545,6 +1548,18 @@ export interface Organization {
|
|
|
1545
1548
|
/** URL of the logo of this organization, if defined. */
|
|
1546
1549
|
logo?: URL;
|
|
1547
1550
|
};
|
|
1551
|
+
/** The decision taken by the user at the end of the trial */
|
|
1552
|
+
trialDecision?: 'downgrade';
|
|
1553
|
+
/** Custom hostname linked to this organization */
|
|
1554
|
+
customHostname?: string;
|
|
1555
|
+
/** If the organization is blocked, information about the block will appear here */
|
|
1556
|
+
blocked?: {
|
|
1557
|
+
reason: OrganizationBlockReason;
|
|
1558
|
+
};
|
|
1559
|
+
/** If true, the organization is still using the deprecated snippets feature. */
|
|
1560
|
+
internal_isUsingSnippets?: boolean;
|
|
1561
|
+
/** If true, the organization is on the new trial which includes sites and the Pro plan. */
|
|
1562
|
+
internal_isOnNewTrial?: boolean;
|
|
1548
1563
|
/** The set of permissions for the organization */
|
|
1549
1564
|
permissions: {
|
|
1550
1565
|
/** Can the user manage the title, members, etc. */
|
|
@@ -3416,6 +3431,10 @@ export declare enum SiteVisibility {
|
|
|
3416
3431
|
ShareLink = "share-link",
|
|
3417
3432
|
VisitorAuth = "visitor-auth"
|
|
3418
3433
|
}
|
|
3434
|
+
export interface SiteAdaptiveContent {
|
|
3435
|
+
/** Whether adaptive content should be enabled on the site. */
|
|
3436
|
+
enabled: boolean;
|
|
3437
|
+
}
|
|
3419
3438
|
/** Topic of the content */
|
|
3420
3439
|
export declare enum SiteAdsTopic {
|
|
3421
3440
|
Webdev = "webdev",
|
|
@@ -3463,6 +3482,7 @@ export interface Site {
|
|
|
3463
3482
|
siteSpaces: number;
|
|
3464
3483
|
/** @format date-time */
|
|
3465
3484
|
createdAt: string;
|
|
3485
|
+
adaptiveContent?: SiteAdaptiveContent;
|
|
3466
3486
|
ads?: SiteAds;
|
|
3467
3487
|
/** URLs associated with the object */
|
|
3468
3488
|
urls: {
|
|
@@ -5305,7 +5325,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
5305
5325
|
protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
|
|
5306
5326
|
abortRequest: (cancelToken: CancelToken) => void;
|
|
5307
5327
|
request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
|
|
5308
|
-
streamRequest: <T, E = any>({ path, baseUrl, cancelToken, secure, ...params }: FullRequestParams) => EventIterator<T>;
|
|
5328
|
+
streamRequest: <T, E = any>({ body, path, type, baseUrl, cancelToken, secure, ...params }: FullRequestParams) => EventIterator<T>;
|
|
5309
5329
|
}
|
|
5310
5330
|
/**
|
|
5311
5331
|
* @title GitBook API
|
|
@@ -8685,7 +8705,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8685
8705
|
/**
|
|
8686
8706
|
* No description
|
|
8687
8707
|
*
|
|
8688
|
-
* @tags integrations
|
|
8708
|
+
* @tags integrations, critical
|
|
8689
8709
|
* @name ListOrganizationIntegrationsStatus
|
|
8690
8710
|
* @summary List the statuses of all integrations installed in an organization
|
|
8691
8711
|
* @request GET:/orgs/{organizationId}/integrations/installations-status
|
|
@@ -9277,6 +9297,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9277
9297
|
visibility?: SiteVisibility;
|
|
9278
9298
|
/** Basename for the site. For e.g. api */
|
|
9279
9299
|
basename?: SiteBasename;
|
|
9300
|
+
adaptiveContent?: SiteAdaptiveContent;
|
|
9280
9301
|
/** ID of the site-space to be used as the default at the root level. If site has sections, this will mark the default site space in the site's default section. */
|
|
9281
9302
|
defaultSiteSpace?: string;
|
|
9282
9303
|
/** ID of the site-section to be used as the default. */
|
package/dist/index.cjs
CHANGED
|
@@ -225,6 +225,7 @@ __export(src_exports, {
|
|
|
225
225
|
IntegrationTarget: () => IntegrationTarget,
|
|
226
226
|
IntegrationVisibility: () => IntegrationVisibility,
|
|
227
227
|
MemberRole: () => MemberRole,
|
|
228
|
+
OrganizationBlockReason: () => OrganizationBlockReason,
|
|
228
229
|
OrganizationCommunityType: () => OrganizationCommunityType,
|
|
229
230
|
OrganizationType: () => OrganizationType,
|
|
230
231
|
OrganizationUseCase: () => OrganizationUseCase,
|
|
@@ -246,7 +247,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
246
247
|
|
|
247
248
|
// package.json
|
|
248
249
|
var name = "@gitbook/api";
|
|
249
|
-
var version = "0.80.
|
|
250
|
+
var version = "0.80.1";
|
|
250
251
|
|
|
251
252
|
// src/client.ts
|
|
252
253
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -483,6 +484,10 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
483
484
|
BillingProduct2["BusinessDec2021"] = "business_dec_2021";
|
|
484
485
|
return BillingProduct2;
|
|
485
486
|
})(BillingProduct || {});
|
|
487
|
+
var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
|
|
488
|
+
OrganizationBlockReason2["Security"] = "security";
|
|
489
|
+
return OrganizationBlockReason2;
|
|
490
|
+
})(OrganizationBlockReason || {});
|
|
486
491
|
var IntegrationTarget = /* @__PURE__ */ ((IntegrationTarget2) => {
|
|
487
492
|
IntegrationTarget2["All"] = "all";
|
|
488
493
|
IntegrationTarget2["Site"] = "site";
|
|
@@ -953,7 +958,9 @@ var HttpClient = class {
|
|
|
953
958
|
});
|
|
954
959
|
};
|
|
955
960
|
streamRequest = ({
|
|
961
|
+
body,
|
|
956
962
|
path,
|
|
963
|
+
type,
|
|
957
964
|
baseUrl,
|
|
958
965
|
cancelToken,
|
|
959
966
|
secure,
|
|
@@ -965,11 +972,17 @@ var HttpClient = class {
|
|
|
965
972
|
const requestQuery = params.query;
|
|
966
973
|
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
967
974
|
const queryString = requestQuery ? this.toQueryString(requestQuery) : void 0;
|
|
975
|
+
const payloadFormatter = this.contentFormatters[type || "application/json" /* Json */];
|
|
968
976
|
const response = await this.customFetch(
|
|
969
977
|
`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
|
|
970
978
|
{
|
|
971
979
|
...requestParams,
|
|
972
|
-
|
|
980
|
+
headers: {
|
|
981
|
+
...requestParams.headers || {},
|
|
982
|
+
...type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}
|
|
983
|
+
},
|
|
984
|
+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
|
|
985
|
+
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body)
|
|
973
986
|
}
|
|
974
987
|
);
|
|
975
988
|
if (!response.ok) {
|
|
@@ -3430,6 +3443,7 @@ var GitBookAPI = class extends Api {
|
|
|
3430
3443
|
IntegrationTarget,
|
|
3431
3444
|
IntegrationVisibility,
|
|
3432
3445
|
MemberRole,
|
|
3446
|
+
OrganizationBlockReason,
|
|
3433
3447
|
OrganizationCommunityType,
|
|
3434
3448
|
OrganizationType,
|
|
3435
3449
|
OrganizationUseCase,
|
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.80.
|
|
175
|
+
var version = "0.80.1";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -409,6 +409,10 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
409
409
|
BillingProduct2["BusinessDec2021"] = "business_dec_2021";
|
|
410
410
|
return BillingProduct2;
|
|
411
411
|
})(BillingProduct || {});
|
|
412
|
+
var OrganizationBlockReason = /* @__PURE__ */ ((OrganizationBlockReason2) => {
|
|
413
|
+
OrganizationBlockReason2["Security"] = "security";
|
|
414
|
+
return OrganizationBlockReason2;
|
|
415
|
+
})(OrganizationBlockReason || {});
|
|
412
416
|
var IntegrationTarget = /* @__PURE__ */ ((IntegrationTarget2) => {
|
|
413
417
|
IntegrationTarget2["All"] = "all";
|
|
414
418
|
IntegrationTarget2["Site"] = "site";
|
|
@@ -879,7 +883,9 @@ var HttpClient = class {
|
|
|
879
883
|
});
|
|
880
884
|
};
|
|
881
885
|
streamRequest = ({
|
|
886
|
+
body,
|
|
882
887
|
path,
|
|
888
|
+
type,
|
|
883
889
|
baseUrl,
|
|
884
890
|
cancelToken,
|
|
885
891
|
secure,
|
|
@@ -891,11 +897,17 @@ var HttpClient = class {
|
|
|
891
897
|
const requestQuery = params.query;
|
|
892
898
|
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
893
899
|
const queryString = requestQuery ? this.toQueryString(requestQuery) : void 0;
|
|
900
|
+
const payloadFormatter = this.contentFormatters[type || "application/json" /* Json */];
|
|
894
901
|
const response = await this.customFetch(
|
|
895
902
|
`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
|
|
896
903
|
{
|
|
897
904
|
...requestParams,
|
|
898
|
-
|
|
905
|
+
headers: {
|
|
906
|
+
...requestParams.headers || {},
|
|
907
|
+
...type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}
|
|
908
|
+
},
|
|
909
|
+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
|
|
910
|
+
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body)
|
|
899
911
|
}
|
|
900
912
|
);
|
|
901
913
|
if (!response.ok) {
|
|
@@ -3355,6 +3367,7 @@ export {
|
|
|
3355
3367
|
IntegrationTarget,
|
|
3356
3368
|
IntegrationVisibility,
|
|
3357
3369
|
MemberRole,
|
|
3370
|
+
OrganizationBlockReason,
|
|
3358
3371
|
OrganizationCommunityType,
|
|
3359
3372
|
OrganizationType,
|
|
3360
3373
|
OrganizationUseCase,
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -7357,11 +7357,6 @@
|
|
|
7357
7357
|
"organizations",
|
|
7358
7358
|
"critical"
|
|
7359
7359
|
],
|
|
7360
|
-
"security": [
|
|
7361
|
-
{
|
|
7362
|
-
"user": []
|
|
7363
|
-
}
|
|
7364
|
-
],
|
|
7365
7360
|
"parameters": [
|
|
7366
7361
|
{
|
|
7367
7362
|
"$ref": "#/components/parameters/organizationId"
|
|
@@ -9753,7 +9748,8 @@
|
|
|
9753
9748
|
"operationId": "listOrganizationIntegrationsStatus",
|
|
9754
9749
|
"summary": "List the statuses of all integrations installed in an organization",
|
|
9755
9750
|
"tags": [
|
|
9756
|
-
"integrations"
|
|
9751
|
+
"integrations",
|
|
9752
|
+
"critical"
|
|
9757
9753
|
],
|
|
9758
9754
|
"parameters": [
|
|
9759
9755
|
{
|
|
@@ -11680,6 +11676,9 @@
|
|
|
11680
11676
|
"basename": {
|
|
11681
11677
|
"$ref": "#/components/schemas/SiteBasename"
|
|
11682
11678
|
},
|
|
11679
|
+
"adaptiveContent": {
|
|
11680
|
+
"$ref": "#/components/schemas/SiteAdaptiveContent"
|
|
11681
|
+
},
|
|
11683
11682
|
"defaultSiteSpace": {
|
|
11684
11683
|
"type": "string",
|
|
11685
11684
|
"description": "ID of the site-space to be used as the default at the root level. If site has sections, this will mark the default site space in the site's default section."
|
|
@@ -21386,6 +21385,12 @@
|
|
|
21386
21385
|
"business_dec_2021"
|
|
21387
21386
|
]
|
|
21388
21387
|
},
|
|
21388
|
+
"OrganizationBlockReason": {
|
|
21389
|
+
"type": "string",
|
|
21390
|
+
"enum": [
|
|
21391
|
+
"security"
|
|
21392
|
+
]
|
|
21393
|
+
},
|
|
21389
21394
|
"Organization": {
|
|
21390
21395
|
"type": "object",
|
|
21391
21396
|
"properties": {
|
|
@@ -21466,6 +21471,37 @@
|
|
|
21466
21471
|
"location"
|
|
21467
21472
|
]
|
|
21468
21473
|
},
|
|
21474
|
+
"trialDecision": {
|
|
21475
|
+
"type": "string",
|
|
21476
|
+
"description": "The decision taken by the user at the end of the trial",
|
|
21477
|
+
"enum": [
|
|
21478
|
+
"downgrade"
|
|
21479
|
+
]
|
|
21480
|
+
},
|
|
21481
|
+
"customHostname": {
|
|
21482
|
+
"description": "Custom hostname linked to this organization",
|
|
21483
|
+
"type": "string"
|
|
21484
|
+
},
|
|
21485
|
+
"blocked": {
|
|
21486
|
+
"type": "object",
|
|
21487
|
+
"description": "If the organization is blocked, information about the block will appear here",
|
|
21488
|
+
"properties": {
|
|
21489
|
+
"reason": {
|
|
21490
|
+
"$ref": "#/components/schemas/OrganizationBlockReason"
|
|
21491
|
+
}
|
|
21492
|
+
},
|
|
21493
|
+
"required": [
|
|
21494
|
+
"reason"
|
|
21495
|
+
]
|
|
21496
|
+
},
|
|
21497
|
+
"internal_isUsingSnippets": {
|
|
21498
|
+
"type": "boolean",
|
|
21499
|
+
"description": "If true, the organization is still using the deprecated snippets feature."
|
|
21500
|
+
},
|
|
21501
|
+
"internal_isOnNewTrial": {
|
|
21502
|
+
"type": "boolean",
|
|
21503
|
+
"description": "If true, the organization is on the new trial which includes sites and the Pro plan."
|
|
21504
|
+
},
|
|
21469
21505
|
"permissions": {
|
|
21470
21506
|
"type": "object",
|
|
21471
21507
|
"description": "The set of permissions for the organization",
|
|
@@ -27288,6 +27324,18 @@
|
|
|
27288
27324
|
"visitor-auth"
|
|
27289
27325
|
]
|
|
27290
27326
|
},
|
|
27327
|
+
"SiteAdaptiveContent": {
|
|
27328
|
+
"type": "object",
|
|
27329
|
+
"properties": {
|
|
27330
|
+
"enabled": {
|
|
27331
|
+
"type": "boolean",
|
|
27332
|
+
"description": "Whether adaptive content should be enabled on the site."
|
|
27333
|
+
}
|
|
27334
|
+
},
|
|
27335
|
+
"required": [
|
|
27336
|
+
"enabled"
|
|
27337
|
+
]
|
|
27338
|
+
},
|
|
27291
27339
|
"SiteAdsTopic": {
|
|
27292
27340
|
"type": "string",
|
|
27293
27341
|
"description": "Topic of the content",
|
|
@@ -27415,6 +27463,9 @@
|
|
|
27415
27463
|
"type": "string",
|
|
27416
27464
|
"format": "date-time"
|
|
27417
27465
|
},
|
|
27466
|
+
"adaptiveContent": {
|
|
27467
|
+
"$ref": "#/components/schemas/SiteAdaptiveContent"
|
|
27468
|
+
},
|
|
27418
27469
|
"ads": {
|
|
27419
27470
|
"$ref": "#/components/schemas/SiteAds"
|
|
27420
27471
|
},
|
package/spec/openapi.yaml
CHANGED
|
@@ -4056,8 +4056,6 @@ paths:
|
|
|
4056
4056
|
tags:
|
|
4057
4057
|
- organizations
|
|
4058
4058
|
- critical
|
|
4059
|
-
security:
|
|
4060
|
-
- user: []
|
|
4061
4059
|
parameters:
|
|
4062
4060
|
- $ref: "#/components/parameters/organizationId"
|
|
4063
4061
|
responses:
|
|
@@ -5412,6 +5410,7 @@ paths:
|
|
|
5412
5410
|
summary: List the statuses of all integrations installed in an organization
|
|
5413
5411
|
tags:
|
|
5414
5412
|
- integrations
|
|
5413
|
+
- critical
|
|
5415
5414
|
parameters:
|
|
5416
5415
|
- $ref: "#/components/parameters/organizationId"
|
|
5417
5416
|
- $ref: "#/components/parameters/listPage"
|
|
@@ -6511,6 +6510,8 @@ paths:
|
|
|
6511
6510
|
$ref: "#/components/schemas/SiteVisibility"
|
|
6512
6511
|
basename:
|
|
6513
6512
|
$ref: "#/components/schemas/SiteBasename"
|
|
6513
|
+
adaptiveContent:
|
|
6514
|
+
$ref: "#/components/schemas/SiteAdaptiveContent"
|
|
6514
6515
|
defaultSiteSpace:
|
|
6515
6516
|
type: string
|
|
6516
6517
|
description: ID of the site-space to be used as the default at the root level. If site has sections, this will mark the default site space in the site's default section.
|
|
@@ -12588,6 +12589,10 @@ components:
|
|
|
12588
12589
|
- team_oct_2019_free
|
|
12589
12590
|
- team_dec_2021
|
|
12590
12591
|
- business_dec_2021
|
|
12592
|
+
OrganizationBlockReason:
|
|
12593
|
+
type: string
|
|
12594
|
+
enum:
|
|
12595
|
+
- security
|
|
12591
12596
|
Organization:
|
|
12592
12597
|
type: object
|
|
12593
12598
|
properties:
|
|
@@ -12646,6 +12651,28 @@ components:
|
|
|
12646
12651
|
required:
|
|
12647
12652
|
- app
|
|
12648
12653
|
- location
|
|
12654
|
+
trialDecision:
|
|
12655
|
+
type: string
|
|
12656
|
+
description: The decision taken by the user at the end of the trial
|
|
12657
|
+
enum:
|
|
12658
|
+
- downgrade
|
|
12659
|
+
customHostname:
|
|
12660
|
+
description: Custom hostname linked to this organization
|
|
12661
|
+
type: string
|
|
12662
|
+
blocked:
|
|
12663
|
+
type: object
|
|
12664
|
+
description: If the organization is blocked, information about the block will appear here
|
|
12665
|
+
properties:
|
|
12666
|
+
reason:
|
|
12667
|
+
$ref: "#/components/schemas/OrganizationBlockReason"
|
|
12668
|
+
required:
|
|
12669
|
+
- reason
|
|
12670
|
+
internal_isUsingSnippets:
|
|
12671
|
+
type: boolean
|
|
12672
|
+
description: If true, the organization is still using the deprecated snippets feature.
|
|
12673
|
+
internal_isOnNewTrial:
|
|
12674
|
+
type: boolean
|
|
12675
|
+
description: If true, the organization is on the new trial which includes sites and the Pro plan.
|
|
12649
12676
|
permissions:
|
|
12650
12677
|
type: object
|
|
12651
12678
|
description: The set of permissions for the organization
|
|
@@ -16476,6 +16503,14 @@ components:
|
|
|
16476
16503
|
- unlisted
|
|
16477
16504
|
- share-link
|
|
16478
16505
|
- visitor-auth
|
|
16506
|
+
SiteAdaptiveContent:
|
|
16507
|
+
type: object
|
|
16508
|
+
properties:
|
|
16509
|
+
enabled:
|
|
16510
|
+
type: boolean
|
|
16511
|
+
description: Whether adaptive content should be enabled on the site.
|
|
16512
|
+
required:
|
|
16513
|
+
- enabled
|
|
16479
16514
|
SiteAdsTopic:
|
|
16480
16515
|
type: string
|
|
16481
16516
|
description: Topic of the content
|
|
@@ -16560,6 +16595,8 @@ components:
|
|
|
16560
16595
|
createdAt:
|
|
16561
16596
|
type: string
|
|
16562
16597
|
format: date-time
|
|
16598
|
+
adaptiveContent:
|
|
16599
|
+
$ref: "#/components/schemas/SiteAdaptiveContent"
|
|
16563
16600
|
ads:
|
|
16564
16601
|
$ref: "#/components/schemas/SiteAds"
|
|
16565
16602
|
urls:
|