@gitbook/api 0.16.0 → 0.17.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 +42 -6
- package/dist/index.cjs +42 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -6
- package/package.json +1 -1
- package/spec/openapi.json +159 -22
- package/spec/openapi.yaml +94 -13
|
@@ -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,6 +983,7 @@ 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;
|
|
988
989
|
};
|
|
@@ -1539,11 +1540,17 @@ export interface ContentAuditRelation {
|
|
|
1539
1540
|
/**
|
|
1540
1541
|
* The type of the relation between the sources
|
|
1541
1542
|
*/
|
|
1542
|
-
export declare
|
|
1543
|
+
export declare enum ContentAuditRelationType {
|
|
1544
|
+
Contradiction = "contradiction",
|
|
1545
|
+
Duplicate = "duplicate"
|
|
1546
|
+
}
|
|
1543
1547
|
/**
|
|
1544
1548
|
* Status of the audit relation to filter on
|
|
1545
1549
|
*/
|
|
1546
|
-
export declare
|
|
1550
|
+
export declare enum ContentAuditRelationStatus {
|
|
1551
|
+
Pending = "pending",
|
|
1552
|
+
Rejected = "rejected"
|
|
1553
|
+
}
|
|
1547
1554
|
export interface ContentAuditRelationStatusUpdate {
|
|
1548
1555
|
/** Status of the audit relation to filter on */
|
|
1549
1556
|
status: ContentAuditRelationStatus;
|
|
@@ -3729,7 +3736,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3729
3736
|
* @secure
|
|
3730
3737
|
*/
|
|
3731
3738
|
listPages: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
3732
|
-
pages
|
|
3739
|
+
pages: RevisionPage[];
|
|
3733
3740
|
}, Error>>;
|
|
3734
3741
|
/**
|
|
3735
3742
|
* No description
|
|
@@ -3785,6 +3792,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3785
3792
|
getPageByPath: (spaceId: string, pagePath: string, query?: {
|
|
3786
3793
|
format?: 'document' | 'markdown';
|
|
3787
3794
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionPageDocument | RevisionPageGroup, Error>>;
|
|
3795
|
+
/**
|
|
3796
|
+
* No description
|
|
3797
|
+
*
|
|
3798
|
+
* @name GetDocumentById
|
|
3799
|
+
* @summary Get a document by its ID in a space.
|
|
3800
|
+
* @request GET:/spaces/{spaceId}/documents/{documentId}
|
|
3801
|
+
* @secure
|
|
3802
|
+
*/
|
|
3803
|
+
getDocumentById: (spaceId: string, documentId: string, params?: RequestParams) => Promise<HttpResponse<JSONDocument, Error>>;
|
|
3788
3804
|
/**
|
|
3789
3805
|
* No description
|
|
3790
3806
|
*
|
|
@@ -4081,7 +4097,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4081
4097
|
* @secure
|
|
4082
4098
|
*/
|
|
4083
4099
|
listPagesInChangeRequest: (spaceId: string, changeRequestId: string | number, params?: RequestParams) => Promise<HttpResponse<{
|
|
4084
|
-
pages
|
|
4100
|
+
pages: RevisionPage[];
|
|
4085
4101
|
}, Error>>;
|
|
4086
4102
|
/**
|
|
4087
4103
|
* No description
|
|
@@ -4170,7 +4186,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4170
4186
|
* @secure
|
|
4171
4187
|
*/
|
|
4172
4188
|
listPagesInRevisionById: (spaceId: string, revisionId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
4173
|
-
pages
|
|
4189
|
+
pages: RevisionPage[];
|
|
4174
4190
|
}, Error>>;
|
|
4175
4191
|
/**
|
|
4176
4192
|
* No description
|
|
@@ -5040,6 +5056,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5040
5056
|
listTeamsInOrganizationById: (organizationId: string, query?: {
|
|
5041
5057
|
page?: string;
|
|
5042
5058
|
limit?: number;
|
|
5059
|
+
owner?: string;
|
|
5043
5060
|
title?: string;
|
|
5044
5061
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5045
5062
|
items: OrganizationTeam[];
|
|
@@ -5433,6 +5450,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5433
5450
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5434
5451
|
items: Integration[];
|
|
5435
5452
|
}, Error>>;
|
|
5453
|
+
/**
|
|
5454
|
+
* No description
|
|
5455
|
+
*
|
|
5456
|
+
* @tags integrations
|
|
5457
|
+
* @name GetOrganizationIntegrationStatus
|
|
5458
|
+
* @summary Get the status of an integration installation in an organization
|
|
5459
|
+
* @request GET:/orgs/{organizationId}/integrations/{integrationName}/installation_status
|
|
5460
|
+
* @secure
|
|
5461
|
+
*/
|
|
5462
|
+
getOrganizationIntegrationStatus: (organizationId: string, integrationName: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
5463
|
+
status: IntegrationInstallationStatus;
|
|
5464
|
+
}, Error | {
|
|
5465
|
+
error: {
|
|
5466
|
+
code: 404;
|
|
5467
|
+
message: string;
|
|
5468
|
+
};
|
|
5469
|
+
}>>;
|
|
5436
5470
|
/**
|
|
5437
5471
|
* No description
|
|
5438
5472
|
*
|
|
@@ -5712,7 +5746,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5712
5746
|
listContentAuditRelations: (organizationId: string, query?: {
|
|
5713
5747
|
page?: string;
|
|
5714
5748
|
limit?: number;
|
|
5715
|
-
status?: ContentAuditRelationStatus;
|
|
5749
|
+
status?: ContentAuditRelationStatus | 'all';
|
|
5750
|
+
space?: string;
|
|
5751
|
+
type?: ContentAuditRelationType | 'all';
|
|
5716
5752
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5717
5753
|
items: ContentAuditRelation[];
|
|
5718
5754
|
}, 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";
|
|
@@ -734,6 +747,13 @@ var Api = class extends HttpClient {
|
|
|
734
747
|
format: "json",
|
|
735
748
|
...params
|
|
736
749
|
}),
|
|
750
|
+
getDocumentById: (spaceId, documentId, params = {}) => this.request({
|
|
751
|
+
path: `/spaces/${spaceId}/documents/${documentId}`,
|
|
752
|
+
method: "GET",
|
|
753
|
+
secure: true,
|
|
754
|
+
format: "json",
|
|
755
|
+
...params
|
|
756
|
+
}),
|
|
737
757
|
createChangeRequest: (spaceId, data, params = {}) => this.request({
|
|
738
758
|
path: `/spaces/${spaceId}/change-requests`,
|
|
739
759
|
method: "POST",
|
|
@@ -1723,6 +1743,13 @@ var Api = class extends HttpClient {
|
|
|
1723
1743
|
format: "json",
|
|
1724
1744
|
...params
|
|
1725
1745
|
}),
|
|
1746
|
+
getOrganizationIntegrationStatus: (organizationId, integrationName, params = {}) => this.request({
|
|
1747
|
+
path: `/orgs/${organizationId}/integrations/${integrationName}/installation_status`,
|
|
1748
|
+
method: "GET",
|
|
1749
|
+
secure: true,
|
|
1750
|
+
format: "json",
|
|
1751
|
+
...params
|
|
1752
|
+
}),
|
|
1726
1753
|
listOrganizationInstallations: (organizationId, query, params = {}) => this.request({
|
|
1727
1754
|
path: `/orgs/${organizationId}/installations`,
|
|
1728
1755
|
method: "GET",
|
|
@@ -1956,6 +1983,17 @@ var Api = class extends HttpClient {
|
|
|
1956
1983
|
}
|
|
1957
1984
|
};
|
|
1958
1985
|
|
|
1986
|
+
// src/GitBookAPIError.ts
|
|
1987
|
+
var GitBookAPIError = class extends Error {
|
|
1988
|
+
constructor(errorMessage, response) {
|
|
1989
|
+
const message = `GitBook API failed with [${response.status}] ${response.url}: ${errorMessage}`;
|
|
1990
|
+
super(message);
|
|
1991
|
+
this.name = "GitBookAPIError";
|
|
1992
|
+
this.response = response;
|
|
1993
|
+
this.code = response.status;
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1959
1997
|
// src/index.ts
|
|
1960
1998
|
var GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
|
|
1961
1999
|
var GitBookAPI = class extends Api {
|
|
@@ -1987,13 +2025,8 @@ var GitBookAPI = class extends Api {
|
|
|
1987
2025
|
const body = await response.json();
|
|
1988
2026
|
error = body?.error?.message || error;
|
|
1989
2027
|
} catch (err) {
|
|
1990
|
-
response.headers.forEach((value, key) => {
|
|
1991
|
-
error += `${key}:${value} `;
|
|
1992
|
-
});
|
|
1993
2028
|
}
|
|
1994
|
-
throw new
|
|
1995
|
-
`GitBook API failed with [${response.status}] ${response.url}: ${error}`
|
|
1996
|
-
);
|
|
2029
|
+
throw new GitBookAPIError(error, response);
|
|
1997
2030
|
}
|
|
1998
2031
|
return response;
|
|
1999
2032
|
}
|
|
@@ -2025,6 +2058,8 @@ var GitBookAPI = class extends Api {
|
|
|
2025
2058
|
CloudflareHostnameStatus,
|
|
2026
2059
|
CloudflareHostnameTLSStatus,
|
|
2027
2060
|
CloudflareHostnameTLSValidationMethod,
|
|
2061
|
+
ContentAuditRelationStatus,
|
|
2062
|
+
ContentAuditRelationType,
|
|
2028
2063
|
ContentKitIcon,
|
|
2029
2064
|
ContentType,
|
|
2030
2065
|
ContentVisibility,
|
|
@@ -2036,6 +2071,7 @@ var GitBookAPI = class extends Api {
|
|
|
2036
2071
|
CustomizationThemeMode,
|
|
2037
2072
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
2038
2073
|
GitBookAPI,
|
|
2074
|
+
GitBookAPIError,
|
|
2039
2075
|
GitSyncOperationState,
|
|
2040
2076
|
HttpClient,
|
|
2041
2077
|
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";
|
|
@@ -669,6 +679,13 @@ var Api = class extends HttpClient {
|
|
|
669
679
|
format: "json",
|
|
670
680
|
...params
|
|
671
681
|
}),
|
|
682
|
+
getDocumentById: (spaceId, documentId, params = {}) => this.request({
|
|
683
|
+
path: `/spaces/${spaceId}/documents/${documentId}`,
|
|
684
|
+
method: "GET",
|
|
685
|
+
secure: true,
|
|
686
|
+
format: "json",
|
|
687
|
+
...params
|
|
688
|
+
}),
|
|
672
689
|
createChangeRequest: (spaceId, data, params = {}) => this.request({
|
|
673
690
|
path: `/spaces/${spaceId}/change-requests`,
|
|
674
691
|
method: "POST",
|
|
@@ -1658,6 +1675,13 @@ var Api = class extends HttpClient {
|
|
|
1658
1675
|
format: "json",
|
|
1659
1676
|
...params
|
|
1660
1677
|
}),
|
|
1678
|
+
getOrganizationIntegrationStatus: (organizationId, integrationName, params = {}) => this.request({
|
|
1679
|
+
path: `/orgs/${organizationId}/integrations/${integrationName}/installation_status`,
|
|
1680
|
+
method: "GET",
|
|
1681
|
+
secure: true,
|
|
1682
|
+
format: "json",
|
|
1683
|
+
...params
|
|
1684
|
+
}),
|
|
1661
1685
|
listOrganizationInstallations: (organizationId, query, params = {}) => this.request({
|
|
1662
1686
|
path: `/orgs/${organizationId}/installations`,
|
|
1663
1687
|
method: "GET",
|
|
@@ -1891,6 +1915,17 @@ var Api = class extends HttpClient {
|
|
|
1891
1915
|
}
|
|
1892
1916
|
};
|
|
1893
1917
|
|
|
1918
|
+
// src/GitBookAPIError.ts
|
|
1919
|
+
var GitBookAPIError = class extends Error {
|
|
1920
|
+
constructor(errorMessage, response) {
|
|
1921
|
+
const message = `GitBook API failed with [${response.status}] ${response.url}: ${errorMessage}`;
|
|
1922
|
+
super(message);
|
|
1923
|
+
this.name = "GitBookAPIError";
|
|
1924
|
+
this.response = response;
|
|
1925
|
+
this.code = response.status;
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
|
|
1894
1929
|
// src/index.ts
|
|
1895
1930
|
var GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
|
|
1896
1931
|
var GitBookAPI = class extends Api {
|
|
@@ -1922,13 +1957,8 @@ var GitBookAPI = class extends Api {
|
|
|
1922
1957
|
const body = await response.json();
|
|
1923
1958
|
error = body?.error?.message || error;
|
|
1924
1959
|
} catch (err) {
|
|
1925
|
-
response.headers.forEach((value, key) => {
|
|
1926
|
-
error += `${key}:${value} `;
|
|
1927
|
-
});
|
|
1928
1960
|
}
|
|
1929
|
-
throw new
|
|
1930
|
-
`GitBook API failed with [${response.status}] ${response.url}: ${error}`
|
|
1931
|
-
);
|
|
1961
|
+
throw new GitBookAPIError(error, response);
|
|
1932
1962
|
}
|
|
1933
1963
|
return response;
|
|
1934
1964
|
}
|
|
@@ -1959,6 +1989,8 @@ export {
|
|
|
1959
1989
|
CloudflareHostnameStatus,
|
|
1960
1990
|
CloudflareHostnameTLSStatus,
|
|
1961
1991
|
CloudflareHostnameTLSValidationMethod,
|
|
1992
|
+
ContentAuditRelationStatus,
|
|
1993
|
+
ContentAuditRelationType,
|
|
1962
1994
|
ContentKitIcon,
|
|
1963
1995
|
ContentType,
|
|
1964
1996
|
ContentVisibility,
|
|
@@ -1970,6 +2002,7 @@ export {
|
|
|
1970
2002
|
CustomizationThemeMode,
|
|
1971
2003
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
1972
2004
|
GitBookAPI,
|
|
2005
|
+
GitBookAPIError,
|
|
1973
2006
|
GitSyncOperationState,
|
|
1974
2007
|
HttpClient,
|
|
1975
2008
|
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": {
|
|
@@ -6291,26 +6295,18 @@
|
|
|
6291
6295
|
},
|
|
6292
6296
|
"ContentAuditRelationType": {
|
|
6293
6297
|
"description": "The type of the relation between the sources",
|
|
6294
|
-
"
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
"contradiction",
|
|
6299
|
-
"duplicate"
|
|
6300
|
-
]
|
|
6301
|
-
}
|
|
6298
|
+
"type": "string",
|
|
6299
|
+
"enum": [
|
|
6300
|
+
"contradiction",
|
|
6301
|
+
"duplicate"
|
|
6302
6302
|
]
|
|
6303
6303
|
},
|
|
6304
6304
|
"ContentAuditRelationStatus": {
|
|
6305
6305
|
"description": "Status of the audit relation to filter on",
|
|
6306
|
-
"
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
"pending",
|
|
6311
|
-
"rejected"
|
|
6312
|
-
]
|
|
6313
|
-
}
|
|
6306
|
+
"type": "string",
|
|
6307
|
+
"enum": [
|
|
6308
|
+
"pending",
|
|
6309
|
+
"rejected"
|
|
6314
6310
|
]
|
|
6315
6311
|
},
|
|
6316
6312
|
"ContentAuditRelationStatusUpdate": {
|
|
@@ -13525,7 +13521,10 @@
|
|
|
13525
13521
|
"$ref": "#/components/schemas/RevisionPage"
|
|
13526
13522
|
}
|
|
13527
13523
|
}
|
|
13528
|
-
}
|
|
13524
|
+
},
|
|
13525
|
+
"required": [
|
|
13526
|
+
"pages"
|
|
13527
|
+
]
|
|
13529
13528
|
}
|
|
13530
13529
|
}
|
|
13531
13530
|
}
|
|
@@ -13758,6 +13757,46 @@
|
|
|
13758
13757
|
}
|
|
13759
13758
|
}
|
|
13760
13759
|
},
|
|
13760
|
+
"/spaces/{spaceId}/documents/{documentId}": {
|
|
13761
|
+
"get": {
|
|
13762
|
+
"operationId": "getDocumentById",
|
|
13763
|
+
"summary": "Get a document by its ID in a space.",
|
|
13764
|
+
"security": [
|
|
13765
|
+
{
|
|
13766
|
+
"user": []
|
|
13767
|
+
}
|
|
13768
|
+
],
|
|
13769
|
+
"parameters": [
|
|
13770
|
+
{
|
|
13771
|
+
"$ref": "#/components/parameters/spaceId"
|
|
13772
|
+
},
|
|
13773
|
+
{
|
|
13774
|
+
"name": "documentId",
|
|
13775
|
+
"in": "path",
|
|
13776
|
+
"required": true,
|
|
13777
|
+
"description": "ID of the document in the space",
|
|
13778
|
+
"schema": {
|
|
13779
|
+
"type": "string"
|
|
13780
|
+
}
|
|
13781
|
+
}
|
|
13782
|
+
],
|
|
13783
|
+
"responses": {
|
|
13784
|
+
"200": {
|
|
13785
|
+
"description": "Document",
|
|
13786
|
+
"content": {
|
|
13787
|
+
"application/json": {
|
|
13788
|
+
"schema": {
|
|
13789
|
+
"$ref": "#/components/schemas/JSONDocument"
|
|
13790
|
+
}
|
|
13791
|
+
}
|
|
13792
|
+
}
|
|
13793
|
+
},
|
|
13794
|
+
"default": {
|
|
13795
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13798
|
+
}
|
|
13799
|
+
},
|
|
13761
13800
|
"/spaces/{spaceId}/change-requests": {
|
|
13762
13801
|
"post": {
|
|
13763
13802
|
"operationId": "createChangeRequest",
|
|
@@ -14965,7 +15004,10 @@
|
|
|
14965
15004
|
"$ref": "#/components/schemas/RevisionPage"
|
|
14966
15005
|
}
|
|
14967
15006
|
}
|
|
14968
|
-
}
|
|
15007
|
+
},
|
|
15008
|
+
"required": [
|
|
15009
|
+
"pages"
|
|
15010
|
+
]
|
|
14969
15011
|
}
|
|
14970
15012
|
}
|
|
14971
15013
|
}
|
|
@@ -15342,7 +15384,10 @@
|
|
|
15342
15384
|
"$ref": "#/components/schemas/RevisionPage"
|
|
15343
15385
|
}
|
|
15344
15386
|
}
|
|
15345
|
-
}
|
|
15387
|
+
},
|
|
15388
|
+
"required": [
|
|
15389
|
+
"pages"
|
|
15390
|
+
]
|
|
15346
15391
|
}
|
|
15347
15392
|
}
|
|
15348
15393
|
}
|
|
@@ -18312,6 +18357,14 @@
|
|
|
18312
18357
|
{
|
|
18313
18358
|
"$ref": "#/components/parameters/listLimit"
|
|
18314
18359
|
},
|
|
18360
|
+
{
|
|
18361
|
+
"in": "query",
|
|
18362
|
+
"name": "owner",
|
|
18363
|
+
"description": "The unique identifier of a member of the organization. Only teams they can manage will be returned.",
|
|
18364
|
+
"schema": {
|
|
18365
|
+
"type": "string"
|
|
18366
|
+
}
|
|
18367
|
+
},
|
|
18315
18368
|
{
|
|
18316
18369
|
"in": "query",
|
|
18317
18370
|
"name": "title",
|
|
@@ -19938,6 +19991,53 @@
|
|
|
19938
19991
|
}
|
|
19939
19992
|
}
|
|
19940
19993
|
},
|
|
19994
|
+
"/orgs/{organizationId}/integrations/{integrationName}/installation_status": {
|
|
19995
|
+
"get": {
|
|
19996
|
+
"operationId": "getOrganizationIntegrationStatus",
|
|
19997
|
+
"summary": "Get the status of an integration installation in an organization",
|
|
19998
|
+
"tags": [
|
|
19999
|
+
"integrations"
|
|
20000
|
+
],
|
|
20001
|
+
"security": [
|
|
20002
|
+
{
|
|
20003
|
+
"user": []
|
|
20004
|
+
}
|
|
20005
|
+
],
|
|
20006
|
+
"parameters": [
|
|
20007
|
+
{
|
|
20008
|
+
"$ref": "#/components/parameters/organizationId"
|
|
20009
|
+
},
|
|
20010
|
+
{
|
|
20011
|
+
"$ref": "#/components/parameters/integrationName"
|
|
20012
|
+
}
|
|
20013
|
+
],
|
|
20014
|
+
"responses": {
|
|
20015
|
+
"200": {
|
|
20016
|
+
"description": "Integration installation status",
|
|
20017
|
+
"content": {
|
|
20018
|
+
"application/json": {
|
|
20019
|
+
"schema": {
|
|
20020
|
+
"properties": {
|
|
20021
|
+
"status": {
|
|
20022
|
+
"$ref": "#/components/schemas/IntegrationInstallationStatus"
|
|
20023
|
+
}
|
|
20024
|
+
},
|
|
20025
|
+
"required": [
|
|
20026
|
+
"status"
|
|
20027
|
+
]
|
|
20028
|
+
}
|
|
20029
|
+
}
|
|
20030
|
+
}
|
|
20031
|
+
},
|
|
20032
|
+
"404": {
|
|
20033
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
20034
|
+
},
|
|
20035
|
+
"default": {
|
|
20036
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
20037
|
+
}
|
|
20038
|
+
}
|
|
20039
|
+
}
|
|
20040
|
+
},
|
|
19941
20041
|
"/orgs/{organizationId}/installations": {
|
|
19942
20042
|
"get": {
|
|
19943
20043
|
"operationId": "listOrganizationInstallations",
|
|
@@ -21023,9 +21123,46 @@
|
|
|
21023
21123
|
"required": false,
|
|
21024
21124
|
"description": "Status of the audit relation to filter on",
|
|
21025
21125
|
"schema": {
|
|
21026
|
-
"
|
|
21027
|
-
"
|
|
21028
|
-
|
|
21126
|
+
"default": "pending",
|
|
21127
|
+
"oneOf": [
|
|
21128
|
+
{
|
|
21129
|
+
"$ref": "#/components/schemas/ContentAuditRelationStatus"
|
|
21130
|
+
},
|
|
21131
|
+
{
|
|
21132
|
+
"type": "string",
|
|
21133
|
+
"enum": [
|
|
21134
|
+
"all"
|
|
21135
|
+
]
|
|
21136
|
+
}
|
|
21137
|
+
]
|
|
21138
|
+
}
|
|
21139
|
+
},
|
|
21140
|
+
{
|
|
21141
|
+
"name": "space",
|
|
21142
|
+
"in": "query",
|
|
21143
|
+
"required": false,
|
|
21144
|
+
"description": "Space concerned by the relation",
|
|
21145
|
+
"schema": {
|
|
21146
|
+
"type": "string"
|
|
21147
|
+
}
|
|
21148
|
+
},
|
|
21149
|
+
{
|
|
21150
|
+
"name": "type",
|
|
21151
|
+
"in": "query",
|
|
21152
|
+
"required": false,
|
|
21153
|
+
"description": "Type of the audit relation to filter on",
|
|
21154
|
+
"schema": {
|
|
21155
|
+
"default": "all",
|
|
21156
|
+
"oneOf": [
|
|
21157
|
+
{
|
|
21158
|
+
"$ref": "#/components/schemas/ContentAuditRelationType"
|
|
21159
|
+
},
|
|
21160
|
+
{
|
|
21161
|
+
"type": "string",
|
|
21162
|
+
"enum": [
|
|
21163
|
+
"all"
|
|
21164
|
+
]
|
|
21165
|
+
}
|
|
21029
21166
|
]
|
|
21030
21167
|
}
|
|
21031
21168
|
}
|
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:
|
|
@@ -4126,18 +4129,16 @@ components:
|
|
|
4126
4129
|
- createdAt
|
|
4127
4130
|
ContentAuditRelationType:
|
|
4128
4131
|
description: The type of the relation between the sources
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
- duplicate
|
|
4132
|
+
type: string
|
|
4133
|
+
enum:
|
|
4134
|
+
- contradiction
|
|
4135
|
+
- duplicate
|
|
4134
4136
|
ContentAuditRelationStatus:
|
|
4135
4137
|
description: Status of the audit relation to filter on
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
- rejected
|
|
4138
|
+
type: string
|
|
4139
|
+
enum:
|
|
4140
|
+
- pending
|
|
4141
|
+
- rejected
|
|
4141
4142
|
ContentAuditRelationStatusUpdate:
|
|
4142
4143
|
type: object
|
|
4143
4144
|
properties:
|
|
@@ -8807,6 +8808,8 @@ paths:
|
|
|
8807
8808
|
type: array
|
|
8808
8809
|
items:
|
|
8809
8810
|
$ref: "#/components/schemas/RevisionPage"
|
|
8811
|
+
required:
|
|
8812
|
+
- pages
|
|
8810
8813
|
default:
|
|
8811
8814
|
$ref: "#/components/responses/UnexpectedError"
|
|
8812
8815
|
"/spaces/{spaceId}/content/files":
|
|
@@ -8924,6 +8927,29 @@ paths:
|
|
|
8924
8927
|
- $ref: "#/components/schemas/RevisionPageGroup"
|
|
8925
8928
|
default:
|
|
8926
8929
|
$ref: "#/components/responses/UnexpectedError"
|
|
8930
|
+
"/spaces/{spaceId}/documents/{documentId}":
|
|
8931
|
+
get:
|
|
8932
|
+
operationId: getDocumentById
|
|
8933
|
+
summary: Get a document by its ID in a space.
|
|
8934
|
+
security:
|
|
8935
|
+
- user: []
|
|
8936
|
+
parameters:
|
|
8937
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8938
|
+
- name: documentId
|
|
8939
|
+
in: path
|
|
8940
|
+
required: true
|
|
8941
|
+
description: ID of the document in the space
|
|
8942
|
+
schema:
|
|
8943
|
+
type: string
|
|
8944
|
+
responses:
|
|
8945
|
+
"200":
|
|
8946
|
+
description: Document
|
|
8947
|
+
content:
|
|
8948
|
+
application/json:
|
|
8949
|
+
schema:
|
|
8950
|
+
$ref: "#/components/schemas/JSONDocument"
|
|
8951
|
+
default:
|
|
8952
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8927
8953
|
"/spaces/{spaceId}/change-requests":
|
|
8928
8954
|
post:
|
|
8929
8955
|
operationId: createChangeRequest
|
|
@@ -9581,6 +9607,8 @@ paths:
|
|
|
9581
9607
|
type: array
|
|
9582
9608
|
items:
|
|
9583
9609
|
$ref: "#/components/schemas/RevisionPage"
|
|
9610
|
+
required:
|
|
9611
|
+
- pages
|
|
9584
9612
|
default:
|
|
9585
9613
|
$ref: "#/components/responses/UnexpectedError"
|
|
9586
9614
|
"/spaces/{spaceId}/change-requests/{changeRequestId}/content/files":
|
|
@@ -9781,6 +9809,8 @@ paths:
|
|
|
9781
9809
|
type: array
|
|
9782
9810
|
items:
|
|
9783
9811
|
$ref: "#/components/schemas/RevisionPage"
|
|
9812
|
+
required:
|
|
9813
|
+
- pages
|
|
9784
9814
|
default:
|
|
9785
9815
|
$ref: "#/components/responses/UnexpectedError"
|
|
9786
9816
|
"/spaces/{spaceId}/revisions/{revisionId}/files":
|
|
@@ -11422,6 +11452,11 @@ paths:
|
|
|
11422
11452
|
- $ref: "#/components/parameters/organizationId"
|
|
11423
11453
|
- $ref: "#/components/parameters/listPage"
|
|
11424
11454
|
- $ref: "#/components/parameters/listLimit"
|
|
11455
|
+
- in: query
|
|
11456
|
+
name: owner
|
|
11457
|
+
description: The unique identifier of a member of the organization. Only teams they can manage will be returned.
|
|
11458
|
+
schema:
|
|
11459
|
+
type: string
|
|
11425
11460
|
- in: query
|
|
11426
11461
|
name: title
|
|
11427
11462
|
description: If provided, only teams whose name contains the given parameter will be returned. Case insensitive.
|
|
@@ -12379,6 +12414,32 @@ paths:
|
|
|
12379
12414
|
$ref: "#/components/schemas/Integration"
|
|
12380
12415
|
default:
|
|
12381
12416
|
$ref: "#/components/responses/UnexpectedError"
|
|
12417
|
+
"/orgs/{organizationId}/integrations/{integrationName}/installation_status":
|
|
12418
|
+
get:
|
|
12419
|
+
operationId: getOrganizationIntegrationStatus
|
|
12420
|
+
summary: Get the status of an integration installation in an organization
|
|
12421
|
+
tags:
|
|
12422
|
+
- integrations
|
|
12423
|
+
security:
|
|
12424
|
+
- user: []
|
|
12425
|
+
parameters:
|
|
12426
|
+
- $ref: "#/components/parameters/organizationId"
|
|
12427
|
+
- $ref: "#/components/parameters/integrationName"
|
|
12428
|
+
responses:
|
|
12429
|
+
"200":
|
|
12430
|
+
description: Integration installation status
|
|
12431
|
+
content:
|
|
12432
|
+
application/json:
|
|
12433
|
+
schema:
|
|
12434
|
+
properties:
|
|
12435
|
+
status:
|
|
12436
|
+
$ref: "#/components/schemas/IntegrationInstallationStatus"
|
|
12437
|
+
required:
|
|
12438
|
+
- status
|
|
12439
|
+
"404":
|
|
12440
|
+
$ref: "#/components/responses/NotFoundError"
|
|
12441
|
+
default:
|
|
12442
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
12382
12443
|
"/orgs/{organizationId}/installations":
|
|
12383
12444
|
get:
|
|
12384
12445
|
operationId: listOrganizationInstallations
|
|
@@ -12979,9 +13040,29 @@ paths:
|
|
|
12979
13040
|
required: false
|
|
12980
13041
|
description: Status of the audit relation to filter on
|
|
12981
13042
|
schema:
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
-
|
|
13043
|
+
default: pending
|
|
13044
|
+
oneOf:
|
|
13045
|
+
- $ref: "#/components/schemas/ContentAuditRelationStatus"
|
|
13046
|
+
- type: string
|
|
13047
|
+
enum:
|
|
13048
|
+
- all
|
|
13049
|
+
- name: space
|
|
13050
|
+
in: query
|
|
13051
|
+
required: false
|
|
13052
|
+
description: Space concerned by the relation
|
|
13053
|
+
schema:
|
|
13054
|
+
type: string
|
|
13055
|
+
- name: type
|
|
13056
|
+
in: query
|
|
13057
|
+
required: false
|
|
13058
|
+
description: Type of the audit relation to filter on
|
|
13059
|
+
schema:
|
|
13060
|
+
default: all
|
|
13061
|
+
oneOf:
|
|
13062
|
+
- $ref: "#/components/schemas/ContentAuditRelationType"
|
|
13063
|
+
- type: string
|
|
13064
|
+
enum:
|
|
13065
|
+
- all
|
|
12985
13066
|
responses:
|
|
12986
13067
|
"200":
|
|
12987
13068
|
description: Content audit relations
|