@gitbook/api 0.52.0 → 0.53.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 +22 -1
- package/dist/index.cjs +10 -2
- package/dist/index.js +10 -2
- package/package.json +1 -1
- package/spec/openapi.json +67 -1
- package/spec/openapi.yaml +40 -1
package/dist/client.d.ts
CHANGED
|
@@ -1367,7 +1367,7 @@ export interface ImportContentResult {
|
|
|
1367
1367
|
/**
|
|
1368
1368
|
* Name of the organization
|
|
1369
1369
|
* @minLength 2
|
|
1370
|
-
* @maxLength
|
|
1370
|
+
* @maxLength 255
|
|
1371
1371
|
*/
|
|
1372
1372
|
export declare type OrganizationTitle = string;
|
|
1373
1373
|
export declare type OrganizationEmailDomains = string[];
|
|
@@ -3819,6 +3819,11 @@ export declare enum SiteVisibility {
|
|
|
3819
3819
|
ShareLink = "share-link",
|
|
3820
3820
|
VisitorAuth = "visitor-auth"
|
|
3821
3821
|
}
|
|
3822
|
+
/** The configuration for serving ads in the site */
|
|
3823
|
+
export interface SiteAdsConfig {
|
|
3824
|
+
/** The ad network zone ID */
|
|
3825
|
+
zone: string;
|
|
3826
|
+
}
|
|
3822
3827
|
export interface Site {
|
|
3823
3828
|
object: 'site';
|
|
3824
3829
|
/** Unique identifier of the site */
|
|
@@ -3844,6 +3849,8 @@ export interface Site {
|
|
|
3844
3849
|
siteSpaces: number;
|
|
3845
3850
|
/** @format date-time */
|
|
3846
3851
|
createdAt: string;
|
|
3852
|
+
/** The configuration for serving ads in the site */
|
|
3853
|
+
ads?: SiteAdsConfig;
|
|
3847
3854
|
/** URLs associated with the object */
|
|
3848
3855
|
urls: {
|
|
3849
3856
|
/**
|
|
@@ -7590,6 +7597,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7590
7597
|
createOrganizationTeam: (organizationId: string, data: {
|
|
7591
7598
|
/** Title of the team */
|
|
7592
7599
|
title: OrganizationTeamTitle;
|
|
7600
|
+
/** A list of organization member identifiers */
|
|
7593
7601
|
members?: string[];
|
|
7594
7602
|
}, params?: RequestParams) => Promise<HttpResponse<OrganizationTeam, Error>>;
|
|
7595
7603
|
/**
|
|
@@ -8882,6 +8890,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8882
8890
|
updateSitePlan: (organizationId: string, siteId: string, data: {
|
|
8883
8891
|
/** The type of the site */
|
|
8884
8892
|
plan: SiteType;
|
|
8893
|
+
}, query?: {
|
|
8894
|
+
/** The app screen URL to bring the user back to after checkout. */
|
|
8895
|
+
checkoutReturnURL?: string;
|
|
8885
8896
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
8886
8897
|
type: 'legacy-checkout';
|
|
8887
8898
|
/** Stripe payment session ID */
|
|
@@ -9229,6 +9240,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9229
9240
|
message: string;
|
|
9230
9241
|
};
|
|
9231
9242
|
}>>;
|
|
9243
|
+
/**
|
|
9244
|
+
* No description
|
|
9245
|
+
*
|
|
9246
|
+
* @tags analytics, sites
|
|
9247
|
+
* @name GetContentAnalyticsForSiteSpaceById
|
|
9248
|
+
* @summary Get page traffic and ratings for a given site space.
|
|
9249
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/insights/content
|
|
9250
|
+
* @secure
|
|
9251
|
+
*/
|
|
9252
|
+
getContentAnalyticsForSiteSpaceById: (organizationId: string, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<AnalyticsContentPages, Error>>;
|
|
9232
9253
|
/**
|
|
9233
9254
|
* No description
|
|
9234
9255
|
*
|
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.53.0";
|
|
242
242
|
|
|
243
243
|
// src/client.ts
|
|
244
244
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -2907,9 +2907,10 @@ var Api = class extends HttpClient {
|
|
|
2907
2907
|
secure: true,
|
|
2908
2908
|
...params
|
|
2909
2909
|
}),
|
|
2910
|
-
updateSitePlan: (organizationId, siteId, data, params = {}) => this.request({
|
|
2910
|
+
updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
|
|
2911
2911
|
path: `/orgs/${organizationId}/sites/${siteId}/plan`,
|
|
2912
2912
|
method: "POST",
|
|
2913
|
+
query,
|
|
2913
2914
|
body: data,
|
|
2914
2915
|
secure: true,
|
|
2915
2916
|
type: "application/json" /* Json */,
|
|
@@ -3057,6 +3058,13 @@ var Api = class extends HttpClient {
|
|
|
3057
3058
|
format: "json",
|
|
3058
3059
|
...params
|
|
3059
3060
|
}),
|
|
3061
|
+
getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
3062
|
+
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
|
|
3063
|
+
method: "GET",
|
|
3064
|
+
secure: true,
|
|
3065
|
+
format: "json",
|
|
3066
|
+
...params
|
|
3067
|
+
}),
|
|
3060
3068
|
moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
3061
3069
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
|
|
3062
3070
|
method: "POST",
|
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.53.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -2841,9 +2841,10 @@ var Api = class extends HttpClient {
|
|
|
2841
2841
|
secure: true,
|
|
2842
2842
|
...params
|
|
2843
2843
|
}),
|
|
2844
|
-
updateSitePlan: (organizationId, siteId, data, params = {}) => this.request({
|
|
2844
|
+
updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
|
|
2845
2845
|
path: `/orgs/${organizationId}/sites/${siteId}/plan`,
|
|
2846
2846
|
method: "POST",
|
|
2847
|
+
query,
|
|
2847
2848
|
body: data,
|
|
2848
2849
|
secure: true,
|
|
2849
2850
|
type: "application/json" /* Json */,
|
|
@@ -2991,6 +2992,13 @@ var Api = class extends HttpClient {
|
|
|
2991
2992
|
format: "json",
|
|
2992
2993
|
...params
|
|
2993
2994
|
}),
|
|
2995
|
+
getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
|
|
2996
|
+
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
|
|
2997
|
+
method: "GET",
|
|
2998
|
+
secure: true,
|
|
2999
|
+
format: "json",
|
|
3000
|
+
...params
|
|
3001
|
+
}),
|
|
2994
3002
|
moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
|
|
2995
3003
|
path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
|
|
2996
3004
|
method: "POST",
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -8110,6 +8110,7 @@
|
|
|
8110
8110
|
"$ref": "#/components/schemas/OrganizationTeamTitle"
|
|
8111
8111
|
},
|
|
8112
8112
|
"members": {
|
|
8113
|
+
"description": "A list of organization member identifiers",
|
|
8113
8114
|
"type": "array",
|
|
8114
8115
|
"items": {
|
|
8115
8116
|
"type": "string"
|
|
@@ -12347,6 +12348,14 @@
|
|
|
12347
12348
|
},
|
|
12348
12349
|
{
|
|
12349
12350
|
"$ref": "#/components/parameters/siteId"
|
|
12351
|
+
},
|
|
12352
|
+
{
|
|
12353
|
+
"in": "query",
|
|
12354
|
+
"name": "checkoutReturnURL",
|
|
12355
|
+
"description": "The app screen URL to bring the user back to after checkout.",
|
|
12356
|
+
"schema": {
|
|
12357
|
+
"type": "string"
|
|
12358
|
+
}
|
|
12350
12359
|
}
|
|
12351
12360
|
],
|
|
12352
12361
|
"requestBody": {
|
|
@@ -13430,6 +13439,47 @@
|
|
|
13430
13439
|
}
|
|
13431
13440
|
}
|
|
13432
13441
|
},
|
|
13442
|
+
"/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/insights/content": {
|
|
13443
|
+
"get": {
|
|
13444
|
+
"operationId": "getContentAnalyticsForSiteSpaceById",
|
|
13445
|
+
"summary": "Get page traffic and ratings for a given site space.",
|
|
13446
|
+
"tags": [
|
|
13447
|
+
"analytics",
|
|
13448
|
+
"sites"
|
|
13449
|
+
],
|
|
13450
|
+
"security": [
|
|
13451
|
+
{
|
|
13452
|
+
"user": []
|
|
13453
|
+
}
|
|
13454
|
+
],
|
|
13455
|
+
"parameters": [
|
|
13456
|
+
{
|
|
13457
|
+
"$ref": "#/components/parameters/organizationId"
|
|
13458
|
+
},
|
|
13459
|
+
{
|
|
13460
|
+
"$ref": "#/components/parameters/siteId"
|
|
13461
|
+
},
|
|
13462
|
+
{
|
|
13463
|
+
"$ref": "#/components/parameters/siteSpaceId"
|
|
13464
|
+
}
|
|
13465
|
+
],
|
|
13466
|
+
"responses": {
|
|
13467
|
+
"200": {
|
|
13468
|
+
"description": "Content analytics per page.",
|
|
13469
|
+
"content": {
|
|
13470
|
+
"application/json": {
|
|
13471
|
+
"schema": {
|
|
13472
|
+
"$ref": "#/components/schemas/AnalyticsContentPages"
|
|
13473
|
+
}
|
|
13474
|
+
}
|
|
13475
|
+
}
|
|
13476
|
+
},
|
|
13477
|
+
"default": {
|
|
13478
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
13479
|
+
}
|
|
13480
|
+
}
|
|
13481
|
+
}
|
|
13482
|
+
},
|
|
13433
13483
|
"/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move": {
|
|
13434
13484
|
"post": {
|
|
13435
13485
|
"operationId": "moveSiteSpace",
|
|
@@ -19550,7 +19600,7 @@
|
|
|
19550
19600
|
"type": "string",
|
|
19551
19601
|
"description": "Name of the organization",
|
|
19552
19602
|
"minLength": 2,
|
|
19553
|
-
"maxLength":
|
|
19603
|
+
"maxLength": 255
|
|
19554
19604
|
},
|
|
19555
19605
|
"OrganizationEmailDomains": {
|
|
19556
19606
|
"type": "array",
|
|
@@ -26927,6 +26977,19 @@
|
|
|
26927
26977
|
"visitor-auth"
|
|
26928
26978
|
]
|
|
26929
26979
|
},
|
|
26980
|
+
"SiteAdsConfig": {
|
|
26981
|
+
"type": "object",
|
|
26982
|
+
"description": "The configuration for serving ads in the site",
|
|
26983
|
+
"properties": {
|
|
26984
|
+
"zone": {
|
|
26985
|
+
"type": "string",
|
|
26986
|
+
"description": "The ad network zone ID"
|
|
26987
|
+
}
|
|
26988
|
+
},
|
|
26989
|
+
"required": [
|
|
26990
|
+
"zone"
|
|
26991
|
+
]
|
|
26992
|
+
},
|
|
26930
26993
|
"Site": {
|
|
26931
26994
|
"type": "object",
|
|
26932
26995
|
"properties": {
|
|
@@ -26966,6 +27029,9 @@
|
|
|
26966
27029
|
"type": "string",
|
|
26967
27030
|
"format": "date-time"
|
|
26968
27031
|
},
|
|
27032
|
+
"ads": {
|
|
27033
|
+
"$ref": "#/components/schemas/SiteAdsConfig"
|
|
27034
|
+
},
|
|
26969
27035
|
"urls": {
|
|
26970
27036
|
"type": "object",
|
|
26971
27037
|
"description": "URLs associated with the object",
|
package/spec/openapi.yaml
CHANGED
|
@@ -4501,6 +4501,7 @@ paths:
|
|
|
4501
4501
|
title:
|
|
4502
4502
|
$ref: "#/components/schemas/OrganizationTeamTitle"
|
|
4503
4503
|
members:
|
|
4504
|
+
description: A list of organization member identifiers
|
|
4504
4505
|
type: array
|
|
4505
4506
|
items:
|
|
4506
4507
|
type: string
|
|
@@ -6877,6 +6878,11 @@ paths:
|
|
|
6877
6878
|
parameters:
|
|
6878
6879
|
- $ref: "#/components/parameters/organizationId"
|
|
6879
6880
|
- $ref: "#/components/parameters/siteId"
|
|
6881
|
+
- in: query
|
|
6882
|
+
name: checkoutReturnURL
|
|
6883
|
+
description: The app screen URL to bring the user back to after checkout.
|
|
6884
|
+
schema:
|
|
6885
|
+
type: string
|
|
6880
6886
|
requestBody:
|
|
6881
6887
|
required: true
|
|
6882
6888
|
content:
|
|
@@ -7484,6 +7490,28 @@ paths:
|
|
|
7484
7490
|
$ref: "#/components/responses/BadRequestError"
|
|
7485
7491
|
default:
|
|
7486
7492
|
$ref: "#/components/responses/UnexpectedError"
|
|
7493
|
+
"/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/insights/content":
|
|
7494
|
+
get:
|
|
7495
|
+
operationId: getContentAnalyticsForSiteSpaceById
|
|
7496
|
+
summary: Get page traffic and ratings for a given site space.
|
|
7497
|
+
tags:
|
|
7498
|
+
- analytics
|
|
7499
|
+
- sites
|
|
7500
|
+
security:
|
|
7501
|
+
- user: []
|
|
7502
|
+
parameters:
|
|
7503
|
+
- $ref: "#/components/parameters/organizationId"
|
|
7504
|
+
- $ref: "#/components/parameters/siteId"
|
|
7505
|
+
- $ref: "#/components/parameters/siteSpaceId"
|
|
7506
|
+
responses:
|
|
7507
|
+
"200":
|
|
7508
|
+
description: Content analytics per page.
|
|
7509
|
+
content:
|
|
7510
|
+
application/json:
|
|
7511
|
+
schema:
|
|
7512
|
+
$ref: "#/components/schemas/AnalyticsContentPages"
|
|
7513
|
+
default:
|
|
7514
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
7487
7515
|
"/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move":
|
|
7488
7516
|
post:
|
|
7489
7517
|
operationId: moveSiteSpace
|
|
@@ -11500,7 +11528,7 @@ components:
|
|
|
11500
11528
|
type: string
|
|
11501
11529
|
description: Name of the organization
|
|
11502
11530
|
minLength: 2
|
|
11503
|
-
maxLength:
|
|
11531
|
+
maxLength: 255
|
|
11504
11532
|
OrganizationEmailDomains:
|
|
11505
11533
|
type: array
|
|
11506
11534
|
items:
|
|
@@ -16382,6 +16410,15 @@ components:
|
|
|
16382
16410
|
- unlisted
|
|
16383
16411
|
- share-link
|
|
16384
16412
|
- visitor-auth
|
|
16413
|
+
SiteAdsConfig:
|
|
16414
|
+
type: object
|
|
16415
|
+
description: The configuration for serving ads in the site
|
|
16416
|
+
properties:
|
|
16417
|
+
zone:
|
|
16418
|
+
type: string
|
|
16419
|
+
description: The ad network zone ID
|
|
16420
|
+
required:
|
|
16421
|
+
- zone
|
|
16385
16422
|
Site:
|
|
16386
16423
|
type: object
|
|
16387
16424
|
properties:
|
|
@@ -16410,6 +16447,8 @@ components:
|
|
|
16410
16447
|
createdAt:
|
|
16411
16448
|
type: string
|
|
16412
16449
|
format: date-time
|
|
16450
|
+
ads:
|
|
16451
|
+
$ref: "#/components/schemas/SiteAdsConfig"
|
|
16413
16452
|
urls:
|
|
16414
16453
|
type: object
|
|
16415
16454
|
description: URLs associated with the object
|