@gitbook/api 0.114.0 → 0.115.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 +68 -51
- package/dist/index.cjs +10 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
- package/spec/openapi.json +252 -253
- package/spec/openapi.yaml +166 -160
package/dist/client.d.ts
CHANGED
|
@@ -3211,6 +3211,16 @@ export declare enum SiteType {
|
|
|
3211
3211
|
* @maxLength 128
|
|
3212
3212
|
*/
|
|
3213
3213
|
export type SiteTitle = string;
|
|
3214
|
+
export interface CustomizationThemedURL {
|
|
3215
|
+
light: URL;
|
|
3216
|
+
dark: URL;
|
|
3217
|
+
}
|
|
3218
|
+
export type CustomizationFavicon = {
|
|
3219
|
+
icon: CustomizationThemedURL;
|
|
3220
|
+
} | {
|
|
3221
|
+
/** Unicode codepoint or character of the emoji */
|
|
3222
|
+
emoji: Emoji;
|
|
3223
|
+
} | object;
|
|
3214
3224
|
/**
|
|
3215
3225
|
* Custom hostname for the site, for e.g. docs.mycompany.com
|
|
3216
3226
|
* @maxLength 512
|
|
@@ -3313,6 +3323,7 @@ export interface Site {
|
|
|
3313
3323
|
type: SiteType;
|
|
3314
3324
|
/** Title of the site */
|
|
3315
3325
|
title: SiteTitle;
|
|
3326
|
+
icon?: CustomizationFavicon | null;
|
|
3316
3327
|
/** Custom hostname for the site, for e.g. docs.mycompany.com */
|
|
3317
3328
|
hostname?: SiteHostname;
|
|
3318
3329
|
/** Basename for the site. For e.g. api */
|
|
@@ -4129,11 +4140,6 @@ export interface CreateSpace {
|
|
|
4129
4140
|
title?: string;
|
|
4130
4141
|
/** Unicode codepoint or character of the emoji */
|
|
4131
4142
|
emoji?: Emoji;
|
|
4132
|
-
/**
|
|
4133
|
-
* Private spaces are no longer supported by GitBook.
|
|
4134
|
-
* @deprecated
|
|
4135
|
-
*/
|
|
4136
|
-
private?: boolean;
|
|
4137
4143
|
/** ID of a parent collection */
|
|
4138
4144
|
parent?: string;
|
|
4139
4145
|
}
|
|
@@ -4494,7 +4500,7 @@ export type BillingOperationPreviewResponse = {
|
|
|
4494
4500
|
plan: BillingProduct;
|
|
4495
4501
|
invoice?: BillingInvoicePreview;
|
|
4496
4502
|
};
|
|
4497
|
-
export type
|
|
4503
|
+
export type SiteAdaptiveJSONSchemaClaimsProperties = {
|
|
4498
4504
|
type: 'boolean';
|
|
4499
4505
|
description: string;
|
|
4500
4506
|
} | {
|
|
@@ -4504,27 +4510,24 @@ export type Properties = Record<string, {
|
|
|
4504
4510
|
} | {
|
|
4505
4511
|
type: 'object';
|
|
4506
4512
|
description: string;
|
|
4507
|
-
properties:
|
|
4513
|
+
properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
|
|
4508
4514
|
additionalProperties: false;
|
|
4509
|
-
}
|
|
4515
|
+
};
|
|
4510
4516
|
/** JSON schema describing the expected attributes of an Adaptive site schema. */
|
|
4511
4517
|
export interface SiteAdaptiveJSONSchema {
|
|
4512
4518
|
$schema?: 'http://json-schema.org/draft-07/schema#';
|
|
4513
4519
|
$id?: string;
|
|
4514
4520
|
type: 'object';
|
|
4515
|
-
properties:
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
properties: Properties;
|
|
4526
|
-
additionalProperties: false;
|
|
4527
|
-
}>;
|
|
4521
|
+
properties: {
|
|
4522
|
+
/** Unsigned claims of the site visitor. */
|
|
4523
|
+
unsigned?: {
|
|
4524
|
+
type: 'object';
|
|
4525
|
+
description: 'Unsigned claims of the site visitor.';
|
|
4526
|
+
properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
|
|
4527
|
+
additionalProperties: false;
|
|
4528
|
+
};
|
|
4529
|
+
[key: string]: any;
|
|
4530
|
+
};
|
|
4528
4531
|
additionalProperties: false;
|
|
4529
4532
|
}
|
|
4530
4533
|
export interface SiteAdaptiveSchema {
|
|
@@ -4641,10 +4644,6 @@ export declare enum CustomizationLocale {
|
|
|
4641
4644
|
No = "no",
|
|
4642
4645
|
PtBr = "pt-br"
|
|
4643
4646
|
}
|
|
4644
|
-
export interface CustomizationThemedURL {
|
|
4645
|
-
light: URL;
|
|
4646
|
-
dark: URL;
|
|
4647
|
-
}
|
|
4648
4647
|
/**
|
|
4649
4648
|
* The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.
|
|
4650
4649
|
* @deprecated
|
|
@@ -4749,12 +4748,7 @@ export interface SiteCustomizationSettings {
|
|
|
4749
4748
|
/** Language for the UI element */
|
|
4750
4749
|
locale: CustomizationLocale;
|
|
4751
4750
|
};
|
|
4752
|
-
favicon:
|
|
4753
|
-
icon: CustomizationThemedURL;
|
|
4754
|
-
} | {
|
|
4755
|
-
/** Unicode codepoint or character of the emoji */
|
|
4756
|
-
emoji: Emoji;
|
|
4757
|
-
} | object;
|
|
4751
|
+
favicon: CustomizationFavicon;
|
|
4758
4752
|
header: {
|
|
4759
4753
|
/** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
|
|
4760
4754
|
preset: CustomizationHeaderPreset;
|
|
@@ -5557,7 +5551,7 @@ export interface SiteAdsStats {
|
|
|
5557
5551
|
/**
|
|
5558
5552
|
* The source path to redirect from.
|
|
5559
5553
|
* @maxLength 512
|
|
5560
|
-
* @pattern
|
|
5554
|
+
* @pattern ^\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*$
|
|
5561
5555
|
*/
|
|
5562
5556
|
export type SiteRedirectSourcePath = string;
|
|
5563
5557
|
export interface SiteRedirectDestinationSiteSection {
|
|
@@ -5827,6 +5821,12 @@ export type PublishedSiteContentLookup = {
|
|
|
5827
5821
|
target: 'application' | 'content' | 'external';
|
|
5828
5822
|
redirect: URL;
|
|
5829
5823
|
} | PublishedSiteContent;
|
|
5824
|
+
/** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
|
|
5825
|
+
export interface SiteVisitorPayload {
|
|
5826
|
+
/** JWT token generated for a visitor auth session. */
|
|
5827
|
+
jwtToken?: string;
|
|
5828
|
+
unsignedClaims?: PlainObject;
|
|
5829
|
+
}
|
|
5830
5830
|
/**
|
|
5831
5831
|
* @minLength 64
|
|
5832
5832
|
* @maxLength 64
|
|
@@ -6512,12 +6512,7 @@ export interface CustomizationSettings {
|
|
|
6512
6512
|
/** Inherit locale from the parent collection. */
|
|
6513
6513
|
inherit: boolean;
|
|
6514
6514
|
};
|
|
6515
|
-
favicon:
|
|
6516
|
-
icon: CustomizationThemedURL;
|
|
6517
|
-
} | {
|
|
6518
|
-
/** Unicode codepoint or character of the emoji */
|
|
6519
|
-
emoji: Emoji;
|
|
6520
|
-
} | object;
|
|
6515
|
+
favicon: CustomizationFavicon;
|
|
6521
6516
|
header: {
|
|
6522
6517
|
/** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
|
|
6523
6518
|
preset: CustomizationHeaderPreset;
|
|
@@ -7247,7 +7242,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7247
7242
|
/**
|
|
7248
7243
|
* No description
|
|
7249
7244
|
*
|
|
7250
|
-
* @tags space-content, links
|
|
7245
|
+
* @tags space-content, links, critical
|
|
7251
7246
|
* @name ListPageLinksInSpace
|
|
7252
7247
|
* @summary List all space page links
|
|
7253
7248
|
* @request GET:/spaces/{spaceId}/content/page/{pageId}/links
|
|
@@ -7577,7 +7572,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7577
7572
|
/**
|
|
7578
7573
|
* No description
|
|
7579
7574
|
*
|
|
7580
|
-
* @tags change-requests-links, links
|
|
7575
|
+
* @tags change-requests-links, links, critical
|
|
7581
7576
|
* @name ListChangeRequestLinks
|
|
7582
7577
|
* @summary List all change request links
|
|
7583
7578
|
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/links
|
|
@@ -7928,7 +7923,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7928
7923
|
/**
|
|
7929
7924
|
* No description
|
|
7930
7925
|
*
|
|
7931
|
-
* @tags change-request-content
|
|
7926
|
+
* @tags change-request-content, critical
|
|
7932
7927
|
* @name ListPageLinksInChangeRequest
|
|
7933
7928
|
* @summary List all change request links
|
|
7934
7929
|
* @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/links
|
|
@@ -8232,7 +8227,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8232
8227
|
/**
|
|
8233
8228
|
* No description
|
|
8234
8229
|
*
|
|
8235
|
-
* @tags space-comments
|
|
8230
|
+
* @tags space-comments, critical
|
|
8236
8231
|
* @name ListCommentsInSpace
|
|
8237
8232
|
* @summary List all space comments
|
|
8238
8233
|
* @request GET:/spaces/{spaceId}/comments
|
|
@@ -8484,7 +8479,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8484
8479
|
/**
|
|
8485
8480
|
* No description
|
|
8486
8481
|
*
|
|
8487
|
-
* @tags spaces, links
|
|
8482
|
+
* @tags spaces, links, critical
|
|
8488
8483
|
* @name ListSpaceLinks
|
|
8489
8484
|
* @summary Get all links in a space including their status and location where they appear.
|
|
8490
8485
|
* @request GET:/spaces/{spaceId}/links
|
|
@@ -9371,7 +9366,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9371
9366
|
/**
|
|
9372
9367
|
* No description
|
|
9373
9368
|
*
|
|
9374
|
-
* @tags organizations
|
|
9369
|
+
* @tags organizations, critical
|
|
9375
9370
|
* @name ListOrganizationsForAuthenticatedUser
|
|
9376
9371
|
* @summary Get the list of organizations for the currently authenticated user
|
|
9377
9372
|
* @request GET:/orgs
|
|
@@ -9472,7 +9467,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9472
9467
|
/**
|
|
9473
9468
|
* No description
|
|
9474
9469
|
*
|
|
9475
|
-
* @tags organization-members
|
|
9470
|
+
* @tags organization-members, critical
|
|
9476
9471
|
* @name GetMemberInOrganizationById
|
|
9477
9472
|
* @summary Get an organization member by its ID
|
|
9478
9473
|
* @request GET:/orgs/{organizationId}/members/{userId}
|
|
@@ -11501,12 +11496,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
11501
11496
|
locale: CustomizationLocale | null;
|
|
11502
11497
|
};
|
|
11503
11498
|
/** The favicon to use. Set to null to reset the override. */
|
|
11504
|
-
favicon?:
|
|
11505
|
-
icon: CustomizationThemedURL;
|
|
11506
|
-
} | {
|
|
11507
|
-
/** Unicode codepoint or character of the emoji */
|
|
11508
|
-
emoji: Emoji;
|
|
11509
|
-
} | object | null;
|
|
11499
|
+
favicon?: CustomizationFavicon | null;
|
|
11510
11500
|
announcement?: CustomizationAnnouncement;
|
|
11511
11501
|
header?: {
|
|
11512
11502
|
/** The theme preset to use. Set to null to reset the override. */
|
|
@@ -12012,6 +12002,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12012
12002
|
* @name GetPublishedContentByUrl
|
|
12013
12003
|
* @summary Resolve a URL of a published content.
|
|
12014
12004
|
* @request GET:/urls/published
|
|
12005
|
+
* @deprecated
|
|
12015
12006
|
* @secure
|
|
12016
12007
|
*/
|
|
12017
12008
|
getPublishedContentByUrl: (query: {
|
|
@@ -12031,6 +12022,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
12031
12022
|
message: string;
|
|
12032
12023
|
};
|
|
12033
12024
|
}>>;
|
|
12025
|
+
/**
|
|
12026
|
+
* No description
|
|
12027
|
+
*
|
|
12028
|
+
* @tags urls
|
|
12029
|
+
* @name ResolvePublishedContentByUrl
|
|
12030
|
+
* @summary Resolve a URL of a published content.
|
|
12031
|
+
* @request POST:/urls/published
|
|
12032
|
+
* @secure
|
|
12033
|
+
*/
|
|
12034
|
+
resolvePublishedContentByUrl: (data: {
|
|
12035
|
+
/** URL to resolve */
|
|
12036
|
+
url: URL;
|
|
12037
|
+
/**
|
|
12038
|
+
* When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
|
|
12039
|
+
* @default false
|
|
12040
|
+
*/
|
|
12041
|
+
redirectOnError?: boolean;
|
|
12042
|
+
/** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
|
|
12043
|
+
visitor?: SiteVisitorPayload;
|
|
12044
|
+
}, params?: RequestParams) => Promise<HttpResponse<PublishedSiteContentLookup, {
|
|
12045
|
+
error: {
|
|
12046
|
+
/** @format int32 */
|
|
12047
|
+
code: 404;
|
|
12048
|
+
message: string;
|
|
12049
|
+
};
|
|
12050
|
+
}>>;
|
|
12034
12051
|
};
|
|
12035
12052
|
}
|
|
12036
12053
|
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -269,7 +269,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
269
269
|
|
|
270
270
|
// package.json
|
|
271
271
|
var name = "@gitbook/api";
|
|
272
|
-
var version = "0.
|
|
272
|
+
var version = "0.115.0";
|
|
273
273
|
|
|
274
274
|
// src/client.ts
|
|
275
275
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -3479,6 +3479,15 @@ var Api = class extends HttpClient {
|
|
|
3479
3479
|
secure: true,
|
|
3480
3480
|
format: "json",
|
|
3481
3481
|
...params
|
|
3482
|
+
}),
|
|
3483
|
+
resolvePublishedContentByUrl: (data, params = {}) => this.request({
|
|
3484
|
+
path: `/urls/published`,
|
|
3485
|
+
method: "POST",
|
|
3486
|
+
body: data,
|
|
3487
|
+
secure: true,
|
|
3488
|
+
type: "application/json" /* Json */,
|
|
3489
|
+
format: "json",
|
|
3490
|
+
...params
|
|
3482
3491
|
})
|
|
3483
3492
|
};
|
|
3484
3493
|
};
|
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.115.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -3382,6 +3382,15 @@ var Api = class extends HttpClient {
|
|
|
3382
3382
|
secure: true,
|
|
3383
3383
|
format: "json",
|
|
3384
3384
|
...params
|
|
3385
|
+
}),
|
|
3386
|
+
resolvePublishedContentByUrl: (data, params = {}) => this.request({
|
|
3387
|
+
path: `/urls/published`,
|
|
3388
|
+
method: "POST",
|
|
3389
|
+
body: data,
|
|
3390
|
+
secure: true,
|
|
3391
|
+
type: "application/json" /* Json */,
|
|
3392
|
+
format: "json",
|
|
3393
|
+
...params
|
|
3385
3394
|
})
|
|
3386
3395
|
};
|
|
3387
3396
|
};
|