@gitbook/api 0.83.0 → 0.84.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 +143 -7
- package/dist/index.cjs +18 -1
- package/dist/index.js +18 -1
- package/package.json +1 -1
- package/spec/openapi.json +488 -18
- package/spec/openapi.yaml +312 -14
package/dist/client.d.ts
CHANGED
|
@@ -1250,11 +1250,16 @@ export interface SpaceTrackPageView {
|
|
|
1250
1250
|
/** The URL of referrer that linked to the page. */
|
|
1251
1251
|
referrer: string;
|
|
1252
1252
|
}
|
|
1253
|
-
export
|
|
1253
|
+
export type InviteUsersAndTeams = ({
|
|
1254
|
+
/** @minItems 1 */
|
|
1254
1255
|
teams: string[];
|
|
1255
|
-
|
|
1256
|
+
} | {
|
|
1257
|
+
/** @minItems 1 */
|
|
1258
|
+
users: string[];
|
|
1259
|
+
}) & {
|
|
1260
|
+
/** Role to set. */
|
|
1256
1261
|
role: MemberRoleOrGuest;
|
|
1257
|
-
}
|
|
1262
|
+
};
|
|
1258
1263
|
export type RevisionPageGroup = RevisionPageBase & {
|
|
1259
1264
|
/** @deprecated */
|
|
1260
1265
|
kind: 'group';
|
|
@@ -2927,7 +2932,7 @@ export type SiteViewEvent = SiteEvent & {
|
|
|
2927
2932
|
* Unique identifier of the visited space in the site.
|
|
2928
2933
|
* @deprecated
|
|
2929
2934
|
*/
|
|
2930
|
-
spaceId
|
|
2935
|
+
spaceId?: string;
|
|
2931
2936
|
/** The site-space that was viewed */
|
|
2932
2937
|
siteSpaceId?: string;
|
|
2933
2938
|
/** Unique identifier of the visited page. */
|
|
@@ -3538,6 +3543,7 @@ export declare enum SiteType {
|
|
|
3538
3543
|
export type SiteTitle = string;
|
|
3539
3544
|
/**
|
|
3540
3545
|
* Custom hostname for the site, for e.g. docs.mycompany.com
|
|
3546
|
+
* @maxLength 512
|
|
3541
3547
|
* @pattern ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
|
|
3542
3548
|
*/
|
|
3543
3549
|
export type SiteHostname = string;
|
|
@@ -3547,6 +3553,12 @@ export type SiteHostname = string;
|
|
|
3547
3553
|
* @maxLength 100
|
|
3548
3554
|
*/
|
|
3549
3555
|
export type SiteBasename = string;
|
|
3556
|
+
/**
|
|
3557
|
+
* Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.
|
|
3558
|
+
* @maxLength 512
|
|
3559
|
+
* @pattern ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
|
|
3560
|
+
*/
|
|
3561
|
+
export type SiteProxy = string;
|
|
3550
3562
|
/**
|
|
3551
3563
|
* The visibility setting of the site determines the audience of the site.
|
|
3552
3564
|
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
@@ -3598,6 +3610,8 @@ export interface Site {
|
|
|
3598
3610
|
hostname?: SiteHostname;
|
|
3599
3611
|
/** Basename for the site. For e.g. api */
|
|
3600
3612
|
basename?: SiteBasename;
|
|
3613
|
+
/** Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc. */
|
|
3614
|
+
proxy?: SiteProxy;
|
|
3601
3615
|
/**
|
|
3602
3616
|
* The visibility setting of the site determines the audience of the site.
|
|
3603
3617
|
* * `public`: Anyone can access the site, and the site is indexed by search engines.
|
|
@@ -4489,6 +4503,91 @@ export type SiteTrackPageView = {
|
|
|
4489
4503
|
/** The site-space that was viewed */
|
|
4490
4504
|
siteSpaceId: string;
|
|
4491
4505
|
});
|
|
4506
|
+
/** Analytics info on the GitBook's site session. */
|
|
4507
|
+
export interface SiteInsightsEventSession {
|
|
4508
|
+
/** GitBook's unique identifier of the visitor. */
|
|
4509
|
+
visitorId: string;
|
|
4510
|
+
/** GitBook's unique identifier of the visitor's session. */
|
|
4511
|
+
sessionId: string;
|
|
4512
|
+
/** The visitors cookies. */
|
|
4513
|
+
cookies: Record<string, string>;
|
|
4514
|
+
/**
|
|
4515
|
+
* IP address of the visitor.
|
|
4516
|
+
* If not defined, it'll default to the IP executing the request.
|
|
4517
|
+
*/
|
|
4518
|
+
ip?: string;
|
|
4519
|
+
/**
|
|
4520
|
+
* User-agent of the visitor.
|
|
4521
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
|
|
4522
|
+
*/
|
|
4523
|
+
userAgent: string;
|
|
4524
|
+
/**
|
|
4525
|
+
* Language of the visitor.
|
|
4526
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
|
|
4527
|
+
*/
|
|
4528
|
+
language: string | null;
|
|
4529
|
+
/** Referrer of the sesion */
|
|
4530
|
+
referrer: null | URL;
|
|
4531
|
+
}
|
|
4532
|
+
/** Location of the event. */
|
|
4533
|
+
export interface SiteInsightsEventLocation {
|
|
4534
|
+
/** URL of the location. */
|
|
4535
|
+
url: URL;
|
|
4536
|
+
/** ID of the concerned site section. */
|
|
4537
|
+
siteSection: string | null;
|
|
4538
|
+
/** ID of the concerned site space. */
|
|
4539
|
+
siteSpace: string | null;
|
|
4540
|
+
/** ID of the concerned site share key. */
|
|
4541
|
+
siteShareKey: string | null;
|
|
4542
|
+
/** ID of the concerned space. */
|
|
4543
|
+
space: string | null;
|
|
4544
|
+
/** ID of the concerned revision. */
|
|
4545
|
+
revision: string | null;
|
|
4546
|
+
/** ID of the concerned page. */
|
|
4547
|
+
page: string | null;
|
|
4548
|
+
}
|
|
4549
|
+
export interface SiteInsightsEventBase {
|
|
4550
|
+
/** Analytics info on the GitBook's site session. */
|
|
4551
|
+
session: SiteInsightsEventSession;
|
|
4552
|
+
/** Location of the event. */
|
|
4553
|
+
location: SiteInsightsEventLocation;
|
|
4554
|
+
/** Optional timestamp of the event. If not provided, the current timestamp will be used. */
|
|
4555
|
+
timestamp?: Timestamp;
|
|
4556
|
+
}
|
|
4557
|
+
export type SiteInsightsEventPageView = SiteInsightsEventBase & {
|
|
4558
|
+
type: 'page_view';
|
|
4559
|
+
};
|
|
4560
|
+
export type SiteInsightsEventSearchOpen = SiteInsightsEventBase & {
|
|
4561
|
+
type: 'search_open';
|
|
4562
|
+
};
|
|
4563
|
+
export type SiteInsightsEventSearchTypeQuery = SiteInsightsEventBase & {
|
|
4564
|
+
type: 'search_type_query';
|
|
4565
|
+
/** Query of the search. */
|
|
4566
|
+
query: string;
|
|
4567
|
+
};
|
|
4568
|
+
export type SiteInsightsEventSearchOpenResult = SiteInsightsEventBase & {
|
|
4569
|
+
type: 'search_open_result';
|
|
4570
|
+
/** Query of the search. */
|
|
4571
|
+
query: string;
|
|
4572
|
+
result: {
|
|
4573
|
+
/** ID of the concerned space. */
|
|
4574
|
+
spaceId: string;
|
|
4575
|
+
/** ID of the concerned page. */
|
|
4576
|
+
pageId: string;
|
|
4577
|
+
};
|
|
4578
|
+
};
|
|
4579
|
+
export type SiteInsightsEventPagePostFeedback = SiteInsightsEventBase & {
|
|
4580
|
+
type: 'page_post_feedback';
|
|
4581
|
+
feedback: {
|
|
4582
|
+
rating: PageFeedbackRating;
|
|
4583
|
+
};
|
|
4584
|
+
};
|
|
4585
|
+
export type SiteInsightsEventAskQuestion = SiteInsightsEventBase & {
|
|
4586
|
+
type: 'ask_question';
|
|
4587
|
+
/** Question being asked. */
|
|
4588
|
+
query: string;
|
|
4589
|
+
};
|
|
4590
|
+
export type SiteInsightsEvent = SiteInsightsEventPageView | SiteInsightsEventSearchOpen | SiteInsightsEventSearchTypeQuery | SiteInsightsEventSearchOpenResult | SiteInsightsEventPagePostFeedback | SiteInsightsEventAskQuestion;
|
|
4492
4591
|
/**
|
|
4493
4592
|
* The interval for grouping the results
|
|
4494
4593
|
* @default "week"
|
|
@@ -5938,11 +6037,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5938
6037
|
*
|
|
5939
6038
|
* @tags spaces
|
|
5940
6039
|
* @name InviteToSpace
|
|
5941
|
-
* @summary Invite to a space
|
|
6040
|
+
* @summary Invite to a space
|
|
5942
6041
|
* @request POST:/spaces/{spaceId}/permissions
|
|
5943
6042
|
* @secure
|
|
5944
6043
|
*/
|
|
5945
|
-
inviteToSpace: (spaceId: string, data:
|
|
6044
|
+
inviteToSpace: (spaceId: string, data: InviteUsersAndTeams, params?: RequestParams) => Promise<HttpResponse<void, Error | {
|
|
5946
6045
|
error: {
|
|
5947
6046
|
/** @format int32 */
|
|
5948
6047
|
code: 404;
|
|
@@ -7569,6 +7668,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7569
7668
|
message: string;
|
|
7570
7669
|
};
|
|
7571
7670
|
}>>;
|
|
7671
|
+
/**
|
|
7672
|
+
* No description
|
|
7673
|
+
*
|
|
7674
|
+
* @tags collections
|
|
7675
|
+
* @name InviteToCollection
|
|
7676
|
+
* @summary Invite to a collection
|
|
7677
|
+
* @request POST:/collections/{collectionId}/permissions
|
|
7678
|
+
* @secure
|
|
7679
|
+
*/
|
|
7680
|
+
inviteToCollection: (collectionId: string, data: InviteUsersAndTeams, params?: RequestParams) => Promise<HttpResponse<void, Error | {
|
|
7681
|
+
error: {
|
|
7682
|
+
/** @format int32 */
|
|
7683
|
+
code: 404;
|
|
7684
|
+
message: string;
|
|
7685
|
+
};
|
|
7686
|
+
}>>;
|
|
7572
7687
|
/**
|
|
7573
7688
|
* No description
|
|
7574
7689
|
*
|
|
@@ -8292,7 +8407,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8292
8407
|
* @request POST:/orgs/{organizationId}/ping
|
|
8293
8408
|
* @secure
|
|
8294
8409
|
*/
|
|
8295
|
-
updateOrganizationMemberLastSeenAt: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<
|
|
8410
|
+
updateOrganizationMemberLastSeenAt: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
8411
|
+
/** A JTW token containing the claims to attach to this user. */
|
|
8412
|
+
gitbookVisitorClaims?: string;
|
|
8413
|
+
}, Error>>;
|
|
8296
8414
|
/**
|
|
8297
8415
|
* No description
|
|
8298
8416
|
*
|
|
@@ -9497,6 +9615,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9497
9615
|
defaultSiteSpace?: string;
|
|
9498
9616
|
/** ID of the site-section to be used as the default. */
|
|
9499
9617
|
defaultSiteSection?: string;
|
|
9618
|
+
/**
|
|
9619
|
+
* Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like `https://company.com/docs`.
|
|
9620
|
+
* Use `null` to remove the proxy.
|
|
9621
|
+
*/
|
|
9622
|
+
proxy?: SiteProxy | null;
|
|
9500
9623
|
}, params?: RequestParams) => Promise<HttpResponse<Site, Error>>;
|
|
9501
9624
|
/**
|
|
9502
9625
|
* No description
|
|
@@ -10298,9 +10421,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10298
10421
|
* @name TrackViewInSiteById
|
|
10299
10422
|
* @summary Track a page view in a site
|
|
10300
10423
|
* @request POST:/orgs/{organizationId}/sites/{siteId}/insights/track_view
|
|
10424
|
+
* @deprecated
|
|
10301
10425
|
* @secure
|
|
10302
10426
|
*/
|
|
10303
10427
|
trackViewInSiteById: (organizationId: string, siteId: string, data: SiteTrackPageView, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10428
|
+
/**
|
|
10429
|
+
* @description Track events in a site.
|
|
10430
|
+
*
|
|
10431
|
+
* @tags sites
|
|
10432
|
+
* @name TrackEventsInSiteById
|
|
10433
|
+
* @summary Track events in a site.
|
|
10434
|
+
* @request POST:/orgs/{organizationId}/sites/{siteId}/insights/events
|
|
10435
|
+
* @secure
|
|
10436
|
+
*/
|
|
10437
|
+
trackEventsInSiteById: (organizationId: string, siteId: string, data: {
|
|
10438
|
+
events: SiteInsightsEvent[];
|
|
10439
|
+
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
10304
10440
|
/**
|
|
10305
10441
|
* No description
|
|
10306
10442
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -253,7 +253,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
253
253
|
|
|
254
254
|
// package.json
|
|
255
255
|
var name = "@gitbook/api";
|
|
256
|
-
var version = "0.
|
|
256
|
+
var version = "0.84.0";
|
|
257
257
|
|
|
258
258
|
// src/client.ts
|
|
259
259
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -2014,6 +2014,14 @@ var Api = class extends HttpClient {
|
|
|
2014
2014
|
format: "json",
|
|
2015
2015
|
...params
|
|
2016
2016
|
}),
|
|
2017
|
+
inviteToCollection: (collectionId, data, params = {}) => this.request({
|
|
2018
|
+
path: `/collections/${collectionId}/permissions`,
|
|
2019
|
+
method: "POST",
|
|
2020
|
+
body: data,
|
|
2021
|
+
secure: true,
|
|
2022
|
+
type: "application/json" /* Json */,
|
|
2023
|
+
...params
|
|
2024
|
+
}),
|
|
2017
2025
|
listPermissionsAggregateInCollection: (collectionId, query, params = {}) => this.request({
|
|
2018
2026
|
path: `/collections/${collectionId}/permissions/aggregate`,
|
|
2019
2027
|
method: "GET",
|
|
@@ -2328,6 +2336,7 @@ var Api = class extends HttpClient {
|
|
|
2328
2336
|
path: `/orgs/${organizationId}/ping`,
|
|
2329
2337
|
method: "POST",
|
|
2330
2338
|
secure: true,
|
|
2339
|
+
format: "json",
|
|
2331
2340
|
...params
|
|
2332
2341
|
}),
|
|
2333
2342
|
setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
|
|
@@ -3216,6 +3225,14 @@ var Api = class extends HttpClient {
|
|
|
3216
3225
|
type: "application/json" /* Json */,
|
|
3217
3226
|
...params
|
|
3218
3227
|
}),
|
|
3228
|
+
trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
|
|
3229
|
+
path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
|
|
3230
|
+
method: "POST",
|
|
3231
|
+
body: data,
|
|
3232
|
+
secure: true,
|
|
3233
|
+
type: "application/json" /* Json */,
|
|
3234
|
+
...params
|
|
3235
|
+
}),
|
|
3219
3236
|
getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3220
3237
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
|
|
3221
3238
|
method: "GET",
|
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.84.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1933,6 +1933,14 @@ var Api = class extends HttpClient {
|
|
|
1933
1933
|
format: "json",
|
|
1934
1934
|
...params
|
|
1935
1935
|
}),
|
|
1936
|
+
inviteToCollection: (collectionId, data, params = {}) => this.request({
|
|
1937
|
+
path: `/collections/${collectionId}/permissions`,
|
|
1938
|
+
method: "POST",
|
|
1939
|
+
body: data,
|
|
1940
|
+
secure: true,
|
|
1941
|
+
type: "application/json" /* Json */,
|
|
1942
|
+
...params
|
|
1943
|
+
}),
|
|
1936
1944
|
listPermissionsAggregateInCollection: (collectionId, query, params = {}) => this.request({
|
|
1937
1945
|
path: `/collections/${collectionId}/permissions/aggregate`,
|
|
1938
1946
|
method: "GET",
|
|
@@ -2247,6 +2255,7 @@ var Api = class extends HttpClient {
|
|
|
2247
2255
|
path: `/orgs/${organizationId}/ping`,
|
|
2248
2256
|
method: "POST",
|
|
2249
2257
|
secure: true,
|
|
2258
|
+
format: "json",
|
|
2250
2259
|
...params
|
|
2251
2260
|
}),
|
|
2252
2261
|
setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
|
|
@@ -3135,6 +3144,14 @@ var Api = class extends HttpClient {
|
|
|
3135
3144
|
type: "application/json" /* Json */,
|
|
3136
3145
|
...params
|
|
3137
3146
|
}),
|
|
3147
|
+
trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
|
|
3148
|
+
path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
|
|
3149
|
+
method: "POST",
|
|
3150
|
+
body: data,
|
|
3151
|
+
secure: true,
|
|
3152
|
+
type: "application/json" /* Json */,
|
|
3153
|
+
...params
|
|
3154
|
+
}),
|
|
3138
3155
|
getAdsInsightsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
|
|
3139
3156
|
path: `/orgs/${organizationId}/sites/${siteId}/insights/ads`,
|
|
3140
3157
|
method: "GET",
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -1304,7 +1304,7 @@
|
|
|
1304
1304
|
"/spaces/{spaceId}/permissions": {
|
|
1305
1305
|
"post": {
|
|
1306
1306
|
"operationId": "inviteToSpace",
|
|
1307
|
-
"summary": "Invite to a space
|
|
1307
|
+
"summary": "Invite to a space",
|
|
1308
1308
|
"tags": [
|
|
1309
1309
|
"spaces"
|
|
1310
1310
|
],
|
|
@@ -1323,7 +1323,7 @@
|
|
|
1323
1323
|
"description": "OK"
|
|
1324
1324
|
},
|
|
1325
1325
|
"404": {
|
|
1326
|
-
"description": "No team with the provided Id",
|
|
1326
|
+
"description": "No team or user with the provided Id",
|
|
1327
1327
|
"$ref": "#/components/responses/NotFoundError"
|
|
1328
1328
|
},
|
|
1329
1329
|
"default": {
|
|
@@ -1335,7 +1335,7 @@
|
|
|
1335
1335
|
"content": {
|
|
1336
1336
|
"application/json": {
|
|
1337
1337
|
"schema": {
|
|
1338
|
-
"$ref": "#/components/schemas/
|
|
1338
|
+
"$ref": "#/components/schemas/InviteUsersAndTeams"
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
@@ -5939,6 +5939,47 @@
|
|
|
5939
5939
|
}
|
|
5940
5940
|
}
|
|
5941
5941
|
},
|
|
5942
|
+
"/collections/{collectionId}/permissions": {
|
|
5943
|
+
"post": {
|
|
5944
|
+
"operationId": "inviteToCollection",
|
|
5945
|
+
"summary": "Invite to a collection",
|
|
5946
|
+
"tags": [
|
|
5947
|
+
"collections"
|
|
5948
|
+
],
|
|
5949
|
+
"security": [
|
|
5950
|
+
{
|
|
5951
|
+
"user": []
|
|
5952
|
+
}
|
|
5953
|
+
],
|
|
5954
|
+
"parameters": [
|
|
5955
|
+
{
|
|
5956
|
+
"$ref": "#/components/parameters/collectionId"
|
|
5957
|
+
}
|
|
5958
|
+
],
|
|
5959
|
+
"responses": {
|
|
5960
|
+
"204": {
|
|
5961
|
+
"description": "OK"
|
|
5962
|
+
},
|
|
5963
|
+
"404": {
|
|
5964
|
+
"description": "No team or user with the provided Id",
|
|
5965
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
5966
|
+
},
|
|
5967
|
+
"default": {
|
|
5968
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
5969
|
+
}
|
|
5970
|
+
},
|
|
5971
|
+
"requestBody": {
|
|
5972
|
+
"required": true,
|
|
5973
|
+
"content": {
|
|
5974
|
+
"application/json": {
|
|
5975
|
+
"schema": {
|
|
5976
|
+
"$ref": "#/components/schemas/InviteUsersAndTeams"
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
}
|
|
5982
|
+
},
|
|
5942
5983
|
"/collections/{collectionId}/permissions/aggregate": {
|
|
5943
5984
|
"get": {
|
|
5944
5985
|
"operationId": "listPermissionsAggregateInCollection",
|
|
@@ -7895,8 +7936,21 @@
|
|
|
7895
7936
|
}
|
|
7896
7937
|
],
|
|
7897
7938
|
"responses": {
|
|
7898
|
-
"
|
|
7899
|
-
"description": "Organization member has been updated."
|
|
7939
|
+
"200": {
|
|
7940
|
+
"description": "Organization member has been updated. Optionally returns a JWT token to attach to the user.",
|
|
7941
|
+
"content": {
|
|
7942
|
+
"application/json": {
|
|
7943
|
+
"schema": {
|
|
7944
|
+
"type": "object",
|
|
7945
|
+
"properties": {
|
|
7946
|
+
"gitbookVisitorClaims": {
|
|
7947
|
+
"description": "A JTW token containing the claims to attach to this user.",
|
|
7948
|
+
"type": "string"
|
|
7949
|
+
}
|
|
7950
|
+
}
|
|
7951
|
+
}
|
|
7952
|
+
}
|
|
7953
|
+
}
|
|
7900
7954
|
},
|
|
7901
7955
|
"default": {
|
|
7902
7956
|
"$ref": "#/components/responses/UnexpectedError"
|
|
@@ -11801,6 +11855,21 @@
|
|
|
11801
11855
|
"defaultSiteSection": {
|
|
11802
11856
|
"type": "string",
|
|
11803
11857
|
"description": "ID of the site-section to be used as the default."
|
|
11858
|
+
},
|
|
11859
|
+
"proxy": {
|
|
11860
|
+
"description": "Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like `https://company.com/docs`.\nUse `null` to remove the proxy.\n",
|
|
11861
|
+
"oneOf": [
|
|
11862
|
+
{
|
|
11863
|
+
"$ref": "#/components/schemas/SiteProxy"
|
|
11864
|
+
},
|
|
11865
|
+
{
|
|
11866
|
+
"type": "string",
|
|
11867
|
+
"nullable": true,
|
|
11868
|
+
"enum": [
|
|
11869
|
+
null
|
|
11870
|
+
]
|
|
11871
|
+
}
|
|
11872
|
+
]
|
|
11804
11873
|
}
|
|
11805
11874
|
}
|
|
11806
11875
|
}
|
|
@@ -14478,6 +14547,7 @@
|
|
|
14478
14547
|
"operationId": "trackViewInSiteById",
|
|
14479
14548
|
"summary": "Track a page view in a site",
|
|
14480
14549
|
"description": "Track a page view in a site.",
|
|
14550
|
+
"deprecated": true,
|
|
14481
14551
|
"tags": [
|
|
14482
14552
|
"analytics",
|
|
14483
14553
|
"sites"
|
|
@@ -14510,6 +14580,53 @@
|
|
|
14510
14580
|
}
|
|
14511
14581
|
}
|
|
14512
14582
|
},
|
|
14583
|
+
"/orgs/{organizationId}/sites/{siteId}/insights/events": {
|
|
14584
|
+
"post": {
|
|
14585
|
+
"operationId": "trackEventsInSiteById",
|
|
14586
|
+
"summary": "Track events in a site.",
|
|
14587
|
+
"description": "Track events in a site.",
|
|
14588
|
+
"tags": [
|
|
14589
|
+
"sites"
|
|
14590
|
+
],
|
|
14591
|
+
"parameters": [
|
|
14592
|
+
{
|
|
14593
|
+
"$ref": "#/components/parameters/organizationId"
|
|
14594
|
+
},
|
|
14595
|
+
{
|
|
14596
|
+
"$ref": "#/components/parameters/siteId"
|
|
14597
|
+
}
|
|
14598
|
+
],
|
|
14599
|
+
"responses": {
|
|
14600
|
+
"204": {
|
|
14601
|
+
"description": "Events have been tracked."
|
|
14602
|
+
},
|
|
14603
|
+
"default": {
|
|
14604
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
14605
|
+
}
|
|
14606
|
+
},
|
|
14607
|
+
"requestBody": {
|
|
14608
|
+
"required": true,
|
|
14609
|
+
"content": {
|
|
14610
|
+
"application/json": {
|
|
14611
|
+
"schema": {
|
|
14612
|
+
"type": "object",
|
|
14613
|
+
"properties": {
|
|
14614
|
+
"events": {
|
|
14615
|
+
"type": "array",
|
|
14616
|
+
"items": {
|
|
14617
|
+
"$ref": "#/components/schemas/SiteInsightsEvent"
|
|
14618
|
+
}
|
|
14619
|
+
}
|
|
14620
|
+
},
|
|
14621
|
+
"required": [
|
|
14622
|
+
"events"
|
|
14623
|
+
]
|
|
14624
|
+
}
|
|
14625
|
+
}
|
|
14626
|
+
}
|
|
14627
|
+
}
|
|
14628
|
+
}
|
|
14629
|
+
},
|
|
14513
14630
|
"/orgs/{organizationId}/sites/{siteId}/insights/ads": {
|
|
14514
14631
|
"get": {
|
|
14515
14632
|
"operationId": "getAdsInsightsForSiteById",
|
|
@@ -20876,23 +20993,49 @@
|
|
|
20876
20993
|
"referrer"
|
|
20877
20994
|
]
|
|
20878
20995
|
},
|
|
20879
|
-
"
|
|
20996
|
+
"InviteUsersAndTeams": {
|
|
20880
20997
|
"type": "object",
|
|
20881
20998
|
"properties": {
|
|
20882
|
-
"teams": {
|
|
20883
|
-
"type": "array",
|
|
20884
|
-
"items": {
|
|
20885
|
-
"type": "string",
|
|
20886
|
-
"description": "The ID of the team to be invited"
|
|
20887
|
-
}
|
|
20888
|
-
},
|
|
20889
20999
|
"role": {
|
|
20890
|
-
"description": "Role to set
|
|
21000
|
+
"description": "Role to set.",
|
|
20891
21001
|
"$ref": "#/components/schemas/MemberRoleOrGuest"
|
|
20892
21002
|
}
|
|
20893
21003
|
},
|
|
21004
|
+
"anyOf": [
|
|
21005
|
+
{
|
|
21006
|
+
"type": "object",
|
|
21007
|
+
"properties": {
|
|
21008
|
+
"teams": {
|
|
21009
|
+
"type": "array",
|
|
21010
|
+
"minItems": 1,
|
|
21011
|
+
"items": {
|
|
21012
|
+
"type": "string",
|
|
21013
|
+
"description": "The ID of the team to be invited"
|
|
21014
|
+
}
|
|
21015
|
+
}
|
|
21016
|
+
},
|
|
21017
|
+
"required": [
|
|
21018
|
+
"teams"
|
|
21019
|
+
]
|
|
21020
|
+
},
|
|
21021
|
+
{
|
|
21022
|
+
"type": "object",
|
|
21023
|
+
"properties": {
|
|
21024
|
+
"users": {
|
|
21025
|
+
"type": "array",
|
|
21026
|
+
"minItems": 1,
|
|
21027
|
+
"items": {
|
|
21028
|
+
"type": "string",
|
|
21029
|
+
"description": "The ID of the user to be invited"
|
|
21030
|
+
}
|
|
21031
|
+
}
|
|
21032
|
+
},
|
|
21033
|
+
"required": [
|
|
21034
|
+
"users"
|
|
21035
|
+
]
|
|
21036
|
+
}
|
|
21037
|
+
],
|
|
20894
21038
|
"required": [
|
|
20895
|
-
"teams",
|
|
20896
21039
|
"role"
|
|
20897
21040
|
]
|
|
20898
21041
|
},
|
|
@@ -25655,8 +25798,7 @@
|
|
|
25655
25798
|
"type",
|
|
25656
25799
|
"visitor",
|
|
25657
25800
|
"url",
|
|
25658
|
-
"referrer"
|
|
25659
|
-
"spaceId"
|
|
25801
|
+
"referrer"
|
|
25660
25802
|
]
|
|
25661
25803
|
}
|
|
25662
25804
|
]
|
|
@@ -27831,7 +27973,8 @@
|
|
|
27831
27973
|
"SiteHostname": {
|
|
27832
27974
|
"type": "string",
|
|
27833
27975
|
"description": "Custom hostname for the site, for e.g. docs.mycompany.com",
|
|
27834
|
-
"pattern": "^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$"
|
|
27976
|
+
"pattern": "^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$",
|
|
27977
|
+
"maxLength": 512
|
|
27835
27978
|
},
|
|
27836
27979
|
"SiteBasename": {
|
|
27837
27980
|
"type": "string",
|
|
@@ -27839,6 +27982,12 @@
|
|
|
27839
27982
|
"minLength": 1,
|
|
27840
27983
|
"maxLength": 100
|
|
27841
27984
|
},
|
|
27985
|
+
"SiteProxy": {
|
|
27986
|
+
"type": "string",
|
|
27987
|
+
"description": "Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.",
|
|
27988
|
+
"pattern": "^([\\w-]+\\.)*[\\w-]+\\.[a-zA-Z]{2,}(\\/[\\w-]+)+$",
|
|
27989
|
+
"maxLength": 512
|
|
27990
|
+
},
|
|
27842
27991
|
"SiteVisibility": {
|
|
27843
27992
|
"type": "string",
|
|
27844
27993
|
"description": "The visibility setting of the site determines the audience of the site.\n* `public`: Anyone can access the site, and the site is indexed by search engines.\n* `unlisted`: Anyone can access the site, and the site is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the site.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the site.\n",
|
|
@@ -27974,6 +28123,9 @@
|
|
|
27974
28123
|
"basename": {
|
|
27975
28124
|
"$ref": "#/components/schemas/SiteBasename"
|
|
27976
28125
|
},
|
|
28126
|
+
"proxy": {
|
|
28127
|
+
"$ref": "#/components/schemas/SiteProxy"
|
|
28128
|
+
},
|
|
27977
28129
|
"visibility": {
|
|
27978
28130
|
"$ref": "#/components/schemas/SiteVisibility"
|
|
27979
28131
|
},
|
|
@@ -30573,6 +30725,324 @@
|
|
|
30573
30725
|
}
|
|
30574
30726
|
]
|
|
30575
30727
|
},
|
|
30728
|
+
"SiteInsightsEventSession": {
|
|
30729
|
+
"type": "object",
|
|
30730
|
+
"description": "Analytics info on the GitBook's site session.",
|
|
30731
|
+
"properties": {
|
|
30732
|
+
"visitorId": {
|
|
30733
|
+
"type": "string",
|
|
30734
|
+
"description": "GitBook's unique identifier of the visitor."
|
|
30735
|
+
},
|
|
30736
|
+
"sessionId": {
|
|
30737
|
+
"type": "string",
|
|
30738
|
+
"description": "GitBook's unique identifier of the visitor's session."
|
|
30739
|
+
},
|
|
30740
|
+
"cookies": {
|
|
30741
|
+
"type": "object",
|
|
30742
|
+
"description": "The visitors cookies.",
|
|
30743
|
+
"additionalProperties": {
|
|
30744
|
+
"type": "string"
|
|
30745
|
+
}
|
|
30746
|
+
},
|
|
30747
|
+
"ip": {
|
|
30748
|
+
"type": "string",
|
|
30749
|
+
"description": "IP address of the visitor.\nIf not defined, it'll default to the IP executing the request.\n"
|
|
30750
|
+
},
|
|
30751
|
+
"userAgent": {
|
|
30752
|
+
"type": "string",
|
|
30753
|
+
"description": "User-agent of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent\n"
|
|
30754
|
+
},
|
|
30755
|
+
"language": {
|
|
30756
|
+
"type": "string",
|
|
30757
|
+
"nullable": true,
|
|
30758
|
+
"description": "Language of the visitor.\nhttps://developer.mozilla.org/en-US/docs/Web/API/Navigator/language\n"
|
|
30759
|
+
},
|
|
30760
|
+
"referrer": {
|
|
30761
|
+
"description": "Referrer of the sesion",
|
|
30762
|
+
"oneOf": [
|
|
30763
|
+
{
|
|
30764
|
+
"type": "string",
|
|
30765
|
+
"nullable": true,
|
|
30766
|
+
"enum": [
|
|
30767
|
+
null
|
|
30768
|
+
]
|
|
30769
|
+
},
|
|
30770
|
+
{
|
|
30771
|
+
"$ref": "#/components/schemas/URL"
|
|
30772
|
+
}
|
|
30773
|
+
]
|
|
30774
|
+
}
|
|
30775
|
+
},
|
|
30776
|
+
"required": [
|
|
30777
|
+
"visitorId",
|
|
30778
|
+
"sessionId",
|
|
30779
|
+
"cookies",
|
|
30780
|
+
"userAgent",
|
|
30781
|
+
"language",
|
|
30782
|
+
"referrer"
|
|
30783
|
+
]
|
|
30784
|
+
},
|
|
30785
|
+
"SiteInsightsEventLocation": {
|
|
30786
|
+
"type": "object",
|
|
30787
|
+
"description": "Location of the event.",
|
|
30788
|
+
"properties": {
|
|
30789
|
+
"url": {
|
|
30790
|
+
"description": "URL of the location.",
|
|
30791
|
+
"$ref": "#/components/schemas/URL"
|
|
30792
|
+
},
|
|
30793
|
+
"siteSection": {
|
|
30794
|
+
"type": "string",
|
|
30795
|
+
"description": "ID of the concerned site section.",
|
|
30796
|
+
"nullable": true
|
|
30797
|
+
},
|
|
30798
|
+
"siteSpace": {
|
|
30799
|
+
"type": "string",
|
|
30800
|
+
"description": "ID of the concerned site space.",
|
|
30801
|
+
"nullable": true
|
|
30802
|
+
},
|
|
30803
|
+
"siteShareKey": {
|
|
30804
|
+
"type": "string",
|
|
30805
|
+
"description": "ID of the concerned site share key.",
|
|
30806
|
+
"nullable": true
|
|
30807
|
+
},
|
|
30808
|
+
"space": {
|
|
30809
|
+
"type": "string",
|
|
30810
|
+
"description": "ID of the concerned space.",
|
|
30811
|
+
"nullable": true
|
|
30812
|
+
},
|
|
30813
|
+
"revision": {
|
|
30814
|
+
"type": "string",
|
|
30815
|
+
"description": "ID of the concerned revision.",
|
|
30816
|
+
"nullable": true
|
|
30817
|
+
},
|
|
30818
|
+
"page": {
|
|
30819
|
+
"type": "string",
|
|
30820
|
+
"description": "ID of the concerned page.",
|
|
30821
|
+
"nullable": true
|
|
30822
|
+
}
|
|
30823
|
+
},
|
|
30824
|
+
"required": [
|
|
30825
|
+
"url",
|
|
30826
|
+
"siteSection",
|
|
30827
|
+
"siteSpace",
|
|
30828
|
+
"siteShareKey",
|
|
30829
|
+
"page",
|
|
30830
|
+
"space",
|
|
30831
|
+
"revision"
|
|
30832
|
+
]
|
|
30833
|
+
},
|
|
30834
|
+
"SiteInsightsEventBase": {
|
|
30835
|
+
"type": "object",
|
|
30836
|
+
"properties": {
|
|
30837
|
+
"session": {
|
|
30838
|
+
"$ref": "#/components/schemas/SiteInsightsEventSession"
|
|
30839
|
+
},
|
|
30840
|
+
"location": {
|
|
30841
|
+
"$ref": "#/components/schemas/SiteInsightsEventLocation"
|
|
30842
|
+
},
|
|
30843
|
+
"timestamp": {
|
|
30844
|
+
"description": "Optional timestamp of the event. If not provided, the current timestamp will be used.",
|
|
30845
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
30846
|
+
}
|
|
30847
|
+
},
|
|
30848
|
+
"required": [
|
|
30849
|
+
"session",
|
|
30850
|
+
"location"
|
|
30851
|
+
]
|
|
30852
|
+
},
|
|
30853
|
+
"SiteInsightsEventPageView": {
|
|
30854
|
+
"allOf": [
|
|
30855
|
+
{
|
|
30856
|
+
"$ref": "#/components/schemas/SiteInsightsEventBase"
|
|
30857
|
+
},
|
|
30858
|
+
{
|
|
30859
|
+
"type": "object",
|
|
30860
|
+
"properties": {
|
|
30861
|
+
"type": {
|
|
30862
|
+
"type": "string",
|
|
30863
|
+
"enum": [
|
|
30864
|
+
"page_view"
|
|
30865
|
+
]
|
|
30866
|
+
}
|
|
30867
|
+
},
|
|
30868
|
+
"required": [
|
|
30869
|
+
"type"
|
|
30870
|
+
]
|
|
30871
|
+
}
|
|
30872
|
+
]
|
|
30873
|
+
},
|
|
30874
|
+
"SiteInsightsEventSearchOpen": {
|
|
30875
|
+
"allOf": [
|
|
30876
|
+
{
|
|
30877
|
+
"$ref": "#/components/schemas/SiteInsightsEventBase"
|
|
30878
|
+
},
|
|
30879
|
+
{
|
|
30880
|
+
"type": "object",
|
|
30881
|
+
"properties": {
|
|
30882
|
+
"type": {
|
|
30883
|
+
"type": "string",
|
|
30884
|
+
"enum": [
|
|
30885
|
+
"search_open"
|
|
30886
|
+
]
|
|
30887
|
+
}
|
|
30888
|
+
},
|
|
30889
|
+
"required": [
|
|
30890
|
+
"type"
|
|
30891
|
+
]
|
|
30892
|
+
}
|
|
30893
|
+
]
|
|
30894
|
+
},
|
|
30895
|
+
"SiteInsightsEventSearchTypeQuery": {
|
|
30896
|
+
"allOf": [
|
|
30897
|
+
{
|
|
30898
|
+
"$ref": "#/components/schemas/SiteInsightsEventBase"
|
|
30899
|
+
},
|
|
30900
|
+
{
|
|
30901
|
+
"type": "object",
|
|
30902
|
+
"properties": {
|
|
30903
|
+
"type": {
|
|
30904
|
+
"type": "string",
|
|
30905
|
+
"enum": [
|
|
30906
|
+
"search_type_query"
|
|
30907
|
+
]
|
|
30908
|
+
},
|
|
30909
|
+
"query": {
|
|
30910
|
+
"type": "string",
|
|
30911
|
+
"description": "Query of the search."
|
|
30912
|
+
}
|
|
30913
|
+
},
|
|
30914
|
+
"required": [
|
|
30915
|
+
"type",
|
|
30916
|
+
"query"
|
|
30917
|
+
]
|
|
30918
|
+
}
|
|
30919
|
+
]
|
|
30920
|
+
},
|
|
30921
|
+
"SiteInsightsEventSearchOpenResult": {
|
|
30922
|
+
"allOf": [
|
|
30923
|
+
{
|
|
30924
|
+
"$ref": "#/components/schemas/SiteInsightsEventBase"
|
|
30925
|
+
},
|
|
30926
|
+
{
|
|
30927
|
+
"type": "object",
|
|
30928
|
+
"properties": {
|
|
30929
|
+
"type": {
|
|
30930
|
+
"type": "string",
|
|
30931
|
+
"enum": [
|
|
30932
|
+
"search_open_result"
|
|
30933
|
+
]
|
|
30934
|
+
},
|
|
30935
|
+
"query": {
|
|
30936
|
+
"type": "string",
|
|
30937
|
+
"description": "Query of the search."
|
|
30938
|
+
},
|
|
30939
|
+
"result": {
|
|
30940
|
+
"type": "object",
|
|
30941
|
+
"properties": {
|
|
30942
|
+
"spaceId": {
|
|
30943
|
+
"type": "string",
|
|
30944
|
+
"description": "ID of the concerned space."
|
|
30945
|
+
},
|
|
30946
|
+
"pageId": {
|
|
30947
|
+
"type": "string",
|
|
30948
|
+
"description": "ID of the concerned page."
|
|
30949
|
+
}
|
|
30950
|
+
},
|
|
30951
|
+
"required": [
|
|
30952
|
+
"spaceId",
|
|
30953
|
+
"pageId"
|
|
30954
|
+
]
|
|
30955
|
+
}
|
|
30956
|
+
},
|
|
30957
|
+
"required": [
|
|
30958
|
+
"type",
|
|
30959
|
+
"query",
|
|
30960
|
+
"result"
|
|
30961
|
+
]
|
|
30962
|
+
}
|
|
30963
|
+
]
|
|
30964
|
+
},
|
|
30965
|
+
"SiteInsightsEventPagePostFeedback": {
|
|
30966
|
+
"allOf": [
|
|
30967
|
+
{
|
|
30968
|
+
"$ref": "#/components/schemas/SiteInsightsEventBase"
|
|
30969
|
+
},
|
|
30970
|
+
{
|
|
30971
|
+
"type": "object",
|
|
30972
|
+
"properties": {
|
|
30973
|
+
"type": {
|
|
30974
|
+
"type": "string",
|
|
30975
|
+
"enum": [
|
|
30976
|
+
"page_post_feedback"
|
|
30977
|
+
]
|
|
30978
|
+
},
|
|
30979
|
+
"feedback": {
|
|
30980
|
+
"type": "object",
|
|
30981
|
+
"properties": {
|
|
30982
|
+
"rating": {
|
|
30983
|
+
"$ref": "#/components/schemas/PageFeedbackRating"
|
|
30984
|
+
}
|
|
30985
|
+
},
|
|
30986
|
+
"required": [
|
|
30987
|
+
"rating"
|
|
30988
|
+
]
|
|
30989
|
+
}
|
|
30990
|
+
},
|
|
30991
|
+
"required": [
|
|
30992
|
+
"type",
|
|
30993
|
+
"feedback"
|
|
30994
|
+
]
|
|
30995
|
+
}
|
|
30996
|
+
]
|
|
30997
|
+
},
|
|
30998
|
+
"SiteInsightsEventAskQuestion": {
|
|
30999
|
+
"allOf": [
|
|
31000
|
+
{
|
|
31001
|
+
"$ref": "#/components/schemas/SiteInsightsEventBase"
|
|
31002
|
+
},
|
|
31003
|
+
{
|
|
31004
|
+
"type": "object",
|
|
31005
|
+
"properties": {
|
|
31006
|
+
"type": {
|
|
31007
|
+
"type": "string",
|
|
31008
|
+
"enum": [
|
|
31009
|
+
"ask_question"
|
|
31010
|
+
]
|
|
31011
|
+
},
|
|
31012
|
+
"query": {
|
|
31013
|
+
"type": "string",
|
|
31014
|
+
"description": "Question being asked."
|
|
31015
|
+
}
|
|
31016
|
+
},
|
|
31017
|
+
"required": [
|
|
31018
|
+
"type",
|
|
31019
|
+
"query"
|
|
31020
|
+
]
|
|
31021
|
+
}
|
|
31022
|
+
]
|
|
31023
|
+
},
|
|
31024
|
+
"SiteInsightsEvent": {
|
|
31025
|
+
"oneOf": [
|
|
31026
|
+
{
|
|
31027
|
+
"$ref": "#/components/schemas/SiteInsightsEventPageView"
|
|
31028
|
+
},
|
|
31029
|
+
{
|
|
31030
|
+
"$ref": "#/components/schemas/SiteInsightsEventSearchOpen"
|
|
31031
|
+
},
|
|
31032
|
+
{
|
|
31033
|
+
"$ref": "#/components/schemas/SiteInsightsEventSearchTypeQuery"
|
|
31034
|
+
},
|
|
31035
|
+
{
|
|
31036
|
+
"$ref": "#/components/schemas/SiteInsightsEventSearchOpenResult"
|
|
31037
|
+
},
|
|
31038
|
+
{
|
|
31039
|
+
"$ref": "#/components/schemas/SiteInsightsEventPagePostFeedback"
|
|
31040
|
+
},
|
|
31041
|
+
{
|
|
31042
|
+
"$ref": "#/components/schemas/SiteInsightsEventAskQuestion"
|
|
31043
|
+
}
|
|
31044
|
+
]
|
|
31045
|
+
},
|
|
30576
31046
|
"InsightsInterval": {
|
|
30577
31047
|
"type": "string",
|
|
30578
31048
|
"description": "The interval for grouping the results",
|
package/spec/openapi.yaml
CHANGED
|
@@ -760,7 +760,7 @@ paths:
|
|
|
760
760
|
"/spaces/{spaceId}/permissions":
|
|
761
761
|
post:
|
|
762
762
|
operationId: inviteToSpace
|
|
763
|
-
summary: Invite to a space
|
|
763
|
+
summary: Invite to a space
|
|
764
764
|
tags:
|
|
765
765
|
- spaces
|
|
766
766
|
security:
|
|
@@ -771,7 +771,7 @@ paths:
|
|
|
771
771
|
"204":
|
|
772
772
|
description: OK
|
|
773
773
|
"404":
|
|
774
|
-
description: No team with the provided Id
|
|
774
|
+
description: No team or user with the provided Id
|
|
775
775
|
$ref: "#/components/responses/NotFoundError"
|
|
776
776
|
default:
|
|
777
777
|
$ref: "#/components/responses/UnexpectedError"
|
|
@@ -780,7 +780,7 @@ paths:
|
|
|
780
780
|
content:
|
|
781
781
|
application/json:
|
|
782
782
|
schema:
|
|
783
|
-
$ref: "#/components/schemas/
|
|
783
|
+
$ref: "#/components/schemas/InviteUsersAndTeams"
|
|
784
784
|
"/spaces/{spaceId}/permissions/teams/{teamId}":
|
|
785
785
|
delete:
|
|
786
786
|
operationId: removeTeamFromSpace
|
|
@@ -3246,6 +3246,30 @@ paths:
|
|
|
3246
3246
|
$ref: "#/components/responses/PreconditionFailedError"
|
|
3247
3247
|
default:
|
|
3248
3248
|
$ref: "#/components/responses/UnexpectedError"
|
|
3249
|
+
"/collections/{collectionId}/permissions":
|
|
3250
|
+
post:
|
|
3251
|
+
operationId: inviteToCollection
|
|
3252
|
+
summary: Invite to a collection
|
|
3253
|
+
tags:
|
|
3254
|
+
- collections
|
|
3255
|
+
security:
|
|
3256
|
+
- user: []
|
|
3257
|
+
parameters:
|
|
3258
|
+
- $ref: "#/components/parameters/collectionId"
|
|
3259
|
+
responses:
|
|
3260
|
+
"204":
|
|
3261
|
+
description: OK
|
|
3262
|
+
"404":
|
|
3263
|
+
description: No team or user with the provided Id
|
|
3264
|
+
$ref: "#/components/responses/NotFoundError"
|
|
3265
|
+
default:
|
|
3266
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
3267
|
+
requestBody:
|
|
3268
|
+
required: true
|
|
3269
|
+
content:
|
|
3270
|
+
application/json:
|
|
3271
|
+
schema:
|
|
3272
|
+
$ref: "#/components/schemas/InviteUsersAndTeams"
|
|
3249
3273
|
"/collections/{collectionId}/permissions/aggregate":
|
|
3250
3274
|
get:
|
|
3251
3275
|
operationId: listPermissionsAggregateInCollection
|
|
@@ -4367,8 +4391,16 @@ paths:
|
|
|
4367
4391
|
parameters:
|
|
4368
4392
|
- $ref: "#/components/parameters/organizationId"
|
|
4369
4393
|
responses:
|
|
4370
|
-
"
|
|
4371
|
-
description: Organization member has been updated.
|
|
4394
|
+
"200":
|
|
4395
|
+
description: Organization member has been updated. Optionally returns a JWT token to attach to the user.
|
|
4396
|
+
content:
|
|
4397
|
+
application/json:
|
|
4398
|
+
schema:
|
|
4399
|
+
type: object
|
|
4400
|
+
properties:
|
|
4401
|
+
gitbookVisitorClaims:
|
|
4402
|
+
description: A JTW token containing the claims to attach to this user.
|
|
4403
|
+
type: string
|
|
4372
4404
|
default:
|
|
4373
4405
|
$ref: "#/components/responses/UnexpectedError"
|
|
4374
4406
|
"/orgs/{organizationId}/members/{userId}/sso":
|
|
@@ -6583,6 +6615,16 @@ paths:
|
|
|
6583
6615
|
defaultSiteSection:
|
|
6584
6616
|
type: string
|
|
6585
6617
|
description: ID of the site-section to be used as the default.
|
|
6618
|
+
proxy:
|
|
6619
|
+
description: |
|
|
6620
|
+
Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like `https://company.com/docs`.
|
|
6621
|
+
Use `null` to remove the proxy.
|
|
6622
|
+
oneOf:
|
|
6623
|
+
- $ref: "#/components/schemas/SiteProxy"
|
|
6624
|
+
- type: string
|
|
6625
|
+
nullable: true
|
|
6626
|
+
enum:
|
|
6627
|
+
- null
|
|
6586
6628
|
responses:
|
|
6587
6629
|
"200":
|
|
6588
6630
|
description: OK
|
|
@@ -8082,6 +8124,7 @@ paths:
|
|
|
8082
8124
|
operationId: trackViewInSiteById
|
|
8083
8125
|
summary: Track a page view in a site
|
|
8084
8126
|
description: Track a page view in a site.
|
|
8127
|
+
deprecated: true
|
|
8085
8128
|
tags:
|
|
8086
8129
|
- analytics
|
|
8087
8130
|
- sites
|
|
@@ -8099,6 +8142,34 @@ paths:
|
|
|
8099
8142
|
application/json:
|
|
8100
8143
|
schema:
|
|
8101
8144
|
$ref: "#/components/schemas/SiteTrackPageView"
|
|
8145
|
+
"/orgs/{organizationId}/sites/{siteId}/insights/events":
|
|
8146
|
+
post:
|
|
8147
|
+
operationId: trackEventsInSiteById
|
|
8148
|
+
summary: Track events in a site.
|
|
8149
|
+
description: Track events in a site.
|
|
8150
|
+
tags:
|
|
8151
|
+
- sites
|
|
8152
|
+
parameters:
|
|
8153
|
+
- $ref: "#/components/parameters/organizationId"
|
|
8154
|
+
- $ref: "#/components/parameters/siteId"
|
|
8155
|
+
responses:
|
|
8156
|
+
"204":
|
|
8157
|
+
description: Events have been tracked.
|
|
8158
|
+
default:
|
|
8159
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8160
|
+
requestBody:
|
|
8161
|
+
required: true
|
|
8162
|
+
content:
|
|
8163
|
+
application/json:
|
|
8164
|
+
schema:
|
|
8165
|
+
type: object
|
|
8166
|
+
properties:
|
|
8167
|
+
events:
|
|
8168
|
+
type: array
|
|
8169
|
+
items:
|
|
8170
|
+
$ref: "#/components/schemas/SiteInsightsEvent"
|
|
8171
|
+
required:
|
|
8172
|
+
- events
|
|
8102
8173
|
"/orgs/{organizationId}/sites/{siteId}/insights/ads":
|
|
8103
8174
|
get:
|
|
8104
8175
|
operationId: getAdsInsightsForSiteById
|
|
@@ -12225,19 +12296,34 @@ components:
|
|
|
12225
12296
|
- visitor
|
|
12226
12297
|
- url
|
|
12227
12298
|
- referrer
|
|
12228
|
-
|
|
12299
|
+
InviteUsersAndTeams:
|
|
12229
12300
|
type: object
|
|
12230
12301
|
properties:
|
|
12231
|
-
teams:
|
|
12232
|
-
type: array
|
|
12233
|
-
items:
|
|
12234
|
-
type: string
|
|
12235
|
-
description: The ID of the team to be invited
|
|
12236
12302
|
role:
|
|
12237
|
-
description: Role to set
|
|
12303
|
+
description: Role to set.
|
|
12238
12304
|
$ref: "#/components/schemas/MemberRoleOrGuest"
|
|
12305
|
+
anyOf:
|
|
12306
|
+
- type: object
|
|
12307
|
+
properties:
|
|
12308
|
+
teams:
|
|
12309
|
+
type: array
|
|
12310
|
+
minItems: 1
|
|
12311
|
+
items:
|
|
12312
|
+
type: string
|
|
12313
|
+
description: The ID of the team to be invited
|
|
12314
|
+
required:
|
|
12315
|
+
- teams
|
|
12316
|
+
- type: object
|
|
12317
|
+
properties:
|
|
12318
|
+
users:
|
|
12319
|
+
type: array
|
|
12320
|
+
minItems: 1
|
|
12321
|
+
items:
|
|
12322
|
+
type: string
|
|
12323
|
+
description: The ID of the user to be invited
|
|
12324
|
+
required:
|
|
12325
|
+
- users
|
|
12239
12326
|
required:
|
|
12240
|
-
- teams
|
|
12241
12327
|
- role
|
|
12242
12328
|
RevisionPageGroup:
|
|
12243
12329
|
allOf:
|
|
@@ -15482,7 +15568,6 @@ components:
|
|
|
15482
15568
|
- visitor
|
|
15483
15569
|
- url
|
|
15484
15570
|
- referrer
|
|
15485
|
-
- spaceId
|
|
15486
15571
|
SpaceContentUpdatedEvent:
|
|
15487
15572
|
allOf:
|
|
15488
15573
|
- $ref: "#/components/schemas/SpaceEvent"
|
|
@@ -16829,11 +16914,17 @@ components:
|
|
|
16829
16914
|
type: string
|
|
16830
16915
|
description: Custom hostname for the site, for e.g. docs.mycompany.com
|
|
16831
16916
|
pattern: ^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?[.]){2,}[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
|
|
16917
|
+
maxLength: 512
|
|
16832
16918
|
SiteBasename:
|
|
16833
16919
|
type: string
|
|
16834
16920
|
description: Basename for the site. For e.g. api
|
|
16835
16921
|
minLength: 1
|
|
16836
16922
|
maxLength: 100
|
|
16923
|
+
SiteProxy:
|
|
16924
|
+
type: string
|
|
16925
|
+
description: Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.
|
|
16926
|
+
pattern: ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
|
|
16927
|
+
maxLength: 512
|
|
16837
16928
|
SiteVisibility:
|
|
16838
16929
|
type: string
|
|
16839
16930
|
description: |
|
|
@@ -16929,6 +17020,8 @@ components:
|
|
|
16929
17020
|
$ref: "#/components/schemas/SiteHostname"
|
|
16930
17021
|
basename:
|
|
16931
17022
|
$ref: "#/components/schemas/SiteBasename"
|
|
17023
|
+
proxy:
|
|
17024
|
+
$ref: "#/components/schemas/SiteProxy"
|
|
16932
17025
|
visibility:
|
|
16933
17026
|
$ref: "#/components/schemas/SiteVisibility"
|
|
16934
17027
|
published:
|
|
@@ -18679,6 +18772,211 @@ components:
|
|
|
18679
18772
|
type: string
|
|
18680
18773
|
required:
|
|
18681
18774
|
- siteSpaceId
|
|
18775
|
+
SiteInsightsEventSession:
|
|
18776
|
+
type: object
|
|
18777
|
+
description: Analytics info on the GitBook's site session.
|
|
18778
|
+
properties:
|
|
18779
|
+
visitorId:
|
|
18780
|
+
type: string
|
|
18781
|
+
description: GitBook's unique identifier of the visitor.
|
|
18782
|
+
sessionId:
|
|
18783
|
+
type: string
|
|
18784
|
+
description: GitBook's unique identifier of the visitor's session.
|
|
18785
|
+
cookies:
|
|
18786
|
+
type: object
|
|
18787
|
+
description: The visitors cookies.
|
|
18788
|
+
additionalProperties:
|
|
18789
|
+
type: string
|
|
18790
|
+
ip:
|
|
18791
|
+
type: string
|
|
18792
|
+
description: |
|
|
18793
|
+
IP address of the visitor.
|
|
18794
|
+
If not defined, it'll default to the IP executing the request.
|
|
18795
|
+
userAgent:
|
|
18796
|
+
type: string
|
|
18797
|
+
description: |
|
|
18798
|
+
User-agent of the visitor.
|
|
18799
|
+
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
|
|
18800
|
+
language:
|
|
18801
|
+
type: string
|
|
18802
|
+
nullable: true
|
|
18803
|
+
description: |
|
|
18804
|
+
Language of the visitor.
|
|
18805
|
+
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
|
|
18806
|
+
referrer:
|
|
18807
|
+
description: Referrer of the sesion
|
|
18808
|
+
oneOf:
|
|
18809
|
+
- type: string
|
|
18810
|
+
nullable: true
|
|
18811
|
+
enum:
|
|
18812
|
+
- null
|
|
18813
|
+
- $ref: "#/components/schemas/URL"
|
|
18814
|
+
required:
|
|
18815
|
+
- visitorId
|
|
18816
|
+
- sessionId
|
|
18817
|
+
- cookies
|
|
18818
|
+
- userAgent
|
|
18819
|
+
- language
|
|
18820
|
+
- referrer
|
|
18821
|
+
SiteInsightsEventLocation:
|
|
18822
|
+
type: object
|
|
18823
|
+
description: Location of the event.
|
|
18824
|
+
properties:
|
|
18825
|
+
url:
|
|
18826
|
+
description: URL of the location.
|
|
18827
|
+
$ref: "#/components/schemas/URL"
|
|
18828
|
+
siteSection:
|
|
18829
|
+
type: string
|
|
18830
|
+
description: ID of the concerned site section.
|
|
18831
|
+
nullable: true
|
|
18832
|
+
siteSpace:
|
|
18833
|
+
type: string
|
|
18834
|
+
description: ID of the concerned site space.
|
|
18835
|
+
nullable: true
|
|
18836
|
+
siteShareKey:
|
|
18837
|
+
type: string
|
|
18838
|
+
description: ID of the concerned site share key.
|
|
18839
|
+
nullable: true
|
|
18840
|
+
space:
|
|
18841
|
+
type: string
|
|
18842
|
+
description: ID of the concerned space.
|
|
18843
|
+
nullable: true
|
|
18844
|
+
revision:
|
|
18845
|
+
type: string
|
|
18846
|
+
description: ID of the concerned revision.
|
|
18847
|
+
nullable: true
|
|
18848
|
+
page:
|
|
18849
|
+
type: string
|
|
18850
|
+
description: ID of the concerned page.
|
|
18851
|
+
nullable: true
|
|
18852
|
+
required:
|
|
18853
|
+
- url
|
|
18854
|
+
- siteSection
|
|
18855
|
+
- siteSpace
|
|
18856
|
+
- siteShareKey
|
|
18857
|
+
- page
|
|
18858
|
+
- space
|
|
18859
|
+
- revision
|
|
18860
|
+
SiteInsightsEventBase:
|
|
18861
|
+
type: object
|
|
18862
|
+
properties:
|
|
18863
|
+
session:
|
|
18864
|
+
$ref: "#/components/schemas/SiteInsightsEventSession"
|
|
18865
|
+
location:
|
|
18866
|
+
$ref: "#/components/schemas/SiteInsightsEventLocation"
|
|
18867
|
+
timestamp:
|
|
18868
|
+
description: Optional timestamp of the event. If not provided, the current timestamp will be used.
|
|
18869
|
+
$ref: "#/components/schemas/Timestamp"
|
|
18870
|
+
required:
|
|
18871
|
+
- session
|
|
18872
|
+
- location
|
|
18873
|
+
SiteInsightsEventPageView:
|
|
18874
|
+
allOf:
|
|
18875
|
+
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
18876
|
+
- type: object
|
|
18877
|
+
properties:
|
|
18878
|
+
type:
|
|
18879
|
+
type: string
|
|
18880
|
+
enum:
|
|
18881
|
+
- page_view
|
|
18882
|
+
required:
|
|
18883
|
+
- type
|
|
18884
|
+
SiteInsightsEventSearchOpen:
|
|
18885
|
+
allOf:
|
|
18886
|
+
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
18887
|
+
- type: object
|
|
18888
|
+
properties:
|
|
18889
|
+
type:
|
|
18890
|
+
type: string
|
|
18891
|
+
enum:
|
|
18892
|
+
- search_open
|
|
18893
|
+
required:
|
|
18894
|
+
- type
|
|
18895
|
+
SiteInsightsEventSearchTypeQuery:
|
|
18896
|
+
allOf:
|
|
18897
|
+
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
18898
|
+
- type: object
|
|
18899
|
+
properties:
|
|
18900
|
+
type:
|
|
18901
|
+
type: string
|
|
18902
|
+
enum:
|
|
18903
|
+
- search_type_query
|
|
18904
|
+
query:
|
|
18905
|
+
type: string
|
|
18906
|
+
description: Query of the search.
|
|
18907
|
+
required:
|
|
18908
|
+
- type
|
|
18909
|
+
- query
|
|
18910
|
+
SiteInsightsEventSearchOpenResult:
|
|
18911
|
+
allOf:
|
|
18912
|
+
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
18913
|
+
- type: object
|
|
18914
|
+
properties:
|
|
18915
|
+
type:
|
|
18916
|
+
type: string
|
|
18917
|
+
enum:
|
|
18918
|
+
- search_open_result
|
|
18919
|
+
query:
|
|
18920
|
+
type: string
|
|
18921
|
+
description: Query of the search.
|
|
18922
|
+
result:
|
|
18923
|
+
type: object
|
|
18924
|
+
properties:
|
|
18925
|
+
spaceId:
|
|
18926
|
+
type: string
|
|
18927
|
+
description: ID of the concerned space.
|
|
18928
|
+
pageId:
|
|
18929
|
+
type: string
|
|
18930
|
+
description: ID of the concerned page.
|
|
18931
|
+
required:
|
|
18932
|
+
- spaceId
|
|
18933
|
+
- pageId
|
|
18934
|
+
required:
|
|
18935
|
+
- type
|
|
18936
|
+
- query
|
|
18937
|
+
- result
|
|
18938
|
+
SiteInsightsEventPagePostFeedback:
|
|
18939
|
+
allOf:
|
|
18940
|
+
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
18941
|
+
- type: object
|
|
18942
|
+
properties:
|
|
18943
|
+
type:
|
|
18944
|
+
type: string
|
|
18945
|
+
enum:
|
|
18946
|
+
- page_post_feedback
|
|
18947
|
+
feedback:
|
|
18948
|
+
type: object
|
|
18949
|
+
properties:
|
|
18950
|
+
rating:
|
|
18951
|
+
$ref: "#/components/schemas/PageFeedbackRating"
|
|
18952
|
+
required:
|
|
18953
|
+
- rating
|
|
18954
|
+
required:
|
|
18955
|
+
- type
|
|
18956
|
+
- feedback
|
|
18957
|
+
SiteInsightsEventAskQuestion:
|
|
18958
|
+
allOf:
|
|
18959
|
+
- $ref: "#/components/schemas/SiteInsightsEventBase"
|
|
18960
|
+
- type: object
|
|
18961
|
+
properties:
|
|
18962
|
+
type:
|
|
18963
|
+
type: string
|
|
18964
|
+
enum:
|
|
18965
|
+
- ask_question
|
|
18966
|
+
query:
|
|
18967
|
+
type: string
|
|
18968
|
+
description: Question being asked.
|
|
18969
|
+
required:
|
|
18970
|
+
- type
|
|
18971
|
+
- query
|
|
18972
|
+
SiteInsightsEvent:
|
|
18973
|
+
oneOf:
|
|
18974
|
+
- $ref: "#/components/schemas/SiteInsightsEventPageView"
|
|
18975
|
+
- $ref: "#/components/schemas/SiteInsightsEventSearchOpen"
|
|
18976
|
+
- $ref: "#/components/schemas/SiteInsightsEventSearchTypeQuery"
|
|
18977
|
+
- $ref: "#/components/schemas/SiteInsightsEventSearchOpenResult"
|
|
18978
|
+
- $ref: "#/components/schemas/SiteInsightsEventPagePostFeedback"
|
|
18979
|
+
- $ref: "#/components/schemas/SiteInsightsEventAskQuestion"
|
|
18682
18980
|
InsightsInterval:
|
|
18683
18981
|
type: string
|
|
18684
18982
|
description: The interval for grouping the results
|