@gitbook/api 0.21.0 → 0.22.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 +84 -7
- package/dist/index.cjs +27 -0
- package/dist/index.js +27 -0
- package/package.json +1 -1
- package/spec/openapi.json +229 -4
- package/spec/openapi.yaml +133 -4
package/dist/client.d.ts
CHANGED
|
@@ -1011,6 +1011,7 @@ export interface Space {
|
|
|
1011
1011
|
organization: string;
|
|
1012
1012
|
/** ID of the parent collection. */
|
|
1013
1013
|
parent?: string;
|
|
1014
|
+
gitSync?: GitSyncState;
|
|
1014
1015
|
}
|
|
1015
1016
|
export interface RevisionBase {
|
|
1016
1017
|
/** Type of Object, always equals to "revision" */
|
|
@@ -1980,12 +1981,10 @@ export interface Collection {
|
|
|
1980
1981
|
object: 'collection';
|
|
1981
1982
|
/** Unique identifier for the collection */
|
|
1982
1983
|
id: string;
|
|
1983
|
-
/**
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
*/
|
|
1988
|
-
title: string;
|
|
1984
|
+
/** Title of the collection */
|
|
1985
|
+
title: CollectionTitle;
|
|
1986
|
+
/** Description of the collection */
|
|
1987
|
+
description?: CollectionDescription;
|
|
1989
1988
|
/** Path in the published URL */
|
|
1990
1989
|
path?: string;
|
|
1991
1990
|
/**
|
|
@@ -2022,6 +2021,18 @@ export interface Collection {
|
|
|
2022
2021
|
app: string;
|
|
2023
2022
|
};
|
|
2024
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Title of the collection
|
|
2026
|
+
* @minLength 0
|
|
2027
|
+
* @maxLength 50
|
|
2028
|
+
*/
|
|
2029
|
+
export declare type CollectionTitle = string;
|
|
2030
|
+
/**
|
|
2031
|
+
* Description of the collection
|
|
2032
|
+
* @minLength 0
|
|
2033
|
+
* @maxLength 100
|
|
2034
|
+
*/
|
|
2035
|
+
export declare type CollectionDescription = string;
|
|
2025
2036
|
export interface Integration {
|
|
2026
2037
|
object: 'integration';
|
|
2027
2038
|
/** Unique named identifier for the integration */
|
|
@@ -3221,7 +3232,7 @@ export interface ContentKitURL {
|
|
|
3221
3232
|
query?: Record<string, string | ContentKitDynamicBinding>;
|
|
3222
3233
|
}
|
|
3223
3234
|
/** Channel to subscribe to for API updates. */
|
|
3224
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel | {
|
|
3235
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | {
|
|
3225
3236
|
channel: 'organization';
|
|
3226
3237
|
organization: string;
|
|
3227
3238
|
} | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
|
|
@@ -3292,6 +3303,10 @@ export interface UserProfileChannel {
|
|
|
3292
3303
|
channel: 'user-profile';
|
|
3293
3304
|
user: string;
|
|
3294
3305
|
}
|
|
3306
|
+
export interface CollectionChannel {
|
|
3307
|
+
channel: 'collection';
|
|
3308
|
+
collection: string;
|
|
3309
|
+
}
|
|
3295
3310
|
export interface CollectionPublishingCustomizationChannel {
|
|
3296
3311
|
channel: 'collection-publishing-customization';
|
|
3297
3312
|
collection: string;
|
|
@@ -3802,6 +3817,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3802
3817
|
*/
|
|
3803
3818
|
visibility?: ContentVisibility;
|
|
3804
3819
|
}, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
3820
|
+
/**
|
|
3821
|
+
* No description
|
|
3822
|
+
*
|
|
3823
|
+
* @tags spaces
|
|
3824
|
+
* @name DeleteSpaceById
|
|
3825
|
+
* @summary Soft-deletes a space. Soft-deleted spaces will be permanently removed after 7 days.
|
|
3826
|
+
* @request DELETE:/spaces/{spaceId}
|
|
3827
|
+
* @secure
|
|
3828
|
+
*/
|
|
3829
|
+
deleteSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
3805
3830
|
/**
|
|
3806
3831
|
* No description
|
|
3807
3832
|
*
|
|
@@ -3822,6 +3847,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
3822
3847
|
* @secure
|
|
3823
3848
|
*/
|
|
3824
3849
|
duplicateSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
3850
|
+
/**
|
|
3851
|
+
* No description
|
|
3852
|
+
*
|
|
3853
|
+
* @tags spaces
|
|
3854
|
+
* @name RestoreSpace
|
|
3855
|
+
* @summary Restore a recently soft-deleted space.
|
|
3856
|
+
* @request POST:/spaces/{spaceId}/restore
|
|
3857
|
+
* @secure
|
|
3858
|
+
*/
|
|
3859
|
+
restoreSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
|
|
3825
3860
|
/**
|
|
3826
3861
|
* No description
|
|
3827
3862
|
*
|
|
@@ -4866,7 +4901,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4866
4901
|
* * `private`: Authorized members can access the content.
|
|
4867
4902
|
*/
|
|
4868
4903
|
visibility?: ContentVisibility;
|
|
4904
|
+
/** Title of the collection */
|
|
4905
|
+
title?: CollectionTitle;
|
|
4906
|
+
/** Description of the collection */
|
|
4907
|
+
description?: CollectionDescription;
|
|
4869
4908
|
}, params?: RequestParams) => Promise<HttpResponse<Collection, Error>>;
|
|
4909
|
+
/**
|
|
4910
|
+
* No description
|
|
4911
|
+
*
|
|
4912
|
+
* @tags collections
|
|
4913
|
+
* @name DeleteCollectionById
|
|
4914
|
+
* @summary Deletes a collection
|
|
4915
|
+
* @request DELETE:/collections/{collectionId}
|
|
4916
|
+
* @secure
|
|
4917
|
+
*/
|
|
4918
|
+
deleteCollectionById: (collectionId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4870
4919
|
/**
|
|
4871
4920
|
* No description
|
|
4872
4921
|
*
|
|
@@ -5785,6 +5834,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5785
5834
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5786
5835
|
items: {
|
|
5787
5836
|
space: Space;
|
|
5837
|
+
/** @deprecated */
|
|
5788
5838
|
gitSync?: GitSyncState;
|
|
5789
5839
|
}[];
|
|
5790
5840
|
}, Error>>;
|
|
@@ -6264,6 +6314,33 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6264
6314
|
page: RevisionPageDocument;
|
|
6265
6315
|
changeRequest?: ChangeRequest;
|
|
6266
6316
|
}, Error>>;
|
|
6317
|
+
/**
|
|
6318
|
+
* No description
|
|
6319
|
+
*
|
|
6320
|
+
* @tags organizations
|
|
6321
|
+
* @name GetSnippetSuggestedLocations
|
|
6322
|
+
* @summary Return possible snippet locations in an organization based on the current user.
|
|
6323
|
+
* @request GET:/orgs/{organizationId}/snippets/{snippetId}/move
|
|
6324
|
+
* @secure
|
|
6325
|
+
*/
|
|
6326
|
+
getSnippetSuggestedLocations: (organizationId: string, snippetId: string, query?: {
|
|
6327
|
+
/** Identifier of the page results to fetch. */
|
|
6328
|
+
page?: string;
|
|
6329
|
+
/** The number of results per page */
|
|
6330
|
+
limit?: number;
|
|
6331
|
+
/** If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces. */
|
|
6332
|
+
spaceId?: string;
|
|
6333
|
+
/** If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level. */
|
|
6334
|
+
pageId?: string;
|
|
6335
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
6336
|
+
items: {
|
|
6337
|
+
/** If defined and true, this location was suggested by GitBook AI. */
|
|
6338
|
+
aiPowered?: boolean;
|
|
6339
|
+
space: Space;
|
|
6340
|
+
/** The parent page of the suggested location. */
|
|
6341
|
+
parentPage?: RevisionPageDocument | RevisionPageGroup;
|
|
6342
|
+
}[];
|
|
6343
|
+
}, Error>>;
|
|
6267
6344
|
/**
|
|
6268
6345
|
* No description
|
|
6269
6346
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -591,6 +591,12 @@ var Api = class extends HttpClient {
|
|
|
591
591
|
format: "json",
|
|
592
592
|
...params
|
|
593
593
|
}),
|
|
594
|
+
deleteSpaceById: (spaceId, params = {}) => this.request({
|
|
595
|
+
path: `/spaces/${spaceId}`,
|
|
596
|
+
method: "DELETE",
|
|
597
|
+
secure: true,
|
|
598
|
+
...params
|
|
599
|
+
}),
|
|
594
600
|
generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
|
|
595
601
|
path: `/spaces/${spaceId}/hive/token`,
|
|
596
602
|
method: "POST",
|
|
@@ -605,6 +611,13 @@ var Api = class extends HttpClient {
|
|
|
605
611
|
format: "json",
|
|
606
612
|
...params
|
|
607
613
|
}),
|
|
614
|
+
restoreSpace: (spaceId, params = {}) => this.request({
|
|
615
|
+
path: `/spaces/${spaceId}/restore`,
|
|
616
|
+
method: "POST",
|
|
617
|
+
secure: true,
|
|
618
|
+
format: "json",
|
|
619
|
+
...params
|
|
620
|
+
}),
|
|
608
621
|
searchSpaceContent: (spaceId, query, params = {}) => this.request({
|
|
609
622
|
path: `/spaces/${spaceId}/search`,
|
|
610
623
|
method: "GET",
|
|
@@ -1220,6 +1233,12 @@ var Api = class extends HttpClient {
|
|
|
1220
1233
|
format: "json",
|
|
1221
1234
|
...params
|
|
1222
1235
|
}),
|
|
1236
|
+
deleteCollectionById: (collectionId, params = {}) => this.request({
|
|
1237
|
+
path: `/collections/${collectionId}`,
|
|
1238
|
+
method: "DELETE",
|
|
1239
|
+
secure: true,
|
|
1240
|
+
...params
|
|
1241
|
+
}),
|
|
1223
1242
|
listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
|
|
1224
1243
|
path: `/collections/${collectionId}/spaces`,
|
|
1225
1244
|
method: "GET",
|
|
@@ -1941,6 +1960,14 @@ var Api = class extends HttpClient {
|
|
|
1941
1960
|
format: "json",
|
|
1942
1961
|
...params
|
|
1943
1962
|
}),
|
|
1963
|
+
getSnippetSuggestedLocations: (organizationId, snippetId, query, params = {}) => this.request({
|
|
1964
|
+
path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
|
|
1965
|
+
method: "GET",
|
|
1966
|
+
query,
|
|
1967
|
+
secure: true,
|
|
1968
|
+
format: "json",
|
|
1969
|
+
...params
|
|
1970
|
+
}),
|
|
1944
1971
|
askInOrganization: (organizationId, data, params = {}) => this.request({
|
|
1945
1972
|
path: `/orgs/${organizationId}/ask`,
|
|
1946
1973
|
method: "POST",
|
package/dist/index.js
CHANGED
|
@@ -522,6 +522,12 @@ var Api = class extends HttpClient {
|
|
|
522
522
|
format: "json",
|
|
523
523
|
...params
|
|
524
524
|
}),
|
|
525
|
+
deleteSpaceById: (spaceId, params = {}) => this.request({
|
|
526
|
+
path: `/spaces/${spaceId}`,
|
|
527
|
+
method: "DELETE",
|
|
528
|
+
secure: true,
|
|
529
|
+
...params
|
|
530
|
+
}),
|
|
525
531
|
generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
|
|
526
532
|
path: `/spaces/${spaceId}/hive/token`,
|
|
527
533
|
method: "POST",
|
|
@@ -536,6 +542,13 @@ var Api = class extends HttpClient {
|
|
|
536
542
|
format: "json",
|
|
537
543
|
...params
|
|
538
544
|
}),
|
|
545
|
+
restoreSpace: (spaceId, params = {}) => this.request({
|
|
546
|
+
path: `/spaces/${spaceId}/restore`,
|
|
547
|
+
method: "POST",
|
|
548
|
+
secure: true,
|
|
549
|
+
format: "json",
|
|
550
|
+
...params
|
|
551
|
+
}),
|
|
539
552
|
searchSpaceContent: (spaceId, query, params = {}) => this.request({
|
|
540
553
|
path: `/spaces/${spaceId}/search`,
|
|
541
554
|
method: "GET",
|
|
@@ -1151,6 +1164,12 @@ var Api = class extends HttpClient {
|
|
|
1151
1164
|
format: "json",
|
|
1152
1165
|
...params
|
|
1153
1166
|
}),
|
|
1167
|
+
deleteCollectionById: (collectionId, params = {}) => this.request({
|
|
1168
|
+
path: `/collections/${collectionId}`,
|
|
1169
|
+
method: "DELETE",
|
|
1170
|
+
secure: true,
|
|
1171
|
+
...params
|
|
1172
|
+
}),
|
|
1154
1173
|
listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
|
|
1155
1174
|
path: `/collections/${collectionId}/spaces`,
|
|
1156
1175
|
method: "GET",
|
|
@@ -1872,6 +1891,14 @@ var Api = class extends HttpClient {
|
|
|
1872
1891
|
format: "json",
|
|
1873
1892
|
...params
|
|
1874
1893
|
}),
|
|
1894
|
+
getSnippetSuggestedLocations: (organizationId, snippetId, query, params = {}) => this.request({
|
|
1895
|
+
path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
|
|
1896
|
+
method: "GET",
|
|
1897
|
+
query,
|
|
1898
|
+
secure: true,
|
|
1899
|
+
format: "json",
|
|
1900
|
+
...params
|
|
1901
|
+
}),
|
|
1875
1902
|
askInOrganization: (organizationId, data, params = {}) => this.request({
|
|
1876
1903
|
path: `/orgs/${organizationId}/ask`,
|
|
1877
1904
|
method: "POST",
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -4342,6 +4342,9 @@
|
|
|
4342
4342
|
"parent": {
|
|
4343
4343
|
"type": "string",
|
|
4344
4344
|
"description": "ID of the parent collection."
|
|
4345
|
+
},
|
|
4346
|
+
"gitSync": {
|
|
4347
|
+
"$ref": "#/components/schemas/GitSyncState"
|
|
4345
4348
|
}
|
|
4346
4349
|
},
|
|
4347
4350
|
"required": [
|
|
@@ -7188,10 +7191,10 @@
|
|
|
7188
7191
|
"description": "Unique identifier for the collection"
|
|
7189
7192
|
},
|
|
7190
7193
|
"title": {
|
|
7191
|
-
"
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
"
|
|
7194
|
+
"$ref": "#/components/schemas/CollectionTitle"
|
|
7195
|
+
},
|
|
7196
|
+
"description": {
|
|
7197
|
+
"$ref": "#/components/schemas/CollectionDescription"
|
|
7195
7198
|
},
|
|
7196
7199
|
"path": {
|
|
7197
7200
|
"type": "string",
|
|
@@ -7249,6 +7252,18 @@
|
|
|
7249
7252
|
"urls"
|
|
7250
7253
|
]
|
|
7251
7254
|
},
|
|
7255
|
+
"CollectionTitle": {
|
|
7256
|
+
"type": "string",
|
|
7257
|
+
"description": "Title of the collection",
|
|
7258
|
+
"minLength": 0,
|
|
7259
|
+
"maxLength": 50
|
|
7260
|
+
},
|
|
7261
|
+
"CollectionDescription": {
|
|
7262
|
+
"type": "string",
|
|
7263
|
+
"description": "Description of the collection",
|
|
7264
|
+
"minLength": 0,
|
|
7265
|
+
"maxLength": 100
|
|
7266
|
+
},
|
|
7252
7267
|
"Integration": {
|
|
7253
7268
|
"type": "object",
|
|
7254
7269
|
"properties": {
|
|
@@ -11173,6 +11188,9 @@
|
|
|
11173
11188
|
{
|
|
11174
11189
|
"$ref": "#/components/schemas/ChangeRequestReviewsChannel"
|
|
11175
11190
|
},
|
|
11191
|
+
{
|
|
11192
|
+
"$ref": "#/components/schemas/CollectionChannel"
|
|
11193
|
+
},
|
|
11176
11194
|
{
|
|
11177
11195
|
"$ref": "#/components/schemas/CollectionPublishingCustomizationChannel"
|
|
11178
11196
|
},
|
|
@@ -11569,6 +11587,24 @@
|
|
|
11569
11587
|
"user"
|
|
11570
11588
|
]
|
|
11571
11589
|
},
|
|
11590
|
+
"CollectionChannel": {
|
|
11591
|
+
"type": "object",
|
|
11592
|
+
"properties": {
|
|
11593
|
+
"channel": {
|
|
11594
|
+
"type": "string",
|
|
11595
|
+
"enum": [
|
|
11596
|
+
"collection"
|
|
11597
|
+
]
|
|
11598
|
+
},
|
|
11599
|
+
"collection": {
|
|
11600
|
+
"type": "string"
|
|
11601
|
+
}
|
|
11602
|
+
},
|
|
11603
|
+
"required": [
|
|
11604
|
+
"channel",
|
|
11605
|
+
"collection"
|
|
11606
|
+
]
|
|
11607
|
+
},
|
|
11572
11608
|
"CollectionPublishingCustomizationChannel": {
|
|
11573
11609
|
"type": "object",
|
|
11574
11610
|
"properties": {
|
|
@@ -13064,6 +13100,31 @@
|
|
|
13064
13100
|
"$ref": "#/components/responses/UnexpectedError"
|
|
13065
13101
|
}
|
|
13066
13102
|
}
|
|
13103
|
+
},
|
|
13104
|
+
"delete": {
|
|
13105
|
+
"operationId": "deleteSpaceById",
|
|
13106
|
+
"summary": "Soft-deletes a space. Soft-deleted spaces will be permanently removed after 7 days.",
|
|
13107
|
+
"tags": [
|
|
13108
|
+
"spaces"
|
|
13109
|
+
],
|
|
13110
|
+
"security": [
|
|
13111
|
+
{
|
|
13112
|
+
"user": []
|
|
13113
|
+
}
|
|
13114
|
+
],
|
|
13115
|
+
"parameters": [
|
|
13116
|
+
{
|
|
13117
|
+
"$ref": "#/components/parameters/spaceId"
|
|
13118
|
+
}
|
|
13119
|
+
],
|
|
13120
|
+
"responses": {
|
|
13121
|
+
"205": {
|
|
13122
|
+
"description": "Space has been deleted"
|
|
13123
|
+
},
|
|
13124
|
+
"default": {
|
|
13125
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
13126
|
+
}
|
|
13127
|
+
}
|
|
13067
13128
|
}
|
|
13068
13129
|
},
|
|
13069
13130
|
"/spaces/{spaceId}/hive/token": {
|
|
@@ -13137,6 +13198,40 @@
|
|
|
13137
13198
|
}
|
|
13138
13199
|
}
|
|
13139
13200
|
},
|
|
13201
|
+
"/spaces/{spaceId}/restore": {
|
|
13202
|
+
"post": {
|
|
13203
|
+
"operationId": "restoreSpace",
|
|
13204
|
+
"summary": "Restore a recently soft-deleted space.",
|
|
13205
|
+
"tags": [
|
|
13206
|
+
"spaces"
|
|
13207
|
+
],
|
|
13208
|
+
"security": [
|
|
13209
|
+
{
|
|
13210
|
+
"user": []
|
|
13211
|
+
}
|
|
13212
|
+
],
|
|
13213
|
+
"parameters": [
|
|
13214
|
+
{
|
|
13215
|
+
"$ref": "#/components/parameters/spaceId"
|
|
13216
|
+
}
|
|
13217
|
+
],
|
|
13218
|
+
"responses": {
|
|
13219
|
+
"200": {
|
|
13220
|
+
"description": "Space restored",
|
|
13221
|
+
"content": {
|
|
13222
|
+
"application/json": {
|
|
13223
|
+
"schema": {
|
|
13224
|
+
"$ref": "#/components/schemas/Space"
|
|
13225
|
+
}
|
|
13226
|
+
}
|
|
13227
|
+
}
|
|
13228
|
+
},
|
|
13229
|
+
"default": {
|
|
13230
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
13231
|
+
}
|
|
13232
|
+
}
|
|
13233
|
+
}
|
|
13234
|
+
},
|
|
13140
13235
|
"/spaces/{spaceId}/search": {
|
|
13141
13236
|
"get": {
|
|
13142
13237
|
"operationId": "searchSpaceContent",
|
|
@@ -16745,6 +16840,12 @@
|
|
|
16745
16840
|
"properties": {
|
|
16746
16841
|
"visibility": {
|
|
16747
16842
|
"$ref": "#/components/schemas/ContentVisibility"
|
|
16843
|
+
},
|
|
16844
|
+
"title": {
|
|
16845
|
+
"$ref": "#/components/schemas/CollectionTitle"
|
|
16846
|
+
},
|
|
16847
|
+
"description": {
|
|
16848
|
+
"$ref": "#/components/schemas/CollectionDescription"
|
|
16748
16849
|
}
|
|
16749
16850
|
}
|
|
16750
16851
|
}
|
|
@@ -16766,6 +16867,31 @@
|
|
|
16766
16867
|
"$ref": "#/components/responses/UnexpectedError"
|
|
16767
16868
|
}
|
|
16768
16869
|
}
|
|
16870
|
+
},
|
|
16871
|
+
"delete": {
|
|
16872
|
+
"operationId": "deleteCollectionById",
|
|
16873
|
+
"summary": "Deletes a collection",
|
|
16874
|
+
"tags": [
|
|
16875
|
+
"collections"
|
|
16876
|
+
],
|
|
16877
|
+
"security": [
|
|
16878
|
+
{
|
|
16879
|
+
"user": []
|
|
16880
|
+
}
|
|
16881
|
+
],
|
|
16882
|
+
"parameters": [
|
|
16883
|
+
{
|
|
16884
|
+
"$ref": "#/components/parameters/collectionId"
|
|
16885
|
+
}
|
|
16886
|
+
],
|
|
16887
|
+
"responses": {
|
|
16888
|
+
"205": {
|
|
16889
|
+
"description": "Collection has been deleted"
|
|
16890
|
+
},
|
|
16891
|
+
"default": {
|
|
16892
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
16893
|
+
}
|
|
16894
|
+
}
|
|
16769
16895
|
}
|
|
16770
16896
|
},
|
|
16771
16897
|
"/collections/{collectionId}/spaces": {
|
|
@@ -19694,6 +19820,7 @@
|
|
|
19694
19820
|
"$ref": "#/components/schemas/Space"
|
|
19695
19821
|
},
|
|
19696
19822
|
"gitSync": {
|
|
19823
|
+
"deprecated": true,
|
|
19697
19824
|
"$ref": "#/components/schemas/GitSyncState"
|
|
19698
19825
|
}
|
|
19699
19826
|
},
|
|
@@ -21392,6 +21519,104 @@
|
|
|
21392
21519
|
"$ref": "#/components/responses/UnexpectedError"
|
|
21393
21520
|
}
|
|
21394
21521
|
}
|
|
21522
|
+
},
|
|
21523
|
+
"get": {
|
|
21524
|
+
"operationId": "getSnippetSuggestedLocations",
|
|
21525
|
+
"summary": "Return possible snippet locations in an organization based on the current user.",
|
|
21526
|
+
"tags": [
|
|
21527
|
+
"organizations"
|
|
21528
|
+
],
|
|
21529
|
+
"security": [
|
|
21530
|
+
{
|
|
21531
|
+
"user": []
|
|
21532
|
+
}
|
|
21533
|
+
],
|
|
21534
|
+
"parameters": [
|
|
21535
|
+
{
|
|
21536
|
+
"$ref": "#/components/parameters/organizationId"
|
|
21537
|
+
},
|
|
21538
|
+
{
|
|
21539
|
+
"$ref": "#/components/parameters/snippetId"
|
|
21540
|
+
},
|
|
21541
|
+
{
|
|
21542
|
+
"$ref": "#/components/parameters/listPage"
|
|
21543
|
+
},
|
|
21544
|
+
{
|
|
21545
|
+
"$ref": "#/components/parameters/listLimit"
|
|
21546
|
+
},
|
|
21547
|
+
{
|
|
21548
|
+
"name": "spaceId",
|
|
21549
|
+
"in": "query",
|
|
21550
|
+
"description": "If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces.",
|
|
21551
|
+
"schema": {
|
|
21552
|
+
"type": "string"
|
|
21553
|
+
}
|
|
21554
|
+
},
|
|
21555
|
+
{
|
|
21556
|
+
"name": "pageId",
|
|
21557
|
+
"in": "query",
|
|
21558
|
+
"description": "If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level.",
|
|
21559
|
+
"schema": {
|
|
21560
|
+
"type": "string"
|
|
21561
|
+
}
|
|
21562
|
+
}
|
|
21563
|
+
],
|
|
21564
|
+
"responses": {
|
|
21565
|
+
"200": {
|
|
21566
|
+
"description": "A paginated list of suggested snippet locations.",
|
|
21567
|
+
"content": {
|
|
21568
|
+
"application/json": {
|
|
21569
|
+
"schema": {
|
|
21570
|
+
"allOf": [
|
|
21571
|
+
{
|
|
21572
|
+
"$ref": "#/components/schemas/List"
|
|
21573
|
+
},
|
|
21574
|
+
{
|
|
21575
|
+
"type": "object",
|
|
21576
|
+
"required": [
|
|
21577
|
+
"items"
|
|
21578
|
+
],
|
|
21579
|
+
"properties": {
|
|
21580
|
+
"items": {
|
|
21581
|
+
"type": "array",
|
|
21582
|
+
"items": {
|
|
21583
|
+
"type": "object",
|
|
21584
|
+
"required": [
|
|
21585
|
+
"space"
|
|
21586
|
+
],
|
|
21587
|
+
"properties": {
|
|
21588
|
+
"aiPowered": {
|
|
21589
|
+
"type": "boolean",
|
|
21590
|
+
"description": "If defined and true, this location was suggested by GitBook AI."
|
|
21591
|
+
},
|
|
21592
|
+
"space": {
|
|
21593
|
+
"$ref": "#/components/schemas/Space"
|
|
21594
|
+
},
|
|
21595
|
+
"parentPage": {
|
|
21596
|
+
"description": "The parent page of the suggested location.",
|
|
21597
|
+
"oneOf": [
|
|
21598
|
+
{
|
|
21599
|
+
"$ref": "#/components/schemas/RevisionPageDocument"
|
|
21600
|
+
},
|
|
21601
|
+
{
|
|
21602
|
+
"$ref": "#/components/schemas/RevisionPageGroup"
|
|
21603
|
+
}
|
|
21604
|
+
]
|
|
21605
|
+
}
|
|
21606
|
+
}
|
|
21607
|
+
}
|
|
21608
|
+
}
|
|
21609
|
+
}
|
|
21610
|
+
}
|
|
21611
|
+
]
|
|
21612
|
+
}
|
|
21613
|
+
}
|
|
21614
|
+
}
|
|
21615
|
+
},
|
|
21616
|
+
"default": {
|
|
21617
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
21618
|
+
}
|
|
21619
|
+
}
|
|
21395
21620
|
}
|
|
21396
21621
|
},
|
|
21397
21622
|
"/orgs/{organizationId}/ask": {
|
package/spec/openapi.yaml
CHANGED
|
@@ -2837,6 +2837,8 @@ components:
|
|
|
2837
2837
|
parent:
|
|
2838
2838
|
type: string
|
|
2839
2839
|
description: ID of the parent collection.
|
|
2840
|
+
gitSync:
|
|
2841
|
+
$ref: "#/components/schemas/GitSyncState"
|
|
2840
2842
|
required:
|
|
2841
2843
|
- object
|
|
2842
2844
|
- id
|
|
@@ -4758,10 +4760,9 @@ components:
|
|
|
4758
4760
|
type: string
|
|
4759
4761
|
description: Unique identifier for the collection
|
|
4760
4762
|
title:
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
maxLength: 50
|
|
4763
|
+
$ref: "#/components/schemas/CollectionTitle"
|
|
4764
|
+
description:
|
|
4765
|
+
$ref: "#/components/schemas/CollectionDescription"
|
|
4765
4766
|
path:
|
|
4766
4767
|
type: string
|
|
4767
4768
|
description: Path in the published URL
|
|
@@ -4803,6 +4804,16 @@ components:
|
|
|
4803
4804
|
- organization
|
|
4804
4805
|
- visibility
|
|
4805
4806
|
- urls
|
|
4807
|
+
CollectionTitle:
|
|
4808
|
+
type: string
|
|
4809
|
+
description: Title of the collection
|
|
4810
|
+
minLength: 0
|
|
4811
|
+
maxLength: 50
|
|
4812
|
+
CollectionDescription:
|
|
4813
|
+
type: string
|
|
4814
|
+
description: Description of the collection
|
|
4815
|
+
minLength: 0
|
|
4816
|
+
maxLength: 100
|
|
4806
4817
|
Integration:
|
|
4807
4818
|
type: object
|
|
4808
4819
|
properties:
|
|
@@ -7345,6 +7356,7 @@ components:
|
|
|
7345
7356
|
- $ref: "#/components/schemas/UserOrganizationsChannel"
|
|
7346
7357
|
- $ref: "#/components/schemas/UserProfileChannel"
|
|
7347
7358
|
- $ref: "#/components/schemas/ChangeRequestReviewsChannel"
|
|
7359
|
+
- $ref: "#/components/schemas/CollectionChannel"
|
|
7348
7360
|
- $ref: "#/components/schemas/CollectionPublishingCustomizationChannel"
|
|
7349
7361
|
- type: object
|
|
7350
7362
|
properties:
|
|
@@ -7584,6 +7596,18 @@ components:
|
|
|
7584
7596
|
required:
|
|
7585
7597
|
- channel
|
|
7586
7598
|
- user
|
|
7599
|
+
CollectionChannel:
|
|
7600
|
+
type: object
|
|
7601
|
+
properties:
|
|
7602
|
+
channel:
|
|
7603
|
+
type: string
|
|
7604
|
+
enum:
|
|
7605
|
+
- collection
|
|
7606
|
+
collection:
|
|
7607
|
+
type: string
|
|
7608
|
+
required:
|
|
7609
|
+
- channel
|
|
7610
|
+
- collection
|
|
7587
7611
|
CollectionPublishingCustomizationChannel:
|
|
7588
7612
|
type: object
|
|
7589
7613
|
properties:
|
|
@@ -8567,6 +8591,20 @@ paths:
|
|
|
8567
8591
|
$ref: "#/components/schemas/Space"
|
|
8568
8592
|
default:
|
|
8569
8593
|
$ref: "#/components/responses/UnexpectedError"
|
|
8594
|
+
delete:
|
|
8595
|
+
operationId: deleteSpaceById
|
|
8596
|
+
summary: Soft-deletes a space. Soft-deleted spaces will be permanently removed after 7 days.
|
|
8597
|
+
tags:
|
|
8598
|
+
- spaces
|
|
8599
|
+
security:
|
|
8600
|
+
- user: []
|
|
8601
|
+
parameters:
|
|
8602
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8603
|
+
responses:
|
|
8604
|
+
"205":
|
|
8605
|
+
description: Space has been deleted
|
|
8606
|
+
default:
|
|
8607
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8570
8608
|
"/spaces/{spaceId}/hive/token":
|
|
8571
8609
|
post:
|
|
8572
8610
|
operationId: generateSpaceHiveReadAccessToken
|
|
@@ -8608,6 +8646,25 @@ paths:
|
|
|
8608
8646
|
$ref: "#/components/schemas/Space"
|
|
8609
8647
|
default:
|
|
8610
8648
|
$ref: "#/components/responses/UnexpectedError"
|
|
8649
|
+
"/spaces/{spaceId}/restore":
|
|
8650
|
+
post:
|
|
8651
|
+
operationId: restoreSpace
|
|
8652
|
+
summary: Restore a recently soft-deleted space.
|
|
8653
|
+
tags:
|
|
8654
|
+
- spaces
|
|
8655
|
+
security:
|
|
8656
|
+
- user: []
|
|
8657
|
+
parameters:
|
|
8658
|
+
- $ref: "#/components/parameters/spaceId"
|
|
8659
|
+
responses:
|
|
8660
|
+
"200":
|
|
8661
|
+
description: Space restored
|
|
8662
|
+
content:
|
|
8663
|
+
application/json:
|
|
8664
|
+
schema:
|
|
8665
|
+
$ref: "#/components/schemas/Space"
|
|
8666
|
+
default:
|
|
8667
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
8611
8668
|
"/spaces/{spaceId}/search":
|
|
8612
8669
|
get:
|
|
8613
8670
|
operationId: searchSpaceContent
|
|
@@ -10571,6 +10628,10 @@ paths:
|
|
|
10571
10628
|
properties:
|
|
10572
10629
|
visibility:
|
|
10573
10630
|
$ref: "#/components/schemas/ContentVisibility"
|
|
10631
|
+
title:
|
|
10632
|
+
$ref: "#/components/schemas/CollectionTitle"
|
|
10633
|
+
description:
|
|
10634
|
+
$ref: "#/components/schemas/CollectionDescription"
|
|
10574
10635
|
responses:
|
|
10575
10636
|
"200":
|
|
10576
10637
|
description: The collection has been updated
|
|
@@ -10580,6 +10641,20 @@ paths:
|
|
|
10580
10641
|
$ref: "#/components/schemas/Collection"
|
|
10581
10642
|
default:
|
|
10582
10643
|
$ref: "#/components/responses/UnexpectedError"
|
|
10644
|
+
delete:
|
|
10645
|
+
operationId: deleteCollectionById
|
|
10646
|
+
summary: Deletes a collection
|
|
10647
|
+
tags:
|
|
10648
|
+
- collections
|
|
10649
|
+
security:
|
|
10650
|
+
- user: []
|
|
10651
|
+
parameters:
|
|
10652
|
+
- $ref: "#/components/parameters/collectionId"
|
|
10653
|
+
responses:
|
|
10654
|
+
"205":
|
|
10655
|
+
description: Collection has been deleted
|
|
10656
|
+
default:
|
|
10657
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
10583
10658
|
"/collections/{collectionId}/spaces":
|
|
10584
10659
|
get:
|
|
10585
10660
|
operationId: listSpacesInCollectionById
|
|
@@ -12247,6 +12322,7 @@ paths:
|
|
|
12247
12322
|
space:
|
|
12248
12323
|
$ref: "#/components/schemas/Space"
|
|
12249
12324
|
gitSync:
|
|
12325
|
+
deprecated: true
|
|
12250
12326
|
$ref: "#/components/schemas/GitSyncState"
|
|
12251
12327
|
required:
|
|
12252
12328
|
- space
|
|
@@ -13194,6 +13270,59 @@ paths:
|
|
|
13194
13270
|
$ref: "#/components/schemas/ChangeRequest"
|
|
13195
13271
|
default:
|
|
13196
13272
|
$ref: "#/components/responses/UnexpectedError"
|
|
13273
|
+
get:
|
|
13274
|
+
operationId: getSnippetSuggestedLocations
|
|
13275
|
+
summary: Return possible snippet locations in an organization based on the current user.
|
|
13276
|
+
tags:
|
|
13277
|
+
- organizations
|
|
13278
|
+
security:
|
|
13279
|
+
- user: []
|
|
13280
|
+
parameters:
|
|
13281
|
+
- $ref: "#/components/parameters/organizationId"
|
|
13282
|
+
- $ref: "#/components/parameters/snippetId"
|
|
13283
|
+
- $ref: "#/components/parameters/listPage"
|
|
13284
|
+
- $ref: "#/components/parameters/listLimit"
|
|
13285
|
+
- name: spaceId
|
|
13286
|
+
in: query
|
|
13287
|
+
description: If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces.
|
|
13288
|
+
schema:
|
|
13289
|
+
type: string
|
|
13290
|
+
- name: pageId
|
|
13291
|
+
in: query
|
|
13292
|
+
description: If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level.
|
|
13293
|
+
schema:
|
|
13294
|
+
type: string
|
|
13295
|
+
responses:
|
|
13296
|
+
"200":
|
|
13297
|
+
description: A paginated list of suggested snippet locations.
|
|
13298
|
+
content:
|
|
13299
|
+
application/json:
|
|
13300
|
+
schema:
|
|
13301
|
+
allOf:
|
|
13302
|
+
- $ref: "#/components/schemas/List"
|
|
13303
|
+
- type: object
|
|
13304
|
+
required:
|
|
13305
|
+
- items
|
|
13306
|
+
properties:
|
|
13307
|
+
items:
|
|
13308
|
+
type: array
|
|
13309
|
+
items:
|
|
13310
|
+
type: object
|
|
13311
|
+
required:
|
|
13312
|
+
- space
|
|
13313
|
+
properties:
|
|
13314
|
+
aiPowered:
|
|
13315
|
+
type: boolean
|
|
13316
|
+
description: If defined and true, this location was suggested by GitBook AI.
|
|
13317
|
+
space:
|
|
13318
|
+
$ref: "#/components/schemas/Space"
|
|
13319
|
+
parentPage:
|
|
13320
|
+
description: The parent page of the suggested location.
|
|
13321
|
+
oneOf:
|
|
13322
|
+
- $ref: "#/components/schemas/RevisionPageDocument"
|
|
13323
|
+
- $ref: "#/components/schemas/RevisionPageGroup"
|
|
13324
|
+
default:
|
|
13325
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
13197
13326
|
"/orgs/{organizationId}/ask":
|
|
13198
13327
|
post:
|
|
13199
13328
|
operationId: askInOrganization
|