@gitbook/api 0.16.0 → 0.18.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/GitBookAPIError.d.ts +18 -0
- package/dist/client.d.ts +81 -12
- package/dist/index.cjs +49 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +46 -6
- package/package.json +1 -1
- package/spec/openapi.json +246 -28
- package/spec/openapi.yaml +150 -18
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when the GitBook API returns an error.
|
|
3
|
+
*/
|
|
4
|
+
export declare class GitBookAPIError extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* The response that caused the error.
|
|
7
|
+
*/
|
|
8
|
+
readonly response: Response;
|
|
9
|
+
/**
|
|
10
|
+
* Name of the error type.
|
|
11
|
+
*/
|
|
12
|
+
readonly name = "GitBookAPIError";
|
|
13
|
+
/**
|
|
14
|
+
* The HTTP status code of the response.
|
|
15
|
+
*/
|
|
16
|
+
readonly code: number;
|
|
17
|
+
constructor(errorMessage: string, response: Response);
|
|
18
|
+
}
|
package/dist/client.d.ts
CHANGED
|
@@ -983,8 +983,10 @@ export declare type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
983
983
|
slug: string;
|
|
984
984
|
path: string;
|
|
985
985
|
description?: string;
|
|
986
|
+
documentId?: string;
|
|
986
987
|
pages: (RevisionPageDocument | RevisionPageLink)[];
|
|
987
988
|
git?: GitSyncBlob;
|
|
989
|
+
layout: RevisionPageLayoutOptions;
|
|
988
990
|
};
|
|
989
991
|
export interface RevisionPageDocumentCover {
|
|
990
992
|
/** Content reference pointing to the source image. */
|
|
@@ -1369,8 +1371,8 @@ export interface OrganizationTeam {
|
|
|
1369
1371
|
object: 'team';
|
|
1370
1372
|
/** Unique identifier for the team. */
|
|
1371
1373
|
id: string;
|
|
1372
|
-
/** Title of the team
|
|
1373
|
-
title:
|
|
1374
|
+
/** Title of the team */
|
|
1375
|
+
title: OrganizationTeamTitle;
|
|
1374
1376
|
/** Count of members in this team. */
|
|
1375
1377
|
members: number;
|
|
1376
1378
|
/** Count of spaces this team has access to. */
|
|
@@ -1378,6 +1380,10 @@ export interface OrganizationTeam {
|
|
|
1378
1380
|
/** Date at which the team was created. */
|
|
1379
1381
|
createdAt: Date;
|
|
1380
1382
|
}
|
|
1383
|
+
/**
|
|
1384
|
+
* Title of the team
|
|
1385
|
+
*/
|
|
1386
|
+
export declare type OrganizationTeamTitle = string;
|
|
1381
1387
|
export interface TeamMember {
|
|
1382
1388
|
/**
|
|
1383
1389
|
* "The role of a team member.
|
|
@@ -1539,11 +1545,17 @@ export interface ContentAuditRelation {
|
|
|
1539
1545
|
/**
|
|
1540
1546
|
* The type of the relation between the sources
|
|
1541
1547
|
*/
|
|
1542
|
-
export declare
|
|
1548
|
+
export declare enum ContentAuditRelationType {
|
|
1549
|
+
Contradiction = "contradiction",
|
|
1550
|
+
Duplicate = "duplicate"
|
|
1551
|
+
}
|
|
1543
1552
|
/**
|
|
1544
1553
|
* Status of the audit relation to filter on
|
|
1545
1554
|
*/
|
|
1546
|
-
export declare
|
|
1555
|
+
export declare enum ContentAuditRelationStatus {
|
|
1556
|
+
Pending = "pending",
|
|
1557
|
+
Rejected = "rejected"
|
|
1558
|
+
}
|
|
1547
1559
|
export interface ContentAuditRelationStatusUpdate {
|
|
1548
1560
|
/** Status of the audit relation to filter on */
|
|
1549
1561
|
status: ContentAuditRelationStatus;
|
|
@@ -3040,7 +3052,10 @@ export interface ContentKitURL {
|
|
|
3040
3052
|
/**
|
|
3041
3053
|
* Channel to subscribe to for API updates.
|
|
3042
3054
|
*/
|
|
3043
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel |
|
|
3055
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel | {
|
|
3056
|
+
channel: 'organization';
|
|
3057
|
+
organization: string;
|
|
3058
|
+
} | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
|
|
3044
3059
|
channel: 'space-comments';
|
|
3045
3060
|
space: string;
|
|
3046
3061
|
changeRequest?: string;
|
|
@@ -3097,6 +3112,10 @@ export interface UserAPITokensChannel {
|
|
|
3097
3112
|
channel: 'user-api-tokens';
|
|
3098
3113
|
user: string;
|
|
3099
3114
|
}
|
|
3115
|
+
export interface UserOrganizationsChannel {
|
|
3116
|
+
channel: 'user-organizations';
|
|
3117
|
+
user: string;
|
|
3118
|
+
}
|
|
3100
3119
|
export interface UserProfileChannel {
|
|
3101
3120
|
channel: 'user-profile';
|
|
3102
3121
|
user: string;
|
|
@@ -3328,6 +3347,7 @@ export declare enum CustomizationLocale {
|
|
|
3328
3347
|
Ja = "ja"
|
|
3329
3348
|
}
|
|
3330
3349
|
export declare enum CustomizationFont {
|
|
3350
|
+
ABCFavorit = "ABCFavorit",
|
|
3331
3351
|
Inter = "Inter",
|
|
3332
3352
|
Roboto = "Roboto",
|
|
3333
3353
|
RobotoSlab = "RobotoSlab",
|
|
@@ -3729,7 +3749,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3729
3749
|
* @secure
|
|
3730
3750
|
*/
|
|
3731
3751
|
listPages: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
3732
|
-
pages
|
|
3752
|
+
pages: RevisionPage[];
|
|
3733
3753
|
}, Error>>;
|
|
3734
3754
|
/**
|
|
3735
3755
|
* No description
|
|
@@ -3785,6 +3805,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3785
3805
|
getPageByPath: (spaceId: string, pagePath: string, query?: {
|
|
3786
3806
|
format?: 'document' | 'markdown';
|
|
3787
3807
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
3808
|
+
/**
|
|
3809
|
+
* No description
|
|
3810
|
+
*
|
|
3811
|
+
* @name GetDocumentById
|
|
3812
|
+
* @summary Get a document by its ID in a space.
|
|
3813
|
+
* @request GET:/spaces/{spaceId}/documents/{documentId}
|
|
3814
|
+
* @secure
|
|
3815
|
+
*/
|
|
3816
|
+
getDocumentById: (spaceId: string, documentId: string, params?: RequestParams) => Promise<HttpResponse<JSONDocument, Error>>;
|
|
3788
3817
|
/**
|
|
3789
3818
|
* No description
|
|
3790
3819
|
*
|
|
@@ -4081,7 +4110,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4081
4110
|
* @secure
|
|
4082
4111
|
*/
|
|
4083
4112
|
listPagesInChangeRequest: (spaceId: string, changeRequestId: string | number, params?: RequestParams) => Promise<HttpResponse<{
|
|
4084
|
-
pages
|
|
4113
|
+
pages: RevisionPage[];
|
|
4085
4114
|
}, Error>>;
|
|
4086
4115
|
/**
|
|
4087
4116
|
* No description
|
|
@@ -4170,7 +4199,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4170
4199
|
* @secure
|
|
4171
4200
|
*/
|
|
4172
4201
|
listPagesInRevisionById: (spaceId: string, revisionId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
4173
|
-
pages
|
|
4202
|
+
pages: RevisionPage[];
|
|
4174
4203
|
}, Error>>;
|
|
4175
4204
|
/**
|
|
4176
4205
|
* No description
|
|
@@ -4924,7 +4953,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4924
4953
|
* @request GET:/orgs/{organizationId}
|
|
4925
4954
|
* @secure
|
|
4926
4955
|
*/
|
|
4927
|
-
getOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<Organization, Error
|
|
4956
|
+
getOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<Organization, Error | {
|
|
4957
|
+
error: {
|
|
4958
|
+
code: 404;
|
|
4959
|
+
message: string;
|
|
4960
|
+
};
|
|
4961
|
+
}>>;
|
|
4962
|
+
/**
|
|
4963
|
+
* No description
|
|
4964
|
+
*
|
|
4965
|
+
* @tags organizations
|
|
4966
|
+
* @name DeleteOrganizationById
|
|
4967
|
+
* @summary Delete an organization by its ID
|
|
4968
|
+
* @request DELETE:/orgs/{organizationId}
|
|
4969
|
+
* @secure
|
|
4970
|
+
*/
|
|
4971
|
+
deleteOrganizationById: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
|
|
4972
|
+
error: {
|
|
4973
|
+
code: 404;
|
|
4974
|
+
message: string;
|
|
4975
|
+
};
|
|
4976
|
+
}>>;
|
|
4928
4977
|
/**
|
|
4929
4978
|
* @description Lists members for the specified organization.
|
|
4930
4979
|
*
|
|
@@ -5040,6 +5089,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5040
5089
|
listTeamsInOrganizationById: (organizationId: string, query?: {
|
|
5041
5090
|
page?: string;
|
|
5042
5091
|
limit?: number;
|
|
5092
|
+
owner?: string;
|
|
5043
5093
|
title?: string;
|
|
5044
5094
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5045
5095
|
items: OrganizationTeam[];
|
|
@@ -5054,7 +5104,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5054
5104
|
* @secure
|
|
5055
5105
|
*/
|
|
5056
5106
|
createOrganizationTeam: (organizationId: string, data: {
|
|
5057
|
-
title:
|
|
5107
|
+
title: OrganizationTeamTitle;
|
|
5058
5108
|
members?: string[];
|
|
5059
5109
|
}, params?: RequestParams) => Promise<HttpResponse<OrganizationTeam, Error>>;
|
|
5060
5110
|
/**
|
|
@@ -5077,7 +5127,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5077
5127
|
* @secure
|
|
5078
5128
|
*/
|
|
5079
5129
|
updateTeamInOrganizationById: (organizationId: string, teamId: string, data: {
|
|
5080
|
-
title:
|
|
5130
|
+
title: OrganizationTeamTitle;
|
|
5081
5131
|
}, params?: RequestParams) => Promise<HttpResponse<OrganizationTeam, Error>>;
|
|
5082
5132
|
/**
|
|
5083
5133
|
* @description Deletes a specific team in an organization
|
|
@@ -5433,6 +5483,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5433
5483
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5434
5484
|
items: Integration[];
|
|
5435
5485
|
}, Error>>;
|
|
5486
|
+
/**
|
|
5487
|
+
* No description
|
|
5488
|
+
*
|
|
5489
|
+
* @tags integrations
|
|
5490
|
+
* @name GetOrganizationIntegrationStatus
|
|
5491
|
+
* @summary Get the status of an integration installation in an organization
|
|
5492
|
+
* @request GET:/orgs/{organizationId}/integrations/{integrationName}/installation_status
|
|
5493
|
+
* @secure
|
|
5494
|
+
*/
|
|
5495
|
+
getOrganizationIntegrationStatus: (organizationId: string, integrationName: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
5496
|
+
status: IntegrationInstallationStatus;
|
|
5497
|
+
}, Error | {
|
|
5498
|
+
error: {
|
|
5499
|
+
code: 404;
|
|
5500
|
+
message: string;
|
|
5501
|
+
};
|
|
5502
|
+
}>>;
|
|
5436
5503
|
/**
|
|
5437
5504
|
* No description
|
|
5438
5505
|
*
|
|
@@ -5712,7 +5779,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5712
5779
|
listContentAuditRelations: (organizationId: string, query?: {
|
|
5713
5780
|
page?: string;
|
|
5714
5781
|
limit?: number;
|
|
5715
|
-
status?: ContentAuditRelationStatus;
|
|
5782
|
+
status?: ContentAuditRelationStatus | 'all';
|
|
5783
|
+
space?: string;
|
|
5784
|
+
type?: ContentAuditRelationType | 'all';
|
|
5716
5785
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5717
5786
|
items: ContentAuditRelation[];
|
|
5718
5787
|
}, Error>>;
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,8 @@ __export(src_exports, {
|
|
|
30
30
|
CloudflareHostnameStatus: () => CloudflareHostnameStatus,
|
|
31
31
|
CloudflareHostnameTLSStatus: () => CloudflareHostnameTLSStatus,
|
|
32
32
|
CloudflareHostnameTLSValidationMethod: () => CloudflareHostnameTLSValidationMethod,
|
|
33
|
+
ContentAuditRelationStatus: () => ContentAuditRelationStatus,
|
|
34
|
+
ContentAuditRelationType: () => ContentAuditRelationType,
|
|
33
35
|
ContentKitIcon: () => ContentKitIcon,
|
|
34
36
|
ContentType: () => ContentType,
|
|
35
37
|
ContentVisibility: () => ContentVisibility,
|
|
@@ -41,6 +43,7 @@ __export(src_exports, {
|
|
|
41
43
|
CustomizationThemeMode: () => CustomizationThemeMode,
|
|
42
44
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
43
45
|
GitBookAPI: () => GitBookAPI,
|
|
46
|
+
GitBookAPIError: () => GitBookAPIError,
|
|
44
47
|
GitSyncOperationState: () => GitSyncOperationState,
|
|
45
48
|
HttpClient: () => HttpClient,
|
|
46
49
|
ImportContentSource: () => ImportContentSource,
|
|
@@ -156,6 +159,16 @@ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
|
|
|
156
159
|
TeamMemberRole2["Member"] = "member";
|
|
157
160
|
return TeamMemberRole2;
|
|
158
161
|
})(TeamMemberRole || {});
|
|
162
|
+
var ContentAuditRelationType = /* @__PURE__ */ ((ContentAuditRelationType2) => {
|
|
163
|
+
ContentAuditRelationType2["Contradiction"] = "contradiction";
|
|
164
|
+
ContentAuditRelationType2["Duplicate"] = "duplicate";
|
|
165
|
+
return ContentAuditRelationType2;
|
|
166
|
+
})(ContentAuditRelationType || {});
|
|
167
|
+
var ContentAuditRelationStatus = /* @__PURE__ */ ((ContentAuditRelationStatus2) => {
|
|
168
|
+
ContentAuditRelationStatus2["Pending"] = "pending";
|
|
169
|
+
ContentAuditRelationStatus2["Rejected"] = "rejected";
|
|
170
|
+
return ContentAuditRelationStatus2;
|
|
171
|
+
})(ContentAuditRelationStatus || {});
|
|
159
172
|
var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
|
|
160
173
|
ChangeRequestStatus2["Draft"] = "draft";
|
|
161
174
|
ChangeRequestStatus2["Open"] = "open";
|
|
@@ -315,6 +328,7 @@ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
|
|
|
315
328
|
return CustomizationLocale2;
|
|
316
329
|
})(CustomizationLocale || {});
|
|
317
330
|
var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
|
|
331
|
+
CustomizationFont2["ABCFavorit"] = "ABCFavorit";
|
|
318
332
|
CustomizationFont2["Inter"] = "Inter";
|
|
319
333
|
CustomizationFont2["Roboto"] = "Roboto";
|
|
320
334
|
CustomizationFont2["RobotoSlab"] = "RobotoSlab";
|
|
@@ -734,6 +748,13 @@ var Api = class extends HttpClient {
|
|
|
734
748
|
format: "json",
|
|
735
749
|
...params
|
|
736
750
|
}),
|
|
751
|
+
getDocumentById: (spaceId, documentId, params = {}) => this.request({
|
|
752
|
+
path: `/spaces/${spaceId}/documents/${documentId}`,
|
|
753
|
+
method: "GET",
|
|
754
|
+
secure: true,
|
|
755
|
+
format: "json",
|
|
756
|
+
...params
|
|
757
|
+
}),
|
|
737
758
|
createChangeRequest: (spaceId, data, params = {}) => this.request({
|
|
738
759
|
path: `/spaces/${spaceId}/change-requests`,
|
|
739
760
|
method: "POST",
|
|
@@ -1425,6 +1446,12 @@ var Api = class extends HttpClient {
|
|
|
1425
1446
|
format: "json",
|
|
1426
1447
|
...params
|
|
1427
1448
|
}),
|
|
1449
|
+
deleteOrganizationById: (organizationId, params = {}) => this.request({
|
|
1450
|
+
path: `/orgs/${organizationId}`,
|
|
1451
|
+
method: "DELETE",
|
|
1452
|
+
secure: true,
|
|
1453
|
+
...params
|
|
1454
|
+
}),
|
|
1428
1455
|
listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
|
|
1429
1456
|
path: `/orgs/${organizationId}/members`,
|
|
1430
1457
|
method: "GET",
|
|
@@ -1723,6 +1750,13 @@ var Api = class extends HttpClient {
|
|
|
1723
1750
|
format: "json",
|
|
1724
1751
|
...params
|
|
1725
1752
|
}),
|
|
1753
|
+
getOrganizationIntegrationStatus: (organizationId, integrationName, params = {}) => this.request({
|
|
1754
|
+
path: `/orgs/${organizationId}/integrations/${integrationName}/installation_status`,
|
|
1755
|
+
method: "GET",
|
|
1756
|
+
secure: true,
|
|
1757
|
+
format: "json",
|
|
1758
|
+
...params
|
|
1759
|
+
}),
|
|
1726
1760
|
listOrganizationInstallations: (organizationId, query, params = {}) => this.request({
|
|
1727
1761
|
path: `/orgs/${organizationId}/installations`,
|
|
1728
1762
|
method: "GET",
|
|
@@ -1956,6 +1990,17 @@ var Api = class extends HttpClient {
|
|
|
1956
1990
|
}
|
|
1957
1991
|
};
|
|
1958
1992
|
|
|
1993
|
+
// src/GitBookAPIError.ts
|
|
1994
|
+
var GitBookAPIError = class extends Error {
|
|
1995
|
+
constructor(errorMessage, response) {
|
|
1996
|
+
const message = `GitBook API failed with [${response.status}] ${response.url}: ${errorMessage}`;
|
|
1997
|
+
super(message);
|
|
1998
|
+
this.name = "GitBookAPIError";
|
|
1999
|
+
this.response = response;
|
|
2000
|
+
this.code = response.status;
|
|
2001
|
+
}
|
|
2002
|
+
};
|
|
2003
|
+
|
|
1959
2004
|
// src/index.ts
|
|
1960
2005
|
var GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
|
|
1961
2006
|
var GitBookAPI = class extends Api {
|
|
@@ -1987,13 +2032,8 @@ var GitBookAPI = class extends Api {
|
|
|
1987
2032
|
const body = await response.json();
|
|
1988
2033
|
error = body?.error?.message || error;
|
|
1989
2034
|
} catch (err) {
|
|
1990
|
-
response.headers.forEach((value, key) => {
|
|
1991
|
-
error += `${key}:${value} `;
|
|
1992
|
-
});
|
|
1993
2035
|
}
|
|
1994
|
-
throw new
|
|
1995
|
-
`GitBook API failed with [${response.status}] ${response.url}: ${error}`
|
|
1996
|
-
);
|
|
2036
|
+
throw new GitBookAPIError(error, response);
|
|
1997
2037
|
}
|
|
1998
2038
|
return response;
|
|
1999
2039
|
}
|
|
@@ -2025,6 +2065,8 @@ var GitBookAPI = class extends Api {
|
|
|
2025
2065
|
CloudflareHostnameStatus,
|
|
2026
2066
|
CloudflareHostnameTLSStatus,
|
|
2027
2067
|
CloudflareHostnameTLSValidationMethod,
|
|
2068
|
+
ContentAuditRelationStatus,
|
|
2069
|
+
ContentAuditRelationType,
|
|
2028
2070
|
ContentKitIcon,
|
|
2029
2071
|
ContentType,
|
|
2030
2072
|
ContentVisibility,
|
|
@@ -2036,6 +2078,7 @@ var GitBookAPI = class extends Api {
|
|
|
2036
2078
|
CustomizationThemeMode,
|
|
2037
2079
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
2038
2080
|
GitBookAPI,
|
|
2081
|
+
GitBookAPIError,
|
|
2039
2082
|
GitSyncOperationState,
|
|
2040
2083
|
HttpClient,
|
|
2041
2084
|
ImportContentSource,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Api } from './client';
|
|
2
|
+
import { GitBookAPIError } from './GitBookAPIError';
|
|
2
3
|
export * from './client';
|
|
4
|
+
export { GitBookAPIError };
|
|
3
5
|
export declare const GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
|
|
4
6
|
export declare class GitBookAPI extends Api<{
|
|
5
7
|
authToken?: string;
|
package/dist/index.js
CHANGED
|
@@ -91,6 +91,16 @@ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
|
|
|
91
91
|
TeamMemberRole2["Member"] = "member";
|
|
92
92
|
return TeamMemberRole2;
|
|
93
93
|
})(TeamMemberRole || {});
|
|
94
|
+
var ContentAuditRelationType = /* @__PURE__ */ ((ContentAuditRelationType2) => {
|
|
95
|
+
ContentAuditRelationType2["Contradiction"] = "contradiction";
|
|
96
|
+
ContentAuditRelationType2["Duplicate"] = "duplicate";
|
|
97
|
+
return ContentAuditRelationType2;
|
|
98
|
+
})(ContentAuditRelationType || {});
|
|
99
|
+
var ContentAuditRelationStatus = /* @__PURE__ */ ((ContentAuditRelationStatus2) => {
|
|
100
|
+
ContentAuditRelationStatus2["Pending"] = "pending";
|
|
101
|
+
ContentAuditRelationStatus2["Rejected"] = "rejected";
|
|
102
|
+
return ContentAuditRelationStatus2;
|
|
103
|
+
})(ContentAuditRelationStatus || {});
|
|
94
104
|
var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
|
|
95
105
|
ChangeRequestStatus2["Draft"] = "draft";
|
|
96
106
|
ChangeRequestStatus2["Open"] = "open";
|
|
@@ -250,6 +260,7 @@ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
|
|
|
250
260
|
return CustomizationLocale2;
|
|
251
261
|
})(CustomizationLocale || {});
|
|
252
262
|
var CustomizationFont = /* @__PURE__ */ ((CustomizationFont2) => {
|
|
263
|
+
CustomizationFont2["ABCFavorit"] = "ABCFavorit";
|
|
253
264
|
CustomizationFont2["Inter"] = "Inter";
|
|
254
265
|
CustomizationFont2["Roboto"] = "Roboto";
|
|
255
266
|
CustomizationFont2["RobotoSlab"] = "RobotoSlab";
|
|
@@ -669,6 +680,13 @@ var Api = class extends HttpClient {
|
|
|
669
680
|
format: "json",
|
|
670
681
|
...params
|
|
671
682
|
}),
|
|
683
|
+
getDocumentById: (spaceId, documentId, params = {}) => this.request({
|
|
684
|
+
path: `/spaces/${spaceId}/documents/${documentId}`,
|
|
685
|
+
method: "GET",
|
|
686
|
+
secure: true,
|
|
687
|
+
format: "json",
|
|
688
|
+
...params
|
|
689
|
+
}),
|
|
672
690
|
createChangeRequest: (spaceId, data, params = {}) => this.request({
|
|
673
691
|
path: `/spaces/${spaceId}/change-requests`,
|
|
674
692
|
method: "POST",
|
|
@@ -1360,6 +1378,12 @@ var Api = class extends HttpClient {
|
|
|
1360
1378
|
format: "json",
|
|
1361
1379
|
...params
|
|
1362
1380
|
}),
|
|
1381
|
+
deleteOrganizationById: (organizationId, params = {}) => this.request({
|
|
1382
|
+
path: `/orgs/${organizationId}`,
|
|
1383
|
+
method: "DELETE",
|
|
1384
|
+
secure: true,
|
|
1385
|
+
...params
|
|
1386
|
+
}),
|
|
1363
1387
|
listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
|
|
1364
1388
|
path: `/orgs/${organizationId}/members`,
|
|
1365
1389
|
method: "GET",
|
|
@@ -1658,6 +1682,13 @@ var Api = class extends HttpClient {
|
|
|
1658
1682
|
format: "json",
|
|
1659
1683
|
...params
|
|
1660
1684
|
}),
|
|
1685
|
+
getOrganizationIntegrationStatus: (organizationId, integrationName, params = {}) => this.request({
|
|
1686
|
+
path: `/orgs/${organizationId}/integrations/${integrationName}/installation_status`,
|
|
1687
|
+
method: "GET",
|
|
1688
|
+
secure: true,
|
|
1689
|
+
format: "json",
|
|
1690
|
+
...params
|
|
1691
|
+
}),
|
|
1661
1692
|
listOrganizationInstallations: (organizationId, query, params = {}) => this.request({
|
|
1662
1693
|
path: `/orgs/${organizationId}/installations`,
|
|
1663
1694
|
method: "GET",
|
|
@@ -1891,6 +1922,17 @@ var Api = class extends HttpClient {
|
|
|
1891
1922
|
}
|
|
1892
1923
|
};
|
|
1893
1924
|
|
|
1925
|
+
// src/GitBookAPIError.ts
|
|
1926
|
+
var GitBookAPIError = class extends Error {
|
|
1927
|
+
constructor(errorMessage, response) {
|
|
1928
|
+
const message = `GitBook API failed with [${response.status}] ${response.url}: ${errorMessage}`;
|
|
1929
|
+
super(message);
|
|
1930
|
+
this.name = "GitBookAPIError";
|
|
1931
|
+
this.response = response;
|
|
1932
|
+
this.code = response.status;
|
|
1933
|
+
}
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1894
1936
|
// src/index.ts
|
|
1895
1937
|
var GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
|
|
1896
1938
|
var GitBookAPI = class extends Api {
|
|
@@ -1922,13 +1964,8 @@ var GitBookAPI = class extends Api {
|
|
|
1922
1964
|
const body = await response.json();
|
|
1923
1965
|
error = body?.error?.message || error;
|
|
1924
1966
|
} catch (err) {
|
|
1925
|
-
response.headers.forEach((value, key) => {
|
|
1926
|
-
error += `${key}:${value} `;
|
|
1927
|
-
});
|
|
1928
1967
|
}
|
|
1929
|
-
throw new
|
|
1930
|
-
`GitBook API failed with [${response.status}] ${response.url}: ${error}`
|
|
1931
|
-
);
|
|
1968
|
+
throw new GitBookAPIError(error, response);
|
|
1932
1969
|
}
|
|
1933
1970
|
return response;
|
|
1934
1971
|
}
|
|
@@ -1959,6 +1996,8 @@ export {
|
|
|
1959
1996
|
CloudflareHostnameStatus,
|
|
1960
1997
|
CloudflareHostnameTLSStatus,
|
|
1961
1998
|
CloudflareHostnameTLSValidationMethod,
|
|
1999
|
+
ContentAuditRelationStatus,
|
|
2000
|
+
ContentAuditRelationType,
|
|
1962
2001
|
ContentKitIcon,
|
|
1963
2002
|
ContentType,
|
|
1964
2003
|
ContentVisibility,
|
|
@@ -1970,6 +2009,7 @@ export {
|
|
|
1970
2009
|
CustomizationThemeMode,
|
|
1971
2010
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
1972
2011
|
GitBookAPI,
|
|
2012
|
+
GitBookAPIError,
|
|
1973
2013
|
GitSyncOperationState,
|
|
1974
2014
|
HttpClient,
|
|
1975
2015
|
ImportContentSource,
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -4583,6 +4583,10 @@
|
|
|
4583
4583
|
"description": {
|
|
4584
4584
|
"type": "string"
|
|
4585
4585
|
},
|
|
4586
|
+
"documentId": {
|
|
4587
|
+
"type": "string",
|
|
4588
|
+
"description": "ID of the document with the page body. If undefined, the page is empty."
|
|
4589
|
+
},
|
|
4586
4590
|
"pages": {
|
|
4587
4591
|
"type": "array",
|
|
4588
4592
|
"items": {
|
|
@@ -4598,6 +4602,9 @@
|
|
|
4598
4602
|
},
|
|
4599
4603
|
"git": {
|
|
4600
4604
|
"$ref": "#/components/schemas/GitSyncBlob"
|
|
4605
|
+
},
|
|
4606
|
+
"layout": {
|
|
4607
|
+
"$ref": "#/components/schemas/RevisionPageLayoutOptions"
|
|
4601
4608
|
}
|
|
4602
4609
|
},
|
|
4603
4610
|
"required": [
|
|
@@ -4605,7 +4612,8 @@
|
|
|
4605
4612
|
"type",
|
|
4606
4613
|
"slug",
|
|
4607
4614
|
"path",
|
|
4608
|
-
"pages"
|
|
4615
|
+
"pages",
|
|
4616
|
+
"layout"
|
|
4609
4617
|
]
|
|
4610
4618
|
}
|
|
4611
4619
|
]
|
|
@@ -5702,8 +5710,7 @@
|
|
|
5702
5710
|
"description": "Unique identifier for the team."
|
|
5703
5711
|
},
|
|
5704
5712
|
"title": {
|
|
5705
|
-
"
|
|
5706
|
-
"description": "Title of the team."
|
|
5713
|
+
"$ref": "#/components/schemas/OrganizationTeamTitle"
|
|
5707
5714
|
},
|
|
5708
5715
|
"members": {
|
|
5709
5716
|
"type": "integer",
|
|
@@ -5727,6 +5734,12 @@
|
|
|
5727
5734
|
"createdAt"
|
|
5728
5735
|
]
|
|
5729
5736
|
},
|
|
5737
|
+
"OrganizationTeamTitle": {
|
|
5738
|
+
"type": "string",
|
|
5739
|
+
"description": "Title of the team",
|
|
5740
|
+
"minLength": 1,
|
|
5741
|
+
"maxLength": 64
|
|
5742
|
+
},
|
|
5730
5743
|
"TeamMember": {
|
|
5731
5744
|
"type": "object",
|
|
5732
5745
|
"properties": {
|
|
@@ -6291,26 +6304,18 @@
|
|
|
6291
6304
|
},
|
|
6292
6305
|
"ContentAuditRelationType": {
|
|
6293
6306
|
"description": "The type of the relation between the sources",
|
|
6294
|
-
"
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
"contradiction",
|
|
6299
|
-
"duplicate"
|
|
6300
|
-
]
|
|
6301
|
-
}
|
|
6307
|
+
"type": "string",
|
|
6308
|
+
"enum": [
|
|
6309
|
+
"contradiction",
|
|
6310
|
+
"duplicate"
|
|
6302
6311
|
]
|
|
6303
6312
|
},
|
|
6304
6313
|
"ContentAuditRelationStatus": {
|
|
6305
6314
|
"description": "Status of the audit relation to filter on",
|
|
6306
|
-
"
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
"pending",
|
|
6311
|
-
"rejected"
|
|
6312
|
-
]
|
|
6313
|
-
}
|
|
6315
|
+
"type": "string",
|
|
6316
|
+
"enum": [
|
|
6317
|
+
"pending",
|
|
6318
|
+
"rejected"
|
|
6314
6319
|
]
|
|
6315
6320
|
},
|
|
6316
6321
|
"ContentAuditRelationStatusUpdate": {
|
|
@@ -11123,6 +11128,9 @@
|
|
|
11123
11128
|
{
|
|
11124
11129
|
"$ref": "#/components/schemas/UserAPITokensChannel"
|
|
11125
11130
|
},
|
|
11131
|
+
{
|
|
11132
|
+
"$ref": "#/components/schemas/UserOrganizationsChannel"
|
|
11133
|
+
},
|
|
11126
11134
|
{
|
|
11127
11135
|
"$ref": "#/components/schemas/UserProfileChannel"
|
|
11128
11136
|
},
|
|
@@ -11132,6 +11140,24 @@
|
|
|
11132
11140
|
{
|
|
11133
11141
|
"$ref": "#/components/schemas/CollectionPublishingCustomizationChannel"
|
|
11134
11142
|
},
|
|
11143
|
+
{
|
|
11144
|
+
"type": "object",
|
|
11145
|
+
"properties": {
|
|
11146
|
+
"channel": {
|
|
11147
|
+
"type": "string",
|
|
11148
|
+
"enum": [
|
|
11149
|
+
"organization"
|
|
11150
|
+
]
|
|
11151
|
+
},
|
|
11152
|
+
"organization": {
|
|
11153
|
+
"type": "string"
|
|
11154
|
+
}
|
|
11155
|
+
},
|
|
11156
|
+
"required": [
|
|
11157
|
+
"channel",
|
|
11158
|
+
"organization"
|
|
11159
|
+
]
|
|
11160
|
+
},
|
|
11135
11161
|
{
|
|
11136
11162
|
"$ref": "#/components/schemas/OrganizationMembersChannel"
|
|
11137
11163
|
},
|
|
@@ -11453,6 +11479,24 @@
|
|
|
11453
11479
|
"user"
|
|
11454
11480
|
]
|
|
11455
11481
|
},
|
|
11482
|
+
"UserOrganizationsChannel": {
|
|
11483
|
+
"type": "object",
|
|
11484
|
+
"properties": {
|
|
11485
|
+
"channel": {
|
|
11486
|
+
"type": "string",
|
|
11487
|
+
"enum": [
|
|
11488
|
+
"user-organizations"
|
|
11489
|
+
]
|
|
11490
|
+
},
|
|
11491
|
+
"user": {
|
|
11492
|
+
"type": "string"
|
|
11493
|
+
}
|
|
11494
|
+
},
|
|
11495
|
+
"required": [
|
|
11496
|
+
"channel",
|
|
11497
|
+
"user"
|
|
11498
|
+
]
|
|
11499
|
+
},
|
|
11456
11500
|
"UserProfileChannel": {
|
|
11457
11501
|
"type": "object",
|
|
11458
11502
|
"properties": {
|
|
@@ -12341,6 +12385,7 @@
|
|
|
12341
12385
|
"CustomizationFont": {
|
|
12342
12386
|
"type": "string",
|
|
12343
12387
|
"enum": [
|
|
12388
|
+
"ABCFavorit",
|
|
12344
12389
|
"Inter",
|
|
12345
12390
|
"Roboto",
|
|
12346
12391
|
"RobotoSlab",
|
|
@@ -13525,7 +13570,10 @@
|
|
|
13525
13570
|
"$ref": "#/components/schemas/RevisionPage"
|
|
13526
13571
|
}
|
|
13527
13572
|
}
|
|
13528
|
-
}
|
|
13573
|
+
},
|
|
13574
|
+
"required": [
|
|
13575
|
+
"pages"
|
|
13576
|
+
]
|
|
13529
13577
|
}
|
|
13530
13578
|
}
|
|
13531
13579
|
}
|
|
@@ -13758,6 +13806,46 @@
|
|
|
13758
13806
|
}
|
|
13759
13807
|
}
|
|
13760
13808
|
},
|
|
13809
|
+
"/spaces/{spaceId}/documents/{documentId}": {
|
|
13810
|
+
"get": {
|
|
13811
|
+
"operationId": "getDocumentById",
|
|
13812
|
+
"summary": "Get a document by its ID in a space.",
|
|
13813
|
+
"security": [
|
|
13814
|
+
{
|
|
13815
|
+
"user": []
|
|
13816
|
+
}
|
|
13817
|
+
],
|
|
13818
|
+
"parameters": [
|
|
13819
|
+
{
|
|
13820
|
+
"$ref": "#/components/parameters/spaceId"
|
|
13821
|
+
},
|
|
13822
|
+
{
|
|
13823
|
+
"name": "documentId",
|
|
13824
|
+
"in": "path",
|
|
13825
|
+
"required": true,
|
|
13826
|
+
"description": "ID of the document in the space",
|
|
13827
|
+
"schema": {
|
|
13828
|
+
"type": "string"
|
|
13829
|
+
}
|
|
13830
|
+
}
|
|
13831
|
+
],
|
|
13832
|
+
"responses": {
|
|
13833
|
+
"200": {
|
|
13834
|
+
"description": "Document",
|
|
13835
|
+
"content": {
|
|
13836
|
+
"application/json": {
|
|
13837
|
+
"schema": {
|
|
13838
|
+
"$ref": "#/components/schemas/JSONDocument"
|
|
13839
|
+
}
|
|
13840
|
+
}
|
|
13841
|
+
}
|
|
13842
|
+
},
|
|
13843
|
+
"default": {
|
|
13844
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
13845
|
+
}
|
|
13846
|
+
}
|
|
13847
|
+
}
|
|
13848
|
+
},
|
|
13761
13849
|
"/spaces/{spaceId}/change-requests": {
|
|
13762
13850
|
"post": {
|
|
13763
13851
|
"operationId": "createChangeRequest",
|
|
@@ -14965,7 +15053,10 @@
|
|
|
14965
15053
|
"$ref": "#/components/schemas/RevisionPage"
|
|
14966
15054
|
}
|
|
14967
15055
|
}
|
|
14968
|
-
}
|
|
15056
|
+
},
|
|
15057
|
+
"required": [
|
|
15058
|
+
"pages"
|
|
15059
|
+
]
|
|
14969
15060
|
}
|
|
14970
15061
|
}
|
|
14971
15062
|
}
|
|
@@ -15342,7 +15433,10 @@
|
|
|
15342
15433
|
"$ref": "#/components/schemas/RevisionPage"
|
|
15343
15434
|
}
|
|
15344
15435
|
}
|
|
15345
|
-
}
|
|
15436
|
+
},
|
|
15437
|
+
"required": [
|
|
15438
|
+
"pages"
|
|
15439
|
+
]
|
|
15346
15440
|
}
|
|
15347
15441
|
}
|
|
15348
15442
|
}
|
|
@@ -17872,6 +17966,39 @@
|
|
|
17872
17966
|
}
|
|
17873
17967
|
}
|
|
17874
17968
|
},
|
|
17969
|
+
"404": {
|
|
17970
|
+
"description": "No matching organization found for given id",
|
|
17971
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
17972
|
+
},
|
|
17973
|
+
"default": {
|
|
17974
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
17975
|
+
}
|
|
17976
|
+
}
|
|
17977
|
+
},
|
|
17978
|
+
"delete": {
|
|
17979
|
+
"operationId": "deleteOrganizationById",
|
|
17980
|
+
"summary": "Delete an organization by its ID",
|
|
17981
|
+
"tags": [
|
|
17982
|
+
"organizations"
|
|
17983
|
+
],
|
|
17984
|
+
"security": [
|
|
17985
|
+
{
|
|
17986
|
+
"user-internal": []
|
|
17987
|
+
}
|
|
17988
|
+
],
|
|
17989
|
+
"parameters": [
|
|
17990
|
+
{
|
|
17991
|
+
"$ref": "#/components/parameters/organizationId"
|
|
17992
|
+
}
|
|
17993
|
+
],
|
|
17994
|
+
"responses": {
|
|
17995
|
+
"205": {
|
|
17996
|
+
"description": "The organization has been successfully deleted"
|
|
17997
|
+
},
|
|
17998
|
+
"404": {
|
|
17999
|
+
"description": "No matching organization found for given id",
|
|
18000
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
18001
|
+
},
|
|
17875
18002
|
"default": {
|
|
17876
18003
|
"$ref": "#/components/responses/UnexpectedError"
|
|
17877
18004
|
}
|
|
@@ -18312,6 +18439,14 @@
|
|
|
18312
18439
|
{
|
|
18313
18440
|
"$ref": "#/components/parameters/listLimit"
|
|
18314
18441
|
},
|
|
18442
|
+
{
|
|
18443
|
+
"in": "query",
|
|
18444
|
+
"name": "owner",
|
|
18445
|
+
"description": "The unique identifier of a member of the organization. Only teams they can manage will be returned.",
|
|
18446
|
+
"schema": {
|
|
18447
|
+
"type": "string"
|
|
18448
|
+
}
|
|
18449
|
+
},
|
|
18315
18450
|
{
|
|
18316
18451
|
"in": "query",
|
|
18317
18452
|
"name": "title",
|
|
@@ -18395,8 +18530,7 @@
|
|
|
18395
18530
|
"type": "object",
|
|
18396
18531
|
"properties": {
|
|
18397
18532
|
"title": {
|
|
18398
|
-
"
|
|
18399
|
-
"title": "Title for the new team."
|
|
18533
|
+
"$ref": "#/components/schemas/OrganizationTeamTitle"
|
|
18400
18534
|
},
|
|
18401
18535
|
"members": {
|
|
18402
18536
|
"type": "array",
|
|
@@ -18494,7 +18628,7 @@
|
|
|
18494
18628
|
"type": "object",
|
|
18495
18629
|
"properties": {
|
|
18496
18630
|
"title": {
|
|
18497
|
-
"
|
|
18631
|
+
"$ref": "#/components/schemas/OrganizationTeamTitle"
|
|
18498
18632
|
}
|
|
18499
18633
|
},
|
|
18500
18634
|
"required": [
|
|
@@ -19938,6 +20072,53 @@
|
|
|
19938
20072
|
}
|
|
19939
20073
|
}
|
|
19940
20074
|
},
|
|
20075
|
+
"/orgs/{organizationId}/integrations/{integrationName}/installation_status": {
|
|
20076
|
+
"get": {
|
|
20077
|
+
"operationId": "getOrganizationIntegrationStatus",
|
|
20078
|
+
"summary": "Get the status of an integration installation in an organization",
|
|
20079
|
+
"tags": [
|
|
20080
|
+
"integrations"
|
|
20081
|
+
],
|
|
20082
|
+
"security": [
|
|
20083
|
+
{
|
|
20084
|
+
"user": []
|
|
20085
|
+
}
|
|
20086
|
+
],
|
|
20087
|
+
"parameters": [
|
|
20088
|
+
{
|
|
20089
|
+
"$ref": "#/components/parameters/organizationId"
|
|
20090
|
+
},
|
|
20091
|
+
{
|
|
20092
|
+
"$ref": "#/components/parameters/integrationName"
|
|
20093
|
+
}
|
|
20094
|
+
],
|
|
20095
|
+
"responses": {
|
|
20096
|
+
"200": {
|
|
20097
|
+
"description": "Integration installation status",
|
|
20098
|
+
"content": {
|
|
20099
|
+
"application/json": {
|
|
20100
|
+
"schema": {
|
|
20101
|
+
"properties": {
|
|
20102
|
+
"status": {
|
|
20103
|
+
"$ref": "#/components/schemas/IntegrationInstallationStatus"
|
|
20104
|
+
}
|
|
20105
|
+
},
|
|
20106
|
+
"required": [
|
|
20107
|
+
"status"
|
|
20108
|
+
]
|
|
20109
|
+
}
|
|
20110
|
+
}
|
|
20111
|
+
}
|
|
20112
|
+
},
|
|
20113
|
+
"404": {
|
|
20114
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
20115
|
+
},
|
|
20116
|
+
"default": {
|
|
20117
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
20118
|
+
}
|
|
20119
|
+
}
|
|
20120
|
+
}
|
|
20121
|
+
},
|
|
19941
20122
|
"/orgs/{organizationId}/installations": {
|
|
19942
20123
|
"get": {
|
|
19943
20124
|
"operationId": "listOrganizationInstallations",
|
|
@@ -21023,9 +21204,46 @@
|
|
|
21023
21204
|
"required": false,
|
|
21024
21205
|
"description": "Status of the audit relation to filter on",
|
|
21025
21206
|
"schema": {
|
|
21026
|
-
"
|
|
21027
|
-
"
|
|
21028
|
-
|
|
21207
|
+
"default": "pending",
|
|
21208
|
+
"oneOf": [
|
|
21209
|
+
{
|
|
21210
|
+
"$ref": "#/components/schemas/ContentAuditRelationStatus"
|
|
21211
|
+
},
|
|
21212
|
+
{
|
|
21213
|
+
"type": "string",
|
|
21214
|
+
"enum": [
|
|
21215
|
+
"all"
|
|
21216
|
+
]
|
|
21217
|
+
}
|
|
21218
|
+
]
|
|
21219
|
+
}
|
|
21220
|
+
},
|
|
21221
|
+
{
|
|
21222
|
+
"name": "space",
|
|
21223
|
+
"in": "query",
|
|
21224
|
+
"required": false,
|
|
21225
|
+
"description": "Space concerned by the relation",
|
|
21226
|
+
"schema": {
|
|
21227
|
+
"type": "string"
|
|
21228
|
+
}
|
|
21229
|
+
},
|
|
21230
|
+
{
|
|
21231
|
+
"name": "type",
|
|
21232
|
+
"in": "query",
|
|
21233
|
+
"required": false,
|
|
21234
|
+
"description": "Type of the audit relation to filter on",
|
|
21235
|
+
"schema": {
|
|
21236
|
+
"default": "all",
|
|
21237
|
+
"oneOf": [
|
|
21238
|
+
{
|
|
21239
|
+
"$ref": "#/components/schemas/ContentAuditRelationType"
|
|
21240
|
+
},
|
|
21241
|
+
{
|
|
21242
|
+
"type": "string",
|
|
21243
|
+
"enum": [
|
|
21244
|
+
"all"
|
|
21245
|
+
]
|
|
21246
|
+
}
|
|
21029
21247
|
]
|
|
21030
21248
|
}
|
|
21031
21249
|
}
|
package/spec/openapi.yaml
CHANGED
|
@@ -2982,6 +2982,9 @@ components:
|
|
|
2982
2982
|
type: string
|
|
2983
2983
|
description:
|
|
2984
2984
|
type: string
|
|
2985
|
+
documentId:
|
|
2986
|
+
type: string
|
|
2987
|
+
description: ID of the document with the page body. If undefined, the page is empty.
|
|
2985
2988
|
pages:
|
|
2986
2989
|
type: array
|
|
2987
2990
|
items:
|
|
@@ -2990,12 +2993,15 @@ components:
|
|
|
2990
2993
|
- $ref: "#/components/schemas/RevisionPageLink"
|
|
2991
2994
|
git:
|
|
2992
2995
|
$ref: "#/components/schemas/GitSyncBlob"
|
|
2996
|
+
layout:
|
|
2997
|
+
$ref: "#/components/schemas/RevisionPageLayoutOptions"
|
|
2993
2998
|
required:
|
|
2994
2999
|
- kind
|
|
2995
3000
|
- type
|
|
2996
3001
|
- slug
|
|
2997
3002
|
- path
|
|
2998
3003
|
- pages
|
|
3004
|
+
- layout
|
|
2999
3005
|
RevisionPageDocumentCover:
|
|
3000
3006
|
type: object
|
|
3001
3007
|
properties:
|
|
@@ -3743,8 +3749,7 @@ components:
|
|
|
3743
3749
|
type: string
|
|
3744
3750
|
description: Unique identifier for the team.
|
|
3745
3751
|
title:
|
|
3746
|
-
|
|
3747
|
-
description: Title of the team.
|
|
3752
|
+
$ref: "#/components/schemas/OrganizationTeamTitle"
|
|
3748
3753
|
members:
|
|
3749
3754
|
type: integer
|
|
3750
3755
|
description: Count of members in this team.
|
|
@@ -3761,6 +3766,11 @@ components:
|
|
|
3761
3766
|
- members
|
|
3762
3767
|
- spaces
|
|
3763
3768
|
- createdAt
|
|
3769
|
+
OrganizationTeamTitle:
|
|
3770
|
+
type: string
|
|
3771
|
+
description: Title of the team
|
|
3772
|
+
minLength: 1
|
|
3773
|
+
maxLength: 64
|
|
3764
3774
|
TeamMember:
|
|
3765
3775
|
type: object
|
|
3766
3776
|
properties:
|
|
@@ -4126,18 +4136,16 @@ components:
|
|
|
4126
4136
|
- createdAt
|
|
4127
4137
|
ContentAuditRelationType:
|
|
4128
4138
|
description: The type of the relation between the sources
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
- duplicate
|
|
4139
|
+
type: string
|
|
4140
|
+
enum:
|
|
4141
|
+
- contradiction
|
|
4142
|
+
- duplicate
|
|
4134
4143
|
ContentAuditRelationStatus:
|
|
4135
4144
|
description: Status of the audit relation to filter on
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
- rejected
|
|
4145
|
+
type: string
|
|
4146
|
+
enum:
|
|
4147
|
+
- pending
|
|
4148
|
+
- rejected
|
|
4141
4149
|
ContentAuditRelationStatusUpdate:
|
|
4142
4150
|
type: object
|
|
4143
4151
|
properties:
|
|
@@ -7303,9 +7311,21 @@ components:
|
|
|
7303
7311
|
- $ref: "#/components/schemas/SpaceIntegrationsChannel"
|
|
7304
7312
|
- $ref: "#/components/schemas/OrganizationCustomFieldsChannel"
|
|
7305
7313
|
- $ref: "#/components/schemas/UserAPITokensChannel"
|
|
7314
|
+
- $ref: "#/components/schemas/UserOrganizationsChannel"
|
|
7306
7315
|
- $ref: "#/components/schemas/UserProfileChannel"
|
|
7307
7316
|
- $ref: "#/components/schemas/ChangeRequestReviewsChannel"
|
|
7308
7317
|
- $ref: "#/components/schemas/CollectionPublishingCustomizationChannel"
|
|
7318
|
+
- type: object
|
|
7319
|
+
properties:
|
|
7320
|
+
channel:
|
|
7321
|
+
type: string
|
|
7322
|
+
enum:
|
|
7323
|
+
- organization
|
|
7324
|
+
organization:
|
|
7325
|
+
type: string
|
|
7326
|
+
required:
|
|
7327
|
+
- channel
|
|
7328
|
+
- organization
|
|
7309
7329
|
- $ref: "#/components/schemas/OrganizationMembersChannel"
|
|
7310
7330
|
- $ref: "#/components/schemas/OrganizationMemberChannel"
|
|
7311
7331
|
- $ref: "#/components/schemas/OrganizationTeamsChannel"
|
|
@@ -7498,6 +7518,18 @@ components:
|
|
|
7498
7518
|
required:
|
|
7499
7519
|
- channel
|
|
7500
7520
|
- user
|
|
7521
|
+
UserOrganizationsChannel:
|
|
7522
|
+
type: object
|
|
7523
|
+
properties:
|
|
7524
|
+
channel:
|
|
7525
|
+
type: string
|
|
7526
|
+
enum:
|
|
7527
|
+
- user-organizations
|
|
7528
|
+
user:
|
|
7529
|
+
type: string
|
|
7530
|
+
required:
|
|
7531
|
+
- channel
|
|
7532
|
+
- user
|
|
7501
7533
|
UserProfileChannel:
|
|
7502
7534
|
type: object
|
|
7503
7535
|
properties:
|
|
@@ -8100,6 +8132,7 @@ components:
|
|
|
8100
8132
|
CustomizationFont:
|
|
8101
8133
|
type: string
|
|
8102
8134
|
enum:
|
|
8135
|
+
- ABCFavorit
|
|
8103
8136
|
- Inter
|
|
8104
8137
|
- Roboto
|
|
8105
8138
|
- RobotoSlab
|
|
@@ -8807,6 +8840,8 @@ paths:
|
|
|
8807
8840
|
type: array
|
|
8808
8841
|
items:
|
|
8809
8842
|
$ref: "#/components/schemas/RevisionPage"
|
|
8843
|
+
required:
|
|
8844
|
+
- pages
|
|
8810
8845
|
default:
|
|
8811
8846
|
$ref: "#/components/responses/UnexpectedError"
|
|
8812
8847
|
"/spaces/{spaceId}/content/files":
|
|
@@ -8924,6 +8959,29 @@ paths:
|
|
|
8924
8959
|
- $ref: "#/components/schemas/RevisionPageGroup"
|
|
8925
8960
|
default:
|
|
8926
8961
|
$ref: "#/components/responses/UnexpectedError"
|
|
8962
|
+
"/spaces/{spaceId}/documents/{documentId}":
|
|
8963
|
+
get:
|
|
8964
|
+
operationId: getDocumentById
|
|
8965
|
+
summary: Get a document by its ID in a space.
|
|
8966
|
+
security:
|
|
8967
|
+
- user: []
|
|
8968
|
+
parameters:
|
|
8969
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8970
|
+
- name: documentId
|
|
8971
|
+
in: path
|
|
8972
|
+
required: true
|
|
8973
|
+
description: ID of the document in the space
|
|
8974
|
+
schema:
|
|
8975
|
+
type: string
|
|
8976
|
+
responses:
|
|
8977
|
+
"200":
|
|
8978
|
+
description: Document
|
|
8979
|
+
content:
|
|
8980
|
+
application/json:
|
|
8981
|
+
schema:
|
|
8982
|
+
$ref: "#/components/schemas/JSONDocument"
|
|
8983
|
+
default:
|
|
8984
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8927
8985
|
"/spaces/{spaceId}/change-requests":
|
|
8928
8986
|
post:
|
|
8929
8987
|
operationId: createChangeRequest
|
|
@@ -9581,6 +9639,8 @@ paths:
|
|
|
9581
9639
|
type: array
|
|
9582
9640
|
items:
|
|
9583
9641
|
$ref: "#/components/schemas/RevisionPage"
|
|
9642
|
+
required:
|
|
9643
|
+
- pages
|
|
9584
9644
|
default:
|
|
9585
9645
|
$ref: "#/components/responses/UnexpectedError"
|
|
9586
9646
|
"/spaces/{spaceId}/change-requests/{changeRequestId}/content/files":
|
|
@@ -9781,6 +9841,8 @@ paths:
|
|
|
9781
9841
|
type: array
|
|
9782
9842
|
items:
|
|
9783
9843
|
$ref: "#/components/schemas/RevisionPage"
|
|
9844
|
+
required:
|
|
9845
|
+
- pages
|
|
9784
9846
|
default:
|
|
9785
9847
|
$ref: "#/components/responses/UnexpectedError"
|
|
9786
9848
|
"/spaces/{spaceId}/revisions/{revisionId}/files":
|
|
@@ -11178,6 +11240,26 @@ paths:
|
|
|
11178
11240
|
application/json:
|
|
11179
11241
|
schema:
|
|
11180
11242
|
$ref: "#/components/schemas/Organization"
|
|
11243
|
+
"404":
|
|
11244
|
+
description: No matching organization found for given id
|
|
11245
|
+
$ref: "#/components/responses/NotFoundError"
|
|
11246
|
+
default:
|
|
11247
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
11248
|
+
delete:
|
|
11249
|
+
operationId: deleteOrganizationById
|
|
11250
|
+
summary: Delete an organization by its ID
|
|
11251
|
+
tags:
|
|
11252
|
+
- organizations
|
|
11253
|
+
security:
|
|
11254
|
+
- user-internal: []
|
|
11255
|
+
parameters:
|
|
11256
|
+
- $ref: "#/components/parameters/organizationId"
|
|
11257
|
+
responses:
|
|
11258
|
+
"205":
|
|
11259
|
+
description: The organization has been successfully deleted
|
|
11260
|
+
"404":
|
|
11261
|
+
description: No matching organization found for given id
|
|
11262
|
+
$ref: "#/components/responses/NotFoundError"
|
|
11181
11263
|
default:
|
|
11182
11264
|
$ref: "#/components/responses/UnexpectedError"
|
|
11183
11265
|
"/orgs/{organizationId}/members":
|
|
@@ -11422,6 +11504,11 @@ paths:
|
|
|
11422
11504
|
- $ref: "#/components/parameters/organizationId"
|
|
11423
11505
|
- $ref: "#/components/parameters/listPage"
|
|
11424
11506
|
- $ref: "#/components/parameters/listLimit"
|
|
11507
|
+
- in: query
|
|
11508
|
+
name: owner
|
|
11509
|
+
description: The unique identifier of a member of the organization. Only teams they can manage will be returned.
|
|
11510
|
+
schema:
|
|
11511
|
+
type: string
|
|
11425
11512
|
- in: query
|
|
11426
11513
|
name: title
|
|
11427
11514
|
description: If provided, only teams whose name contains the given parameter will be returned. Case insensitive.
|
|
@@ -11473,8 +11560,7 @@ paths:
|
|
|
11473
11560
|
type: object
|
|
11474
11561
|
properties:
|
|
11475
11562
|
title:
|
|
11476
|
-
|
|
11477
|
-
title: Title for the new team.
|
|
11563
|
+
$ref: "#/components/schemas/OrganizationTeamTitle"
|
|
11478
11564
|
members:
|
|
11479
11565
|
type: array
|
|
11480
11566
|
items:
|
|
@@ -11532,7 +11618,7 @@ paths:
|
|
|
11532
11618
|
type: object
|
|
11533
11619
|
properties:
|
|
11534
11620
|
title:
|
|
11535
|
-
|
|
11621
|
+
$ref: "#/components/schemas/OrganizationTeamTitle"
|
|
11536
11622
|
required:
|
|
11537
11623
|
- title
|
|
11538
11624
|
delete:
|
|
@@ -12379,6 +12465,32 @@ paths:
|
|
|
12379
12465
|
$ref: "#/components/schemas/Integration"
|
|
12380
12466
|
default:
|
|
12381
12467
|
$ref: "#/components/responses/UnexpectedError"
|
|
12468
|
+
"/orgs/{organizationId}/integrations/{integrationName}/installation_status":
|
|
12469
|
+
get:
|
|
12470
|
+
operationId: getOrganizationIntegrationStatus
|
|
12471
|
+
summary: Get the status of an integration installation in an organization
|
|
12472
|
+
tags:
|
|
12473
|
+
- integrations
|
|
12474
|
+
security:
|
|
12475
|
+
- user: []
|
|
12476
|
+
parameters:
|
|
12477
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12478
|
+
- $ref: "#/components/parameters/integrationName"
|
|
12479
|
+
responses:
|
|
12480
|
+
"200":
|
|
12481
|
+
description: Integration installation status
|
|
12482
|
+
content:
|
|
12483
|
+
application/json:
|
|
12484
|
+
schema:
|
|
12485
|
+
properties:
|
|
12486
|
+
status:
|
|
12487
|
+
$ref: "#/components/schemas/IntegrationInstallationStatus"
|
|
12488
|
+
required:
|
|
12489
|
+
- status
|
|
12490
|
+
"404":
|
|
12491
|
+
$ref: "#/components/responses/NotFoundError"
|
|
12492
|
+
default:
|
|
12493
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12382
12494
|
"/orgs/{organizationId}/installations":
|
|
12383
12495
|
get:
|
|
12384
12496
|
operationId: listOrganizationInstallations
|
|
@@ -12979,9 +13091,29 @@ paths:
|
|
|
12979
13091
|
required: false
|
|
12980
13092
|
description: Status of the audit relation to filter on
|
|
12981
13093
|
schema:
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
-
|
|
13094
|
+
default: pending
|
|
13095
|
+
oneOf:
|
|
13096
|
+
- $ref: "#/components/schemas/ContentAuditRelationStatus"
|
|
13097
|
+
- type: string
|
|
13098
|
+
enum:
|
|
13099
|
+
- all
|
|
13100
|
+
- name: space
|
|
13101
|
+
in: query
|
|
13102
|
+
required: false
|
|
13103
|
+
description: Space concerned by the relation
|
|
13104
|
+
schema:
|
|
13105
|
+
type: string
|
|
13106
|
+
- name: type
|
|
13107
|
+
in: query
|
|
13108
|
+
required: false
|
|
13109
|
+
description: Type of the audit relation to filter on
|
|
13110
|
+
schema:
|
|
13111
|
+
default: all
|
|
13112
|
+
oneOf:
|
|
13113
|
+
- $ref: "#/components/schemas/ContentAuditRelationType"
|
|
13114
|
+
- type: string
|
|
13115
|
+
enum:
|
|
13116
|
+
- all
|
|
12985
13117
|
responses:
|
|
12986
13118
|
"200":
|
|
12987
13119
|
description: Content audit relations
|