@gitbook/api 0.53.0 → 0.54.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 +35 -3
- package/dist/index.cjs +12 -2
- package/dist/index.js +12 -2
- package/package.json +1 -1
- package/spec/openapi.json +122 -7
- package/spec/openapi.yaml +68 -6
package/dist/client.d.ts
CHANGED
|
@@ -3488,6 +3488,8 @@ export declare type BillingUpgrade = {
|
|
|
3488
3488
|
result: 'upgraded';
|
|
3489
3489
|
} | {
|
|
3490
3490
|
result: 'downgraded';
|
|
3491
|
+
} | {
|
|
3492
|
+
result: 'interval_changed';
|
|
3491
3493
|
};
|
|
3492
3494
|
export interface CreateSpace {
|
|
3493
3495
|
/** @maxLength 50 */
|
|
@@ -3792,7 +3794,7 @@ export declare enum SiteType {
|
|
|
3792
3794
|
/**
|
|
3793
3795
|
* Title of the site
|
|
3794
3796
|
* @minLength 2
|
|
3795
|
-
* @maxLength
|
|
3797
|
+
* @maxLength 128
|
|
3796
3798
|
*/
|
|
3797
3799
|
export declare type SiteTitle = string;
|
|
3798
3800
|
/**
|
|
@@ -5430,7 +5432,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5430
5432
|
* @tags spaces
|
|
5431
5433
|
* @name ListSpacePageBacklinks
|
|
5432
5434
|
* @summary Get backlink locations for a page existing in a space.
|
|
5433
|
-
* @request GET:/spaces/{spaceId}/content/
|
|
5435
|
+
* @request GET:/spaces/{spaceId}/content/pages/{pageId}/backlinks
|
|
5434
5436
|
* @secure
|
|
5435
5437
|
*/
|
|
5436
5438
|
listSpacePageBacklinks: (spaceId: string, pageId: string, query?: {
|
|
@@ -7453,6 +7455,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7453
7455
|
* @max 1000
|
|
7454
7456
|
*/
|
|
7455
7457
|
limit?: number;
|
|
7458
|
+
/**
|
|
7459
|
+
* An order for the items in the list
|
|
7460
|
+
* @default "desc"
|
|
7461
|
+
*/
|
|
7462
|
+
order?: 'asc' | 'desc';
|
|
7456
7463
|
/** The Role to filter the member list by */
|
|
7457
7464
|
role?: MemberRole | 'guest';
|
|
7458
7465
|
/** A query to filter the member list (displayName and email) */
|
|
@@ -8747,7 +8754,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8747
8754
|
*/
|
|
8748
8755
|
visibility?: SiteVisibility;
|
|
8749
8756
|
/** ID of spaces to be added to the site */
|
|
8750
|
-
spaces?: string[];
|
|
8757
|
+
spaces?: string[] | 'sample' | 'empty';
|
|
8751
8758
|
}, params?: RequestParams) => Promise<HttpResponse<Site, Error>>;
|
|
8752
8759
|
/**
|
|
8753
8760
|
* No description
|
|
@@ -8890,6 +8897,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8890
8897
|
updateSitePlan: (organizationId: string, siteId: string, data: {
|
|
8891
8898
|
/** The type of the site */
|
|
8892
8899
|
plan: SiteType;
|
|
8900
|
+
/** Desired interval for new subscriptions. Defaults to the existing billing interval. */
|
|
8901
|
+
interval?: BillingInterval;
|
|
8893
8902
|
}, query?: {
|
|
8894
8903
|
/** The app screen URL to bring the user back to after checkout. */
|
|
8895
8904
|
checkoutReturnURL?: string;
|
|
@@ -9162,6 +9171,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9162
9171
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
9163
9172
|
items: SiteSpace[];
|
|
9164
9173
|
}, Error>>;
|
|
9174
|
+
/**
|
|
9175
|
+
* No description
|
|
9176
|
+
*
|
|
9177
|
+
* @name SearchSiteContent
|
|
9178
|
+
* @summary Search content in a site
|
|
9179
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/search
|
|
9180
|
+
* @secure
|
|
9181
|
+
*/
|
|
9182
|
+
searchSiteContent: (organizationId: string, siteId: string, data: {
|
|
9183
|
+
query: string;
|
|
9184
|
+
siteSpaceIds?: string[];
|
|
9185
|
+
}, query?: {
|
|
9186
|
+
/** Identifier of the page results to fetch. */
|
|
9187
|
+
page?: string;
|
|
9188
|
+
/**
|
|
9189
|
+
* The number of results per page
|
|
9190
|
+
* @min 0
|
|
9191
|
+
* @max 1000
|
|
9192
|
+
*/
|
|
9193
|
+
limit?: number;
|
|
9194
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
9195
|
+
items: SearchSpaceResult[];
|
|
9196
|
+
}, Error>>;
|
|
9165
9197
|
/**
|
|
9166
9198
|
* No description
|
|
9167
9199
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -238,7 +238,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
238
238
|
|
|
239
239
|
// package.json
|
|
240
240
|
var name = "@gitbook/api";
|
|
241
|
-
var version = "0.
|
|
241
|
+
var version = "0.54.0";
|
|
242
242
|
|
|
243
243
|
// src/client.ts
|
|
244
244
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1238,7 +1238,7 @@ var Api = class extends HttpClient {
|
|
|
1238
1238
|
...params
|
|
1239
1239
|
}),
|
|
1240
1240
|
listSpacePageBacklinks: (spaceId, pageId, query, params = {}) => this.request({
|
|
1241
|
-
path: `/spaces/${spaceId}/content/
|
|
1241
|
+
path: `/spaces/${spaceId}/content/pages/${pageId}/backlinks`,
|
|
1242
1242
|
method: "GET",
|
|
1243
1243
|
query,
|
|
1244
1244
|
secure: true,
|
|
@@ -3019,6 +3019,16 @@ var Api = class extends HttpClient {
|
|
|
3019
3019
|
format: "json",
|
|
3020
3020
|
...params
|
|
3021
3021
|
}),
|
|
3022
|
+
searchSiteContent: (organizationId, siteId, data, query, params = {}) => this.request({
|
|
3023
|
+
path: `/orgs/${organizationId}/sites/${siteId}/search`,
|
|
3024
|
+
method: "POST",
|
|
3025
|
+
query,
|
|
3026
|
+
body: data,
|
|
3027
|
+
secure: true,
|
|
3028
|
+
type: "application/json" /* Json */,
|
|
3029
|
+
format: "json",
|
|
3030
|
+
...params
|
|
3031
|
+
}),
|
|
3022
3032
|
updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3023
3033
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
|
|
3024
3034
|
method: "PATCH",
|
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.54.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1172,7 +1172,7 @@ var Api = class extends HttpClient {
|
|
|
1172
1172
|
...params
|
|
1173
1173
|
}),
|
|
1174
1174
|
listSpacePageBacklinks: (spaceId, pageId, query, params = {}) => this.request({
|
|
1175
|
-
path: `/spaces/${spaceId}/content/
|
|
1175
|
+
path: `/spaces/${spaceId}/content/pages/${pageId}/backlinks`,
|
|
1176
1176
|
method: "GET",
|
|
1177
1177
|
query,
|
|
1178
1178
|
secure: true,
|
|
@@ -2953,6 +2953,16 @@ var Api = class extends HttpClient {
|
|
|
2953
2953
|
format: "json",
|
|
2954
2954
|
...params
|
|
2955
2955
|
}),
|
|
2956
|
+
searchSiteContent: (organizationId, siteId, data, query, params = {}) => this.request({
|
|
2957
|
+
path: `/orgs/${organizationId}/sites/${siteId}/search`,
|
|
2958
|
+
method: "POST",
|
|
2959
|
+
query,
|
|
2960
|
+
body: data,
|
|
2961
|
+
secure: true,
|
|
2962
|
+
type: "application/json" /* Json */,
|
|
2963
|
+
format: "json",
|
|
2964
|
+
...params
|
|
2965
|
+
}),
|
|
2956
2966
|
updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2957
2967
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
|
|
2958
2968
|
method: "PATCH",
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -1662,7 +1662,7 @@
|
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
1664
|
},
|
|
1665
|
-
"/spaces/{spaceId}/content/
|
|
1665
|
+
"/spaces/{spaceId}/content/pages/{pageId}/backlinks": {
|
|
1666
1666
|
"get": {
|
|
1667
1667
|
"operationId": "listSpacePageBacklinks",
|
|
1668
1668
|
"summary": "Get backlink locations for a page existing in a space.",
|
|
@@ -7605,6 +7605,9 @@
|
|
|
7605
7605
|
{
|
|
7606
7606
|
"$ref": "#/components/parameters/listLimit"
|
|
7607
7607
|
},
|
|
7608
|
+
{
|
|
7609
|
+
"$ref": "#/components/parameters/listOrder"
|
|
7610
|
+
},
|
|
7608
7611
|
{
|
|
7609
7612
|
"name": "role",
|
|
7610
7613
|
"description": "The Role to filter the member list by",
|
|
@@ -11879,11 +11882,23 @@
|
|
|
11879
11882
|
"$ref": "#/components/schemas/SiteVisibility"
|
|
11880
11883
|
},
|
|
11881
11884
|
"spaces": {
|
|
11882
|
-
"
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11885
|
+
"oneOf": [
|
|
11886
|
+
{
|
|
11887
|
+
"type": "array",
|
|
11888
|
+
"description": "ID of spaces to be added to the site",
|
|
11889
|
+
"items": {
|
|
11890
|
+
"type": "string"
|
|
11891
|
+
}
|
|
11892
|
+
},
|
|
11893
|
+
{
|
|
11894
|
+
"type": "string",
|
|
11895
|
+
"description": "Create a new space associated to the site",
|
|
11896
|
+
"enum": [
|
|
11897
|
+
"sample",
|
|
11898
|
+
"empty"
|
|
11899
|
+
]
|
|
11900
|
+
}
|
|
11901
|
+
]
|
|
11887
11902
|
}
|
|
11888
11903
|
}
|
|
11889
11904
|
}
|
|
@@ -12367,6 +12382,10 @@
|
|
|
12367
12382
|
"properties": {
|
|
12368
12383
|
"plan": {
|
|
12369
12384
|
"$ref": "#/components/schemas/SiteType"
|
|
12385
|
+
},
|
|
12386
|
+
"interval": {
|
|
12387
|
+
"description": "Desired interval for new subscriptions. Defaults to the existing billing interval.",
|
|
12388
|
+
"$ref": "#/components/schemas/BillingInterval"
|
|
12370
12389
|
}
|
|
12371
12390
|
},
|
|
12372
12391
|
"required": [
|
|
@@ -13212,6 +13231,88 @@
|
|
|
13212
13231
|
}
|
|
13213
13232
|
}
|
|
13214
13233
|
},
|
|
13234
|
+
"/orgs/{organizationId}/sites/{siteId}/search": {
|
|
13235
|
+
"post": {
|
|
13236
|
+
"operationId": "searchSiteContent",
|
|
13237
|
+
"summary": "Search content in a site",
|
|
13238
|
+
"security": [
|
|
13239
|
+
{
|
|
13240
|
+
"user": []
|
|
13241
|
+
}
|
|
13242
|
+
],
|
|
13243
|
+
"parameters": [
|
|
13244
|
+
{
|
|
13245
|
+
"$ref": "#/components/parameters/organizationId"
|
|
13246
|
+
},
|
|
13247
|
+
{
|
|
13248
|
+
"$ref": "#/components/parameters/siteId"
|
|
13249
|
+
},
|
|
13250
|
+
{
|
|
13251
|
+
"$ref": "#/components/parameters/listPage"
|
|
13252
|
+
},
|
|
13253
|
+
{
|
|
13254
|
+
"$ref": "#/components/parameters/listLimit"
|
|
13255
|
+
}
|
|
13256
|
+
],
|
|
13257
|
+
"requestBody": {
|
|
13258
|
+
"required": true,
|
|
13259
|
+
"content": {
|
|
13260
|
+
"application/json": {
|
|
13261
|
+
"schema": {
|
|
13262
|
+
"type": "object",
|
|
13263
|
+
"properties": {
|
|
13264
|
+
"query": {
|
|
13265
|
+
"type": "string"
|
|
13266
|
+
},
|
|
13267
|
+
"siteSpaceIds": {
|
|
13268
|
+
"type": "array",
|
|
13269
|
+
"items": {
|
|
13270
|
+
"type": "string"
|
|
13271
|
+
}
|
|
13272
|
+
}
|
|
13273
|
+
},
|
|
13274
|
+
"required": [
|
|
13275
|
+
"query"
|
|
13276
|
+
]
|
|
13277
|
+
}
|
|
13278
|
+
}
|
|
13279
|
+
}
|
|
13280
|
+
},
|
|
13281
|
+
"responses": {
|
|
13282
|
+
"200": {
|
|
13283
|
+
"description": "OK",
|
|
13284
|
+
"content": {
|
|
13285
|
+
"application/json": {
|
|
13286
|
+
"schema": {
|
|
13287
|
+
"allOf": [
|
|
13288
|
+
{
|
|
13289
|
+
"$ref": "#/components/schemas/List"
|
|
13290
|
+
},
|
|
13291
|
+
{
|
|
13292
|
+
"type": "object",
|
|
13293
|
+
"required": [
|
|
13294
|
+
"items"
|
|
13295
|
+
],
|
|
13296
|
+
"properties": {
|
|
13297
|
+
"items": {
|
|
13298
|
+
"type": "array",
|
|
13299
|
+
"items": {
|
|
13300
|
+
"$ref": "#/components/schemas/SearchSpaceResult"
|
|
13301
|
+
}
|
|
13302
|
+
}
|
|
13303
|
+
}
|
|
13304
|
+
}
|
|
13305
|
+
]
|
|
13306
|
+
}
|
|
13307
|
+
}
|
|
13308
|
+
}
|
|
13309
|
+
},
|
|
13310
|
+
"default": {
|
|
13311
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
13312
|
+
}
|
|
13313
|
+
}
|
|
13314
|
+
}
|
|
13315
|
+
},
|
|
13215
13316
|
"/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}": {
|
|
13216
13317
|
"patch": {
|
|
13217
13318
|
"operationId": "updateSiteSpaceById",
|
|
@@ -26084,6 +26185,20 @@
|
|
|
26084
26185
|
"required": [
|
|
26085
26186
|
"result"
|
|
26086
26187
|
]
|
|
26188
|
+
},
|
|
26189
|
+
{
|
|
26190
|
+
"type": "object",
|
|
26191
|
+
"properties": {
|
|
26192
|
+
"result": {
|
|
26193
|
+
"type": "string",
|
|
26194
|
+
"enum": [
|
|
26195
|
+
"interval_changed"
|
|
26196
|
+
]
|
|
26197
|
+
}
|
|
26198
|
+
},
|
|
26199
|
+
"required": [
|
|
26200
|
+
"result"
|
|
26201
|
+
]
|
|
26087
26202
|
}
|
|
26088
26203
|
]
|
|
26089
26204
|
},
|
|
@@ -26954,7 +27069,7 @@
|
|
|
26954
27069
|
"type": "string",
|
|
26955
27070
|
"description": "Title of the site",
|
|
26956
27071
|
"minLength": 2,
|
|
26957
|
-
"maxLength":
|
|
27072
|
+
"maxLength": 128
|
|
26958
27073
|
},
|
|
26959
27074
|
"SiteHostname": {
|
|
26960
27075
|
"type": "string",
|
package/spec/openapi.yaml
CHANGED
|
@@ -948,7 +948,7 @@ paths:
|
|
|
948
948
|
$ref: "#/components/schemas/RevisionPage"
|
|
949
949
|
default:
|
|
950
950
|
$ref: "#/components/responses/UnexpectedError"
|
|
951
|
-
"/spaces/{spaceId}/content/
|
|
951
|
+
"/spaces/{spaceId}/content/pages/{pageId}/backlinks":
|
|
952
952
|
get:
|
|
953
953
|
operationId: listSpacePageBacklinks
|
|
954
954
|
summary: Get backlink locations for a page existing in a space.
|
|
@@ -4215,6 +4215,7 @@ paths:
|
|
|
4215
4215
|
- $ref: "#/components/parameters/organizationId"
|
|
4216
4216
|
- $ref: "#/components/parameters/listPage"
|
|
4217
4217
|
- $ref: "#/components/parameters/listLimit"
|
|
4218
|
+
- $ref: "#/components/parameters/listOrder"
|
|
4218
4219
|
- name: role
|
|
4219
4220
|
description: The Role to filter the member list by
|
|
4220
4221
|
in: query
|
|
@@ -6621,10 +6622,16 @@ paths:
|
|
|
6621
6622
|
visibility:
|
|
6622
6623
|
$ref: "#/components/schemas/SiteVisibility"
|
|
6623
6624
|
spaces:
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6625
|
+
oneOf:
|
|
6626
|
+
- type: array
|
|
6627
|
+
description: ID of spaces to be added to the site
|
|
6628
|
+
items:
|
|
6629
|
+
type: string
|
|
6630
|
+
- type: string
|
|
6631
|
+
description: Create a new space associated to the site
|
|
6632
|
+
enum:
|
|
6633
|
+
- sample
|
|
6634
|
+
- empty
|
|
6628
6635
|
responses:
|
|
6629
6636
|
"201":
|
|
6630
6637
|
description: Site created
|
|
@@ -6892,6 +6899,9 @@ paths:
|
|
|
6892
6899
|
properties:
|
|
6893
6900
|
plan:
|
|
6894
6901
|
$ref: "#/components/schemas/SiteType"
|
|
6902
|
+
interval:
|
|
6903
|
+
description: Desired interval for new subscriptions. Defaults to the existing billing interval.
|
|
6904
|
+
$ref: "#/components/schemas/BillingInterval"
|
|
6895
6905
|
required:
|
|
6896
6906
|
- plan
|
|
6897
6907
|
responses:
|
|
@@ -7368,6 +7378,50 @@ paths:
|
|
|
7368
7378
|
$ref: "#/components/schemas/SiteSpace"
|
|
7369
7379
|
default:
|
|
7370
7380
|
$ref: "#/components/responses/UnexpectedError"
|
|
7381
|
+
"/orgs/{organizationId}/sites/{siteId}/search":
|
|
7382
|
+
post:
|
|
7383
|
+
operationId: searchSiteContent
|
|
7384
|
+
summary: Search content in a site
|
|
7385
|
+
security:
|
|
7386
|
+
- user: []
|
|
7387
|
+
parameters:
|
|
7388
|
+
- $ref: "#/components/parameters/organizationId"
|
|
7389
|
+
- $ref: "#/components/parameters/siteId"
|
|
7390
|
+
- $ref: "#/components/parameters/listPage"
|
|
7391
|
+
- $ref: "#/components/parameters/listLimit"
|
|
7392
|
+
requestBody:
|
|
7393
|
+
required: true
|
|
7394
|
+
content:
|
|
7395
|
+
application/json:
|
|
7396
|
+
schema:
|
|
7397
|
+
type: object
|
|
7398
|
+
properties:
|
|
7399
|
+
query:
|
|
7400
|
+
type: string
|
|
7401
|
+
siteSpaceIds:
|
|
7402
|
+
type: array
|
|
7403
|
+
items:
|
|
7404
|
+
type: string
|
|
7405
|
+
required:
|
|
7406
|
+
- query
|
|
7407
|
+
responses:
|
|
7408
|
+
"200":
|
|
7409
|
+
description: OK
|
|
7410
|
+
content:
|
|
7411
|
+
application/json:
|
|
7412
|
+
schema:
|
|
7413
|
+
allOf:
|
|
7414
|
+
- $ref: "#/components/schemas/List"
|
|
7415
|
+
- type: object
|
|
7416
|
+
required:
|
|
7417
|
+
- items
|
|
7418
|
+
properties:
|
|
7419
|
+
items:
|
|
7420
|
+
type: array
|
|
7421
|
+
items:
|
|
7422
|
+
$ref: "#/components/schemas/SearchSpaceResult"
|
|
7423
|
+
default:
|
|
7424
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
7371
7425
|
"/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}":
|
|
7372
7426
|
patch:
|
|
7373
7427
|
operationId: updateSiteSpaceById
|
|
@@ -15812,6 +15866,14 @@ components:
|
|
|
15812
15866
|
- downgraded
|
|
15813
15867
|
required:
|
|
15814
15868
|
- result
|
|
15869
|
+
- type: object
|
|
15870
|
+
properties:
|
|
15871
|
+
result:
|
|
15872
|
+
type: string
|
|
15873
|
+
enum:
|
|
15874
|
+
- interval_changed
|
|
15875
|
+
required:
|
|
15876
|
+
- result
|
|
15815
15877
|
CreateSpace:
|
|
15816
15878
|
type: object
|
|
15817
15879
|
properties:
|
|
@@ -16387,7 +16449,7 @@ components:
|
|
|
16387
16449
|
type: string
|
|
16388
16450
|
description: Title of the site
|
|
16389
16451
|
minLength: 2
|
|
16390
|
-
maxLength:
|
|
16452
|
+
maxLength: 128
|
|
16391
16453
|
SiteHostname:
|
|
16392
16454
|
type: string
|
|
16393
16455
|
description: Custom hostname for the site, for e.g. docs.mycompany.com
|